1 2018-07-03 Tom Tromey <tom@tromey.com>
3 * common/ptid.c (ptid_tid_p): Remove.
4 * common/ptid.h (ptid_tid_p): Don't declare.
5 * sol-thread.c: Update.
7 2018-07-03 Tom Tromey <tom@tromey.com>
9 * common/ptid.c (ptid_lwp_p): Remove.
10 * common/ptid.h (ptid_lwp_p): Don't declare.
12 * linux-nat.c: Update.
13 * nat/linux-procfs.c: Update.
14 * nat/x86-linux-dregs.c: Update.
15 * sol-thread.c: Update.
17 2018-07-03 Tom Tromey <tom@tromey.com>
19 * common/ptid.c (ptid_is_pid): Remove.
20 * common/ptid.h (ptid_is_pid): Don't declare.
22 * linux-nat.c: Update.
23 * mi/mi-interp.c: Update.
27 2018-07-03 Tom Tromey <tom@tromey.com>
29 * common/ptid.c (ptid_get_tid): Remove.
30 * common/ptid.h (ptid_get_tid): Don't declare.
31 * ada-tasks.c: Update.
32 * aix-thread.c: Update.
33 * bsd-uthread.c: Update.
34 * darwin-nat.c: Update.
36 * i386-darwin-nat.c: Update.
38 * linux-tdep.c: Update.
39 * nto-procfs.c: Update.
40 * ppc-ravenscar-thread.c: Update.
41 * python/py-infthread.c: Update.
42 * ravenscar-thread.c: Update.
43 * sol-thread.c: Update.
44 * sparc-ravenscar-thread.c: Update.
45 * windows-nat.c: Update.
47 2018-07-03 Tom Tromey <tom@tromey.com>
49 * common/ptid.c (ptid_get_lwp): Remove.
50 * common/ptid.h (ptid_get_lwp): Don't declare.
51 * aarch64-linux-nat.c: Update.
52 * ada-tasks.c: Update.
53 * aix-thread.c: Update.
54 * amd64-linux-nat.c: Update.
55 * arm-linux-nat.c: Update.
58 * fbsd-tdep.c: Update.
60 * i386-cygwin-tdep.c: Update.
61 * i386-gnu-nat.c: Update.
62 * i386-linux-nat.c: Update.
63 * ia64-linux-nat.c: Update.
64 * inf-ptrace.c: Update.
66 * linux-fork.c: Update.
67 * linux-nat.c: Update.
68 * linux-tdep.c: Update.
69 * linux-thread-db.c: Update.
70 * mips-linux-nat.c: Update.
71 * nat/aarch64-linux-hw-point.c: Update.
72 * nat/aarch64-linux.c: Update.
73 * nat/linux-btrace.c: Update.
74 * nat/linux-osdata.c: Update.
75 * nat/linux-procfs.c: Update.
76 * nat/x86-linux-dregs.c: Update.
78 * ppc-fbsd-nat.c: Update.
79 * ppc-linux-nat.c: Update.
81 * python/py-infthread.c: Update.
82 * ravenscar-thread.c: Update.
84 * s390-linux-nat.c: Update.
85 * sol-thread.c: Update.
86 * sol2-tdep.c: Update.
87 * spu-linux-nat.c: Update.
88 * x86-linux-nat.c: Update.
89 * xtensa-linux-nat.c: Update.
91 2018-07-03 Tom Tromey <tom@tromey.com>
93 * common/ptid.c (ptid_get_pid): Remove.
94 * common/ptid.h (ptid_get_pid): Don't declare.
95 * aarch64-linux-nat.c: Update.
97 * aix-thread.c: Update.
98 * alpha-bsd-nat.c: Update.
99 * amd64-fbsd-nat.c: Update.
100 * amd64-linux-nat.c: Update.
101 * arm-linux-nat.c: Update.
102 * arm-nbsd-nat.c: Update.
104 * break-catch-syscall.c: Update.
105 * breakpoint.c: Update.
106 * bsd-uthread.c: Update.
109 * darwin-nat.c: Update.
110 * fbsd-nat.c: Update.
111 * fbsd-tdep.c: Update.
114 * hppa-nbsd-nat.c: Update.
115 * hppa-obsd-nat.c: Update.
116 * i386-fbsd-nat.c: Update.
117 * ia64-linux-nat.c: Update.
118 * inf-ptrace.c: Update.
120 * inferior.c: Update.
121 * inferior.h: Update.
124 * linux-fork.c: Update.
125 * linux-nat.c: Update.
126 * linux-tdep.c: Update.
127 * linux-thread-db.c: Update.
128 * m68k-bsd-nat.c: Update.
129 * mi/mi-interp.c: Update.
130 * mi/mi-main.c: Update.
131 * mips-linux-nat.c: Update.
132 * mips-nbsd-nat.c: Update.
133 * mips64-obsd-nat.c: Update.
134 * nat/aarch64-linux-hw-point.c: Update.
135 * nat/aarch64-linux.c: Update.
136 * nat/linux-btrace.c: Update.
137 * nat/linux-osdata.c: Update.
138 * nat/linux-procfs.c: Update.
139 * nat/x86-linux-dregs.c: Update.
140 * nto-procfs.c: Update.
141 * obsd-nat.c: Update.
142 * ppc-linux-nat.c: Update.
143 * ppc-nbsd-nat.c: Update.
144 * ppc-obsd-nat.c: Update.
145 * proc-service.c: Update.
147 * python/py-inferior.c: Update.
148 * python/py-infthread.c: Update.
149 * ravenscar-thread.c: Update.
151 * remote-sim.c: Update.
153 * rs6000-nat.c: Update.
154 * s390-linux-nat.c: Update.
155 * sh-nbsd-nat.c: Update.
156 * sol-thread.c: Update.
157 * sparc-nat.c: Update.
158 * sparc64-tdep.c: Update.
159 * spu-linux-nat.c: Update.
160 * spu-tdep.c: Update.
161 * target-debug.h: Update.
164 * tid-parse.c: Update.
165 * tracefile-tfile.c: Update.
166 * vax-bsd-nat.c: Update.
167 * windows-nat.c: Update.
168 * x86-linux-nat.c: Update.
171 2018-07-03 Tom Tromey <tom@tromey.com>
173 * common/ptid.c (pid_to_ptid): Remove.
174 * common/ptid.h (pid_to_ptid): Don't declare.
175 * aix-thread.c: Update.
176 * arm-linux-nat.c: Update.
177 * common/ptid.c: Update.
178 * common/ptid.h: Update.
181 * darwin-nat.c: Update.
182 * fbsd-nat.c: Update.
183 * fork-child.c: Update.
185 * go32-nat.c: Update.
186 * inf-ptrace.c: Update.
188 * inferior.c: Update.
190 * linux-fork.c: Update.
191 * linux-nat.c: Update.
192 * nat/aarch64-linux-hw-point.c: Update.
193 * nat/fork-inferior.c: Update.
194 * nat/x86-linux-dregs.c: Update.
195 * nto-procfs.c: Update.
196 * obsd-nat.c: Update.
198 * progspace.c: Update.
200 * rs6000-nat.c: Update.
201 * s390-linux-nat.c: Update.
202 * sol-thread.c: Update.
203 * spu-linux-nat.c: Update.
206 * tracefile-tfile.c: Update.
207 * windows-nat.c: Update.
209 2018-07-03 Tom Tromey <tom@tromey.com>
211 * common/ptid.h (ptid_build): Don't declare.
212 * common/ptid.c (ptid_build): Remove.
213 * aix-thread.c: Update.
215 * bsd-uthread.c: Update.
216 * common/agent.c: Update.
217 * common/ptid.c: Update.
218 * common/ptid.h: Update.
220 * darwin-nat.c: Update.
221 * fbsd-nat.c: Update.
223 * linux-fork.c: Update.
224 * linux-nat.c: Update.
225 * linux-thread-db.c: Update.
226 * nat/linux-osdata.c: Update.
227 * nat/linux-procfs.c: Update.
228 * nto-procfs.c: Update.
229 * obsd-nat.c: Update.
230 * proc-service.c: Update.
232 * ravenscar-thread.c: Update.
233 * remote-sim.c: Update.
235 * sol-thread.c: Update.
237 * windows-nat.c: Update.
239 2018-07-03 Tom Tromey <tom@tromey.com>
241 * infrun.c (follow_exec): Use exit_inferior_silent.
242 * inferior.c (exit_inferior_num_silent): Remove.
243 * inferior.h (exit_inferior_num_silent): Don't declare.
245 2018-07-03 Tom Tromey <tom@tromey.com>
248 * darwin-nat.c (darwin_attach_pid): Reset inferior and
249 inferior_ptid on error.
251 2018-07-02 Maciej W. Rozycki <macro@mips.com>
252 Simon Marchi <simon.marchi@polymtl.ca>
255 * disasm.h (gdb_disassembler): Add
256 `m_disassembler_options_holder'. member
257 * disasm.c (get_all_disassembler_options): New function.
258 (gdb_disassembler::gdb_disassembler): Use it.
259 (gdb_buffered_insn_length_init_dis): Likewise.
260 (gdb_buffered_insn_length): Adjust accordingly.
261 (set_disassembler_options): Handle options with arguments.
262 (show_disassembler_options_sfunc): Likewise. Add a leading new
263 line if showing options with descriptions.
264 (disassembler_options_completer): Adapt to using the
265 `disasm_options_and_args_t' structure.
266 * mips-tdep.c (mips_disassembler_options): New variable.
267 (mips_disassembler_options_o32): Likewise.
268 (mips_disassembler_options_n32): Likewise.
269 (mips_disassembler_options_n64): Likewise.
270 (gdb_print_insn_mips): Don't set `disassembler_options'.
271 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
273 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
274 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
275 `gdbarch_disassembler_options_implicit' and
276 `gdbarch_valid_disassembler_options'.
277 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
278 `disasm_options_and_args_t' structure.
279 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
281 (valid_disassembler_options): Switch from `disasm_options_t' to
282 the `disasm_options_and_args_t' structure.
283 * NEWS: Document `set disassembler-options' support for the MIPS
285 * gdbarch.h: Regenerate.
286 * gdbarch.c: Regenerate.
288 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
290 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
292 2018-06-29 Joel Brobecker <brobecker@adacore.com>
294 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
295 parameter in call to amd64_target_description.
296 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
297 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
298 (amd64fbsd_init_abi): Likewise.
299 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
300 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
301 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
302 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
304 2018-06-29 Pedro Alves <palves@redhat.com>
306 * gdb/amd64-tdep.h (amd64_create_target_description): Add
307 "segments" parameter.
308 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
309 (_initialize_amd64_tdep): Update call to
310 amd64_create_target_description.
311 (amd64_target_description): Add "segments" parameter. Adjust
312 the implementation to use it.
313 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
314 call to amd64_create_target_description.
315 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
316 * gdb/arch/amd64.h (amd64_create_target_description): Add
318 * gdb/arch/amd64.c (amd64_create_target_description): Add
319 "segments" parameter. Call create_feature_i386_64bit_segments
320 only if SEGMENTS is true.
321 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
322 call to amd64_create_target_description.
324 2018-06-29 Pedro Alves <palves@redhat.com>
326 * thread.c (thread_target_id_str): New, factored out from ...
327 (print_thread_info_1): ... here. Use it to compute the max
328 "Target Id" column width.
330 2018-06-29 Pedro Alves <palves@redhat.com>
332 * remote.c (remote_target::extra_thread_info): Delete
333 'display_buf' and 'n' locals. from the cache, regardless of
334 packet mechanims is in use. Use cache for qThreadExtra and qP
337 2018-06-29 Pedro Alves <palves@redhat.com>
339 * blockframe.c (find_pc_sect_containing_function): New function.
340 * breakpoint.c (print_breakpoint_location): Don't call
341 find_pc_sect_function.
342 * linespec.c (create_sals_line_offset): Record the location's
344 * linespec.c (convert_address_location_to_sals): Fill in sal's
345 symbol with find_pc_sect_containing_function.
346 * symtab.c (find_function_start_sal): Rename to ...
347 (find_function_start_sal_1): ... this.
348 (find_function_start_sal): Reimplement as wrapper around
349 find_function_start_sal_1, and use
350 find_pc_sect_containing_function to fill in the sal's symbol.
351 (find_function_start_sal(symbol*, bool)): Adjust.
352 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
354 (find_pc_sect_containing_function): Declare.
356 2018-06-29 Pedro Alves <palves@redhat.com>
358 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
359 true if the the location has no symbol.
361 2018-06-28 Tom Tromey <tom@tromey.com>
363 * NEWS: Mention --enable-codesign.
364 * silent-rules.mk (ECHO_SIGN): New variable.
365 * configure.ac: Add --enable-codesign.
366 * configure: Rebuild.
367 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
368 (gdb$(EXEEXT)): Optionally invoke codesign.
370 2018-06-28 Pedro Alves <palves@redhat.com>
372 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
374 (switch_to_thread_no_regs): Adjust comment.
375 * infcmd.c (stop_pc): Delete.
376 (post_create_inferior, info_program_command): Replace references
377 to stop_pc with references to thread_info->suspend.stop_pc.
378 * inferior.h (stop_pc): Delete declaration.
379 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
380 (handle_inferior_event_1, handle_signal_stop)
381 (process_event_stop_test, keep_going_stepped_thread)
382 (handle_step_into_function, handle_step_into_function_backward)
383 (print_stop_location): Replace references to stop_pc with
384 references to thread_info->suspend.stop_pc.
385 (struct infcall_suspend_state) <stop_pc>: Delete field.
386 (save_infcall_suspend_state, restore_infcall_suspend_state):
387 Remove references to inf_stat->stop_pc.
388 * linux-fork.c (fork_load_infrun_state): Likewise.
389 * record-btrace.c (record_btrace_set_replay): Likewise.
390 * record-full.c (record_full_goto_entry): Likewise.
391 * remote.c (print_one_stopped_thread): Likewise.
392 * target.c (target_resume): Extend comment.
393 * thread.c (set_executing_thread): New.
394 (set_executing): Use it.
395 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
396 Remove references to stop_pc.
398 2018-06-28 Pedro Alves <palves@redhat.com>
400 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
401 Moving fetching stop_pc until after ecs->event_thread is refreshed.
403 2018-06-28 Tom Tromey <tom@tromey.com>
405 * coffread.c (coff_symfile_finish): Update.
406 * xcoffread.c (xcoff_symfile_finish): Update.
407 * elfread.c (elf_symfile_finish): Update.
408 * symfile.h (dwarf2_free_objfile): Don't declare.
409 * dwarf2read.c (_initialize_dwarf2_read): Use
410 register_objfile_data_with_cleanup.
411 (dwarf2_free_objfile): Now static. Change signature.
413 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
415 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
416 option "-o" to add-symbol-file-load to add an offset to each
417 section's load address.
418 * symfile.c (set_objfile_default_section_offset): New function.
420 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
422 * symfile.c (add_symbol_file_command): Make sure that sections
423 with the same name are sorted in the same order.
425 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
427 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
428 require the second argument. If omitted, load sections at the
429 addresses specified in the file.
431 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
433 * symfile.c (symbol_file_command, symbol_file_add_main_1)
434 (_initialize_symfile): Add option "-o" to symbol-file to add an
435 offset to each section of the symbol file.
437 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
439 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
441 2018-06-27 Tom Tromey <tom@tromey.com>
443 * stack.c (_initialize_stack): Update "func" help text.
445 2018-06-27 Tom Tromey <tom@tromey.com>
447 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
449 (unwind_infopy_str, pyuw_create_unwind_info)
450 (unwind_infopy_add_saved_register, pyuw_sniffer)
451 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
453 (struct saved_reg): Add constructor.
454 <value>: Now a gdbpy_ref<>.
456 2018-06-27 Tom Tromey <tom@tromey.com>
458 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
460 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
462 * gdb-gdb.py.in: Format using autopep8.
464 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
466 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
467 (type_lookup_function): Recognize CORE_ADDR values.
469 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
471 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
474 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
476 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
479 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
481 * gdb-gdb.py: Move to...
482 * gdb-gdb.py.in: ... here.
483 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
484 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
486 (distclean): Remove gdb-gdb.py when cleaning.
487 (gdb-gdb.py, gdb-gdb.gdb): New rules.
488 * configure: Re-generate.
490 2018-06-27 Pedro Alves <palves@redhat.com>
492 * proc-service.c (get_ps_regcache): New.
493 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
494 (ps_lsetfpregs): Use it.
496 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
499 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
500 (dwarf_decode_lines_1): Adjust.
502 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
504 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
506 <info_proc>: Likewise.
508 2018-06-26 Joel Brobecker <brobecker@adacore.com>
510 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
511 to windows_fetch_one_register, and only handle the case of
512 fetching one register. Move the code that reloads the context
513 and iterates over all registers if R is negative to...
514 (windows_nat_target::fetch_registers): ... here.
515 (do_windows_store_inferior_registers): Rename to
516 windows_store_one_register, and only handle the case of storing
517 one register. Move the code that handles the case where r is
519 (windows_nat_target::store_registers) ... here.
521 2018-06-26 Tom Tromey <tom@tromey.com>
524 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
525 * rust-lang.c (rust_print_struct_def): Add podata parameter.
527 (rust_internal_print_type): Add podata parameter.
528 (rust_print_type): Update.
530 2018-06-26 Tom Tromey <tom@tromey.com>
532 * typeprint.h (struct print_offset_data) <update, finish,
533 maybe_print_hole>: New methods.
534 <indentation>: New constant.
535 * typeprint.c (print_offset_data::indentation): Define.
536 (print_offset_data::maybe_print_hole, print_offset_data::update)
537 (print_offset_data::finish): Move from c-typeprint.c and rename.
538 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
539 (print_spaces_filtered_with_print_options): Update.
540 (c_print_type_union_field_offset, maybe_print_hole)
541 (c_print_type_struct_field_offset): Move to typeprint.c and
543 (c_type_print_base_struct_union): Update.
545 2018-06-25 Pedro Alves <palves@redhat.com>
547 * gdbthread.h (thread_info_ref, delete_thread)
548 (delete_thread_silent, first_thread_of_inferior)
549 (any_thread_of_inferior, switch_to_thread)
550 (enable_thread_stack_temporaries)
551 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
552 (get_last_thread_stack_temporary)
553 (value_in_thread_stack_temporaries, can_access_registers_thread):
554 Spell out "struct thread_info" instead of just "thread_info".
555 * inferior.h (notice_new_inferior): Likewise.
557 2018-06-25 Pedro Alves <palves@redhat.com>
559 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
560 pass thread_info pointer to delete_thread.
561 (windows_nat_target::detach): Pass inferior pointer to
563 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
565 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
566 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
567 and pass a thread_info pointer to delete_thread.
568 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
569 pass thread_info pointer to delete_thread.
570 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
571 delete_thread_silent call.
572 * procfs.c (procfs_target::detach): Pass inferior pointer to
574 (procfs_target::wait): Pass thread_info pointer to delete_thread.
575 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
576 delete_thread_silent call.
577 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
578 pass thread_info pointer to delete_thread.
579 (windows_nat_target::detach): Pass inferior pointer to
582 2018-06-22 Alan Hayward <alan.hayward@arm.com>
584 * regcache.c (readable_regcache::read_part): Fix asserts.
585 (reg_buffer::raw_collect_part): New function.
586 (regcache::write_part): Fix asserts.
587 (reg_buffer::raw_supply_part): New function.
588 (regcache::transfer_regset_register): New helper function.
589 (regcache::transfer_regset): Call new functions.
590 (regcache_supply_regset): Use gdb_byte*.
591 (regcache::supply_regset): Likewise.
592 (regcache_collect_regset): Likewise.
593 (regcache::collect_regset): Likewise.
594 * regcache.h (reg_buffer::raw_collect_part): New declaration.
595 (reg_buffer::raw_supply_part): Likewise.
596 (regcache::transfer_regset_register): Likewise.
597 (regcache::transfer_regset): Use gdb_byte*.
599 2018-06-22 Alan Hayward <alan.hayward@arm.com>
601 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
603 2018-06-21 Pedro Alves <palves@redhat.com>
605 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
606 instead of a ptid_t. All callers adjusted.
607 * ada-tasks.c (ada_get_task_number): Likewise. All callers
609 (print_ada_task_info, display_current_task_id, task_command_1):
611 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
613 (breakpoint_kind): Adjust.
614 (remove_breakpoints_pid): Rename to ...
615 (remove_breakpoints_inf): ... this. Adjust to take an inferior
616 pointer. All callers adjusted.
617 (bpstat_clear_actions): Use inferior_thread.
618 (get_bpstat_thread): New.
619 (bpstat_do_actions): Use it.
620 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
621 to take a thread_info pointer. All callers adjusted.
622 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
623 (breakpoint_re_set_thread): Use inferior_thread.
624 * breakpoint.h (struct inferior): Forward declare.
625 (bpstat_stop_status): Update.
626 (remove_breakpoints_pid): Delete.
627 (remove_breakpoints_inf): New.
628 * bsd-uthread.c (bsd_uthread_target::wait)
629 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
630 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
631 (maint_btrace_packet_history_cmd)
632 (maint_btrace_clear_packet_history_cmd): Adjust.
633 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
635 * cli/cli-interp.c: Include "inferior.h".
636 * common/refcounted-object.h (struct
637 refcounted_object_ref_policy): New.
638 * compile/compile-object-load.c: Include gdbthread.h.
639 (store_regs): Use inferior_thread.
640 * corelow.c (core_target::close): Use current_inferior.
641 (core_target_open): Adjust to use first_thread_of_inferior and use
642 the current inferior.
643 * ctf.c (ctf_target::close): Adjust to use current_inferior.
644 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
645 <thread>: ... this new field. All references adjusted.
646 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
647 Take a thread_info pointer instead of a ptid_t.
648 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
649 (dummy_frame_discard, register_dummy_frame_dtor): Take a
650 thread_info pointer instead of a ptid_t.
651 * elfread.c: Include "inferior.h".
652 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
654 * eval.c (evaluate_subexp): Likewise.
655 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
657 * gdb_proc_service.h (struct thread_info): Forward declare.
658 (struct ps_prochandle) <ptid>: Delete, replaced by ...
659 <thread>: ... this new field. All references adjusted.
660 * gdbarch.h, gdbarch.c: Regenerate.
661 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
662 'thread' parameter. All implementations and callers adjusted.
663 * gdbthread.h (thread_info) <set_running>: New method.
664 (delete_thread, delete_thread_silent): Take a thread_info pointer
666 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
667 (first_thread_of_process): Delete, replaced by ...
668 (first_thread_of_inferior): ... this new function. All callers
670 (any_live_thread_of_process): Delete, replaced by ...
671 (any_live_thread_of_inferior): ... this new function. All callers
673 (switch_to_thread, switch_to_no_thread): Declare.
674 (is_executing): Delete.
675 (enable_thread_stack_temporaries): Update comment.
676 <enable_thread_stack_temporaries>: Take a thread_info pointer
677 instead of a ptid_t. Incref the thread.
678 <~enable_thread_stack_temporaries>: Decref the thread.
681 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
682 (get_last_thread_stack_temporary)
683 (value_in_thread_stack_temporaries, can_access_registers_thread):
684 Take a thread_info pointer instead of a ptid_t. All callers
686 * infcall.c (get_call_return_value): Use inferior_thread.
687 (run_inferior_call): Work with thread pointers instead of ptid_t.
688 (call_function_by_hand_dummy): Work with thread pointers instead
689 of ptid_t. Use thread_info_ref.
690 * infcmd.c (proceed_thread_callback): Access thread's state
692 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
693 access thread's state directly.
694 (continue_command): Use inferior_thread.
695 (info_program_command): Use find_thread_ptid and access thread
697 (proceed_after_attach_callback): Use thread state directly.
698 (notice_new_inferior): Take a thread_info pointer instead of a
699 ptid_t. All callers adjusted.
700 (exit_inferior): Take an inferior pointer instead of a pid. All
702 (exit_inferior_silent): New.
703 (detach_inferior): Delete.
704 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
705 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
706 (detach_inferior_command, kill_inferior_command): Use
707 find_inferior_id instead of valid_gdb_inferior_id and
708 gdb_inferior_id_to_pid.
709 (inferior_command): Use inferior and thread pointers.
710 * inferior.h (struct thread_info): Forward declare.
711 (notice_new_inferior): Take a thread_info pointer instead of a
712 ptid_t. All callers adjusted.
713 (detach_inferior): Delete declaration.
714 (exit_inferior, exit_inferior_silent): Take an inferior pointer
715 instead of a pid. All callers adjusted.
716 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
717 (valid_gdb_inferior_id): Delete.
718 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
719 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
720 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
722 <inf>: ... this new field.
723 <step_ptid>: Delete, replaced by ...
724 <step_thread>: ... this new field.
725 (get_displaced_stepping_state): Take an inferior pointer instead
726 of a pid. All callers adjusted.
727 (displaced_step_in_progress_any_inferior): Adjust.
728 (displaced_step_in_progress_thread): Take a thread pointer instead
729 of a ptid_t. All callers adjusted.
730 (displaced_step_in_progress, add_displaced_stepping_state): Take
731 an inferior pointer instead of a pid. All callers adjusted.
732 (get_displaced_step_closure_by_addr): Adjust.
733 (remove_displaced_stepping_state): Take an inferior pointer
734 instead of a pid. All callers adjusted.
735 (displaced_step_prepare_throw, displaced_step_prepare)
736 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
737 All callers adjusted.
738 (start_step_over): Adjust.
739 (infrun_thread_ptid_changed): Remove bit updating ptids in the
740 displaced step queue.
741 (do_target_resume): Adjust.
742 (fetch_inferior_event): Use inferior_thread.
743 (context_switch, get_inferior_stop_soon): Take an
744 execution_control_state pointer instead of a ptid_t. All callers
746 (switch_to_thread_cleanup): Delete.
747 (stop_all_threads): Use scoped_restore_current_thread.
748 * inline-frame.c: Include "gdbthread.h".
749 (inline_state) <inline_state>: Take a thread pointer instead of a
750 ptid_t. All callers adjusted.
751 <ptid>: Delete, replaced by ...
752 <thread>: ... this new field.
753 (find_inline_frame_state): Take a thread pointer instead of a
754 ptid_t. All callers adjusted.
755 (skip_inline_frames, step_into_inline_frame)
756 (inline_skipped_frames, inline_skipped_symbol): Take a thread
757 pointer instead of a ptid_t. All callers adjusted.
758 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
759 (inline_skipped_frames, inline_skipped_symbol): Likewise.
760 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
762 * linux-nat.c (get_detach_signal): Likewise.
763 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
764 (thread_db_notice_clone): Adjust.
765 (thread_db_find_new_threads_silently)
766 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
767 a thread pointer instead of a ptid_t. All callers adjusted.
768 * mi/mi-cmd-var.c: Include "inferior.h".
769 (mi_cmd_var_update_iter): Update to use thread pointers.
770 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
772 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
774 (mi_output_running): ... this new function.
775 (mi_on_resume_1): Adjust to use it.
776 (mi_user_selected_context_changed): Adjust to use inferior_thread.
777 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
779 (interrupt_thread_callback): : Adjust to use thread and inferior
781 * proc-service.c: Include "gdbthread.h".
782 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
783 * progspace-and-thread.c: Include "inferior.h".
784 * progspace.c: Include "inferior.h".
785 * python/py-exitedevent.c (create_exited_event_object): Adjust to
786 hold a reference to an inferior_object.
787 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
789 * python/py-inferior.c (struct inferior_object): Give the type a
790 tag name instead of a typedef.
791 (python_on_normal_stop): No need to check if the current thread is
793 (inferior_to_inferior_object): Change return type to
794 inferior_object. All callers adjusted.
795 (find_thread_object): Delete, bits factored out to ...
796 (thread_to_thread_object): ... this new function.
797 * python/py-infthread.c (create_thread_object): Use
798 inferior_to_inferior_object.
799 (thpy_is_stopped): Use thread pointer directly.
800 (gdbpy_selected_thread): Use inferior_thread.
801 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
802 field, replaced with ...
803 <thread>: ... this new field. All users adjusted.
804 (btpy_insn_or_gap_new): Drop const.
805 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
807 * python/py-record.c: Include "gdbthread.h".
808 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
809 a ptid_t. All callers adjusted.
810 (gdbpy_current_recording): Use inferior_thread.
811 * python/py-record.h (recpy_record_object) <ptid>: Delete
812 field, replaced with ...
813 <thread>: ... this new field. All users adjusted.
814 (recpy_element_object) <ptid>: Delete
815 field, replaced with ...
816 <thread>: ... this new field. All users adjusted.
817 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
818 a ptid_t. All callers adjusted.
819 * python/py-threadevent.c: Include "gdbthread.h".
820 (get_event_thread): Use thread_to_thread_object.
821 * python/python-internal.h (struct inferior_object): Forward
823 (find_thread_object, find_inferior_object): Delete declarations.
824 (thread_to_thread_object, inferior_to_inferior_object): New
826 * record-btrace.c: Include "inferior.h".
827 (require_btrace_thread): Use inferior_thread.
828 (record_btrace_frame_sniffer)
829 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
830 (get_thread_current_frame): Use scoped_restore_current_thread and
832 (get_thread_current_frame): Use thread pointer directly.
833 (record_btrace_replay_at_breakpoint): Use thread's inferior
835 * record-full.c: Include "inferior.h".
836 * regcache.c: Include "gdbthread.h".
837 (get_thread_arch_regcache): Use the inferior's address space
839 (get_thread_regcache, registers_changed_thread): New.
840 * regcache.h (get_thread_regcache(thread_info *thread)): New
842 (registers_changed_thread): New.
843 (remote_target) <remote_detach_1>: Swap order of parameters.
844 (remote_add_thread): <remote_add_thread>: Return the new thread.
845 (get_remote_thread_info(ptid_t)): New overload.
846 (remote_target::remote_notice_new_inferior): Use thread pointers
848 (remote_target::process_initial_stop_replies): Use
849 thread_info::set_running.
850 (remote_target::remote_detach_1, remote_target::detach)
851 (extended_remote_target::detach): Adjust.
852 * stack.c (frame_show_address): Use inferior_thread.
853 * target-debug.h (target_debug_print_thread_info_pp): New.
854 * target-delegates.c: Regenerate.
855 * target.c (default_thread_address_space): Delete.
856 (memory_xfer_partial_1): Use current_inferior.
857 (target_detach): Use current_inferior.
858 (target_thread_address_space): Delete.
859 (generic_mourn_inferior): Use current_inferior.
860 * target.h (struct target_ops) <thread_address_space>: Delete.
861 (target_thread_address_space): Delete.
862 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
864 (delete_thread_1, delete_thread, delete_thread_silent): Take a
865 thread pointer instead of a ptid_t. Adjust all callers.
866 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
867 (first_thread_of_process): Delete, replaced by ...
868 (first_thread_of_inferior): ... this new function. All callers
870 (any_thread_of_process): Rename to ...
871 (any_thread_of_inferior): ... this, and take an inferior pointer.
872 (any_live_thread_of_process): Rename to ...
873 (any_live_thread_of_inferior): ... this, and take an inferior
875 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
876 (value_in_thread_stack_temporaries)
877 (get_last_thread_stack_temporary): Take a thread pointer instead
878 of a ptid_t. Adjust all callers.
879 (thread_info::set_running): New.
880 (validate_registers_access): Use inferior_thread.
881 (can_access_registers_ptid): Rename to ...
882 (can_access_registers_thread): ... this, and take a thread
884 (print_thread_info_1): Adjust to compare thread pointers instead
886 (switch_to_no_thread, switch_to_thread): Make extern.
887 (scoped_restore_current_thread::~scoped_restore_current_thread):
888 Use m_thread pointer directly.
889 (scoped_restore_current_thread::scoped_restore_current_thread):
891 (thread_command): Use thread pointer directly.
892 (thread_num_make_value_helper): Use inferior_thread.
893 * top.c (execute_command): Use inferior_thread.
894 * tui/tui-interp.c: Include "inferior.h".
895 * varobj.c (varobj_create): Use inferior_thread.
896 (value_of_root_1): Use find_thread_global_id instead of
897 global_thread_id_to_ptid.
899 2018-06-21 Alan Hayward <alan.hayward@arm.com>
901 * regcache.c (readable_regcache::read_part): Avoid memcpy when
903 (regcache::write_part): Likewise.
904 (readable_regcache::cooked_read_part): Update comment.
905 (readable_regcache::cooked_write_part): Likewise.
906 * regcache.h: (readable_regcache::read_part): Likewise.
907 (regcache::write_part): Likewise.
909 2018-06-21 Richard Bunt <richard.bunt@arm.com>
910 Dirk Schubert <dirk.schubert@arm.com>
912 * aarch64-linux-nat.c (post_attach): New.
913 (aarch64_linux_nat_target::post_attach): Override post_attach to
914 record the number of hardware debug registers.
916 2018-06-20 Tom Tromey <tom@tromey.com>
918 * python/py-param.c (add_setshow_generic): Make parameters const.
919 (parmpy_init): Update.
921 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
923 * regcache.h (regcache_cooked_read_ftype): Rename to...
924 (register_read_ftype): ...this, change type to function_view.
925 (class reg_buffer) <save>: Remove src parameter.
926 (readonly_detached_regcache) <readonly_detached_regcache>: Make
927 parameter non-const in first overload. Remove src parameter in
929 * regcache.c (do_cooked_read): Remove.
930 (readonly_detached_regcache::readonly_detached_regcache): Make
931 parameter non-const, adjust call to other constructor.
932 (reg_buffer::save): Remove src parameter.
933 * frame.c (do_frame_register_read): Remove.
934 (frame_save_as_regcache): Use lambda function.
935 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
936 parameter to ppu2spu_data *.
937 (ppu2spu_sniffer): Use lambda function.
939 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
941 * record-full.c (record_full_target::insert_breakpoint): Remove
942 "struct" keyword, add const.
944 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
946 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
947 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
948 * configure.ac: Remove AC_PREREQ, add missing quoting.
949 * gnulib/configure.ac: Modernize usage of
950 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
951 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
952 (AUTOMAKE_VERSION): Bump to 1.15.1.
953 * configure: Re-generate.
954 * config.in: Re-generate.
955 * aclocal.m4: Re-generate.
956 * gnulib/aclocal.m4: Re-generate.
957 * gnulib/config.in: Re-generate.
958 * gnulib/configure: Re-generate.
959 * gnulib/import/Makefile.in: Re-generate.
961 2018-06-19 Pedro Alves <palves@redhat.com>
963 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
964 (lookup_minimal_symbol_by_pc_section): ... here with
965 gdb_assert_not_reached added.
967 2018-06-19 Pedro Alves <palves@redhat.com>
969 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
970 parameter with a block parameter. Compare location's block symbol
971 with the frame's block instead of addresses.
972 (skip_inline_frames): Pass the current block instead of the
973 frame's address. Break out as soon as we determine the frame
974 should not be skipped.
976 2018-06-18 Tom Tromey <tom@tromey.com>
978 * solib-aix.c (solib_aix_get_section_offsets): Return
980 (solib_aix_solib_create_inferior_hook): Update.
982 2018-06-18 Tom Tromey <tom@tromey.com>
984 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
986 2018-06-18 Tom Tromey <tom@tromey.com>
988 * solib-frv.c (frv_relocate_main_executable): Use
990 * solib-dsbt.c (dsbt_relocate_main_executable): Use
993 2018-06-18 Tom Tromey <tom@tromey.com>
995 * objfiles.h (inhibit_section_map_updates): Update.
996 (resume_section_map_updates, resume_section_map_updates_cleanup):
998 * solib-svr4.c (svr4_handle_solib_event): Update.
999 * objfiles.c (inhibit_section_map_updates): Return
1000 scoped_restore_tmpl<int>.
1001 (resume_section_map_updates, resume_section_map_updates_cleanup):
1004 2018-06-18 Tom Tromey <tom@tromey.com>
1006 * valprint.h (read_string): Update.
1007 * valprint.c (read_string): Change type of "buffer".
1008 (val_print_string): Update.
1009 * python/py-value.c (valpy_string): Update.
1010 * language.h (struct language_defn) <la_get_string>: Change
1012 (default_get_string, c_get_string): Update.
1013 * language.c (default_get_string): Change type of "buffer".
1014 * guile/scm-value.c (gdbscm_value_to_string): Update.
1015 * c-lang.c (c_get_string): Change type of "buffer".
1017 2018-06-18 Tom Tromey <tom@tromey.com>
1019 * ser-mingw.c (struct pipe_state_destroyer): New.
1020 (pipe_state_up): New typedef.
1021 (cleanup_pipe_state): Remove.
1022 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1024 2018-06-18 Tom Tromey <tom@tromey.com>
1026 * rust-lang.h (rust_yyerror): Don't declare.
1027 * rust-lang.c (rust_language_defn): Update.
1028 * rust-exp.y (yyerror): Now static.
1029 * parse.c (parse_exp_in_context_1): Update.
1030 * p-lang.h (p_yyerror): Don't declare.
1031 * p-lang.c (p_language_defn): Update.
1032 * p-exp.y (yyerror): Now static.
1033 * opencl-lang.c (opencl_language_defn): Update.
1034 * objc-lang.c (objc_language_defn): Update.
1035 * m2-lang.h (m2_yyerror): Don't declare.
1036 * m2-lang.c (m2_language_defn): Update.
1037 * m2-exp.y (yyerror): Now static.
1038 * language.h (struct language_defn) <la_error>: Remove.
1039 * language.c (unk_lang_error): Remove.
1040 (unknown_language_defn, auto_language_defn): Remove.
1041 * go-lang.h (go_yyerror): Don't declare.
1042 * go-lang.c (go_language_defn): Update.
1043 * go-exp.y (yyerror): Now static.
1044 * f-lang.h (f_yyerror): Don't declare.
1045 * f-lang.c (f_language_defn): Update.
1046 * f-exp.y (yyerror): Now static.
1047 * d-lang.h (d_yyerror): Don't declare.
1048 * d-lang.c (d_language_defn): Update.
1049 * d-exp.y (yyerror): Now static.
1050 * c-lang.h (c_yyerror): Don't declare.
1051 * c-lang.c (c_language_defn, cplus_language_defn)
1052 (asm_language_defn, minimal_language_defn): Update.
1053 * c-exp.y (yyerror): Now static.
1054 * ada-lang.h (ada_yyerror): Don't declare.
1055 * ada-lang.c (ada_language_defn): Update.
1056 * ada-exp.y (yyerror): Now static.
1058 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1060 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1061 (store_sveregs_to_thread): Likewise.
1062 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1063 (aarch64_linux_store_inferior_registers): Likewise.
1064 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1066 (aarch64_sve_regs_copy_to_regcache): Likewise.
1067 (aarch64_sve_regs_copy_from_regcache): Likewise.
1068 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1070 (aarch64_sve_regs_copy_to_regcache): Likewise.
1071 (aarch64_sve_regs_copy_from_regcache): Likewise.
1072 (sve_context): Structure from Linux headers.
1073 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1074 (SVE_SIG_ZREG_SIZE): Likewise.
1075 (SVE_SIG_PREG_SIZE): Likewise.
1076 (SVE_SIG_FFR_SIZE): Likewise.
1077 (SVE_SIG_REGS_OFFSET): Likewise.
1078 (SVE_SIG_ZREGS_OFFSET): Likewise.
1079 (SVE_SIG_ZREG_OFFSET): Likewise.
1080 (SVE_SIG_ZREGS_SIZE): Likewise.
1081 (SVE_SIG_PREGS_OFFSET): Likewise.
1082 (SVE_SIG_PREG_OFFSET): Likewise.
1083 (SVE_SIG_PREGS_SIZE): Likewise.
1084 (SVE_SIG_FFR_OFFSET): Likewise.
1085 (SVE_SIG_REGS_SIZE): Likewise.
1086 (SVE_SIG_CONTEXT_SIZE): Likewise.
1087 (SVE_PT_REGS_MASK): Likewise.
1088 (SVE_PT_REGS_FPSIMD): Likewise.
1089 (SVE_PT_REGS_SVE): Likewise.
1090 (SVE_PT_VL_INHERIT): Likewise.
1091 (SVE_PT_VL_ONEXEC): Likewise.
1092 (SVE_PT_REGS_OFFSET): Likewise.
1093 (SVE_PT_FPSIMD_OFFSET): Likewise.
1094 (SVE_PT_FPSIMD_SIZE): Likewise.
1095 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1096 (SVE_PT_SVE_PREG_SIZE): Likewise.
1097 (SVE_PT_SVE_FFR_SIZE): Likewise.
1098 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1099 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1100 (__SVE_SIG_TO_PT): Likewise.
1101 (SVE_PT_SVE_OFFSET): Likewise.
1102 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1103 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1104 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1105 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1106 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1107 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1108 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1109 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1110 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1111 (SVE_PT_SVE_SIZE): Likewise.
1112 (SVE_PT_SIZE): Likewise.
1113 (HAS_SVE_STATE): New define.
1115 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1117 * nat/aarch64-sve-linux-sigcontext.h: New file.
1118 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1120 (SVE_VQ_MIN): Likewise.
1121 (SVE_VQ_MAX): Likewise.
1122 (SVE_VL_MIN): Likewise.
1123 (SVE_VL_MAX): Likewise.
1124 (SVE_NUM_ZREGS): Likewise.
1125 (SVE_NUM_PREGS): Likewise.
1126 (sve_vl_valid): Likewise.
1127 (struct user_sve_header): Likewise.
1129 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1130 Richard Bunt <Richard.Bunt@arm.com>
1132 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1133 was requested by GDB.
1135 2018-06-15 Tom de Vries <tdevries@suse.de>
1137 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1139 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1141 * gnulib/update-gnulib.sh: Print expected versions of
1144 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1146 * arch-utils.c (default_type_align): Use type_length_units.
1147 * gdbtypes.c (type_align): Use type_length_units.
1149 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1151 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1152 of 'define' command.
1154 2018-06-14 Tom de Vries <tdevries@suse.de>
1157 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1158 get_no_prettyformat_print_options.
1160 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1162 * sparc-nat.h: Include target.h.
1163 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1164 <fetch_registers>: Remove this argument in function call.
1165 <store_registers>: Remove this argument in function call, remove
1167 <low_forget_process>: Call sparc64_forget_process instead of
1168 sparc_forget_process.
1170 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1172 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1173 (procfs_target::make_corefile_notes): Adjust to new
1174 target_read_alloc return type.
1176 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1177 Stephen Roberts <stephen.roberts@arm.com>
1180 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1181 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1182 Move should_notify_stop local into more inner scope.
1184 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1185 Stephen Roberts <stephen.roberts@arm.com>
1188 * infrun.c (resume_1): Add call to mark_async_event_handler.
1190 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1192 * infrun.c (do_target_wait): Change old version of $pc printed.
1194 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1196 * dwarf2read.c (read_index_from_section): Rename to...
1197 (read_gdb_index_from_section): ... this, update all callers.
1198 (dwarf2_read_index): Rename to...
1199 (dwarf2_read_gdb_index): ... this, update all callers.
1201 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1203 * gdb/hppa-linux-nat.c
1204 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1205 hppa_linux_nat_target::fetch_registers.
1207 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1209 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1210 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1211 (AARCH64_DWARF_SVE_FFR): Likewise.
1212 (AARCH64_DWARF_SVE_P0): Likewise.
1213 (AARCH64_DWARF_SVE_Z0): Likewise.
1215 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1217 * common/common-regcache.h (raw_compare): New function.
1218 * regcache.c (regcache::raw_compare): Likewise.
1219 * regcache.h (regcache::raw_compare): New declaration.
1221 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1223 * common/common-regcache.h (reg_buffer_common): New structure.
1224 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1225 (reg_buffer::raw_supply): Likewise.
1226 (reg_buffer::raw_supply_integer): Likewise.
1227 (reg_buffer::raw_supply_zeroed): Likewise.
1228 (reg_buffer::raw_collect): Likewise.
1229 (reg_buffer::raw_collect_integer): Likewise.
1230 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1231 (reg_buffer::raw_supply): Likewise.
1232 (reg_buffer::raw_supply_integer): Likewise.
1233 (reg_buffer::raw_supply_zeroed): Likewise.
1234 (reg_buffer::raw_collect): Likewise.
1235 (reg_buffer::raw_collect_integer): Likewise.
1237 2018-06-10 Tom Tromey <tom@tromey.com>
1239 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1240 (class remote_state) <stop_reply_queue>: Now std::vector.
1241 (remote_state::~remote_state)
1242 (remote_target::stop_reply_queue_length): Update.
1243 (struct queue_iter_param, remove_child_of_pending_fork)
1244 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1245 (check_pending_event_prevents_wildcard_vcont_callback)
1246 (remove_stop_reply_for_inferior)
1247 (remove_stop_reply_of_remote_state)
1248 (remote_notif_remove_once_on_match)
1249 (stop_reply_match_ptid_and_ws)
1250 (remote_kill_child_of_pending_fork): Remove.
1251 (remote_target::remove_new_fork_children)
1252 (remote_target::check_pending_events_prevent_wildcard_vcont)
1253 (remote_target::discard_pending_stop_replies)
1254 (remote_target::discard_pending_stop_replies_in_queue)
1255 (remote_target::remote_notif_remove_queued_reply)
1256 (remote_target::queued_stop_reply)
1257 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1258 (remote_target::wait, remote_target::kill_new_fork_children)
1259 (remote_target::async): Update.
1261 2018-06-10 Tom Tromey <tom@tromey.com>
1263 * record-full.c (record_full_arch_list_cleanups): Remove.
1264 (record_full_message): Use try/catch.
1265 (record_full_wait_cleanups): Remove.
1266 (record_full_wait_1): Use try/catch.
1267 (record_full_restore): Likewise.
1269 2018-06-10 Tom Tromey <tom@tromey.com>
1271 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1272 declare VEC. Add constructor.
1273 <in_target_beneath>: Now bool.
1274 (record_full_breakpoints): Now a std::vector, static.
1275 (record_full_sync_record_breakpoints)
1276 (record_full_init_record_breakpoints)
1277 (record_full_target::insert_breakpoint)
1278 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1280 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1282 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1283 * serial.c (serial_interface_lookup): Remove struct keyword.
1285 2018-06-10 Tom Tromey <tom@tromey.com>
1287 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1289 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1291 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1293 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1294 "beneath" as a method.
1295 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1296 Use "beneath" as a method.
1298 2018-06-10 Tom Tromey <tom@tromey.com>
1300 * tracefile.c (struct trace_file_writer_deleter): New.
1301 <operator()>: Rename from trace_file_writer_xfree.
1302 (trace_file_writer_up): New typedef.
1303 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1305 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1307 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1308 <m_registers, m_register_status>: Change type to
1310 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1313 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1315 * common/common-regcache.h (enum register_status): Add
1316 underlying type "signed char".
1317 * regcache.h (reg_buffer) <m_register_status>: Change type to
1319 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1320 register_status instead of signed char.
1321 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1322 (reg_buffer::get_register_status): Remove cast.
1323 (readable_regcache::raw_read): Remove cast.
1324 (readable_regcache::cooked_read): Remove cast.
1326 2018-06-09 Tom Tromey <tom@tromey.com>
1328 * source.c (reverse_search_command, forward_search_command): Use
1331 2018-06-09 Tom Tromey <tom@tromey.com>
1333 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1334 (serial_ops_list): Now static, std::vector.
1335 (serial_interface_lookup, serial_add_interface): Update.
1337 2018-06-09 Tom Tromey <tom@tromey.com>
1339 * dwarf2read.c (process_cu_includes): Update.
1340 (process_full_comp_unit): Update.
1341 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1344 2018-06-08 Paul Koning <paul_koning@dell.com>
1348 * python/python.c (do_start_initialization):
1349 Avoid call to internal Python API.
1350 (init__gdb_module): New function.
1352 2018-06-08 Gary Benson <gbenson@redhat.com>
1354 * linux-thread-db.c (valprint.h): New include.
1355 (struct check_thread_db_info): New structure.
1356 (check_thread_db_on_load, tdb_testinfo): New static globals.
1357 (check_thread_db, check_thread_db_callback): New functions.
1358 (try_thread_db_load_1): Run integrity checks if requested.
1359 (maintenance_check_libthread_db): New function.
1360 (_initialize_thread_db): Register "maint check libthread-db"
1361 and "maint set/show check-libthread-db".
1362 * NEWS: Mention the above new commands.
1364 2018-06-08 Tom Tromey <tom@tromey.com>
1366 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1369 2018-06-08 Tom Tromey <tom@tromey.com>
1371 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1373 2018-06-08 Tom Tromey <tom@tromey.com>
1375 * common/btrace-common.h (struct btrace_data): Add constructor,
1376 destructor, move assignment operator.
1377 <empty, clear, fini>: New methods.
1378 <format>: Initialize.
1379 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1380 (btrace_data_empty): Don't declare.
1381 * common/btrace-common.c (btrace_data_init): Remove.
1382 (btrace_data::fini): Rename from btrace_data_fini.
1383 (btrace_data::empty): Rename from btrace_data_empty.
1384 (btrace_data::clear): Rename from btrace_data_clear. Return
1386 * btrace.h (make_cleanup_btrace_data): Don't declare.
1387 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1388 (parse_xml_btrace): Update.
1389 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1390 (maint_btrace_clear_packet_history_cmd): Update.
1392 2018-06-07 Pedro Alves <palves@redhat.com>
1394 * target.h (target_ops) <beneath>: Now a method. All references
1396 (class target_stack): New.
1397 * target.c (g_target_stack): New.
1398 (g_current_top_target): Delete.
1399 (current_top_target): Get the top target out of g_target_stack.
1400 (target_stack::push, target_stack::unpush): New.
1401 (push_target, unpush_target): Reimplement.
1402 (target_is_pushed): Reimplement in terms of g_target_stack.
1403 (target_ops::beneath, target_stack::find_beneath): New.
1405 2018-06-07 Pedro Alves <palves@redhat.com>
1407 * target.h (find_target_beneath): Delete declaration.
1408 * target.c (find_target_beneath): Delete definition.
1409 * aix-thread.c: All callers of find_target_beneath adjusted to
1410 call target_ops::beneath instead.
1411 * bsd-uthread.c: Likewise.
1412 * linux-thread-db.c: Likewise.
1413 * ravenscar-thread.c: Likewise.
1414 * sol-thread.c: Likewise.
1415 * spu-multiarch.c: Likewise.
1417 2018-06-07 Pedro Alves <palves@redhat.com>
1419 * target.h (target_ops) <beneath>: Now a method. All references
1421 (target_ops) <m_beneath>: New.
1422 * target.c (target_ops::beneath): New.
1423 * corelow.c: Adjust all references to target_ops::beneath.
1424 * linux-thread-db.c: Likewise.
1425 * make-target-delegates: Likewise.
1426 * record-btrace.c: Likewise.
1427 * record-full.c: Likewise.
1428 * remote.c: Likewise.
1429 * target.c: Likewise.
1430 * target-delegates.c: Regenerate.
1432 2018-06-07 Pedro Alves <palves@redhat.com>
1434 * target.h (target_stack): Delete.
1435 (current_top_target): Declare function.
1436 * target.c (target_stack): Delete.
1437 (g_current_top_target): New.
1438 (current_top_target): New function.
1439 * auxv.c: Use current_top_target instead of target_stack
1441 * avr-tdep.c: Likewise.
1442 * breakpoint.c: Likewise.
1443 * corefile.c: Likewise.
1444 * elfread.c: Likewise.
1446 * exceptions.c: Likewise.
1447 * frame.c: Likewise.
1448 * gdbarch-selftests.c: Likewise.
1449 * gnu-v3-abi.c: Likewise.
1450 * ia64-tdep.c: Likewise.
1451 * ia64-vms-tdep.c: Likewise.
1452 * infcall.c: Likewise.
1453 * infcmd.c: Likewise.
1454 * infrun.c: Likewise.
1455 * linespec.c: Likewise.
1456 * linux-tdep.c: Likewise.
1457 * minsyms.c: Likewise.
1458 * ppc-linux-nat.c: Likewise.
1459 * ppc-linux-tdep.c: Likewise.
1460 * procfs.c: Likewise.
1461 * regcache.c: Likewise.
1462 * remote.c: Likewise.
1463 * rs6000-tdep.c: Likewise.
1464 * s390-linux-nat.c: Likewise.
1465 * s390-tdep.c: Likewise.
1466 * solib-aix.c: Likewise.
1467 * solib-darwin.c: Likewise.
1468 * solib-dsbt.c: Likewise.
1469 * solib-spu.c: Likewise.
1470 * solib-svr4.c: Likewise.
1471 * solib-target.c: Likewise.
1472 * sparc-tdep.c: Likewise.
1473 * sparc64-tdep.c: Likewise.
1474 * spu-tdep.c: Likewise.
1475 * symfile.c: Likewise.
1476 * symtab.c: Likewise.
1477 * target-descriptions.c: Likewise.
1478 * target-memory.c: Likewise.
1479 * target.c: Likewise.
1480 * target.h: Likewise.
1481 * tracefile-tfile.c: Likewise.
1482 * tracepoint.c: Likewise.
1483 * valops.c: Likewise.
1484 * valprint.c: Likewise.
1485 * value.c: Likewise.
1486 * windows-tdep.c: Likewise.
1487 * mi/mi-main.c: Likewise.
1489 2018-06-07 Tom Tromey <tom@tromey.com>
1491 * valprint.h (build_address_symbolic): Declare.
1492 * printcmd.c (print_address_symbolic): Update.
1493 (build_address_symbolic): Change "name" and "filename" to
1495 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1497 * defs.h (build_address_symbolic): Remove declaration.
1499 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1501 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1502 (aarch64_vnv_type): Add function.
1503 (aarch64_pseudo_register_name): Add V regs for SVE.
1504 (aarch64_pseudo_register_type): Likewise.
1505 (aarch64_pseudo_register_reggroup_p): Likewise.
1506 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1507 (aarch64_pseudo_read_value): Add V regs for SVE.
1508 (aarch64_pseudo_write_2): Use V0 offset for SVE
1509 (aarch64_pseudo_write): Add V regs for SVE.
1510 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1512 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1514 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1515 (sve_vl_from_vq): Likewise.
1517 2018-06-05 Tom Tromey <tom@tromey.com>
1519 * cli/cli-cmds.c (show_version): Update.
1520 * top.c (print_gdb_version): Add "interactive" parameter.
1522 * main.c (captured_main_1): Update.
1523 * top.h (print_gdb_version): Add "interactive" parameter and a
1526 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1528 * common/enum-flags.h: Add trailing semicolon to example in
1531 2018-06-05 Tom Tromey <tom@tromey.com>
1534 * NEWS: Add entry about pager.
1535 * utils.c (pagination_disabled_for_command): New global.
1536 (prompt_for_continue): Allow "c" response to prompt.
1537 (reinitialize_more_filter): Clear
1538 pagination_disabled_for_command.
1539 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1541 2018-06-04 Tom Tromey <tom@tromey.com>
1543 * ada-lang.h (ada_lookup_symbol_list): Update.
1544 * ada-lang.c (resolve_subexp): Update.
1545 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1547 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1548 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1549 results parameter to std::vector.
1550 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1552 * ada-exp.y (block_lookup): Update.
1553 (select_possible_type_sym): Change type of syms. Remove nsyms
1555 (write_var_or_type, write_name_assoc): Update.
1557 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1559 * windows-nat.c (windows_nat_target::xfer_partial): Return
1560 TARGET_XFER_E_IO if we need to delegate to the target beneath
1561 but BENEATH is NULL.
1563 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1565 * Makefile.in (config.status): Add configure.nat as a
1568 2018-06-04 Tom Tromey <tom@tromey.com>
1570 * cp-name-parser.y (cpname_state): Add method declarations.
1571 (HANDLE_QUAL): Update.
1572 (cpname_state::d_grab, cpname_state::fill_comp)
1573 (cpname_state::make_operator, cpname_state::make_dtor)
1574 (cpname_state::make_builtin_type, cpname_state::make_name)
1575 (cpname_state::d_qualify, cpname_state::d_int_type)
1576 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1577 (%union): Move earlier.
1579 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1581 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1583 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1585 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1586 (aarch64_pseudo_write_1): Likewise.
1587 (aarch64_pseudo_read_value): Use helper.
1588 (aarch64_pseudo_write): Likewise.
1590 2018-06-04 Pedro Alves <palves@redhat.com>
1592 * darwin-nat.c (darwin_ops): Delete.
1593 (darwin_attach_pid): Use get_native_target.
1595 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1597 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1598 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1600 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1602 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1603 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1604 (aarch64_gdbarch_init): Check for SVE.
1605 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1607 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1609 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1610 * aarch64-tdep.h (aarch64_read_description): Likewise.
1611 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1612 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1613 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1614 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1615 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1617 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1619 * value.c (value_fetch_lazy_bitfield): New.
1620 (value_fetch_lazy_memory): New.
1621 (value_fetch_lazy_register): New.
1622 (value_fetch_lazy): Factor out to smaller functions.
1624 2018-06-01 Tom Tromey <tom@tromey.com>
1626 * cp-name-parser.y (backslashable, represented): Now const.
1628 2018-06-01 Tom Tromey <tom@tromey.com>
1630 * cp-name-parser.y: Include parser-defs.h.
1631 (parser_fprintf): Remove declaration.
1633 2018-06-01 Tom Tromey <tom@tromey.com>
1635 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1637 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1638 (global_result): Remove globals.
1639 (struct cpname_state): New.
1640 (yyparse): Don't declare.
1641 (yylex, yyerror): Move declarations after %union.
1642 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1643 (make_name): Add state parameter.
1645 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1647 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1649 (yylex): Add lvalp, state parameters.
1650 (yyerror): Add state parameter.
1651 (cp_demangled_name_to_comp): Update.
1653 2018-06-01 Tom Tromey <tom@tromey.com>
1655 * cp-name-parser.y (parser_fprintf): Declare.
1656 (GDB_YY_REMAP_PREFIX): Define.
1657 Include yy-remap.h. Don't redefine yy* identifiers.
1659 2018-06-01 Tom Tromey <tom@tromey.com>
1661 * python/py-type.c (typy_legacy_template_argument): Update.
1662 * cp-support.h (cp_demangled_name_to_comp): Update.
1663 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1664 parameter to be a "std::string *".
1667 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1669 * ada-lex.l: Include "diagnostics.h" instead of
1670 "common/diagnostics.h".
1671 * unittests/environ-selftests.c: Likewise.
1672 * common/diagnostics.h: Moved to ../include.
1674 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1676 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1677 to language_mode_manual while calling breakpoint_re_set_one.
1679 2018-06-01 Tom Tromey <tom@tromey.com>
1681 * valops.c (value_cast_structs, destructor_name_p): Update.
1682 * symtab.c (gdb_mangle_name): Update.
1683 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1685 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1686 (pascal_object_print_value_fields, pascal_object_print_value):
1688 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1689 * linespec.c (find_methods): Update.
1690 * gdbtypes.h (type_name_no_tag): Remove.
1691 (type_name_or_error): Rename from type_name_no_tag_or_error.
1692 * gdbtypes.c (type_name_no_tag): Remove.
1693 (type_name_or_error): Rename from type_name_no_tag_or_error.
1694 (lookup_struct_elt_type, check_typedef): Update.
1695 * expprint.c (print_subexp_standard): Update.
1696 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1697 * d-namespace.c (d_lookup_nested_symbol): Update.
1698 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1699 (cp_print_class_member): Update.
1700 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1701 * completer.c (add_struct_fields): Update.
1702 * c-typeprint.c (cp_type_print_derivation_info)
1703 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1705 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1706 (ada_prefer_type, ada_is_exception_sym): Update.
1708 2018-06-01 Tom Tromey <tom@tromey.com>
1710 * valops.c (enum_constant_from_type, value_namespace_elt)
1711 (value_maybe_namespace_elt): Update.
1712 * valarith.c (find_size_for_pointer_math): Update.
1713 * target-descriptions.c (make_gdb_type): Update.
1714 * symmisc.c (print_symbol): Update.
1715 * stabsread.c (define_symbol, read_type)
1716 (complain_about_struct_wipeout, add_undefined_type)
1717 (cleanup_undefined_types_1): Update.
1718 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1719 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1720 (rust_internal_print_type, rust_composite_type)
1721 (rust_evaluate_funcall, rust_evaluate_subexp)
1722 (rust_inclusive_range_type_p): Update.
1723 * python/py-type.c (typy_get_tag): Update.
1724 * p-typeprint.c (pascal_type_print_base): Update.
1725 * mdebugread.c (parse_symbol, parse_type): Update.
1726 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1728 * guile/scm-type.c (gdbscm_type_tag): Update.
1729 * go-lang.c (sixg_string_p): Update.
1730 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1732 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1733 (TYPE_TAG_NAME): Remove.
1734 * gdbtypes.c (type_name_no_tag): Simplify.
1735 (check_typedef, check_types_equal, recursive_dump_type)
1736 (copy_type_recursive, arch_composite_type): Update.
1737 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1738 in summary mode when needed.
1739 * eval.c (evaluate_funcall): Update.
1740 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1741 (process_structure_scope, read_enumeration_type)
1742 (read_namespace_type, read_module_type, determine_prefix): Update.
1743 * cp-support.c (inspect_type): Update.
1744 * coffread.c (process_coff_symbol, decode_base_type): Update.
1745 * c-varobj.c (c_is_path_expr_parent): Update.
1746 * c-typeprint.c (c_type_print_base_struct_union): Update.
1747 (c_type_print_base_1): Update. Print struct/class/union/enum in
1748 summary when using C language.
1749 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1750 (gen_maybe_namespace_elt): Update.
1751 * ada-lang.c (ada_type_name): Simplify.
1752 (empty_record, ada_template_to_fixed_record_type_1)
1753 (template_to_static_fixed_type)
1754 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1756 2018-06-01 Tom Tromey <tom@tromey.com>
1758 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1760 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1761 (c_print_type): Update.
1762 (c_print_type): New overload.
1763 (c_type_print_varspec_prefix, c_type_print_args)
1764 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1765 (c_type_print_base_struct_union, c_type_print_base_1)
1766 (cp_type_print_method_args): Add "language" parameter.
1767 (c_type_print_base): Update.
1768 * c-lang.h (c_print_type): Add new overload.
1770 2018-06-01 Tom Tromey <tom@tromey.com>
1772 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1773 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1775 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1777 * aarch64-tdep.c (aarch64_sve_register_names): New const
1779 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1780 (AARCH64_SVE_Z_REGS_NUM): New define.
1781 (AARCH64_SVE_P_REGS_NUM): Likewise.
1782 (AARCH64_SVE_NUM_REGS): Likewise.
1784 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1786 * nat/linux-ptrace.h [__alpha__]
1787 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1790 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1792 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1793 the endianness selected.
1794 * NEWS: Document `set endian auto' mode operation update.
1796 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1798 * Makefile.in: Add new header.
1799 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1800 (sve_vl_from_vg): Likewise.
1801 (sve_vq_from_vl): Likewise.
1802 (sve_vl_from_vq): Likewise.
1803 (sve_vq_from_vg): Likewise.
1804 (sve_vg_from_vq): Likewise.
1805 * configure.nat: Add new c file.
1806 * nat/aarch64-sve-linux-ptrace.c: New file.
1807 * nat/aarch64-sve-linux-ptrace.h: New file.
1809 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1811 * aarch64-linux-nat.c (aarch64_linux_read_description):
1813 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1815 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1816 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1817 (aarch64_gdbarch_init): Add parmeter zero.
1818 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1819 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1820 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1822 * doc/gdb.texinfo: Describe SVE feature
1823 * features/aarch64-sve.c: New file.
1825 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1828 * gdbarch.sh (significant_addr_bit): Default to zero when
1829 not set by target architecture.
1830 * gdbarch.c: Re-generated.
1831 * utils.c (address_significant): Update.
1833 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1835 * stack.c (func_command): Remove trailing newline in call to error.
1837 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1839 * regcache.h (regcache_raw_collect): Remove, update callers to
1840 use regcache::raw_collect.
1841 * regcache.c (regcache_raw_collect): Remove.
1843 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1845 * regcache.h (regcache_raw_supply): Remove, update callers to
1846 use detached_regcache::raw_supply.
1847 * regcache.c (regcache_raw_supply): Remove.
1849 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1851 * regcache.h (regcache_cooked_write_part): Remove, update
1852 callers to use regcache::cooked_write_part.
1853 * regcache.c (regcache_cooked_write_part): Remove.
1855 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1857 * regcache.h (regcache_cooked_read_part): Remove, update callers
1858 to use readable_regcache::cooked_read_part.
1859 * regcache.c (regcache_cooked_read_part): Remove.
1861 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1863 * regcache.h (regcache_cooked_read_value): Remove, update
1864 callers to use readable_regcache::cooked_read_value.
1865 * regcache.c (regcache_cooked_read_value): Remove.
1867 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1869 * regcache.h (regcache_cooked_write): Remove, update callers to
1870 use regcache::cooked_write.
1871 * regcache.c (regcache_cooked_write): Remove.
1873 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1875 * regcache.h (regcache_invalidate): Remove, update callers to
1876 use detached_regcache::invalidate instead.
1877 * regcache.c (regcache_invalidate): Remove.
1879 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1881 * regcache.h (regcache_raw_write_part): Remove, update callers
1882 to use regcache::raw_write_part instead.
1883 * regcache.c (regcache_raw_write_part): Remove.
1885 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1887 * regcache.h (regcache_raw_read_part): Remove, update callers to
1888 use readable_regcache::raw_read_part instead.
1889 * regcache.c (regcache_raw_read_part): Remove.
1891 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1893 * regcache.h (regcache_cooked_read): Remove, update callers to
1894 use readable_regcache::cooked_read instead.
1895 * regcache.c (regcache_cooked_read): Remove.
1897 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1899 * regcache.h (regcache_raw_write): Remove, update callers to use
1900 regcache::raw_write instead.
1901 * regcache.c (regcache_raw_write): Remove.
1903 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1905 * regcache.h (regcache_raw_read): Remove, update callers to use
1906 readable_regcache::raw_read instead.
1907 * regcache.c (regcache_raw_read): Remove.
1909 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1911 * regcache.h (regcache_raw_update): Remove, update callers to
1912 use readable_regcache::raw_update instead.
1913 * regcache.c (regcache_raw_update): Remove.
1915 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1917 * regcache.h (regcache_register_status): Remove, update callers
1918 to use reg_buffer::get_register_status directly instead.
1919 * regcache.c (regcache_register_status): Remove.
1921 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1923 * regcache.h (regcache_get_ptid): Remove, update all callers to
1924 call regcache::ptid instead.
1925 * regcache.c (regcache_get_ptid): Remove.
1927 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1929 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1931 2018-05-30 Pedro Alves <palves@redhat.com>
1933 * common/common-exceptions.h (exception_rethrow): Use
1936 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
1938 * breakpoint.c (print_solib_event, check_status_catch_solib):
1939 Remove struct keyword in range-based for loops.
1940 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1941 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1943 * linespec.c (find_superclass_methods, search_minsyms_for_name):
1945 * symfile.c (addr_info_make_relative): Likewise.
1946 * thread.c (value_in_thread_stack_temporaries): Likewise.
1948 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
1951 * valops.c (value_struct_elt_for_reference): Call check_typedef on
1952 aggregate type to get its real type before accessing it.
1954 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
1956 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1957 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1958 * coff-pe-read.c (add_pe_forwarded_sym): Replace
1959 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1960 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1961 * jit.c (jit_breakpoint_re_set_internal): Likewise.
1962 * printcmd.c (info_address_command): Likewise.
1964 2018-05-29 Tom Tromey <tom@tromey.com>
1966 * windows-nat.c (handle_exception): Update fall-through comment.
1968 2018-05-29 Tom Tromey <tom@tromey.com>
1970 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
1971 (struct program_space) <added_solibs>: Now a std::vector.
1972 * breakpoint.c (print_solib_event): Update.
1973 (check_status_catch_solib): Update.
1974 * progspace.c (clear_program_space_solib_cache): Update.
1975 * solib.c (update_solib_list): Update.
1977 2018-05-29 Tom Tromey <tom@tromey.com>
1979 * python/py-type.c (typy_richcompare): Update.
1980 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1981 * gdbtypes.h (types_deeply_equal): Return bool.
1982 (types_equal): Likewise.
1983 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
1985 (check_types_equal): Change worklist to std::vector. Return
1987 (struct type_equality_entry): Add constructor.
1988 (compare_maybe_null_strings): Return bool.
1989 (check_types_worklist): Return bool. Change worklist to
1991 (types_deeply_equal): Use std::vector.
1992 (types_equal): Return bool.
1993 (compare_maybe_null_strings): Simplify.
1995 2018-05-29 Tom Tromey <tom@tromey.com>
1997 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
1999 2018-05-29 Tom Tromey <tom@tromey.com>
2001 * objc-lang.h: Don't include cp-support.h.
2002 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2005 2018-05-27 Tom Tromey <tom@tromey.com>
2007 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2009 2018-05-25 Tom Tromey <tom@tromey.com>
2011 * value.c (value::location): Initialize.
2013 2018-05-25 Tom Tromey <tom@tromey.com>
2015 * dbxread.c (init_bincl_list): Remove.
2016 (bincl_list): Now a std::vector.
2017 (bincls_allocated, next_bincl): Remove.
2018 (free_bincl_list, do_free_bincl_list_cleanup)
2019 (make_cleanup_free_bincl_list): Remove.
2020 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2022 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2023 (struct header_file_location): Add constructor.
2024 (add_bincl_to_list): Remove.
2026 2018-05-25 Tom Tromey <tom@tromey.com>
2028 * tui/tui.c (tui_enable): Update.
2029 * mi/mi-interp.c (mi_interp::init): Update.
2030 * interps.h (class interp) <name>: New method.
2031 <m_name>: Rename from name.
2032 (~scoped_restore_interp): Update.
2033 * interps.c (interp::interp): Update.
2034 (interp_add, interp_set, interp_lookup_existing)
2035 (current_interp_named_p): Update.
2037 2018-05-25 Tom Tromey <tom@tromey.com>
2039 * interps.c (interp_name): Remove.
2040 * mi/mi-interp.c (mi_interp::init): Update.
2041 * interps.h (interp_name): Remove.
2042 (~scoped_restore_interp): Update.
2043 * tui/tui.c (tui_enable): Update.
2045 2018-05-25 Tom Tromey <tom@tromey.com>
2047 * utils.c (fputs_maybe_filtered): Update.
2048 * linespec.c (decode_line_full): Update.
2049 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2050 (mi_print_breakpoint_for_event, mi_solib_loaded)
2051 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2052 (mi_user_selected_context_changed): Update.
2053 * mi/mi-main.c (mi_execute_command): Update.
2054 * cli/cli-script.c (execute_control_command): Update.
2055 * python/python.c (execute_gdb_command): Update.
2056 * solib.c (info_sharedlibrary_command): Update.
2057 * interps.c (interp_ui_out): Remove.
2058 * interps.h (interp_ui_out): Remove.
2060 2018-05-25 Tom Tromey <tom@tromey.com>
2062 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2063 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2064 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2066 2018-05-25 Tom Tromey <tom@tromey.com>
2068 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2069 * interps.c (interp_exec): Use scoped_restore.
2071 2018-05-25 Tom Tromey <tom@tromey.com>
2073 * remote.c (remote_target::remote_file_get): Use
2075 (remote_target::remote_file_put): Likewise.
2077 2018-05-25 Tom Tromey <tom@tromey.com>
2079 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2081 (get_pe_section_index, add_pe_exported_sym): Update.
2082 (read_pe_exported_syms): Use gdb::def_vector.
2084 2018-05-25 Tom Tromey <tom@tromey.com>
2086 * frame.c (remove_prev_frame): Remove.
2087 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2089 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2091 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2093 * mips-linux-nat.c (supply_fpregset): Always call
2094 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2095 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2096 `mips_fill_fpregset'.
2097 * mips-linux-tdep.c (mips_supply_fpregset)
2098 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2099 (mips_fill_fpregset_wrapper): Remove functions.
2100 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2101 (mips_linux_fpregset): Remove variable.
2102 (mips_linux_iterate_over_regset_sections): Use
2103 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2104 (mips_linux_o32_sigframe_init): Remove comment.
2106 2018-05-25 Pedro Alves <palves@redhat.com>
2108 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2109 (struct readahead_cache, struct packet_reg, struct
2110 remote_arch_state, class remote_state): Move higher up in the
2112 (remote_target::m_remote_state): Now an object instead of a pointer.
2113 (remote_target::get_remote_state): Adjust.
2115 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2117 * stack.c (select_and_print_frame): Delete.
2118 (struct function_bounds): Move struct within function.
2119 (func_command): Most content moved into new function
2120 find_frame_for_function, use new function, print result, add
2122 (find_frame_for_function): New function, now returns a result.
2124 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2126 * stack.c (iterate_over_block_arg_vars): Fix comment.
2127 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2129 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2133 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2135 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2137 * frame.h (class scoped_restore_selected_frame): New class.
2138 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2139 of any exception, use scoped_restore_selected_frame to restore the
2142 2018-05-24 Pedro Alves <palves@redhat.com>
2144 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2147 2018-05-23 Tom Tromey <tom@tromey.com>
2149 * complaints.c (struct complaints): Remove.
2150 (symfile_complaint_book): Remove.
2151 (series): New global.
2152 (complaint_internal): Update.
2153 (clear_complaints): Update.
2155 2018-05-23 Tom Tromey <tom@tromey.com>
2157 * complaints.c (counters): New global.
2158 (struct complain): Remove.
2159 (struct complaints) <root>: Remove.
2160 (complaint_sentinel): Remove.
2161 (symfile_complaint_book): Update.
2162 (find_complaint) Remove.
2163 (complaint_internal, clear_complaints): Update.
2165 2018-05-23 Tom Tromey <tom@tromey.com>
2167 * complaints.c (struct complain) <file, line>: Remove.
2168 (find_complaint): Remove file, line parameters.
2169 (complaint_internal): Update.
2171 2018-05-23 Tom Tromey <tom@tromey.com>
2173 * complaints.c (vcomplaint): Remove.
2174 (complaint_internal) Merge in contents of vcomplaint.
2176 2018-05-23 Tom Tromey <tom@tromey.com>
2178 * complaints.c (struct complaints) <explanation>: Remove.
2179 (symfile_explanations): Remove.
2180 (symfile_complaint_book): Update.
2181 (vcomplaint): Update.
2182 (struct explanation): Remove.
2184 2018-05-23 Tom Tromey <tom@tromey.com>
2186 * complaints.c (symfile_complaints): Remove.
2187 (complaint_internal): Remove "complaints" parameter.
2188 (clear_complaints, vcomplaint): Remove "c" parameter.
2189 (get_complaints): Remove.
2190 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2191 (dwarf2_debug_line_missing_file_complaint)
2192 (dwarf2_debug_line_missing_end_sequence_complaint)
2193 (dwarf2_complex_location_expr_complaint)
2194 (dwarf2_const_value_length_mismatch_complaint)
2195 (dwarf2_section_buffer_overflow_complaint)
2196 (dwarf2_macro_malformed_definition_complaint)
2197 (dwarf2_invalid_attrib_class_complaint)
2198 (create_addrmap_from_index, dw2_symtab_iter_next)
2199 (dw2_expand_marked_cus)
2200 (dw2_debug_names_iterator::find_vec_in_debug_names)
2201 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2202 (create_debug_type_hash_table, init_cutu_and_read_dies)
2203 (partial_die_parent_scope, add_partial_enumeration)
2204 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2205 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2206 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2207 (create_cus_hash_table, create_dwp_hash_table)
2208 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2209 (dwarf2_rnglists_process, dwarf2_ranges_process)
2210 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2211 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2212 (handle_struct_member_die, process_structure_scope)
2213 (read_array_type, read_common_block, read_module_type)
2214 (read_tag_pointer_type, read_typedef, read_base_type)
2215 (read_subrange_type, load_partial_dies, partial_die_info::read)
2216 (partial_die_info::read, partial_die_info::read)
2217 (partial_die_info::read, read_checked_initial_length_and_offset)
2218 (dwarf2_string_attr, read_formatted_entries)
2219 (dwarf_decode_line_header)
2220 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2221 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2222 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2223 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2224 (get_signatured_type, get_DW_AT_signature_type)
2225 (decode_locdesc, file_file_name, consume_improper_spaces)
2226 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2227 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2228 (dwarf2_symbol_mark_computed, set_die_type)
2229 (read_attribute_value): Update.
2230 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2232 * dbxread.c (unknown_symtype_complaint)
2233 (lbrac_mismatch_complaint, repeated_header_complaint)
2234 (set_namestring, function_outside_compilation_unit_complaint)
2235 (read_dbx_symtab, process_one_symbol): Update.
2236 * gdbtypes.c (stub_noname_complaint): Update.
2237 * windows-nat.c (handle_unload_dll): Update.
2238 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2239 (decode_base_type): Update.
2240 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2241 (eb_complaint, record_include_begin, record_include_end)
2242 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2243 (process_xcoff_symbol, read_symbol)
2244 (function_outside_compilation_unit_complaint)
2245 (scan_xcoff_symtab): Update.
2246 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2247 * buildsym.c (finish_block_internal, make_blockvector)
2248 (end_symtab_get_static_block, augment_type_symtab): Update.
2249 * dtrace-probe.c (dtrace_process_dof)
2250 (dtrace_static_probe_ops::get_probes): Update.
2251 * complaints.h (struct complaint): Don't declare.
2252 (symfile_complaints): Remove.
2253 (complaint_internal): Remove "complaints" parameter.
2254 (complaint): Likewise.
2255 (clear_complaints): Likewise.
2256 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2257 (reread_symbols): Update.
2258 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2259 (dwarf2_frame_cache, decode_frame_entry): Update.
2260 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2261 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2262 (info_selectors_command): Update.
2263 * macrotab.c (macro_include, check_for_redefinition)
2264 (macro_undef): Update.
2265 * objfiles.c (filter_overlapping_sections): Update.
2266 * stabsread.c (invalid_cpp_abbrev_complaint)
2267 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2268 (define_symbol, error_type, read_type, rs6000_builtin_type)
2269 (stabs_method_name_from_physname, read_member_functions)
2270 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2271 (attach_fields_to_type, complain_about_struct_wipeout)
2272 (read_range_type, read_args, common_block_start)
2273 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2275 * mdebugread.c (index_complaint, unknown_ext_complaint)
2276 (basic_type_complaint, bad_tag_guess_complaint)
2277 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2278 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2279 (parse_procedure, parse_lines)
2280 (function_outside_compilation_unit_complaint)
2281 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2282 (bad_tag_guess_complaint, reg_value_complaint): Update.
2283 * cp-support.c (demangled_name_complaint): Update.
2284 * macroscope.c (sal_macro_scope): Update.
2285 * dwarf-index-write.c (class debug_names): Update.
2287 2018-05-23 Tom Tromey <tom@tromey.com>
2289 * complaints.c (clear_complaints): Remove "noisy" parameter.
2290 * complaints.h (clear_complaints): Update.
2291 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2292 (reread_symbols): Update.
2294 2018-05-23 Tom Tromey <tom@tromey.com>
2296 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2298 (vcomplaint, clear_complaints): Update.
2299 (symfile_explanations): Remove some messages.
2301 2018-05-23 Tom Tromey <tom@tromey.com>
2303 * complaints.c (internal_complaint): Remove.
2304 * complaints.h (internal_complaint): Remove.
2306 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2308 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2310 2018-05-22 Pedro Alves <palves@redhat.com>
2312 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2313 (remote_fileio_badfd, remote_fileio_return_errno)
2314 (remote_fileio_return_success, remote_fileio_func_open)
2315 (remote_fileio_func_open, remote_fileio_func_close)
2316 (remote_fileio_func_read, remote_fileio_func_write)
2317 (remote_fileio_func_lseek, remote_fileio_func_rename)
2318 (remote_fileio_func_unlink, remote_fileio_func_stat)
2319 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2320 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2321 remote_target parameter.
2322 (remote_fio_func_map) <func>: Add remote_target parameter.
2323 (do_remote_fileio_request, remote_fileio_request):
2324 * remote-fileio.h (remote_fileio_request):
2325 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2326 remote_target parameter.
2327 (remote_notif_process, handle_notification): Adjust to pass down
2329 (remote_notif_state_allocate): Add remote_target parameter. Save
2331 * remote-notif.h (struct remote_target): Forward declare.
2332 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2333 remote_target parameter.
2334 (struct remote_notif_state) <remote>: New field.
2335 (remote_notif_ack, remote_notif_parse): Add remote_target
2337 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2338 remote_target parameter.
2339 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2340 (threads_listing_context, rmt_thread_action, protocol_feature)
2341 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2342 (packet_result, struct threads_listing_context, remote_state):
2343 Move definitions and declarations higher up.
2344 (remote_target) <~remote_target>: Declare.
2345 (remote_download_command_source, remote_file_put, remote_file_get)
2346 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2347 (remote_hostio_pread_vFile, remote_hostio_send_command)
2348 (remote_hostio_set_filesystem, remote_hostio_open)
2349 (remote_hostio_close, remote_hostio_unlink, remote_state)
2350 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2351 (get_memory_write_packet_size, get_memory_read_packet_size)
2352 (append_pending_thread_resumptions, remote_detach_1)
2353 (append_resumption, remote_resume_with_vcont)
2354 (add_current_inferior_and_thread, wait_ns, wait_as)
2355 (process_stop_reply, remote_notice_new_inferior)
2356 (process_initial_stop_replies, remote_add_thread)
2357 (btrace_sync_conf, remote_btrace_maybe_reopen)
2358 (remove_new_fork_children, kill_new_fork_children)
2359 (discard_pending_stop_replies, stop_reply_queue_length)
2360 (check_pending_events_prevent_wildcard_vcont)
2361 (discard_pending_stop_replies_in_queue, stop_reply)
2362 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2363 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2364 (remote_interrupt_as, remote_interrupt_ns)
2365 (remote_get_noisy_reply, remote_query_attached)
2366 (remote_add_inferior, remote_current_thread, get_current_thread)
2367 (set_thread, set_general_thread, set_continue_thread)
2368 (set_general_process, write_ptid)
2369 (remote_unpack_thread_info_response, remote_get_threadinfo)
2370 (parse_threadlist_response, remote_get_threadlist)
2371 (remote_threadlist_iterator, remote_get_threads_with_ql)
2372 (remote_get_threads_with_qxfer)
2373 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2374 (get_offsets, remote_check_symbols, remote_supported_packet)
2375 (remote_query_supported, remote_packet_size)
2376 (remote_serial_quit_handler, remote_detach_pid)
2377 (remote_vcont_probe, remote_resume_with_hc)
2378 (send_interrupt_sequence, interrupt_query)
2379 (remote_notif_get_pending_events, fetch_register_using_p)
2380 (send_g_packet, process_g_packet, fetch_registers_using_g)
2381 (store_register_using_P, store_registers_using_G)
2382 (set_remote_traceframe, check_binary_download)
2383 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2384 (remote_xfer_live_readonly_partial, remote_read_bytes)
2385 (remote_send_printf, remote_flash_write, readchar)
2386 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2387 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2388 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2389 (extended_remote_disable_randomization, extended_remote_run)
2390 (send_environment_packet, extended_remote_environment_support)
2391 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2392 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2393 (packet_command): Now methods of ...
2394 (remote_target): ... this class.
2395 (m_remote_state) <remote_target>: New field.
2396 (struct remote_state) <stop_reply_queue,
2397 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2399 (remote_state::remote_state): Allocate stop_reply_queue.
2400 (remote_state): Delete global.
2401 (get_remote_state_raw): Delete.
2402 (remote_target::get_remote_state): Allocate m_remote_state on
2404 (get_current_remote_target): New.
2405 (remote_ops, extended_remote_ops): Delete.
2406 (wait_forever_enabled_p, remote_async_inferior_event_token):
2407 Delete, moved to struct remote_state.
2408 (remote_target::close): Delete self. Destruction bits split to
2410 (remote_target::~remote_target): ... this.
2411 (show_memory_packet_size): Adjust to use
2412 get_current_remote_target.
2413 (struct protocol_feature) <func>: Add remote_target parameter.
2414 All callers adjusted.
2415 (curr_quit_handler_target): New.
2416 (remote_serial_quit_handler): Reimplement.
2417 (remote_target::open_1): Adjust to use get_current_remote_target.
2418 Heap-allocate remote_target/extended_remote_target instances.
2419 (vcont_builder::vcont_builder): Add remote_target parameter, and
2420 save it in m_remote. All callers adjusted.
2421 (vcont_builder::m_remote): New field.
2422 (vcont_builder::restart, vcont_builder::flush)
2423 (vcont_builder::push_action): Use it.
2424 (remote_target::commit_resume): Use it.
2425 (struct queue_iter_param) <remote>: New field.
2426 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2427 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2428 (check_pending_event_prevents_wildcard_vcont_callback)
2429 (remote_target::check_pending_events_prevent_wildcard_vcont)
2430 (remote_target::discard_pending_stop_replies)
2431 (remote_target::discard_pending_stop_replies_in_queue)
2432 (remote_target::remote_notif_remove_queued_reply): Fill in
2434 (remote_notif_get_pending_events): New.
2435 (remote_target::readchar, remote_target::remote_serial_write):
2436 Save/restore curr_quit_handler_target.
2438 (kill_new_fork_children): Fill in 'remote' field.
2439 (packet_command): Use get_current_remote_target, defer to
2440 remote_target method of same name.
2441 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2442 parameter, and save it in m_remote. All callers adjusted.
2443 (scoped_remote_fd::release): Use m_remote.
2444 (scoped_remote_fd::m_remote): New field.
2445 (remote_file_put, remote_file_get, remote_file_delete): Use
2446 get_current_remote_target, defer to remote_target method of same
2448 (remote_btrace_reset): Add remote_state paremeter. Update all
2450 (remote_async_inferior_event_handler). Pass down 'data'.
2451 (remote_new_objfile): Use get_current_remote_target.
2452 (remote_target::vcont_r_supported): New.
2453 (set_range_stepping): Use get_current_remote_target and
2454 remote_target::vcont_r_supported.
2455 (_initialize_remote): Don't allocate 'remote_state' and
2456 'stop_reply_queue' globals.
2457 * remote.h (struct remote_target): Forward declare.
2458 (getpkt, putpkt, remote_notif_get_pending_events): Add
2459 'remote_target' parameter.
2461 2018-05-22 Pedro Alves <palves@redhat.com>
2463 * remote.c (vcont_builder): Now a class. Make all data members
2465 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2467 (vcont_builder_restart): Rename to ...
2468 (vcont_builder::restart): ... this.
2469 (vcont_builder_flush): Rename to ...
2470 (vcont_builder::flush): ... this.
2471 (vcont_builder_push_action): Rename to ...
2472 (vcont_builder::push_action): ... this.
2473 (remote_target::commit_resume): Adjust.
2475 2018-05-22 Pedro Alves <palves@redhat.com>
2477 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2478 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2479 (get_fixed_memory_packet_size): New.
2480 (get_memory_packet_size): Use it.
2481 (set_memory_packet_size): Don't override the config size with
2482 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2483 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2484 Don't refer to get_memory_packet_size if not connected to a remote
2485 target. Show "(default)" if configured size is 0.
2487 2018-05-22 Pedro Alves <palves@redhat.com>
2489 * remote.c (remote_target::mourn_inferior): Move
2490 discard_pending_stop_replies call here from ...
2491 (_initialize_remote): ... here.
2493 2018-05-22 Pedro Alves <palves@redhat.com>
2495 * remote.c (compare_section_command): Remove set_general_process
2498 2018-05-22 Pedro Alves <palves@redhat.com>
2500 * remote.c (struct packet_reg, struct remote_arch_state):
2501 Move higher up in the file.
2502 (remote_state) <m_arch_states>: Store remote_arch_state values
2503 instead of remote_arch_state pointers.
2504 (remote_state::get_remote_arch_state): Adjust.
2506 2018-05-22 Pedro Alves <palves@redhat.com>
2508 * remote.c: Include <unordered_map>.
2509 (remote_state): Now a class.
2510 (remote_state) <get_remote_arch_state>: Declare method.
2511 <get_remote_arch_state>: New field.
2512 (remote_arch_state) <remote_arch_state>: Declare ctor.
2513 <regs>: Now a unique_ptr.
2514 (remote_gdbarch_data_handle): Delete.
2515 (get_remote_arch_state): Delete.
2516 (remote_state::get_remote_arch_state): New.
2517 (get_remote_state): Adjust to call remote_state's
2518 get_remote_arch_state method.
2519 (init_remote_state): Delete, bits factored out to ...
2520 (remote_arch_state::remote_arch_state): ... this new method.
2521 (get_remote_packet_size, get_memory_packet_size)
2522 (process_g_packet, remote_target::fetch_registers)
2523 (remote_target::prepare_to_store, store_registers_using_G)
2524 (remote_target::store_registers, remote_target::get_trace_status):
2525 Adjust to call remote_state's method.
2526 (_initialize_remote): Remove reference to
2527 remote_gdbarch_data_handle.
2529 2018-05-22 Pedro Alves <palves@redhat.com>
2531 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2532 pread>: New method declarations.
2533 (remote_target::open_1): Adjust.
2534 (readahead_cache_invalidate): Rename to ...
2535 (readahead_cache::invalidate): ... this, and adjust to be a class
2537 (readahead_cache_invalidate_fd): Rename to ...
2538 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2540 (remote_hostio_pwrite): Adjust.
2541 (remote_hostio_pread_from_cache): Rename to ...
2542 (readahead_cache::pread): ... this, and adjust to be a class
2544 (remote_hostio_close): Adjust.
2546 2018-05-22 Pedro Alves <palves@redhat.com>
2548 * remote.c (remote_hostio_close_cleanup): Delete.
2549 (class scoped_remote_fd): New.
2550 (remote_file_put, remote_file_get): Use it.
2552 2018-05-22 Pedro Alves <palves@redhat.com>
2554 (struct vCont_action_support): Use bool and initialize all fields.
2555 (struct readahead_cache): Initialize all fields.
2556 (remote_state): Use bool and initialize all fields.
2557 (remote_state::remote_state, remote_state::~remote_state): New.
2558 (new_remote_state): Delete.
2559 (_initialize_remote): Use new to allocate remote_state.
2561 2018-05-22 Pedro Alves <palves@redhat.com>
2565 * c-exp.y: Include "c-support.h".
2566 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2567 of tolower. Use c_ident_is_alpha to scan names.
2568 * c-lang.c: Include "c-support.h".
2569 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2570 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2571 * c-support.h: New file, with bits factored out from ...
2572 * cp-name-parser.y: ... this file.
2573 Include "c-support.h".
2574 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2575 c-support.h and renamed.
2576 (symbol_end, yylex): Adjust.
2578 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2580 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2581 parameter type to CORE_ADDR.
2582 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2583 parameter type in declaration to CORE_ADDR.
2584 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2585 target_auxv_search to get AT_HWCAP and use the result to get the
2587 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2588 to CORE_ADDR. Remove the cast of the return value to unsigned
2589 long. Fix error predicate of target_auxv_search.
2590 (ppc_linux_nat_target::read_description): Change the type of the
2591 hwcap variable to CORE_ADDR.
2593 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2595 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2596 if the size of fpscr is larger than 32 bits.
2598 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2600 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2601 (ppc32_linux_vsxregmap): New global.
2602 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2603 regcache_supply_regset, and regcache_collect_regset.
2604 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2605 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2606 (fetch_vsx_register, store_vsx_register): Remove.
2607 (fetch_vsx_registers): Add regno parameter. Get regset using
2608 ppc_linux_vsxregset. Use regset to supply registers.
2609 (store_vsx_registers): Add regno parameter. Get regset using
2610 ppc_linux_vsxregset. Use regset to collect registers.
2611 (fetch_register): Call fetch_vsx_registers instead of
2613 (store_register): Call store_vsx_registers instead of
2615 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2616 new regno parameter.
2617 (store_ppc_registers): Call store_vsx_registers with -1 for the
2618 new regno parameter.
2619 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2620 (ppc_collect_vsxregset): Remove.
2622 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2624 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2626 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2627 for vector register offset fields.
2628 (ppc64_fbsd_reg_offsets): Likewise.
2629 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2630 to vector register offset fields.
2631 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2632 to vector register offset fields.
2633 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2634 vector register offset fields.
2635 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2636 initializers for vector register offset fields.
2637 (rs6000_aix64_reg_offsets): Likewise.
2638 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2639 (ppc_supply_vrregset): Remove.
2640 (ppc_collect_vrregset): Remove.
2641 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2642 (ppc_linux_vrregset) : New function.
2643 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2644 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2645 (ppc32_linux_vrregset): Remove.
2646 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2647 and use result instead of ppc32_linux_vrregset.
2648 (ppc32_linux_reg_offsets): Remove initializers for vector register
2650 (ppc64_linux_reg_offsets): Likewise.
2651 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2652 * ppc-linux-nat.c: Include regset.h.
2653 (gdb_vrregset_t): Adjust comment to account for little-endian
2655 (supply_vrregset, fill_vrregset): Remove.
2656 (fetch_altivec_register, store_altivec_register): Remove.
2657 (fetch_altivec_registers): Add regno parameter. Get regset using
2658 ppc_linux_vrregset. Use regset to supply registers.
2659 (store_altivec_registers): Add regno parameter. Get regset using
2660 ppc_linux_vrregset. Use regset to collect registers.
2661 (fetch_register): Call fetch_altivec_registers instead of
2662 fetch_altivec_register.
2663 (store_register): Call store_altivec_registers instead of
2664 store_altivec_register.
2665 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2666 the new regno parameter.
2667 (store_ppc_registers): Call store_altivec_registers with -1 for
2668 the new regno parameter.
2670 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2672 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2673 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2674 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2675 (gdb_vrregset_t): Change array type size to
2676 PPC_LINUX_SIZEOF_VRREGSET.
2677 (gdb_vsxregset_t): Change array type size to
2678 PPC_LINUX_SIZEOF_VSXREGSET.
2679 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2680 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2681 PPC_LINUX_SIZEOF_VSXREGSET.
2683 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2685 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2686 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2688 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2689 ppc_linux_target_wordsize with tid.
2690 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2692 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2693 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2694 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2695 tid parameter. Remove static specifier.
2696 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2697 (ppc_linux_target_wordsize): New declaration.
2699 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2701 * arch/ppc-linux-common.c: New file.
2702 * arch/ppc-linux-common.h: New file.
2703 * arch/ppc-linux-tdesc.h: New file.
2704 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2705 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2706 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2707 arch/ppc-linux-tdesc.h.
2708 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2709 arch/ppc-linux-tdesc.h.
2710 (ppc_linux_nat_target::read_description): Remove target
2711 description matching code. Fill a ppc_linux_features struct and
2712 call ppc_linux_match_description with it. Move comment about ISA
2713 2.05 to ppc-linux-common.c.
2714 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2715 arch/ppc-linux-tdesc.h.
2716 (ppc_linux_core_read_description): Remove target description
2717 matching code. Fill a ppc_linux_features struct and call
2718 ppc_linux_match_description with it.
2719 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2720 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2721 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2722 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2723 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2724 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2725 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2726 (tdesc_powerpc_e500l): Remove.
2728 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2730 * ada-lang.c (catch_assert_command): Pass empty string instead
2731 of NULL for excep_string argument.
2733 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2735 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2736 the width of the requested register exceeds the width of the
2739 2018-05-21 Tom Tromey <tom@tromey.com>
2741 * printcmd.c (output_command): Remove.
2742 (output_command_const): Rename to output_command.
2743 * valprint.h (output_command): Rename from output_command_const.
2744 * tracepoint.c (trace_dump_actions): Call output_command.
2746 2018-05-21 Tom Tromey <tom@tromey.com>
2748 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2749 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2750 * ada-lang.h (create_ada_exception_catchpoint): Update.
2751 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2753 (create_excep_cond_exprs, ~ada_catchpoint)
2754 (should_stop_exception, print_one_exception)
2755 (print_mention_exception, print_recreate_exception): Update.
2756 (ada_get_next_arg): Remove.
2757 (catch_ada_exception_command_split): Use std::string. Change type
2758 of "excep_string", "cond_string".
2759 (catch_ada_exception_command): Update.
2760 (create_ada_exception_catchpoint): Change type of excep_string.
2761 (ada_exception_sal): Remove excep_string parameter.
2762 (~ada_catchpoint): Remove.
2764 2018-05-21 Tom Tromey <tom@tromey.com>
2766 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2769 2018-05-21 Tom Tromey <tom@tromey.com>
2771 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2772 Return unique_xmalloc_ptr.
2773 (print_it_exception): Update.
2775 2018-05-21 Tom Tromey <tom@tromey.com>
2777 * tracepoint.c (trace_dump_actions): Use std::string.
2779 2018-05-21 Tom Tromey <tom@tromey.com>
2781 * symfile.c (reread_symbols): Use std::string for original_name.
2783 2018-05-21 Tom Tromey <tom@tromey.com>
2785 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2786 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2789 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2791 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2793 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2794 * objfiles.c (get_objfile_bfd_data): Allocate
2795 objfile_per_bfd_storage with obstack_new when allocating on
2798 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2800 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2802 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2803 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2804 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2805 (add_pending): Likewise.
2806 (parse_symbol): Likewise.
2807 (parse_partial_symbols): Likewise.
2808 (psymtab_to_symtab_1): Likewise.
2809 (new_psymtab): Likewise.
2810 (elfmdebug_build_psymtabs): Likewise.
2811 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2812 * objfiles.c (get_objfile_bfd_data): Likewise.
2813 (objfile_register_static_link): Likewise.
2814 * psymtab.c (allocate_psymtab): Likewise.
2815 * stabsread.c (read_member_functions): Likewise.
2816 * xcoffread.c (xcoff_end_psymtab): Likewise.
2818 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2820 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2821 compiler supports std::is_trivially_constructible.
2822 * common/poison.h: Include obstack.h.
2823 (IsMallocable): Define to is_trivially_constructible if the
2824 compiler supports it, define to true_type otherwise.
2828 (XOBNEWVEC): Redefine.
2829 * gdb_obstack.h (obstack_zalloc): New.
2830 (OBSTACK_ZALLOC): Redefine.
2831 (obstack_calloc): New.
2832 (OBSTACK_CALLOC): Redefine.
2834 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2835 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2837 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2838 obstack_calloc/obstack_zalloc.
2839 (gdbarch_obstack_zalloc): Remove.
2840 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2842 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2844 * stack.c (backtrace_command_1): Remove useless variable int i.
2846 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2848 * stack.c (print_frame_info): Fix comment.
2850 2018-05-18 Tom Tromey <tom@tromey.com>
2852 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2853 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2854 (~dwarf2_per_objfile): Update
2855 (dwarf2_get_dwz_file): Use new.
2856 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2859 2018-05-18 Tom Tromey <tom@tromey.com>
2861 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2863 * dwarf2read.c (struct dwp_file): Add constructor and
2865 (open_and_init_dwp_file): Return a unique_ptr.
2866 (dwarf2_per_objfile, create_dwp_hash_table)
2867 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2868 (lookup_dwo_unit_in_dwp): Update.
2869 (open_and_init_dwp_file, get_dwp_file): Update.
2871 2018-05-18 Tom Tromey <tom@tromey.com>
2873 * dwarf2read.c (dwarf2_per_objfile): Update.
2874 (struct mapped_index): Add initializers.
2875 (dwarf2_read_index): Use new.
2876 (dw2_symtab_iter_init): Update.
2877 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2880 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2882 * dwarf2read.c (mapped_index) <total_size>: Remove.
2884 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2886 * unittests/format_pieces-selftests.c (test_format_specifier):
2889 2018-05-18 Tom Tromey <tom@tromey.com>
2891 * c-typeprint.c (maybe_print_hole): New function.
2892 (c_print_type_struct_field_offset): Update.
2893 (c_type_print_base_struct_union): Call maybe_print_hole.
2895 2018-05-17 Keith Seitz <keiths@redhat.com>
2897 * breakpoint.c (build_bpstat_chain): New function, moved from
2899 (bpstat_stop_status): Add optional parameter, `stop_chain'.
2900 If no stop chain is passed, call build_bpstat_chain to build it.
2901 * breakpoint.h (build_bpstat_chain): Declare.
2902 (bpstat_stop_status): Move documentation here from breakpoint.c.
2903 * infrun.c (handle_signal_stop): Before eliding inlined frames,
2904 build the stop chain and pass it to skip_inline_frames.
2905 Pass this stop chain to bpstat_stop_status.
2906 * inline-frame.c: Include breakpoint.h.
2907 (stopped_by_user_bp_inline_frame): New function.
2908 (skip_inline_frames): Add parameter `stop_chain'.
2909 Move documention to inline-frame.h.
2910 If non-NULL, use stopped_by_user_bp_inline_frame to determine
2911 whether the frame should be elided.
2912 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2913 Add moved documentation and update for new parameter.
2915 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2918 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2919 unittests/format_pieces-selftests.c.
2920 * common/format.h (format_piece) <operator==>: New.
2921 (format_pieces) <operator[]>: Remove.
2922 * common/format.c (format_pieces::format_pieces): Handle \e.
2923 * unittests/format_pieces-selftests.c: New.
2925 2018-05-17 Tom Tromey <tom@tromey.com>
2928 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2929 (dw2_instantiate_symtab): Add skip_partial parameter.
2930 (dw2_find_last_source_symtab, dw2_map_expand_apply)
2931 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2932 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2933 (dw2_expand_symtabs_matching_one)
2934 (dw2_find_pc_sect_compunit_symtab)
2935 (dw2_debug_names_lookup_symbol)
2936 (dw2_debug_names_expand_symtabs_for_function): Update.
2937 (init_cutu_and_read_dies): Add skip_partial parameter.
2938 (process_psymtab_comp_unit, build_type_psymtabs_1)
2939 (process_skeletonless_type_unit, load_partial_comp_unit)
2940 (psymtab_to_symtab_1): Update.
2941 (load_full_comp_unit): Add skip_partial parameter.
2942 (process_imported_unit_die, dwarf2_read_addr_index)
2943 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2944 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2945 (read_signatured_type): Update.
2947 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2949 * value.c (release_value): Remove unused variable.
2950 (record_latest_value): Likewise.
2951 (access_value_history): Likewise.
2952 (preserve_values): Likewise.
2954 2018-05-17 Tom Tromey <tom@tromey.com>
2956 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2959 2018-05-16 Maciej W. Rozycki <macro@mips.com>
2962 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2963 Also handle registers whose width is not a multiple of
2965 (linux_nat_trad_target::store_register): Likewise.
2967 2018-05-16 Tom Tromey <tom@tromey.com>
2969 * gdbcore.h (core_bfd): Redefine.
2970 * corelow.c (core_target::close): Update.
2971 (core_target_open): Update.
2972 * progspace.h (struct program_space) <cbfd>: Now a
2975 2018-05-16 Tom Tromey <tom@tromey.com>
2978 * symfile-add-flags.h (enum symfile_add_flags)
2979 <SYMFILE_NOT_FILENAME>: New constant.
2980 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
2981 objfile name from BFD.
2982 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2983 * minidebug.c (find_separate_debug_file_in_section): Put
2984 ".gnu_debugdata" into BFD's file name.
2986 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
2988 * regcache.c (regcache_read_ftype, regcache_write_ftype):
2991 2018-05-15 Tamar Christina <tamar.christina@arm.com>
2994 * aarch64-tdep.c (aarch64_analyze_prologue,
2995 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2996 Indicate not interested in errors.
2998 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3000 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3001 Supply the MIPS_ZERO_REGNUM register.
3003 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3005 * mips-tdep.c (mask_address_var): Make variable static.
3007 2018-05-14 Tom Tromey <tom@tromey.com>
3009 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3011 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3013 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3014 FXSAVE_ADDR for the mxcsr register.
3016 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3018 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3020 2018-05-11 Pedro Alves <palves@redhat.com>
3022 * corelow.c (core_target) <core_target>: No longer inline.
3023 Initialize m_core_gdbarch, m_core_vec and build the section table
3025 <~core_target>: New.
3026 <core_gdbarch, get_core_register_section>: New methods.
3027 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3028 factored out from ...
3029 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3031 (sniff_core_bfd): Add gdbarch parameter.
3032 (core_close): Delete, merged into ...
3033 (core_target::close): ... here. Delete self.
3034 (core_close_cleanup): Delete.
3035 (core_target_open): Allocate a core_target on the heap. Use a
3036 unique_ptr instead of a cleanup. Bits moved into the core_target
3037 ctor. Adjust to use core_target methods instead of globals.
3038 (get_core_register_section): Rename to ...
3039 (core_target::get_core_register_section): ... this and adjust.
3040 (struct get_core_registers_cb_data): New.
3041 (get_core_registers_cb): Use it. Use bool.
3042 (core_target::fetch_registers, core_target::files_info)
3043 (core_target::xfer_partial, core_target::read_description)
3044 (core_target::pid_to, core_target::thread_name): Adjust to
3045 reference class fields instead of globals.
3046 * target.h (struct target_ops_deleter, target_ops_up): New.
3048 2018-05-11 Pedro Alves <palves@redhat.com>
3050 * corefile.c (core_file_command): Move to corelow.c.
3051 * corelow.c (the_core_target): Delete.
3052 (core_file_command): Moved from corefile.c. Check exec_bfd
3053 instead of the_core_target. Use target_detach instead of calling
3054 into the_core_target directly.
3055 (maybe_say_no_core_file_now): New.
3056 (core_target::detach): Use it.
3057 (_initialize_corelow): Remove references to the_core_target.
3058 * gdbcore.h (the_core_target): Delete.
3060 2018-05-11 Tom Tromey <tromey@redhat.com>
3061 Pedro Alves <palves@redhat.com>
3063 * corefile.c (core_bfd): Remove.
3064 * gdbcore.h (core_bfd): Now a macro.
3065 * progspace.h (struct program_space) <cbfd>: New field.
3067 2018-05-11 Tom Tromey <tom@tromey.com>
3069 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3072 2018-05-10 Tom Tromey <tom@tromey.com>
3074 * configure: Rebuild.
3075 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3077 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3080 * regformats/regdat.sh: Adjust script, following the addition
3081 of the new expedite_regs parameter to init_target_desc.
3083 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3086 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3087 set_gdbarch_significant_addr_bit.
3088 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3089 set_gdbarch_significant_addr_bit.
3090 * utils.c (address_significant): Update to sign extend addr.
3092 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3094 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3095 (xtensa_linux_init_abi): Limit tdep->num_regs by
3096 tdep->num_nopriv_regs.
3097 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3098 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3101 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3103 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3105 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3107 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3108 (I387_MXCSR_INIT_VAL): New constant.
3109 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3110 buffer if it was supplied by the inferior.
3111 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3112 (i387_xsave_get_clear_bv): New function.
3113 (i387_supply_xsave): Only read x87 control registers from the
3114 xsave buffer if the feature is enabled, and the state will have
3115 been written, otherwise, provide a suitable default.
3116 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3117 including x87 control registers. Update control registers if they
3118 have changed from the default value, and mark features as enabled
3120 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3122 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3124 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3126 2018-05-07 Tom Tromey <tom@tromey.com>
3128 * configure: Rebuild.
3129 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3131 2018-05-07 Tom Tromey <tom@tromey.com>
3134 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3135 bit. Use correct value for VDIV.
3137 2018-05-04 Tom Tromey <tom@tromey.com>
3139 * configure: Rebuild.
3140 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3142 2018-05-04 Tom Tromey <tom@tromey.com>
3144 * linux-record.c (record_linux_system_call) <case
3145 RECORD_SYS_RECVFROM>: Add "break".
3147 2018-05-04 Tom Tromey <tom@tromey.com>
3149 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3150 Add missing "break".
3151 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3152 Add missing "break".
3154 2018-05-04 Tom Tromey <tom@tromey.com>
3156 * rs6000-tdep.c (ppc_process_record_op4)
3157 (ppc_process_record_op63): Add fall-through comment.
3159 2018-05-04 Tom Tromey <tom@tromey.com>
3161 * i386-tdep.c (i386_process_record): Add fall-through comment.
3163 2018-05-04 Tom Tromey <tom@tromey.com>
3165 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3168 2018-05-04 Tom Tromey <tom@tromey.com>
3170 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3171 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3172 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3174 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3176 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3179 2018-05-04 Tom Tromey <tom@tromey.com>
3181 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3183 2018-05-04 Tom Tromey <tom@tromey.com>
3185 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3186 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3187 * symfile.c (section_is_mapped): Fix fall-through comment.
3188 * stabsread.c (define_symbol, read_member_functions): Fix
3189 fall-through comment.
3190 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3192 * remote.c (remote_wait_as): Fix fall-through comment.
3193 * p-exp.y (yylex): Fix fall-through comment.
3194 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3196 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3197 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3198 * jv-exp.y (yylex): Fix fall-through comment.
3199 * go-exp.y (lex_one_token): Fix fall-through comment.
3200 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3201 fall-through comment.
3202 * f-exp.y (yylex): Fix fall-through comment.
3203 * dwarf2read.c (process_die): Fix fall-through comments.
3204 * dbxread.c (process_one_symbol): Fix fall-through comment.
3205 * d-exp.y (lex_one_token): Fix fall-through comment.
3206 * cp-name-parser.y (yylex): Fix fall-through comment.
3207 * coffread.c (coff_symtab_read): Fix fall-through comment.
3208 * c-exp.y (lex_one_token): Fix fall-through comment.
3209 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3211 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3214 2018-05-04 Tom Tromey <tom@tromey.com>
3217 * NEWS: Mention gdb.execute change.
3218 * gdbcmd.h (execute_control_command): Don't declare.
3219 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3220 execute_control_commands, execute_control_commands_to_string.
3221 * cli/cli-script.h (execute_control_commands)
3222 (execute_control_commands_to_string): Declare.
3223 (execute_control_command): Add from_tty parameter.
3224 * cli/cli-script.c (execute_control_commands)
3225 (execute_control_commands_to_string): New functions.
3226 (execute_user_command): Use execute_control_commands.
3227 (execute_control_command_1): Add "from_tty" parameter. Update.
3228 (execute_control_command): Likewise.
3230 2018-05-04 Tom Tromey <tom@tromey.com>
3233 * NEWS: Mention that breakpoint commands are writable.
3234 * python/py-breakpoint.c (bppy_set_commands): New function.
3235 (breakpoint_object_getset) <"commands">: Use it.
3237 2018-05-04 Tom Tromey <tom@tromey.com>
3239 * tracepoint.c (actions_command): Update.
3240 * mi/mi-cmd-break.c (mi_command_line_array)
3241 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3242 (mi_read_next_line): Remove.
3243 (mi_cmd_break_commands): Update.
3244 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3246 * cli/cli-script.c (get_command_line): Update.
3247 (process_next_line): Use function_view. Constify.
3248 (recurse_read_control_structure, read_command_lines)
3249 (read_command_lines_1): Change argument types to function_view.
3250 (do_define_command, document_command): Update.
3251 * breakpoint.h (check_tracepoint_command): Don't declare.
3252 * breakpoint.c (check_tracepoint_command): Remove.
3253 (commands_command_1, create_tracepoint_from_upload): Update.
3255 2018-05-04 Tom Tromey <tom@tromey.com>
3258 * cli/cli-script.h (enum command_control_type) <define_control>:
3260 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3261 (build_command_line, execute_control_command_1)
3262 (process_next_line): Likewise.
3263 (do_define_command): New function, extracted from define_command.
3264 (define_command): Use it.
3266 2018-05-04 Tom Tromey <tom@tromey.com>
3268 * tracepoint.c (actions_command): Update.
3269 * cli/cli-script.h (read_command_lines): Update.
3270 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3271 (MAX_TMPBUF): Remove define.
3272 (define_command): Use string_printf.
3273 (document_command): Likewise.
3274 * breakpoint.c (commands_command_1): Update.
3276 2018-05-04 Tom Tromey <tom@tromey.com>
3278 * top.c (execute_command): Update.
3279 * cli/cli-script.h (print_command_lines): Now varargs.
3280 * cli/cli-script.c (print_command_lines): Now varargs.
3281 (execute_control_command_1) <case while_control, case if_control>:
3284 2018-05-04 Tom Tromey <tom@tromey.com>
3286 * tracepoint.c (all_tracepoint_actions): Rename from
3287 all_tracepoint_actions_and_cleanup. Change return type.
3288 (actions_command, encode_actions_1, encode_actions)
3289 (trace_dump_actions, tdump_command): Update.
3290 * remote.c (remote_download_command_source): Update.
3291 * python/python.c (gdbpy_eval_from_control_command)
3292 (python_command, python_interactive_command): Update.
3293 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3294 * guile/guile.c (guile_command)
3295 (gdbscm_eval_from_control_command, guile_command): Update.
3296 * compile/compile.c (compile_code_command)
3297 (compile_print_command, compile_to_object): Update.
3298 * cli/cli-script.h (struct command_lines_deleter): New.
3299 (counted_command_line): New typedef.
3300 (struct command_line): Add constructor, destructor.
3301 <body_list>: Remove.
3302 <body_list_0, body_list_1>: New members.
3303 (command_line_up): Remove typedef.
3304 (read_command_lines, read_command_lines_1, get_command_line):
3306 (copy_command_lines): Don't declare.
3307 * cli/cli-script.c (build_command_line): Use "new".
3308 (get_command_line): Return counted_command_line.
3309 (print_command_lines, execute_user_command)
3310 (execute_control_command_1, while_command, if_command): Update.
3311 (realloc_body_list): Remove.
3312 (process_next_line, recurse_read_control_structure): Update.
3313 (read_command_lines, read_command_lines_1): Return counted_command_line.
3314 (free_command_lines): Use "delete".
3315 (copy_command_lines): Remove.
3316 (define_command, document_command, show_user_1): Update.
3317 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3318 a counted_command_line.
3319 * breakpoint.h (counted_command_line): Remove typedef.
3320 (breakpoint_set_commands): Update.
3321 * breakpoint.c (check_no_tracepoint_commands)
3322 (validate_commands_for_breakpoint): Update.
3323 (breakpoint_set_commands): Change commands to be a
3324 counted_command_line.
3325 (commands_command_1, update_dprintf_command_list)
3326 (create_tracepoint_from_upload): Update.
3328 2018-05-04 Tom Tromey <tom@tromey.com>
3330 * cli/cli-decode.h (cmd_list_element): New constructor.
3331 (~cmd_list_element): New destructor.
3332 (struct cmd_list_element): Add initializers.
3333 * cli/cli-decode.c (do_add_cmd): Use "new".
3334 (delete_cmd): Use "delete".
3336 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3337 Pedro Alves <palves@redhat.com>
3339 PR breakpoints/19806 and support for PR external/20207.
3340 * NEWS: Mention Aarch64 watchpoint improvements.
3341 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3342 watchpoints and PR external/20207 watchpoints.
3343 * nat/aarch64-linux-hw-point.c
3344 (kernel_supports_any_contiguous_range): New.
3345 (aarch64_watchpoint_offset): New.
3346 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3347 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3348 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3349 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3350 next_addr_orig_p. Support PR external/20207 watchpoints.
3351 (aarch64_downgrade_regs): New.
3352 (aarch64_dr_state_insert_one_point): New parameters offset and
3354 (aarch64_dr_state_remove_one_point): Likewise.
3355 (aarch64_handle_breakpoint): Update caller.
3356 (aarch64_handle_aligned_watchpoint): Likewise.
3357 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3359 (aarch64_linux_set_debug_regs): Remove const from state. Call
3360 aarch64_downgrade_regs.
3361 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3362 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3363 (DR_CONTROL_MASK): ... this.
3364 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3365 (unsigned int aarch64_watchpoint_offset): New prototype.
3366 (aarch64_linux_set_debug_regs): Remove const from state.
3367 * utils.c (align_up, align_down): Move to ...
3368 * common/common-utils.c (align_up, align_down): ... here.
3369 * utils.h (align_up, align_down): Move to ...
3370 * common/common-utils.h (align_up, align_down): ... here.
3372 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3374 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3375 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3376 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3377 Re-implement to match the ABI as summarized in GCC's
3378 gcc/config/sparc/sparc.c. All callers updated.
3379 (sparc32_store_arguments): Remove assertion.
3381 2018-05-04 Tom Tromey <tom@tromey.com>
3383 * printcmd.c: Don't include tui.h.
3384 (decode_format): Use skip_spaces.
3386 2018-05-04 Tom Tromey <tom@tromey.com>
3389 * printcmd.c (last_count): New global.
3390 (x_command): Use saved count when repeating.
3392 2018-05-04 Tom Tromey <tom@tromey.com>
3394 * nto-procfs.c (do_closedir_cleanup): Remove.
3395 (procfs_pidlist): Use gdb_dir_up.
3396 * procfs.c (do_closedir_cleanup): Remove.
3397 (proc_update_threads): Use gdb_dir_up.
3398 * common/filestuff.h (struct gdb_dir_deleter): New.
3399 (gdb_dir_up): New typedef.
3401 2018-05-04 Tom Tromey <tom@tromey.com>
3403 * ada-lang.c (print_mention_exception): Use std::string.
3405 2018-05-04 Tom Tromey <tom@tromey.com>
3407 * ada-lang.c (create_excep_cond_exprs): Update.
3408 (ada_exception_catchpoint_cond_string): Use std::string.
3410 2018-05-04 Tom Tromey <tom@tromey.com>
3412 * ada-lang.c (xget_renaming_scope): Return std::string.
3413 (old_renaming_is_invisible): Update.
3415 2018-05-04 Tom Tromey <tom@tromey.com>
3417 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3418 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3420 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3422 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3424 2018-05-04 Tom Tromey <tom@tromey.com>
3426 * remote.c (remote_query_supported_append): Change type.
3427 (remote_check_symbols): Update.
3429 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3432 * configure.ac: Prepend libpython.
3433 * python/python-config.py: Likewise.
3434 * configure: Regenerate.
3436 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3438 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3440 2018-05-03 Pedro Alves <palves@redhat.com>
3443 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3444 override. Write 'true' instead of '1'.
3445 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3448 2018-05-02 Pedro Alves <palves@redhat.com>
3450 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3451 add_inf_child_target.
3452 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3453 add_inf_child_target.
3454 * aix-thread.c (aix_thread_target_info): New.
3455 (aix_thread_target) <shortname, longname, doc>: Delete.
3457 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3458 add_inf_child_target.
3459 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3460 add_inf_child_target.
3461 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3462 add_inf_child_target.
3463 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3464 add_inf_child_target.
3465 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3466 add_inf_child_target.
3467 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3468 add_inf_child_target.
3469 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3470 add_inf_child_target.
3471 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3472 add_inf_child_target.
3473 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3474 add_inf_child_target.
3475 * bfd-target.c (target_bfd_target_info): New.
3476 (target_bfd) <shortname, longname, doc>: Delete.
3478 * bsd-kvm.c (bsd_kvm_target_info): New.
3479 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3481 (bsd_kvm_target::open): Rename to ...
3482 (bsd_kvm_target_open): ... this. Adjust.
3483 * bsd-uthread.c (bsd_uthread_target_info): New.
3484 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3486 * corefile.c (core_file_command): Adjust.
3487 * corelow.c (core_target_info): New.
3488 (core_target) <shortname, longname, doc>: Delete.
3490 (core_target::open): Rename to ...
3491 (core_target_open): ... this. Adjust.
3492 * ctf.c (ctf_target_info): New.
3493 (ctf_target) <shortname, longname, doc>: Delete.
3495 (ctf_target::open): Rename to ...
3496 (ctf_target_open): ... this.
3497 (_initialize_ctf): Adjust.
3498 * exec.c (exec_target_info): New.
3499 (exec_target) <shortname, longname, doc>: Delete.
3501 (exec_target::open): Rename to ...
3502 (exec_target_open): ... this.
3503 * gdbcore.h (core_target_open): Declare.
3504 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3505 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3506 add_inf_child_target.
3507 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3508 add_inf_child_target.
3509 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3510 add_inf_child_target.
3511 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3512 add_inf_child_target.
3513 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3514 add_inf_child_target.
3515 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3516 add_inf_child_target.
3517 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3518 add_inf_child_target.
3519 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3520 add_inf_child_target.
3521 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3522 add_inf_child_target.
3523 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3524 add_inf_child_target.
3525 * inf-child.c (inf_child_target_info): New.
3526 (inf_child_target::info): New.
3527 (inf_child_open_target): Remove 'target' parameter. Use
3528 get_native_target instead.
3529 (inf_child_target::open): Delete.
3530 (add_inf_child_target): New.
3531 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3534 (add_inf_child_target): Declare.
3535 (inf_child_open_target): Declare.
3536 * linux-thread-db.c (thread_db_target_info): New.
3537 (thread_db_target) <shortname, longname, doc>: Delete.
3539 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3540 add_inf_child_target.
3541 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3542 add_inf_child_target.
3543 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3544 add_inf_child_target.
3545 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3546 add_inf_child_target.
3547 * make-target-delegates (print_class): Adjust.
3548 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3549 add_inf_child_target.
3550 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3551 add_inf_child_target.
3552 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3553 add_inf_child_target.
3554 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3555 add_inf_child_target.
3556 * nto-procfs.c (nto_native_target_info): New.
3557 (nto_procfs_target_native) <shortname, longname, doc>:
3560 (nto_procfs_target_info): New.
3561 (nto_procfs_target_procfs) <shortname, longname, doc>:
3564 (init_procfs_targets): Adjust.
3565 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3566 add_inf_child_target.
3567 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3568 add_inf_child_target.
3569 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3570 add_inf_child_target.
3571 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3572 add_inf_child_target.
3573 * ravenscar-thread.c (ravenscar_target_info): New.
3574 (ravenscar_thread_target) <shortname, longname, doc>:
3577 * record-btrace.c (record_btrace_target_info):
3578 (record_btrace_target) <shortname, longname, doc>: Delete.
3580 (record_btrace_target::open): Rename to ...
3581 (record_btrace_target_open): ... this. Adjust.
3582 * record-full.c (record_longname, record_doc): New.
3583 (record_full_base_target) <shortname, longname, doc>: Delete.
3585 (record_full_target_info): New.
3586 (record_full_target): <shortname>: Delete.
3588 (record_full_core_open_1, record_full_open_1): Update comments.
3589 (record_full_base_target::open): Rename to ...
3590 (record_full_open): ... this.
3591 (cmd_record_full_restore): Update.
3592 (_initialize_record_full): Update.
3593 * remote-sim.c (remote_sim_target_info): New.
3594 (gdbsim_target) <shortname, longname, doc>: Delete.
3596 (gdbsim_target::open): Rename to ...
3597 (gdbsim_target_open): ... this.
3598 (_initialize_remote_sim): Adjust.
3599 * remote.c (remote_doc): New.
3600 (remote_target_info): New.
3601 (remote_target) <shortname, longname, doc>: Delete.
3603 (extended_remote_target_info): New.
3604 (extended_remote_target) <shortname, longname, doc>: Delete.
3606 (remote_target::open_1): Make static. Adjust.
3607 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3608 * s390-linux-nat.c (_initialize_s390_nat): Use
3609 add_inf_child_target.
3610 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3611 add_inf_child_target.
3612 * sol-thread.c (thread_db_target_info): New.
3613 (sol_thread_target) <shortname, longname, doc>: Delete.
3615 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3616 add_inf_child_target.
3617 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3618 add_inf_child_target.
3619 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3620 add_inf_child_target.
3621 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3622 add_inf_child_target.
3623 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3624 add_inf_child_target.
3625 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3626 add_inf_child_target.
3627 * spu-linux-nat.c (_initialize_spu_nat): Use
3628 add_inf_child_target.
3629 * spu-multiarch.c (spu_multiarch_target_info): New.
3630 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3632 * target-delegates.c: Regenerate.
3633 * target.c: Include <unordered_map>.
3634 (target_ops_p): Delete.
3635 (DEF_VEC_P(target_ops_p)): Delete.
3636 (target_factories): New.
3637 (test_target_info): New.
3638 (test_target_ops::info): New.
3639 (open_target): Adjust to use target_factories.
3640 (add_target_with_completer): Rename to ...
3641 (add_target): ... this. Change prototype. Register target_info
3642 and open callback in target_factories. Register target_info in
3643 command context instead of target_ops.
3644 (add_target): Delete old implementation.
3645 (add_deprecated_target_alias): Change prototype. Adjust.
3646 (the_native_target): New.
3647 (set_native_target, get_native_target): New.
3648 (find_default_run_target): Use the_native_target.
3649 (find_attach_target, find_run_target): Simplify.
3650 (target_ops::open): Delete.
3651 (dummy_target_info): New.
3652 (dummy_target::shortname, dummy_target::longname)
3653 (dummy_target::doc): Delete.
3654 (dummy_target::info): New.
3655 (debug_target::shortname, debug_target::longname)
3656 (debug_target::doc): Delete.
3657 (debug_target::info): New.
3658 * target.h (struct target_info): New.
3659 (target_ops::~target_ops): Add comment.
3660 (target_ops::info): New.
3661 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3662 longer virtual. Implement in terms of target_info.
3663 (set_native_target, get_native_target): Declare.
3664 (target_open_ftype): New.
3665 (add_target, add_target_with_completer)
3666 (add_deprecated_target_alias): Change prototype.
3667 (test_target) <shortname, longname, doc>: Delete.
3669 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3670 add_inf_child_target.
3671 * tracefile-tfile.c (tfile_target_info): New.
3672 (tfile_target) <shortname, longname, doc>: Delete.
3674 (tfile_target::open): Rename to ...
3675 (tfile_target_open): ... this.
3676 (_initialize_tracefile_tfile): Adjust.
3677 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3678 add_inf_child_target.
3679 * windows-nat.c (_initialize_windows_nat): Use
3680 add_inf_child_target.
3681 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3682 add_inf_child_target.
3684 2018-05-02 Pedro Alves <palves@redhat.com>
3686 * linux-nat.h (linux_nat_target) <low_new_thread,
3687 low_delete_thread, low_new_fork, low_forget_process,
3688 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3689 New virtual methods.
3690 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3691 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3692 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3693 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3694 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3696 * linux-fork.c (delete_fork): Adjust to call low method.
3697 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3698 (linux_nat_new_fork, linux_nat_forget_process_hook)
3699 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3700 (linux_nat_status_is_event):
3701 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3702 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3704 (sigtrap_is_event): Rename to ...
3705 (linux_nat_target::low_status_is_event): ... this.
3706 (linux_nat_set_status_is_event): Delete.
3707 (save_stop_reason, linux_nat_wait_1)
3708 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3710 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3711 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3712 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3713 (linux_nat_set_prepare_to_resume): Delete.
3714 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3715 low virtual methods.
3716 * amd64-linux-nat.c: Likewise.
3717 * arm-linux-nat.c: Likewise.
3718 * i386-linux-nat.c: Likewise.
3719 * ia64-linux-nat.c: Likewise.
3720 * mips-linux-nat.c: Likewise.
3721 * ppc-linux-nat.c: Likewise.
3722 * s390-linux-nat.c: Likewise.
3723 * sparc64-linux-nat.c: Likewise.
3724 * x86-linux-nat.c: Likewise.
3725 * x86-linux-nat.h: Include "nat/x86-linux.h".
3726 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3727 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3730 2018-05-02 Pedro Alves <palves@redhat.com>
3732 * target.h (target_ops)
3733 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3734 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3735 stopped_by_watchpoint, have_continuable_watchpoint,
3736 stopped_data_address, watchpoint_addr_within_range,
3737 can_accel_watchpoint_condition, can_run, thread_alive,
3738 has_all_memory, has_memory, has_stack, has_registers,
3739 has_execution, can_async_p, is_async_p, supports_non_stop,
3740 always_non_stop_p, can_execute_reverse, supports_multi_process,
3741 supports_enable_disable_tracepoint,
3742 supports_disable_randomization, supports_string_tracing,
3743 supports_evaluation_of_breakpoint_conditions,
3744 can_run_breakpoint_commands, filesystem_is_local,
3745 can_download_tracepoint, get_trace_state_variable_value,
3746 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3747 record_is_replaying, record_will_replay,
3748 augmented_libraries_svr4_read>: Adjust to return bool.
3749 * aarch64-linux-nat.c: All implementations adjusted.
3750 * aix-thread.c: All implementations adjusted.
3751 * arm-linux-nat.c: All implementations adjusted.
3752 * breakpoint.c: All implementations adjusted.
3753 * bsd-kvm.c: All implementations adjusted.
3754 * bsd-uthread.c: All implementations adjusted.
3755 * corelow.c: All implementations adjusted.
3756 * ctf.c: All implementations adjusted.
3757 * darwin-nat.c: All implementations adjusted.
3758 * darwin-nat.h: All implementations adjusted.
3759 * exec.c: All implementations adjusted.
3760 * fbsd-nat.c: All implementations adjusted.
3761 * fbsd-nat.h: All implementations adjusted.
3762 * gnu-nat.c: All implementations adjusted.
3763 * gnu-nat.h: All implementations adjusted.
3764 * go32-nat.c: All implementations adjusted.
3765 * ia64-linux-nat.c: All implementations adjusted.
3766 * inf-child.c: All implementations adjusted.
3767 * inf-child.h: All implementations adjusted.
3768 * inf-ptrace.c: All implementations adjusted.
3769 * inf-ptrace.h: All implementations adjusted.
3770 * linux-nat.c: All implementations adjusted.
3771 * linux-nat.h: All implementations adjusted.
3772 * mips-linux-nat.c: All implementations adjusted.
3773 * nto-procfs.c: All implementations adjusted.
3774 * ppc-linux-nat.c: All implementations adjusted.
3775 * procfs.c: All implementations adjusted.
3776 * ravenscar-thread.c: All implementations adjusted.
3777 * record-btrace.c: All implementations adjusted.
3778 * record-full.c: All implementations adjusted.
3779 * remote-sim.c: All implementations adjusted.
3780 * remote.c: All implementations adjusted.
3781 * s390-linux-nat.c: All implementations adjusted.
3782 * sol-thread.c: All implementations adjusted.
3783 * spu-multiarch.c: All implementations adjusted.
3784 * target-delegates.c: All implementations adjusted.
3785 * target.c: All implementations adjusted.
3786 * target.h: All implementations adjusted.
3787 * tracefile-tfile.c: All implementations adjusted.
3788 * tracefile.c: All implementations adjusted.
3789 * tracefile.h: All implementations adjusted.
3790 * windows-nat.c: All implementations adjusted.
3791 * x86-linux-nat.h: All implementations adjusted.
3792 * x86-nat.h: All implementations adjusted.
3794 2018-05-02 Pedro Alves <palves@redhat.com>
3796 * make-target-delegates (scan_target_h): Don't trim lines here.
3797 Replace sequences of tabs and/or whitespace with a single
3799 (top level, parsing methods): Trim each line before processing it
3802 2018-05-02 Pedro Alves <palves@redhat.com>
3803 John Baldwin <jhb@freebsd.org>
3805 * target.h (enum strata) <debug_stratum>: New.
3806 (struct target_ops) <all delegation methods>: Replace by C++
3807 virtual methods, and drop "to_" prefix. All references updated
3809 <to_shortname, to_longname, to_doc, to_data,
3810 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3811 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3812 virtual methods. All references updated throughout.
3813 <can_attach, supports_terminal_ours, can_create_inferior,
3814 get_thread_control_capabilities, attach_no_wait>: New
3816 <insert_breakpoint, remove_breakpoint>: Now
3817 TARGET_DEFAULT_NORETURN methods.
3818 <info_proc>: Now returns bool.
3820 (OPS_MAGIC): Delete.
3821 (current_target): Delete. All references replaced by references
3823 (target_stack): ... this. New.
3824 (target_shortname, target_longname): Adjust.
3825 (target_can_run): Now a function declaration.
3826 (default_child_has_all_memory, default_child_has_memory)
3827 (default_child_has_stack, default_child_has_registers)
3828 (default_child_has_execution): Remove target_ops parameter.
3829 (complete_target_initialization): Delete.
3830 (memory_breakpoint_target): New template class.
3831 (test_target_ops): Refactor as a C++ class with virtual methods.
3832 * make-target-delegates (NAME_PART): Tighten.
3833 (POINTER_PART, CP_SYMBOL): New.
3834 (SIMPLE_RETURN_PART): Reimplement.
3835 (VEC_RETURN_PART): Expect less.
3836 (RETURN_PART, VIRTUAL_PART): New.
3837 (METHOD): Adjust to C++ virtual methods.
3838 (scan_target_h): Remove reference to C99.
3839 (dname): Output "target_ops::" prefix.
3840 (write_function_header): Adjust to output a C++ class method.
3841 (write_declaration): New.
3842 (write_delegator): Adjust to output a C++ class method.
3843 (tdname): Output "dummy_target::" prefix.
3844 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3846 (tdefault_names, debug_names): Delete.
3847 (return_types, tdefaults, styles, argtypes_array): New.
3848 (top level): All methods are delegators.
3850 (top level): Print dummy_target and debug_target classes.
3851 * target-delegates.c: Regenerate.
3852 * target-debug.h (target_debug_print_enum_info_proc_what)
3853 (target_debug_print_thread_control_capabilities)
3854 (target_debug_print_thread_info_p): New.
3855 * target.c (dummy_target): Delete.
3856 (the_dummy_target, the_debug_target): New.
3857 (target_stack): Now extern.
3858 (set_targetdebug): Push/unpush debug target.
3859 (default_child_has_all_memory, default_child_has_memory)
3860 (default_child_has_stack, default_child_has_registers)
3861 (default_child_has_execution): Remove target_ops parameter.
3862 (complete_target_initialization): Delete.
3863 (add_target_with_completer): No longer call
3864 complete_target_initialization.
3865 (target_supports_terminal_ours): Use regular delegation.
3866 (update_current_target): Delete.
3867 (push_target): No longer check magic number. Don't call
3868 update_current_target.
3869 (unpush_target): Don't call update_current_target.
3870 (target_is_pushed): No longer check magic number.
3871 (target_require_runnable): Skip for all stratums over
3873 (target_ops::info_proc): New.
3874 (target_info_proc): Use find_target_at and
3875 find_default_run_target.
3876 (target_supports_disable_randomization): Use regular delegation.
3877 (target_get_osdata): Use find_target_at.
3878 (target_ops::open, target_ops::close, target_ops::can_attach)
3879 (target_ops::attach, target_ops::can_create_inferior)
3880 (target_ops::create_inferior, target_ops::can_run)
3881 (target_can_run): New.
3882 (default_fileio_target): Use regular delegation.
3883 (target_ops::fileio_open, target_ops::fileio_pwrite)
3884 (target_ops::fileio_pread, target_ops::fileio_fstat)
3885 (target_ops::fileio_close, target_ops::fileio_unlink)
3886 (target_ops::fileio_readlink): New.
3887 (target_fileio_open_1, target_fileio_unlink)
3888 (target_fileio_readlink): Always call the target method. Handle
3890 (return_zero, return_zero_has_execution): Delete.
3891 (init_dummy_target): Delete.
3892 (dummy_target::dummy_target, dummy_target::shortname)
3893 (dummy_target::longname, dummy_target::doc)
3894 (debug_target::debug_target, debug_target::shortname)
3895 (debug_target::longname, debug_target::doc): New.
3896 (target_supports_delete_record): Use regular delegation.
3897 (setup_target_debug): Delete.
3898 (maintenance_print_target_stack): Skip debug_stratum.
3899 (initialize_targets): Instantiate the_dummy_target and
3901 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
3903 (target_auxv_search, fprint_target_auxv): Adjust.
3904 (info_auxv_command): Adjust to use target_stack.
3905 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3906 * exceptions.c (print_flush): Handle a NULL target_stack.
3907 * regcache.c (target_ops_no_register): Refactor as class with
3910 * exec.c (exec_target): New class.
3911 (exec_ops): Now an exec_target.
3912 (exec_open, exec_close_1, exec_get_section_table)
3913 (exec_xfer_partial, exec_files_info, exec_has_memory)
3914 (exec_make_note_section): Refactor as exec_target methods.
3915 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3917 (exec_target::find_memory_regions): New.
3918 (_initialize_exec): Don't call init_exec_ops.
3919 * gdbcore.h (exec_file_clear): Delete.
3921 * corefile.c (core_target): Delete.
3922 (core_file_command): Adjust.
3923 * corelow.c (core_target): New class.
3924 (the_core_target): New.
3925 (core_close): Remove target_ops parameter.
3926 (core_close_cleanup): Adjust.
3927 (core_target::close): New.
3928 (core_open, core_detach, get_core_registers, core_files_info)
3929 (core_xfer_partial, core_thread_alive, core_read_description)
3930 (core_pid_to_str, core_thread_name, core_has_memory)
3931 (core_has_stack, core_has_registers, core_info_proc): Rework as
3932 core_target methods.
3933 (ignore, core_remove_breakpoint, init_core_ops): Delete.
3934 (_initialize_corelow): Initialize the_core_target.
3935 * gdbcore.h (core_target): Delete.
3936 (the_core_target): New.
3938 * ctf.c: (ctf_target): New class.
3939 (ctf_ops): Now a ctf_target.
3940 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3941 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3942 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3944 (init_ctf_ops): Delete.
3945 (_initialize_ctf): Don't call it.
3946 * tracefile-tfile.c (tfile_target): New class.
3947 (tfile_ops): Now a tfile_target.
3948 (tfile_open, tfile_close, tfile_files_info)
3949 (tfile_get_tracepoint_status, tfile_trace_find)
3950 (tfile_fetch_registers, tfile_xfer_partial)
3951 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3952 Refactor as tfile_target methods.
3953 (tfile_xfer_partial_features): Remove target_ops parameter.
3954 (init_tfile_ops): Delete.
3955 (_initialize_tracefile_tfile): Don't call it.
3956 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3957 (tracefile_has_stack, tracefile_has_registers)
3958 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3959 tracefile_target methods.
3960 (init_tracefile_ops): Delete.
3961 (tracefile_target::tracefile_target): New.
3962 * tracefile.h: Include "target.h".
3963 (tracefile_target): New class.
3964 (init_tracefile_ops): Delete.
3966 * spu-multiarch.c (spu_multiarch_target): New class.
3967 (spu_ops): Now a spu_multiarch_target.
3968 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3969 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3970 (spu_search_memory, spu_mourn_inferior): Refactor as
3971 spu_multiarch_target methods.
3972 (init_spu_ops): Delete.
3973 (_initialize_spu_multiarch): Remove references to init_spu_ops,
3974 complete_target_initialization.
3976 * ravenscar-thread.c (ravenscar_thread_target): New class.
3977 (ravenscar_ops): Now a ravenscar_thread_target.
3978 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3979 (ravenscar_thread_alive, ravenscar_pid_to_str)
3980 (ravenscar_fetch_registers, ravenscar_store_registers)
3981 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3982 (ravenscar_stopped_by_hw_breakpoint)
3983 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3984 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3985 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3987 (init_ravenscar_thread_ops): Delete.
3988 (_initialize_ravenscar): Remove references to
3989 init_ravenscar_thread_ops and complete_target_initialization.
3991 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3992 (bsd_uthread_target): New class.
3993 (bsd_uthread_ops): Now a bsd_uthread_target.
3994 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3995 (bsd_uthread_close, bsd_uthread_mourn_inferior)
3996 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3997 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3998 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3999 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4000 (bsd_uthread_target): Delete function.
4001 (_initialize_bsd_uthread): Remove reference to
4002 complete_target_initialization.
4004 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4005 (target_bfd): ... this new class.
4006 (target_bfd_xfer_partial, target_bfd_get_section_table)
4007 (target_bfd_close): Refactor as target_bfd methods.
4008 (target_bfd::~target_bfd): New.
4009 (target_bfd_reopen): Adjust.
4010 (target_bfd::close): New.
4012 * record-btrace.c (record_btrace_target): New class.
4013 (record_btrace_ops): Now a record_btrace_target.
4014 (record_btrace_open, record_btrace_stop_recording)
4015 (record_btrace_disconnect, record_btrace_close)
4016 (record_btrace_async, record_btrace_info)
4017 (record_btrace_insn_history, record_btrace_insn_history_range)
4018 (record_btrace_insn_history_from, record_btrace_call_history)
4019 (record_btrace_call_history_range)
4020 (record_btrace_call_history_from, record_btrace_record_method)
4021 (record_btrace_is_replaying, record_btrace_will_replay)
4022 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4023 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4024 (record_btrace_store_registers, record_btrace_prepare_to_store)
4025 (record_btrace_to_get_unwinder)
4026 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4027 (record_btrace_commit_resume, record_btrace_wait)
4028 (record_btrace_stop, record_btrace_can_execute_reverse)
4029 (record_btrace_stopped_by_sw_breakpoint)
4030 (record_btrace_supports_stopped_by_sw_breakpoint)
4031 (record_btrace_stopped_by_hw_breakpoint)
4032 (record_btrace_supports_stopped_by_hw_breakpoint)
4033 (record_btrace_update_thread_list, record_btrace_thread_alive)
4034 (record_btrace_goto_begin, record_btrace_goto_end)
4035 (record_btrace_goto, record_btrace_stop_replaying_all)
4036 (record_btrace_execution_direction)
4037 (record_btrace_prepare_to_generate_core)
4038 (record_btrace_done_generating_core): Refactor as
4039 record_btrace_target methods.
4040 (init_record_btrace_ops): Delete.
4041 (_initialize_record_btrace): Remove reference to
4042 init_record_btrace_ops.
4043 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4044 the execution_direction global.
4045 (record_full_base_target, record_full_target)
4046 (record_full_core_target): New classes.
4047 (record_full_ops): Now a record_full_target.
4048 (record_full_core_ops): Now a record_full_core_target.
4049 (record_full_target::detach, record_full_target::disconnect)
4050 (record_full_core_target::disconnect)
4051 (record_full_target::mourn_inferior, record_full_target::kill):
4053 (record_full_open, record_full_close, record_full_async): Refactor
4054 as methods of the record_full_base_target class.
4055 (record_full_resume, record_full_commit_resume): Refactor
4056 as methods of the record_full_target class.
4057 (record_full_wait, record_full_stopped_by_watchpoint)
4058 (record_full_stopped_data_address)
4059 (record_full_stopped_by_sw_breakpoint)
4060 (record_full_supports_stopped_by_sw_breakpoint)
4061 (record_full_stopped_by_hw_breakpoint)
4062 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4063 methods of the record_full_base_target class.
4064 (record_full_store_registers, record_full_xfer_partial)
4065 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4066 Refactor as methods of the record_full_target class.
4067 (record_full_can_execute_reverse, record_full_get_bookmark)
4068 (record_full_goto_bookmark, record_full_execution_direction)
4069 (record_full_record_method, record_full_info, record_full_delete)
4070 (record_full_is_replaying, record_full_will_replay)
4071 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4072 (record_full_stop_replaying): Refactor as methods of the
4073 record_full_base_target class.
4074 (record_full_core_resume, record_full_core_kill)
4075 (record_full_core_fetch_registers)
4076 (record_full_core_prepare_to_store)
4077 (record_full_core_store_registers, record_full_core_xfer_partial)
4078 (record_full_core_insert_breakpoint)
4079 (record_full_core_remove_breakpoint)
4080 (record_full_core_has_execution): Refactor
4081 as methods of the record_full_core_target class.
4082 (record_full_base_target::supports_delete_record): New.
4083 (init_record_full_ops): Delete.
4084 (init_record_full_core_ops): Delete.
4085 (record_full_save): Refactor as method of the
4086 record_full_base_target class.
4087 (_initialize_record_full): Remove references to
4088 init_record_full_ops and init_record_full_core_ops.
4090 * remote.c (remote_target, extended_remote_target): New classes.
4091 (remote_ops): Now a remote_target.
4092 (extended_remote_ops): Now an extended_remote_target.
4093 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4094 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4095 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4096 (remote_pass_signals, remote_set_syscall_catchpoint)
4097 (remote_program_signals, )
4098 (remote_thread_always_alive): Remove target_ops parameter.
4099 (remote_thread_alive, remote_thread_name)
4100 (remote_update_thread_list, remote_threads_extra_info)
4101 (remote_static_tracepoint_marker_at)
4102 (remote_static_tracepoint_markers_by_strid)
4103 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4104 (remote_open): Refactor as methods of remote_target.
4105 (extended_remote_open, extended_remote_detach)
4106 (extended_remote_attach, extended_remote_post_attach):
4107 (extended_remote_supports_disable_randomization)
4108 (extended_remote_create_inferior): : Refactor as method of
4109 extended_remote_target.
4110 (remote_set_permissions, remote_open_1, remote_detach)
4111 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4112 (remote_resume, remote_commit_resume, remote_stop)
4113 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4114 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4115 (remote_prepare_to_store, remote_store_registers)
4116 (remote_flash_erase, remote_flash_done, remote_files_info)
4117 (remote_kill, remote_mourn, remote_insert_breakpoint)
4118 (remote_remove_breakpoint, remote_insert_watchpoint)
4119 (remote_watchpoint_addr_within_range)
4120 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4121 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4122 (remote_supports_stopped_by_sw_breakpoint)
4123 (remote_stopped_by_hw_breakpoint)
4124 (remote_supports_stopped_by_hw_breakpoint)
4125 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4126 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4127 (remote_verify_memory): Refactor as methods of remote_target.
4128 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4130 (remote_xfer_partial, remote_get_memory_xfer_limit)
4131 (remote_search_memory, remote_rcmd, remote_memory_map)
4132 (remote_pid_to_str, remote_get_thread_local_address)
4133 (remote_get_tib_address, remote_read_description): Refactor as
4134 methods of remote_target.
4135 (remote_target::fileio_open, remote_target::fileio_pwrite)
4136 (remote_target::fileio_pread, remote_target::fileio_close): New.
4137 (remote_hostio_readlink, remote_hostio_fstat)
4138 (remote_filesystem_is_local, remote_can_execute_reverse)
4139 (remote_supports_non_stop, remote_supports_disable_randomization)
4140 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4141 (remote_supports_enable_disable_tracepoint)
4142 (remote_supports_string_tracing)
4143 (remote_can_run_breakpoint_commands, remote_trace_init)
4144 (remote_download_tracepoint, remote_can_download_tracepoint)
4145 (remote_download_trace_state_variable, remote_enable_tracepoint)
4146 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4147 (remote_trace_start, remote_get_trace_status)
4148 (remote_get_tracepoint_status, remote_trace_stop)
4149 (remote_trace_find, remote_get_trace_state_variable_value)
4150 (remote_save_trace_data, remote_get_raw_trace_data)
4151 (remote_set_disconnected_tracing, remote_core_of_thread)
4152 (remote_set_circular_trace_buffer, remote_traceframe_info)
4153 (remote_get_min_fast_tracepoint_insn_len)
4154 (remote_set_trace_buffer_size, remote_set_trace_notes)
4155 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4156 (remote_disable_btrace, remote_teardown_btrace)
4157 (remote_read_btrace, remote_btrace_conf)
4158 (remote_augmented_libraries_svr4_read, remote_load)
4159 (remote_pid_to_exec_file, remote_can_do_single_step)
4160 (remote_execution_direction, remote_thread_handle_to_thread_info):
4161 Refactor as methods of remote_target.
4162 (init_remote_ops, init_extended_remote_ops): Delete.
4163 (remote_can_async_p, remote_is_async_p, remote_async)
4164 (remote_thread_events, remote_upload_tracepoints)
4165 (remote_upload_trace_state_variables): Refactor as methods of
4167 (_initialize_remote): Remove references to init_remote_ops and
4168 init_extended_remote_ops.
4170 * remote-sim.c (gdbsim_target): New class.
4171 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4172 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4173 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4174 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4175 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4176 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4177 Refactor as methods of gdbsim_target.
4178 (gdbsim_ops): Now a gdbsim_target.
4179 (init_gdbsim_ops): Delete.
4180 (gdbsim_cntrl_c): Adjust.
4181 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4183 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4184 (the_amd64_linux_nat_target): New.
4185 (amd64_linux_fetch_inferior_registers)
4186 (amd64_linux_store_inferior_registers): Refactor as methods of
4187 amd64_linux_nat_target.
4188 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4189 * i386-linux-nat.c: Don't include "linux-nat.h".
4190 (i386_linux_nat_target): New class.
4191 (the_i386_linux_nat_target): New.
4192 (i386_linux_fetch_inferior_registers)
4193 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4194 as methods of i386_linux_nat_target.
4195 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4196 * inf-child.c (inf_child_ops): Delete.
4197 (inf_child_fetch_inferior_registers)
4198 (inf_child_store_inferior_registers): Delete.
4199 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4200 methods of inf_child_target.
4201 (inf_child_target::supports_terminal_ours)
4202 (inf_child_target::terminal_init)
4203 (inf_child_target::terminal_inferior)
4204 (inf_child_target::terminal_ours_for_output)
4205 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4206 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4208 (inf_child_open, inf_child_disconnect, inf_child_close)
4209 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4210 (inf_child_post_startup_inferior, inf_child_can_run)
4211 (inf_child_pid_to_exec_file): Refactor as methods of
4213 (inf_child_follow_fork): Delete.
4214 (inf_child_target::can_create_inferior)
4215 (inf_child_target::can_attach): New.
4216 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4217 (inf_child_target::has_stack, inf_child_target::has_registers)
4218 (inf_child_target::has_execution): New.
4219 (inf_child_fileio_open, inf_child_fileio_pwrite)
4220 (inf_child_fileio_pread, inf_child_fileio_fstat)
4221 (inf_child_fileio_close, inf_child_fileio_unlink)
4222 (inf_child_fileio_readlink, inf_child_use_agent)
4223 (inf_child_can_use_agent): Refactor as methods of
4225 (return_zero, inf_child_target): Delete.
4226 (inf_child_target::inf_child_target): New.
4227 * inf-child.h: Include "target.h".
4228 (inf_child_target): Delete function prototype.
4229 (inf_child_target): New class.
4230 (inf_child_open_target, inf_child_mourn_inferior)
4231 (inf_child_maybe_unpush_target): Delete.
4232 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4233 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4234 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4235 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4236 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4237 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4238 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4239 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4240 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4241 methods of inf_ptrace_target.
4242 (inf_ptrace_target): Delete function.
4243 * inf-ptrace.h: Include "inf-child.h".
4244 (inf_ptrace_target): Delete function declaration.
4245 (inf_ptrace_target): New class.
4246 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4247 * linux-nat.c (linux_target): New.
4248 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4249 (linux_nat_target::~linux_nat_target): New.
4250 (linux_child_post_attach, linux_child_post_startup_inferior)
4251 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4252 (linux_child_remove_fork_catchpoint)
4253 (linux_child_insert_vfork_catchpoint)
4254 (linux_child_remove_vfork_catchpoint)
4255 (linux_child_insert_exec_catchpoint)
4256 (linux_child_remove_exec_catchpoint)
4257 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4258 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4259 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4260 (linux_nat_stopped_data_address)
4261 (linux_nat_stopped_by_sw_breakpoint)
4262 (linux_nat_supports_stopped_by_sw_breakpoint)
4263 (linux_nat_stopped_by_hw_breakpoint)
4264 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4265 (linux_nat_kill, linux_nat_mourn_inferior)
4266 (linux_nat_xfer_partial, linux_nat_thread_alive)
4267 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4268 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4269 (linux_child_static_tracepoint_markers_by_strid)
4270 (linux_nat_is_async_p, linux_nat_can_async_p)
4271 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4272 (linux_nat_supports_multi_process)
4273 (linux_nat_supports_disable_randomization, linux_nat_async)
4274 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4275 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4276 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4277 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4278 methods of linux_nat_target.
4279 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4280 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4282 (check_stopped_by_watchpoint): Adjust.
4283 (linux_xfer_partial): Delete.
4284 (linux_target_install_ops, linux_target, linux_nat_add_target):
4286 (linux_nat_target::linux_nat_target): New.
4287 * linux-nat.h: Include "inf-ptrace.h".
4288 (linux_nat_target): New.
4289 (linux_target, linux_target_install_ops, linux_nat_add_target):
4290 Delete function declarations.
4291 (linux_target): Declare global.
4292 * linux-thread-db.c (thread_db_target): New.
4293 (thread_db_target::thread_db_target): New.
4294 (thread_db_ops): Delete.
4295 (the_thread_db_target): New.
4296 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4297 (thread_db_update_thread_list, thread_db_pid_to_str)
4298 (thread_db_extra_thread_info)
4299 (thread_db_thread_handle_to_thread_info)
4300 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4301 (thread_db_resume): Refactor as methods of thread_db_target.
4302 (init_thread_db_ops): Delete.
4303 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4304 * x86-linux-nat.c: Don't include "linux-nat.h".
4305 (super_post_startup_inferior): Delete.
4306 (x86_linux_nat_target::~x86_linux_nat_target): New.
4307 (x86_linux_child_post_startup_inferior)
4308 (x86_linux_read_description, x86_linux_enable_btrace)
4309 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4310 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4311 methods of x86_linux_nat_target.
4312 (x86_linux_create_target): Delete. Bits folded ...
4313 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4315 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4316 (x86_linux_nat_target): New class.
4317 (x86_linux_create_target): Delete.
4318 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4319 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4320 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4321 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4322 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4323 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4325 (x86_use_watchpoints): Delete.
4326 * x86-nat.h: Include "breakpoint.h" and "target.h".
4327 (x86_use_watchpoints): Delete.
4328 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4329 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4330 (x86_insert_watchpoint, x86_remove_watchpoint)
4331 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4332 (x86_stopped_by_hw_breakpoint): New declarations.
4333 (x86_nat_target): New template class.
4335 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4336 (the_ppc_linux_nat_target): New.
4337 (ppc_linux_fetch_inferior_registers)
4338 (ppc_linux_can_use_hw_breakpoint)
4339 (ppc_linux_region_ok_for_hw_watchpoint)
4340 (ppc_linux_ranged_break_num_registers)
4341 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4342 (ppc_linux_insert_mask_watchpoint)
4343 (ppc_linux_remove_mask_watchpoint)
4344 (ppc_linux_can_accel_watchpoint_condition)
4345 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4346 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4347 (ppc_linux_watchpoint_addr_within_range)
4348 (ppc_linux_masked_watch_num_registers)
4349 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4350 (ppc_linux_read_description): Refactor as methods of
4351 ppc_linux_nat_target.
4352 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4354 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4355 (procfs_target): New class.
4356 (the_procfs_target): New.
4357 (procfs_target): Delete function.
4358 (procfs_auxv_parse, procfs_attach, procfs_detach)
4359 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4360 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4361 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4362 (procfs_create_inferior, procfs_update_thread_list)
4363 (procfs_thread_alive, procfs_pid_to_str)
4364 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4365 (procfs_stopped_data_address, procfs_insert_watchpoint)
4366 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4367 (proc_find_memory_regions, procfs_info_proc)
4368 (procfs_make_note_section): Refactor as methods of procfs_target.
4369 (_initialize_procfs): Adjust.
4370 * sol-thread.c (sol_thread_target): New class.
4371 (sol_thread_ops): Now a sol_thread_target.
4372 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4373 (sol_thread_fetch_registers, sol_thread_store_registers)
4374 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4375 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4376 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4377 (init_sol_thread_ops): Delete.
4378 (_initialize_sol_thread): Adjust. Remove references to
4379 init_sol_thread_ops and complete_target_initialization.
4381 * windows-nat.c (windows_nat_target): New class.
4382 (windows_fetch_inferior_registers)
4383 (windows_store_inferior_registers, windows_resume, windows_wait)
4384 (windows_attach, windows_detach, windows_pid_to_exec_file)
4385 (windows_files_info, windows_create_inferior)
4386 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4387 (windows_close, windows_pid_to_str, windows_xfer_partial)
4388 (windows_get_tib_address, windows_get_ada_task_ptid)
4389 (windows_thread_name, windows_thread_alive): Refactor as
4390 windows_nat_target methods.
4391 (do_initial_windows_stuff): Adjust.
4392 (windows_target): Delete function.
4393 (_initialize_windows_nat): Adjust.
4395 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4396 (darwin_mourn_inferior, darwin_kill_inferior)
4397 (darwin_create_inferior, darwin_attach, darwin_detach)
4398 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4399 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4400 (darwin_supports_multi_process): Refactor as darwin_nat_target
4402 (darwin_resume_to, darwin_files_info): Delete.
4403 (_initialize_darwin_inferior): Rename to ...
4404 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4405 * darwin-nat.h: Include "inf-child.h".
4406 (darwin_nat_target): New class.
4407 (darwin_complete_target): Delete.
4408 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4409 (darwin_target): New.
4410 (i386_darwin_fetch_inferior_registers)
4411 (i386_darwin_store_inferior_registers): Refactor as methods of
4413 (darwin_complete_target): Delete, with ...
4414 (_initialize_i386_darwin_nat): ... bits factored out here.
4416 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4417 (the_alpha_linux_nat_target): New.
4418 (alpha_linux_register_u_offset): Refactor as
4419 alpha_linux_nat_target method.
4420 (_initialize_alpha_linux_nat): Adjust.
4421 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4422 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4423 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4424 methods of linux_nat_trad_target.
4425 (linux_trad_target): Delete.
4426 * linux-nat-trad.h (linux_trad_target): Delete function.
4427 (linux_nat_trad_target): New class.
4428 * mips-linux-nat.c (mips_linux_nat_target): New class.
4429 (super_fetch_registers, super_store_registers, super_close):
4431 (the_mips_linux_nat_target): New.
4432 (mips64_linux_regsets_fetch_registers)
4433 (mips64_linux_regsets_store_registers)
4434 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4435 (mips_linux_register_u_offset, mips_linux_read_description)
4436 (mips_linux_can_use_hw_breakpoint)
4437 (mips_linux_stopped_by_watchpoint)
4438 (mips_linux_stopped_data_address)
4439 (mips_linux_region_ok_for_hw_watchpoint)
4440 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4441 (mips_linux_close): Refactor as methods of mips_linux_nat.
4442 (_initialize_mips_linux_nat): Adjust to C++ification.
4444 * aix-thread.c (aix_thread_target): New class.
4445 (aix_thread_ops): Now an aix_thread_target.
4446 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4447 (aix_thread_fetch_registers, aix_thread_store_registers)
4448 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4449 (aix_thread_thread_alive, aix_thread_pid_to_str)
4450 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4451 Refactor as methods of aix_thread_target.
4452 (init_aix_thread_ops): Delete.
4453 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4454 and complete_target_initialization.
4455 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4456 (rs6000_nat_target): New class.
4457 (the_rs6000_nat_target): New.
4458 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4459 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4460 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4461 (super_create_inferior): Delete.
4462 (_initialize_rs6000_nat): Adjust to C++ification.
4464 * arm-linux-nat.c (arm_linux_nat_target): New class.
4465 (the_arm_linux_nat_target): New.
4466 (arm_linux_fetch_inferior_registers)
4467 (arm_linux_store_inferior_registers, arm_linux_read_description)
4468 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4469 (arm_linux_remove_hw_breakpoint)
4470 (arm_linux_region_ok_for_hw_watchpoint)
4471 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4472 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4473 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4474 arm_linux_nat_target.
4475 (_initialize_arm_linux_nat): Adjust to C++ification.
4477 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4478 (the_aarch64_linux_nat_target): New.
4479 (aarch64_linux_fetch_inferior_registers)
4480 (aarch64_linux_store_inferior_registers)
4481 (aarch64_linux_child_post_startup_inferior)
4482 (aarch64_linux_read_description)
4483 (aarch64_linux_can_use_hw_breakpoint)
4484 (aarch64_linux_insert_hw_breakpoint)
4485 (aarch64_linux_remove_hw_breakpoint)
4486 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4487 (aarch64_linux_region_ok_for_hw_watchpoint)
4488 (aarch64_linux_stopped_data_address)
4489 (aarch64_linux_stopped_by_watchpoint)
4490 (aarch64_linux_watchpoint_addr_within_range)
4491 (aarch64_linux_can_do_single_step): Refactor as methods of
4492 aarch64_linux_nat_target.
4493 (super_post_startup_inferior): Delete.
4494 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4496 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4497 (the_hppa_linux_nat_target): New.
4498 (hppa_linux_fetch_inferior_registers)
4499 (hppa_linux_store_inferior_registers): Refactor as methods of
4500 hppa_linux_nat_target.
4501 (_initialize_hppa_linux_nat): Adjust to C++ification.
4503 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4504 (the_ia64_linux_nat_target): New.
4505 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4506 (ia64_linux_stopped_data_address)
4507 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4508 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4509 ia64_linux_nat_target methods.
4510 (super_xfer_partial): Delete.
4511 (_initialize_ia64_linux_nat): Adjust to C++ification.
4513 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4514 (the_m32r_linux_nat_target): New.
4515 (m32r_linux_fetch_inferior_registers)
4516 (m32r_linux_store_inferior_registers): Refactor as
4517 m32r_linux_nat_target methods.
4518 (_initialize_m32r_linux_nat): Adjust to C++ification.
4520 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4521 (the_m68k_linux_nat_target): New.
4522 (m68k_linux_fetch_inferior_registers)
4523 (m68k_linux_store_inferior_registers): Refactor as
4524 m68k_linux_nat_target methods.
4525 (_initialize_m68k_linux_nat): Adjust to C++ification.
4527 * s390-linux-nat.c (s390_linux_nat_target): New class.
4528 (the_s390_linux_nat_target): New.
4529 (s390_linux_fetch_inferior_registers)
4530 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4531 (s390_insert_watchpoint, s390_remove_watchpoint)
4532 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4533 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4534 (s390_auxv_parse, s390_read_description): Refactor as methods of
4535 s390_linux_nat_target.
4536 (_initialize_s390_nat): Adjust to C++ification.
4538 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4539 (the_sparc_linux_nat_target): New.
4540 (_initialize_sparc_linux_nat): Adjust to C++ification.
4541 * sparc-nat.c (sparc_fetch_inferior_registers)
4542 (sparc_store_inferior_registers): Remove target_ops parameter.
4543 * sparc-nat.h (sparc_fetch_inferior_registers)
4544 (sparc_store_inferior_registers): Remove target_ops parameter.
4545 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4546 (the_sparc64_linux_nat_target): New.
4547 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4549 * spu-linux-nat.c (spu_linux_nat_target): New class.
4550 (the_spu_linux_nat_target): New.
4551 (spu_child_post_startup_inferior, spu_child_post_attach)
4552 (spu_child_wait, spu_fetch_inferior_registers)
4553 (spu_store_inferior_registers, spu_xfer_partial)
4554 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4556 (_initialize_spu_nat): Adjust to C++ification.
4558 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4559 (the_tilegx_linux_nat_target): New.
4560 (fetch_inferior_registers, store_inferior_registers):
4561 Refactor as methods.
4562 (_initialize_tile_linux_nat): Adjust to C++ification.
4564 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4565 (the_xtensa_linux_nat_target): New.
4566 (xtensa_linux_fetch_inferior_registers)
4567 (xtensa_linux_store_inferior_registers): Refactor as
4568 xtensa_linux_nat_target methods.
4569 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4571 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4572 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4573 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4574 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4575 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4576 (fbsd_stopped_by_sw_breakpoint)
4577 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4578 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4579 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4580 (fbsd_post_startup_inferior, fbsd_post_attach)
4581 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4582 (fbsd_set_syscall_catchpoint)
4583 (super_xfer_partial, super_resume, super_wait)
4584 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4585 (fbsd_handle_debug_trap): Remove target_ops parameter.
4586 (fbsd_nat_add_target): Delete.
4587 * fbsd-nat.h: Include "inf-ptrace.h".
4588 (fbsd_nat_add_target): Delete.
4589 (USE_SIGTRAP_SIGINFO): Define.
4590 (fbsd_nat_target): New class.
4592 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4593 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4594 (amd64bsd_target): Delete.
4595 * amd64-bsd-nat.h: New file.
4596 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4598 (amd64_fbsd_nat_target): New class.
4599 (the_amd64_fbsd_nat_target): New.
4600 (amd64fbsd_read_description): Refactor as method of
4601 amd64_fbsd_nat_target.
4602 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4603 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4604 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4605 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4606 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4607 (i386bsd_target): Delete.
4608 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4609 (i386bsd_fetch_inferior_registers)
4610 (i386bsd_store_inferior_registers): Declare.
4611 (i386_bsd_nat_target): New class.
4612 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4613 (the_i386_fbsd_nat_target): New.
4614 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4615 i386_fbsd_nat_target methods.
4616 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4617 (_initialize_i386fbsd_nat): Adjust to C++ification.
4618 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4619 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4620 (_initialize_x86_bsd_nat): Adjust to C++ification.
4621 * x86-bsd-nat.h: Include "x86-nat.h".
4622 (x86bsd_target): Delete declaration.
4623 (x86bsd_nat_target): New class.
4625 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4626 (the_aarch64_fbsd_nat_target): New.
4627 (aarch64_fbsd_fetch_inferior_registers)
4628 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4629 aarch64_fbsd_nat_target.
4630 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4631 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4632 (the_alpha_bsd_nat_target): New.
4633 (alphabsd_fetch_inferior_registers)
4634 (alphabsd_store_inferior_registers): Refactor as
4635 alpha_bsd_nat_target methods.
4636 (_initialize_alphabsd_nat): Refactor as methods of
4637 alpha_bsd_nat_target.
4638 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4639 (the_amd64_nbsd_nat_target): New.
4640 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4641 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4642 (the_amd64_obsd_nat_target): New.
4643 (_initialize_amd64obsd_nat): Adjust to C++ification.
4644 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4645 (the_arm_fbsd_nat_target): New.
4646 (arm_fbsd_fetch_inferior_registers)
4647 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4648 (_initialize_arm_fbsd_nat): Refactor as methods of
4649 arm_fbsd_nat_target.
4650 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4651 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4652 (the_arm_netbsd_nat_target): New.
4653 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4654 arm_netbsd_nat_target.
4655 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4656 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4657 (the_hppa_nbsd_nat_target): New.
4658 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4659 hppa_nbsd_nat_target methods.
4660 (_initialize_hppanbsd_nat): Adjust to C++ification.
4661 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4662 (the_hppa_obsd_nat_target): New.
4663 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4664 methods of hppa_obsd_nat_target.
4665 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4667 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4668 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4670 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4671 (_initialize_i386obsd_nat): Use add_target.
4672 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4673 (the_m68k_bsd_nat_target): New.
4674 (m68kbsd_fetch_inferior_registers)
4675 (m68kbsd_store_inferior_registers): Refactor as methods of
4676 m68k_bsd_nat_target.
4677 (_initialize_m68kbsd_nat): Adjust to C++ification.
4678 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4679 (the_mips_fbsd_nat_target): New.
4680 (mips_fbsd_fetch_inferior_registers)
4681 (mips_fbsd_store_inferior_registers): Refactor as methods of
4682 mips_fbsd_nat_target.
4683 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4685 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4686 (the_mips_nbsd_nat_target): New.
4687 (mipsnbsd_fetch_inferior_registers)
4688 (mipsnbsd_store_inferior_registers): Refactor as methods of
4689 mips_nbsd_nat_target.
4690 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4691 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4692 (the_mips64_obsd_nat_target): New.
4693 (mips64obsd_fetch_inferior_registers)
4694 (mips64obsd_store_inferior_registers): Refactor as methods of
4695 mips64_obsd_nat_target.
4696 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4698 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4700 * nbsd-nat.h: Include "inf-ptrace.h".
4701 (nbsd_nat_target): New class.
4702 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4703 (obsd_wait): Refactor as methods of obsd_nat_target.
4704 (obsd_add_target): Delete.
4705 * obsd-nat.h: Include "inf-ptrace.h".
4706 (obsd_nat_target): New class.
4707 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4708 (the_ppc_fbsd_nat_target): New.
4709 (ppcfbsd_fetch_inferior_registers)
4710 (ppcfbsd_store_inferior_registers): Refactor as methods of
4711 ppc_fbsd_nat_target.
4712 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4714 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4715 (the_ppc_nbsd_nat_target): New.
4716 (ppcnbsd_fetch_inferior_registers)
4717 (ppcnbsd_store_inferior_registers): Refactor as methods of
4718 ppc_nbsd_nat_target.
4719 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4720 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4721 (the_ppc_obsd_nat_target): New.
4722 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4723 methods of ppc_obsd_nat_target.
4724 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4726 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4727 (the_sh_nbsd_nat_target): New.
4728 (shnbsd_fetch_inferior_registers)
4729 (shnbsd_store_inferior_registers): Refactor as methods of
4731 (_initialize_shnbsd_nat): Adjust to C++ification.
4732 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4733 (inf_ptrace_xfer_partial): Delete.
4734 (sparc_xfer_partial, sparc_target): Delete.
4735 * sparc-nat.h (sparc_fetch_inferior_registers)
4736 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4737 (sparc_target): Delete function declaration.
4738 (sparc_target): New template class.
4739 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4740 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4741 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4742 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4744 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4745 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4746 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4747 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4749 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4750 (the_vax_bsd_nat_target): New.
4751 (vaxbsd_fetch_inferior_registers)
4752 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4754 (_initialize_vaxbsd_nat): Adjust to C++ification.
4756 * bsd-kvm.c (bsd_kvm_target): New class.
4757 (bsd_kvm_ops): Now a bsd_kvm_target.
4758 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4759 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4760 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4762 (bsd_kvm_return_one): Delete.
4763 (bsd_kvm_add_target): Adjust to C++ification.
4765 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4766 (nto_procfs_target_procfs): New classes.
4767 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4768 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4769 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4770 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4771 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4772 (procfs_remove_hw_breakpoint, procfs_resume)
4773 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4774 (procfs_kill_inferior, procfs_store_registers)
4775 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4776 as methods of nto_procfs_target.
4777 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4778 (nto_native_ops): Delete.
4779 (procfs_open, procfs_native_open): Delete.
4780 (nto_native_ops): Now an nto_procfs_target_native.
4781 (init_procfs_targets): Adjust to C++ification.
4782 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4783 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4784 Refactor as methods of nto_procfs_target.
4786 * go32-nat.c (go32_nat_target): New class.
4787 (the_go32_nat_target): New.
4788 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4789 (go32_store_registers, go32_xfer_partial, go32_files_info)
4790 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4791 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4792 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4793 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4794 (go32_target): Delete.
4795 (_initialize_go32_nat): Adjust to C++ification.
4797 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4798 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4799 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4800 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4802 (gnu_target): Delete.
4803 * gnu-nat.h (gnu_target): Delete.
4804 (gnu_nat_target): New class.
4805 * i386-gnu-nat.c (gnu_base_target): New.
4806 (i386_gnu_nat_target): New class.
4807 (the_i386_gnu_nat_target): New.
4808 (_initialize_i386gnu_nat): Adjust to C++ification.
4810 2018-05-02 Pedro Alves <palves@redhat.com>
4812 * bfd-target.c (target_bfd_xclose): Rename to ...
4813 (target_bfd_close): ... this.
4814 (target_bfd_reopen): Adjust.
4815 * target.c (target_close): Remove references to to_xclose.
4816 * target.h (target_ops::to_xclose): Delete.
4817 (target_ops::to_close): Update comments.
4819 2018-05-02 Pedro Alves <palves@redhat.com>
4821 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4823 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4824 * inf-ptrace.c (inf_ptrace_register_u_offset)
4825 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4826 (inf_ptrace_store_register, inf_ptrace_store_registers)
4827 (inf_ptrace_trad_target): Move to ...
4828 * linux-nat-trad.c: ... this new file.
4829 * linux-nat-trad.h: New file.
4830 * linux-nat.c (linux_target_install_ops): Make extern.
4831 (linux_trad_target): Delete.
4832 * linux-nat.h (linux_trad_target): Delete declaration.
4833 (linux_target_install_ops): Declare.
4834 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4837 2018-05-02 Pedro Alves <palves@redhat.com>
4839 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4840 procfs_target/add_target here.
4841 * procfs.c (procfs_target): Make static.
4842 (_initialize_procfs): Call add_target here.
4843 * procfs.h (struct target_ops): Remove forward declaration.
4844 (procfs_target): Remove declaration.
4845 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4847 2018-05-02 Pedro Alves <palves@redhat.com>
4849 * procfs.c (procfs_stopped_by_watchpoint)
4850 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4851 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4853 (procfs_use_watchpoints): Delete, move contents...
4854 (procfs_target): ... here.
4855 * procfs.h (procfs_use_watchpoints): Delete declaration.
4856 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4857 procfs_use_watchpoints.
4858 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4859 procfs_use_watchpoints.
4861 2018-05-02 Tom Tromey <tom@tromey.com>
4864 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4865 and var_zuinteger_unlimited.
4866 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4867 and PARAM_ZUINTEGER_UNLIMITED.
4868 (set_parameter_value): Handle var_zuinteger and
4869 var_zuinteger_unlimited.
4870 (add_setshow_generic): Likewise.
4871 (parmpy_init): Likewise.
4873 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4876 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4877 pointer is not null before dereferencing it.
4879 2018-04-30 Tom Tromey <tom@tromey.com>
4881 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4884 2018-04-30 Tom Tromey <tom@tromey.com>
4886 * breakpoint.c (mention): Remove use of is_mi_like_p.
4887 (print_mention_ranged_breakpoint): Likewise.
4888 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4891 2018-04-30 Tom Tromey <tom@tromey.com>
4893 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
4895 2018-04-30 Tom Tromey <tom@tromey.com>
4897 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4898 (info_spu_event_command): Remove some uses of is_mi_like_p.
4900 2018-04-30 Tom Tromey <tom@tromey.com>
4902 * python/py-framefilter.c (py_print_single_arg)
4903 (enumerate_locals, py_print_args, py_print_frame): Remove some
4904 uses of is_mi_like_p.
4906 2018-04-30 Tom Tromey <tom@tromey.com>
4909 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4910 * ui-out.h (ui_out::is_mi_like_p): Now const.
4911 (ui_out::do_is_mi_like_p): Now const.
4912 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4914 2018-04-30 Tom Tromey <tom@tromey.com>
4916 * varobj.c (varobj_set_visualizer): Use new_reference.
4917 * python/python.c (gdbpy_decode_line): Use new_reference.
4918 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4921 2018-04-30 Tom Tromey <tom@tromey.com>
4923 * varobj.c (install_new_value): Use new_reference.
4924 * value.h (value_incref): Return void. Swap intro comment with
4926 * value.c (set_value_parent): Use new_reference.
4927 (value_incref): Return void. Update intro comment.
4928 (release_value): Use new_reference.
4929 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4931 2018-04-30 Tom Tromey <tom@tromey.com>
4933 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4934 * gdb_bfd.h (new_bfd_ref): Remove.
4935 (gdb_bfd_open): Update comment.
4936 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4937 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4938 (gdb_bfd_fdopenr): Use new_reference.
4939 * exec.c (exec_file_attach): Use new_reference.
4941 2018-04-30 Tom Tromey <tom@tromey.com>
4943 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4946 2018-04-30 Tom Tromey <tom@tromey.com>
4948 * jit.c (jit_read_code_entry): Use type_align.
4949 * i386-tdep.c (i386_gdbarch_init): Don't call
4950 set_gdbarch_long_long_align_bit.
4951 * gdbarch.sh: Remove long_long_align_bit.
4952 * gdbarch.c, gdbarch.h: Rebuild.
4953 * arc-tdep.c (arc_type_align): New function.
4954 (arc_gdbarch_init): Use arc_type_align. Don't call
4955 set_gdbarch_long_long_align_bit.
4957 2018-04-30 Tom Tromey <tom@tromey.com>
4959 * rust-lang.c (rust_type_alignment): Remove.
4960 (rust_composite_type): Use type_align.
4962 2018-04-30 Tom Tromey <tom@tromey.com>
4964 * NEWS: Mention Type.align.
4965 * python/py-type.c (typy_get_alignof): New function.
4966 (type_object_getset): Add "alignof".
4968 2018-04-30 Tom Tromey <tom@tromey.com>
4972 * std-operator.def (UNOP_ALIGNOF): New operator.
4973 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4975 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4976 * c-lang.c (c_op_print_tab): Add alignof.
4977 * c-exp.y (ALIGNOF): New token.
4978 (exp): Add "ALIGNOF" production.
4979 (ident_tokens): Add _Alignof and alignof.
4981 2018-04-30 Tom Tromey <tom@tromey.com>
4983 * i386-tdep.c (i386_type_align): New function.
4984 (i386_gdbarch_init): Update.
4985 * gdbarch.sh (type_align): New method.
4986 * gdbarch.c, gdbarch.h: Rebuild.
4987 * arch-utils.h (default_type_align): Declare.
4988 * arch-utils.c (default_type_align): New function.
4989 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4990 (struct type) <align_log2>: New field.
4991 <instance_flags>: Now a bitfield.
4992 (TYPE_RAW_ALIGN): New macro.
4993 (type_align, type_raw_align, set_type_align): Declare.
4994 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4996 * dwarf2read.c (quirk_rust_enum): Set type alignment.
4997 (get_alignment, maybe_set_alignment): New functions.
4998 (read_structure_type, read_enumeration_type, read_array_type)
4999 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5000 (read_subrange_type, read_base_type): Set type alignment.
5002 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5004 * dwarf2read.c (read_index_from_section): Use bool.
5006 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5009 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5012 2018-04-29 John Reiser <jreiser@BitWagon.com>
5015 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5016 last step, and do it atomically.
5018 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5020 * compile/compile-c-types.c (convert_int, convert_float):
5023 2018-04-27 Tom Tromey <tom@tromey.com>
5026 * rust-lang.c (rust_inclusive_range_type_p): New function.
5027 (rust_range): Handle inclusive ranges.
5028 (rust_compute_range): Likewise.
5029 * rust-exp.y (struct rust_op) <inclusive>: New field.
5030 (DOTDOTEQ): New constant.
5031 (range_expr): Add "..=" productions.
5032 (operator_tokens): Add "..=" token.
5033 (ast_range): Add "inclusive" parameter.
5034 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5036 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5038 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5039 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5041 * expprint.c (print_subexp_standard): Handle new bounds values.
5042 (dump_subexp_body_standard): Likewise.
5044 2018-04-27 Tom Tromey <tom@tromey.com>
5046 * configure: Rebuild.
5047 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5048 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5050 (class symbol_needs_eval_context): Likewise.
5051 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5052 (mock_mapped_index::symbol_name_at): Use "override". Remove
5054 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5056 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5057 * aarch64-tdep.c (instruction_reader::read): Use "override".
5058 (instruction_reader_test::read): Likewise.
5059 * arm-tdep.c (instruction_reader::read): Use "override".
5060 (instruction_reader_thumb::read): Likewise.
5062 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5065 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5066 instead of remote_send.
5067 (remote_send): Remove.
5069 2018-04-26 Pedro Alves <palves@redhat.com>
5071 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5072 find_function_start_sal instead of find_pc_line.
5074 2018-04-26 Pedro Alves <palves@redhat.com>
5076 * breakpoint.c (set_breakpoint_location_function): Handle
5078 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5079 * elfread.c (elf_symtab_read): Give data symbols with
5080 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5081 (elf_rel_plt_read): Update comment.
5082 * linespec.c (convert_linespec_to_sals): Handle
5084 (minsym_found): Handle mst_data_gnu_ifunc.
5085 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5086 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5087 * parse.c (find_minsym_type_and_address): Handle
5089 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5090 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5091 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5093 <mst_data_gnu_ifunc>: New enumerator.
5095 2018-04-26 Pedro Alves <palves@redhat.com>
5097 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5098 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5099 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5101 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5102 (lookup_minimal_symbol_by_pc): Adjust.
5103 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5104 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5105 * minsyms.h (lookup_msym_prefer): New enum.
5106 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5107 parameter by a lookup_msym_prefer parameter.
5109 2018-04-26 Pedro Alves <palves@redhat.com>
5111 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5112 ends in "@plt" instead of looking at the symbol's section.
5114 2018-04-26 Pedro Alves <palves@redhat.com>
5116 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5118 (find_pc_partial_function_gnu_ifunc): Rename to ...
5119 (find_pc_partial_function): ... this, and remove references to
5121 (find_pc_partial_function): Delete old implementation.
5122 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5124 2018-04-26 Pedro Alves <palves@redhat.com>
5126 * linespec.c (struct bound_minimal_symbol_search_key): New.
5127 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5128 skip first line if we found a GNU ifunc minimal symbol by name.
5129 (compare_msymbols): Change parameters to work with a destructured
5131 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5134 2018-04-26 Pedro Alves <palves@redhat.com>
5136 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5137 ifunc targets here. Instead, if we have an ifunc minsym, use its
5139 (add_location_to_breakpoint): Store the minsym and the objfile in
5140 the breakpoint location.
5141 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5142 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5143 Record the minsym in the sal.
5144 * symtab.h (symtab_and_line) <msymbol>: New field.
5146 2018-04-26 Pedro Alves <palves@redhat.com>
5148 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5149 unless we actually resolved the ifunc.
5151 2018-04-26 Pedro Alves <palves@redhat.com>
5153 * c-exp.y (variable production): Prefer ifunc minsyms over
5154 regular function symbols.
5155 * symtab.c (find_gnu_ifunc): New function.
5156 * minsyms.h (lookup_msym_prefer): New enum.
5157 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5158 parameter by a lookup_msym_prefer parameter.
5159 * symtab.h (find_gnu_ifunc): New declaration.
5161 2018-04-26 Pedro Alves <palves@redhat.com>
5163 * blockframe.c (find_gnu_ifunc_target_type): New function.
5164 (find_function_type): New.
5165 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5166 return a value with a memory address.
5167 (eval_call): For calls to GNU ifunc functions, try to find the
5168 type of the target function from the type that the resolver
5170 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5172 * infcall.c (find_function_return_type): Delete.
5173 (find_function_addr): Add 'function_type' parameter. For calls to
5174 GNU ifunc functions, try to find the type of the target function
5175 from the type that the resolver returns, and return it via
5177 (call_function_by_hand_dummy): Adjust to use the function type
5178 returned by find_function_addr.
5179 (find_function_addr): Add 'function_type' parameter and move
5181 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5184 2018-04-26 Pedro Alves <palves@redhat.com>
5186 * c-exp.y (variable production): Skip finding an alias for ifunc
5189 2018-04-26 Pedro Alves <palves@redhat.com>
5191 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5193 2018-04-25 Pedro Alves <palves@redhat.com>
5195 * infcmd.c (kill_command): Print the pid as string, not the whole
5196 thread's ptid. Add comment. s/has been killed/killed/ in output
5198 * remote.c (remote_detach_1): Print the pid as string, not the
5199 whole thread's ptid.
5201 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5202 Sergio Durigan Junior <sergiodj@redhat.com>
5203 Pedro Alves <palves@redhat.com>
5205 * infcmd.c (kill_command): Print message when inferior has
5207 * inferior.c (print_inferior_events): Remove 'static'. Set as
5209 (add_inferior): Improve message printed when
5210 'print_inferior_events' is on.
5211 (exit_inferior): Remove message printed when
5212 'print_inferior_events' is on.
5213 (detach_inferior): Improve message printed when
5214 'print_inferior_events' is on.
5215 (initialize_inferiors): Use 'add_inferior_silent' to set
5216 'current_inferior_'.
5217 * inferior.h (print_inferior_events): Declare here as
5219 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5220 '[Detaching...]' messages when 'print_inferior_events' is on.
5221 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5222 as prefix/suffix for messages. Remove periods. Fix erroneous
5223 'Detaching after fork from child...', replace it by '... from
5225 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5226 prefix/suffix when printing 'Detaching...' messages. Print
5227 them when 'print_inferior_events' is on.
5228 * remote.c (remote_detach_1): Print message when detaching
5229 from inferior and '!is_fork_parent'.
5231 2018-04-24 Tom Tromey <tom@tromey.com>
5233 * cli-out.h: Reindent.
5235 2018-04-24 Tom Tromey <tom@tromey.com>
5237 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5238 (cli_ui_out::do_field_string): Use fputs_filtered.
5239 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5241 2018-04-23 Tom Tromey <tom@tromey.com>
5243 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5244 gdb::unique_xmalloc_ptr.
5246 2018-04-23 Tom Tromey <tom@tromey.com>
5248 * configure: Rebuild.
5250 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5253 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5254 prepare_for_testing. Set normal_bp to r_debug_state if target
5257 2018-04-21 Pedro Alves <palves@redhat.com>
5258 Rajendra SY <rajendra.sy@gmail.com>
5260 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5261 * remote.c (extended_remote_attach): In all-stop mode, mark the
5262 thread as executing.
5264 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5266 * thread.c (thread_apply_all_command): Fix comment.
5267 (thread_command): Fix comment.
5269 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5271 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5273 * features/aarch64-core.c (create_feature_aarch64_core):
5275 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5277 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5279 * features/i386/32bit-avx512.c
5280 (create_feature_i386_32bit_avx512): Likewise.
5281 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5283 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5285 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5287 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5289 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5291 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5293 * features/i386/64bit-avx512.c
5294 (create_feature_i386_64bit_avx512): Likewise.
5295 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5297 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5299 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5301 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5303 * features/i386/64bit-segments.c
5304 (create_feature_i386_64bit_segments): Likewise.
5305 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5307 * features/i386/x32-core.c
5308 (create_feature_i386_x32_core): Likewise.
5309 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5310 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5311 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5312 * target-descriptions.c: In generated code, don't pass xml
5315 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5317 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5318 (print_xml_feature::visit_post): Likewise.
5319 (print_xml_feature::visit): Likewise.
5320 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5321 (print_xml_feature): Add new class.
5322 * regformats/regdat.sh: Null xmltarget on feature targets.
5323 * target-descriptions.c (struct target_desc): Add xmltarget.
5324 (maintenance_check_tdesc_xml_convert): Add unittest function.
5325 (tdesc_get_features_xml): Add function to get xml.
5326 (maintenance_check_xml_descriptions): Test xml generation.
5327 * xml-tdesc.c (string_read_description_xml): Add function.
5328 * xml-tdesc.h (string_read_description_xml): Add declaration.
5330 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5332 * features/Makefile: Add feature marker to targets with new style
5333 target descriptions.
5334 * regformats/aarch64.dat: Regenerate.
5335 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5336 * regformats/i386/amd64-avx-linux.dat: Likewise.
5337 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5338 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5339 * regformats/i386/amd64-linux.dat: Likewise.
5340 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5341 * regformats/i386/amd64.dat: Likewise.
5342 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5343 * regformats/i386/i386-avx-linux.dat: Likewise.
5344 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5345 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5346 * regformats/i386/i386-linux.dat: Likewise.
5347 * regformats/i386/i386-mmx-linux.dat: Likewise.
5348 * regformats/i386/i386-mpx-linux.dat: Likewise.
5349 * regformats/i386/i386.dat: Likewise.
5350 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5351 * regformats/i386/x32-avx-linux.dat: Likewise.
5352 * regformats/i386/x32-linux.dat: Likewise.
5353 * regformats/tic6x-c62x-linux.dat: Likewise.
5354 * regformats/tic6x-c64x-linux.dat: Likewise.
5355 * regformats/tic6x-c64xp-linux.dat: Likewise.
5356 * regformats/regdat.sh: Parse feature marker.
5358 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5360 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5361 (tdesc_osabi_name): Likewise.
5362 * target-descriptions.c (tdesc_architecture_name): Add new
5364 (tdesc_osabi_name): Likewise.
5366 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5368 * common/tdesc.c (tdesc_predefined_type): Move to here.
5369 (tdesc_named_type): Likewise.
5370 (tdesc_create_vector): Likewise.
5371 (tdesc_create_struct): Likewise.
5372 (tdesc_set_struct_size): Likewise.
5373 (tdesc_create_union): Likewise.
5374 (tdesc_create_flags): Likewise.
5375 (tdesc_create_enum): Likewise.
5376 (tdesc_add_field): Likewise.
5377 (tdesc_add_typed_bitfield): Likewise.
5378 (tdesc_add_bitfield): Likewise.
5379 (tdesc_add_flag): Likewise.
5380 (tdesc_add_enum_value): Likewise.
5381 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5382 (struct tdesc_type_vector): Likewise.
5383 (struct tdesc_type_field): Likewise.
5384 (struct tdesc_type_with_fields): Likewise.
5385 (tdesc_create_enum): Add declaration.
5386 (tdesc_add_typed_bitfield): Likewise.
5387 (tdesc_add_enum_value): Likewise.
5388 * target-descriptions.c (tdesc_type_field): Move from here.
5389 (tdesc_type_builtin): Likewise.
5390 (tdesc_type_vector): Likewise.
5391 (tdesc_type_with_fields): Likewise.
5392 (tdesc_predefined_types): Likewise.
5393 (tdesc_named_type): Likewise.
5394 (tdesc_create_vector): Likewise.
5395 (tdesc_create_struct): Likewise.
5396 (tdesc_set_struct_size): Likewise.
5397 (tdesc_create_union): Likewise.
5398 (tdesc_create_flags): Likewise.
5399 (tdesc_create_enum): Likewise.
5400 (tdesc_add_field): Likewise.
5401 (tdesc_add_typed_bitfield): Likewise.
5402 (tdesc_add_bitfield): Likewise.
5403 (tdesc_add_flag): Likewise.
5404 (tdesc_add_enum_value): Likewise.
5405 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5406 (tdesc_add_typed_bitfield): Likewise.
5407 (tdesc_add_enum_value): Likewise.
5409 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5411 * common/tdesc.c (tdesc_feature::accept): Move to here.
5412 (tdesc_feature::operator==): Likewise.
5413 (tdesc_create_reg): Likewise.
5414 * common/tdesc.h (tdesc_type_kind): Likewise.
5415 (struct tdesc_type): Likewise.
5416 (struct tdesc_feature): Likewise.
5417 * regformats/regdat.sh: Create a feature.
5418 * target-descriptions.c (tdesc_type_kind): Move from here.
5419 (tdesc_type): Likewise.
5420 (tdesc_type_up): Likewise.
5421 (tdesc_feature): Likewise.
5422 (tdesc_create_reg): Likewise.
5424 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5426 * Makefile.in: Add arch/tdesc.c
5427 * common/tdesc.c: New file.
5428 * common/tdesc.h (tdesc_element_visitor): Move to here.
5429 (tdesc_element): Likewise.
5430 (tdesc_reg): Likewise.
5431 (tdesc_reg_up): Likewise.
5432 * regformats/regdef.h (reg): Add offset to constructors.
5433 * target-descriptions.c (tdesc_element_visitor): Move from here.
5434 (tdesc_element): Likewise.
5435 (tdesc_reg): Likewise.
5436 (tdesc_reg_up): Likewise.
5438 2018-04-17 Tom Tromey <tom@tromey.com>
5440 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5443 2018-04-17 Tom Tromey <tom@tromey.com>
5445 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5447 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5449 * symtab.c (print_symbol_info): Skip printing filename and line
5450 number when `last' is NULL.
5451 (symtab_symbol_info): Use empty string instead of NULL for first
5452 invocation of print_symbol_info.
5453 (rbreak_command): Pass NULL to `last' parameter of
5456 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5458 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5461 2018-04-16 Pedro Alves <palves@redhat.com>
5463 * MAINTAINERS (sh): Remove.
5464 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5465 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5466 (ALLDEPFILES): Remove sh64-tdep.c.
5467 * NEWS: Mentions that support for SH-5/SH64 is removed.
5468 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5469 (sh*-*-openbsd*): Ditto.
5470 (sh64-*-elf*): Remove.
5472 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5473 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5474 * sh-tdep.c: No longer include "sh64-tdep.h".
5475 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5476 * sh64-tdep.c, sh64-tdep.h: Remove files.
5478 2018-04-16 Pedro Alves <palves@redhat.com>
5480 * MAINTAINERS: Remove m88k.
5481 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5482 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5483 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5484 * NEWS: Mention that support for m88k was removed.
5485 * configure.host (m88*-*-*): Remove support.
5486 * configure.nat (m88k-*-*): Remove support.
5487 * configure.tgt (m88*-*-openbsd*): Remove.
5488 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5490 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5492 * configure.tgt (x86_tobjs): New variable.
5493 (amd64_tobjs, i386_tobjs): Use it.
5495 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5497 * symtab.c (print_symbol_info): Precede the symbol definition by
5498 the line number when available.
5499 * NEWS: Advertise this enhancement.
5501 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5503 * NEWS (New options): announce set/show record btrace cpu.
5504 * btrace.c: Include record-btrace.h.
5505 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5506 the vendor is unknown.
5507 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5508 Maybe overwrite the btrace configuration's cpu.
5509 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5510 (btrace_fetch): Add cpu parameter. Update callers.
5511 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5512 Maybe overwrite the btrace configuration's cpu. Skip enabling
5513 errata workarounds if the vendor is unknown.
5514 * python/py-record-btrace.c: Include record-btrace.h.
5515 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5516 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5517 * record-btrace.c (record_btrace_cpu_state_kind): New.
5518 (record_btrace_cpu): New.
5519 (set_record_btrace_cpu_cmdlist): New.
5520 (record_btrace_get_cpu): New.
5521 (require_btrace_thread, record_btrace_info)
5522 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5523 (cmd_set_record_btrace_cpu_none): New.
5524 (cmd_set_record_btrace_cpu_auto): New.
5525 (cmd_set_record_btrace_cpu): New.
5526 (cmd_show_record_btrace_cpu): New.
5527 (_initialize_record_btrace): Initialize set/show record btrace cpu
5529 * record-btrace.h (record_btrace_get_cpu): New.
5531 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5533 * record.c (set_record_command): Fix typo in message.
5535 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5537 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5539 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5541 * infrun.c (process_event_stop_test): Call
5542 gdbarch_in_indirect_branch_thunk.
5543 * gdbarch.sh (in_indirect_branch_thunk): New.
5544 * gdbarch.c: Regenerated.
5545 * gdbarch.h: Regenerated.
5548 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5549 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5550 (ALLDEPFILES): Add x86-tdep.c.
5551 * arch-utils.h (default_in_indirect_branch_thunk): New.
5552 * arch-utils.c (default_in_indirect_branch_thunk): New.
5553 * i386-tdep: Include x86-tdep.h.
5554 (i386_in_indirect_branch_thunk): New.
5555 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5557 * amd64-tdep: Include x86-tdep.h.
5558 (amd64_in_indirect_branch_thunk): New.
5559 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5561 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5564 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5565 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5566 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5569 2018-04-12 Tom Tromey <tom@tromey.com>
5571 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5572 (rust_evaluate_subexp): Likewise.
5574 2018-04-12 Pedro Alves <palves@redhat.com>
5576 * procfs.c (procfs_detach): Make forward declaration's prototype
5577 match definition's protototype.
5578 (proc_get_LDT_entry): Remove stale do_cleanups call.
5580 2018-04-12 Pedro Alves <palves@redhat.com>
5582 * target.h (target_ops::to_has_exited): Delete.
5583 (target_has_exited): Delete.
5584 * target-delegates.c: Regenerate.
5586 2018-04-11 Pedro Alves <palves@redhat.com>
5588 * target.c (fileio_fh_t::t): Add comment.
5589 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5590 (target_fileio_close): Handle a NULL target.
5591 (invalidate_fileio_fh): New.
5592 (target_close): Call it.
5593 * remote.c (remote_hostio_send_command): No longer check whether
5594 remote_desc is open.
5596 2018-04-11 Pedro Alves <palves@redhat.com>
5598 * target.c (fileio_fh_t): Make it a named struct instead of a
5600 (fileio_fh_t::is_closed): New method.
5601 (DEF_VEC_O (fileio_fh_t)): Remove.
5602 (fileio_fhandles): Now a std::vector.
5603 (is_closed_fileio_fh): Delete.
5604 (acquire_fileio_fd): Adjust. Rename parameters.
5605 (release_fileio_fd): Adjust.
5606 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5607 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5608 (target_fileio_close): Adjust.
5610 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5612 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5615 2018-04-10 Pedro Alves <palves@redhat.com>
5617 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5618 (scoped_finish_thread_state): New class.
5619 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5621 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5622 (fetch_inferior_event, normal_stop): Likewise.
5623 * thread.c (finish_thread_state_cleanup): Delete.
5625 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5626 Pedro Alves <palves@redhat.com>
5628 * value.c: Include "selftest.h" and "common/array-view.h".
5629 (struct range) <operator ==>: New.
5630 (test_ranges_contain): New.
5631 (check_ranges_vector): New.
5632 (test_insert_into_bit_range_vector): New.
5633 (_initialize_values): Register selftests.
5634 * common/array-view.h (operator==, operator!=): New.
5636 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5638 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5640 * inline-frame.c: Include <algorithm>.
5641 (struct inline_state): Add constructor.
5642 (inline_state_s): Remove.
5643 (DEF_VEC_O(inline_state_s)): Remove.
5644 (inline_states): Change type to std::vector.
5645 (find_inline_frame_state): Adjust to std::vector.
5646 (allocate_inline_frame_state): Remove.
5647 (clear_inline_frame_state): Adjust to std::vector.
5648 (skip_inline_frames): Adjust to std::vector.
5650 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5652 * tracepoint.h (struct trace_state_variable): Add constructor.
5653 <name>: Change type to std::string.
5654 * tracepoint.c (tsv_s): Remove.
5655 (DEF_VEC_O(tsv_s)): Remove.
5656 (tvariables): Change to std::vector.
5657 (create_trace_state_variable): Adjust to std::vector.
5658 (find_trace_state_variable): Likewise.
5659 (find_trace_state_variable_by_number): Likewise.
5660 (delete_trace_state_variable): Likewise.
5661 (trace_variable_command): Adjust to std::string.
5662 (delete_trace_variable_command): Likewise.
5663 (tvariables_info_1): Adjust to std::vector.
5664 (save_trace_state_variables): Likewise.
5665 (start_tracing): Likewise.
5666 (merge_uploaded_trace_state_variables): Adjust to std::vector
5668 * target.h (struct target_ops)
5669 <to_download_trace_state_variable>: Pass reference to
5670 trace_state_variable.
5671 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5672 * target-delegates.c: Re-generate.
5673 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5674 (mi_tsv_deleted): Likewise.
5675 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5676 * remote.c (remote_download_trace_state_variable): Change
5677 pointer to reference and adjust.
5678 * make-target-delegates (parse_argtypes): Handle references.
5679 (write_function_header): Likewise.
5680 (munge_type): Likewise.
5682 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5684 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5685 string_view-selftests.c.
5686 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5688 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5689 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5690 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5691 * unittests/basic_string_view/element_access/char/1.cc:
5693 * unittests/basic_string_view/element_access/char/empty.cc:
5695 * unittests/basic_string_view/element_access/char/front_back.cc:
5697 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5698 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5700 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5702 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5704 * unittests/basic_string_view/operations/compare/char/1.cc:
5706 * unittests/basic_string_view/operations/compare/char/13650.cc:
5708 * unittests/basic_string_view/operations/copy/char/1.cc:
5710 * unittests/basic_string_view/operations/data/char/1.cc:
5712 * unittests/basic_string_view/operations/find/char/1.cc:
5714 * unittests/basic_string_view/operations/find/char/2.cc:
5716 * unittests/basic_string_view/operations/find/char/3.cc:
5718 * unittests/basic_string_view/operations/find/char/4.cc:
5720 * unittests/basic_string_view/operations/rfind/char/1.cc:
5722 * unittests/basic_string_view/operations/rfind/char/2.cc:
5724 * unittests/basic_string_view/operations/rfind/char/3.cc:
5726 * unittests/basic_string_view/operations/substr/char/1.cc:
5728 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5729 * unittests/string_view-selftests.c: New file.
5731 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5733 * unittests/basic_string_view/capacity/1.cc: New file.
5734 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5735 * unittests/basic_string_view/cons/char/1.cc: New file.
5736 * unittests/basic_string_view/cons/char/2.cc: New file.
5737 * unittests/basic_string_view/cons/char/3.cc: New file.
5738 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5739 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5740 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5741 * unittests/basic_string_view/element_access/char/1.cc: New file.
5742 * unittests/basic_string_view/element_access/char/2.cc: New file.
5743 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5744 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5745 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5746 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5747 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5748 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5749 * unittests/basic_string_view/include.cc: New file.
5750 * unittests/basic_string_view/inserters/char/1.cc: New file.
5751 * unittests/basic_string_view/inserters/char/2.cc: New file.
5752 * unittests/basic_string_view/inserters/char/3.cc: New file.
5753 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5754 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5755 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5756 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5757 * unittests/basic_string_view/literals/types.cc: New file.
5758 * unittests/basic_string_view/literals/values.cc: New file.
5759 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5760 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5761 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5762 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5763 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5764 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5765 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5766 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5767 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5768 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5769 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5770 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5771 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5772 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5773 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5774 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5775 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5776 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5777 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5778 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5779 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5780 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5781 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5782 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5783 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5784 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5785 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5786 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5787 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5788 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5789 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5790 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5791 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5792 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5793 * unittests/basic_string_view/operators/char/2.cc: New file.
5794 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5795 * unittests/basic_string_view/range_access/char/1.cc: New file.
5796 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5797 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5798 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5799 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5800 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5801 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5802 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5803 * unittests/basic_string_view/typedefs.cc: New file.
5804 * unittests/basic_string_view/types/1.cc: New file.
5806 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5808 * common/gdb_string_view.h: Remove libstdc++ implementation
5809 details, adjust to gdb reality.
5810 * common/gdb_string_view.tcc: Likewise.
5811 * cli/cli-script.c (struct string_view): Remove.
5812 (user_args) <m_args>: Change element type to gdb::string_view.
5813 (user_args::insert_args): Adjust.
5815 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5817 * common/gdb_string_view.h: New file.
5818 * common/gdb_string_view.tcc: New file.
5820 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5822 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5823 * configure: Re-generate.
5825 2018-04-09 Pedro Alves <palves@redhat.com>
5827 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5828 (set_target_gdbarch): Call
5829 gdb::observers::architecture_changed.notify instead of
5830 observer_notify_architecture_changed.
5832 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5834 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5835 (do_restore_current_traceframe_cleanup): Remove.
5836 (restore_current_traceframe_cleanup_dtor): Remove.
5837 (make_cleanup_restore_current_traceframe): Remove.
5838 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5840 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5841 * infrun.c (fetch_inferior_event): Use
5842 scoped_restore_current_traceframe.
5844 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5846 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5848 <n_allocated_type_units>: Remove.
5849 <all_type_units>: Change to std::vector.
5850 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5851 to std::vector change.
5852 (dwarf2_per_objfile::get_cutu): Likewise.
5853 (dwarf2_per_objfile::get_tu): Likewise.
5854 (create_signatured_type_table_from_index): Likewise.
5855 (create_signatured_type_table_from_debug_names): Likewise.
5856 (dw2_symtab_iter_next): Likewise.
5857 (dw2_print_stats): Likewise.
5858 (dw2_expand_all_symtabs): Likewise.
5859 (dw2_expand_marked_cus): Likewise.
5860 (dw2_debug_names_iterator::next): Likewise.
5861 (dwarf2_initialize_objfile): Likewise.
5862 (add_signatured_type_cu_to_table): Likewise.
5863 (create_all_type_units): Likewise.
5864 (add_type_unit): Likewise.
5865 (struct tu_abbrev_offset): Add constructor.
5866 (build_type_psymtabs_1): Adjust to std::vector change.
5867 (print_tu_stats): Likewise.
5868 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5869 (write_debug_names): Likewise.
5871 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5873 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5874 Make an std::vector.
5875 <n_comp_units>: Remove.
5876 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5877 to std::vector change.
5878 (dwarf2_per_objfile::get_cutu): Likewise.
5879 (dwarf2_per_objfile::get_cu): Likewise.
5880 (create_cus_from_index): Likewise.
5881 (create_addrmap_from_index): Likewise.
5882 (create_addrmap_from_aranges): Likewise.
5883 (dwarf2_read_index): Likewise.
5884 (dw2_find_last_source_symtab): Likewise.
5885 (dw2_map_symtabs_matching_filename): Likewise.
5886 (dw2_symtab_iter_next): Likewise.
5887 (dw2_print_stats): Likewise.
5888 (dw2_expand_all_symtabs): Likewise.
5889 (dw2_expand_symtabs_with_fullname): Likewise.
5890 (dw2_expand_marked_cus): Likewise.
5891 (dw2_map_symbol_filenames): Likewise.
5892 (create_cus_from_debug_names): Likewise.
5893 (dwarf2_read_debug_names): Likewise.
5894 (dw2_debug_names_iterator::next): Likewise.
5895 (dwarf2_initialize_objfile): Likewise.
5896 (set_partial_user): Likewise.
5897 (dwarf2_build_psymtabs_hard): Likewise.
5898 (read_comp_units_from_section): Remove arguments, adjust to
5900 (create_all_comp_units): Adjust to std::vector and
5901 read_comp_units_from_section changes.
5902 (dwarf2_find_containing_comp_unit): Adjust to std::vector
5904 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5905 (psyms_seen_size): Likewise.
5906 (write_gdbindex): Likewise.
5907 (write_debug_names): Likewise.
5909 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5911 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5912 with dwarf2_per_objfile.
5913 (create_cus_from_index): Likewise.
5914 (create_signatured_type_table_from_index): Likewise.
5915 (dwarf2_read_index): Likewise.
5916 (dwarf2_initialize_objfile): Likewise.
5917 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
5918 per_cu rather than get_dwarf2_per_objfile.
5920 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5922 * dwarf2read.h (struct signatured_type): Forward declare.
5923 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5925 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5926 (dw2_get_cutu): ...this.
5927 (dwarf2_per_objfile::get_cu): Rename from...
5928 (dw2_get_cu): ...this.
5929 (dwarf2_per_objfile::get_tu): New.
5930 (create_addrmap_from_index): Adjust.
5931 (create_addrmap_from_aranges): Adjust.
5932 (dw2_find_last_source_symtab): Adjust.
5933 (dw2_map_symtabs_matching_filename): Adjust.
5934 (dw2_symtab_iter_next): Adjust.
5935 (dw2_print_stats): Adjust.
5936 (dw2_expand_all_symtabs): Adjust.
5937 (dw2_expand_symtabs_with_fullname): Adjust.
5938 (dw2_expand_marked_cus): Adjust.
5939 (dw_expand_symtabs_matching_file_matcher): Adjust.
5940 (dw2_map_symbol_filenames): Adjust.
5941 (dw2_debug_names_iterator::next): Adjust.
5942 (dwarf2_initialize_objfile): Adjust.
5943 (set_partial_user): Adjust.
5944 (dwarf2_build_psymtabs_hard): Adjust.
5946 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5948 * dwarf2read.c (create_signatured_type_table_from_debug_names):
5949 Remove unused variables.
5950 (dw2_map_symtabs_matching_filename): Likewise.
5951 (dwarf2_record_block_ranges): Likewise.
5952 (dwarf2_read_addr_index): Likewise.
5953 (follow_die_offset): Likewise.
5955 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5957 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5958 to symbol_file_add_main.
5960 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5963 * mi/mi-console.c (do_fputc_async_safe): New.
5964 (mi_console_file::write_async_safe): New.
5965 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5966 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5968 * ui-file.c (ui_file::putstrn): Adjust call to
5969 fputstrn_unfiltered.
5970 * utils.c (printchar): Replace do_fputs and do_fprintf
5971 parameters by do_fputc.
5972 (fputstr_filtered): Adjust call to printchar.
5973 (fputstr_unfiltered): Likewise.
5974 (fputstrn_filtered): Likewise.
5975 (fputstrn_unfiltered): Add do_fputc parameter, pass to
5977 * utils.h (do_fputc_ftype): New typedef.
5978 (fputstrn_unfiltered): Add do_fputc parameter.
5980 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5982 * regformats/i386/i386-avx.dat: Remove.
5984 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5987 * amd64-tdep.c (amd64_none_init_abi): New function.
5988 (amd64_x32_none_init_abi): New function.
5989 (_initialize_amd64_tdep): Register handlers for x86-64 and
5990 x64_32 with GDB_OSABI_NONE.
5991 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5992 GDB_OSABI_NONE osabi.
5994 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5997 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5999 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6000 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6002 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6004 * common/byte-vector.h (char_vector): New type.
6005 * target.h (target_read_alloc): Return
6006 gdb::optional<byte_vector>.
6007 (target_read_stralloc): Return gdb::optional<char_vector>.
6008 (target_get_osdata): Return gdb::optional<char_vector>.
6009 * target.c (target_read_alloc_1): Templatize. Replacement
6010 manual memory management with vector.
6011 (target_read_alloc): Change return type, adjust.
6012 (target_read_stralloc): Change return type, adjust.
6013 (target_get_osdata): Change return type, adjust.
6014 * auxv.c (struct auxv_info) <length>: Remove.
6015 <data>: Change type to gdb::optional<byte_vector>.
6016 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6017 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6018 (target_auxv_search): Adjust.
6019 (fprint_target_auxv): Adjust.
6020 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6021 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6022 (linux_make_corefile_notes): Adjust.
6023 * osdata.c (get_osdata): Adjust.
6024 * remote.c (remote_get_threads_with_qxfer): Adjust.
6025 (remote_memory_map): Adjust.
6026 (remote_traceframe_info): Adjust.
6027 (btrace_read_config): Adjust.
6028 (remote_read_btrace): Adjust.
6029 (remote_pid_to_exec_file): Adjust.
6030 * solib-aix.c (solib_aix_get_library_list): Adjust.
6031 * solib-dsbt.c (decode_loadmap): Don't free buf.
6032 (dsbt_get_initial_loadmaps): Adjust.
6033 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6034 * solib-target.c (solib_target_current_sos): Adjust.
6035 * tracepoint.c (sdata_make_value): Adjust.
6036 * xml-support.c (xinclude_start_include): Adjust.
6037 (xml_fetch_content_from_file): Adjust.
6038 * xml-support.h (xml_fetch_another): Change return type.
6039 (xml_fetch_content_from_file): Change return type.
6040 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6041 * xml-tdesc.c (file_read_description_xml): Adjust.
6042 (fetch_available_features_from_target): Change return type.
6043 (target_fetch_description_xml): Adjust.
6044 (target_read_description_xml): Adjust.
6046 2018-04-06 Tom Tromey <tom@tromey.com>
6048 * value.c (~value): Update.
6049 (struct value) <contents>: Now unique_xmalloc_ptr.
6050 (value_contents_bits_eq, allocate_value_contents)
6051 (value_contents_raw, value_contents_all_raw)
6052 (value_contents_for_printing, value_contents_for_printing_const)
6053 (set_value_enclosing_type): Update.
6055 2018-04-06 Tom Tromey <tom@tromey.com>
6057 * value.c (range_s): Remove typedef, VEC.
6058 (struct range): Add operator<.
6059 (range_lessthan): Remove.
6060 (ranges_contain): Change type.
6062 (struct value) <unavailable, optimized_out>: Now std::vector.
6063 (value_entirely_available)
6064 (value_entirely_covered_by_range_vector)
6065 (value_entirely_unavailable, value_entirely_optimized_out):
6067 (insert_into_bit_range_vector): Change argument type.
6068 (find_first_range_overlap): Likewise.
6069 (struct ranges_and_idx, value_contents_bits_eq)
6070 (require_not_optimized_out, require_available): Update.
6071 (ranges_copy_adjusted): Change argument types.
6072 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6074 2018-04-06 Tom Tromey <tom@tromey.com>
6076 * value.c (~value): Update.
6077 (struct value) <parent>: Now a value_ref_ptr.
6078 (value_parent, set_value_parent, value_address, value_copy):
6081 2018-04-06 Tom Tromey <tom@tromey.com>
6083 * value.c (struct value): Add constructor, destructor, and member
6085 (allocate_value_lazy, value_decref): Update.
6087 2018-04-06 Tom Tromey <tom@tromey.com>
6089 * value.c (struct value) <released, next>: Remove.
6090 (all_values): Now a std::vector.
6091 (allocate_value_lazy): Update.
6092 (value_next): Remove.
6093 (value_mark, value_free_to_mark, release_value)
6094 (value_release_to_mark): Update.
6096 2018-04-06 Tom Tromey <tom@tromey.com>
6098 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6099 (free_value_chain): Remove.
6100 * value.c (free_value_chain): Remove.
6101 (value_release_to_mark): Return a std::vector.
6102 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6104 (check_condition): Update.
6105 * eval.c (fetch_subexp_value): Change "val_chain" to a
6107 * breakpoint.c (update_watchpoint): Update.
6108 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6110 2018-04-06 Tom Tromey <tom@tromey.com>
6112 * value.h (free_all_values): Remove.
6113 * value.c (free_all_values): Remove.
6115 2018-04-06 Tom Tromey <tom@tromey.com>
6117 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6118 (value_history_chain, value_history_count): Remove.
6119 (value_history): New global.
6120 (record_latest_value, access_value_history, show_values)
6121 (preserve_values): Update.
6123 2018-04-06 Tom Tromey <tom@tromey.com>
6125 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6126 * varobj.c (varobj_set_display_format, varobj_set_value)
6127 (install_default_visualizer, construct_visualizer)
6128 (install_new_value, ~varobj, varobj_get_value_type)
6129 (my_value_of_variable, varobj_editable_p): Update.
6130 * c-varobj.c (c_describe_child, c_value_of_variable)
6131 (cplus_number_of_children, cplus_describe_child): Update.
6132 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6133 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6134 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6136 2018-04-06 Tom Tromey <tom@tromey.com>
6138 * printcmd.c (last_examine_address): Change type to
6140 (do_examine, x_command): Update.
6142 2018-04-06 Tom Tromey <tom@tromey.com>
6144 * value.c (release_value): Update.
6145 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6146 (struct bpstats) <val>: Now a value_ref_ptr.
6147 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6148 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6149 (~watchpoint, print_it_watchpoint, watch_command_1)
6150 (invalidate_bp_value_on_memory_change): Update.
6152 2018-04-06 Tom Tromey <tom@tromey.com>
6154 * varobj.c (varobj_clear_saved_item)
6155 (update_dynamic_varobj_children, install_new_value, ~varobj):
6157 * value.h (value_incref): Move declaration earlier.
6158 (value_decref): Rename from value_free.
6159 (struct value_ref_policy): New.
6160 (value_ref_ptr): New typedef.
6161 (struct value_deleter): Remove.
6162 (gdb_value_up): Remove typedef.
6163 (release_value): Change return type.
6164 (release_value_or_incref): Remove.
6165 * value.c (set_value_parent): Update.
6166 (value_incref): Change return type.
6167 (value_decref): Rename from value_free.
6168 (value_free_to_mark, free_all_values, free_value_chain): Update.
6169 (release_value): Return value_ref_ptr.
6170 (release_value_or_incref): Remove.
6171 (record_latest_value, set_internalvar, clear_internalvar):
6173 * stack.c (info_frame_command): Don't call value_free.
6174 * python/py-value.c (valpy_dealloc, valpy_new)
6175 (value_to_value_object): Update.
6176 * printcmd.c (do_examine): Update.
6177 * opencl-lang.c (lval_func_free_closure): Update.
6178 * mi/mi-main.c (register_changed_p): Don't call value_free.
6179 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6180 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6181 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6183 * guile/scm-value.c (vlscm_free_value_smob)
6184 (vlscm_scm_from_value): Update.
6185 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6186 (frame_unwind_register_unsigned, get_frame_register_bytes)
6187 (put_frame_register_bytes): Don't call value_free.
6188 * findvar.c (address_from_register): Don't call value_free.
6189 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6190 * dwarf2loc.c (entry_data_value_free_closure)
6191 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6192 (dwarf2_evaluate_loc_desc_full): Update.
6193 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6194 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6195 (~watchpoint, watch_command_1)
6196 (invalidate_bp_value_on_memory_change): Update.
6197 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6199 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6202 * warning.m4: Add -Wno-error=deprecated-register.
6203 * configure: Re-generate.
6205 2018-04-05 Tom Tromey <tom@tromey.com>
6207 * linespec.h: Remove include of "vec.h".
6209 2018-04-05 Tom Tromey <tom@tromey.com>
6211 * linespec.c (typep): Remove typedef.
6212 (find_methods, find_superclass_methods): Take a std::vector.
6213 (find_method): Use std::vector.
6215 2018-04-05 Tom Tromey <tom@tromey.com>
6217 * utils.c (compare_strings): Remove.
6218 * utils.h (compare_strings): Remove.
6219 * objc-lang.h (find_imps): Update.
6220 * objc-lang.c (find_methods): Take a std::vector.
6221 (uniquify_strings, find_imps): Likewise.
6222 * linespec.c (find_methods): Take a std::vector.
6223 (decode_objc): Use std::vector.
6224 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6226 (find_method, find_function_symbols): Use std::vector.
6228 2018-04-05 Tom Tromey <tom@tromey.com>
6230 * completer.c (completion_tracker::completion_tracker): Remove
6232 (completion_tracker::discard_completions): Likewise.
6233 * breakpoint.c (ambiguous_names_p): Remove cast.
6234 * ada-lang.c (_initialize_ada_language): Remove cast.
6235 * utils.h (streq): Update.
6236 (streq_hash): Add new declaration.
6237 * utils.c (streq): Return bool.
6238 (streq_hash): New function.
6240 2018-04-05 Tom Tromey <tom@tromey.com>
6242 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6243 Remove a string copy.
6245 2018-04-05 Tom Tromey <tom@tromey.com>
6247 * linespec.c (filter_results): Use std::vector.
6248 (decode_line_2, decode_line_full): Update.
6250 2018-04-05 Tom Tromey <tom@tromey.com>
6252 * linespec.c (canonical_to_fullform): Return std::string.
6253 (filter_results): Update.
6254 (struct decode_line_2_item): Add constructor.
6255 <fullform, displayform>: Now std::string.
6256 (decode_line_2_compare_items): Now a std::sort comparator.
6257 (decode_line_2): Update.
6259 2018-04-05 Tom Tromey <tom@tromey.com>
6261 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6262 (unexpected_linespec_error): Update.
6263 (linespec_parse_basic, parse_linespec): Update.
6265 2018-04-05 Tom Tromey <tom@tromey.com>
6267 * linespec.c (linespec_parse_basic): Reindent.
6269 2018-04-05 Tom Tromey <tom@tromey.com>
6271 * minsyms.h (iterate_over_minimal_symbols): Update.
6272 * minsyms.c (iterate_over_minimal_symbols): Take a
6274 * linespec.c (struct collect_minsyms): Remove.
6275 (compare_msyms): Now a std::sort comparator.
6276 (add_minsym): Add parameters.
6277 (search_minsyms_for_name): Update. Use std::vector.
6279 2018-04-03 Tom Tromey <tom@tromey.com>
6281 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6284 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6286 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6288 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6291 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6292 printing static type.
6294 2018-04-01 Tom Tromey <tom@tromey.com>
6296 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6297 (rs6000_xfer_shared_libraries): Update.
6299 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6301 * common/gdb_vecs.h (char_ptr): Remove.
6302 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6304 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6306 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6308 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6310 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6312 * tracepoint.h (struct uploaded_tp): Initialize fields.
6313 <actions, step_actions, cmd_strings>: Change type to
6314 std::vector<char *>.
6315 * tracepoint.c (get_uploaded_tp): Allocate with new.
6316 (free_uploaded_tps): Free with delete.
6317 (parse_tracepoint_definition): Adjust to std::vector change.
6318 * breakpoint.c (read_uploaded_action): Likewise.
6319 (create_tracepoint_from_upload): Likewise.
6320 * ctf.c (ctf_write_uploaded_tp): Likewise.
6321 (SET_ARRAY_FIELD): Likewise.
6322 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6324 2018-03-30 Tom Tromey <tom@tromey.com>
6326 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6328 (svr4_keep_data_in_core): Update.
6329 (svr4_read_so_list): Update.
6331 2018-03-30 Tom Tromey <tom@tromey.com>
6333 * windows-nat.c (handle_output_debug_string, handle_exception):
6335 * target.h (target_read_string): Update.
6336 * target.c (target_read_string): Change "string" to
6338 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6340 * solib-frv.c (frv_current_sos): Update.
6341 * solib-dsbt.c (dsbt_current_sos): Update.
6342 * solib-darwin.c (darwin_current_sos): Update.
6343 * linux-thread-db.c (inferior_has_bug): Update.
6344 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6345 Update. Remove alloca.
6346 * ada-lang.c (ada_main_name): Update.
6348 2018-03-30 Tom Tromey <tom@tromey.com>
6350 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6351 (struct dwo_file_deleter): New.
6352 (dwo_file_up): New typedef.
6353 (open_and_init_dwo_file): Use dwo_file_up.
6354 (free_dwo_file_cleanup): Remove.
6356 2018-03-30 Tom Tromey <tom@tromey.com>
6358 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6359 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6361 2018-03-30 Tom Tromey <tom@tromey.com>
6363 * dwarf2read.c (class free_cached_comp_units): New class.
6364 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6365 (free_cached_comp_units): Remove function.
6367 2018-03-30 Tom Tromey <tom@tromey.com>
6369 * utils.h (make_cleanup_unpush_target): Remove.
6370 * inf-ptrace.c (struct target_unpusher): New.
6371 (target_unpush_up) New typedef.
6372 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6374 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6376 2018-03-27 Tom Tromey <tom@tromey.com>
6378 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6380 2018-03-27 Pedro Alves <palves@redhat.com>
6381 Tom Tromey <tom@tromey.com>
6383 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6384 destructor. Now a class.
6385 (gdb_readline_wrapper_cleanup): Remove function.
6386 (gdb_readline_wrapper): Remove cleanups.
6388 2018-03-27 Tom Tromey <tom@tromey.com>
6390 * typeprint.h (struct type_print_options) <local_typedefs,
6391 global_typedefs>: Remove "struct" keyword.
6392 (class typedef_hash_table): New class.
6393 (recursively_update_typedef_hash, add_template_parameters)
6394 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6395 (find_typedef_in_hash): Don't declare.
6396 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6397 (typedef_hash_table::recursively_update): Rename from
6398 recursively_update_typedef_hash. Now a member.
6399 (typedef_hash_table::add_template_parameters): Rename from
6400 add_template_parameters. Now a member.
6401 (typedef_hash_table::typedef_hash_table): Now a constructor;
6402 rename from create_typedef_hash.
6403 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6404 rename from free_typedef_hash.
6405 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6406 (do_free_global_table): Remove.
6407 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6408 from copy_type_recursive.
6409 (create_global_typedef_table): Remove.
6410 (typedef_hash_table::find_global_typedef): Now a member of
6412 (typedef_hash_table::find_typedef): Rename from
6413 find_typedef_in_hash; now a member.
6414 (whatis_exp): Update.
6415 * extension.h (struct ext_lang_type_printers): Add constructor and
6417 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6419 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6420 Now a constructor; rename from start_ext_lang_type_printers.
6421 (ext_lang_type_printers): Now a destructor; rename from
6422 free_ext_lang_type_printers.
6423 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6425 (c_type_print_base_struct_union): Update. Remove cleanups.
6427 2018-03-27 Tom Tromey <tom@tromey.com>
6429 * dwarf-index-write.c: Include <cmath>.
6431 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6433 * NEWS: Add entry describing new "set|show varsize-limit" command.
6434 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6436 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6439 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6441 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6443 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6444 * dwarf-index-common.c: New file.
6445 * dwarf-index-common.h: New file.
6446 * dwarf-index-write.c: New file.
6447 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6448 (struct dwarf2_section_info): Move from here.
6449 (dwarf2_section_info_def): Likewise.
6450 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6451 (offset_type): Likewise.
6452 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6453 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6454 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6455 (byte_swap): Likewise.
6456 (MAYBE_SWAP): Likewise.
6457 (dwarf2_per_cu_ptr): Likewise.
6458 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6459 (struct tu_stats): Likewise.
6460 (struct dwarf2_per_objfile): Likewise.
6461 (struct dwarf2_per_cu_data): Likewise.
6462 (struct signatured_type): Likewise.
6463 (sig_type_ptr): Likewise.
6464 (DEF_VEC_P (sig_type_ptr)): Likewise.
6465 (INDEX4_SUFFIX): Likewise.
6466 (INDEX5_SUFFIX): Likewise.
6467 (DEBUG_STR_SUFFIX): Likewise.
6468 (dwarf2_read_section): Make non-static.
6469 (mapped_index_string_hash): Move from here.
6470 (dwarf5_djb_hash): Likewise.
6471 (file_write): Likewise.
6472 (class data_buf): Likewise.
6473 (struct symtab_index_entry): Likewise.
6474 (struct mapped_symtab): Likewise.
6475 (find_slot): Likewise.
6476 (hash_expand): Likewise.
6477 (add_index_entry): Likewise.
6478 (uniquify_cu_indices): Likewise.
6479 (class c_str_view): Likewise.
6480 (class c_str_view_hasher): Likewise.
6481 (class vector_hasher): Likewise.
6482 (write_hash_table): Likewise.
6483 (psym_index_map): Likewise.
6484 (struct addrmap_index_data): Likewise.
6485 (add_address_entry): Likewise.
6486 (add_address_entry_worker): Likewise.
6487 (write_address_map): Likewise.
6488 (symbol_kind): Likewise.
6489 (write_psymbols): Likewise.
6490 (struct signatured_type_index_data): Likewise.
6491 (write_one_signatured_type): Likewise.
6492 (recursively_count_psymbols): Likewise.
6493 (recursively_write_psymbols): Likewise.
6494 (class debug_names): Likewise.
6495 (check_dwarf64_offsets): Likewise.
6496 (psyms_seen_size): Likewise.
6497 (write_gdbindex): Likewise.
6498 (write_debug_names): Likewise.
6499 (assert_file_size): Likewise.
6500 (write_psymtabs_to_index): Likewise.
6501 (save_gdb_index_command): Likewise.
6502 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6504 * dwarf2read.h: New file.
6506 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6509 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6510 symbol name if the CU's language stores symbol names in linkage
6512 * language.h (struct language_defn)
6513 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6514 all instances of this struct.
6516 2018-03-26 Tom Tromey <tom@tromey.com>
6518 * stack.c (backtrace_command_1): Remove verbose code.
6520 2018-03-26 Tom Tromey <tom@tromey.com>
6522 * python/py-framefilter.c (py_print_type): Don't catch
6523 exceptions. Return void.
6524 (py_print_value): Likewise.
6525 (py_print_single_arg): Likewise.
6526 (enumerate_args): Don't catch exceptions.
6527 (py_print_args): Likewise.
6528 (py_print_frame): Likewise.
6529 (gdbpy_apply_frame_filter): Catch exceptions here.
6531 2018-03-26 Tom Tromey <tom@tromey.com>
6533 * stack.c (_initialize_stack): Remove trailing newlines from help
6534 text. Add "Usage" line to "backtrace" help.
6536 2018-03-26 Tom Tromey <tom@tromey.com>
6539 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6541 2018-03-26 Tom Tromey <tom@tromey.com>
6543 * python/py-framefilter.c (py_print_single_arg): Return
6544 EXT_LANG_BT_ERROR from catch.
6546 2018-03-26 Tom Tromey <tom@tromey.com>
6549 * stack.c (backtrace_command_1): Move some code into no-filters
6552 2018-03-26 Tom Tromey <tom@tromey.com>
6554 * python/py-framefilter.c (throw_quit_or_print_exception): New
6556 (gdbpy_apply_frame_filter): Use it.
6558 2018-03-26 Tom Tromey <tom@tromey.com>
6561 * python/py-framefilter.c (py_print_type, py_print_value)
6562 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6565 2018-03-26 Tom Tromey <tom@tromey.com>
6567 * python/py-framefilter.c (enumerate_args): Use
6568 gdb::unique_xmalloc_ptr.
6570 2018-03-26 Tom Tromey <tom@tromey.com>
6572 * python/py-framefilter.c (py_print_frame): Return
6574 (gdbpy_apply_frame_filter): Update comment.
6575 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6577 <EXT_LANG_BT_NO_FILTERS>: Change value.
6579 2018-03-26 Tom Tromey <tom@tromey.com>
6582 * stack.c (backtrace_command): Parse "hide" argument.
6583 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6584 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6587 2018-03-26 Tom Tromey <tom@tromey.com>
6589 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6591 (backtrace_command): Remove "fulltrace", add "flags".
6593 2018-03-26 Tom Tromey <tom@tromey.com>
6595 * stack.c (backtrace_command): Rewrite command line parsing.
6597 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6599 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6601 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6603 * filename-seen-cache.h: Add include guard.
6605 2018-03-26 Keith Seitz <keiths@redhat.com>
6607 * symfile.c (place_section): Remove "struct" from section_addr_info
6609 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6610 "struct" keyword from section_addr_info.
6612 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6614 * regformats/regdef.h (reg): Add constructors.
6616 2018-03-25 Pedro Alves <palves@redhat.com>
6618 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6619 if then/else bodies in var_func_name extraction.
6621 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6623 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6624 lookup_minimal_symbol() to find symbol entry.
6625 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6627 2018-03-23 Keith Seitz <keiths@redhat.com>
6630 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6631 nested type definitions for C++, too.
6633 2018-03-23 Tom Tromey <tom@tromey.com>
6635 * machoread.c (struct oso_el): Add a constructor. Don't define as
6637 (macho_register_oso): Remove.
6638 (macho_symtab_read): Take a std::vector.
6639 (oso_el_compare_name): Now a std::sort comparator.
6640 (macho_symfile_read_all_oso): Take a std::vector.
6641 (macho_symfile_read): Use std::vector. Remove cleanups.
6643 2018-03-22 Tom Tromey <tom@tromey.com>
6645 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6646 (record_full_goto_bookmark): Use std::string.
6648 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6651 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6654 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6656 * rs6000-tdep.c (store_insn_p): New function.
6657 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6658 and cr_reg to their unshifted values. Use store_insn_p to
6659 match LR saves using either R1 or fdata->alloca_reg. Use
6660 store_insn_p to match CR saves. Set alloca_reg_offset
6661 when alloca_reg and framep are set. Remove lr_reg shift
6662 when assigning to fdata->lr_register.
6664 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6666 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6667 command line args instead of emitting a warning.
6669 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6671 * tracepoint.h (struct static_tracepoint_marker): Initialize
6672 fields, define default constructor, move constructor and move
6673 assignment, disable the rest.
6674 <str_id, extra>: Make std::string.
6675 (release_static_tracepoint_marker): Remove.
6676 (free_current_marker): Remove.
6677 * tracepoint.c (free_current_marker): Remove.
6678 (parse_static_tracepoint_marker_definition): Adjust to
6679 std::string, use new hex2str overload.
6680 (release_static_tracepoint_marker): Remove.
6681 (print_one_static_tracepoint_marker): Get marker by reference
6682 and adjust to std::string.
6683 (info_static_tracepoint_markers_command): Adjust to std::vector
6685 * target.h (static_tracepoint_marker_p): Remove typedef.
6686 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6687 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6689 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6691 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6692 (target_debug_print_std_vector_static_tracepoint_marker): New.
6693 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6695 (target_debug_print_static_tracepoint_marker_p): ... this.
6696 * target-delegates.c: Re-generate.
6697 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6699 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6700 (decode_static_tracepoint_spec): Adjust to std::vector.
6701 (tracepoint_print_one_detail): Adjust to std::string.
6702 (strace_marker_decode_location): Adjust to std::string.
6703 (update_static_tracepoint): Adjust to std::string, remove call
6704 to release_static_tracepoint_marker.
6705 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6706 Adjust to std::vector.
6707 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6708 (remote_static_tracepoint_markers_by_strid): Adjust to
6710 * common/rsp-low.h (hex2str): New overload with explicit count
6712 * common/rsp-low.c (hex2str): New overload with explicit count
6714 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6715 (_initialize_rsp_low_selftests): Add test_hex2str test.
6716 * unittests/tracepoint-selftests.c
6717 (test_parse_static_tracepoint_marker_definition): Adjust to
6720 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6722 * tracepoint.c (parse_static_tracepoint_marker_definition):
6723 Consider case where the definition is followed by more
6725 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6726 tracepoint-selftests.c.
6727 * unittests/tracepoint-selftests.c: New.
6729 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6731 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6734 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6736 * symtab.c (find_pc_sect_line): fixed indentation.
6738 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6740 * symtab.c (find_pc_sect_line): now uses binary search.
6742 2018-03-19 Tom Tromey <tom@tromey.com>
6744 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6747 2018-03-19 Pedro Alves <palves@redhat.com>
6748 Tom Tromey <tom@tromey.com>
6750 * unittests/observable-selftests.c: New file.
6751 * common/observable.h: New file.
6752 * observable.h: New file.
6753 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6754 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6755 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6756 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6757 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6758 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6759 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6760 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6761 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6762 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6763 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6764 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6765 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6766 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6767 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6768 tui/tui-interp.c, valops.c: Update all users.
6769 * tui/tui-hooks.c (tui_bp_created_observer)
6770 (tui_bp_deleted_observer, tui_bp_modified_observer)
6771 (tui_inferior_exit_observer, tui_before_prompt_observer)
6772 (tui_normal_stop_observer, tui_register_changed_observer):
6774 (tui_observers_token): New global.
6775 (attach_or_detach, tui_attach_detach_observers): New functions.
6776 (tui_install_hooks, tui_remove_hooks): Use
6777 tui_attach_detach_observers.
6778 * record-btrace.c (record_btrace_thread_observer): Remove.
6779 (record_btrace_thread_observer_token): New global.
6780 * observer.sh: Remove.
6781 * observer.c: Rename to observable.c.
6782 * observable.c (namespace gdb_observers): Define new objects.
6783 (observer_debug): Move into gdb_observers namespace.
6784 (struct observer, struct observer_list, xalloc_observer_list_node)
6785 (xfree_observer_list_node, generic_observer_attach)
6786 (generic_observer_detach, generic_observer_notify): Remove.
6787 (_initialize_observer): Update.
6788 Don't include observer.inc.
6789 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6790 (clean mostlyclean): Likewise.
6791 (observer.h, observer.inc): Remove targets.
6792 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6793 (COMMON_SFILES): Use observable.c, not observer.c.
6794 * .gitignore: Remove observer.h.
6796 2018-03-18 Tom Tromey <tom@tromey.com>
6798 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6800 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6802 2018-03-17 Tom Tromey <tom@tromey.com>
6804 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6806 2018-03-17 Tom Tromey <tom@tromey.com>
6808 * target.c (class scoped_target_fd): New.
6809 (target_fileio_close_cleanup): Remove.
6810 (target_fileio_read_alloc_1): Use scoped_target_fd.
6812 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6814 * silent-rules.mk: New.
6815 * Makefile.in: Include silent-rules.mk
6816 (srcdir, VPATH, top_srcdir): Move up.
6817 (COMPILE): Add ECHO_CXX.
6818 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6819 (init.c): Add ECHO_INIT_C.
6820 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6821 (version.c): Add ECHO_GEN.
6822 (printcmd.o): Add ECHO_CXX.
6823 (target-float.o): Add ECHO_CXX.
6824 (ada-exp.o): Add ECHO_CXX.
6825 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6826 (insight$(EXEEXT)): Add ECHO_CXXLD.
6827 * gnulib/configure.ac: Add AM_SILENT_RULES.
6828 * gnulib/aclocal.m4: Re-generate.
6829 * gnulib/configure: Re-generate.
6830 * gnulib/import/Makefile.in: Re-generate.
6832 2018-03-16 Tom Tromey <tom@tromey.com>
6834 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6835 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6836 * utils.c (do_free_section_addr_info)
6837 (make_cleanup_free_section_addr_info): Remove.
6838 * symfile.h (struct other_sections): Add constructor.
6839 (struct section_addr_info): Remove.
6840 (section_addr_info): New typedef.
6841 (struct sym_fns) <sym_offsets>: Change type of parameter.
6842 (build_section_addr_info_from_objfile)
6843 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6844 (default_symfile_offsets, symbol_file_add)
6845 (symbol_file_add_from_bfd)
6846 (build_section_addr_info_from_section_table): Update.
6847 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6848 * symfile.c (alloc_section_addr_info): Remove.
6849 (build_section_addr_info_from_section_table): Change return type.
6851 (build_section_addr_info_from_bfd)
6852 (build_section_addr_info_from_objfile): Likewise.
6853 (free_section_addr_info): Remove.
6854 (relative_addr_info_to_section_offsets): Change type of "addrs".
6855 (addrs_section_compar): Now a std::sort comparator.
6856 (addrs_section_sort): Change return type.
6857 (addr_info_make_relative): Change type of "addrs". Update.
6858 (default_symfile_offsets, syms_from_objfile_1)
6859 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6860 (symbol_file_add_separate): Update.
6861 (symbol_file_add): Change type of "addrs". Update.
6862 (add_symbol_file_command): Update. Remove cleanups.
6863 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6865 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6866 * solib.c (solib_read_symbols): Update.
6867 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6868 * machoread.c (macho_symfile_offsets): Update.
6869 * jit.c (jit_bfd_try_read_symtab): Update.
6871 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6873 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6874 unittests/utils-selftests.c.
6875 * unittests/utils-selftests.c: New file.
6877 2018-03-14 Tom Tromey <tom@tromey.com>
6880 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6883 2018-03-14 Tom Tromey <tom@tromey.com>
6886 * printcmd.c (printf_pointer): Allow "-" in format.
6888 2018-03-14 Tom Tromey <tom@tromey.com>
6890 * printcmd.c (_initialize_printcmd): Add usage to printf.
6892 2018-03-14 Yao Qi <qiyao@sourceware.org>
6894 * MAINTAINERS: Update my email address.
6896 2018-03-13 Tom Tromey <tom@tromey.com>
6898 * machoread.c (macho_check_dsym): Change filenamep to a
6900 (macho_symfile_read): Update.
6901 * symfile.c (load_command): Use std::string.
6903 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
6905 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6906 to error message string.
6907 (riscv_register_name): Use xsnprintf instead of sprintf.
6908 (riscv_insn::fetch_instruction): Use gdb_assert instead of
6910 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6912 (riscv_push_dummy_call): Likewise.
6914 2018-03-12 Tom Tromey <tom@tromey.com>
6916 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6917 Use gdb::byte_vector.
6918 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6920 2018-03-12 Yao Qi <yao.qi@linaro.org>
6922 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6923 parameter type to readable_regcache.
6924 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6927 2018-03-11 Tom Tromey <tom@tromey.com>
6929 * dwarf2read.c (struct nextfield): Add initializers.
6930 (struct nextfnfield): Remove.
6931 (struct fnfieldlist): Add initializers. Remove "length" and
6932 "head", use std::vector.
6933 (struct decl_field_list): Remove.
6934 (struct field_info): Add initializers.
6935 <fields, baseclasses>: Now std::vector.
6936 <nbaseclasses, nfnfields, typedef_field_list_count,
6937 nested_types_list_count>: Remove.
6938 (dwarf2_add_field, dwarf2_add_type_defn)
6939 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6940 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6941 (process_structure_scope): Update.
6943 2018-03-11 Tom Tromey <tom@tromey.com>
6945 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6946 for use by std::sort.
6947 (build_type_psymtabs_1): Use std::vector.
6949 2018-03-09 Eli Zaretskii <eliz@gnu.org>
6951 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6952 and LIBMPFR in the printed configuration.
6954 2018-03-08 Tom Tromey <tom@tromey.com>
6956 * source.c (get_filename_and_charpos): Use scoped_fd.
6957 * nto-procfs.c (procfs_open_1): Use scoped_fd.
6958 (procfs_pidlist): Likewise.
6959 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6960 (iterate_over_mappings): Likewise.
6962 2018-03-08 Tom Tromey <tom@tromey.com>
6964 * infcall.c (struct call_return_meta_info)
6965 <stack_temporaries_enabled>: Remove.
6966 (get_call_return_value, call_function_by_hand_dummy): Update.
6967 * thread.c (disable_thread_stack_temporaries): Remove.
6968 (enable_thread_stack_temporaries): Remove.
6969 (thread_stack_temporaries_enabled_p): Return bool.
6970 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6971 (get_last_thread_stack_temporary): Update.
6972 * eval.c (evaluate_subexp): Update.
6973 * gdbthread.h (class enable_thread_stack_temporaries): Now a
6974 class, not a function.
6975 (value_ptr, value_vec): Remove typedefs.
6976 (class thread_info) <stack_temporaries_enabled>: Now bool.
6977 <stack_temporaries>: Now a std::vector.
6978 (thread_stack_temporaries_enabled_p)
6979 (value_in_thread_stack_temporaries): Return bool.
6981 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
6983 * remote.c (putpkt_binary): Fix omitted bytes reporting.
6984 (getpkt_or_notif_sane_1): Likewise.
6986 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6988 * build-id.c (build_id_to_debug_bfd): Use std::string.
6990 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6992 * build-id.c (find_separate_debug_file_by_buildid): Return
6994 * build-id.h (find_separate_debug_file_by_buildid): Return
6996 * coffread.c (coff_symfile_read): Adjust to std::string.
6997 * elfread.c (elf_symfile_read): Adjust to std::string.
6998 * symfile.c (separate_debug_file_exists): Change parameter to
7000 (find_separate_debug_file): Return std::string.
7001 (find_separate_debug_file_by_debuglink): Return std::string.
7002 * symfile.h (find_separate_debug_file_by_debuglink): Return
7005 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7007 * common/xml-utils.c (xml_escape_text): Move code to...
7008 (xml_escape_text_append): ... this new function.
7009 * common/xml-utils.h (xml_escape_text_append): New declaration.
7010 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7012 (_initialize_xml_utils): register test_xml_escape_text_append as
7015 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7017 * defs.h: Remove MAX_REGISTER_SIZE.
7018 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7020 * python/py-unwind.c (pyuw_sniffer): Likewise.
7022 2018-03-07 Tom Tromey <tom@tromey.com>
7024 * linux-tdep.c (linux_info_proc): Update.
7025 * target.h (struct target_ops) <to_fileio_readlink>: Return
7027 (target_fileio_readlink): Return optional<string>.
7028 * remote.c (remote_hostio_readlink): Return optional<string>.
7029 * inf-child.c (inf_child_fileio_readlink): Return
7031 * target.c (target_fileio_readlink): Return optional<string>.
7033 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7035 * regcache.c (cooked_read_test): Add riscv to the list of
7036 architectures that have a save_reggroup.
7038 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7040 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7041 value is not a dynamic class object.
7043 2018-03-06 Tom Tromey <tom@tromey.com>
7045 * rust-exp.y: Formatting fixes.
7047 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7049 * riscv-tdep.c (riscv_register_name): Remove target description
7051 (riscv_gdbarch_init): Remove target description check.
7053 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7055 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7057 * riscv-tdep.h: Likewise.
7059 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7061 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7062 (riscv_pseudo_register_write): Delete.
7063 (riscv_gdbarch_init): Remove all use of pseudo registers.
7065 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7067 * record-btrace.c (btrace_print_lines): Replace cleanup
7068 parameter with RAII equivalents.
7069 (btrace_insn_history): Replace cleanup with RAII equivalents.
7070 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7071 make_cleanup_ui_out_tuple_begin_end): Remove.
7072 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7073 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7074 make_cleanup_ui_out_list_begin_end): Remove.
7076 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7078 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7079 parameter types to std::vector. Use bool.
7080 (record_btrace_wait): Replace VEC(tp_t) with
7081 std::vector<thread_info *>.
7082 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7084 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7086 * record-btrace.c (record_btrace_disable_callback): Remove.
7087 (struct scoped_btrace_disable): New.
7088 (record_btrace_open): Use scoped_btrace_disable.
7090 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7092 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7093 reading values from registers.
7095 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7097 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7100 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7102 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7103 change parameter type. Use GDB's print functions, and use
7104 core_addr_to_string where appropriate.
7105 (riscv_push_dummy_call): Use core_addr_to_string where
7106 appropriate, update call to riscv_print_arg_location, and reindent
7108 (riscv_return_value): Update call to riscv_print_arg_location.
7110 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7111 Tim Newsome <tim@sifive.com>
7112 Albert Ou <a0u@eecs.berkeley.edu>
7113 Darius Rad <darius@bluespec.com>
7115 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7116 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7117 (ALLDEPFILES): Add riscv-tdep.c
7118 * configure.tgt: Add riscv support.
7119 * riscv-tdep.c: New file.
7120 * riscv-tdep.h: New file.
7121 * NEWS: Mention new target.
7122 * MAINTAINERS: Add entry for riscv.
7124 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7126 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7127 fields within aggregates.
7129 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7131 * record-btrace.c (btrace_print_lines): Change type of flags to
7132 gdb_disassembly_flags.
7134 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7136 * fbsd-nat.c: Include "inf-ptrace.h".
7137 (USE_SIGTRAP_SIGINFO): Conditionally define.
7138 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7139 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7140 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7142 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7144 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7146 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7147 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7148 "supports_stopped_by_hw_breakpoint" target methods.
7150 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7152 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7153 * fbsd-nat.c (debug_fbsd_nat): New variable.
7154 (show_fbsd_nat_debug): New function.
7155 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7156 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7158 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7160 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7161 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7163 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7164 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7167 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7169 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7170 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7172 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7174 * charset.c (struct charset_vector): New.
7175 (charsets): Change type to charset_vector.
7176 (find_charset_names): Adjust.
7178 (_initialize_charset): Adjust.
7180 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7182 * progspace.h (struct program_space) <deleted_solibs>: Change
7183 type to std::vector<std::string>.
7184 * progspace.c (clear_program_space_solib_cache): Adjust.
7185 * breakpoint.c (print_solib_event): Adjust.
7186 (check_status_catch_solib): Adjust.
7187 * solib.c (update_solib_list): Adjust.
7188 * ui-out.h (class ui_out) <field_string>: New overload.
7189 * ui-out.c (ui_out::field_string): New overload.
7191 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7193 * progspace.h (struct program_space): Add constructor and
7194 destructor, initialize fields.
7195 (add_program_space): Remove.
7196 * progspace.c (add_program_space): Rename to...
7197 (program_space::program_space): ... this.
7198 (release_program_space): Rename to...
7199 (program_space::~program_space): ... this.
7200 (delete_program_space): Use delete to delete program_space.
7201 (initialize_progspace): Use new to allocate program_space.
7202 * inferior.c (add_inferior_with_spaces): Likewise.
7203 (clone_inferior_command): Likewise.
7204 * infrun.c (follow_fork_inferior): Likewise.
7205 (handle_vfork_child_exec_or_exit): Likewise.
7207 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7209 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7210 (delim_string_to_char_ptr_vec): Return std::vector of
7211 gdb::unique_xmalloc_ptr.
7212 (dirnames_to_char_ptr_vec_append): Take std::vector of
7213 gdb::unique_xmalloc_ptr.
7214 (dirnames_to_char_ptr_vec): Return std::vector of
7215 gdb::unique_xmalloc_ptr.
7216 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7217 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7218 (delim_string_to_char_ptr_vec): Return an std::vector of
7219 gdb::unique_xmalloc_ptr, adjust the code.
7220 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7221 gdb::unique_xmalloc_ptr, adjust the code.
7222 (dirnames_to_char_ptr_vec): Return an std::vector of
7223 gdb::unique_xmalloc_ptr, adjust the code.
7224 * auto-load.c (auto_load_safe_path_vec): Change type to
7225 std::vector of gdb::unique_xmalloc_ptr.
7226 (auto_load_expand_dir_vars): Return an std::vector of
7227 gdb::unique_xmalloc_ptr, adjust the code.
7228 (auto_load_safe_path_vec_update): Adjust.
7229 (filename_is_in_auto_load_safe_path_vec): Adjust.
7230 (auto_load_objfile_script_1): Adjust.
7231 * build-id.c (build_id_to_debug_bfd): Adjust.
7232 * linux-thread-db.c (thread_db_load_search): Adjust.
7233 * source.c (add_path): Adjust.
7235 * symfile.c (find_separate_debug_file): Adjust.
7236 * utils.c (do_free_char_ptr_vec): Remove.
7237 (make_cleanup_free_char_ptr_vec): Remove.
7239 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7242 * common/pathstuff.c: Conditionally include "<windows.h>".
7244 2018-03-01 Georg Sauthoff <mail@georg.so>
7247 * gcore.in: Quote variables and switch interpreter to bash.
7249 2018-03-01 Tom Tromey <tom@tromey.com>
7251 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7252 assertion. Add assertion for discriminant_index.
7253 (quirk_rust_enum): Use correct base type name in univariant case.
7255 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7257 * record.c (get_call_history_modifiers): Return a
7259 (cmd_record_call_history): Adjust.
7260 * record-btrace.c (record_btrace_call_history): Adjust.
7261 (record_btrace_call_history_range): Adjust.
7262 (record_btrace_call_history_from): Adjust.
7263 * target-debug.h (target_debug_print_record_print_flags): New.
7264 * target-delegates.c: Re-generate.
7265 * target.c (target_call_history): Change flags type.
7266 (target_call_history_from): Likewise.
7267 (target_call_history_range): Likewise.
7268 * target.h (struct target_ops) <target_call_history>: Likewise.
7269 (target_call_history_from): Likewise.
7270 (target_call_history_range): Likewise.
7272 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7273 Simon Marchi <simon.marchi@polymtl.ca>
7275 * common/common-utils.c: Include "sys/stat.h".
7276 (is_regular_file): Move here from "source.c"; change return
7278 * common/common-utils.h (is_regular_file): New prototype.
7279 * common/pathstuff.c (contains_dir_separator): New function.
7280 * common/pathstuff.h (contains_dir_separator): New prototype.
7281 * source.c: Don't include "sys/stat.h".
7282 (is_regular_file): Move to "common/common-utils.c".
7284 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7286 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7287 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7288 * auto-load.c: Include "common/pathstuff.h".
7289 * common/common-def.h (current_directory): Move here.
7290 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7292 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7294 * common/pathstuff.c: New file.
7295 * common/pathstuff.h: New file.
7296 * compile/compile.c: Include "common/pathstuff.h".
7297 * defs.h (current_directory): Move to "common/common-defs.h".
7298 * dwarf2read.c: Include "common/pathstuff.h".
7300 * guile/scm-safe-call.c: Likewise.
7301 * linux-thread-db.c: Likewise.
7303 * nto-tdep.c: Likewise.
7304 * objfiles.c: Likewise.
7305 * source.c: Likewise.
7306 * symtab.c: Likewise.
7307 * utils.c: Include "common/pathstuff.h".
7308 (gdb_realpath): Move to "common/pathstuff.c".
7309 (gdb_realpath_keepfile): Likewise.
7310 (gdb_abspath): Likewise.
7311 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7312 (gdb_realpath_keepfile): Likewise.
7313 (gdb_abspath): Likewise.
7315 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7317 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7318 wildcard process pid for super_resume for kernels with a
7321 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7323 * compile/compile.c (get_args): Add additional comments
7324 explaining function.
7326 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7327 Tom Tromey <tom@tromey.com>
7329 * target.h (memory_write_request_s): Remove typedef. Don't define
7331 (target_write_memory_blocks): Change argument to std::vector.
7332 (struct memory_write_request): Add constructor.
7333 * target-memory.c (compare_block_starting_address): Return bool.
7334 Change argument types.
7335 (claim_memory): Change arguments to use std::vector.
7336 (split_regular_and_flash_blocks, blocks_to_erase)
7337 (compute_garbled_blocks): Likewise.
7338 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7339 (target_write_memory_blocks): Change argument to std::vector.
7340 * symfile.c (struct load_section_data): Add constructor and
7341 destructor. Use std::vector for "requests".
7342 (struct load_progress_data): Add initializers.
7343 (load_section_callback): Update. Use "new".
7344 (clear_memory_write_data): Remove.
7345 (generic_load): Update.
7347 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7349 * arch/aarch64.h: Use common/tdesc.h.
7351 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7353 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7354 architecture with a 64-bit ABI.
7356 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7358 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7359 ahead of target description loading.
7361 2018-02-26 Tom Tromey <tom@tromey.com>
7363 * stack.c (backtrace_command_1): Update.
7364 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7366 * python/py-framefilter.c (py_print_frame)
7367 (gdbpy_apply_frame_filter): Change type of "flags".
7368 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7370 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7371 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7372 * extension.h (enum frame_filter_flag): Rename from
7374 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7375 (apply_ext_lang_frame_filter): Change type of "flags".
7376 * extension.c (apply_ext_lang_frame_filter): Change type of
7378 * extension-priv.h (struct extension_language_ops)
7379 <apply_frame_filter>: Change type of "flags".
7381 2018-02-26 Tom Tromey <tom@tromey.com>
7384 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7385 off-by-one in py_end computation.
7386 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7388 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7391 2018-02-26 Tom Tromey <tom@tromey.com>
7393 * dwarf2read.c (struct variant_field): New.
7394 (struct nextfield) <variant>: New field.
7395 (dwarf2_add_field): Handle DW_TAG_variant_part.
7396 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7397 discriminated union.
7398 (read_structure_type): Handle DW_TAG_variant_part.
7399 (handle_struct_member_die): New function, extracted from
7400 process_structure_scope. Handle DW_TAG_variant.
7401 (process_structure_scope): Handle discriminated unions. Call
7402 handle_struct_member_die.
7404 2018-02-26 Tom Tromey <tom@tromey.com>
7406 * rust-lang.h (rust_last_path_segment): Declare.
7407 * rust-lang.c (rust_last_path_segment): Now public. Change
7409 (struct disr_info): Remove.
7410 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7411 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7412 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7413 (rust_enum_p, rust_enum_variant): New function.
7414 (rust_underscore_fields): Remove "offset" parameter.
7415 (rust_print_enum): New function.
7416 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7417 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7418 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7420 (rust_internal_print_type): New function, from rust_print_type.
7422 (rust_print_type): Call rust_internal_print_type.
7423 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7424 Update enum handling.
7425 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7426 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7427 (rust_union_quirks): New functions.
7428 (process_full_comp_unit, process_full_type_unit): Call
7430 (process_structure_scope): Update rust_unions if necessary.
7432 2018-02-26 Tom Tromey <tom@tromey.com>
7434 * value.h (value_union_variant): Declare.
7435 * valops.c (value_union_variant): New function.
7436 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7437 (struct discriminant_info): New.
7438 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7440 (struct main_type) <flag_discriminated_union>: New field.
7442 2018-02-26 Tom Tromey <tom@tromey.com>
7444 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7445 unittests/unpack-selftests.c.
7446 * unittests/unpack-selftests.c: New file.
7447 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7449 2018-02-26 Yao Qi <yao.qi@linaro.org>
7451 * dwarf2read.c (struct partial_die_info) <read>: New method.
7452 (read_partial_die): Remove the declaration.
7453 (load_partial_dies): Update.
7454 (partial_die_info::partial_die_info):
7455 (read_partial_die): Change it to partial_die_info::read.
7457 2018-02-26 Yao Qi <yao.qi@linaro.org>
7459 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7460 (fixup_partial_die): Remove declaration.
7461 (scan_partial_symbols): Update.
7462 (partial_die_parent_scope): Likewise.
7463 (partial_die_full_name): Likewise.
7464 (fixup_partial_die): Change it to partial_die_info::fixup.
7466 2018-02-26 Yao Qi <yao.qi@linaro.org>
7468 * dwarf2read.c (read_partial_die): Update the declaration.
7469 (load_partial_dies): Caller update.
7470 (read_partial_die): Remove one argument abbrev_len.
7472 2018-02-26 Yao Qi <yao.qi@linaro.org>
7474 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7475 assignment operator.
7476 (load_partial_dies): Use ctor and copy ctor.
7477 (read_partial_die): Update.
7478 (dwarf2_cu::find_partial_die): Use ctor.
7480 2018-02-26 Yao Qi <yao.qi@linaro.org>
7482 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7483 (find_partial_die_in_comp_unit): Change it to
7484 dwarf2_cu::find_partial_die.
7485 (find_partial_die): Update.
7487 2018-02-26 Yao Qi <yao.qi@linaro.org>
7489 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7492 2018-02-26 Yao Qi <yao.qi@linaro.org>
7494 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7496 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7498 * arch/amd64.h: Use common/tdesc.h.
7499 * arch/i386.c: Likewise.
7500 * arch/i386.h: Likewise.
7501 * arch/tic6x.c: Likewise.
7502 * arch/tdesc.h: Move file from here...
7503 * common/tdesc.h: ...to here.
7504 * features/aarch64-core.c: Regenerate.
7505 * features/aarch64-fpu.c: Regenerate.
7506 * features/i386/32bit-avx.c: Regenerate.
7507 * features/i386/32bit-avx512.c: Regenerate.
7508 * features/i386/32bit-core.c: Regenerate.
7509 * features/i386/32bit-linux.c: Regenerate.
7510 * features/i386/32bit-mpx.c: Regenerate.
7511 * features/i386/32bit-pkeys.c: Regenerate.
7512 * features/i386/32bit-sse.c: Regenerate.
7513 * features/i386/64bit-avx.c: Regenerate.
7514 * features/i386/64bit-avx512.c: Regenerate.
7515 * features/i386/64bit-core.c: Regenerate.
7516 * features/i386/64bit-linux.c: Regenerate.
7517 * features/i386/64bit-mpx.c: Regenerate.
7518 * features/i386/64bit-pkeys.c: Regenerate.
7519 * features/i386/64bit-segments.c: Regenerate.
7520 * features/i386/64bit-sse.c: Regenerate.
7521 * features/i386/x32-core.c: Regenerate.
7522 * features/tic6x-c6xp.c: Regenerate.
7523 * features/tic6x-core.c: Regenerate.
7524 * features/tic6x-gp.c: Regenerate.
7525 * target-descriptions.c: Use common/tdesc.h.
7526 * target-descriptions.h: Likewise.
7528 2018-02-24 Tom Tromey <tom@tromey.com>
7530 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7531 (try_thread_db_load_from_dir, thread_db_load_search): Use
7533 (info_auto_load_libthread_db_compare): Return bool. Change
7535 (info_auto_load_libthread_db): Use std::vector, std::string.
7538 2018-02-24 Tom Tromey <tom@tromey.com>
7540 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7542 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7544 * gdbarch.c: Rebuild.
7545 * gdbarch.h: Rebuild.
7546 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7547 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7548 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7551 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7553 * gdbtypes.h (sect_offset): Change type to uint64_t.
7554 (sect_offset_str): New function.
7555 * dwarf2read.c (create_addrmap_from_aranges): Use
7557 (error_check_comp_unit_head): Likewise.
7558 (create_debug_type_hash_table): Likewise.
7559 (read_cutu_die_from_dwo): Likewise.
7560 (init_cutu_and_read_dies): Likewise.
7561 (init_cutu_and_read_dies_no_follow): Likewise.
7562 (process_psymtab_comp_unit_reader): Likewise.
7563 (partial_die_parent_scope): Likewise.
7564 (peek_die_abbrev): Likewise.
7565 (process_queue): Likewise.
7566 (dwarf2_physname): Likewise.
7567 (read_namespace_alias): Likewise.
7568 (read_import_statement): Likewise.
7569 (create_dwo_cu_reader): Likewise.
7570 (create_cus_hash_table): Likewise.
7571 (lookup_dwo_cutu): Likewise.
7572 (inherit_abstract_dies): Likewise.
7573 (read_func_scope): Likewise.
7574 (read_call_site_scope): Likewise.
7575 (dwarf2_add_member_fn): Likewise.
7576 (read_common_block): Likewise.
7577 (read_module_type): Likewise.
7578 (read_typedef): Likewise.
7579 (read_subrange_type): Likewise.
7580 (load_partial_dies): Likewise.
7581 (read_partial_die): Likewise.
7582 (find_partial_die): Likewise.
7583 (read_str_index): Likewise.
7584 (dwarf2_string_attr): Likewise.
7585 (build_error_marker_type): Likewise.
7586 (lookup_die_type): Likewise.
7587 (dump_die_shallow): Likewise.
7588 (follow_die_ref): Likewise.
7589 (dwarf2_fetch_die_loc_sect_off): Likewise.
7590 (dwarf2_fetch_constant_bytes): Likewise.
7591 (follow_die_sig): Likewise.
7592 (get_signatured_type): Likewise.
7593 (get_DW_AT_signature_type): Likewise.
7594 (dwarf2_find_containing_comp_unit): Likewise.
7595 (set_die_type): Likewise.
7597 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7599 * arch/aarch64.c: Include "common-defs.h".
7600 * arch/amd64.c: Likewise.
7601 * arch/i386.c: Likewise.
7603 2018-02-21 Tom Tromey <tom@tromey.com>
7605 * value.h: (extract_field_op): Update.
7606 * eval.c (extract_field_op): Return a const char *.
7607 * expression.h (parse_expression_for_completion): Update.
7608 * completer.c (complete_expression): Update.
7609 (add_struct_fields): Make fieldname const.
7610 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7611 (mark_completion_tag, parse_exp_in_context_1): Update.
7612 (parse_expression_for_completion): Change "name" to
7613 unique_xmalloc_ptr*.
7615 2018-02-21 Tom Tromey <tom@tromey.com>
7617 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7619 2018-02-21 Yao Qi <yao.qi@linaro.org>
7621 * avr-tdep.c (avr_read_pc): Change parameter type to
7623 * gdbarch.sh (read_pc): Likewise.
7624 * gdbarch.c: Re-generated.
7625 * gdbarch.h: Re-generated.
7626 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7628 * ia64-tdep.c (ia64_read_pc): Likewise.
7629 * mips-tdep.c (mips_read_pc): Likewise.
7630 * spu-tdep.c (spu_read_pc): Likewise.
7632 2018-02-21 Yao Qi <yao.qi@linaro.org>
7634 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7635 * regcache-dump.c: New file.
7636 * regcache.c: Move register_dump to regcache-dump.c.
7637 (maintenance_print_registers): Likewise.
7638 (maintenance_print_raw_registers): Likewise.
7639 (maintenance_print_cooked_registers): Likewise.
7640 (maintenance_print_register_groups): Likewise.
7641 (maintenance_print_remote_registers): Likewise.
7642 (_initialize_regcache): Likewise.
7643 * regcache.h (register_dump): Moved from regcache.c.
7645 2018-02-21 Yao Qi <yao.qi@linaro.org>
7647 * regcache.c (regcache::regcache): Update.
7648 (regcache::invalidate): Move it to detached_regcache::invalidate.
7649 (get_thread_arch_aspace_regcache): Update.
7650 (regcache::raw_update): Update.
7651 (regcache::cooked_read): Remove some code.
7652 (regcache::cooked_read_value): Likewise.
7653 (regcache::raw_write): Remove assert on m_readonly_p.
7654 (regcache::raw_supply_integer): Move it to
7655 detached_regcache::raw_supply_integer.
7656 (regcache::raw_supply_zeroed): Likewise.
7657 * regcache.h (detached_regcache) <raw_supply_integer>: New
7659 <raw_supply_zeroed, invalidate>: Likewise.
7660 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7661 <invalidate>: Likewise.
7662 <m_readonly_p>: Removed.
7664 2018-02-21 Yao Qi <yao.qi@linaro.org>
7666 * infcmd.c (get_return_value): Let stop_regs point to
7667 get_current_regcache.
7668 * regcache.c (regcache::regcache): Remove.
7669 (register_dump_reg_buffer): New class.
7670 (regcache_print): Adjust.
7671 * regcache.h (regcache): Remove constructors.
7673 2018-02-21 Yao Qi <yao.qi@linaro.org>
7675 * regcache.c (class register_dump): New class.
7676 (register_dump_regcache, register_dump_none): New class.
7677 (register_dump_remote, register_dump_groups): New class.
7678 (regcache_print): Update.
7679 * regcache.h (regcache_dump_what): Move it to regcache.c.
7680 (regcache) <dump>: Remove.
7682 2018-02-21 Yao Qi <yao.qi@linaro.org>
7684 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7686 (jit_unwind_reg_set_impl): Call raw_supply.
7687 (jit_frame_sniffer): Use reg_buffer_rw.
7688 * record-full.c (record_full_core_regbuf): Change its type.
7689 (record_full_core_open_1): Use reg_buffer_rw.
7690 (record_full_close): Likewise.
7691 (record_full_core_fetch_registers): Use regcache->raw_supply.
7692 (record_full_core_store_registers): Likewise.
7693 * regcache.c (regcache::get_register_status): Move it to
7695 (regcache_raw_set_cached_value): Remove.
7696 (regcache::raw_set_cached_value): Remove.
7697 (regcache::raw_write): Call raw_supply.
7698 (regcache::raw_supply): Move it to reg_buffer_rw.
7699 * regcache.h (regcache_raw_set_cached_value): Remove.
7700 (reg_buffer_rw): New class.
7702 2018-02-21 Yao Qi <yao.qi@linaro.org>
7704 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7705 readonly_detached_regcache.
7706 (dummy_frame_prev_register): Use regcache->cooked_read.
7707 * frame.c (frame_save_as_regcache): Change return type.
7708 (frame_pop): Update.
7709 * frame.h (frame_save_as_regcache): Update declaration.
7710 * inferior.h (get_infcall_suspend_state_regcache): Update
7712 * infrun.c (infcall_suspend_state) <registers>: use
7713 readonly_detached_regcache.
7714 (save_infcall_suspend_state): Don't use regcache_dup.
7715 (get_infcall_suspend_state_regcache): Change return type.
7716 * linux-fork.c (struct fork_info) <savedregs>: Change to
7717 readonly_detached_regcache.
7719 (fork_save_infrun_state): Don't use regcache_dup.
7720 (info_checkpoints_command): Adjust.
7721 * mi/mi-main.c (register_changed_p): Update declaration.
7722 (mi_cmd_data_list_changed_registers): Use
7723 readonly_detached_regcache.
7724 (register_changed_p): Change parameter type to
7725 readonly_detached_regcache.
7726 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7727 readonly_detached_regcache.
7728 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7729 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7731 (regcache::save): Move it to reg_buffer.
7732 (regcache::restore): Change parameter type.
7733 (regcache_dup): Remove.
7734 * regcache.h (reg_buffer) <save>: New method.
7735 (readonly_detached_regcache): New class.
7736 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7737 readonly_detached_regcache.
7738 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7740 2018-02-21 Yao Qi <yao.qi@linaro.org>
7742 * frame.c (frame_save_as_regcache): Use regcache method save.
7743 (frame_pop): Use regcache method restore.
7744 * infrun.c (restore_infcall_suspend_state): Likewise.
7745 * linux-fork.c (fork_load_infrun_state): Likewise.
7746 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7748 * regcache.c (regcache_save): Remove.
7749 (regcache::restore): More asserts.
7750 (regcache_cpy): Remove.
7751 * regcache.h (regcache_save): Remove the declaration.
7752 (regcache::restore): Move from private to public.
7753 Remove the friend declaration of regcache_cpy.
7754 (regcache_cpy): Remove declaration.
7756 2018-02-21 Yao Qi <yao.qi@linaro.org>
7758 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7759 parameter type to 'readable_regcache *'.
7760 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7761 * arm-tdep.c (arm_neon_quad_read): Likewise.
7762 (arm_pseudo_read): Likewise.
7763 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7764 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7765 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7766 * gdbarch.c: Re-generated.
7767 * gdbarch.h: Re-generated.
7768 * gdbarch.sh (pseudo_register_read): Change parameter type to
7769 'readable_regcache *'.
7770 (pseudo_register_read_value): Likewise.
7771 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7772 (h8300_pseudo_register_read): Likewise.
7773 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7774 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7775 (i386_pseudo_register_read_into_value): Likewise.
7776 (i386_pseudo_register_read_value): Likewise.
7777 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7779 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7780 * m32c-tdep.c (m32c_raw_read): Likewise.
7781 (m32c_read_flg): Likewise.
7782 (m32c_banked_register): Likewise.
7783 (m32c_banked_read): Likewise.
7784 (m32c_sb_read): Likewise.
7785 (m32c_part_read): Likewise.
7786 (m32c_cat_read): Likewise.
7787 (m32c_r3r2r1r0_read): Likewise.
7788 (m32c_pseudo_register_read): Likewise.
7789 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7790 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7791 (mep_pseudo_cr64_read): Likewise.
7792 (mep_pseudo_register_read): Likewise.
7793 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7794 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7795 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7796 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7797 (regcache::cooked_read): Likewise.
7798 (regcache::cooked_read_value): Likewise.
7799 (regcache_cooked_read_signed):
7800 (regcache::cooked_read): Likewise.
7801 * regcache.h (readable_regcache): New class.
7802 (regcache): Inherit readable_regcache. Move some methods to
7804 * rl78-tdep.c (rl78_pseudo_register_read): Change
7805 parameter type to 'readable_regcache *'.
7806 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7807 (e500_pseudo_register_read): Change parameter type to
7808 'readable_regcache *'.
7809 (dfp_pseudo_register_read): Likewise.
7810 (vsx_pseudo_register_read): Likewise.
7811 (efpr_pseudo_register_read): Likewise.
7812 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7813 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7814 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7815 (sh64_pseudo_register_read): Likewise.
7816 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7817 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7818 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7819 (spu_pseudo_register_read): Likewise.
7820 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7821 (xtensa_pseudo_register_read): Likewise.
7823 2018-02-21 Yao Qi <yao.qi@linaro.org>
7825 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7826 (regcache::arch): Move it to reg_buffer::arch.
7827 (regcache::register_buffer): Likewise.
7828 (regcache::assert_regnum): Likewise.
7829 (regcache::num_raw_registers): Likewise.
7830 * regcache.h (reg_buffer): New class.
7831 (regcache): Inherit reg_buffer.
7833 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7835 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7836 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7838 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7840 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7842 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7844 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7845 (SFILES): Remove common/*.c files.
7846 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7847 * common/common.host: Add common reference.
7848 * configure.ac: Likewise.
7849 * configure: Regenerate.
7851 2018-02-16 Yao Qi <yao.qi@linaro.org>
7853 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7854 (block_initialize_namespace): Use new.
7855 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7856 (dwarf2_free_objfile): Use delete.
7857 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7858 (copy_type_recursive): Use new.
7859 * gdb_obstack.h (allocate_on_obstack): New.
7861 2018-02-15 Yao Qi <yao.qi@linaro.org>
7864 * inferior.c (exit_inferior_1): Reset inf->control.
7866 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7868 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7871 2018-02-14 Pedro Alves <palves@redhat.com>
7873 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7874 frame_cleanup_after_sniffer on exception.
7876 2018-02-14 Tom Tromey <tom@tromey.com>
7878 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7880 (solib_bfd_open): Make pathname const.
7881 * solib.c (solib_bfd_open): Make pathname const.
7882 * solib-spu.c (spu_bfd_fopen): Make name const.
7883 (spu_bfd_open): Make pathname const.
7884 * solib-darwin.c (darwin_bfd_open): Make pathname const.
7885 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7887 2018-02-14 Tom Tromey <tom@tromey.com>
7889 * symfile.c (symfile_bfd_open): Update.
7890 * source.h (openp, source_full_path_of, find_and_open_source):
7891 Change argument type to unique_xmalloc_ptr.
7892 * source.c (openp): Take a unique_xmalloc_ptr.
7893 (source_full_path_of, find_and_open_source): Likewise.
7894 (open_source_file, symtab_to_fullname): Update.
7895 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
7897 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7898 (exec_file_find): Update.
7899 * psymtab.c (psymtab_to_fullname): Update.
7900 * nto-tdep.h (nto_find_and_open_solib): Update.
7901 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7903 * exec.c (exec_file_attach): Update.
7904 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7905 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7907 2018-02-14 Tom Tromey <tom@tromey.com>
7909 * solib.c: Include source.h.
7910 * nto-tdep.c: Include source.h.
7911 * mi/mi-cmd-env.c: Include source.h.
7912 * infcmd.c: Include source.h.
7913 * exec.c: Include source.h.
7914 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7915 (add_path, directory_switch, source_path, init_source_path): Move
7917 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7918 (add_path, directory_switch, source_path, init_source_path):
7921 2018-02-14 Tom Tromey <tom@tromey.com>
7923 * solist.h (exec_file_find, solib_find): Return
7925 (solib_bfd_fopen): Take a const char *.
7926 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7927 (exec_file_find, solib_find): Likewise.
7928 (solib_bfd_fopen): Do not take ownership of "pathname".
7929 (solib_bfd_open): Use unique_xmalloc_ptr.
7930 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7931 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7932 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7933 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7935 2018-02-14 Joel Brobecker <brobecker@adacore.com>
7937 * ada-lang.c (name_match_type_from_name): Remove reference to
7938 ada_name_for_lookup in function's documentation.
7939 * ada-lang.h (ada_name_for_lookup): Delete declaration.
7941 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7943 * defs.h (enum openp_flags): New enum.
7944 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7945 Move to enum openp_flags.
7946 (openp_flags): New enum flags.
7947 (openp): Change parameter type to openp_flags.
7948 * source.c (openp): Change parameter type to openp_flags.
7949 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7950 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7952 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7954 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7957 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
7959 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7961 (class dwarf2_queue_guard): ...the destructor of this new class.
7962 (dw2_do_instantiate_symtab): Create instance of the new class
7963 dwarf2_queue_guard, remove cleanup.
7965 2018-02-09 Tom Tromey <tom@tromey.com>
7967 * source.c (find_source_lines): Don't reference past the end of
7970 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7972 * remote.c (remote_btrace_maybe_reopen): Change error message.
7973 * btrace.c (btrace_enable): Likewise.
7974 (parse_xml_btrace): Likewise.
7975 (parse_xml_btrace_conf): Likewise.
7977 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7979 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7980 (linux_enable_pt, linux_enable_bts): Call
7981 diagnose_perf_event_open_fail.
7983 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7985 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7986 Remove parameter and change return type. Update callers. Move it.
7987 (linux_enable_bts, linux_enable_pt): Improve error message.
7988 (linux_enable_pt): Remove zero buffer size check.
7989 (linux_enable_btrace): Improve error messages. Remove NULL return
7992 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7994 * btrace.c (btrace_enable): Remove target_supports_btrace call.
7995 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7996 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7997 (linux_supports_pt, linux_supports_btrace): Remove.
7998 (linux_enable_bts): Call cpu_supports_bts.
7999 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8000 * remote.c (remote_supports_btrace): Remove.
8001 (init_remote_ops): Remove remote_supports_btrace.
8002 * target-delegates.c: Regenerated.
8003 * target.c (target_supports_btrace): Remove.
8004 * target.h (target_ops) <to_supports_btrace>: Remove
8005 (target_supports_btrace): Remove.
8006 * x86-linux-nat.c (x86_linux_create_target): Remove
8007 linux_supports_btrace.
8009 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8011 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8013 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8014 exception and use message in own exception.
8016 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8018 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8019 (perf_event_pt_event_type): Use gdb_file_up.
8020 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8021 scoped_fd, and scoped_mmap.
8023 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8025 * common/scoped_mmap.h: New.
8026 * unittests/scoped_mmap-selftest.c: New.
8027 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8028 unittests/scoped_mmap-selftest.c.
8030 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8032 * common/scoped_fd.h: New.
8033 * unittests/scoped_fd-selftest.c: New.
8034 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8035 unittests/scoped_fd-selftest.c.
8037 2018-02-09 Tom Tromey <tom@tromey.com>
8039 * auto-load.c (auto_load_section_scripts): Use
8040 gdb::unique_xmalloc_ptr.
8042 2018-02-09 Tom Tromey <tom@tromey.com>
8044 * auto-load.c (execute_script_contents): Use std::string.
8046 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8048 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8049 Python function, rather than a new command.
8051 2018-02-08 Tom Tromey <tom@tromey.com>
8053 * solib.c (solib_find_1): Use std::string.
8054 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8056 2018-02-08 Tom Tromey <tom@tromey.com>
8058 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8060 2018-02-08 Tom Tromey <tom@tromey.com>
8062 * source.c (find_source_lines): Use gdb::def_vector.
8064 2018-02-08 Tom Tromey <tom@tromey.com>
8066 * macrocmd.c (struct temporary_macro_definition): New.
8067 (macro_define_command): Use temporary_macro_definition. Remove
8069 (free_macro_definition_ptr): Remove.
8071 2018-02-08 Tom Tromey <tom@tromey.com>
8073 * macroexp.c (maybe_expand): Use std::string.
8075 2018-02-08 Tom Tromey <tom@tromey.com>
8077 * macroexp.c (struct macro_buffer): Add initializers for some
8079 (init_buffer, init_shared_buffer, free_buffer)
8080 (free_buffer_return_text): Remove.
8081 (macro_buffer): New constructors.
8082 (~macro_buffer): New destructor.
8083 (macro_buffer::set_shared): New method.
8084 (macro_buffer::resize_buffer, macro_buffer::appendc)
8085 (macro_buffer::appendmem): Now methods, not free functions.
8086 (set_token, append_tokens_without_splicing, stringify)
8087 (macro_stringify): Update.
8088 (gather_arguments): Change return type. Remove argc_p argument,
8089 add args_ptr argument. Use std::vector.
8090 (substitute_args): Remove argc argument. Accept std::vector.
8091 (expand): Update. Use std::vector.
8092 (scan, macro_expand, macro_expand_next): Update.
8094 2018-02-08 Tom Tromey <tom@tromey.com>
8096 * symtab.c (default_collect_symbol_completion_matches_break_on):
8097 Use unique_xmalloc_ptr.
8098 * macroscope.h: (sal_macro_scope, user_macro_scope)
8099 (default_macro_scope): Return unique_xmalloc_ptr.
8100 * macroscope.c (sal_macro_scope, user_macro_scope)
8101 (default_macro_scope): Return unique_xmalloc_ptr.
8102 * macroexp.h (macro_expand, macro_expand_once): Return
8104 * macroexp.c (macro_expand, macro_expand_once): Return
8106 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8107 (info_macro_command, info_macros_command): Use
8109 * compile/compile-c-support.c (write_macro_definitions): Use
8111 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8113 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8115 * value.c (value_static_field): Assign field type instead of
8116 containing type when returning an optimized out value.
8118 2018-02-06 Yao Qi <yao.qi@linaro.org>
8120 * ft32-tdep.c (ft32_read_pc): Remove.
8121 (ft32_write_pc): Remove.
8122 (ft32_gdbarch_init): Update.
8123 * m32r-tdep.c (m32r_read_pc): Remove.
8124 (m32r_gdbarch_init): Update.
8125 * mep-tdep.c (mep_read_pc): Remove.
8126 (mep_gdbarch_init): Update.
8127 * microblaze-tdep.c (microblaze_write_pc): Remove.
8128 (microblaze_gdbarch_init): Update.
8129 * mn10300-tdep.c (mn10300_read_pc): Remove.
8130 (mn10300_write_pc): Remove.
8131 (mn10300_gdbarch_init): Update.
8132 * moxie-tdep.c (moxie_read_pc): Remove.
8133 (moxie_write_pc): Remove.
8134 (moxie_gdbarch_init): Update.
8136 2018-02-06 Yao Qi <yao.qi@linaro.org>
8138 * expprint.c (print_subexp_standard): Handle
8139 OP_F77_UNDETERMINED_ARGLIST.
8140 (dump_subexp_body_standard): Likewise.
8142 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8144 * target-descriptions.c (tdesc_element_visitor) Add empty
8146 (tdesc_type): Move make_gdb_type from here.
8147 (tdesc_type_builtin): Likewise.
8148 (tdesc_type_vector): Likewise.
8149 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8150 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8151 (make_gdb_type_union): Likewise.
8152 (make_gdb_type_flags): Likewise.
8153 (make_gdb_type_enum): Likewise.
8154 (make_gdb_type): New function.
8155 (tdesc_register_type): Use static make_gdb_type.
8157 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8159 * infcmd.c (default_print_one_register_info): Align natural-format
8160 column values consistently one under another.
8161 (pad_to_column): New function.
8163 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8165 * dwarf2read.c (dwarf2_physname): Move commment.
8167 2018-02-01 Leszek Swirski <leszeks@google.com>
8169 * varobj.c (varobj_formatted_print_options): Allow recursive
8170 pretty printing if pretty printing is enabled.
8172 2018-02-01 Leszek Swirski <leszeks@google.com>
8174 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8175 names after a structop as a filename.
8177 2018-02-01 Yao Qi <yao.qi@linaro.org>
8179 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8180 (arm_record_coproc_data_proc): Likewise.
8182 2018-02-01 Yao Qi <yao.qi@linaro.org>
8184 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8186 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8188 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8189 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8191 2018-01-31 Pedro Alves <palves@redhat.com>
8193 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8194 * inflow.c (child_terminal_save_inferior): Wrap reference to
8195 tcgetpgrp in HAVE_TERMIOS_H.
8196 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8198 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8199 always iterate over all inferiors.
8200 (gdbsim_cntrl_c): Adjust.
8201 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8203 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8205 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8206 index type is objfile-owned if the element type is as well.
8208 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8212 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8214 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8215 "features/s390x-linux64.c".
8216 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8217 s390_linux32 and s390x_linux64.
8218 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8220 * s390-tdep.c: Include "features/s390-linux32.c" and
8221 "features/s390x-linux64.c".
8222 (s390_tdesc_valid): Add check for tdesc_has_registers.
8223 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8224 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8225 tdesc_s390x_linux64.
8226 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8227 tdesc_s390x_linux64 to...
8228 * s390-tdep.h: ...here.
8230 2018-01-30 Pedro Alves <palves@redhat.com>
8233 * config.in, configure: Regenerate.
8234 * configure.ac: Check for getpgid.
8235 * go32-nat.c (go32_pass_ctrlc): New.
8236 (go32_target): Install it.
8237 * inf-child.c (inf_child_target): Install
8238 child_terminal_save_inferior, child_pass_ctrlc and
8240 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8241 (inf_ptrace_target): No longer install it.
8242 * infcmd.c (interrupt_target_1): Adjust.
8243 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8244 (child_interrupt): Declare.
8245 (inferior::terminal_state): New.
8246 * inflow.c (struct terminal_info): Update comments.
8247 (inferior_process_group): Delete.
8248 (terminal_is_ours): Delete.
8249 (gdb_tty_state): New.
8250 (child_terminal_init): Adjust.
8251 (is_gdb_terminal, sharing_input_terminal_1)
8252 (sharing_input_terminal): New functions.
8253 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8254 Set the process's actual process group in the foreground if
8255 possible. Handle is_ours_for_output/is_ours distinction. Don't
8256 mark terminal as the inferior's if not sharing GDB's terminal.
8257 Don't check attach_flag.
8258 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8259 pass down a target_terminal_state.
8260 (child_terminal_save_inferior): New, factored out from ...
8261 (child_terminal_ours_1): ... this. Handle
8262 target_terminal_state::is_ours_for_output.
8263 (child_interrupt, child_pass_ctrlc): New.
8264 (inflow_inferior_exit): Clear the inferior's terminal_state.
8265 (copy_terminal_info): Copy the inferior's terminal state.
8266 (_initialize_inflow): Remove reference to terminal_is_ours.
8267 * inflow.h (inferior_process_group): Delete.
8268 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8269 * procfs.c (procfs_target): Don't install procfs_interrupt.
8270 (procfs_interrupt): Delete.
8271 * remote.c (remote_serial_quit_handler): Adjust.
8272 (remote_interrupt): Remove ptid parameter. Adjust.
8273 * target-delegates.c: Regenerate.
8274 * target.c: Include "terminal.h".
8275 (target_terminal::terminal_state): Rename to ...
8276 (target_terminal::m_terminal_state): ... this.
8277 (target_terminal::init): Adjust.
8278 (target_terminal::inferior): Adjust to per-inferior
8280 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8281 (target_terminal::ours, target_terminal::ours_for_output): Use
8282 target_terminal_is_ours_kind.
8283 (target_interrupt): Remove ptid parameter. Adjust.
8284 (default_target_pass_ctrlc): Adjust.
8285 * target.h (target_ops::to_terminal_save_inferior): New field.
8286 (target_ops::to_interrupt): Remove ptid_t parameter.
8287 (target_interrupt): Remove ptid_t parameter. Update comment.
8288 (target_pass_ctrlc): Update comment.
8289 * target/target.h (target_terminal_state): New scoped enum,
8291 (target_terminal::terminal_state): ... here.
8292 (target_terminal::inferior): Update comments.
8293 (target_terminal::restore_inferior): New.
8294 (target_terminal::is_inferior, target_terminal::is_ours)
8295 (target_terminal::is_ours_for_output): Adjust.
8296 (target_terminal::scoped_restore_terminal_state): Adjust to
8297 rename, and call restore_inferior() instead of inferior().
8298 (target_terminal::scoped_restore_terminal_state::m_state): Change
8300 (target_terminal::terminal_state): Rename to ...
8301 (target_terminal::m_terminal_state): ... this and change type.
8303 2018-01-30 Pedro Alves <palves@redhat.com>
8305 * linux-nat.c (wait_for_signal): New function.
8306 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8308 (async_terminal_is_ours)
8309 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8310 (linux_nat_add_target): Don't override
8311 to_terminal_inferior/to_terminal_ours.
8313 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8315 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8317 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8319 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8320 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8321 dwarf2_per_objfile_free here.
8322 (dwarf2_per_objfile_free): Remove.
8323 (_initialize_dwarf2_read): Don't register
8324 dwarf2_per_objfile_free as a registry cleanup.
8326 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8328 Avoid compilation errors in MinGW native builds
8330 The error is triggered by including python-internal.h, and the
8333 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8334 from build-gnulib/import/math.h:27,
8335 from d:/usr/Python26/include/pyport.h:235,
8336 from d:/usr/Python26/include/Python.h:58,
8337 from python/python-internal.h:94,
8338 from python/py-arch.c:24:
8339 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8343 This happens because Python headers define 'hypot' to expand t
8344 '_hypot' in the Windows builds.
8345 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8346 'hypoth'. This avoids a compilation error.
8348 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8350 * MAINTAINERS (Write After Approval): Fix ordering.
8352 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8354 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8356 2018-01-26 Alan Modra <amodra@gmail.com>
8358 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8359 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8360 Remove nop. Make const. Comment.
8361 (powerpc32_plt_stub_so_2): New.
8362 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8363 Correct count. Update uses.
8364 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8365 Move common code reading PLT entry word. Correct
8366 powerpc32_plt_stub PLT address calculation.
8367 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8368 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8369 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8370 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8371 (ppc64_standard_linkage8): Likewise.
8372 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8373 Correct insns description.
8374 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8376 2018-01-24 Pedro Alves <palves@redhat.com>
8378 GCC PR libstdc++/83906
8379 * gdbtypes.c (operator==(const dynamic_prop &,
8380 const dynamic_prop &)): New.
8381 (operator==(const range_bounds &, const range_bounds &)): New.
8382 (check_types_equal): Use them instead of memcmp.
8383 * gdbtypes.h (operator==(const dynamic_prop &,
8384 const dynamic_prop &)): Declare.
8385 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8386 (operator==(const range_bounds &, const range_bounds &)): Declare.
8387 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8389 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8391 * s390-linux-tdep.c (s390_record_address_mask)
8392 (s390_record_calc_disp_common, s390_record_calc_disp)
8393 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8394 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8395 (s390_process_record): Move to s390-tdep.c.
8396 (s390_linux_init_abi_any): Adjust.
8397 * s390-tdep.c (s390_record_address_mask)
8398 (s390_record_calc_disp_common, s390_record_calc_disp)
8399 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8400 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8401 (s390_process_record): Moved from s390-linux-tdep.c
8402 (s390_gdbarch_init): Adjust.
8404 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8406 * s390-linux-nat.c (s390-tdep.h): New include.
8407 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8408 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8409 (ALLDEPFILES): Add s390-tdep.c.
8410 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8411 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8412 * s390-tdep.h: ...this. New file.
8413 * s390-linux-tdep.c (s390-tdep.h): New include.
8414 (_initialize_s390_tdep): Rename to...
8415 (_initialize_s390_linux_tdep): ...this and adjust.
8416 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8417 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8419 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8420 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8421 (s390_is_partial_instruction, s390_software_single_step)
8422 (is_non_branch_ril, s390_displaced_step_copy_insn)
8423 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8424 (s390_prologue_data, s390_addr, s390_store, s390_load)
8425 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8426 (s390_register_call_saved, s390_guess_tracepoint_registers)
8427 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8428 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8429 (s390_pseudo_register_name, s390_pseudo_register_type)
8430 (s390_pseudo_register_read, s390_pseudo_register_write)
8431 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8432 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8433 (s390_addr_bits_remove, s390_address_class_type_flags)
8434 (s390_address_class_type_flags_to_name)
8435 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8436 (s390_function_arg_float, s390_function_arg_vector)
8437 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8438 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8439 (s390_frame_align, s390_register_return_value, s390_return_value)
8440 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8441 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8442 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8443 (s390_trad_frame_prev_register, s390_unwind_cache)
8444 (s390_prologue_frame_unwind_cache)
8445 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8446 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8447 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8448 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8449 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8450 (s390_frame_base_address, s390_local_base_address)
8451 (s390_frame_base, s390_gcc_target_options)
8452 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8453 (s390_validate_reg_range, s390_tdesc_valid)
8454 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8455 * s390-tdep.c: ...this. New file.
8457 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8459 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8460 (s390_process_record, s390_gdbarch_tdep_alloc)
8461 (s390_linux_init_abi_any): Use/set new hook.
8463 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8465 * s390-linux-tdep.c (osabi.h): New include.
8466 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8467 (s390_linux_init_abi_any): New functions.
8468 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8470 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8472 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8473 tdesc_has_registers check
8475 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8477 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8478 (s390_validate_reg_range): New macro.
8479 (s390_gdbarch_init): Adjust.
8481 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8483 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8484 (s390_gdbarch_tdep_alloc): Adjust.
8485 (s390_gdbarch_init): Adjust.
8487 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8489 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8490 <have_tdb>: Change type to bool.
8491 (s390_gdbarch_tdep_alloc): Adjust.
8492 (s390_gdbarch_init): Adjust.
8494 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8496 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8497 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8498 (s390_gdbarch_tdep_alloc): New function.
8499 (s390_gdbarch_init): Allocate tdep at start and use its fields
8500 instead of separate variables.
8502 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8504 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8505 when looking for cached gdbarch and add comment for remaining.
8507 2018-01-22 Pedro Alves <palves@redhat.com>
8508 Sergio Durigan Junior <sergiodj@redhat.com>
8510 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8513 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8515 * MAINTAINERS: Update my company e-mail address.
8517 2018-01-22 Yao Qi <yao.qi@linaro.org>
8519 * regcache.c (cooked_write_test): New function.
8520 (_initialize_regcache): Register the test.
8522 2018-01-22 Yao Qi <yao.qi@linaro.org>
8524 * ia64-tdep.c (ia64_pseudo_register_read): Call
8525 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8526 * m32c-tdep.c (m32c_cat_read): Likewise.
8527 (m32c_r3r2r1r0_read): Likewise.
8528 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8529 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8531 2018-01-22 Yao Qi <yao.qi@linaro.org>
8533 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8534 method raw_read instead of regcache_raw_read.
8535 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8536 * arm-tdep.c (arm_neon_quad_read): Likewise.
8537 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8538 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8539 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8540 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8541 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8542 (i386_pseudo_register_read_into_value): Likewise.
8543 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8544 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8545 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8546 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8547 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8548 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8549 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8550 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8551 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8553 2018-01-22 Yao Qi <yao.qi@linaro.org>
8555 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8556 * configure.tgt: Remove target mt.
8557 * mt-tdep.c: Remove.
8558 * regcache.c (cooked_read_test): Remove the check for mt.
8560 2018-01-22 Yao Qi <yao.qi@linaro.org>
8562 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8563 instead of gdbarch_pseudo_register_read_value.
8565 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8567 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8570 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8572 * linespec.c (create_sals_line_offset): Remove code that preserved
8573 the symtab_and_line's line number.
8575 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8577 * varobj.c (varobj_create): Don't set valid_block when creating a
8580 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8582 * varobj.c (varobj_create): Remove out of date comment.
8584 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8587 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8588 updating innermost block.
8589 * parse.c (innermost_block_tracker::update): Take extra type
8590 parameter, and check types match before updating innermost block.
8591 (write_dollar_variable): Update innermost block for registers.
8592 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8593 (innermost_block_tracker::innermost_block_tracker): Initialise
8595 (innermost_block_tracker::reset): Take type parameter.
8596 (innermost_block_tracker::update): Take type parameter, and pass
8597 type through as needed.
8598 (innermost_block_tracker::m_types): New member.
8599 * varobj.c (varobj_create): Pass type when reseting innermost
8602 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8604 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8605 * ada-lang.c (resolve_subexp): Likewise.
8606 * breakpoint.c (set_breakpoint_condition) Likewise.
8607 (watch_command_1) Likewise.
8608 * c-exp.y (variable): Likewise.
8609 * d-exp.y (PrimaryExpression): Likewise.
8610 * f-exp.y (variable): Likewise.
8611 * go-exp.y (variable): Likewise.
8612 * m2-exp.y (variable): Likewise.
8613 * objfiles.c (objfile::~objfile): Likewise.
8614 * p-exp.y (variable): Likewise.
8615 * parse.c (innermost_block): Change type.
8616 * parser-defs.h (class innermost_block_tracker): New.
8617 (innermost_block): Change to innermost_block_tracker.
8618 * printcmd.c (display_command): Switch to innermost_block API.
8619 (do_one_display): Likewise.
8620 * rust-exp.y (do_one_display): Likewise.
8621 * symfile.c (clear_symtab_users): Likewise.
8622 * varobj.c (varobj_create): Switch to innermost_block API, replace
8623 use of innermost_block with block stored on varobj object.
8625 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8627 * expression.h (innermost_block): Remove declaration.
8628 * varobj.c: Add 'parser-defs.h' include.
8630 2018-01-19 Tom Tromey <tom@tromey.com>
8632 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8633 symbols in the static and global blocks.
8635 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8637 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8638 gdb_ptrace.h, and move including gdb_wait.h ...
8639 * nat/linux-ptrace.h: ... to here.
8641 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8643 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8644 inf_ptrace_detach_success.
8645 (inf_ptrace_detach_success): Add inferior parameter, use it
8646 instead of inferior_ptid, pass it to detach_inferior.
8647 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8649 * inferior.c (detach_inferior): Add overload that takes an
8651 * inferior.h (detach_inferior): Likewise.
8652 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8653 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8654 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8656 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8658 * target.h (struct target_ops) <to_detach>: Add inferior
8660 (target_detach): Likewise.
8661 * target.c (dispose_inferior): Pass inferior down.
8662 (target_detach): Pass inferior down. Assert that it is equal to
8663 the current inferior.
8664 * aix-thread.c (aix_thread_detach): Pass inferior down.
8665 * corefile.c (core_file_command): Pass current_inferior() down.
8666 * corelow.c (core_detach): Add inferior parameter.
8667 * darwin-nat.c (darwin_detach): Likewise.
8668 * gnu-nat.c (gnu_detach): Likewise.
8669 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8670 * infcmd.c (detach_command): Pass current_inferior() down to
8672 * infrun.c (follow_fork_inferior): Pass parent_inf to
8674 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8676 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8677 * linux-thread-db.c (thread_db_detach): Likewise.
8678 * nto-procfs.c (procfs_detach): Likewise.
8679 * procfs.c (procfs_detach): Likewise.
8680 * record.c (record_detach): Likewise.
8681 * record.h (struct inferior): Forward-declare.
8682 (record_detach): Add inferior parameter.
8683 * remote-sim.c (gdbsim_detach): Likewise.
8684 * remote.c (remote_detach_1): Likewise.
8685 (remote_detach): Likewise.
8686 (extended_remote_detach): Likewise.
8687 * sol-thread.c (sol_thread_detach): Likewise.
8688 * target-debug.h (target_debug_print_inferior_p): New macro.
8689 * target-delegates.c: Re-generate.
8690 * top.c (kill_or_detach): Pass inferior down to target_detach.
8691 * windows-nat.c (windows_detach): Add inferior parameter.
8693 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8695 * target.h (struct target_ops) <to_detach>: Remove args
8697 (target_detach): Likewise.
8698 * target.c (dispose_inferior): Adjust.
8699 (target_detach): Remove args parameter, adjust.
8700 * aix-thread.c (aix_thread_detach): Adjust.
8701 * corefile.c (core_file_command): Adjust.
8702 * corelow.c (core_detach): Adjust.
8703 * darwin-nat.c (darwin_detach): Adjust.
8704 * gnu-nat.c (gnu_detach): Adjust.
8705 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8706 * infcmd.c (detach_command): Adjust
8707 * infrun.c (follow_fork_inferior): Adjust.
8708 (handle_vfork_child_exec_or_exit): Adjust.
8709 * linux-fork.c (linux_fork_detach): Remove args parameter.
8710 * linux-fork.h (linux_fork_detach): Likewise.
8711 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8712 * linux-thread-db.c (thread_db_detach): Likewise.
8713 * nto-procfs.c (procfs_detach): Likewise.
8714 * procfs.c (procfs_detach): Likewise.
8715 (do_detach): Remove signo parameter.
8716 * record.c (record_detach): Remove args parameter.
8717 * record.h (record_detach): Likewise.
8718 * remote-sim.c (gdbsim_detach): Likewise.
8719 * remote.c (remote_detach_1): Likewise.
8720 (remote_detach): Likewise.
8721 (extended_remote_detach): Likewise.
8722 * sol-thread.c (sol_thread_detach): Likewise.
8723 * target-delegates.c: Re-generate.
8724 * top.c (struct qt_args) <args>: Remove field.
8725 (kill_or_detach): Don't pass args.
8726 (quit_force): Don't set args.
8727 * windows-nat.c (windows_detach): Remove args parameter.
8729 2018-01-19 Yao Qi <yao.qi@linaro.org>
8731 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8732 (arm_linux_init_abi): Install it.
8734 2018-01-19 Yao Qi <yao.qi@linaro.org>
8736 * osabi.c (gdb_osabi_names): Extend the regexp for
8737 arm-linux-gnueabihf.
8739 2018-01-18 Yao Qi <yao.qi@linaro.org>
8741 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8743 (abbrev_table::add_abbrev): Update.
8744 (abbrev_table::lookup_abbrev): Update.
8746 2018-01-18 Yao Qi <yao.qi@linaro.org>
8748 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8750 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8752 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8755 2018-01-17 Tom Tromey <tom@tromey.com>
8757 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8759 2018-01-17 Tom Tromey <tom@tromey.com>
8761 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8762 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8763 (create_array_type_with_stride): Update.
8764 * dwarf2read.c (set_die_type): Update.
8766 2018-01-17 Tom Tromey <tom@tromey.com>
8768 * dwarf2read.c (delayed_method_info): Remove typedef.
8769 (dwarf2_cu::method_info): Now a std::vector.
8770 (add_to_method_list): Update.
8771 (free_delayed_list): Remove.
8772 (compute_delayed_physnames): Update.
8773 (process_full_comp_unit, process_full_type_unit): Clear the method
8774 list. Remove cleanups.
8775 (psymtab_include_file_name): Add name_holder parameter. Use
8777 (dwarf_decode_lines): Update.
8779 2018-01-17 Tom Tromey <tom@tromey.com>
8780 Simon Marchi <simon.marchi@ericsson.com>
8782 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8783 (dwarf2_per_objfile::free_cached_comp_units)
8784 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8785 (init_cutu_and_read_dies_no_follow): Update.
8786 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8787 (dwarf2_cu::~dwarf2_cu): New.
8788 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8789 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8791 2018-01-17 Tom Tromey <tom@tromey.com>
8792 Simon Marchi <simon.marchi@ericsson.com>
8794 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8795 (struct die_reader_specs) <abbrev_table>: New member.
8796 (struct abbrev_table): Add constructor.
8797 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8798 <abbrev_obstack>: Now an auto_obstack.
8799 (abbrev_table_up): New typedef.
8800 (init_cu_die_reader): Add abbrev_table parameter.
8801 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8802 Add result_dwo_abbrev_table.
8803 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8804 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8806 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8808 (skip_children): Update.
8809 (abbrev_table::alloc_abbrev): Rename from
8810 abbrev_table_alloc_abbrev.
8811 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8812 (abbrev_table::lookup_abbrev): Rename from
8813 abbrev_table_lookup_abbrev.
8814 (abbrev_table_read_table): Return abbrev_table_up.
8815 (abbrev_table_free, abbrev_table_free_cleanup)
8816 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8817 (load_partial_dies): Update.
8819 2018-01-17 Tom Tromey <tom@tromey.com>
8821 * dwarf2read.c (dwarf2_compute_name): Update comment.
8822 (read_func_scope, read_variable): Update.
8823 (new_symbol): Remove.
8824 (new_symbol_full): Rename to new_symbol.
8826 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8829 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8830 a warning instead of throwing an error, set section size to 0 and return
8832 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8834 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8836 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8838 (linux_ptrace_attach_fail_reason_string): Likewise.
8839 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8841 (linux_ptrace_attach_fail_reason_string): Likewise.
8842 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8844 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8846 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8848 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8851 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8852 checking for fs_base/gs_base fields in struct user_regs_struct.
8853 * configure: Regenerate.
8855 2018-01-17 Yao Qi <yao.qi@linaro.org>
8857 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8859 (aarch64_linux_init_abi): Install it to gdbarch hook
8862 2018-01-15 Pedro Alves <palves@redhat.com>
8864 * common/signals-state-save-restore.c
8865 (save_original_signals_state): Fix typos.
8867 2017-01-12 Tom Tromey <tom@tromey.com>
8868 Sergio Durigan Junior <sergiodj@redhat.com>
8870 * Makefile.in (install-only): Install gdb-add-index.
8872 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8874 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8876 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8878 * infrun.c (keep_going_pass_signal): Clear step-over info when
8879 insert_breakpoints fails.
8881 2018-01-11 Pedro Alves <palves@redhat.com>
8884 * infrun.c (resume): Rename to ...
8885 (resume_1): ... this.
8886 (resume): Reimplement as wrapper around resume_1.
8888 2018-01-11 Pedro Alves <palves@redhat.com>
8891 * remote.c (remote_parse_stop_reply): Default to the last-set
8892 general thread instead of to 'magic_null_ptid'.
8894 2018-01-10 Pedro Alves <palves@redhat.com>
8896 * language.h (language_get_symbol_name_matcher): Rename ...
8897 (get_symbol_name_matcher): ... this.
8898 * language.c (language_get_symbol_name_matcher): Ditto.
8899 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8902 2018-01-10 Pedro Alves <palves@redhat.com>
8906 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8907 Adjust to use language_get_symbol_name_matcher instead of
8908 language_defn::la_get_symbol_name_matcher.
8909 * language.c (language_get_symbol_name_matcher): If in Ada mode
8910 and the lookup name is a verbatim match, return Ada's matcher.
8911 * language.h (language_get_symbol_name_matcher): Adjust comment.
8912 (ada_lookup_name_info::verbatim_p):: New method.
8914 2018-01-10 Pedro Alves <palves@redhat.com>
8917 * ada-lang.c (ada_collect_symbol_completion_matches): If the
8918 minsym's language is language_auto or language_cplus, pass down
8919 language_ada instead.
8920 * symtab.c (compare_symbol_name): Don't frob symbol language here.
8922 2018-01-10 Pedro Alves <palves@redhat.com>
8925 * minsyms.c (linkage_name_str): New function.
8926 (iterate_over_minimal_symbols): Use it.
8928 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8930 * NEWS: Document that 'info proc' now works on FreeBSD.
8932 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8934 * configure.ac: Check for kinfo_getfile in libutil.
8935 * configure: Regenerate.
8936 * config.in: Regenerate.
8937 * fbsd-nat.c: Include "fbsd-tdep.h".
8938 (fbsd_fetch_cmdline): New.
8939 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8940 rather than calling error.
8941 (fbsd_info_proc): New.
8942 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8943 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8944 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8946 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8948 * fbsd-nat.c (struct free_deleter): Remove.
8949 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8951 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8953 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8954 NULL for an empty pathname.
8956 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8958 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8959 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8960 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8961 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8962 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8963 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8964 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8965 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8966 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8967 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8968 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8969 (fbsd_core_fetch_timeval, fbsd_print_sigset)
8970 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8971 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
8972 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8974 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
8976 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8977 (gnu_xfer_auxv): New function.
8978 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8981 2018-01-08 Yao Qi <yao.qi@linaro.org>
8982 Simon Marchi <simon.marchi@ericsson.com>
8984 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8986 (COMMON_OBS): Remove selftest.o.
8987 * configure.ac: Append selftest-arch.c and common/selftest.c to
8988 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
8989 * configure: Re-generated.
8990 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8992 (maintenance_info_selftests): Likewise.
8994 2018-01-08 Xavier Roirand <roirand@adacore.com>
8996 * ada-valprint.c (val_print_packed_array_elements): Use
8997 proper number of elements when printing an array indexed
8998 by an enumeration type.
9000 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9002 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9003 (dw2_get_file_names_reader): Adjust.
9004 (lookup_dwo_signatured_type): Adjust.
9005 (lookup_dwp_signatured_type): Adjust.
9006 (lookup_signatured_type): Adjust.
9007 (create_type_unit_group): Adjust.
9008 (get_type_unit_group): Adjust.
9009 (process_psymtab_comp_unit_reader): Adjust.
9010 (build_type_psymtabs_reader): Adjust.
9011 (scan_partial_symbols): Adjust.
9012 (add_partial_symbol): Adjust.
9013 (add_partial_subprogram): Adjust.
9014 (peek_die_abbrev): Adjust.
9015 (fixup_go_packaging): Adjust.
9016 (process_imported_unit_die): Adjust.
9017 (dwarf2_compute_name): Adjust.
9018 (dwarf2_physname): Adjust.
9019 (read_import_statement): Adjust.
9020 (handle_DW_AT_stmt_list): Adjust.
9021 (read_file_scope): Adjust.
9022 (read_func_scope): Adjust.
9023 (read_lexical_block_scope): Adjust.
9024 (read_call_site_scope): Adjust.
9025 (read_variable): Adjust.
9026 (dwarf2_rnglists_process): Adjust.
9027 (dwarf2_ranges_process): Adjust.
9028 (dwarf2_ranges_read): Adjust.
9029 (dwarf2_get_pc_bounds): Adjust.
9030 (dwarf2_record_block_ranges): Adjust.
9031 (dwarf2_add_field): Adjust.
9032 (dwarf2_add_member_fn): Adjust.
9033 (read_structure_type): Adjust.
9034 (process_structure_scope): Adjust.
9035 (read_enumeration_type): Adjust.
9036 (read_array_type): Adjust.
9037 (mark_common_block_symbol_computed): Adjust.
9038 (read_common_block): Adjust.
9039 (read_namespace_type): Adjust.
9040 (read_namespace): Adjust.
9041 (read_module_type): Adjust.
9042 (read_tag_pointer_type): Adjust.
9043 (read_tag_ptr_to_member_type): Adjust.
9044 (read_tag_string_type): Adjust.
9045 (read_subroutine_type): Adjust.
9046 (read_typedef): Adjust.
9047 (read_base_type): Adjust.
9048 (attr_to_dynamic_prop): Adjust.
9049 (read_subrange_type): Adjust.
9050 (read_unspecified_type): Adjust.
9051 (dwarf2_read_abbrevs): Adjust.
9052 (load_partial_dies): Adjust.
9053 (read_partial_die): Adjust.
9054 (find_partial_die): Adjust.
9055 (guess_partial_die_structure_name): Adjust.
9056 (fixup_partial_die): Adjust.
9057 (read_attribute_value): Adjust.
9058 (read_addr_index): Adjust.
9059 (read_addr_index_from_leb128): Adjust.
9060 (read_str_index): Adjust.
9061 (dwarf2_string_attr): Adjust.
9062 (get_debug_line_section): Adjust.
9063 (dwarf_decode_line_header): Adjust.
9064 (lnp_state_machine::check_line_address): Adjust.
9065 (dwarf_decode_lines_1): Adjust.
9066 (dwarf_decode_lines): Adjust.
9067 (dwarf2_start_symtab): Adjust.
9068 (var_decode_location): Adjust.
9069 (new_symbol_full): Adjust.
9070 (dwarf2_const_value_data): Adjust.
9071 (dwarf2_const_value_attr): Adjust.
9072 (dwarf2_const_value): Adjust.
9074 (die_containing_type): Adjust.
9075 (build_error_marker_type): Adjust.
9076 (lookup_die_type): Adjust.
9077 (guess_full_die_structure_name): Adjust.
9078 (anonymous_struct_prefix): Adjust.
9079 (determine_prefix): Adjust.
9080 (dwarf2_name): Adjust.
9081 (follow_die_ref_or_sig): Adjust.
9082 (follow_die_offset): Adjust.
9083 (follow_die_ref): Adjust.
9084 (follow_die_sig_1): Adjust.
9085 (follow_die_sig): Adjust.
9086 (get_signatured_type): Adjust.
9087 (get_DW_AT_signature_type): Adjust.
9088 (decode_locdesc): Adjust.
9089 (dwarf_decode_macros): Adjust.
9090 (cu_debug_loc_section): Adjust.
9091 (fill_in_loclist_baton): Adjust.
9092 (dwarf2_symbol_mark_computed): Adjust.
9093 (init_one_comp_unit): Don't assign
9094 dwarf2_cu::dwarf2_per_objfile.
9095 (set_die_type): Adjust.
9097 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9099 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9100 <dwarf2_per_objfile>: New field.
9101 (dwarf2_per_objfile): Remove global.
9102 (get_dwarf2_per_objfile): New function.
9103 (set_dwarf2_per_objfile): New function.
9104 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9106 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9107 (read_abbrev_offset): Likewise.
9108 (read_indirect_string): Likewise.
9109 (read_indirect_line_string): Likewise.
9110 (read_indirect_string_at_offset): Likewise.
9111 (read_indirect_string_from_dwz): Likewise.
9112 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9114 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9115 (create_all_comp_units): Change objfile parameter to
9117 (create_all_type_units): Likewise.
9118 (process_queue): Add dwarf2_per_objfile parameter.
9119 (read_and_check_comp_unit_head): Likewise.
9120 (lookup_dwo_unit_in_dwp): Likewise.
9121 (get_dwp_file): Likewise.
9122 (process_cu_includes): Likewise.
9123 (struct free_dwo_file_cleanup_data): New struct.
9124 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9125 set_dwarf2_per_objfile.
9126 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9127 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9128 context, adjust calls.
9129 (dw2_instantiate_symtab): Likewise.
9130 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9131 (dw2_get_cu): Likewise.
9132 (create_cu_from_index_list): Change objfile parameter to
9134 (create_cus_from_index_list): Get dwarf2_per_objfile from
9135 context, adjust calls.
9136 (create_cus_from_index): Likewise.
9137 (create_signatured_type_table_from_index): Change objfile
9138 parameter to dwarf2_per_objfile.
9139 (create_signatured_type_table_from_debug_names): Change objfile
9140 parameter to dwarf2_per_objfile.
9141 (create_addrmap_from_index): Likewise.
9142 (create_addrmap_from_aranges): Likewise.
9143 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9144 (dw2_setup): Remove.
9145 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9147 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9148 get_dwarf2_per_objfile.
9149 (dw2_forget_cached_source_info): Likewise.
9150 (dw2_map_symtabs_matching_filename): Likewise.
9151 (struct dw2_symtab_iterator) <index>: Remove.
9152 <dwarf2_per_objfile>: New field.
9153 (dw2_symtab_iter_init): Replace index parameter with
9155 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9156 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9157 (dw2_print_stats): Likewise.
9158 (dw2_dump): Likewise.
9159 (dw2_expand_symtabs_for_function): Likewise.
9160 (dw2_expand_all_symtabs): Likewise.
9161 (dw2_expand_symtabs_with_fullname): Likewise.
9162 (dw2_expand_marked_cus): Replace index and objfile parameters
9163 with dwarf2_per_objfile.
9164 (dw_expand_symtabs_matching_file_matcher): Add
9165 dwarf2_per_objfile parameter and adjust calls.
9166 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9168 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9169 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9171 (create_cus_from_debug_names_list): Replace objfile parameter
9172 with dwarf2_per_objfile and adjust calls.
9173 (create_cus_from_debug_names): Likewise.
9174 (dwarf2_read_debug_names): Likewise.
9175 (mapped_debug_names::namei_to_name): Adjust call.
9176 (dw2_debug_names_iterator::next): Likewise.
9177 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9178 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9179 (dw2_debug_names_dump): Likewise.
9180 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9181 (dw2_debug_names_expand_symtabs_matching): Likewise.
9182 (dwarf2_initialize_objfile): Likewise.
9183 (dwarf2_build_psymtabs): Likewise.
9184 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9186 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9187 (read_and_check_comp_unit_head): Likewise.
9188 (read_abbrev_offset): Likewise.
9189 (create_debug_type_hash_table): Likewise.
9190 (create_debug_types_hash_table): Likewise.
9191 (create_all_type_units): Replace objfile parameter with
9193 (add_type_unit): Add dwarf2_per_objfile parameter.
9194 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9195 with dwarf2_per_objfile.
9196 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9197 (lookup_dwp_signatured_type): Likewise.
9198 (lookup_signatured_type): Likewise.
9199 (read_cutu_die_from_dwo): Likewise.
9200 (init_tu_and_read_dwo_dies): Likewise.
9201 (init_cutu_and_read_dies): Likewise.
9202 (init_cutu_and_read_dies_no_follow): Likewise.
9203 (allocate_type_unit_groups_table): Add objfile parameter.
9204 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9205 (get_type_unit_group): Likewise.
9206 (process_psymtab_comp_unit): Update call.
9207 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9208 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9209 (print_tu_stats): Likewise.
9210 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9212 (build_type_psymtabs): Change objfile parameter to
9214 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9215 passed in void* parameter.
9216 (process_skeletonless_type_units): Change objfile parameter to
9218 (set_partial_user): Likewise.
9219 (dwarf2_build_psymtabs_hard): Likewise.
9220 (read_comp_units_from_section): Likewise.
9221 (create_all_comp_units): Likewise.
9222 (scan_partial_symbols): Update calls.
9223 (add_partial_symbol): Likewise.
9224 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9225 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9226 (process_queue): Add dwarf2_per_objfile parameter.
9227 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9228 (compute_compunit_symtab_includes): Likewise.
9229 (process_cu_includes): Add dwarf2_per_objfile parameter.
9230 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9231 (process_full_type_unit): Likewise.
9232 (process_imported_unit_die): Update call.
9233 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9234 (read_file_scope): Likewise.
9235 (allocate_dwo_file_hash_table): Add objfile parameter.
9236 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9237 (create_cus_hash_table): Likewise.
9238 (create_dwp_hash_table): Likewise.
9239 (create_dwo_unit_in_dwp_v1): Likewise.
9240 (create_dwp_v2_section): Likewise.
9241 (create_dwo_unit_in_dwp_v2): Likewise.
9242 (lookup_dwo_unit_in_dwp): Likewise.
9243 (try_open_dwop_file): Likewise.
9244 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9245 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9246 cleanup to include a reference to dwarf2_per_objfile.
9247 (open_dwp_file): Add dwarf2_per_objfile parameter.
9248 (open_and_init_dwp_file): Likewise.
9249 (get_dwp_file): Likewise.
9250 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9251 (queue_and_load_all_dwo_tus): Update call.
9252 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9254 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9255 (dwarf2_ranges_process): Likewise.
9256 (dwarf2_get_pc_bounds): Likewise.
9257 (mark_common_block_symbol_computed): Likewise.
9258 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9259 (dwarf2_read_abbrevs): Update call.
9260 (read_partial_die): Use dwarf2_per_objfile from cu.
9261 (find_partial_die): Likewise.
9262 (fixup_partial_die): Likewise.
9263 (read_attribute_value): Likewise.
9264 (read_indirect_string_at_offset_from): Add objfile parameter.
9265 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9267 (read_indirect_string_from_dwz): Add objfile parameter.
9268 (read_indirect_string): Add objfile parameter.
9269 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9270 (read_addr_index): Use dwarf2_per_objfile from cu.
9271 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9273 (read_str_index): Use dwarf2_per_objfile from cu.
9274 (get_debug_line_section): Likewise.
9275 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9276 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9277 (new_symbol_full): Use dwarf2_per_objfile from cu.
9278 (build_error_marker_type): Likewise.
9279 (lookup_die_type): Likewise.
9280 (determine_prefix): Likewise.
9281 (follow_die_offset): Likewise.
9282 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9283 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9284 (dwarf2_fetch_die_type_sect_off): Likewise.
9285 (dwarf2_get_die_type): Likewise.
9286 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9287 (get_signatured_type): Likewise.
9288 (get_DW_AT_signature_type): Likewise.
9289 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9290 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9291 (cu_debug_loc_section): Likewise.
9292 (fill_in_loclist_baton): Likewise.
9293 (dwarf2_symbol_mark_computed): Likewise.
9294 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9296 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9298 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9299 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9300 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9301 (set_die_type): Use dwarf2_free_objfile from cu.
9302 (get_die_type_at_offset): Likewise.
9303 (dwarf2_per_objfile_free): Don't assign global variable.
9304 (debug_names) <constructor>: Add dwarf2_per_objfile
9305 parameter, update m_debugstrlookup construction.
9306 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9308 <m_dwarf2_per_objfile>: New field.
9309 <lookup>: Use m_dwarf2_per_objfile.
9310 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9311 (psyms_seen_size): Likewise.
9312 (write_gdbindex): Replace objfile parameter with
9314 (write_debug_names): Likewise.
9315 (write_psymtabs_to_index): Likewise.
9316 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9319 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9321 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9322 <dwarf2_per_objfile>: New field.
9323 (struct dwarf2_per_cu_data) <objfile>: Remove.
9324 <dwarf2_per_objfile>: New field.
9325 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9327 (create_signatured_type_table_from_index): Likewise.
9328 (create_debug_type_hash_table): Likewise.
9329 (fill_in_sig_entry_from_dwo_entry): Likewise.
9330 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9331 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9333 (create_partial_symtab): Access objfile through
9335 (process_psymtab_comp_unit_reader): Likewise.
9336 (read_comp_units_from_section): Likewise.
9337 (scan_partial_symbols): Likewise.
9338 (add_partial_symbol): Likewise.
9339 (add_partial_subprogram): Likewise.
9340 (peek_die_abbrev): Likewise.
9341 (fixup_go_packaging): Likewise.
9342 (process_full_comp_unit): Likewise.
9343 (process_full_type_unit): Likewise.
9344 (process_imported_unit_die): Likewise.
9345 (dwarf2_compute_name): Likewise.
9346 (dwarf2_physname): Likewise.
9347 (read_import_statement): Likewise.
9348 (create_cus_hash_table): Assign dwarf2_physname instead of
9350 (read_func_scope): Access objfile through dwarf2_per_objfile.
9351 (read_lexical_block_scope): Likewise.
9352 (read_call_site_scope): Likewise.
9353 (read_variable): Likewise.
9354 (dwarf2_rnglists_process): Likewise.
9355 (dwarf2_ranges_process): Likewise.
9356 (dwarf2_ranges_read): Likewise.
9357 (dwarf2_record_block_ranges): Likewise.
9358 (dwarf2_add_field): Likewise.
9359 (dwarf2_add_member_fn): Likewise.
9360 (read_structure_type): Likewise.
9361 (process_structure_scope): Likewise.
9362 (read_enumeration_type): Likewise.
9363 (read_array_type): Likewise.
9364 (read_common_block): Likewise.
9365 (read_namespace_type): Likewise.
9366 (read_namespace): Likewise.
9367 (read_module_type): Likewise.
9368 (read_tag_pointer_type): Likewise.
9369 (read_tag_ptr_to_member_type): Likewise.
9370 (read_tag_string_type): Likewise.
9371 (read_subroutine_type): Likewise.
9372 (read_typedef): Likewise.
9373 (read_base_type): Likewise.
9374 (attr_to_dynamic_prop): Likewise.
9375 (read_subrange_type): Likewise.
9376 (read_unspecified_type): Likewise.
9377 (load_partial_dies): Likewise.
9378 (read_partial_die): Likewise.
9379 (find_partial_die): Likewise.
9380 (guess_partial_die_structure_name): Likewise.
9381 (fixup_partial_die): Likewise.
9382 (read_attribute_value): Likewise.
9383 (read_addr_index_from_leb128): Likewise.
9384 (dwarf2_read_addr_index): Likewise.
9385 (dwarf2_string_attr): Likewise.
9386 (lnp_state_machine::check_line_address): Likewise.
9387 (dwarf_decode_lines_1): Likewise.
9388 (dwarf_decode_lines): Likewise.
9389 (dwarf2_start_symtab): Likewise.
9390 (var_decode_location): Likewise.
9391 (new_symbol_full): Likewise.
9392 (dwarf2_const_value_data): Likewise.
9393 (dwarf2_const_value_attr): Likewise.
9394 (dwarf2_const_value): Likewise.
9395 (die_type): Likewise.
9396 (die_containing_type): Likewise.
9397 (lookup_die_type): Likewise.
9398 (guess_full_die_structure_name): Likewise.
9399 (anonymous_struct_prefix): Likewise.
9400 (dwarf2_name): Likewise.
9401 (follow_die_ref_or_sig): Likewise.
9402 (follow_die_offset): Likewise.
9403 (follow_die_ref): Likewise.
9404 (dwarf2_fetch_die_loc_sect_off): Likewise.
9405 (dwarf2_fetch_constant_bytes): Likewise.
9406 (dwarf2_fetch_die_type_sect_off): Likewise.
9407 (dwarf2_get_die_type): Likewise.
9408 (follow_die_sig): Likewise.
9409 (decode_locdesc): Likewise.
9410 (dwarf2_per_cu_objfile): Likewise.
9411 (dwarf2_per_cu_text_offset): Likewise.
9412 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9414 (set_die_type): Access objfile through
9417 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9419 * valprint.c (converted_character_d): Remove typedef.
9420 (DEF_VEC_O (converted_character_d)): Remove.
9421 (count_next_character): Use std::vector.
9422 (print_converted_chars_to_obstack): Likewise.
9423 (generic_printstr): Likewise.
9425 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9427 * xml-support.h (struct gdb_xml_value): Add constructor.
9428 <value>: Change type to unique_xmalloc_ptr.
9429 (gdb_xml_value_s): Remove typedef.
9430 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9431 (gdb_xml_element_start_handler): Change parameter type to
9433 (xml_find_attribute): Likewise.
9434 * xml-support.c (xml_find_attribute): Change parameter type to
9435 std::vector and adjust.
9436 (gdb_xml_values_cleanup): Remove.
9437 (gdb_xml_parser::start_element): Adjust to std::vector.
9438 (xinclude_start_include): Change paraeter type to std::vector
9440 * btrace.c (check_xml_btrace_version): Likewise.
9441 (parse_xml_btrace_block): Likewise.
9442 (parse_xml_btrace_pt_config_cpu): Likewise.
9443 (parse_xml_btrace_pt): Likewise.
9444 (parse_xml_btrace_conf_bts): Likewise.
9445 (parse_xml_btrace_conf_pt): Likewise.
9446 * memory-map.c (memory_map_start_memory): Likewise.
9447 (memory_map_start_property): Likewise.
9448 * osdata.c (osdata_start_osdata): Likewise.
9449 (osdata_start_item): Likewise.
9450 (osdata_start_column): Likewise.
9451 * remote.c (start_thread): Likewise.
9452 * solib-aix.c (library_list_start_library): Likewise.
9453 (library_list_start_list): Likewise.
9454 * solib-svr4.c (library_list_start_library): Likewise.
9455 (svr4_library_list_start_list): Likewise.
9456 * solib-target.c (library_list_start_segment): Likewise.
9457 (library_list_start_section): Likewise.
9458 (library_list_start_library): Likewise.
9459 (library_list_start_list): Likewise.
9460 * tracepoint.c (traceframe_info_start_memory): Likewise.
9461 (traceframe_info_start_tvar): Likewise.
9462 * xml-syscall.c (syscall_start_syscall): Likewise.
9463 * xml-tdesc.c (tdesc_start_target): Likewise.
9464 (tdesc_start_feature): Likewise.
9465 (tdesc_start_reg): Likewise.
9466 (tdesc_start_union): Likewise.
9467 (tdesc_start_struct): Likewise.
9468 (tdesc_start_flags): Likewise.
9469 (tdesc_start_enum): Likewise.
9470 (tdesc_start_field): Likewise.
9471 (tdesc_start_enum_value): Likewise.
9472 (tdesc_start_vector): Likewise.
9474 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9476 * extension.h (struct xmethod_worker) <clone>: Remove.
9477 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9479 (python_xmethod_worker::clone): Remove.
9480 * valops.c (find_overload_match): Use std::move instead of
9483 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9485 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9486 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9487 <free_xmethod_worker_data>: Remove.
9488 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9489 <get_xmethod_arg_types>: Remove.
9490 <get_xmethod_result_type>: Remove.
9491 <invoke_xmethod>: Remove.
9492 * extension.c (new_xmethod_worker): Remove.
9493 (clone_xmethod_worker): Remove.
9494 (get_matching_xmethod_workers): Return void, pass std::vector by
9496 (get_xmethod_arg_types): Rename to...
9497 (xmethod_worker::get_arg_types): ... this, and adjust.
9498 (get_xmethod_result_type): Rename to...
9499 (xmethod_worker::get_result_type): ... this, and adjust.
9500 (invoke_xmethod): Remove.
9501 (free_xmethod_worker): Remove.
9502 (free_xmethod_worker_vec): Remove.
9503 * extension.h (enum ext_lang_rc): Move here from
9505 (struct xmethod_worker): Add constructor and destructor.
9508 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9509 virtual pure methods.
9510 <get_arg_types, get_result_type>: New methods.
9511 (xmethod_worker_ptr): Remove typedef.
9512 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9513 (xmethod_worker_vec): Remove typedef.
9514 (xmethod_worker_up): New typedef.
9515 (invoke_xmethod): Remove.
9516 (clone_xmethod_worker): Remove.
9517 (free_xmethod_worker): Remove.
9518 (free_xmethod_worker_vec): Remove.
9519 (get_xmethod_arg_types): Remove.
9520 (get_xmethod_result_type): Remove.
9521 * valops.c (find_method_list): Use std::vector, don't use
9522 intermediate vector.
9523 (value_find_oload_method_list): Use std::vector.
9524 (find_overload_match): Use std::vector.
9525 (find_oload_champ): Use std::vector.
9526 * value.c (value_free): Use operator delete.
9527 (value_of_xmethod): Rename to...
9528 (value_from_xmethod): ... this. Don't assign
9529 xmethod_worker::value, take rvalue-reference.
9530 (result_type_of_xmethod): Adjust.
9531 (call_xmethod): Adjust.
9532 * value.h: Include extension.h.
9533 (struct xmethod_worker): Don't forward-declare.
9534 (value_of_xmethod): Rename to...
9535 (value_from_xmethod): ... this, take rvalue-reference.
9536 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9537 (struct python_xmethod_worker): ... this, add constructor and
9539 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9540 (gdbpy_free_xmethod_worker_data): Rename to...
9541 (python_xmethod_worker::~python_xmethod_worker): ... this and
9543 (gdbpy_clone_xmethod_worker_data): Rename to...
9544 (python_xmethod_worker::clone): ... this and adjust.
9545 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9547 (gdbpy_get_xmethod_arg_types): Rename to...
9548 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9549 (gdbpy_get_xmethod_result_type): Rename to...
9550 (python_xmethod_worker::do_get_result_type): ... this and
9552 (gdbpy_invoke_xmethod): Rename to...
9553 (python_xmethod_worker::invoke): ... this and adjust.
9554 (new_python_xmethod_worker): Rename to...
9555 (python_xmethod_worker::python_xmethod_worker): ... this and
9557 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9559 (gdbpy_free_xmethod_worker_data): Remove.
9560 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9561 (gdbpy_get_xmethod_arg_types): Remove.
9562 (gdbpy_get_xmethod_result_type): Remove.
9563 (gdbpy_invoke_xmethod): Remove.
9564 * python/python.c (python_extension_ops): Remove obsolete
9567 2018-01-05 Pedro Alves <palves@redhat.com>
9570 * common/signals-state-save-restore.c
9571 (save_original_signals_state): New parameter 'quiet'. Warn if we
9572 find a custom handler preinstalled, instead of internal erroring.
9573 But only warn if !quiet.
9574 * common/signals-state-save-restore.h
9575 (save_original_signals_state): New parameter 'quiet'.
9576 * main.c (captured_main_1): Move save_original_signals_state call
9577 after option handling, and pass QUIET.
9579 2018-01-05 Pedro Alves <palves@redhat.com>
9581 * spu-tdep.c (spu_catch_start): Pass
9582 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9584 2018-01-05 Pedro Alves <palves@redhat.com>
9587 * ada-lang.c (literal_symbol_name_matcher): New function.
9588 (ada_get_symbol_name_matcher): Use it for
9589 symbol_name_match_type::SEARCH_NAME.
9590 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9591 it down instead of assuming symbol_name_match_type::FULL.
9592 * block.h (block_lookup_symbol): New parameter 'match_type'.
9593 * c-valprint.c (print_unpacked_pointer): Use
9594 lookup_symbol_search_name instead of lookup_symbol.
9595 * compile/compile-object-load.c (get_out_value_type): Pass down
9596 symbol_name_match_type::SEARCH_NAME.
9597 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9598 symbol_name_match_type::FULL.
9599 * cp-support.c (cp_get_symbol_name_matcher): Handle
9600 symbol_name_match_type::SEARCH_NAME.
9601 * infrun.c (insert_exception_resume_breakpoint): Use
9602 lookup_symbol_search_name.
9603 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9604 * psymtab.c (maintenance_check_psymtabs): Use
9605 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9606 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9608 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9609 if symbol_name_match_type::SEARCH_NAME.
9610 (lookup_symbol_in_language): Pass down
9611 symbol_name_match_type::FULL.
9612 (lookup_symbol_search_name): New.
9613 (lookup_language_this): Pass down
9614 symbol_name_match_type::SEARCH_NAME.
9615 (lookup_symbol_aux, lookup_local_symbol): New parameter
9616 'match_type'. Pass it down.
9617 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9618 (lookup_symbol_search_name): New declaration.
9619 (lookup_symbol_in_block): New 'match_type' parameter.
9621 2018-01-05 Pedro Alves <palves@redhat.com>
9624 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9626 (ada_lookup_symbol): Reimplement in terms of
9627 ada_lookup_symbol_list, bits factored out from
9628 ada_lookup_encoded_symbol.
9630 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9632 * ada-exp.y (write_object_renaming): When subscripting an array
9633 using a symbol as the index, pass the block in call to
9634 ada_lookup_encoded_symbol when looking that symbol up.
9636 2018-01-05 Jerome Guitton <guitton@adacore.com>
9638 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9641 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9643 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9644 the case where VALUE_LVAL (val0) is not lval_memory.
9646 2018-01-05 Xavier Roirand <roirand@adacore.com>
9648 * ada-valprint.c (print_optional_low_bound): Handle
9649 character-indexed array printing like boolean-indexed array
9652 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9654 * NEWS: Create a new section for the next release branch.
9655 Rename the section of the current branch, now that it has
9658 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9660 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9661 * version.in: Bump version to 8.1.50.DATE-git.
9663 2018-01-03 Xavier Roirand <roirand@adacore.com>
9665 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9667 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9669 (default_exception_support_info) <catch_handlers_sym>: Add field.
9670 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9671 (ada_exception_name_addr_1): Add "catch handlers" handling.
9672 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9674 (create_excep_cond_exprs) <ex>: Add parameter.
9675 (re_set_exception): Update create_excep_cond_exprs call.
9676 (print_it_exception, print_one_exception, print_mention_exception)
9677 (print_recreate_exception): Add "catch handler" handling.
9678 (allocate_location_catch_handlers, re_set_catch_handlers)
9679 (check_status_catch_handlers, print_it_catch_handlers)
9680 (print_one_catch_handlers, print_mention_catch_handlers)
9681 (print_recreate_catch_handlers): New function.
9682 (catch_handlers_breakpoint_ops): New variable.
9683 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9684 Add parameter. Add "catch handler" handling.
9685 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9686 Add "catch handler" handling.
9687 (ada_exception_catchpoint_cond_string): Add "catch handler"
9689 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9691 (catch_ada_handlers_command): New function.
9692 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9693 operations structure.
9694 (_initialize_ada_language): Add "catch handlers" command entry.
9695 * NEWS: Document "catch handlers" feature.
9697 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9699 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9700 account when creating the array type of the slice.
9701 (ada_value_slice): Likewise.
9703 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9705 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9707 (create_array_type_with_stride): Add byte_stride_prop parameter.
9708 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9709 New parameter. Update all callers in this file.
9710 (array_type_has_dynamic_stride): New function.
9711 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9712 of arrays with dynamic byte strides.
9713 * dwarf2read.c (read_array_type): Add support for dynamic
9714 DW_AT_byte_stride attributes.
9716 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9718 * dwarf2read.c (read_unspecified_type): Treat
9719 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9721 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9723 Update copyright year range in all GDB files.
9725 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9727 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9728 and gdb/testsuite/gdb.base/step-line.c.
9730 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9732 * copyright.py (main): Dump the contents of
9733 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9734 even if BY_HAND is empty.
9736 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9738 * top.c (print_gdb_version): Update Copyright year in version
9741 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9743 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9745 For older changes see ChangeLog-2017.
9751 version-control: never