1 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
8 2018-07-04 Joel Brobecker <brobecker@adacore.com>
10 * NEWS: Create a new section for the next release branch.
11 Rename the section of the current branch, now that it has
14 2018-07-04 Joel Brobecker <brobecker@adacore.com>
16 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
17 * version.in: Bump version to 8.2.50.DATE-git.
19 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
20 Pedro Alves <palves@redhat.com>
22 * linux-nat.c (linux_init_ptrace): Rename to ...
23 (linux_init_ptrace_procfs): ... this. Call
24 linux_proc_init_warnings.
25 (linux_nat_target::post_attach)
26 (linux_nat_target::post_startup_inferior): Adjust.
27 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
28 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
30 2018-07-04 Tom de Vries <tdevries@suse.de>
32 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
34 (read_comp_unit_head): ... here.
36 2018-07-03 Tom Tromey <tom@tromey.com>
38 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
39 (stop_tracing, tstatus_command)
40 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
41 (print_one_static_tracepoint_marker): Update.
42 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
44 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
46 (all_tracepoints, static_tracepoints_here): Return std::vector.
48 2018-07-03 Tom Tromey <tom@tromey.com>
50 * common/ptid.c (ptid_equal): Remove.
51 * common/ptid.h (ptid_equal): Don't declare.
52 * ada-tasks.c: Update.
53 * breakpoint.c: Update.
54 * common/agent.c: Update.
56 * darwin-nat-info.c: Update.
57 * darwin-nat.c: Update.
59 * dtrace-probe.c: Update.
60 * dummy-frame.c: Update.
63 * gdbthread.h: Update.
67 * inf-ptrace.c: Update.
72 * linux-fork.c: Update.
73 * linux-nat.c: Update.
74 * linux-thread-db.c: Update.
75 * mi/mi-cmd-var.c: Update.
76 * mi/mi-interp.c: Update.
77 * mi/mi-main.c: Update.
78 * nto-procfs.c: Update.
79 * ppc-linux-tdep.c: Update.
81 * python/py-inferior.c: Update.
82 * python/py-record-btrace.c: Update.
83 * python/py-record.c: Update.
84 * ravenscar-thread.c: Update.
86 * remote-sim.c: Update.
88 * sol-thread.c: Update.
91 * tui/tui-stack.c: Update.
93 * windows-nat.c: Update.
94 * windows-tdep.c: Update.
96 2018-07-03 Tom Tromey <tom@tromey.com>
98 * common/ptid.c (ptid_match): Remove.
99 * common/ptid.h (ptid_match): Don't declare.
100 * fbsd-nat.c: Update.
103 * linux-nat.c: Update.
104 * record-btrace.c: Update.
105 * regcache.c: Update.
108 2018-07-03 Tom Tromey <tom@tromey.com>
110 * common/ptid.c (ptid_tid_p): Remove.
111 * common/ptid.h (ptid_tid_p): Don't declare.
112 * sol-thread.c: Update.
114 2018-07-03 Tom Tromey <tom@tromey.com>
116 * common/ptid.c (ptid_lwp_p): Remove.
117 * common/ptid.h (ptid_lwp_p): Don't declare.
118 * fbsd-nat.c: Update.
119 * linux-nat.c: Update.
120 * nat/linux-procfs.c: Update.
121 * nat/x86-linux-dregs.c: Update.
122 * sol-thread.c: Update.
124 2018-07-03 Tom Tromey <tom@tromey.com>
126 * common/ptid.c (ptid_is_pid): Remove.
127 * common/ptid.h (ptid_is_pid): Don't declare.
129 * linux-nat.c: Update.
130 * mi/mi-interp.c: Update.
134 2018-07-03 Tom Tromey <tom@tromey.com>
136 * common/ptid.c (ptid_get_tid): Remove.
137 * common/ptid.h (ptid_get_tid): Don't declare.
138 * ada-tasks.c: Update.
139 * aix-thread.c: Update.
140 * bsd-uthread.c: Update.
141 * darwin-nat.c: Update.
142 * fbsd-nat.c: Update.
143 * i386-darwin-nat.c: Update.
145 * linux-tdep.c: Update.
146 * nto-procfs.c: Update.
147 * ppc-ravenscar-thread.c: Update.
148 * python/py-infthread.c: Update.
149 * ravenscar-thread.c: Update.
150 * sol-thread.c: Update.
151 * sparc-ravenscar-thread.c: Update.
152 * windows-nat.c: Update.
154 2018-07-03 Tom Tromey <tom@tromey.com>
156 * common/ptid.c (ptid_get_lwp): Remove.
157 * common/ptid.h (ptid_get_lwp): Don't declare.
158 * aarch64-linux-nat.c: Update.
159 * ada-tasks.c: Update.
160 * aix-thread.c: Update.
161 * amd64-linux-nat.c: Update.
162 * arm-linux-nat.c: Update.
164 * fbsd-nat.c: Update.
165 * fbsd-tdep.c: Update.
167 * i386-cygwin-tdep.c: Update.
168 * i386-gnu-nat.c: Update.
169 * i386-linux-nat.c: Update.
170 * ia64-linux-nat.c: Update.
171 * inf-ptrace.c: Update.
173 * linux-fork.c: Update.
174 * linux-nat.c: Update.
175 * linux-tdep.c: Update.
176 * linux-thread-db.c: Update.
177 * mips-linux-nat.c: Update.
178 * nat/aarch64-linux-hw-point.c: Update.
179 * nat/aarch64-linux.c: Update.
180 * nat/linux-btrace.c: Update.
181 * nat/linux-osdata.c: Update.
182 * nat/linux-procfs.c: Update.
183 * nat/x86-linux-dregs.c: Update.
184 * obsd-nat.c: Update.
185 * ppc-fbsd-nat.c: Update.
186 * ppc-linux-nat.c: Update.
188 * python/py-infthread.c: Update.
189 * ravenscar-thread.c: Update.
191 * s390-linux-nat.c: Update.
192 * sol-thread.c: Update.
193 * sol2-tdep.c: Update.
194 * spu-linux-nat.c: Update.
195 * x86-linux-nat.c: Update.
196 * xtensa-linux-nat.c: Update.
198 2018-07-03 Tom Tromey <tom@tromey.com>
200 * common/ptid.c (ptid_get_pid): Remove.
201 * common/ptid.h (ptid_get_pid): Don't declare.
202 * aarch64-linux-nat.c: Update.
203 * ada-lang.c: Update.
204 * aix-thread.c: Update.
205 * alpha-bsd-nat.c: Update.
206 * amd64-fbsd-nat.c: Update.
207 * amd64-linux-nat.c: Update.
208 * arm-linux-nat.c: Update.
209 * arm-nbsd-nat.c: Update.
211 * break-catch-syscall.c: Update.
212 * breakpoint.c: Update.
213 * bsd-uthread.c: Update.
216 * darwin-nat.c: Update.
217 * fbsd-nat.c: Update.
218 * fbsd-tdep.c: Update.
221 * hppa-nbsd-nat.c: Update.
222 * hppa-obsd-nat.c: Update.
223 * i386-fbsd-nat.c: Update.
224 * ia64-linux-nat.c: Update.
225 * inf-ptrace.c: Update.
227 * inferior.c: Update.
228 * inferior.h: Update.
231 * linux-fork.c: Update.
232 * linux-nat.c: Update.
233 * linux-tdep.c: Update.
234 * linux-thread-db.c: Update.
235 * m68k-bsd-nat.c: Update.
236 * mi/mi-interp.c: Update.
237 * mi/mi-main.c: Update.
238 * mips-linux-nat.c: Update.
239 * mips-nbsd-nat.c: Update.
240 * mips64-obsd-nat.c: Update.
241 * nat/aarch64-linux-hw-point.c: Update.
242 * nat/aarch64-linux.c: Update.
243 * nat/linux-btrace.c: Update.
244 * nat/linux-osdata.c: Update.
245 * nat/linux-procfs.c: Update.
246 * nat/x86-linux-dregs.c: Update.
247 * nto-procfs.c: Update.
248 * obsd-nat.c: Update.
249 * ppc-linux-nat.c: Update.
250 * ppc-nbsd-nat.c: Update.
251 * ppc-obsd-nat.c: Update.
252 * proc-service.c: Update.
254 * python/py-inferior.c: Update.
255 * python/py-infthread.c: Update.
256 * ravenscar-thread.c: Update.
258 * remote-sim.c: Update.
260 * rs6000-nat.c: Update.
261 * s390-linux-nat.c: Update.
262 * sh-nbsd-nat.c: Update.
263 * sol-thread.c: Update.
264 * sparc-nat.c: Update.
265 * sparc64-tdep.c: Update.
266 * spu-linux-nat.c: Update.
267 * spu-tdep.c: Update.
268 * target-debug.h: Update.
271 * tid-parse.c: Update.
272 * tracefile-tfile.c: Update.
273 * vax-bsd-nat.c: Update.
274 * windows-nat.c: Update.
275 * x86-linux-nat.c: Update.
278 2018-07-03 Tom Tromey <tom@tromey.com>
280 * common/ptid.c (pid_to_ptid): Remove.
281 * common/ptid.h (pid_to_ptid): Don't declare.
282 * aix-thread.c: Update.
283 * arm-linux-nat.c: Update.
284 * common/ptid.c: Update.
285 * common/ptid.h: Update.
288 * darwin-nat.c: Update.
289 * fbsd-nat.c: Update.
290 * fork-child.c: Update.
292 * go32-nat.c: Update.
293 * inf-ptrace.c: Update.
295 * inferior.c: Update.
297 * linux-fork.c: Update.
298 * linux-nat.c: Update.
299 * nat/aarch64-linux-hw-point.c: Update.
300 * nat/fork-inferior.c: Update.
301 * nat/x86-linux-dregs.c: Update.
302 * nto-procfs.c: Update.
303 * obsd-nat.c: Update.
305 * progspace.c: Update.
307 * rs6000-nat.c: Update.
308 * s390-linux-nat.c: Update.
309 * sol-thread.c: Update.
310 * spu-linux-nat.c: Update.
313 * tracefile-tfile.c: Update.
314 * windows-nat.c: Update.
316 2018-07-03 Tom Tromey <tom@tromey.com>
318 * common/ptid.h (ptid_build): Don't declare.
319 * common/ptid.c (ptid_build): Remove.
320 * aix-thread.c: Update.
322 * bsd-uthread.c: Update.
323 * common/agent.c: Update.
324 * common/ptid.c: Update.
325 * common/ptid.h: Update.
327 * darwin-nat.c: Update.
328 * fbsd-nat.c: Update.
330 * linux-fork.c: Update.
331 * linux-nat.c: Update.
332 * linux-thread-db.c: Update.
333 * nat/linux-osdata.c: Update.
334 * nat/linux-procfs.c: Update.
335 * nto-procfs.c: Update.
336 * obsd-nat.c: Update.
337 * proc-service.c: Update.
339 * ravenscar-thread.c: Update.
340 * remote-sim.c: Update.
342 * sol-thread.c: Update.
344 * windows-nat.c: Update.
346 2018-07-03 Tom Tromey <tom@tromey.com>
348 * infrun.c (follow_exec): Use exit_inferior_silent.
349 * inferior.c (exit_inferior_num_silent): Remove.
350 * inferior.h (exit_inferior_num_silent): Don't declare.
352 2018-07-03 Tom Tromey <tom@tromey.com>
355 * darwin-nat.c (darwin_attach_pid): Reset inferior and
356 inferior_ptid on error.
358 2018-07-02 Maciej W. Rozycki <macro@mips.com>
359 Simon Marchi <simon.marchi@polymtl.ca>
362 * disasm.h (gdb_disassembler): Add
363 `m_disassembler_options_holder'. member
364 * disasm.c (get_all_disassembler_options): New function.
365 (gdb_disassembler::gdb_disassembler): Use it.
366 (gdb_buffered_insn_length_init_dis): Likewise.
367 (gdb_buffered_insn_length): Adjust accordingly.
368 (set_disassembler_options): Handle options with arguments.
369 (show_disassembler_options_sfunc): Likewise. Add a leading new
370 line if showing options with descriptions.
371 (disassembler_options_completer): Adapt to using the
372 `disasm_options_and_args_t' structure.
373 * mips-tdep.c (mips_disassembler_options): New variable.
374 (mips_disassembler_options_o32): Likewise.
375 (mips_disassembler_options_n32): Likewise.
376 (mips_disassembler_options_n64): Likewise.
377 (gdb_print_insn_mips): Don't set `disassembler_options'.
378 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
380 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
381 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
382 `gdbarch_disassembler_options_implicit' and
383 `gdbarch_valid_disassembler_options'.
384 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
385 `disasm_options_and_args_t' structure.
386 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
388 (valid_disassembler_options): Switch from `disasm_options_t' to
389 the `disasm_options_and_args_t' structure.
390 * NEWS: Document `set disassembler-options' support for the MIPS
392 * gdbarch.h: Regenerate.
393 * gdbarch.c: Regenerate.
395 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
397 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
399 2018-06-29 Joel Brobecker <brobecker@adacore.com>
401 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
402 parameter in call to amd64_target_description.
403 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
404 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
405 (amd64fbsd_init_abi): Likewise.
406 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
407 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
408 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
409 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
411 2018-06-29 Pedro Alves <palves@redhat.com>
413 * gdb/amd64-tdep.h (amd64_create_target_description): Add
414 "segments" parameter.
415 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
416 (_initialize_amd64_tdep): Update call to
417 amd64_create_target_description.
418 (amd64_target_description): Add "segments" parameter. Adjust
419 the implementation to use it.
420 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
421 call to amd64_create_target_description.
422 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
423 * gdb/arch/amd64.h (amd64_create_target_description): Add
425 * gdb/arch/amd64.c (amd64_create_target_description): Add
426 "segments" parameter. Call create_feature_i386_64bit_segments
427 only if SEGMENTS is true.
428 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
429 call to amd64_create_target_description.
431 2018-06-29 Pedro Alves <palves@redhat.com>
433 * thread.c (thread_target_id_str): New, factored out from ...
434 (print_thread_info_1): ... here. Use it to compute the max
435 "Target Id" column width.
437 2018-06-29 Pedro Alves <palves@redhat.com>
439 * remote.c (remote_target::extra_thread_info): Delete
440 'display_buf' and 'n' locals. from the cache, regardless of
441 packet mechanims is in use. Use cache for qThreadExtra and qP
444 2018-06-29 Pedro Alves <palves@redhat.com>
446 * blockframe.c (find_pc_sect_containing_function): New function.
447 * breakpoint.c (print_breakpoint_location): Don't call
448 find_pc_sect_function.
449 * linespec.c (create_sals_line_offset): Record the location's
451 * linespec.c (convert_address_location_to_sals): Fill in sal's
452 symbol with find_pc_sect_containing_function.
453 * symtab.c (find_function_start_sal): Rename to ...
454 (find_function_start_sal_1): ... this.
455 (find_function_start_sal): Reimplement as wrapper around
456 find_function_start_sal_1, and use
457 find_pc_sect_containing_function to fill in the sal's symbol.
458 (find_function_start_sal(symbol*, bool)): Adjust.
459 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
461 (find_pc_sect_containing_function): Declare.
463 2018-06-29 Pedro Alves <palves@redhat.com>
465 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
466 true if the the location has no symbol.
468 2018-06-28 Tom Tromey <tom@tromey.com>
470 * NEWS: Mention --enable-codesign.
471 * silent-rules.mk (ECHO_SIGN): New variable.
472 * configure.ac: Add --enable-codesign.
473 * configure: Rebuild.
474 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
475 (gdb$(EXEEXT)): Optionally invoke codesign.
477 2018-06-28 Pedro Alves <palves@redhat.com>
479 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
481 (switch_to_thread_no_regs): Adjust comment.
482 * infcmd.c (stop_pc): Delete.
483 (post_create_inferior, info_program_command): Replace references
484 to stop_pc with references to thread_info->suspend.stop_pc.
485 * inferior.h (stop_pc): Delete declaration.
486 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
487 (handle_inferior_event_1, handle_signal_stop)
488 (process_event_stop_test, keep_going_stepped_thread)
489 (handle_step_into_function, handle_step_into_function_backward)
490 (print_stop_location): Replace references to stop_pc with
491 references to thread_info->suspend.stop_pc.
492 (struct infcall_suspend_state) <stop_pc>: Delete field.
493 (save_infcall_suspend_state, restore_infcall_suspend_state):
494 Remove references to inf_stat->stop_pc.
495 * linux-fork.c (fork_load_infrun_state): Likewise.
496 * record-btrace.c (record_btrace_set_replay): Likewise.
497 * record-full.c (record_full_goto_entry): Likewise.
498 * remote.c (print_one_stopped_thread): Likewise.
499 * target.c (target_resume): Extend comment.
500 * thread.c (set_executing_thread): New.
501 (set_executing): Use it.
502 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
503 Remove references to stop_pc.
505 2018-06-28 Pedro Alves <palves@redhat.com>
507 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
508 Moving fetching stop_pc until after ecs->event_thread is refreshed.
510 2018-06-28 Tom Tromey <tom@tromey.com>
512 * coffread.c (coff_symfile_finish): Update.
513 * xcoffread.c (xcoff_symfile_finish): Update.
514 * elfread.c (elf_symfile_finish): Update.
515 * symfile.h (dwarf2_free_objfile): Don't declare.
516 * dwarf2read.c (_initialize_dwarf2_read): Use
517 register_objfile_data_with_cleanup.
518 (dwarf2_free_objfile): Now static. Change signature.
520 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
522 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
523 option "-o" to add-symbol-file-load to add an offset to each
524 section's load address.
525 * symfile.c (set_objfile_default_section_offset): New function.
527 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
529 * symfile.c (add_symbol_file_command): Make sure that sections
530 with the same name are sorted in the same order.
532 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
534 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
535 require the second argument. If omitted, load sections at the
536 addresses specified in the file.
538 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
540 * symfile.c (symbol_file_command, symbol_file_add_main_1)
541 (_initialize_symfile): Add option "-o" to symbol-file to add an
542 offset to each section of the symbol file.
544 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
546 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
548 2018-06-27 Tom Tromey <tom@tromey.com>
550 * stack.c (_initialize_stack): Update "func" help text.
552 2018-06-27 Tom Tromey <tom@tromey.com>
554 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
556 (unwind_infopy_str, pyuw_create_unwind_info)
557 (unwind_infopy_add_saved_register, pyuw_sniffer)
558 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
560 (struct saved_reg): Add constructor.
561 <value>: Now a gdbpy_ref<>.
563 2018-06-27 Tom Tromey <tom@tromey.com>
565 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
567 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
569 * gdb-gdb.py.in: Format using autopep8.
571 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
573 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
574 (type_lookup_function): Recognize CORE_ADDR values.
576 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
578 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
581 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
583 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
586 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
588 * gdb-gdb.py: Move to...
589 * gdb-gdb.py.in: ... here.
590 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
591 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
593 (distclean): Remove gdb-gdb.py when cleaning.
594 (gdb-gdb.py, gdb-gdb.gdb): New rules.
595 * configure: Re-generate.
597 2018-06-27 Pedro Alves <palves@redhat.com>
599 * proc-service.c (get_ps_regcache): New.
600 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
601 (ps_lsetfpregs): Use it.
603 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
606 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
607 (dwarf_decode_lines_1): Adjust.
609 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
611 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
613 <info_proc>: Likewise.
615 2018-06-26 Joel Brobecker <brobecker@adacore.com>
617 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
618 to windows_fetch_one_register, and only handle the case of
619 fetching one register. Move the code that reloads the context
620 and iterates over all registers if R is negative to...
621 (windows_nat_target::fetch_registers): ... here.
622 (do_windows_store_inferior_registers): Rename to
623 windows_store_one_register, and only handle the case of storing
624 one register. Move the code that handles the case where r is
626 (windows_nat_target::store_registers) ... here.
628 2018-06-26 Tom Tromey <tom@tromey.com>
631 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
632 * rust-lang.c (rust_print_struct_def): Add podata parameter.
634 (rust_internal_print_type): Add podata parameter.
635 (rust_print_type): Update.
637 2018-06-26 Tom Tromey <tom@tromey.com>
639 * typeprint.h (struct print_offset_data) <update, finish,
640 maybe_print_hole>: New methods.
641 <indentation>: New constant.
642 * typeprint.c (print_offset_data::indentation): Define.
643 (print_offset_data::maybe_print_hole, print_offset_data::update)
644 (print_offset_data::finish): Move from c-typeprint.c and rename.
645 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
646 (print_spaces_filtered_with_print_options): Update.
647 (c_print_type_union_field_offset, maybe_print_hole)
648 (c_print_type_struct_field_offset): Move to typeprint.c and
650 (c_type_print_base_struct_union): Update.
652 2018-06-25 Pedro Alves <palves@redhat.com>
654 * gdbthread.h (thread_info_ref, delete_thread)
655 (delete_thread_silent, first_thread_of_inferior)
656 (any_thread_of_inferior, switch_to_thread)
657 (enable_thread_stack_temporaries)
658 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
659 (get_last_thread_stack_temporary)
660 (value_in_thread_stack_temporaries, can_access_registers_thread):
661 Spell out "struct thread_info" instead of just "thread_info".
662 * inferior.h (notice_new_inferior): Likewise.
664 2018-06-25 Pedro Alves <palves@redhat.com>
666 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
667 pass thread_info pointer to delete_thread.
668 (windows_nat_target::detach): Pass inferior pointer to
670 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
672 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
673 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
674 and pass a thread_info pointer to delete_thread.
675 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
676 pass thread_info pointer to delete_thread.
677 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
678 delete_thread_silent call.
679 * procfs.c (procfs_target::detach): Pass inferior pointer to
681 (procfs_target::wait): Pass thread_info pointer to delete_thread.
682 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
683 delete_thread_silent call.
684 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
685 pass thread_info pointer to delete_thread.
686 (windows_nat_target::detach): Pass inferior pointer to
689 2018-06-22 Alan Hayward <alan.hayward@arm.com>
691 * regcache.c (readable_regcache::read_part): Fix asserts.
692 (reg_buffer::raw_collect_part): New function.
693 (regcache::write_part): Fix asserts.
694 (reg_buffer::raw_supply_part): New function.
695 (regcache::transfer_regset_register): New helper function.
696 (regcache::transfer_regset): Call new functions.
697 (regcache_supply_regset): Use gdb_byte*.
698 (regcache::supply_regset): Likewise.
699 (regcache_collect_regset): Likewise.
700 (regcache::collect_regset): Likewise.
701 * regcache.h (reg_buffer::raw_collect_part): New declaration.
702 (reg_buffer::raw_supply_part): Likewise.
703 (regcache::transfer_regset_register): Likewise.
704 (regcache::transfer_regset): Use gdb_byte*.
706 2018-06-22 Alan Hayward <alan.hayward@arm.com>
708 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
710 2018-06-21 Pedro Alves <palves@redhat.com>
712 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
713 instead of a ptid_t. All callers adjusted.
714 * ada-tasks.c (ada_get_task_number): Likewise. All callers
716 (print_ada_task_info, display_current_task_id, task_command_1):
718 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
720 (breakpoint_kind): Adjust.
721 (remove_breakpoints_pid): Rename to ...
722 (remove_breakpoints_inf): ... this. Adjust to take an inferior
723 pointer. All callers adjusted.
724 (bpstat_clear_actions): Use inferior_thread.
725 (get_bpstat_thread): New.
726 (bpstat_do_actions): Use it.
727 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
728 to take a thread_info pointer. All callers adjusted.
729 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
730 (breakpoint_re_set_thread): Use inferior_thread.
731 * breakpoint.h (struct inferior): Forward declare.
732 (bpstat_stop_status): Update.
733 (remove_breakpoints_pid): Delete.
734 (remove_breakpoints_inf): New.
735 * bsd-uthread.c (bsd_uthread_target::wait)
736 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
737 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
738 (maint_btrace_packet_history_cmd)
739 (maint_btrace_clear_packet_history_cmd): Adjust.
740 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
742 * cli/cli-interp.c: Include "inferior.h".
743 * common/refcounted-object.h (struct
744 refcounted_object_ref_policy): New.
745 * compile/compile-object-load.c: Include gdbthread.h.
746 (store_regs): Use inferior_thread.
747 * corelow.c (core_target::close): Use current_inferior.
748 (core_target_open): Adjust to use first_thread_of_inferior and use
749 the current inferior.
750 * ctf.c (ctf_target::close): Adjust to use current_inferior.
751 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
752 <thread>: ... this new field. All references adjusted.
753 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
754 Take a thread_info pointer instead of a ptid_t.
755 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
756 (dummy_frame_discard, register_dummy_frame_dtor): Take a
757 thread_info pointer instead of a ptid_t.
758 * elfread.c: Include "inferior.h".
759 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
761 * eval.c (evaluate_subexp): Likewise.
762 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
764 * gdb_proc_service.h (struct thread_info): Forward declare.
765 (struct ps_prochandle) <ptid>: Delete, replaced by ...
766 <thread>: ... this new field. All references adjusted.
767 * gdbarch.h, gdbarch.c: Regenerate.
768 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
769 'thread' parameter. All implementations and callers adjusted.
770 * gdbthread.h (thread_info) <set_running>: New method.
771 (delete_thread, delete_thread_silent): Take a thread_info pointer
773 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
774 (first_thread_of_process): Delete, replaced by ...
775 (first_thread_of_inferior): ... this new function. All callers
777 (any_live_thread_of_process): Delete, replaced by ...
778 (any_live_thread_of_inferior): ... this new function. All callers
780 (switch_to_thread, switch_to_no_thread): Declare.
781 (is_executing): Delete.
782 (enable_thread_stack_temporaries): Update comment.
783 <enable_thread_stack_temporaries>: Take a thread_info pointer
784 instead of a ptid_t. Incref the thread.
785 <~enable_thread_stack_temporaries>: Decref the thread.
788 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
789 (get_last_thread_stack_temporary)
790 (value_in_thread_stack_temporaries, can_access_registers_thread):
791 Take a thread_info pointer instead of a ptid_t. All callers
793 * infcall.c (get_call_return_value): Use inferior_thread.
794 (run_inferior_call): Work with thread pointers instead of ptid_t.
795 (call_function_by_hand_dummy): Work with thread pointers instead
796 of ptid_t. Use thread_info_ref.
797 * infcmd.c (proceed_thread_callback): Access thread's state
799 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
800 access thread's state directly.
801 (continue_command): Use inferior_thread.
802 (info_program_command): Use find_thread_ptid and access thread
804 (proceed_after_attach_callback): Use thread state directly.
805 (notice_new_inferior): Take a thread_info pointer instead of a
806 ptid_t. All callers adjusted.
807 (exit_inferior): Take an inferior pointer instead of a pid. All
809 (exit_inferior_silent): New.
810 (detach_inferior): Delete.
811 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
812 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
813 (detach_inferior_command, kill_inferior_command): Use
814 find_inferior_id instead of valid_gdb_inferior_id and
815 gdb_inferior_id_to_pid.
816 (inferior_command): Use inferior and thread pointers.
817 * inferior.h (struct thread_info): Forward declare.
818 (notice_new_inferior): Take a thread_info pointer instead of a
819 ptid_t. All callers adjusted.
820 (detach_inferior): Delete declaration.
821 (exit_inferior, exit_inferior_silent): Take an inferior pointer
822 instead of a pid. All callers adjusted.
823 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
824 (valid_gdb_inferior_id): Delete.
825 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
826 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
827 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
829 <inf>: ... this new field.
830 <step_ptid>: Delete, replaced by ...
831 <step_thread>: ... this new field.
832 (get_displaced_stepping_state): Take an inferior pointer instead
833 of a pid. All callers adjusted.
834 (displaced_step_in_progress_any_inferior): Adjust.
835 (displaced_step_in_progress_thread): Take a thread pointer instead
836 of a ptid_t. All callers adjusted.
837 (displaced_step_in_progress, add_displaced_stepping_state): Take
838 an inferior pointer instead of a pid. All callers adjusted.
839 (get_displaced_step_closure_by_addr): Adjust.
840 (remove_displaced_stepping_state): Take an inferior pointer
841 instead of a pid. All callers adjusted.
842 (displaced_step_prepare_throw, displaced_step_prepare)
843 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
844 All callers adjusted.
845 (start_step_over): Adjust.
846 (infrun_thread_ptid_changed): Remove bit updating ptids in the
847 displaced step queue.
848 (do_target_resume): Adjust.
849 (fetch_inferior_event): Use inferior_thread.
850 (context_switch, get_inferior_stop_soon): Take an
851 execution_control_state pointer instead of a ptid_t. All callers
853 (switch_to_thread_cleanup): Delete.
854 (stop_all_threads): Use scoped_restore_current_thread.
855 * inline-frame.c: Include "gdbthread.h".
856 (inline_state) <inline_state>: Take a thread pointer instead of a
857 ptid_t. All callers adjusted.
858 <ptid>: Delete, replaced by ...
859 <thread>: ... this new field.
860 (find_inline_frame_state): Take a thread pointer instead of a
861 ptid_t. All callers adjusted.
862 (skip_inline_frames, step_into_inline_frame)
863 (inline_skipped_frames, inline_skipped_symbol): Take a thread
864 pointer instead of a ptid_t. All callers adjusted.
865 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
866 (inline_skipped_frames, inline_skipped_symbol): Likewise.
867 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
869 * linux-nat.c (get_detach_signal): Likewise.
870 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
871 (thread_db_notice_clone): Adjust.
872 (thread_db_find_new_threads_silently)
873 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
874 a thread pointer instead of a ptid_t. All callers adjusted.
875 * mi/mi-cmd-var.c: Include "inferior.h".
876 (mi_cmd_var_update_iter): Update to use thread pointers.
877 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
879 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
881 (mi_output_running): ... this new function.
882 (mi_on_resume_1): Adjust to use it.
883 (mi_user_selected_context_changed): Adjust to use inferior_thread.
884 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
886 (interrupt_thread_callback): : Adjust to use thread and inferior
888 * proc-service.c: Include "gdbthread.h".
889 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
890 * progspace-and-thread.c: Include "inferior.h".
891 * progspace.c: Include "inferior.h".
892 * python/py-exitedevent.c (create_exited_event_object): Adjust to
893 hold a reference to an inferior_object.
894 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
896 * python/py-inferior.c (struct inferior_object): Give the type a
897 tag name instead of a typedef.
898 (python_on_normal_stop): No need to check if the current thread is
900 (inferior_to_inferior_object): Change return type to
901 inferior_object. All callers adjusted.
902 (find_thread_object): Delete, bits factored out to ...
903 (thread_to_thread_object): ... this new function.
904 * python/py-infthread.c (create_thread_object): Use
905 inferior_to_inferior_object.
906 (thpy_is_stopped): Use thread pointer directly.
907 (gdbpy_selected_thread): Use inferior_thread.
908 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
909 field, replaced with ...
910 <thread>: ... this new field. All users adjusted.
911 (btpy_insn_or_gap_new): Drop const.
912 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
914 * python/py-record.c: Include "gdbthread.h".
915 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
916 a ptid_t. All callers adjusted.
917 (gdbpy_current_recording): Use inferior_thread.
918 * python/py-record.h (recpy_record_object) <ptid>: Delete
919 field, replaced with ...
920 <thread>: ... this new field. All users adjusted.
921 (recpy_element_object) <ptid>: Delete
922 field, replaced with ...
923 <thread>: ... this new field. All users adjusted.
924 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
925 a ptid_t. All callers adjusted.
926 * python/py-threadevent.c: Include "gdbthread.h".
927 (get_event_thread): Use thread_to_thread_object.
928 * python/python-internal.h (struct inferior_object): Forward
930 (find_thread_object, find_inferior_object): Delete declarations.
931 (thread_to_thread_object, inferior_to_inferior_object): New
933 * record-btrace.c: Include "inferior.h".
934 (require_btrace_thread): Use inferior_thread.
935 (record_btrace_frame_sniffer)
936 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
937 (get_thread_current_frame): Use scoped_restore_current_thread and
939 (get_thread_current_frame): Use thread pointer directly.
940 (record_btrace_replay_at_breakpoint): Use thread's inferior
942 * record-full.c: Include "inferior.h".
943 * regcache.c: Include "gdbthread.h".
944 (get_thread_arch_regcache): Use the inferior's address space
946 (get_thread_regcache, registers_changed_thread): New.
947 * regcache.h (get_thread_regcache(thread_info *thread)): New
949 (registers_changed_thread): New.
950 (remote_target) <remote_detach_1>: Swap order of parameters.
951 (remote_add_thread): <remote_add_thread>: Return the new thread.
952 (get_remote_thread_info(ptid_t)): New overload.
953 (remote_target::remote_notice_new_inferior): Use thread pointers
955 (remote_target::process_initial_stop_replies): Use
956 thread_info::set_running.
957 (remote_target::remote_detach_1, remote_target::detach)
958 (extended_remote_target::detach): Adjust.
959 * stack.c (frame_show_address): Use inferior_thread.
960 * target-debug.h (target_debug_print_thread_info_pp): New.
961 * target-delegates.c: Regenerate.
962 * target.c (default_thread_address_space): Delete.
963 (memory_xfer_partial_1): Use current_inferior.
964 (target_detach): Use current_inferior.
965 (target_thread_address_space): Delete.
966 (generic_mourn_inferior): Use current_inferior.
967 * target.h (struct target_ops) <thread_address_space>: Delete.
968 (target_thread_address_space): Delete.
969 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
971 (delete_thread_1, delete_thread, delete_thread_silent): Take a
972 thread pointer instead of a ptid_t. Adjust all callers.
973 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
974 (first_thread_of_process): Delete, replaced by ...
975 (first_thread_of_inferior): ... this new function. All callers
977 (any_thread_of_process): Rename to ...
978 (any_thread_of_inferior): ... this, and take an inferior pointer.
979 (any_live_thread_of_process): Rename to ...
980 (any_live_thread_of_inferior): ... this, and take an inferior
982 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
983 (value_in_thread_stack_temporaries)
984 (get_last_thread_stack_temporary): Take a thread pointer instead
985 of a ptid_t. Adjust all callers.
986 (thread_info::set_running): New.
987 (validate_registers_access): Use inferior_thread.
988 (can_access_registers_ptid): Rename to ...
989 (can_access_registers_thread): ... this, and take a thread
991 (print_thread_info_1): Adjust to compare thread pointers instead
993 (switch_to_no_thread, switch_to_thread): Make extern.
994 (scoped_restore_current_thread::~scoped_restore_current_thread):
995 Use m_thread pointer directly.
996 (scoped_restore_current_thread::scoped_restore_current_thread):
998 (thread_command): Use thread pointer directly.
999 (thread_num_make_value_helper): Use inferior_thread.
1000 * top.c (execute_command): Use inferior_thread.
1001 * tui/tui-interp.c: Include "inferior.h".
1002 * varobj.c (varobj_create): Use inferior_thread.
1003 (value_of_root_1): Use find_thread_global_id instead of
1004 global_thread_id_to_ptid.
1006 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1008 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1010 (regcache::write_part): Likewise.
1011 (readable_regcache::cooked_read_part): Update comment.
1012 (readable_regcache::cooked_write_part): Likewise.
1013 * regcache.h: (readable_regcache::read_part): Likewise.
1014 (regcache::write_part): Likewise.
1016 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1017 Dirk Schubert <dirk.schubert@arm.com>
1019 * aarch64-linux-nat.c (post_attach): New.
1020 (aarch64_linux_nat_target::post_attach): Override post_attach to
1021 record the number of hardware debug registers.
1023 2018-06-20 Tom Tromey <tom@tromey.com>
1025 * python/py-param.c (add_setshow_generic): Make parameters const.
1026 (parmpy_init): Update.
1028 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1030 * regcache.h (regcache_cooked_read_ftype): Rename to...
1031 (register_read_ftype): ...this, change type to function_view.
1032 (class reg_buffer) <save>: Remove src parameter.
1033 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1034 parameter non-const in first overload. Remove src parameter in
1036 * regcache.c (do_cooked_read): Remove.
1037 (readonly_detached_regcache::readonly_detached_regcache): Make
1038 parameter non-const, adjust call to other constructor.
1039 (reg_buffer::save): Remove src parameter.
1040 * frame.c (do_frame_register_read): Remove.
1041 (frame_save_as_regcache): Use lambda function.
1042 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1043 parameter to ppu2spu_data *.
1044 (ppu2spu_sniffer): Use lambda function.
1046 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1048 * record-full.c (record_full_target::insert_breakpoint): Remove
1049 "struct" keyword, add const.
1051 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1053 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1054 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1055 * configure.ac: Remove AC_PREREQ, add missing quoting.
1056 * gnulib/configure.ac: Modernize usage of
1057 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1058 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1059 (AUTOMAKE_VERSION): Bump to 1.15.1.
1060 * configure: Re-generate.
1061 * config.in: Re-generate.
1062 * aclocal.m4: Re-generate.
1063 * gnulib/aclocal.m4: Re-generate.
1064 * gnulib/config.in: Re-generate.
1065 * gnulib/configure: Re-generate.
1066 * gnulib/import/Makefile.in: Re-generate.
1068 2018-06-19 Pedro Alves <palves@redhat.com>
1070 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1071 (lookup_minimal_symbol_by_pc_section): ... here with
1072 gdb_assert_not_reached added.
1074 2018-06-19 Pedro Alves <palves@redhat.com>
1076 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1077 parameter with a block parameter. Compare location's block symbol
1078 with the frame's block instead of addresses.
1079 (skip_inline_frames): Pass the current block instead of the
1080 frame's address. Break out as soon as we determine the frame
1081 should not be skipped.
1083 2018-06-18 Tom Tromey <tom@tromey.com>
1085 * solib-aix.c (solib_aix_get_section_offsets): Return
1087 (solib_aix_solib_create_inferior_hook): Update.
1089 2018-06-18 Tom Tromey <tom@tromey.com>
1091 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1093 2018-06-18 Tom Tromey <tom@tromey.com>
1095 * solib-frv.c (frv_relocate_main_executable): Use
1097 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1100 2018-06-18 Tom Tromey <tom@tromey.com>
1102 * objfiles.h (inhibit_section_map_updates): Update.
1103 (resume_section_map_updates, resume_section_map_updates_cleanup):
1105 * solib-svr4.c (svr4_handle_solib_event): Update.
1106 * objfiles.c (inhibit_section_map_updates): Return
1107 scoped_restore_tmpl<int>.
1108 (resume_section_map_updates, resume_section_map_updates_cleanup):
1111 2018-06-18 Tom Tromey <tom@tromey.com>
1113 * valprint.h (read_string): Update.
1114 * valprint.c (read_string): Change type of "buffer".
1115 (val_print_string): Update.
1116 * python/py-value.c (valpy_string): Update.
1117 * language.h (struct language_defn) <la_get_string>: Change
1119 (default_get_string, c_get_string): Update.
1120 * language.c (default_get_string): Change type of "buffer".
1121 * guile/scm-value.c (gdbscm_value_to_string): Update.
1122 * c-lang.c (c_get_string): Change type of "buffer".
1124 2018-06-18 Tom Tromey <tom@tromey.com>
1126 * ser-mingw.c (struct pipe_state_destroyer): New.
1127 (pipe_state_up): New typedef.
1128 (cleanup_pipe_state): Remove.
1129 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1131 2018-06-18 Tom Tromey <tom@tromey.com>
1133 * rust-lang.h (rust_yyerror): Don't declare.
1134 * rust-lang.c (rust_language_defn): Update.
1135 * rust-exp.y (yyerror): Now static.
1136 * parse.c (parse_exp_in_context_1): Update.
1137 * p-lang.h (p_yyerror): Don't declare.
1138 * p-lang.c (p_language_defn): Update.
1139 * p-exp.y (yyerror): Now static.
1140 * opencl-lang.c (opencl_language_defn): Update.
1141 * objc-lang.c (objc_language_defn): Update.
1142 * m2-lang.h (m2_yyerror): Don't declare.
1143 * m2-lang.c (m2_language_defn): Update.
1144 * m2-exp.y (yyerror): Now static.
1145 * language.h (struct language_defn) <la_error>: Remove.
1146 * language.c (unk_lang_error): Remove.
1147 (unknown_language_defn, auto_language_defn): Remove.
1148 * go-lang.h (go_yyerror): Don't declare.
1149 * go-lang.c (go_language_defn): Update.
1150 * go-exp.y (yyerror): Now static.
1151 * f-lang.h (f_yyerror): Don't declare.
1152 * f-lang.c (f_language_defn): Update.
1153 * f-exp.y (yyerror): Now static.
1154 * d-lang.h (d_yyerror): Don't declare.
1155 * d-lang.c (d_language_defn): Update.
1156 * d-exp.y (yyerror): Now static.
1157 * c-lang.h (c_yyerror): Don't declare.
1158 * c-lang.c (c_language_defn, cplus_language_defn)
1159 (asm_language_defn, minimal_language_defn): Update.
1160 * c-exp.y (yyerror): Now static.
1161 * ada-lang.h (ada_yyerror): Don't declare.
1162 * ada-lang.c (ada_language_defn): Update.
1163 * ada-exp.y (yyerror): Now static.
1165 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1167 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1168 (store_sveregs_to_thread): Likewise.
1169 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1170 (aarch64_linux_store_inferior_registers): Likewise.
1171 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1173 (aarch64_sve_regs_copy_to_regcache): Likewise.
1174 (aarch64_sve_regs_copy_from_regcache): Likewise.
1175 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1177 (aarch64_sve_regs_copy_to_regcache): Likewise.
1178 (aarch64_sve_regs_copy_from_regcache): Likewise.
1179 (sve_context): Structure from Linux headers.
1180 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1181 (SVE_SIG_ZREG_SIZE): Likewise.
1182 (SVE_SIG_PREG_SIZE): Likewise.
1183 (SVE_SIG_FFR_SIZE): Likewise.
1184 (SVE_SIG_REGS_OFFSET): Likewise.
1185 (SVE_SIG_ZREGS_OFFSET): Likewise.
1186 (SVE_SIG_ZREG_OFFSET): Likewise.
1187 (SVE_SIG_ZREGS_SIZE): Likewise.
1188 (SVE_SIG_PREGS_OFFSET): Likewise.
1189 (SVE_SIG_PREG_OFFSET): Likewise.
1190 (SVE_SIG_PREGS_SIZE): Likewise.
1191 (SVE_SIG_FFR_OFFSET): Likewise.
1192 (SVE_SIG_REGS_SIZE): Likewise.
1193 (SVE_SIG_CONTEXT_SIZE): Likewise.
1194 (SVE_PT_REGS_MASK): Likewise.
1195 (SVE_PT_REGS_FPSIMD): Likewise.
1196 (SVE_PT_REGS_SVE): Likewise.
1197 (SVE_PT_VL_INHERIT): Likewise.
1198 (SVE_PT_VL_ONEXEC): Likewise.
1199 (SVE_PT_REGS_OFFSET): Likewise.
1200 (SVE_PT_FPSIMD_OFFSET): Likewise.
1201 (SVE_PT_FPSIMD_SIZE): Likewise.
1202 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1203 (SVE_PT_SVE_PREG_SIZE): Likewise.
1204 (SVE_PT_SVE_FFR_SIZE): Likewise.
1205 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1206 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1207 (__SVE_SIG_TO_PT): Likewise.
1208 (SVE_PT_SVE_OFFSET): Likewise.
1209 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1210 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1211 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1212 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1213 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1214 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1215 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1216 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1217 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1218 (SVE_PT_SVE_SIZE): Likewise.
1219 (SVE_PT_SIZE): Likewise.
1220 (HAS_SVE_STATE): New define.
1222 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1224 * nat/aarch64-sve-linux-sigcontext.h: New file.
1225 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1227 (SVE_VQ_MIN): Likewise.
1228 (SVE_VQ_MAX): Likewise.
1229 (SVE_VL_MIN): Likewise.
1230 (SVE_VL_MAX): Likewise.
1231 (SVE_NUM_ZREGS): Likewise.
1232 (SVE_NUM_PREGS): Likewise.
1233 (sve_vl_valid): Likewise.
1234 (struct user_sve_header): Likewise.
1236 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1237 Richard Bunt <Richard.Bunt@arm.com>
1239 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1240 was requested by GDB.
1242 2018-06-15 Tom de Vries <tdevries@suse.de>
1244 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1246 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1248 * gnulib/update-gnulib.sh: Print expected versions of
1251 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1253 * arch-utils.c (default_type_align): Use type_length_units.
1254 * gdbtypes.c (type_align): Use type_length_units.
1256 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1258 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1259 of 'define' command.
1261 2018-06-14 Tom de Vries <tdevries@suse.de>
1264 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1265 get_no_prettyformat_print_options.
1267 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1269 * sparc-nat.h: Include target.h.
1270 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1271 <fetch_registers>: Remove this argument in function call.
1272 <store_registers>: Remove this argument in function call, remove
1274 <low_forget_process>: Call sparc64_forget_process instead of
1275 sparc_forget_process.
1277 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1279 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1280 (procfs_target::make_corefile_notes): Adjust to new
1281 target_read_alloc return type.
1283 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1284 Stephen Roberts <stephen.roberts@arm.com>
1287 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1288 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1289 Move should_notify_stop local into more inner scope.
1291 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1292 Stephen Roberts <stephen.roberts@arm.com>
1295 * infrun.c (resume_1): Add call to mark_async_event_handler.
1297 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1299 * infrun.c (do_target_wait): Change old version of $pc printed.
1301 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1303 * dwarf2read.c (read_index_from_section): Rename to...
1304 (read_gdb_index_from_section): ... this, update all callers.
1305 (dwarf2_read_index): Rename to...
1306 (dwarf2_read_gdb_index): ... this, update all callers.
1308 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1310 * gdb/hppa-linux-nat.c
1311 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1312 hppa_linux_nat_target::fetch_registers.
1314 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1316 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1317 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1318 (AARCH64_DWARF_SVE_FFR): Likewise.
1319 (AARCH64_DWARF_SVE_P0): Likewise.
1320 (AARCH64_DWARF_SVE_Z0): Likewise.
1322 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1324 * common/common-regcache.h (raw_compare): New function.
1325 * regcache.c (regcache::raw_compare): Likewise.
1326 * regcache.h (regcache::raw_compare): New declaration.
1328 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1330 * common/common-regcache.h (reg_buffer_common): New structure.
1331 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1332 (reg_buffer::raw_supply): Likewise.
1333 (reg_buffer::raw_supply_integer): Likewise.
1334 (reg_buffer::raw_supply_zeroed): Likewise.
1335 (reg_buffer::raw_collect): Likewise.
1336 (reg_buffer::raw_collect_integer): Likewise.
1337 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1338 (reg_buffer::raw_supply): Likewise.
1339 (reg_buffer::raw_supply_integer): Likewise.
1340 (reg_buffer::raw_supply_zeroed): Likewise.
1341 (reg_buffer::raw_collect): Likewise.
1342 (reg_buffer::raw_collect_integer): Likewise.
1344 2018-06-10 Tom Tromey <tom@tromey.com>
1346 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1347 (class remote_state) <stop_reply_queue>: Now std::vector.
1348 (remote_state::~remote_state)
1349 (remote_target::stop_reply_queue_length): Update.
1350 (struct queue_iter_param, remove_child_of_pending_fork)
1351 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1352 (check_pending_event_prevents_wildcard_vcont_callback)
1353 (remove_stop_reply_for_inferior)
1354 (remove_stop_reply_of_remote_state)
1355 (remote_notif_remove_once_on_match)
1356 (stop_reply_match_ptid_and_ws)
1357 (remote_kill_child_of_pending_fork): Remove.
1358 (remote_target::remove_new_fork_children)
1359 (remote_target::check_pending_events_prevent_wildcard_vcont)
1360 (remote_target::discard_pending_stop_replies)
1361 (remote_target::discard_pending_stop_replies_in_queue)
1362 (remote_target::remote_notif_remove_queued_reply)
1363 (remote_target::queued_stop_reply)
1364 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1365 (remote_target::wait, remote_target::kill_new_fork_children)
1366 (remote_target::async): Update.
1368 2018-06-10 Tom Tromey <tom@tromey.com>
1370 * record-full.c (record_full_arch_list_cleanups): Remove.
1371 (record_full_message): Use try/catch.
1372 (record_full_wait_cleanups): Remove.
1373 (record_full_wait_1): Use try/catch.
1374 (record_full_restore): Likewise.
1376 2018-06-10 Tom Tromey <tom@tromey.com>
1378 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1379 declare VEC. Add constructor.
1380 <in_target_beneath>: Now bool.
1381 (record_full_breakpoints): Now a std::vector, static.
1382 (record_full_sync_record_breakpoints)
1383 (record_full_init_record_breakpoints)
1384 (record_full_target::insert_breakpoint)
1385 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1387 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1389 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1390 * serial.c (serial_interface_lookup): Remove struct keyword.
1392 2018-06-10 Tom Tromey <tom@tromey.com>
1394 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1396 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1398 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1400 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1401 "beneath" as a method.
1402 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1403 Use "beneath" as a method.
1405 2018-06-10 Tom Tromey <tom@tromey.com>
1407 * tracefile.c (struct trace_file_writer_deleter): New.
1408 <operator()>: Rename from trace_file_writer_xfree.
1409 (trace_file_writer_up): New typedef.
1410 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1412 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1414 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1415 <m_registers, m_register_status>: Change type to
1417 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1420 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1422 * common/common-regcache.h (enum register_status): Add
1423 underlying type "signed char".
1424 * regcache.h (reg_buffer) <m_register_status>: Change type to
1426 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1427 register_status instead of signed char.
1428 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1429 (reg_buffer::get_register_status): Remove cast.
1430 (readable_regcache::raw_read): Remove cast.
1431 (readable_regcache::cooked_read): Remove cast.
1433 2018-06-09 Tom Tromey <tom@tromey.com>
1435 * source.c (reverse_search_command, forward_search_command): Use
1438 2018-06-09 Tom Tromey <tom@tromey.com>
1440 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1441 (serial_ops_list): Now static, std::vector.
1442 (serial_interface_lookup, serial_add_interface): Update.
1444 2018-06-09 Tom Tromey <tom@tromey.com>
1446 * dwarf2read.c (process_cu_includes): Update.
1447 (process_full_comp_unit): Update.
1448 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1451 2018-06-08 Paul Koning <paul_koning@dell.com>
1455 * python/python.c (do_start_initialization):
1456 Avoid call to internal Python API.
1457 (init__gdb_module): New function.
1459 2018-06-08 Gary Benson <gbenson@redhat.com>
1461 * linux-thread-db.c (valprint.h): New include.
1462 (struct check_thread_db_info): New structure.
1463 (check_thread_db_on_load, tdb_testinfo): New static globals.
1464 (check_thread_db, check_thread_db_callback): New functions.
1465 (try_thread_db_load_1): Run integrity checks if requested.
1466 (maintenance_check_libthread_db): New function.
1467 (_initialize_thread_db): Register "maint check libthread-db"
1468 and "maint set/show check-libthread-db".
1469 * NEWS: Mention the above new commands.
1471 2018-06-08 Tom Tromey <tom@tromey.com>
1473 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1476 2018-06-08 Tom Tromey <tom@tromey.com>
1478 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1480 2018-06-08 Tom Tromey <tom@tromey.com>
1482 * common/btrace-common.h (struct btrace_data): Add constructor,
1483 destructor, move assignment operator.
1484 <empty, clear, fini>: New methods.
1485 <format>: Initialize.
1486 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1487 (btrace_data_empty): Don't declare.
1488 * common/btrace-common.c (btrace_data_init): Remove.
1489 (btrace_data::fini): Rename from btrace_data_fini.
1490 (btrace_data::empty): Rename from btrace_data_empty.
1491 (btrace_data::clear): Rename from btrace_data_clear. Return
1493 * btrace.h (make_cleanup_btrace_data): Don't declare.
1494 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1495 (parse_xml_btrace): Update.
1496 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1497 (maint_btrace_clear_packet_history_cmd): Update.
1499 2018-06-07 Pedro Alves <palves@redhat.com>
1501 * target.h (target_ops) <beneath>: Now a method. All references
1503 (class target_stack): New.
1504 * target.c (g_target_stack): New.
1505 (g_current_top_target): Delete.
1506 (current_top_target): Get the top target out of g_target_stack.
1507 (target_stack::push, target_stack::unpush): New.
1508 (push_target, unpush_target): Reimplement.
1509 (target_is_pushed): Reimplement in terms of g_target_stack.
1510 (target_ops::beneath, target_stack::find_beneath): New.
1512 2018-06-07 Pedro Alves <palves@redhat.com>
1514 * target.h (find_target_beneath): Delete declaration.
1515 * target.c (find_target_beneath): Delete definition.
1516 * aix-thread.c: All callers of find_target_beneath adjusted to
1517 call target_ops::beneath instead.
1518 * bsd-uthread.c: Likewise.
1519 * linux-thread-db.c: Likewise.
1520 * ravenscar-thread.c: Likewise.
1521 * sol-thread.c: Likewise.
1522 * spu-multiarch.c: Likewise.
1524 2018-06-07 Pedro Alves <palves@redhat.com>
1526 * target.h (target_ops) <beneath>: Now a method. All references
1528 (target_ops) <m_beneath>: New.
1529 * target.c (target_ops::beneath): New.
1530 * corelow.c: Adjust all references to target_ops::beneath.
1531 * linux-thread-db.c: Likewise.
1532 * make-target-delegates: Likewise.
1533 * record-btrace.c: Likewise.
1534 * record-full.c: Likewise.
1535 * remote.c: Likewise.
1536 * target.c: Likewise.
1537 * target-delegates.c: Regenerate.
1539 2018-06-07 Pedro Alves <palves@redhat.com>
1541 * target.h (target_stack): Delete.
1542 (current_top_target): Declare function.
1543 * target.c (target_stack): Delete.
1544 (g_current_top_target): New.
1545 (current_top_target): New function.
1546 * auxv.c: Use current_top_target instead of target_stack
1548 * avr-tdep.c: Likewise.
1549 * breakpoint.c: Likewise.
1550 * corefile.c: Likewise.
1551 * elfread.c: Likewise.
1553 * exceptions.c: Likewise.
1554 * frame.c: Likewise.
1555 * gdbarch-selftests.c: Likewise.
1556 * gnu-v3-abi.c: Likewise.
1557 * ia64-tdep.c: Likewise.
1558 * ia64-vms-tdep.c: Likewise.
1559 * infcall.c: Likewise.
1560 * infcmd.c: Likewise.
1561 * infrun.c: Likewise.
1562 * linespec.c: Likewise.
1563 * linux-tdep.c: Likewise.
1564 * minsyms.c: Likewise.
1565 * ppc-linux-nat.c: Likewise.
1566 * ppc-linux-tdep.c: Likewise.
1567 * procfs.c: Likewise.
1568 * regcache.c: Likewise.
1569 * remote.c: Likewise.
1570 * rs6000-tdep.c: Likewise.
1571 * s390-linux-nat.c: Likewise.
1572 * s390-tdep.c: Likewise.
1573 * solib-aix.c: Likewise.
1574 * solib-darwin.c: Likewise.
1575 * solib-dsbt.c: Likewise.
1576 * solib-spu.c: Likewise.
1577 * solib-svr4.c: Likewise.
1578 * solib-target.c: Likewise.
1579 * sparc-tdep.c: Likewise.
1580 * sparc64-tdep.c: Likewise.
1581 * spu-tdep.c: Likewise.
1582 * symfile.c: Likewise.
1583 * symtab.c: Likewise.
1584 * target-descriptions.c: Likewise.
1585 * target-memory.c: Likewise.
1586 * target.c: Likewise.
1587 * target.h: Likewise.
1588 * tracefile-tfile.c: Likewise.
1589 * tracepoint.c: Likewise.
1590 * valops.c: Likewise.
1591 * valprint.c: Likewise.
1592 * value.c: Likewise.
1593 * windows-tdep.c: Likewise.
1594 * mi/mi-main.c: Likewise.
1596 2018-06-07 Tom Tromey <tom@tromey.com>
1598 * valprint.h (build_address_symbolic): Declare.
1599 * printcmd.c (print_address_symbolic): Update.
1600 (build_address_symbolic): Change "name" and "filename" to
1602 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1604 * defs.h (build_address_symbolic): Remove declaration.
1606 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1608 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1609 (aarch64_vnv_type): Add function.
1610 (aarch64_pseudo_register_name): Add V regs for SVE.
1611 (aarch64_pseudo_register_type): Likewise.
1612 (aarch64_pseudo_register_reggroup_p): Likewise.
1613 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1614 (aarch64_pseudo_read_value): Add V regs for SVE.
1615 (aarch64_pseudo_write_2): Use V0 offset for SVE
1616 (aarch64_pseudo_write): Add V regs for SVE.
1617 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1619 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1621 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1622 (sve_vl_from_vq): Likewise.
1624 2018-06-05 Tom Tromey <tom@tromey.com>
1626 * cli/cli-cmds.c (show_version): Update.
1627 * top.c (print_gdb_version): Add "interactive" parameter.
1629 * main.c (captured_main_1): Update.
1630 * top.h (print_gdb_version): Add "interactive" parameter and a
1633 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1635 * common/enum-flags.h: Add trailing semicolon to example in
1638 2018-06-05 Tom Tromey <tom@tromey.com>
1641 * NEWS: Add entry about pager.
1642 * utils.c (pagination_disabled_for_command): New global.
1643 (prompt_for_continue): Allow "c" response to prompt.
1644 (reinitialize_more_filter): Clear
1645 pagination_disabled_for_command.
1646 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1648 2018-06-04 Tom Tromey <tom@tromey.com>
1650 * ada-lang.h (ada_lookup_symbol_list): Update.
1651 * ada-lang.c (resolve_subexp): Update.
1652 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1654 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1655 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1656 results parameter to std::vector.
1657 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1659 * ada-exp.y (block_lookup): Update.
1660 (select_possible_type_sym): Change type of syms. Remove nsyms
1662 (write_var_or_type, write_name_assoc): Update.
1664 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1666 * windows-nat.c (windows_nat_target::xfer_partial): Return
1667 TARGET_XFER_E_IO if we need to delegate to the target beneath
1668 but BENEATH is NULL.
1670 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1672 * Makefile.in (config.status): Add configure.nat as a
1675 2018-06-04 Tom Tromey <tom@tromey.com>
1677 * cp-name-parser.y (cpname_state): Add method declarations.
1678 (HANDLE_QUAL): Update.
1679 (cpname_state::d_grab, cpname_state::fill_comp)
1680 (cpname_state::make_operator, cpname_state::make_dtor)
1681 (cpname_state::make_builtin_type, cpname_state::make_name)
1682 (cpname_state::d_qualify, cpname_state::d_int_type)
1683 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1684 (%union): Move earlier.
1686 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1688 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1690 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1692 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1693 (aarch64_pseudo_write_1): Likewise.
1694 (aarch64_pseudo_read_value): Use helper.
1695 (aarch64_pseudo_write): Likewise.
1697 2018-06-04 Pedro Alves <palves@redhat.com>
1699 * darwin-nat.c (darwin_ops): Delete.
1700 (darwin_attach_pid): Use get_native_target.
1702 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1704 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1705 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1707 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1709 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1710 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1711 (aarch64_gdbarch_init): Check for SVE.
1712 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1714 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1716 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1717 * aarch64-tdep.h (aarch64_read_description): Likewise.
1718 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1719 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1720 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1721 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1722 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1724 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1726 * value.c (value_fetch_lazy_bitfield): New.
1727 (value_fetch_lazy_memory): New.
1728 (value_fetch_lazy_register): New.
1729 (value_fetch_lazy): Factor out to smaller functions.
1731 2018-06-01 Tom Tromey <tom@tromey.com>
1733 * cp-name-parser.y (backslashable, represented): Now const.
1735 2018-06-01 Tom Tromey <tom@tromey.com>
1737 * cp-name-parser.y: Include parser-defs.h.
1738 (parser_fprintf): Remove declaration.
1740 2018-06-01 Tom Tromey <tom@tromey.com>
1742 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1744 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1745 (global_result): Remove globals.
1746 (struct cpname_state): New.
1747 (yyparse): Don't declare.
1748 (yylex, yyerror): Move declarations after %union.
1749 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1750 (make_name): Add state parameter.
1752 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1754 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1756 (yylex): Add lvalp, state parameters.
1757 (yyerror): Add state parameter.
1758 (cp_demangled_name_to_comp): Update.
1760 2018-06-01 Tom Tromey <tom@tromey.com>
1762 * cp-name-parser.y (parser_fprintf): Declare.
1763 (GDB_YY_REMAP_PREFIX): Define.
1764 Include yy-remap.h. Don't redefine yy* identifiers.
1766 2018-06-01 Tom Tromey <tom@tromey.com>
1768 * python/py-type.c (typy_legacy_template_argument): Update.
1769 * cp-support.h (cp_demangled_name_to_comp): Update.
1770 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1771 parameter to be a "std::string *".
1774 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1776 * ada-lex.l: Include "diagnostics.h" instead of
1777 "common/diagnostics.h".
1778 * unittests/environ-selftests.c: Likewise.
1779 * common/diagnostics.h: Moved to ../include.
1781 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1783 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1784 to language_mode_manual while calling breakpoint_re_set_one.
1786 2018-06-01 Tom Tromey <tom@tromey.com>
1788 * valops.c (value_cast_structs, destructor_name_p): Update.
1789 * symtab.c (gdb_mangle_name): Update.
1790 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1792 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1793 (pascal_object_print_value_fields, pascal_object_print_value):
1795 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1796 * linespec.c (find_methods): Update.
1797 * gdbtypes.h (type_name_no_tag): Remove.
1798 (type_name_or_error): Rename from type_name_no_tag_or_error.
1799 * gdbtypes.c (type_name_no_tag): Remove.
1800 (type_name_or_error): Rename from type_name_no_tag_or_error.
1801 (lookup_struct_elt_type, check_typedef): Update.
1802 * expprint.c (print_subexp_standard): Update.
1803 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1804 * d-namespace.c (d_lookup_nested_symbol): Update.
1805 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1806 (cp_print_class_member): Update.
1807 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1808 * completer.c (add_struct_fields): Update.
1809 * c-typeprint.c (cp_type_print_derivation_info)
1810 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1812 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1813 (ada_prefer_type, ada_is_exception_sym): Update.
1815 2018-06-01 Tom Tromey <tom@tromey.com>
1817 * valops.c (enum_constant_from_type, value_namespace_elt)
1818 (value_maybe_namespace_elt): Update.
1819 * valarith.c (find_size_for_pointer_math): Update.
1820 * target-descriptions.c (make_gdb_type): Update.
1821 * symmisc.c (print_symbol): Update.
1822 * stabsread.c (define_symbol, read_type)
1823 (complain_about_struct_wipeout, add_undefined_type)
1824 (cleanup_undefined_types_1): Update.
1825 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1826 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1827 (rust_internal_print_type, rust_composite_type)
1828 (rust_evaluate_funcall, rust_evaluate_subexp)
1829 (rust_inclusive_range_type_p): Update.
1830 * python/py-type.c (typy_get_tag): Update.
1831 * p-typeprint.c (pascal_type_print_base): Update.
1832 * mdebugread.c (parse_symbol, parse_type): Update.
1833 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1835 * guile/scm-type.c (gdbscm_type_tag): Update.
1836 * go-lang.c (sixg_string_p): Update.
1837 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1839 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1840 (TYPE_TAG_NAME): Remove.
1841 * gdbtypes.c (type_name_no_tag): Simplify.
1842 (check_typedef, check_types_equal, recursive_dump_type)
1843 (copy_type_recursive, arch_composite_type): Update.
1844 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1845 in summary mode when needed.
1846 * eval.c (evaluate_funcall): Update.
1847 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1848 (process_structure_scope, read_enumeration_type)
1849 (read_namespace_type, read_module_type, determine_prefix): Update.
1850 * cp-support.c (inspect_type): Update.
1851 * coffread.c (process_coff_symbol, decode_base_type): Update.
1852 * c-varobj.c (c_is_path_expr_parent): Update.
1853 * c-typeprint.c (c_type_print_base_struct_union): Update.
1854 (c_type_print_base_1): Update. Print struct/class/union/enum in
1855 summary when using C language.
1856 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1857 (gen_maybe_namespace_elt): Update.
1858 * ada-lang.c (ada_type_name): Simplify.
1859 (empty_record, ada_template_to_fixed_record_type_1)
1860 (template_to_static_fixed_type)
1861 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1863 2018-06-01 Tom Tromey <tom@tromey.com>
1865 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1867 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1868 (c_print_type): Update.
1869 (c_print_type): New overload.
1870 (c_type_print_varspec_prefix, c_type_print_args)
1871 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1872 (c_type_print_base_struct_union, c_type_print_base_1)
1873 (cp_type_print_method_args): Add "language" parameter.
1874 (c_type_print_base): Update.
1875 * c-lang.h (c_print_type): Add new overload.
1877 2018-06-01 Tom Tromey <tom@tromey.com>
1879 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1880 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1882 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1884 * aarch64-tdep.c (aarch64_sve_register_names): New const
1886 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1887 (AARCH64_SVE_Z_REGS_NUM): New define.
1888 (AARCH64_SVE_P_REGS_NUM): Likewise.
1889 (AARCH64_SVE_NUM_REGS): Likewise.
1891 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1893 * nat/linux-ptrace.h [__alpha__]
1894 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1897 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1899 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1900 the endianness selected.
1901 * NEWS: Document `set endian auto' mode operation update.
1903 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1905 * Makefile.in: Add new header.
1906 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1907 (sve_vl_from_vg): Likewise.
1908 (sve_vq_from_vl): Likewise.
1909 (sve_vl_from_vq): Likewise.
1910 (sve_vq_from_vg): Likewise.
1911 (sve_vg_from_vq): Likewise.
1912 * configure.nat: Add new c file.
1913 * nat/aarch64-sve-linux-ptrace.c: New file.
1914 * nat/aarch64-sve-linux-ptrace.h: New file.
1916 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1918 * aarch64-linux-nat.c (aarch64_linux_read_description):
1920 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1922 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1923 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1924 (aarch64_gdbarch_init): Add parmeter zero.
1925 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1926 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1927 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1929 * doc/gdb.texinfo: Describe SVE feature
1930 * features/aarch64-sve.c: New file.
1932 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1935 * gdbarch.sh (significant_addr_bit): Default to zero when
1936 not set by target architecture.
1937 * gdbarch.c: Re-generated.
1938 * utils.c (address_significant): Update.
1940 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1942 * stack.c (func_command): Remove trailing newline in call to error.
1944 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1946 * regcache.h (regcache_raw_collect): Remove, update callers to
1947 use regcache::raw_collect.
1948 * regcache.c (regcache_raw_collect): Remove.
1950 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1952 * regcache.h (regcache_raw_supply): Remove, update callers to
1953 use detached_regcache::raw_supply.
1954 * regcache.c (regcache_raw_supply): Remove.
1956 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1958 * regcache.h (regcache_cooked_write_part): Remove, update
1959 callers to use regcache::cooked_write_part.
1960 * regcache.c (regcache_cooked_write_part): Remove.
1962 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1964 * regcache.h (regcache_cooked_read_part): Remove, update callers
1965 to use readable_regcache::cooked_read_part.
1966 * regcache.c (regcache_cooked_read_part): Remove.
1968 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1970 * regcache.h (regcache_cooked_read_value): Remove, update
1971 callers to use readable_regcache::cooked_read_value.
1972 * regcache.c (regcache_cooked_read_value): Remove.
1974 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1976 * regcache.h (regcache_cooked_write): Remove, update callers to
1977 use regcache::cooked_write.
1978 * regcache.c (regcache_cooked_write): Remove.
1980 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1982 * regcache.h (regcache_invalidate): Remove, update callers to
1983 use detached_regcache::invalidate instead.
1984 * regcache.c (regcache_invalidate): Remove.
1986 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1988 * regcache.h (regcache_raw_write_part): Remove, update callers
1989 to use regcache::raw_write_part instead.
1990 * regcache.c (regcache_raw_write_part): Remove.
1992 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1994 * regcache.h (regcache_raw_read_part): Remove, update callers to
1995 use readable_regcache::raw_read_part instead.
1996 * regcache.c (regcache_raw_read_part): Remove.
1998 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2000 * regcache.h (regcache_cooked_read): Remove, update callers to
2001 use readable_regcache::cooked_read instead.
2002 * regcache.c (regcache_cooked_read): Remove.
2004 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2006 * regcache.h (regcache_raw_write): Remove, update callers to use
2007 regcache::raw_write instead.
2008 * regcache.c (regcache_raw_write): Remove.
2010 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2012 * regcache.h (regcache_raw_read): Remove, update callers to use
2013 readable_regcache::raw_read instead.
2014 * regcache.c (regcache_raw_read): Remove.
2016 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2018 * regcache.h (regcache_raw_update): Remove, update callers to
2019 use readable_regcache::raw_update instead.
2020 * regcache.c (regcache_raw_update): Remove.
2022 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2024 * regcache.h (regcache_register_status): Remove, update callers
2025 to use reg_buffer::get_register_status directly instead.
2026 * regcache.c (regcache_register_status): Remove.
2028 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2030 * regcache.h (regcache_get_ptid): Remove, update all callers to
2031 call regcache::ptid instead.
2032 * regcache.c (regcache_get_ptid): Remove.
2034 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2036 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2038 2018-05-30 Pedro Alves <palves@redhat.com>
2040 * common/common-exceptions.h (exception_rethrow): Use
2043 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2045 * breakpoint.c (print_solib_event, check_status_catch_solib):
2046 Remove struct keyword in range-based for loops.
2047 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2048 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2050 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2052 * symfile.c (addr_info_make_relative): Likewise.
2053 * thread.c (value_in_thread_stack_temporaries): Likewise.
2055 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2058 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2059 aggregate type to get its real type before accessing it.
2061 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2063 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2064 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2065 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2066 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2067 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2068 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2069 * printcmd.c (info_address_command): Likewise.
2071 2018-05-29 Tom Tromey <tom@tromey.com>
2073 * windows-nat.c (handle_exception): Update fall-through comment.
2075 2018-05-29 Tom Tromey <tom@tromey.com>
2077 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2078 (struct program_space) <added_solibs>: Now a std::vector.
2079 * breakpoint.c (print_solib_event): Update.
2080 (check_status_catch_solib): Update.
2081 * progspace.c (clear_program_space_solib_cache): Update.
2082 * solib.c (update_solib_list): Update.
2084 2018-05-29 Tom Tromey <tom@tromey.com>
2086 * python/py-type.c (typy_richcompare): Update.
2087 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2088 * gdbtypes.h (types_deeply_equal): Return bool.
2089 (types_equal): Likewise.
2090 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2092 (check_types_equal): Change worklist to std::vector. Return
2094 (struct type_equality_entry): Add constructor.
2095 (compare_maybe_null_strings): Return bool.
2096 (check_types_worklist): Return bool. Change worklist to
2098 (types_deeply_equal): Use std::vector.
2099 (types_equal): Return bool.
2100 (compare_maybe_null_strings): Simplify.
2102 2018-05-29 Tom Tromey <tom@tromey.com>
2104 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2106 2018-05-29 Tom Tromey <tom@tromey.com>
2108 * objc-lang.h: Don't include cp-support.h.
2109 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2112 2018-05-27 Tom Tromey <tom@tromey.com>
2114 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2116 2018-05-25 Tom Tromey <tom@tromey.com>
2118 * value.c (value::location): Initialize.
2120 2018-05-25 Tom Tromey <tom@tromey.com>
2122 * dbxread.c (init_bincl_list): Remove.
2123 (bincl_list): Now a std::vector.
2124 (bincls_allocated, next_bincl): Remove.
2125 (free_bincl_list, do_free_bincl_list_cleanup)
2126 (make_cleanup_free_bincl_list): Remove.
2127 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2129 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2130 (struct header_file_location): Add constructor.
2131 (add_bincl_to_list): Remove.
2133 2018-05-25 Tom Tromey <tom@tromey.com>
2135 * tui/tui.c (tui_enable): Update.
2136 * mi/mi-interp.c (mi_interp::init): Update.
2137 * interps.h (class interp) <name>: New method.
2138 <m_name>: Rename from name.
2139 (~scoped_restore_interp): Update.
2140 * interps.c (interp::interp): Update.
2141 (interp_add, interp_set, interp_lookup_existing)
2142 (current_interp_named_p): Update.
2144 2018-05-25 Tom Tromey <tom@tromey.com>
2146 * interps.c (interp_name): Remove.
2147 * mi/mi-interp.c (mi_interp::init): Update.
2148 * interps.h (interp_name): Remove.
2149 (~scoped_restore_interp): Update.
2150 * tui/tui.c (tui_enable): Update.
2152 2018-05-25 Tom Tromey <tom@tromey.com>
2154 * utils.c (fputs_maybe_filtered): Update.
2155 * linespec.c (decode_line_full): Update.
2156 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2157 (mi_print_breakpoint_for_event, mi_solib_loaded)
2158 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2159 (mi_user_selected_context_changed): Update.
2160 * mi/mi-main.c (mi_execute_command): Update.
2161 * cli/cli-script.c (execute_control_command): Update.
2162 * python/python.c (execute_gdb_command): Update.
2163 * solib.c (info_sharedlibrary_command): Update.
2164 * interps.c (interp_ui_out): Remove.
2165 * interps.h (interp_ui_out): Remove.
2167 2018-05-25 Tom Tromey <tom@tromey.com>
2169 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2170 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2171 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2173 2018-05-25 Tom Tromey <tom@tromey.com>
2175 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2176 * interps.c (interp_exec): Use scoped_restore.
2178 2018-05-25 Tom Tromey <tom@tromey.com>
2180 * remote.c (remote_target::remote_file_get): Use
2182 (remote_target::remote_file_put): Likewise.
2184 2018-05-25 Tom Tromey <tom@tromey.com>
2186 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2188 (get_pe_section_index, add_pe_exported_sym): Update.
2189 (read_pe_exported_syms): Use gdb::def_vector.
2191 2018-05-25 Tom Tromey <tom@tromey.com>
2193 * frame.c (remove_prev_frame): Remove.
2194 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2196 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2198 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2200 * mips-linux-nat.c (supply_fpregset): Always call
2201 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2202 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2203 `mips_fill_fpregset'.
2204 * mips-linux-tdep.c (mips_supply_fpregset)
2205 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2206 (mips_fill_fpregset_wrapper): Remove functions.
2207 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2208 (mips_linux_fpregset): Remove variable.
2209 (mips_linux_iterate_over_regset_sections): Use
2210 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2211 (mips_linux_o32_sigframe_init): Remove comment.
2213 2018-05-25 Pedro Alves <palves@redhat.com>
2215 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2216 (struct readahead_cache, struct packet_reg, struct
2217 remote_arch_state, class remote_state): Move higher up in the
2219 (remote_target::m_remote_state): Now an object instead of a pointer.
2220 (remote_target::get_remote_state): Adjust.
2222 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2224 * stack.c (select_and_print_frame): Delete.
2225 (struct function_bounds): Move struct within function.
2226 (func_command): Most content moved into new function
2227 find_frame_for_function, use new function, print result, add
2229 (find_frame_for_function): New function, now returns a result.
2231 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2233 * stack.c (iterate_over_block_arg_vars): Fix comment.
2234 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2236 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2240 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2242 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2244 * frame.h (class scoped_restore_selected_frame): New class.
2245 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2246 of any exception, use scoped_restore_selected_frame to restore the
2249 2018-05-24 Pedro Alves <palves@redhat.com>
2251 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2254 2018-05-23 Tom Tromey <tom@tromey.com>
2256 * complaints.c (struct complaints): Remove.
2257 (symfile_complaint_book): Remove.
2258 (series): New global.
2259 (complaint_internal): Update.
2260 (clear_complaints): Update.
2262 2018-05-23 Tom Tromey <tom@tromey.com>
2264 * complaints.c (counters): New global.
2265 (struct complain): Remove.
2266 (struct complaints) <root>: Remove.
2267 (complaint_sentinel): Remove.
2268 (symfile_complaint_book): Update.
2269 (find_complaint) Remove.
2270 (complaint_internal, clear_complaints): Update.
2272 2018-05-23 Tom Tromey <tom@tromey.com>
2274 * complaints.c (struct complain) <file, line>: Remove.
2275 (find_complaint): Remove file, line parameters.
2276 (complaint_internal): Update.
2278 2018-05-23 Tom Tromey <tom@tromey.com>
2280 * complaints.c (vcomplaint): Remove.
2281 (complaint_internal) Merge in contents of vcomplaint.
2283 2018-05-23 Tom Tromey <tom@tromey.com>
2285 * complaints.c (struct complaints) <explanation>: Remove.
2286 (symfile_explanations): Remove.
2287 (symfile_complaint_book): Update.
2288 (vcomplaint): Update.
2289 (struct explanation): Remove.
2291 2018-05-23 Tom Tromey <tom@tromey.com>
2293 * complaints.c (symfile_complaints): Remove.
2294 (complaint_internal): Remove "complaints" parameter.
2295 (clear_complaints, vcomplaint): Remove "c" parameter.
2296 (get_complaints): Remove.
2297 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2298 (dwarf2_debug_line_missing_file_complaint)
2299 (dwarf2_debug_line_missing_end_sequence_complaint)
2300 (dwarf2_complex_location_expr_complaint)
2301 (dwarf2_const_value_length_mismatch_complaint)
2302 (dwarf2_section_buffer_overflow_complaint)
2303 (dwarf2_macro_malformed_definition_complaint)
2304 (dwarf2_invalid_attrib_class_complaint)
2305 (create_addrmap_from_index, dw2_symtab_iter_next)
2306 (dw2_expand_marked_cus)
2307 (dw2_debug_names_iterator::find_vec_in_debug_names)
2308 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2309 (create_debug_type_hash_table, init_cutu_and_read_dies)
2310 (partial_die_parent_scope, add_partial_enumeration)
2311 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2312 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2313 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2314 (create_cus_hash_table, create_dwp_hash_table)
2315 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2316 (dwarf2_rnglists_process, dwarf2_ranges_process)
2317 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2318 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2319 (handle_struct_member_die, process_structure_scope)
2320 (read_array_type, read_common_block, read_module_type)
2321 (read_tag_pointer_type, read_typedef, read_base_type)
2322 (read_subrange_type, load_partial_dies, partial_die_info::read)
2323 (partial_die_info::read, partial_die_info::read)
2324 (partial_die_info::read, read_checked_initial_length_and_offset)
2325 (dwarf2_string_attr, read_formatted_entries)
2326 (dwarf_decode_line_header)
2327 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2328 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2329 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2330 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2331 (get_signatured_type, get_DW_AT_signature_type)
2332 (decode_locdesc, file_file_name, consume_improper_spaces)
2333 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2334 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2335 (dwarf2_symbol_mark_computed, set_die_type)
2336 (read_attribute_value): Update.
2337 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2339 * dbxread.c (unknown_symtype_complaint)
2340 (lbrac_mismatch_complaint, repeated_header_complaint)
2341 (set_namestring, function_outside_compilation_unit_complaint)
2342 (read_dbx_symtab, process_one_symbol): Update.
2343 * gdbtypes.c (stub_noname_complaint): Update.
2344 * windows-nat.c (handle_unload_dll): Update.
2345 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2346 (decode_base_type): Update.
2347 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2348 (eb_complaint, record_include_begin, record_include_end)
2349 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2350 (process_xcoff_symbol, read_symbol)
2351 (function_outside_compilation_unit_complaint)
2352 (scan_xcoff_symtab): Update.
2353 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2354 * buildsym.c (finish_block_internal, make_blockvector)
2355 (end_symtab_get_static_block, augment_type_symtab): Update.
2356 * dtrace-probe.c (dtrace_process_dof)
2357 (dtrace_static_probe_ops::get_probes): Update.
2358 * complaints.h (struct complaint): Don't declare.
2359 (symfile_complaints): Remove.
2360 (complaint_internal): Remove "complaints" parameter.
2361 (complaint): Likewise.
2362 (clear_complaints): Likewise.
2363 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2364 (reread_symbols): Update.
2365 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2366 (dwarf2_frame_cache, decode_frame_entry): Update.
2367 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2368 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2369 (info_selectors_command): Update.
2370 * macrotab.c (macro_include, check_for_redefinition)
2371 (macro_undef): Update.
2372 * objfiles.c (filter_overlapping_sections): Update.
2373 * stabsread.c (invalid_cpp_abbrev_complaint)
2374 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2375 (define_symbol, error_type, read_type, rs6000_builtin_type)
2376 (stabs_method_name_from_physname, read_member_functions)
2377 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2378 (attach_fields_to_type, complain_about_struct_wipeout)
2379 (read_range_type, read_args, common_block_start)
2380 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2382 * mdebugread.c (index_complaint, unknown_ext_complaint)
2383 (basic_type_complaint, bad_tag_guess_complaint)
2384 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2385 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2386 (parse_procedure, parse_lines)
2387 (function_outside_compilation_unit_complaint)
2388 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2389 (bad_tag_guess_complaint, reg_value_complaint): Update.
2390 * cp-support.c (demangled_name_complaint): Update.
2391 * macroscope.c (sal_macro_scope): Update.
2392 * dwarf-index-write.c (class debug_names): Update.
2394 2018-05-23 Tom Tromey <tom@tromey.com>
2396 * complaints.c (clear_complaints): Remove "noisy" parameter.
2397 * complaints.h (clear_complaints): Update.
2398 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2399 (reread_symbols): Update.
2401 2018-05-23 Tom Tromey <tom@tromey.com>
2403 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2405 (vcomplaint, clear_complaints): Update.
2406 (symfile_explanations): Remove some messages.
2408 2018-05-23 Tom Tromey <tom@tromey.com>
2410 * complaints.c (internal_complaint): Remove.
2411 * complaints.h (internal_complaint): Remove.
2413 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2415 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2417 2018-05-22 Pedro Alves <palves@redhat.com>
2419 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2420 (remote_fileio_badfd, remote_fileio_return_errno)
2421 (remote_fileio_return_success, remote_fileio_func_open)
2422 (remote_fileio_func_open, remote_fileio_func_close)
2423 (remote_fileio_func_read, remote_fileio_func_write)
2424 (remote_fileio_func_lseek, remote_fileio_func_rename)
2425 (remote_fileio_func_unlink, remote_fileio_func_stat)
2426 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2427 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2428 remote_target parameter.
2429 (remote_fio_func_map) <func>: Add remote_target parameter.
2430 (do_remote_fileio_request, remote_fileio_request):
2431 * remote-fileio.h (remote_fileio_request):
2432 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2433 remote_target parameter.
2434 (remote_notif_process, handle_notification): Adjust to pass down
2436 (remote_notif_state_allocate): Add remote_target parameter. Save
2438 * remote-notif.h (struct remote_target): Forward declare.
2439 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2440 remote_target parameter.
2441 (struct remote_notif_state) <remote>: New field.
2442 (remote_notif_ack, remote_notif_parse): Add remote_target
2444 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2445 remote_target parameter.
2446 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2447 (threads_listing_context, rmt_thread_action, protocol_feature)
2448 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2449 (packet_result, struct threads_listing_context, remote_state):
2450 Move definitions and declarations higher up.
2451 (remote_target) <~remote_target>: Declare.
2452 (remote_download_command_source, remote_file_put, remote_file_get)
2453 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2454 (remote_hostio_pread_vFile, remote_hostio_send_command)
2455 (remote_hostio_set_filesystem, remote_hostio_open)
2456 (remote_hostio_close, remote_hostio_unlink, remote_state)
2457 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2458 (get_memory_write_packet_size, get_memory_read_packet_size)
2459 (append_pending_thread_resumptions, remote_detach_1)
2460 (append_resumption, remote_resume_with_vcont)
2461 (add_current_inferior_and_thread, wait_ns, wait_as)
2462 (process_stop_reply, remote_notice_new_inferior)
2463 (process_initial_stop_replies, remote_add_thread)
2464 (btrace_sync_conf, remote_btrace_maybe_reopen)
2465 (remove_new_fork_children, kill_new_fork_children)
2466 (discard_pending_stop_replies, stop_reply_queue_length)
2467 (check_pending_events_prevent_wildcard_vcont)
2468 (discard_pending_stop_replies_in_queue, stop_reply)
2469 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2470 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2471 (remote_interrupt_as, remote_interrupt_ns)
2472 (remote_get_noisy_reply, remote_query_attached)
2473 (remote_add_inferior, remote_current_thread, get_current_thread)
2474 (set_thread, set_general_thread, set_continue_thread)
2475 (set_general_process, write_ptid)
2476 (remote_unpack_thread_info_response, remote_get_threadinfo)
2477 (parse_threadlist_response, remote_get_threadlist)
2478 (remote_threadlist_iterator, remote_get_threads_with_ql)
2479 (remote_get_threads_with_qxfer)
2480 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2481 (get_offsets, remote_check_symbols, remote_supported_packet)
2482 (remote_query_supported, remote_packet_size)
2483 (remote_serial_quit_handler, remote_detach_pid)
2484 (remote_vcont_probe, remote_resume_with_hc)
2485 (send_interrupt_sequence, interrupt_query)
2486 (remote_notif_get_pending_events, fetch_register_using_p)
2487 (send_g_packet, process_g_packet, fetch_registers_using_g)
2488 (store_register_using_P, store_registers_using_G)
2489 (set_remote_traceframe, check_binary_download)
2490 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2491 (remote_xfer_live_readonly_partial, remote_read_bytes)
2492 (remote_send_printf, remote_flash_write, readchar)
2493 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2494 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2495 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2496 (extended_remote_disable_randomization, extended_remote_run)
2497 (send_environment_packet, extended_remote_environment_support)
2498 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2499 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2500 (packet_command): Now methods of ...
2501 (remote_target): ... this class.
2502 (m_remote_state) <remote_target>: New field.
2503 (struct remote_state) <stop_reply_queue,
2504 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2506 (remote_state::remote_state): Allocate stop_reply_queue.
2507 (remote_state): Delete global.
2508 (get_remote_state_raw): Delete.
2509 (remote_target::get_remote_state): Allocate m_remote_state on
2511 (get_current_remote_target): New.
2512 (remote_ops, extended_remote_ops): Delete.
2513 (wait_forever_enabled_p, remote_async_inferior_event_token):
2514 Delete, moved to struct remote_state.
2515 (remote_target::close): Delete self. Destruction bits split to
2517 (remote_target::~remote_target): ... this.
2518 (show_memory_packet_size): Adjust to use
2519 get_current_remote_target.
2520 (struct protocol_feature) <func>: Add remote_target parameter.
2521 All callers adjusted.
2522 (curr_quit_handler_target): New.
2523 (remote_serial_quit_handler): Reimplement.
2524 (remote_target::open_1): Adjust to use get_current_remote_target.
2525 Heap-allocate remote_target/extended_remote_target instances.
2526 (vcont_builder::vcont_builder): Add remote_target parameter, and
2527 save it in m_remote. All callers adjusted.
2528 (vcont_builder::m_remote): New field.
2529 (vcont_builder::restart, vcont_builder::flush)
2530 (vcont_builder::push_action): Use it.
2531 (remote_target::commit_resume): Use it.
2532 (struct queue_iter_param) <remote>: New field.
2533 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2534 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2535 (check_pending_event_prevents_wildcard_vcont_callback)
2536 (remote_target::check_pending_events_prevent_wildcard_vcont)
2537 (remote_target::discard_pending_stop_replies)
2538 (remote_target::discard_pending_stop_replies_in_queue)
2539 (remote_target::remote_notif_remove_queued_reply): Fill in
2541 (remote_notif_get_pending_events): New.
2542 (remote_target::readchar, remote_target::remote_serial_write):
2543 Save/restore curr_quit_handler_target.
2545 (kill_new_fork_children): Fill in 'remote' field.
2546 (packet_command): Use get_current_remote_target, defer to
2547 remote_target method of same name.
2548 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2549 parameter, and save it in m_remote. All callers adjusted.
2550 (scoped_remote_fd::release): Use m_remote.
2551 (scoped_remote_fd::m_remote): New field.
2552 (remote_file_put, remote_file_get, remote_file_delete): Use
2553 get_current_remote_target, defer to remote_target method of same
2555 (remote_btrace_reset): Add remote_state paremeter. Update all
2557 (remote_async_inferior_event_handler). Pass down 'data'.
2558 (remote_new_objfile): Use get_current_remote_target.
2559 (remote_target::vcont_r_supported): New.
2560 (set_range_stepping): Use get_current_remote_target and
2561 remote_target::vcont_r_supported.
2562 (_initialize_remote): Don't allocate 'remote_state' and
2563 'stop_reply_queue' globals.
2564 * remote.h (struct remote_target): Forward declare.
2565 (getpkt, putpkt, remote_notif_get_pending_events): Add
2566 'remote_target' parameter.
2568 2018-05-22 Pedro Alves <palves@redhat.com>
2570 * remote.c (vcont_builder): Now a class. Make all data members
2572 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2574 (vcont_builder_restart): Rename to ...
2575 (vcont_builder::restart): ... this.
2576 (vcont_builder_flush): Rename to ...
2577 (vcont_builder::flush): ... this.
2578 (vcont_builder_push_action): Rename to ...
2579 (vcont_builder::push_action): ... this.
2580 (remote_target::commit_resume): Adjust.
2582 2018-05-22 Pedro Alves <palves@redhat.com>
2584 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2585 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2586 (get_fixed_memory_packet_size): New.
2587 (get_memory_packet_size): Use it.
2588 (set_memory_packet_size): Don't override the config size with
2589 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2590 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2591 Don't refer to get_memory_packet_size if not connected to a remote
2592 target. Show "(default)" if configured size is 0.
2594 2018-05-22 Pedro Alves <palves@redhat.com>
2596 * remote.c (remote_target::mourn_inferior): Move
2597 discard_pending_stop_replies call here from ...
2598 (_initialize_remote): ... here.
2600 2018-05-22 Pedro Alves <palves@redhat.com>
2602 * remote.c (compare_section_command): Remove set_general_process
2605 2018-05-22 Pedro Alves <palves@redhat.com>
2607 * remote.c (struct packet_reg, struct remote_arch_state):
2608 Move higher up in the file.
2609 (remote_state) <m_arch_states>: Store remote_arch_state values
2610 instead of remote_arch_state pointers.
2611 (remote_state::get_remote_arch_state): Adjust.
2613 2018-05-22 Pedro Alves <palves@redhat.com>
2615 * remote.c: Include <unordered_map>.
2616 (remote_state): Now a class.
2617 (remote_state) <get_remote_arch_state>: Declare method.
2618 <get_remote_arch_state>: New field.
2619 (remote_arch_state) <remote_arch_state>: Declare ctor.
2620 <regs>: Now a unique_ptr.
2621 (remote_gdbarch_data_handle): Delete.
2622 (get_remote_arch_state): Delete.
2623 (remote_state::get_remote_arch_state): New.
2624 (get_remote_state): Adjust to call remote_state's
2625 get_remote_arch_state method.
2626 (init_remote_state): Delete, bits factored out to ...
2627 (remote_arch_state::remote_arch_state): ... this new method.
2628 (get_remote_packet_size, get_memory_packet_size)
2629 (process_g_packet, remote_target::fetch_registers)
2630 (remote_target::prepare_to_store, store_registers_using_G)
2631 (remote_target::store_registers, remote_target::get_trace_status):
2632 Adjust to call remote_state's method.
2633 (_initialize_remote): Remove reference to
2634 remote_gdbarch_data_handle.
2636 2018-05-22 Pedro Alves <palves@redhat.com>
2638 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2639 pread>: New method declarations.
2640 (remote_target::open_1): Adjust.
2641 (readahead_cache_invalidate): Rename to ...
2642 (readahead_cache::invalidate): ... this, and adjust to be a class
2644 (readahead_cache_invalidate_fd): Rename to ...
2645 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2647 (remote_hostio_pwrite): Adjust.
2648 (remote_hostio_pread_from_cache): Rename to ...
2649 (readahead_cache::pread): ... this, and adjust to be a class
2651 (remote_hostio_close): Adjust.
2653 2018-05-22 Pedro Alves <palves@redhat.com>
2655 * remote.c (remote_hostio_close_cleanup): Delete.
2656 (class scoped_remote_fd): New.
2657 (remote_file_put, remote_file_get): Use it.
2659 2018-05-22 Pedro Alves <palves@redhat.com>
2661 (struct vCont_action_support): Use bool and initialize all fields.
2662 (struct readahead_cache): Initialize all fields.
2663 (remote_state): Use bool and initialize all fields.
2664 (remote_state::remote_state, remote_state::~remote_state): New.
2665 (new_remote_state): Delete.
2666 (_initialize_remote): Use new to allocate remote_state.
2668 2018-05-22 Pedro Alves <palves@redhat.com>
2672 * c-exp.y: Include "c-support.h".
2673 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2674 of tolower. Use c_ident_is_alpha to scan names.
2675 * c-lang.c: Include "c-support.h".
2676 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2677 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2678 * c-support.h: New file, with bits factored out from ...
2679 * cp-name-parser.y: ... this file.
2680 Include "c-support.h".
2681 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2682 c-support.h and renamed.
2683 (symbol_end, yylex): Adjust.
2685 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2687 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2688 parameter type to CORE_ADDR.
2689 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2690 parameter type in declaration to CORE_ADDR.
2691 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2692 target_auxv_search to get AT_HWCAP and use the result to get the
2694 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2695 to CORE_ADDR. Remove the cast of the return value to unsigned
2696 long. Fix error predicate of target_auxv_search.
2697 (ppc_linux_nat_target::read_description): Change the type of the
2698 hwcap variable to CORE_ADDR.
2700 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2702 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2703 if the size of fpscr is larger than 32 bits.
2705 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2707 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2708 (ppc32_linux_vsxregmap): New global.
2709 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2710 regcache_supply_regset, and regcache_collect_regset.
2711 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2712 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2713 (fetch_vsx_register, store_vsx_register): Remove.
2714 (fetch_vsx_registers): Add regno parameter. Get regset using
2715 ppc_linux_vsxregset. Use regset to supply registers.
2716 (store_vsx_registers): Add regno parameter. Get regset using
2717 ppc_linux_vsxregset. Use regset to collect registers.
2718 (fetch_register): Call fetch_vsx_registers instead of
2720 (store_register): Call store_vsx_registers instead of
2722 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2723 new regno parameter.
2724 (store_ppc_registers): Call store_vsx_registers with -1 for the
2725 new regno parameter.
2726 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2727 (ppc_collect_vsxregset): Remove.
2729 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2731 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2733 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2734 for vector register offset fields.
2735 (ppc64_fbsd_reg_offsets): Likewise.
2736 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2737 to vector register offset fields.
2738 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2739 to vector register offset fields.
2740 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2741 vector register offset fields.
2742 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2743 initializers for vector register offset fields.
2744 (rs6000_aix64_reg_offsets): Likewise.
2745 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2746 (ppc_supply_vrregset): Remove.
2747 (ppc_collect_vrregset): Remove.
2748 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2749 (ppc_linux_vrregset) : New function.
2750 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2751 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2752 (ppc32_linux_vrregset): Remove.
2753 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2754 and use result instead of ppc32_linux_vrregset.
2755 (ppc32_linux_reg_offsets): Remove initializers for vector register
2757 (ppc64_linux_reg_offsets): Likewise.
2758 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2759 * ppc-linux-nat.c: Include regset.h.
2760 (gdb_vrregset_t): Adjust comment to account for little-endian
2762 (supply_vrregset, fill_vrregset): Remove.
2763 (fetch_altivec_register, store_altivec_register): Remove.
2764 (fetch_altivec_registers): Add regno parameter. Get regset using
2765 ppc_linux_vrregset. Use regset to supply registers.
2766 (store_altivec_registers): Add regno parameter. Get regset using
2767 ppc_linux_vrregset. Use regset to collect registers.
2768 (fetch_register): Call fetch_altivec_registers instead of
2769 fetch_altivec_register.
2770 (store_register): Call store_altivec_registers instead of
2771 store_altivec_register.
2772 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2773 the new regno parameter.
2774 (store_ppc_registers): Call store_altivec_registers with -1 for
2775 the new regno parameter.
2777 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2779 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2780 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2781 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2782 (gdb_vrregset_t): Change array type size to
2783 PPC_LINUX_SIZEOF_VRREGSET.
2784 (gdb_vsxregset_t): Change array type size to
2785 PPC_LINUX_SIZEOF_VSXREGSET.
2786 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2787 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2788 PPC_LINUX_SIZEOF_VSXREGSET.
2790 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2792 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2793 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2795 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2796 ppc_linux_target_wordsize with tid.
2797 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2799 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2800 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2801 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2802 tid parameter. Remove static specifier.
2803 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2804 (ppc_linux_target_wordsize): New declaration.
2806 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2808 * arch/ppc-linux-common.c: New file.
2809 * arch/ppc-linux-common.h: New file.
2810 * arch/ppc-linux-tdesc.h: New file.
2811 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2812 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2813 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2814 arch/ppc-linux-tdesc.h.
2815 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2816 arch/ppc-linux-tdesc.h.
2817 (ppc_linux_nat_target::read_description): Remove target
2818 description matching code. Fill a ppc_linux_features struct and
2819 call ppc_linux_match_description with it. Move comment about ISA
2820 2.05 to ppc-linux-common.c.
2821 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2822 arch/ppc-linux-tdesc.h.
2823 (ppc_linux_core_read_description): Remove target description
2824 matching code. Fill a ppc_linux_features struct and call
2825 ppc_linux_match_description with it.
2826 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2827 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2828 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2829 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2830 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2831 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2832 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2833 (tdesc_powerpc_e500l): Remove.
2835 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2837 * ada-lang.c (catch_assert_command): Pass empty string instead
2838 of NULL for excep_string argument.
2840 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2842 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2843 the width of the requested register exceeds the width of the
2846 2018-05-21 Tom Tromey <tom@tromey.com>
2848 * printcmd.c (output_command): Remove.
2849 (output_command_const): Rename to output_command.
2850 * valprint.h (output_command): Rename from output_command_const.
2851 * tracepoint.c (trace_dump_actions): Call output_command.
2853 2018-05-21 Tom Tromey <tom@tromey.com>
2855 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2856 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2857 * ada-lang.h (create_ada_exception_catchpoint): Update.
2858 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2860 (create_excep_cond_exprs, ~ada_catchpoint)
2861 (should_stop_exception, print_one_exception)
2862 (print_mention_exception, print_recreate_exception): Update.
2863 (ada_get_next_arg): Remove.
2864 (catch_ada_exception_command_split): Use std::string. Change type
2865 of "excep_string", "cond_string".
2866 (catch_ada_exception_command): Update.
2867 (create_ada_exception_catchpoint): Change type of excep_string.
2868 (ada_exception_sal): Remove excep_string parameter.
2869 (~ada_catchpoint): Remove.
2871 2018-05-21 Tom Tromey <tom@tromey.com>
2873 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2876 2018-05-21 Tom Tromey <tom@tromey.com>
2878 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2879 Return unique_xmalloc_ptr.
2880 (print_it_exception): Update.
2882 2018-05-21 Tom Tromey <tom@tromey.com>
2884 * tracepoint.c (trace_dump_actions): Use std::string.
2886 2018-05-21 Tom Tromey <tom@tromey.com>
2888 * symfile.c (reread_symbols): Use std::string for original_name.
2890 2018-05-21 Tom Tromey <tom@tromey.com>
2892 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2893 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2896 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2898 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2900 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2901 * objfiles.c (get_objfile_bfd_data): Allocate
2902 objfile_per_bfd_storage with obstack_new when allocating on
2905 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2907 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2909 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2910 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2911 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2912 (add_pending): Likewise.
2913 (parse_symbol): Likewise.
2914 (parse_partial_symbols): Likewise.
2915 (psymtab_to_symtab_1): Likewise.
2916 (new_psymtab): Likewise.
2917 (elfmdebug_build_psymtabs): Likewise.
2918 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2919 * objfiles.c (get_objfile_bfd_data): Likewise.
2920 (objfile_register_static_link): Likewise.
2921 * psymtab.c (allocate_psymtab): Likewise.
2922 * stabsread.c (read_member_functions): Likewise.
2923 * xcoffread.c (xcoff_end_psymtab): Likewise.
2925 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2927 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2928 compiler supports std::is_trivially_constructible.
2929 * common/poison.h: Include obstack.h.
2930 (IsMallocable): Define to is_trivially_constructible if the
2931 compiler supports it, define to true_type otherwise.
2935 (XOBNEWVEC): Redefine.
2936 * gdb_obstack.h (obstack_zalloc): New.
2937 (OBSTACK_ZALLOC): Redefine.
2938 (obstack_calloc): New.
2939 (OBSTACK_CALLOC): Redefine.
2941 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2942 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2944 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2945 obstack_calloc/obstack_zalloc.
2946 (gdbarch_obstack_zalloc): Remove.
2947 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2949 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2951 * stack.c (backtrace_command_1): Remove useless variable int i.
2953 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2955 * stack.c (print_frame_info): Fix comment.
2957 2018-05-18 Tom Tromey <tom@tromey.com>
2959 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2960 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2961 (~dwarf2_per_objfile): Update
2962 (dwarf2_get_dwz_file): Use new.
2963 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2966 2018-05-18 Tom Tromey <tom@tromey.com>
2968 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2970 * dwarf2read.c (struct dwp_file): Add constructor and
2972 (open_and_init_dwp_file): Return a unique_ptr.
2973 (dwarf2_per_objfile, create_dwp_hash_table)
2974 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2975 (lookup_dwo_unit_in_dwp): Update.
2976 (open_and_init_dwp_file, get_dwp_file): Update.
2978 2018-05-18 Tom Tromey <tom@tromey.com>
2980 * dwarf2read.c (dwarf2_per_objfile): Update.
2981 (struct mapped_index): Add initializers.
2982 (dwarf2_read_index): Use new.
2983 (dw2_symtab_iter_init): Update.
2984 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2987 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2989 * dwarf2read.c (mapped_index) <total_size>: Remove.
2991 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2993 * unittests/format_pieces-selftests.c (test_format_specifier):
2996 2018-05-18 Tom Tromey <tom@tromey.com>
2998 * c-typeprint.c (maybe_print_hole): New function.
2999 (c_print_type_struct_field_offset): Update.
3000 (c_type_print_base_struct_union): Call maybe_print_hole.
3002 2018-05-17 Keith Seitz <keiths@redhat.com>
3004 * breakpoint.c (build_bpstat_chain): New function, moved from
3006 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3007 If no stop chain is passed, call build_bpstat_chain to build it.
3008 * breakpoint.h (build_bpstat_chain): Declare.
3009 (bpstat_stop_status): Move documentation here from breakpoint.c.
3010 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3011 build the stop chain and pass it to skip_inline_frames.
3012 Pass this stop chain to bpstat_stop_status.
3013 * inline-frame.c: Include breakpoint.h.
3014 (stopped_by_user_bp_inline_frame): New function.
3015 (skip_inline_frames): Add parameter `stop_chain'.
3016 Move documention to inline-frame.h.
3017 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3018 whether the frame should be elided.
3019 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3020 Add moved documentation and update for new parameter.
3022 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3025 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3026 unittests/format_pieces-selftests.c.
3027 * common/format.h (format_piece) <operator==>: New.
3028 (format_pieces) <operator[]>: Remove.
3029 * common/format.c (format_pieces::format_pieces): Handle \e.
3030 * unittests/format_pieces-selftests.c: New.
3032 2018-05-17 Tom Tromey <tom@tromey.com>
3035 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3036 (dw2_instantiate_symtab): Add skip_partial parameter.
3037 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3038 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3039 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3040 (dw2_expand_symtabs_matching_one)
3041 (dw2_find_pc_sect_compunit_symtab)
3042 (dw2_debug_names_lookup_symbol)
3043 (dw2_debug_names_expand_symtabs_for_function): Update.
3044 (init_cutu_and_read_dies): Add skip_partial parameter.
3045 (process_psymtab_comp_unit, build_type_psymtabs_1)
3046 (process_skeletonless_type_unit, load_partial_comp_unit)
3047 (psymtab_to_symtab_1): Update.
3048 (load_full_comp_unit): Add skip_partial parameter.
3049 (process_imported_unit_die, dwarf2_read_addr_index)
3050 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3051 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3052 (read_signatured_type): Update.
3054 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3056 * value.c (release_value): Remove unused variable.
3057 (record_latest_value): Likewise.
3058 (access_value_history): Likewise.
3059 (preserve_values): Likewise.
3061 2018-05-17 Tom Tromey <tom@tromey.com>
3063 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3066 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3069 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3070 Also handle registers whose width is not a multiple of
3072 (linux_nat_trad_target::store_register): Likewise.
3074 2018-05-16 Tom Tromey <tom@tromey.com>
3076 * gdbcore.h (core_bfd): Redefine.
3077 * corelow.c (core_target::close): Update.
3078 (core_target_open): Update.
3079 * progspace.h (struct program_space) <cbfd>: Now a
3082 2018-05-16 Tom Tromey <tom@tromey.com>
3085 * symfile-add-flags.h (enum symfile_add_flags)
3086 <SYMFILE_NOT_FILENAME>: New constant.
3087 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3088 objfile name from BFD.
3089 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3090 * minidebug.c (find_separate_debug_file_in_section): Put
3091 ".gnu_debugdata" into BFD's file name.
3093 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3095 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3098 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3101 * aarch64-tdep.c (aarch64_analyze_prologue,
3102 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3103 Indicate not interested in errors.
3105 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3107 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3108 Supply the MIPS_ZERO_REGNUM register.
3110 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3112 * mips-tdep.c (mask_address_var): Make variable static.
3114 2018-05-14 Tom Tromey <tom@tromey.com>
3116 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3118 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3120 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3121 FXSAVE_ADDR for the mxcsr register.
3123 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3125 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3127 2018-05-11 Pedro Alves <palves@redhat.com>
3129 * corelow.c (core_target) <core_target>: No longer inline.
3130 Initialize m_core_gdbarch, m_core_vec and build the section table
3132 <~core_target>: New.
3133 <core_gdbarch, get_core_register_section>: New methods.
3134 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3135 factored out from ...
3136 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3138 (sniff_core_bfd): Add gdbarch parameter.
3139 (core_close): Delete, merged into ...
3140 (core_target::close): ... here. Delete self.
3141 (core_close_cleanup): Delete.
3142 (core_target_open): Allocate a core_target on the heap. Use a
3143 unique_ptr instead of a cleanup. Bits moved into the core_target
3144 ctor. Adjust to use core_target methods instead of globals.
3145 (get_core_register_section): Rename to ...
3146 (core_target::get_core_register_section): ... this and adjust.
3147 (struct get_core_registers_cb_data): New.
3148 (get_core_registers_cb): Use it. Use bool.
3149 (core_target::fetch_registers, core_target::files_info)
3150 (core_target::xfer_partial, core_target::read_description)
3151 (core_target::pid_to, core_target::thread_name): Adjust to
3152 reference class fields instead of globals.
3153 * target.h (struct target_ops_deleter, target_ops_up): New.
3155 2018-05-11 Pedro Alves <palves@redhat.com>
3157 * corefile.c (core_file_command): Move to corelow.c.
3158 * corelow.c (the_core_target): Delete.
3159 (core_file_command): Moved from corefile.c. Check exec_bfd
3160 instead of the_core_target. Use target_detach instead of calling
3161 into the_core_target directly.
3162 (maybe_say_no_core_file_now): New.
3163 (core_target::detach): Use it.
3164 (_initialize_corelow): Remove references to the_core_target.
3165 * gdbcore.h (the_core_target): Delete.
3167 2018-05-11 Tom Tromey <tromey@redhat.com>
3168 Pedro Alves <palves@redhat.com>
3170 * corefile.c (core_bfd): Remove.
3171 * gdbcore.h (core_bfd): Now a macro.
3172 * progspace.h (struct program_space) <cbfd>: New field.
3174 2018-05-11 Tom Tromey <tom@tromey.com>
3176 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3179 2018-05-10 Tom Tromey <tom@tromey.com>
3181 * configure: Rebuild.
3182 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3184 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3187 * regformats/regdat.sh: Adjust script, following the addition
3188 of the new expedite_regs parameter to init_target_desc.
3190 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3193 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3194 set_gdbarch_significant_addr_bit.
3195 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3196 set_gdbarch_significant_addr_bit.
3197 * utils.c (address_significant): Update to sign extend addr.
3199 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3201 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3202 (xtensa_linux_init_abi): Limit tdep->num_regs by
3203 tdep->num_nopriv_regs.
3204 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3205 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3208 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3210 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3212 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3214 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3215 (I387_MXCSR_INIT_VAL): New constant.
3216 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3217 buffer if it was supplied by the inferior.
3218 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3219 (i387_xsave_get_clear_bv): New function.
3220 (i387_supply_xsave): Only read x87 control registers from the
3221 xsave buffer if the feature is enabled, and the state will have
3222 been written, otherwise, provide a suitable default.
3223 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3224 including x87 control registers. Update control registers if they
3225 have changed from the default value, and mark features as enabled
3227 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3229 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3231 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3233 2018-05-07 Tom Tromey <tom@tromey.com>
3235 * configure: Rebuild.
3236 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3238 2018-05-07 Tom Tromey <tom@tromey.com>
3241 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3242 bit. Use correct value for VDIV.
3244 2018-05-04 Tom Tromey <tom@tromey.com>
3246 * configure: Rebuild.
3247 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3249 2018-05-04 Tom Tromey <tom@tromey.com>
3251 * linux-record.c (record_linux_system_call) <case
3252 RECORD_SYS_RECVFROM>: Add "break".
3254 2018-05-04 Tom Tromey <tom@tromey.com>
3256 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3257 Add missing "break".
3258 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3259 Add missing "break".
3261 2018-05-04 Tom Tromey <tom@tromey.com>
3263 * rs6000-tdep.c (ppc_process_record_op4)
3264 (ppc_process_record_op63): Add fall-through comment.
3266 2018-05-04 Tom Tromey <tom@tromey.com>
3268 * i386-tdep.c (i386_process_record): Add fall-through comment.
3270 2018-05-04 Tom Tromey <tom@tromey.com>
3272 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3275 2018-05-04 Tom Tromey <tom@tromey.com>
3277 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3278 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3279 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3281 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3283 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3286 2018-05-04 Tom Tromey <tom@tromey.com>
3288 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3290 2018-05-04 Tom Tromey <tom@tromey.com>
3292 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3293 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3294 * symfile.c (section_is_mapped): Fix fall-through comment.
3295 * stabsread.c (define_symbol, read_member_functions): Fix
3296 fall-through comment.
3297 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3299 * remote.c (remote_wait_as): Fix fall-through comment.
3300 * p-exp.y (yylex): Fix fall-through comment.
3301 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3303 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3304 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3305 * jv-exp.y (yylex): Fix fall-through comment.
3306 * go-exp.y (lex_one_token): Fix fall-through comment.
3307 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3308 fall-through comment.
3309 * f-exp.y (yylex): Fix fall-through comment.
3310 * dwarf2read.c (process_die): Fix fall-through comments.
3311 * dbxread.c (process_one_symbol): Fix fall-through comment.
3312 * d-exp.y (lex_one_token): Fix fall-through comment.
3313 * cp-name-parser.y (yylex): Fix fall-through comment.
3314 * coffread.c (coff_symtab_read): Fix fall-through comment.
3315 * c-exp.y (lex_one_token): Fix fall-through comment.
3316 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3318 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3321 2018-05-04 Tom Tromey <tom@tromey.com>
3324 * NEWS: Mention gdb.execute change.
3325 * gdbcmd.h (execute_control_command): Don't declare.
3326 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3327 execute_control_commands, execute_control_commands_to_string.
3328 * cli/cli-script.h (execute_control_commands)
3329 (execute_control_commands_to_string): Declare.
3330 (execute_control_command): Add from_tty parameter.
3331 * cli/cli-script.c (execute_control_commands)
3332 (execute_control_commands_to_string): New functions.
3333 (execute_user_command): Use execute_control_commands.
3334 (execute_control_command_1): Add "from_tty" parameter. Update.
3335 (execute_control_command): Likewise.
3337 2018-05-04 Tom Tromey <tom@tromey.com>
3340 * NEWS: Mention that breakpoint commands are writable.
3341 * python/py-breakpoint.c (bppy_set_commands): New function.
3342 (breakpoint_object_getset) <"commands">: Use it.
3344 2018-05-04 Tom Tromey <tom@tromey.com>
3346 * tracepoint.c (actions_command): Update.
3347 * mi/mi-cmd-break.c (mi_command_line_array)
3348 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3349 (mi_read_next_line): Remove.
3350 (mi_cmd_break_commands): Update.
3351 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3353 * cli/cli-script.c (get_command_line): Update.
3354 (process_next_line): Use function_view. Constify.
3355 (recurse_read_control_structure, read_command_lines)
3356 (read_command_lines_1): Change argument types to function_view.
3357 (do_define_command, document_command): Update.
3358 * breakpoint.h (check_tracepoint_command): Don't declare.
3359 * breakpoint.c (check_tracepoint_command): Remove.
3360 (commands_command_1, create_tracepoint_from_upload): Update.
3362 2018-05-04 Tom Tromey <tom@tromey.com>
3365 * cli/cli-script.h (enum command_control_type) <define_control>:
3367 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3368 (build_command_line, execute_control_command_1)
3369 (process_next_line): Likewise.
3370 (do_define_command): New function, extracted from define_command.
3371 (define_command): Use it.
3373 2018-05-04 Tom Tromey <tom@tromey.com>
3375 * tracepoint.c (actions_command): Update.
3376 * cli/cli-script.h (read_command_lines): Update.
3377 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3378 (MAX_TMPBUF): Remove define.
3379 (define_command): Use string_printf.
3380 (document_command): Likewise.
3381 * breakpoint.c (commands_command_1): Update.
3383 2018-05-04 Tom Tromey <tom@tromey.com>
3385 * top.c (execute_command): Update.
3386 * cli/cli-script.h (print_command_lines): Now varargs.
3387 * cli/cli-script.c (print_command_lines): Now varargs.
3388 (execute_control_command_1) <case while_control, case if_control>:
3391 2018-05-04 Tom Tromey <tom@tromey.com>
3393 * tracepoint.c (all_tracepoint_actions): Rename from
3394 all_tracepoint_actions_and_cleanup. Change return type.
3395 (actions_command, encode_actions_1, encode_actions)
3396 (trace_dump_actions, tdump_command): Update.
3397 * remote.c (remote_download_command_source): Update.
3398 * python/python.c (gdbpy_eval_from_control_command)
3399 (python_command, python_interactive_command): Update.
3400 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3401 * guile/guile.c (guile_command)
3402 (gdbscm_eval_from_control_command, guile_command): Update.
3403 * compile/compile.c (compile_code_command)
3404 (compile_print_command, compile_to_object): Update.
3405 * cli/cli-script.h (struct command_lines_deleter): New.
3406 (counted_command_line): New typedef.
3407 (struct command_line): Add constructor, destructor.
3408 <body_list>: Remove.
3409 <body_list_0, body_list_1>: New members.
3410 (command_line_up): Remove typedef.
3411 (read_command_lines, read_command_lines_1, get_command_line):
3413 (copy_command_lines): Don't declare.
3414 * cli/cli-script.c (build_command_line): Use "new".
3415 (get_command_line): Return counted_command_line.
3416 (print_command_lines, execute_user_command)
3417 (execute_control_command_1, while_command, if_command): Update.
3418 (realloc_body_list): Remove.
3419 (process_next_line, recurse_read_control_structure): Update.
3420 (read_command_lines, read_command_lines_1): Return counted_command_line.
3421 (free_command_lines): Use "delete".
3422 (copy_command_lines): Remove.
3423 (define_command, document_command, show_user_1): Update.
3424 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3425 a counted_command_line.
3426 * breakpoint.h (counted_command_line): Remove typedef.
3427 (breakpoint_set_commands): Update.
3428 * breakpoint.c (check_no_tracepoint_commands)
3429 (validate_commands_for_breakpoint): Update.
3430 (breakpoint_set_commands): Change commands to be a
3431 counted_command_line.
3432 (commands_command_1, update_dprintf_command_list)
3433 (create_tracepoint_from_upload): Update.
3435 2018-05-04 Tom Tromey <tom@tromey.com>
3437 * cli/cli-decode.h (cmd_list_element): New constructor.
3438 (~cmd_list_element): New destructor.
3439 (struct cmd_list_element): Add initializers.
3440 * cli/cli-decode.c (do_add_cmd): Use "new".
3441 (delete_cmd): Use "delete".
3443 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3444 Pedro Alves <palves@redhat.com>
3446 PR breakpoints/19806 and support for PR external/20207.
3447 * NEWS: Mention Aarch64 watchpoint improvements.
3448 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3449 watchpoints and PR external/20207 watchpoints.
3450 * nat/aarch64-linux-hw-point.c
3451 (kernel_supports_any_contiguous_range): New.
3452 (aarch64_watchpoint_offset): New.
3453 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3454 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3455 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3456 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3457 next_addr_orig_p. Support PR external/20207 watchpoints.
3458 (aarch64_downgrade_regs): New.
3459 (aarch64_dr_state_insert_one_point): New parameters offset and
3461 (aarch64_dr_state_remove_one_point): Likewise.
3462 (aarch64_handle_breakpoint): Update caller.
3463 (aarch64_handle_aligned_watchpoint): Likewise.
3464 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3466 (aarch64_linux_set_debug_regs): Remove const from state. Call
3467 aarch64_downgrade_regs.
3468 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3469 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3470 (DR_CONTROL_MASK): ... this.
3471 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3472 (unsigned int aarch64_watchpoint_offset): New prototype.
3473 (aarch64_linux_set_debug_regs): Remove const from state.
3474 * utils.c (align_up, align_down): Move to ...
3475 * common/common-utils.c (align_up, align_down): ... here.
3476 * utils.h (align_up, align_down): Move to ...
3477 * common/common-utils.h (align_up, align_down): ... here.
3479 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3481 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3482 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3483 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3484 Re-implement to match the ABI as summarized in GCC's
3485 gcc/config/sparc/sparc.c. All callers updated.
3486 (sparc32_store_arguments): Remove assertion.
3488 2018-05-04 Tom Tromey <tom@tromey.com>
3490 * printcmd.c: Don't include tui.h.
3491 (decode_format): Use skip_spaces.
3493 2018-05-04 Tom Tromey <tom@tromey.com>
3496 * printcmd.c (last_count): New global.
3497 (x_command): Use saved count when repeating.
3499 2018-05-04 Tom Tromey <tom@tromey.com>
3501 * nto-procfs.c (do_closedir_cleanup): Remove.
3502 (procfs_pidlist): Use gdb_dir_up.
3503 * procfs.c (do_closedir_cleanup): Remove.
3504 (proc_update_threads): Use gdb_dir_up.
3505 * common/filestuff.h (struct gdb_dir_deleter): New.
3506 (gdb_dir_up): New typedef.
3508 2018-05-04 Tom Tromey <tom@tromey.com>
3510 * ada-lang.c (print_mention_exception): Use std::string.
3512 2018-05-04 Tom Tromey <tom@tromey.com>
3514 * ada-lang.c (create_excep_cond_exprs): Update.
3515 (ada_exception_catchpoint_cond_string): Use std::string.
3517 2018-05-04 Tom Tromey <tom@tromey.com>
3519 * ada-lang.c (xget_renaming_scope): Return std::string.
3520 (old_renaming_is_invisible): Update.
3522 2018-05-04 Tom Tromey <tom@tromey.com>
3524 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3525 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3527 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3529 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3531 2018-05-04 Tom Tromey <tom@tromey.com>
3533 * remote.c (remote_query_supported_append): Change type.
3534 (remote_check_symbols): Update.
3536 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3539 * configure.ac: Prepend libpython.
3540 * python/python-config.py: Likewise.
3541 * configure: Regenerate.
3543 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3545 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3547 2018-05-03 Pedro Alves <palves@redhat.com>
3550 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3551 override. Write 'true' instead of '1'.
3552 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3555 2018-05-02 Pedro Alves <palves@redhat.com>
3557 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3558 add_inf_child_target.
3559 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3560 add_inf_child_target.
3561 * aix-thread.c (aix_thread_target_info): New.
3562 (aix_thread_target) <shortname, longname, doc>: Delete.
3564 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3565 add_inf_child_target.
3566 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3567 add_inf_child_target.
3568 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3569 add_inf_child_target.
3570 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3571 add_inf_child_target.
3572 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3573 add_inf_child_target.
3574 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3575 add_inf_child_target.
3576 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3577 add_inf_child_target.
3578 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3579 add_inf_child_target.
3580 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3581 add_inf_child_target.
3582 * bfd-target.c (target_bfd_target_info): New.
3583 (target_bfd) <shortname, longname, doc>: Delete.
3585 * bsd-kvm.c (bsd_kvm_target_info): New.
3586 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3588 (bsd_kvm_target::open): Rename to ...
3589 (bsd_kvm_target_open): ... this. Adjust.
3590 * bsd-uthread.c (bsd_uthread_target_info): New.
3591 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3593 * corefile.c (core_file_command): Adjust.
3594 * corelow.c (core_target_info): New.
3595 (core_target) <shortname, longname, doc>: Delete.
3597 (core_target::open): Rename to ...
3598 (core_target_open): ... this. Adjust.
3599 * ctf.c (ctf_target_info): New.
3600 (ctf_target) <shortname, longname, doc>: Delete.
3602 (ctf_target::open): Rename to ...
3603 (ctf_target_open): ... this.
3604 (_initialize_ctf): Adjust.
3605 * exec.c (exec_target_info): New.
3606 (exec_target) <shortname, longname, doc>: Delete.
3608 (exec_target::open): Rename to ...
3609 (exec_target_open): ... this.
3610 * gdbcore.h (core_target_open): Declare.
3611 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3612 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3613 add_inf_child_target.
3614 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3615 add_inf_child_target.
3616 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3617 add_inf_child_target.
3618 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3619 add_inf_child_target.
3620 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3621 add_inf_child_target.
3622 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3623 add_inf_child_target.
3624 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3625 add_inf_child_target.
3626 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3627 add_inf_child_target.
3628 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3629 add_inf_child_target.
3630 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3631 add_inf_child_target.
3632 * inf-child.c (inf_child_target_info): New.
3633 (inf_child_target::info): New.
3634 (inf_child_open_target): Remove 'target' parameter. Use
3635 get_native_target instead.
3636 (inf_child_target::open): Delete.
3637 (add_inf_child_target): New.
3638 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3641 (add_inf_child_target): Declare.
3642 (inf_child_open_target): Declare.
3643 * linux-thread-db.c (thread_db_target_info): New.
3644 (thread_db_target) <shortname, longname, doc>: Delete.
3646 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3647 add_inf_child_target.
3648 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3649 add_inf_child_target.
3650 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3651 add_inf_child_target.
3652 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3653 add_inf_child_target.
3654 * make-target-delegates (print_class): Adjust.
3655 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3656 add_inf_child_target.
3657 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3658 add_inf_child_target.
3659 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3660 add_inf_child_target.
3661 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3662 add_inf_child_target.
3663 * nto-procfs.c (nto_native_target_info): New.
3664 (nto_procfs_target_native) <shortname, longname, doc>:
3667 (nto_procfs_target_info): New.
3668 (nto_procfs_target_procfs) <shortname, longname, doc>:
3671 (init_procfs_targets): Adjust.
3672 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3673 add_inf_child_target.
3674 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3675 add_inf_child_target.
3676 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3677 add_inf_child_target.
3678 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3679 add_inf_child_target.
3680 * ravenscar-thread.c (ravenscar_target_info): New.
3681 (ravenscar_thread_target) <shortname, longname, doc>:
3684 * record-btrace.c (record_btrace_target_info):
3685 (record_btrace_target) <shortname, longname, doc>: Delete.
3687 (record_btrace_target::open): Rename to ...
3688 (record_btrace_target_open): ... this. Adjust.
3689 * record-full.c (record_longname, record_doc): New.
3690 (record_full_base_target) <shortname, longname, doc>: Delete.
3692 (record_full_target_info): New.
3693 (record_full_target): <shortname>: Delete.
3695 (record_full_core_open_1, record_full_open_1): Update comments.
3696 (record_full_base_target::open): Rename to ...
3697 (record_full_open): ... this.
3698 (cmd_record_full_restore): Update.
3699 (_initialize_record_full): Update.
3700 * remote-sim.c (remote_sim_target_info): New.
3701 (gdbsim_target) <shortname, longname, doc>: Delete.
3703 (gdbsim_target::open): Rename to ...
3704 (gdbsim_target_open): ... this.
3705 (_initialize_remote_sim): Adjust.
3706 * remote.c (remote_doc): New.
3707 (remote_target_info): New.
3708 (remote_target) <shortname, longname, doc>: Delete.
3710 (extended_remote_target_info): New.
3711 (extended_remote_target) <shortname, longname, doc>: Delete.
3713 (remote_target::open_1): Make static. Adjust.
3714 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3715 * s390-linux-nat.c (_initialize_s390_nat): Use
3716 add_inf_child_target.
3717 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3718 add_inf_child_target.
3719 * sol-thread.c (thread_db_target_info): New.
3720 (sol_thread_target) <shortname, longname, doc>: Delete.
3722 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3723 add_inf_child_target.
3724 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3725 add_inf_child_target.
3726 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3727 add_inf_child_target.
3728 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3729 add_inf_child_target.
3730 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3731 add_inf_child_target.
3732 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3733 add_inf_child_target.
3734 * spu-linux-nat.c (_initialize_spu_nat): Use
3735 add_inf_child_target.
3736 * spu-multiarch.c (spu_multiarch_target_info): New.
3737 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3739 * target-delegates.c: Regenerate.
3740 * target.c: Include <unordered_map>.
3741 (target_ops_p): Delete.
3742 (DEF_VEC_P(target_ops_p)): Delete.
3743 (target_factories): New.
3744 (test_target_info): New.
3745 (test_target_ops::info): New.
3746 (open_target): Adjust to use target_factories.
3747 (add_target_with_completer): Rename to ...
3748 (add_target): ... this. Change prototype. Register target_info
3749 and open callback in target_factories. Register target_info in
3750 command context instead of target_ops.
3751 (add_target): Delete old implementation.
3752 (add_deprecated_target_alias): Change prototype. Adjust.
3753 (the_native_target): New.
3754 (set_native_target, get_native_target): New.
3755 (find_default_run_target): Use the_native_target.
3756 (find_attach_target, find_run_target): Simplify.
3757 (target_ops::open): Delete.
3758 (dummy_target_info): New.
3759 (dummy_target::shortname, dummy_target::longname)
3760 (dummy_target::doc): Delete.
3761 (dummy_target::info): New.
3762 (debug_target::shortname, debug_target::longname)
3763 (debug_target::doc): Delete.
3764 (debug_target::info): New.
3765 * target.h (struct target_info): New.
3766 (target_ops::~target_ops): Add comment.
3767 (target_ops::info): New.
3768 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3769 longer virtual. Implement in terms of target_info.
3770 (set_native_target, get_native_target): Declare.
3771 (target_open_ftype): New.
3772 (add_target, add_target_with_completer)
3773 (add_deprecated_target_alias): Change prototype.
3774 (test_target) <shortname, longname, doc>: Delete.
3776 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3777 add_inf_child_target.
3778 * tracefile-tfile.c (tfile_target_info): New.
3779 (tfile_target) <shortname, longname, doc>: Delete.
3781 (tfile_target::open): Rename to ...
3782 (tfile_target_open): ... this.
3783 (_initialize_tracefile_tfile): Adjust.
3784 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3785 add_inf_child_target.
3786 * windows-nat.c (_initialize_windows_nat): Use
3787 add_inf_child_target.
3788 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3789 add_inf_child_target.
3791 2018-05-02 Pedro Alves <palves@redhat.com>
3793 * linux-nat.h (linux_nat_target) <low_new_thread,
3794 low_delete_thread, low_new_fork, low_forget_process,
3795 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3796 New virtual methods.
3797 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3798 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3799 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3800 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3801 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3803 * linux-fork.c (delete_fork): Adjust to call low method.
3804 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3805 (linux_nat_new_fork, linux_nat_forget_process_hook)
3806 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3807 (linux_nat_status_is_event):
3808 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3809 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3811 (sigtrap_is_event): Rename to ...
3812 (linux_nat_target::low_status_is_event): ... this.
3813 (linux_nat_set_status_is_event): Delete.
3814 (save_stop_reason, linux_nat_wait_1)
3815 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3817 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3818 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3819 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3820 (linux_nat_set_prepare_to_resume): Delete.
3821 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3822 low virtual methods.
3823 * amd64-linux-nat.c: Likewise.
3824 * arm-linux-nat.c: Likewise.
3825 * i386-linux-nat.c: Likewise.
3826 * ia64-linux-nat.c: Likewise.
3827 * mips-linux-nat.c: Likewise.
3828 * ppc-linux-nat.c: Likewise.
3829 * s390-linux-nat.c: Likewise.
3830 * sparc64-linux-nat.c: Likewise.
3831 * x86-linux-nat.c: Likewise.
3832 * x86-linux-nat.h: Include "nat/x86-linux.h".
3833 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3834 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3837 2018-05-02 Pedro Alves <palves@redhat.com>
3839 * target.h (target_ops)
3840 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3841 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3842 stopped_by_watchpoint, have_continuable_watchpoint,
3843 stopped_data_address, watchpoint_addr_within_range,
3844 can_accel_watchpoint_condition, can_run, thread_alive,
3845 has_all_memory, has_memory, has_stack, has_registers,
3846 has_execution, can_async_p, is_async_p, supports_non_stop,
3847 always_non_stop_p, can_execute_reverse, supports_multi_process,
3848 supports_enable_disable_tracepoint,
3849 supports_disable_randomization, supports_string_tracing,
3850 supports_evaluation_of_breakpoint_conditions,
3851 can_run_breakpoint_commands, filesystem_is_local,
3852 can_download_tracepoint, get_trace_state_variable_value,
3853 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3854 record_is_replaying, record_will_replay,
3855 augmented_libraries_svr4_read>: Adjust to return bool.
3856 * aarch64-linux-nat.c: All implementations adjusted.
3857 * aix-thread.c: All implementations adjusted.
3858 * arm-linux-nat.c: All implementations adjusted.
3859 * breakpoint.c: All implementations adjusted.
3860 * bsd-kvm.c: All implementations adjusted.
3861 * bsd-uthread.c: All implementations adjusted.
3862 * corelow.c: All implementations adjusted.
3863 * ctf.c: All implementations adjusted.
3864 * darwin-nat.c: All implementations adjusted.
3865 * darwin-nat.h: All implementations adjusted.
3866 * exec.c: All implementations adjusted.
3867 * fbsd-nat.c: All implementations adjusted.
3868 * fbsd-nat.h: All implementations adjusted.
3869 * gnu-nat.c: All implementations adjusted.
3870 * gnu-nat.h: All implementations adjusted.
3871 * go32-nat.c: All implementations adjusted.
3872 * ia64-linux-nat.c: All implementations adjusted.
3873 * inf-child.c: All implementations adjusted.
3874 * inf-child.h: All implementations adjusted.
3875 * inf-ptrace.c: All implementations adjusted.
3876 * inf-ptrace.h: All implementations adjusted.
3877 * linux-nat.c: All implementations adjusted.
3878 * linux-nat.h: All implementations adjusted.
3879 * mips-linux-nat.c: All implementations adjusted.
3880 * nto-procfs.c: All implementations adjusted.
3881 * ppc-linux-nat.c: All implementations adjusted.
3882 * procfs.c: All implementations adjusted.
3883 * ravenscar-thread.c: All implementations adjusted.
3884 * record-btrace.c: All implementations adjusted.
3885 * record-full.c: All implementations adjusted.
3886 * remote-sim.c: All implementations adjusted.
3887 * remote.c: All implementations adjusted.
3888 * s390-linux-nat.c: All implementations adjusted.
3889 * sol-thread.c: All implementations adjusted.
3890 * spu-multiarch.c: All implementations adjusted.
3891 * target-delegates.c: All implementations adjusted.
3892 * target.c: All implementations adjusted.
3893 * target.h: All implementations adjusted.
3894 * tracefile-tfile.c: All implementations adjusted.
3895 * tracefile.c: All implementations adjusted.
3896 * tracefile.h: All implementations adjusted.
3897 * windows-nat.c: All implementations adjusted.
3898 * x86-linux-nat.h: All implementations adjusted.
3899 * x86-nat.h: All implementations adjusted.
3901 2018-05-02 Pedro Alves <palves@redhat.com>
3903 * make-target-delegates (scan_target_h): Don't trim lines here.
3904 Replace sequences of tabs and/or whitespace with a single
3906 (top level, parsing methods): Trim each line before processing it
3909 2018-05-02 Pedro Alves <palves@redhat.com>
3910 John Baldwin <jhb@freebsd.org>
3912 * target.h (enum strata) <debug_stratum>: New.
3913 (struct target_ops) <all delegation methods>: Replace by C++
3914 virtual methods, and drop "to_" prefix. All references updated
3916 <to_shortname, to_longname, to_doc, to_data,
3917 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3918 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3919 virtual methods. All references updated throughout.
3920 <can_attach, supports_terminal_ours, can_create_inferior,
3921 get_thread_control_capabilities, attach_no_wait>: New
3923 <insert_breakpoint, remove_breakpoint>: Now
3924 TARGET_DEFAULT_NORETURN methods.
3925 <info_proc>: Now returns bool.
3927 (OPS_MAGIC): Delete.
3928 (current_target): Delete. All references replaced by references
3930 (target_stack): ... this. New.
3931 (target_shortname, target_longname): Adjust.
3932 (target_can_run): Now a function declaration.
3933 (default_child_has_all_memory, default_child_has_memory)
3934 (default_child_has_stack, default_child_has_registers)
3935 (default_child_has_execution): Remove target_ops parameter.
3936 (complete_target_initialization): Delete.
3937 (memory_breakpoint_target): New template class.
3938 (test_target_ops): Refactor as a C++ class with virtual methods.
3939 * make-target-delegates (NAME_PART): Tighten.
3940 (POINTER_PART, CP_SYMBOL): New.
3941 (SIMPLE_RETURN_PART): Reimplement.
3942 (VEC_RETURN_PART): Expect less.
3943 (RETURN_PART, VIRTUAL_PART): New.
3944 (METHOD): Adjust to C++ virtual methods.
3945 (scan_target_h): Remove reference to C99.
3946 (dname): Output "target_ops::" prefix.
3947 (write_function_header): Adjust to output a C++ class method.
3948 (write_declaration): New.
3949 (write_delegator): Adjust to output a C++ class method.
3950 (tdname): Output "dummy_target::" prefix.
3951 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3953 (tdefault_names, debug_names): Delete.
3954 (return_types, tdefaults, styles, argtypes_array): New.
3955 (top level): All methods are delegators.
3957 (top level): Print dummy_target and debug_target classes.
3958 * target-delegates.c: Regenerate.
3959 * target-debug.h (target_debug_print_enum_info_proc_what)
3960 (target_debug_print_thread_control_capabilities)
3961 (target_debug_print_thread_info_p): New.
3962 * target.c (dummy_target): Delete.
3963 (the_dummy_target, the_debug_target): New.
3964 (target_stack): Now extern.
3965 (set_targetdebug): Push/unpush debug target.
3966 (default_child_has_all_memory, default_child_has_memory)
3967 (default_child_has_stack, default_child_has_registers)
3968 (default_child_has_execution): Remove target_ops parameter.
3969 (complete_target_initialization): Delete.
3970 (add_target_with_completer): No longer call
3971 complete_target_initialization.
3972 (target_supports_terminal_ours): Use regular delegation.
3973 (update_current_target): Delete.
3974 (push_target): No longer check magic number. Don't call
3975 update_current_target.
3976 (unpush_target): Don't call update_current_target.
3977 (target_is_pushed): No longer check magic number.
3978 (target_require_runnable): Skip for all stratums over
3980 (target_ops::info_proc): New.
3981 (target_info_proc): Use find_target_at and
3982 find_default_run_target.
3983 (target_supports_disable_randomization): Use regular delegation.
3984 (target_get_osdata): Use find_target_at.
3985 (target_ops::open, target_ops::close, target_ops::can_attach)
3986 (target_ops::attach, target_ops::can_create_inferior)
3987 (target_ops::create_inferior, target_ops::can_run)
3988 (target_can_run): New.
3989 (default_fileio_target): Use regular delegation.
3990 (target_ops::fileio_open, target_ops::fileio_pwrite)
3991 (target_ops::fileio_pread, target_ops::fileio_fstat)
3992 (target_ops::fileio_close, target_ops::fileio_unlink)
3993 (target_ops::fileio_readlink): New.
3994 (target_fileio_open_1, target_fileio_unlink)
3995 (target_fileio_readlink): Always call the target method. Handle
3997 (return_zero, return_zero_has_execution): Delete.
3998 (init_dummy_target): Delete.
3999 (dummy_target::dummy_target, dummy_target::shortname)
4000 (dummy_target::longname, dummy_target::doc)
4001 (debug_target::debug_target, debug_target::shortname)
4002 (debug_target::longname, debug_target::doc): New.
4003 (target_supports_delete_record): Use regular delegation.
4004 (setup_target_debug): Delete.
4005 (maintenance_print_target_stack): Skip debug_stratum.
4006 (initialize_targets): Instantiate the_dummy_target and
4008 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4010 (target_auxv_search, fprint_target_auxv): Adjust.
4011 (info_auxv_command): Adjust to use target_stack.
4012 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4013 * exceptions.c (print_flush): Handle a NULL target_stack.
4014 * regcache.c (target_ops_no_register): Refactor as class with
4017 * exec.c (exec_target): New class.
4018 (exec_ops): Now an exec_target.
4019 (exec_open, exec_close_1, exec_get_section_table)
4020 (exec_xfer_partial, exec_files_info, exec_has_memory)
4021 (exec_make_note_section): Refactor as exec_target methods.
4022 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4024 (exec_target::find_memory_regions): New.
4025 (_initialize_exec): Don't call init_exec_ops.
4026 * gdbcore.h (exec_file_clear): Delete.
4028 * corefile.c (core_target): Delete.
4029 (core_file_command): Adjust.
4030 * corelow.c (core_target): New class.
4031 (the_core_target): New.
4032 (core_close): Remove target_ops parameter.
4033 (core_close_cleanup): Adjust.
4034 (core_target::close): New.
4035 (core_open, core_detach, get_core_registers, core_files_info)
4036 (core_xfer_partial, core_thread_alive, core_read_description)
4037 (core_pid_to_str, core_thread_name, core_has_memory)
4038 (core_has_stack, core_has_registers, core_info_proc): Rework as
4039 core_target methods.
4040 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4041 (_initialize_corelow): Initialize the_core_target.
4042 * gdbcore.h (core_target): Delete.
4043 (the_core_target): New.
4045 * ctf.c: (ctf_target): New class.
4046 (ctf_ops): Now a ctf_target.
4047 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4048 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4049 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4051 (init_ctf_ops): Delete.
4052 (_initialize_ctf): Don't call it.
4053 * tracefile-tfile.c (tfile_target): New class.
4054 (tfile_ops): Now a tfile_target.
4055 (tfile_open, tfile_close, tfile_files_info)
4056 (tfile_get_tracepoint_status, tfile_trace_find)
4057 (tfile_fetch_registers, tfile_xfer_partial)
4058 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4059 Refactor as tfile_target methods.
4060 (tfile_xfer_partial_features): Remove target_ops parameter.
4061 (init_tfile_ops): Delete.
4062 (_initialize_tracefile_tfile): Don't call it.
4063 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4064 (tracefile_has_stack, tracefile_has_registers)
4065 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4066 tracefile_target methods.
4067 (init_tracefile_ops): Delete.
4068 (tracefile_target::tracefile_target): New.
4069 * tracefile.h: Include "target.h".
4070 (tracefile_target): New class.
4071 (init_tracefile_ops): Delete.
4073 * spu-multiarch.c (spu_multiarch_target): New class.
4074 (spu_ops): Now a spu_multiarch_target.
4075 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4076 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4077 (spu_search_memory, spu_mourn_inferior): Refactor as
4078 spu_multiarch_target methods.
4079 (init_spu_ops): Delete.
4080 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4081 complete_target_initialization.
4083 * ravenscar-thread.c (ravenscar_thread_target): New class.
4084 (ravenscar_ops): Now a ravenscar_thread_target.
4085 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4086 (ravenscar_thread_alive, ravenscar_pid_to_str)
4087 (ravenscar_fetch_registers, ravenscar_store_registers)
4088 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4089 (ravenscar_stopped_by_hw_breakpoint)
4090 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4091 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4092 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4094 (init_ravenscar_thread_ops): Delete.
4095 (_initialize_ravenscar): Remove references to
4096 init_ravenscar_thread_ops and complete_target_initialization.
4098 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4099 (bsd_uthread_target): New class.
4100 (bsd_uthread_ops): Now a bsd_uthread_target.
4101 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4102 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4103 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4104 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4105 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4106 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4107 (bsd_uthread_target): Delete function.
4108 (_initialize_bsd_uthread): Remove reference to
4109 complete_target_initialization.
4111 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4112 (target_bfd): ... this new class.
4113 (target_bfd_xfer_partial, target_bfd_get_section_table)
4114 (target_bfd_close): Refactor as target_bfd methods.
4115 (target_bfd::~target_bfd): New.
4116 (target_bfd_reopen): Adjust.
4117 (target_bfd::close): New.
4119 * record-btrace.c (record_btrace_target): New class.
4120 (record_btrace_ops): Now a record_btrace_target.
4121 (record_btrace_open, record_btrace_stop_recording)
4122 (record_btrace_disconnect, record_btrace_close)
4123 (record_btrace_async, record_btrace_info)
4124 (record_btrace_insn_history, record_btrace_insn_history_range)
4125 (record_btrace_insn_history_from, record_btrace_call_history)
4126 (record_btrace_call_history_range)
4127 (record_btrace_call_history_from, record_btrace_record_method)
4128 (record_btrace_is_replaying, record_btrace_will_replay)
4129 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4130 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4131 (record_btrace_store_registers, record_btrace_prepare_to_store)
4132 (record_btrace_to_get_unwinder)
4133 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4134 (record_btrace_commit_resume, record_btrace_wait)
4135 (record_btrace_stop, record_btrace_can_execute_reverse)
4136 (record_btrace_stopped_by_sw_breakpoint)
4137 (record_btrace_supports_stopped_by_sw_breakpoint)
4138 (record_btrace_stopped_by_hw_breakpoint)
4139 (record_btrace_supports_stopped_by_hw_breakpoint)
4140 (record_btrace_update_thread_list, record_btrace_thread_alive)
4141 (record_btrace_goto_begin, record_btrace_goto_end)
4142 (record_btrace_goto, record_btrace_stop_replaying_all)
4143 (record_btrace_execution_direction)
4144 (record_btrace_prepare_to_generate_core)
4145 (record_btrace_done_generating_core): Refactor as
4146 record_btrace_target methods.
4147 (init_record_btrace_ops): Delete.
4148 (_initialize_record_btrace): Remove reference to
4149 init_record_btrace_ops.
4150 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4151 the execution_direction global.
4152 (record_full_base_target, record_full_target)
4153 (record_full_core_target): New classes.
4154 (record_full_ops): Now a record_full_target.
4155 (record_full_core_ops): Now a record_full_core_target.
4156 (record_full_target::detach, record_full_target::disconnect)
4157 (record_full_core_target::disconnect)
4158 (record_full_target::mourn_inferior, record_full_target::kill):
4160 (record_full_open, record_full_close, record_full_async): Refactor
4161 as methods of the record_full_base_target class.
4162 (record_full_resume, record_full_commit_resume): Refactor
4163 as methods of the record_full_target class.
4164 (record_full_wait, record_full_stopped_by_watchpoint)
4165 (record_full_stopped_data_address)
4166 (record_full_stopped_by_sw_breakpoint)
4167 (record_full_supports_stopped_by_sw_breakpoint)
4168 (record_full_stopped_by_hw_breakpoint)
4169 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4170 methods of the record_full_base_target class.
4171 (record_full_store_registers, record_full_xfer_partial)
4172 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4173 Refactor as methods of the record_full_target class.
4174 (record_full_can_execute_reverse, record_full_get_bookmark)
4175 (record_full_goto_bookmark, record_full_execution_direction)
4176 (record_full_record_method, record_full_info, record_full_delete)
4177 (record_full_is_replaying, record_full_will_replay)
4178 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4179 (record_full_stop_replaying): Refactor as methods of the
4180 record_full_base_target class.
4181 (record_full_core_resume, record_full_core_kill)
4182 (record_full_core_fetch_registers)
4183 (record_full_core_prepare_to_store)
4184 (record_full_core_store_registers, record_full_core_xfer_partial)
4185 (record_full_core_insert_breakpoint)
4186 (record_full_core_remove_breakpoint)
4187 (record_full_core_has_execution): Refactor
4188 as methods of the record_full_core_target class.
4189 (record_full_base_target::supports_delete_record): New.
4190 (init_record_full_ops): Delete.
4191 (init_record_full_core_ops): Delete.
4192 (record_full_save): Refactor as method of the
4193 record_full_base_target class.
4194 (_initialize_record_full): Remove references to
4195 init_record_full_ops and init_record_full_core_ops.
4197 * remote.c (remote_target, extended_remote_target): New classes.
4198 (remote_ops): Now a remote_target.
4199 (extended_remote_ops): Now an extended_remote_target.
4200 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4201 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4202 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4203 (remote_pass_signals, remote_set_syscall_catchpoint)
4204 (remote_program_signals, )
4205 (remote_thread_always_alive): Remove target_ops parameter.
4206 (remote_thread_alive, remote_thread_name)
4207 (remote_update_thread_list, remote_threads_extra_info)
4208 (remote_static_tracepoint_marker_at)
4209 (remote_static_tracepoint_markers_by_strid)
4210 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4211 (remote_open): Refactor as methods of remote_target.
4212 (extended_remote_open, extended_remote_detach)
4213 (extended_remote_attach, extended_remote_post_attach):
4214 (extended_remote_supports_disable_randomization)
4215 (extended_remote_create_inferior): : Refactor as method of
4216 extended_remote_target.
4217 (remote_set_permissions, remote_open_1, remote_detach)
4218 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4219 (remote_resume, remote_commit_resume, remote_stop)
4220 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4221 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4222 (remote_prepare_to_store, remote_store_registers)
4223 (remote_flash_erase, remote_flash_done, remote_files_info)
4224 (remote_kill, remote_mourn, remote_insert_breakpoint)
4225 (remote_remove_breakpoint, remote_insert_watchpoint)
4226 (remote_watchpoint_addr_within_range)
4227 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4228 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4229 (remote_supports_stopped_by_sw_breakpoint)
4230 (remote_stopped_by_hw_breakpoint)
4231 (remote_supports_stopped_by_hw_breakpoint)
4232 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4233 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4234 (remote_verify_memory): Refactor as methods of remote_target.
4235 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4237 (remote_xfer_partial, remote_get_memory_xfer_limit)
4238 (remote_search_memory, remote_rcmd, remote_memory_map)
4239 (remote_pid_to_str, remote_get_thread_local_address)
4240 (remote_get_tib_address, remote_read_description): Refactor as
4241 methods of remote_target.
4242 (remote_target::fileio_open, remote_target::fileio_pwrite)
4243 (remote_target::fileio_pread, remote_target::fileio_close): New.
4244 (remote_hostio_readlink, remote_hostio_fstat)
4245 (remote_filesystem_is_local, remote_can_execute_reverse)
4246 (remote_supports_non_stop, remote_supports_disable_randomization)
4247 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4248 (remote_supports_enable_disable_tracepoint)
4249 (remote_supports_string_tracing)
4250 (remote_can_run_breakpoint_commands, remote_trace_init)
4251 (remote_download_tracepoint, remote_can_download_tracepoint)
4252 (remote_download_trace_state_variable, remote_enable_tracepoint)
4253 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4254 (remote_trace_start, remote_get_trace_status)
4255 (remote_get_tracepoint_status, remote_trace_stop)
4256 (remote_trace_find, remote_get_trace_state_variable_value)
4257 (remote_save_trace_data, remote_get_raw_trace_data)
4258 (remote_set_disconnected_tracing, remote_core_of_thread)
4259 (remote_set_circular_trace_buffer, remote_traceframe_info)
4260 (remote_get_min_fast_tracepoint_insn_len)
4261 (remote_set_trace_buffer_size, remote_set_trace_notes)
4262 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4263 (remote_disable_btrace, remote_teardown_btrace)
4264 (remote_read_btrace, remote_btrace_conf)
4265 (remote_augmented_libraries_svr4_read, remote_load)
4266 (remote_pid_to_exec_file, remote_can_do_single_step)
4267 (remote_execution_direction, remote_thread_handle_to_thread_info):
4268 Refactor as methods of remote_target.
4269 (init_remote_ops, init_extended_remote_ops): Delete.
4270 (remote_can_async_p, remote_is_async_p, remote_async)
4271 (remote_thread_events, remote_upload_tracepoints)
4272 (remote_upload_trace_state_variables): Refactor as methods of
4274 (_initialize_remote): Remove references to init_remote_ops and
4275 init_extended_remote_ops.
4277 * remote-sim.c (gdbsim_target): New class.
4278 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4279 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4280 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4281 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4282 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4283 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4284 Refactor as methods of gdbsim_target.
4285 (gdbsim_ops): Now a gdbsim_target.
4286 (init_gdbsim_ops): Delete.
4287 (gdbsim_cntrl_c): Adjust.
4288 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4290 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4291 (the_amd64_linux_nat_target): New.
4292 (amd64_linux_fetch_inferior_registers)
4293 (amd64_linux_store_inferior_registers): Refactor as methods of
4294 amd64_linux_nat_target.
4295 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4296 * i386-linux-nat.c: Don't include "linux-nat.h".
4297 (i386_linux_nat_target): New class.
4298 (the_i386_linux_nat_target): New.
4299 (i386_linux_fetch_inferior_registers)
4300 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4301 as methods of i386_linux_nat_target.
4302 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4303 * inf-child.c (inf_child_ops): Delete.
4304 (inf_child_fetch_inferior_registers)
4305 (inf_child_store_inferior_registers): Delete.
4306 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4307 methods of inf_child_target.
4308 (inf_child_target::supports_terminal_ours)
4309 (inf_child_target::terminal_init)
4310 (inf_child_target::terminal_inferior)
4311 (inf_child_target::terminal_ours_for_output)
4312 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4313 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4315 (inf_child_open, inf_child_disconnect, inf_child_close)
4316 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4317 (inf_child_post_startup_inferior, inf_child_can_run)
4318 (inf_child_pid_to_exec_file): Refactor as methods of
4320 (inf_child_follow_fork): Delete.
4321 (inf_child_target::can_create_inferior)
4322 (inf_child_target::can_attach): New.
4323 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4324 (inf_child_target::has_stack, inf_child_target::has_registers)
4325 (inf_child_target::has_execution): New.
4326 (inf_child_fileio_open, inf_child_fileio_pwrite)
4327 (inf_child_fileio_pread, inf_child_fileio_fstat)
4328 (inf_child_fileio_close, inf_child_fileio_unlink)
4329 (inf_child_fileio_readlink, inf_child_use_agent)
4330 (inf_child_can_use_agent): Refactor as methods of
4332 (return_zero, inf_child_target): Delete.
4333 (inf_child_target::inf_child_target): New.
4334 * inf-child.h: Include "target.h".
4335 (inf_child_target): Delete function prototype.
4336 (inf_child_target): New class.
4337 (inf_child_open_target, inf_child_mourn_inferior)
4338 (inf_child_maybe_unpush_target): Delete.
4339 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4340 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4341 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4342 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4343 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4344 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4345 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4346 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4347 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4348 methods of inf_ptrace_target.
4349 (inf_ptrace_target): Delete function.
4350 * inf-ptrace.h: Include "inf-child.h".
4351 (inf_ptrace_target): Delete function declaration.
4352 (inf_ptrace_target): New class.
4353 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4354 * linux-nat.c (linux_target): New.
4355 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4356 (linux_nat_target::~linux_nat_target): New.
4357 (linux_child_post_attach, linux_child_post_startup_inferior)
4358 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4359 (linux_child_remove_fork_catchpoint)
4360 (linux_child_insert_vfork_catchpoint)
4361 (linux_child_remove_vfork_catchpoint)
4362 (linux_child_insert_exec_catchpoint)
4363 (linux_child_remove_exec_catchpoint)
4364 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4365 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4366 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4367 (linux_nat_stopped_data_address)
4368 (linux_nat_stopped_by_sw_breakpoint)
4369 (linux_nat_supports_stopped_by_sw_breakpoint)
4370 (linux_nat_stopped_by_hw_breakpoint)
4371 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4372 (linux_nat_kill, linux_nat_mourn_inferior)
4373 (linux_nat_xfer_partial, linux_nat_thread_alive)
4374 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4375 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4376 (linux_child_static_tracepoint_markers_by_strid)
4377 (linux_nat_is_async_p, linux_nat_can_async_p)
4378 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4379 (linux_nat_supports_multi_process)
4380 (linux_nat_supports_disable_randomization, linux_nat_async)
4381 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4382 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4383 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4384 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4385 methods of linux_nat_target.
4386 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4387 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4389 (check_stopped_by_watchpoint): Adjust.
4390 (linux_xfer_partial): Delete.
4391 (linux_target_install_ops, linux_target, linux_nat_add_target):
4393 (linux_nat_target::linux_nat_target): New.
4394 * linux-nat.h: Include "inf-ptrace.h".
4395 (linux_nat_target): New.
4396 (linux_target, linux_target_install_ops, linux_nat_add_target):
4397 Delete function declarations.
4398 (linux_target): Declare global.
4399 * linux-thread-db.c (thread_db_target): New.
4400 (thread_db_target::thread_db_target): New.
4401 (thread_db_ops): Delete.
4402 (the_thread_db_target): New.
4403 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4404 (thread_db_update_thread_list, thread_db_pid_to_str)
4405 (thread_db_extra_thread_info)
4406 (thread_db_thread_handle_to_thread_info)
4407 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4408 (thread_db_resume): Refactor as methods of thread_db_target.
4409 (init_thread_db_ops): Delete.
4410 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4411 * x86-linux-nat.c: Don't include "linux-nat.h".
4412 (super_post_startup_inferior): Delete.
4413 (x86_linux_nat_target::~x86_linux_nat_target): New.
4414 (x86_linux_child_post_startup_inferior)
4415 (x86_linux_read_description, x86_linux_enable_btrace)
4416 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4417 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4418 methods of x86_linux_nat_target.
4419 (x86_linux_create_target): Delete. Bits folded ...
4420 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4422 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4423 (x86_linux_nat_target): New class.
4424 (x86_linux_create_target): Delete.
4425 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4426 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4427 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4428 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4429 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4430 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4432 (x86_use_watchpoints): Delete.
4433 * x86-nat.h: Include "breakpoint.h" and "target.h".
4434 (x86_use_watchpoints): Delete.
4435 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4436 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4437 (x86_insert_watchpoint, x86_remove_watchpoint)
4438 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4439 (x86_stopped_by_hw_breakpoint): New declarations.
4440 (x86_nat_target): New template class.
4442 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4443 (the_ppc_linux_nat_target): New.
4444 (ppc_linux_fetch_inferior_registers)
4445 (ppc_linux_can_use_hw_breakpoint)
4446 (ppc_linux_region_ok_for_hw_watchpoint)
4447 (ppc_linux_ranged_break_num_registers)
4448 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4449 (ppc_linux_insert_mask_watchpoint)
4450 (ppc_linux_remove_mask_watchpoint)
4451 (ppc_linux_can_accel_watchpoint_condition)
4452 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4453 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4454 (ppc_linux_watchpoint_addr_within_range)
4455 (ppc_linux_masked_watch_num_registers)
4456 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4457 (ppc_linux_read_description): Refactor as methods of
4458 ppc_linux_nat_target.
4459 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4461 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4462 (procfs_target): New class.
4463 (the_procfs_target): New.
4464 (procfs_target): Delete function.
4465 (procfs_auxv_parse, procfs_attach, procfs_detach)
4466 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4467 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4468 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4469 (procfs_create_inferior, procfs_update_thread_list)
4470 (procfs_thread_alive, procfs_pid_to_str)
4471 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4472 (procfs_stopped_data_address, procfs_insert_watchpoint)
4473 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4474 (proc_find_memory_regions, procfs_info_proc)
4475 (procfs_make_note_section): Refactor as methods of procfs_target.
4476 (_initialize_procfs): Adjust.
4477 * sol-thread.c (sol_thread_target): New class.
4478 (sol_thread_ops): Now a sol_thread_target.
4479 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4480 (sol_thread_fetch_registers, sol_thread_store_registers)
4481 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4482 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4483 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4484 (init_sol_thread_ops): Delete.
4485 (_initialize_sol_thread): Adjust. Remove references to
4486 init_sol_thread_ops and complete_target_initialization.
4488 * windows-nat.c (windows_nat_target): New class.
4489 (windows_fetch_inferior_registers)
4490 (windows_store_inferior_registers, windows_resume, windows_wait)
4491 (windows_attach, windows_detach, windows_pid_to_exec_file)
4492 (windows_files_info, windows_create_inferior)
4493 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4494 (windows_close, windows_pid_to_str, windows_xfer_partial)
4495 (windows_get_tib_address, windows_get_ada_task_ptid)
4496 (windows_thread_name, windows_thread_alive): Refactor as
4497 windows_nat_target methods.
4498 (do_initial_windows_stuff): Adjust.
4499 (windows_target): Delete function.
4500 (_initialize_windows_nat): Adjust.
4502 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4503 (darwin_mourn_inferior, darwin_kill_inferior)
4504 (darwin_create_inferior, darwin_attach, darwin_detach)
4505 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4506 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4507 (darwin_supports_multi_process): Refactor as darwin_nat_target
4509 (darwin_resume_to, darwin_files_info): Delete.
4510 (_initialize_darwin_inferior): Rename to ...
4511 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4512 * darwin-nat.h: Include "inf-child.h".
4513 (darwin_nat_target): New class.
4514 (darwin_complete_target): Delete.
4515 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4516 (darwin_target): New.
4517 (i386_darwin_fetch_inferior_registers)
4518 (i386_darwin_store_inferior_registers): Refactor as methods of
4520 (darwin_complete_target): Delete, with ...
4521 (_initialize_i386_darwin_nat): ... bits factored out here.
4523 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4524 (the_alpha_linux_nat_target): New.
4525 (alpha_linux_register_u_offset): Refactor as
4526 alpha_linux_nat_target method.
4527 (_initialize_alpha_linux_nat): Adjust.
4528 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4529 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4530 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4531 methods of linux_nat_trad_target.
4532 (linux_trad_target): Delete.
4533 * linux-nat-trad.h (linux_trad_target): Delete function.
4534 (linux_nat_trad_target): New class.
4535 * mips-linux-nat.c (mips_linux_nat_target): New class.
4536 (super_fetch_registers, super_store_registers, super_close):
4538 (the_mips_linux_nat_target): New.
4539 (mips64_linux_regsets_fetch_registers)
4540 (mips64_linux_regsets_store_registers)
4541 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4542 (mips_linux_register_u_offset, mips_linux_read_description)
4543 (mips_linux_can_use_hw_breakpoint)
4544 (mips_linux_stopped_by_watchpoint)
4545 (mips_linux_stopped_data_address)
4546 (mips_linux_region_ok_for_hw_watchpoint)
4547 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4548 (mips_linux_close): Refactor as methods of mips_linux_nat.
4549 (_initialize_mips_linux_nat): Adjust to C++ification.
4551 * aix-thread.c (aix_thread_target): New class.
4552 (aix_thread_ops): Now an aix_thread_target.
4553 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4554 (aix_thread_fetch_registers, aix_thread_store_registers)
4555 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4556 (aix_thread_thread_alive, aix_thread_pid_to_str)
4557 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4558 Refactor as methods of aix_thread_target.
4559 (init_aix_thread_ops): Delete.
4560 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4561 and complete_target_initialization.
4562 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4563 (rs6000_nat_target): New class.
4564 (the_rs6000_nat_target): New.
4565 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4566 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4567 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4568 (super_create_inferior): Delete.
4569 (_initialize_rs6000_nat): Adjust to C++ification.
4571 * arm-linux-nat.c (arm_linux_nat_target): New class.
4572 (the_arm_linux_nat_target): New.
4573 (arm_linux_fetch_inferior_registers)
4574 (arm_linux_store_inferior_registers, arm_linux_read_description)
4575 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4576 (arm_linux_remove_hw_breakpoint)
4577 (arm_linux_region_ok_for_hw_watchpoint)
4578 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4579 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4580 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4581 arm_linux_nat_target.
4582 (_initialize_arm_linux_nat): Adjust to C++ification.
4584 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4585 (the_aarch64_linux_nat_target): New.
4586 (aarch64_linux_fetch_inferior_registers)
4587 (aarch64_linux_store_inferior_registers)
4588 (aarch64_linux_child_post_startup_inferior)
4589 (aarch64_linux_read_description)
4590 (aarch64_linux_can_use_hw_breakpoint)
4591 (aarch64_linux_insert_hw_breakpoint)
4592 (aarch64_linux_remove_hw_breakpoint)
4593 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4594 (aarch64_linux_region_ok_for_hw_watchpoint)
4595 (aarch64_linux_stopped_data_address)
4596 (aarch64_linux_stopped_by_watchpoint)
4597 (aarch64_linux_watchpoint_addr_within_range)
4598 (aarch64_linux_can_do_single_step): Refactor as methods of
4599 aarch64_linux_nat_target.
4600 (super_post_startup_inferior): Delete.
4601 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4603 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4604 (the_hppa_linux_nat_target): New.
4605 (hppa_linux_fetch_inferior_registers)
4606 (hppa_linux_store_inferior_registers): Refactor as methods of
4607 hppa_linux_nat_target.
4608 (_initialize_hppa_linux_nat): Adjust to C++ification.
4610 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4611 (the_ia64_linux_nat_target): New.
4612 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4613 (ia64_linux_stopped_data_address)
4614 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4615 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4616 ia64_linux_nat_target methods.
4617 (super_xfer_partial): Delete.
4618 (_initialize_ia64_linux_nat): Adjust to C++ification.
4620 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4621 (the_m32r_linux_nat_target): New.
4622 (m32r_linux_fetch_inferior_registers)
4623 (m32r_linux_store_inferior_registers): Refactor as
4624 m32r_linux_nat_target methods.
4625 (_initialize_m32r_linux_nat): Adjust to C++ification.
4627 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4628 (the_m68k_linux_nat_target): New.
4629 (m68k_linux_fetch_inferior_registers)
4630 (m68k_linux_store_inferior_registers): Refactor as
4631 m68k_linux_nat_target methods.
4632 (_initialize_m68k_linux_nat): Adjust to C++ification.
4634 * s390-linux-nat.c (s390_linux_nat_target): New class.
4635 (the_s390_linux_nat_target): New.
4636 (s390_linux_fetch_inferior_registers)
4637 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4638 (s390_insert_watchpoint, s390_remove_watchpoint)
4639 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4640 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4641 (s390_auxv_parse, s390_read_description): Refactor as methods of
4642 s390_linux_nat_target.
4643 (_initialize_s390_nat): Adjust to C++ification.
4645 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4646 (the_sparc_linux_nat_target): New.
4647 (_initialize_sparc_linux_nat): Adjust to C++ification.
4648 * sparc-nat.c (sparc_fetch_inferior_registers)
4649 (sparc_store_inferior_registers): Remove target_ops parameter.
4650 * sparc-nat.h (sparc_fetch_inferior_registers)
4651 (sparc_store_inferior_registers): Remove target_ops parameter.
4652 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4653 (the_sparc64_linux_nat_target): New.
4654 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4656 * spu-linux-nat.c (spu_linux_nat_target): New class.
4657 (the_spu_linux_nat_target): New.
4658 (spu_child_post_startup_inferior, spu_child_post_attach)
4659 (spu_child_wait, spu_fetch_inferior_registers)
4660 (spu_store_inferior_registers, spu_xfer_partial)
4661 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4663 (_initialize_spu_nat): Adjust to C++ification.
4665 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4666 (the_tilegx_linux_nat_target): New.
4667 (fetch_inferior_registers, store_inferior_registers):
4668 Refactor as methods.
4669 (_initialize_tile_linux_nat): Adjust to C++ification.
4671 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4672 (the_xtensa_linux_nat_target): New.
4673 (xtensa_linux_fetch_inferior_registers)
4674 (xtensa_linux_store_inferior_registers): Refactor as
4675 xtensa_linux_nat_target methods.
4676 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4678 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4679 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4680 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4681 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4682 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4683 (fbsd_stopped_by_sw_breakpoint)
4684 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4685 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4686 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4687 (fbsd_post_startup_inferior, fbsd_post_attach)
4688 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4689 (fbsd_set_syscall_catchpoint)
4690 (super_xfer_partial, super_resume, super_wait)
4691 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4692 (fbsd_handle_debug_trap): Remove target_ops parameter.
4693 (fbsd_nat_add_target): Delete.
4694 * fbsd-nat.h: Include "inf-ptrace.h".
4695 (fbsd_nat_add_target): Delete.
4696 (USE_SIGTRAP_SIGINFO): Define.
4697 (fbsd_nat_target): New class.
4699 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4700 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4701 (amd64bsd_target): Delete.
4702 * amd64-bsd-nat.h: New file.
4703 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4705 (amd64_fbsd_nat_target): New class.
4706 (the_amd64_fbsd_nat_target): New.
4707 (amd64fbsd_read_description): Refactor as method of
4708 amd64_fbsd_nat_target.
4709 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4710 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4711 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4712 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4713 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4714 (i386bsd_target): Delete.
4715 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4716 (i386bsd_fetch_inferior_registers)
4717 (i386bsd_store_inferior_registers): Declare.
4718 (i386_bsd_nat_target): New class.
4719 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4720 (the_i386_fbsd_nat_target): New.
4721 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4722 i386_fbsd_nat_target methods.
4723 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4724 (_initialize_i386fbsd_nat): Adjust to C++ification.
4725 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4726 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4727 (_initialize_x86_bsd_nat): Adjust to C++ification.
4728 * x86-bsd-nat.h: Include "x86-nat.h".
4729 (x86bsd_target): Delete declaration.
4730 (x86bsd_nat_target): New class.
4732 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4733 (the_aarch64_fbsd_nat_target): New.
4734 (aarch64_fbsd_fetch_inferior_registers)
4735 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4736 aarch64_fbsd_nat_target.
4737 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4738 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4739 (the_alpha_bsd_nat_target): New.
4740 (alphabsd_fetch_inferior_registers)
4741 (alphabsd_store_inferior_registers): Refactor as
4742 alpha_bsd_nat_target methods.
4743 (_initialize_alphabsd_nat): Refactor as methods of
4744 alpha_bsd_nat_target.
4745 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4746 (the_amd64_nbsd_nat_target): New.
4747 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4748 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4749 (the_amd64_obsd_nat_target): New.
4750 (_initialize_amd64obsd_nat): Adjust to C++ification.
4751 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4752 (the_arm_fbsd_nat_target): New.
4753 (arm_fbsd_fetch_inferior_registers)
4754 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4755 (_initialize_arm_fbsd_nat): Refactor as methods of
4756 arm_fbsd_nat_target.
4757 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4758 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4759 (the_arm_netbsd_nat_target): New.
4760 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4761 arm_netbsd_nat_target.
4762 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4763 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4764 (the_hppa_nbsd_nat_target): New.
4765 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4766 hppa_nbsd_nat_target methods.
4767 (_initialize_hppanbsd_nat): Adjust to C++ification.
4768 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4769 (the_hppa_obsd_nat_target): New.
4770 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4771 methods of hppa_obsd_nat_target.
4772 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4774 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4775 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4777 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4778 (_initialize_i386obsd_nat): Use add_target.
4779 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4780 (the_m68k_bsd_nat_target): New.
4781 (m68kbsd_fetch_inferior_registers)
4782 (m68kbsd_store_inferior_registers): Refactor as methods of
4783 m68k_bsd_nat_target.
4784 (_initialize_m68kbsd_nat): Adjust to C++ification.
4785 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4786 (the_mips_fbsd_nat_target): New.
4787 (mips_fbsd_fetch_inferior_registers)
4788 (mips_fbsd_store_inferior_registers): Refactor as methods of
4789 mips_fbsd_nat_target.
4790 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4792 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4793 (the_mips_nbsd_nat_target): New.
4794 (mipsnbsd_fetch_inferior_registers)
4795 (mipsnbsd_store_inferior_registers): Refactor as methods of
4796 mips_nbsd_nat_target.
4797 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4798 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4799 (the_mips64_obsd_nat_target): New.
4800 (mips64obsd_fetch_inferior_registers)
4801 (mips64obsd_store_inferior_registers): Refactor as methods of
4802 mips64_obsd_nat_target.
4803 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4805 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4807 * nbsd-nat.h: Include "inf-ptrace.h".
4808 (nbsd_nat_target): New class.
4809 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4810 (obsd_wait): Refactor as methods of obsd_nat_target.
4811 (obsd_add_target): Delete.
4812 * obsd-nat.h: Include "inf-ptrace.h".
4813 (obsd_nat_target): New class.
4814 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4815 (the_ppc_fbsd_nat_target): New.
4816 (ppcfbsd_fetch_inferior_registers)
4817 (ppcfbsd_store_inferior_registers): Refactor as methods of
4818 ppc_fbsd_nat_target.
4819 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4821 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4822 (the_ppc_nbsd_nat_target): New.
4823 (ppcnbsd_fetch_inferior_registers)
4824 (ppcnbsd_store_inferior_registers): Refactor as methods of
4825 ppc_nbsd_nat_target.
4826 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4827 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4828 (the_ppc_obsd_nat_target): New.
4829 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4830 methods of ppc_obsd_nat_target.
4831 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4833 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4834 (the_sh_nbsd_nat_target): New.
4835 (shnbsd_fetch_inferior_registers)
4836 (shnbsd_store_inferior_registers): Refactor as methods of
4838 (_initialize_shnbsd_nat): Adjust to C++ification.
4839 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4840 (inf_ptrace_xfer_partial): Delete.
4841 (sparc_xfer_partial, sparc_target): Delete.
4842 * sparc-nat.h (sparc_fetch_inferior_registers)
4843 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4844 (sparc_target): Delete function declaration.
4845 (sparc_target): New template class.
4846 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4847 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4848 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4849 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4851 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4852 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4853 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4854 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4856 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4857 (the_vax_bsd_nat_target): New.
4858 (vaxbsd_fetch_inferior_registers)
4859 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4861 (_initialize_vaxbsd_nat): Adjust to C++ification.
4863 * bsd-kvm.c (bsd_kvm_target): New class.
4864 (bsd_kvm_ops): Now a bsd_kvm_target.
4865 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4866 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4867 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4869 (bsd_kvm_return_one): Delete.
4870 (bsd_kvm_add_target): Adjust to C++ification.
4872 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4873 (nto_procfs_target_procfs): New classes.
4874 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4875 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4876 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4877 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4878 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4879 (procfs_remove_hw_breakpoint, procfs_resume)
4880 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4881 (procfs_kill_inferior, procfs_store_registers)
4882 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4883 as methods of nto_procfs_target.
4884 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4885 (nto_native_ops): Delete.
4886 (procfs_open, procfs_native_open): Delete.
4887 (nto_native_ops): Now an nto_procfs_target_native.
4888 (init_procfs_targets): Adjust to C++ification.
4889 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4890 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4891 Refactor as methods of nto_procfs_target.
4893 * go32-nat.c (go32_nat_target): New class.
4894 (the_go32_nat_target): New.
4895 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4896 (go32_store_registers, go32_xfer_partial, go32_files_info)
4897 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4898 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4899 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4900 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4901 (go32_target): Delete.
4902 (_initialize_go32_nat): Adjust to C++ification.
4904 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4905 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4906 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4907 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4909 (gnu_target): Delete.
4910 * gnu-nat.h (gnu_target): Delete.
4911 (gnu_nat_target): New class.
4912 * i386-gnu-nat.c (gnu_base_target): New.
4913 (i386_gnu_nat_target): New class.
4914 (the_i386_gnu_nat_target): New.
4915 (_initialize_i386gnu_nat): Adjust to C++ification.
4917 2018-05-02 Pedro Alves <palves@redhat.com>
4919 * bfd-target.c (target_bfd_xclose): Rename to ...
4920 (target_bfd_close): ... this.
4921 (target_bfd_reopen): Adjust.
4922 * target.c (target_close): Remove references to to_xclose.
4923 * target.h (target_ops::to_xclose): Delete.
4924 (target_ops::to_close): Update comments.
4926 2018-05-02 Pedro Alves <palves@redhat.com>
4928 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4930 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4931 * inf-ptrace.c (inf_ptrace_register_u_offset)
4932 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4933 (inf_ptrace_store_register, inf_ptrace_store_registers)
4934 (inf_ptrace_trad_target): Move to ...
4935 * linux-nat-trad.c: ... this new file.
4936 * linux-nat-trad.h: New file.
4937 * linux-nat.c (linux_target_install_ops): Make extern.
4938 (linux_trad_target): Delete.
4939 * linux-nat.h (linux_trad_target): Delete declaration.
4940 (linux_target_install_ops): Declare.
4941 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4944 2018-05-02 Pedro Alves <palves@redhat.com>
4946 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4947 procfs_target/add_target here.
4948 * procfs.c (procfs_target): Make static.
4949 (_initialize_procfs): Call add_target here.
4950 * procfs.h (struct target_ops): Remove forward declaration.
4951 (procfs_target): Remove declaration.
4952 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4954 2018-05-02 Pedro Alves <palves@redhat.com>
4956 * procfs.c (procfs_stopped_by_watchpoint)
4957 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4958 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4960 (procfs_use_watchpoints): Delete, move contents...
4961 (procfs_target): ... here.
4962 * procfs.h (procfs_use_watchpoints): Delete declaration.
4963 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4964 procfs_use_watchpoints.
4965 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4966 procfs_use_watchpoints.
4968 2018-05-02 Tom Tromey <tom@tromey.com>
4971 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4972 and var_zuinteger_unlimited.
4973 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4974 and PARAM_ZUINTEGER_UNLIMITED.
4975 (set_parameter_value): Handle var_zuinteger and
4976 var_zuinteger_unlimited.
4977 (add_setshow_generic): Likewise.
4978 (parmpy_init): Likewise.
4980 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4983 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4984 pointer is not null before dereferencing it.
4986 2018-04-30 Tom Tromey <tom@tromey.com>
4988 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4991 2018-04-30 Tom Tromey <tom@tromey.com>
4993 * breakpoint.c (mention): Remove use of is_mi_like_p.
4994 (print_mention_ranged_breakpoint): Likewise.
4995 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4998 2018-04-30 Tom Tromey <tom@tromey.com>
5000 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5002 2018-04-30 Tom Tromey <tom@tromey.com>
5004 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5005 (info_spu_event_command): Remove some uses of is_mi_like_p.
5007 2018-04-30 Tom Tromey <tom@tromey.com>
5009 * python/py-framefilter.c (py_print_single_arg)
5010 (enumerate_locals, py_print_args, py_print_frame): Remove some
5011 uses of is_mi_like_p.
5013 2018-04-30 Tom Tromey <tom@tromey.com>
5016 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5017 * ui-out.h (ui_out::is_mi_like_p): Now const.
5018 (ui_out::do_is_mi_like_p): Now const.
5019 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5021 2018-04-30 Tom Tromey <tom@tromey.com>
5023 * varobj.c (varobj_set_visualizer): Use new_reference.
5024 * python/python.c (gdbpy_decode_line): Use new_reference.
5025 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5028 2018-04-30 Tom Tromey <tom@tromey.com>
5030 * varobj.c (install_new_value): Use new_reference.
5031 * value.h (value_incref): Return void. Swap intro comment with
5033 * value.c (set_value_parent): Use new_reference.
5034 (value_incref): Return void. Update intro comment.
5035 (release_value): Use new_reference.
5036 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5038 2018-04-30 Tom Tromey <tom@tromey.com>
5040 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5041 * gdb_bfd.h (new_bfd_ref): Remove.
5042 (gdb_bfd_open): Update comment.
5043 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5044 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5045 (gdb_bfd_fdopenr): Use new_reference.
5046 * exec.c (exec_file_attach): Use new_reference.
5048 2018-04-30 Tom Tromey <tom@tromey.com>
5050 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5053 2018-04-30 Tom Tromey <tom@tromey.com>
5055 * jit.c (jit_read_code_entry): Use type_align.
5056 * i386-tdep.c (i386_gdbarch_init): Don't call
5057 set_gdbarch_long_long_align_bit.
5058 * gdbarch.sh: Remove long_long_align_bit.
5059 * gdbarch.c, gdbarch.h: Rebuild.
5060 * arc-tdep.c (arc_type_align): New function.
5061 (arc_gdbarch_init): Use arc_type_align. Don't call
5062 set_gdbarch_long_long_align_bit.
5064 2018-04-30 Tom Tromey <tom@tromey.com>
5066 * rust-lang.c (rust_type_alignment): Remove.
5067 (rust_composite_type): Use type_align.
5069 2018-04-30 Tom Tromey <tom@tromey.com>
5071 * NEWS: Mention Type.align.
5072 * python/py-type.c (typy_get_alignof): New function.
5073 (type_object_getset): Add "alignof".
5075 2018-04-30 Tom Tromey <tom@tromey.com>
5079 * std-operator.def (UNOP_ALIGNOF): New operator.
5080 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5082 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5083 * c-lang.c (c_op_print_tab): Add alignof.
5084 * c-exp.y (ALIGNOF): New token.
5085 (exp): Add "ALIGNOF" production.
5086 (ident_tokens): Add _Alignof and alignof.
5088 2018-04-30 Tom Tromey <tom@tromey.com>
5090 * i386-tdep.c (i386_type_align): New function.
5091 (i386_gdbarch_init): Update.
5092 * gdbarch.sh (type_align): New method.
5093 * gdbarch.c, gdbarch.h: Rebuild.
5094 * arch-utils.h (default_type_align): Declare.
5095 * arch-utils.c (default_type_align): New function.
5096 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5097 (struct type) <align_log2>: New field.
5098 <instance_flags>: Now a bitfield.
5099 (TYPE_RAW_ALIGN): New macro.
5100 (type_align, type_raw_align, set_type_align): Declare.
5101 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5103 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5104 (get_alignment, maybe_set_alignment): New functions.
5105 (read_structure_type, read_enumeration_type, read_array_type)
5106 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5107 (read_subrange_type, read_base_type): Set type alignment.
5109 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5111 * dwarf2read.c (read_index_from_section): Use bool.
5113 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5116 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5119 2018-04-29 John Reiser <jreiser@BitWagon.com>
5122 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5123 last step, and do it atomically.
5125 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5127 * compile/compile-c-types.c (convert_int, convert_float):
5130 2018-04-27 Tom Tromey <tom@tromey.com>
5133 * rust-lang.c (rust_inclusive_range_type_p): New function.
5134 (rust_range): Handle inclusive ranges.
5135 (rust_compute_range): Likewise.
5136 * rust-exp.y (struct rust_op) <inclusive>: New field.
5137 (DOTDOTEQ): New constant.
5138 (range_expr): Add "..=" productions.
5139 (operator_tokens): Add "..=" token.
5140 (ast_range): Add "inclusive" parameter.
5141 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5143 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5145 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5146 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5148 * expprint.c (print_subexp_standard): Handle new bounds values.
5149 (dump_subexp_body_standard): Likewise.
5151 2018-04-27 Tom Tromey <tom@tromey.com>
5153 * configure: Rebuild.
5154 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5155 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5157 (class symbol_needs_eval_context): Likewise.
5158 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5159 (mock_mapped_index::symbol_name_at): Use "override". Remove
5161 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5163 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5164 * aarch64-tdep.c (instruction_reader::read): Use "override".
5165 (instruction_reader_test::read): Likewise.
5166 * arm-tdep.c (instruction_reader::read): Use "override".
5167 (instruction_reader_thumb::read): Likewise.
5169 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5172 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5173 instead of remote_send.
5174 (remote_send): Remove.
5176 2018-04-26 Pedro Alves <palves@redhat.com>
5178 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5179 find_function_start_sal instead of find_pc_line.
5181 2018-04-26 Pedro Alves <palves@redhat.com>
5183 * breakpoint.c (set_breakpoint_location_function): Handle
5185 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5186 * elfread.c (elf_symtab_read): Give data symbols with
5187 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5188 (elf_rel_plt_read): Update comment.
5189 * linespec.c (convert_linespec_to_sals): Handle
5191 (minsym_found): Handle mst_data_gnu_ifunc.
5192 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5193 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5194 * parse.c (find_minsym_type_and_address): Handle
5196 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5197 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5198 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5200 <mst_data_gnu_ifunc>: New enumerator.
5202 2018-04-26 Pedro Alves <palves@redhat.com>
5204 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5205 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5206 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5208 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5209 (lookup_minimal_symbol_by_pc): Adjust.
5210 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5211 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5212 * minsyms.h (lookup_msym_prefer): New enum.
5213 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5214 parameter by a lookup_msym_prefer parameter.
5216 2018-04-26 Pedro Alves <palves@redhat.com>
5218 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5219 ends in "@plt" instead of looking at the symbol's section.
5221 2018-04-26 Pedro Alves <palves@redhat.com>
5223 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5225 (find_pc_partial_function_gnu_ifunc): Rename to ...
5226 (find_pc_partial_function): ... this, and remove references to
5228 (find_pc_partial_function): Delete old implementation.
5229 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5231 2018-04-26 Pedro Alves <palves@redhat.com>
5233 * linespec.c (struct bound_minimal_symbol_search_key): New.
5234 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5235 skip first line if we found a GNU ifunc minimal symbol by name.
5236 (compare_msymbols): Change parameters to work with a destructured
5238 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5241 2018-04-26 Pedro Alves <palves@redhat.com>
5243 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5244 ifunc targets here. Instead, if we have an ifunc minsym, use its
5246 (add_location_to_breakpoint): Store the minsym and the objfile in
5247 the breakpoint location.
5248 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5249 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5250 Record the minsym in the sal.
5251 * symtab.h (symtab_and_line) <msymbol>: New field.
5253 2018-04-26 Pedro Alves <palves@redhat.com>
5255 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5256 unless we actually resolved the ifunc.
5258 2018-04-26 Pedro Alves <palves@redhat.com>
5260 * c-exp.y (variable production): Prefer ifunc minsyms over
5261 regular function symbols.
5262 * symtab.c (find_gnu_ifunc): New function.
5263 * minsyms.h (lookup_msym_prefer): New enum.
5264 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5265 parameter by a lookup_msym_prefer parameter.
5266 * symtab.h (find_gnu_ifunc): New declaration.
5268 2018-04-26 Pedro Alves <palves@redhat.com>
5270 * blockframe.c (find_gnu_ifunc_target_type): New function.
5271 (find_function_type): New.
5272 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5273 return a value with a memory address.
5274 (eval_call): For calls to GNU ifunc functions, try to find the
5275 type of the target function from the type that the resolver
5277 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5279 * infcall.c (find_function_return_type): Delete.
5280 (find_function_addr): Add 'function_type' parameter. For calls to
5281 GNU ifunc functions, try to find the type of the target function
5282 from the type that the resolver returns, and return it via
5284 (call_function_by_hand_dummy): Adjust to use the function type
5285 returned by find_function_addr.
5286 (find_function_addr): Add 'function_type' parameter and move
5288 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5291 2018-04-26 Pedro Alves <palves@redhat.com>
5293 * c-exp.y (variable production): Skip finding an alias for ifunc
5296 2018-04-26 Pedro Alves <palves@redhat.com>
5298 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5300 2018-04-25 Pedro Alves <palves@redhat.com>
5302 * infcmd.c (kill_command): Print the pid as string, not the whole
5303 thread's ptid. Add comment. s/has been killed/killed/ in output
5305 * remote.c (remote_detach_1): Print the pid as string, not the
5306 whole thread's ptid.
5308 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5309 Sergio Durigan Junior <sergiodj@redhat.com>
5310 Pedro Alves <palves@redhat.com>
5312 * infcmd.c (kill_command): Print message when inferior has
5314 * inferior.c (print_inferior_events): Remove 'static'. Set as
5316 (add_inferior): Improve message printed when
5317 'print_inferior_events' is on.
5318 (exit_inferior): Remove message printed when
5319 'print_inferior_events' is on.
5320 (detach_inferior): Improve message printed when
5321 'print_inferior_events' is on.
5322 (initialize_inferiors): Use 'add_inferior_silent' to set
5323 'current_inferior_'.
5324 * inferior.h (print_inferior_events): Declare here as
5326 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5327 '[Detaching...]' messages when 'print_inferior_events' is on.
5328 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5329 as prefix/suffix for messages. Remove periods. Fix erroneous
5330 'Detaching after fork from child...', replace it by '... from
5332 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5333 prefix/suffix when printing 'Detaching...' messages. Print
5334 them when 'print_inferior_events' is on.
5335 * remote.c (remote_detach_1): Print message when detaching
5336 from inferior and '!is_fork_parent'.
5338 2018-04-24 Tom Tromey <tom@tromey.com>
5340 * cli-out.h: Reindent.
5342 2018-04-24 Tom Tromey <tom@tromey.com>
5344 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5345 (cli_ui_out::do_field_string): Use fputs_filtered.
5346 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5348 2018-04-23 Tom Tromey <tom@tromey.com>
5350 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5351 gdb::unique_xmalloc_ptr.
5353 2018-04-23 Tom Tromey <tom@tromey.com>
5355 * configure: Rebuild.
5357 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5360 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5361 prepare_for_testing. Set normal_bp to r_debug_state if target
5364 2018-04-21 Pedro Alves <palves@redhat.com>
5365 Rajendra SY <rajendra.sy@gmail.com>
5367 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5368 * remote.c (extended_remote_attach): In all-stop mode, mark the
5369 thread as executing.
5371 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5373 * thread.c (thread_apply_all_command): Fix comment.
5374 (thread_command): Fix comment.
5376 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5378 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5380 * features/aarch64-core.c (create_feature_aarch64_core):
5382 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5384 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5386 * features/i386/32bit-avx512.c
5387 (create_feature_i386_32bit_avx512): Likewise.
5388 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5390 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5392 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5394 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5396 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5398 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5400 * features/i386/64bit-avx512.c
5401 (create_feature_i386_64bit_avx512): Likewise.
5402 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5404 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5406 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5408 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5410 * features/i386/64bit-segments.c
5411 (create_feature_i386_64bit_segments): Likewise.
5412 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5414 * features/i386/x32-core.c
5415 (create_feature_i386_x32_core): Likewise.
5416 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5417 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5418 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5419 * target-descriptions.c: In generated code, don't pass xml
5422 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5424 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5425 (print_xml_feature::visit_post): Likewise.
5426 (print_xml_feature::visit): Likewise.
5427 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5428 (print_xml_feature): Add new class.
5429 * regformats/regdat.sh: Null xmltarget on feature targets.
5430 * target-descriptions.c (struct target_desc): Add xmltarget.
5431 (maintenance_check_tdesc_xml_convert): Add unittest function.
5432 (tdesc_get_features_xml): Add function to get xml.
5433 (maintenance_check_xml_descriptions): Test xml generation.
5434 * xml-tdesc.c (string_read_description_xml): Add function.
5435 * xml-tdesc.h (string_read_description_xml): Add declaration.
5437 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5439 * features/Makefile: Add feature marker to targets with new style
5440 target descriptions.
5441 * regformats/aarch64.dat: Regenerate.
5442 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5443 * regformats/i386/amd64-avx-linux.dat: Likewise.
5444 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5445 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5446 * regformats/i386/amd64-linux.dat: Likewise.
5447 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5448 * regformats/i386/amd64.dat: Likewise.
5449 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5450 * regformats/i386/i386-avx-linux.dat: Likewise.
5451 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5452 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5453 * regformats/i386/i386-linux.dat: Likewise.
5454 * regformats/i386/i386-mmx-linux.dat: Likewise.
5455 * regformats/i386/i386-mpx-linux.dat: Likewise.
5456 * regformats/i386/i386.dat: Likewise.
5457 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5458 * regformats/i386/x32-avx-linux.dat: Likewise.
5459 * regformats/i386/x32-linux.dat: Likewise.
5460 * regformats/tic6x-c62x-linux.dat: Likewise.
5461 * regformats/tic6x-c64x-linux.dat: Likewise.
5462 * regformats/tic6x-c64xp-linux.dat: Likewise.
5463 * regformats/regdat.sh: Parse feature marker.
5465 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5467 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5468 (tdesc_osabi_name): Likewise.
5469 * target-descriptions.c (tdesc_architecture_name): Add new
5471 (tdesc_osabi_name): Likewise.
5473 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5475 * common/tdesc.c (tdesc_predefined_type): Move to here.
5476 (tdesc_named_type): Likewise.
5477 (tdesc_create_vector): Likewise.
5478 (tdesc_create_struct): Likewise.
5479 (tdesc_set_struct_size): Likewise.
5480 (tdesc_create_union): Likewise.
5481 (tdesc_create_flags): Likewise.
5482 (tdesc_create_enum): Likewise.
5483 (tdesc_add_field): Likewise.
5484 (tdesc_add_typed_bitfield): Likewise.
5485 (tdesc_add_bitfield): Likewise.
5486 (tdesc_add_flag): Likewise.
5487 (tdesc_add_enum_value): Likewise.
5488 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5489 (struct tdesc_type_vector): Likewise.
5490 (struct tdesc_type_field): Likewise.
5491 (struct tdesc_type_with_fields): Likewise.
5492 (tdesc_create_enum): Add declaration.
5493 (tdesc_add_typed_bitfield): Likewise.
5494 (tdesc_add_enum_value): Likewise.
5495 * target-descriptions.c (tdesc_type_field): Move from here.
5496 (tdesc_type_builtin): Likewise.
5497 (tdesc_type_vector): Likewise.
5498 (tdesc_type_with_fields): Likewise.
5499 (tdesc_predefined_types): Likewise.
5500 (tdesc_named_type): Likewise.
5501 (tdesc_create_vector): Likewise.
5502 (tdesc_create_struct): Likewise.
5503 (tdesc_set_struct_size): Likewise.
5504 (tdesc_create_union): Likewise.
5505 (tdesc_create_flags): Likewise.
5506 (tdesc_create_enum): Likewise.
5507 (tdesc_add_field): Likewise.
5508 (tdesc_add_typed_bitfield): Likewise.
5509 (tdesc_add_bitfield): Likewise.
5510 (tdesc_add_flag): Likewise.
5511 (tdesc_add_enum_value): Likewise.
5512 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5513 (tdesc_add_typed_bitfield): Likewise.
5514 (tdesc_add_enum_value): Likewise.
5516 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5518 * common/tdesc.c (tdesc_feature::accept): Move to here.
5519 (tdesc_feature::operator==): Likewise.
5520 (tdesc_create_reg): Likewise.
5521 * common/tdesc.h (tdesc_type_kind): Likewise.
5522 (struct tdesc_type): Likewise.
5523 (struct tdesc_feature): Likewise.
5524 * regformats/regdat.sh: Create a feature.
5525 * target-descriptions.c (tdesc_type_kind): Move from here.
5526 (tdesc_type): Likewise.
5527 (tdesc_type_up): Likewise.
5528 (tdesc_feature): Likewise.
5529 (tdesc_create_reg): Likewise.
5531 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5533 * Makefile.in: Add arch/tdesc.c
5534 * common/tdesc.c: New file.
5535 * common/tdesc.h (tdesc_element_visitor): Move to here.
5536 (tdesc_element): Likewise.
5537 (tdesc_reg): Likewise.
5538 (tdesc_reg_up): Likewise.
5539 * regformats/regdef.h (reg): Add offset to constructors.
5540 * target-descriptions.c (tdesc_element_visitor): Move from here.
5541 (tdesc_element): Likewise.
5542 (tdesc_reg): Likewise.
5543 (tdesc_reg_up): Likewise.
5545 2018-04-17 Tom Tromey <tom@tromey.com>
5547 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5550 2018-04-17 Tom Tromey <tom@tromey.com>
5552 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5554 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5556 * symtab.c (print_symbol_info): Skip printing filename and line
5557 number when `last' is NULL.
5558 (symtab_symbol_info): Use empty string instead of NULL for first
5559 invocation of print_symbol_info.
5560 (rbreak_command): Pass NULL to `last' parameter of
5563 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5565 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5568 2018-04-16 Pedro Alves <palves@redhat.com>
5570 * MAINTAINERS (sh): Remove.
5571 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5572 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5573 (ALLDEPFILES): Remove sh64-tdep.c.
5574 * NEWS: Mentions that support for SH-5/SH64 is removed.
5575 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5576 (sh*-*-openbsd*): Ditto.
5577 (sh64-*-elf*): Remove.
5579 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5580 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5581 * sh-tdep.c: No longer include "sh64-tdep.h".
5582 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5583 * sh64-tdep.c, sh64-tdep.h: Remove files.
5585 2018-04-16 Pedro Alves <palves@redhat.com>
5587 * MAINTAINERS: Remove m88k.
5588 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5589 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5590 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5591 * NEWS: Mention that support for m88k was removed.
5592 * configure.host (m88*-*-*): Remove support.
5593 * configure.nat (m88k-*-*): Remove support.
5594 * configure.tgt (m88*-*-openbsd*): Remove.
5595 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5597 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5599 * configure.tgt (x86_tobjs): New variable.
5600 (amd64_tobjs, i386_tobjs): Use it.
5602 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5604 * symtab.c (print_symbol_info): Precede the symbol definition by
5605 the line number when available.
5606 * NEWS: Advertise this enhancement.
5608 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5610 * NEWS (New options): announce set/show record btrace cpu.
5611 * btrace.c: Include record-btrace.h.
5612 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5613 the vendor is unknown.
5614 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5615 Maybe overwrite the btrace configuration's cpu.
5616 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5617 (btrace_fetch): Add cpu parameter. Update callers.
5618 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5619 Maybe overwrite the btrace configuration's cpu. Skip enabling
5620 errata workarounds if the vendor is unknown.
5621 * python/py-record-btrace.c: Include record-btrace.h.
5622 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5623 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5624 * record-btrace.c (record_btrace_cpu_state_kind): New.
5625 (record_btrace_cpu): New.
5626 (set_record_btrace_cpu_cmdlist): New.
5627 (record_btrace_get_cpu): New.
5628 (require_btrace_thread, record_btrace_info)
5629 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5630 (cmd_set_record_btrace_cpu_none): New.
5631 (cmd_set_record_btrace_cpu_auto): New.
5632 (cmd_set_record_btrace_cpu): New.
5633 (cmd_show_record_btrace_cpu): New.
5634 (_initialize_record_btrace): Initialize set/show record btrace cpu
5636 * record-btrace.h (record_btrace_get_cpu): New.
5638 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5640 * record.c (set_record_command): Fix typo in message.
5642 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5644 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5646 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5648 * infrun.c (process_event_stop_test): Call
5649 gdbarch_in_indirect_branch_thunk.
5650 * gdbarch.sh (in_indirect_branch_thunk): New.
5651 * gdbarch.c: Regenerated.
5652 * gdbarch.h: Regenerated.
5655 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5656 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5657 (ALLDEPFILES): Add x86-tdep.c.
5658 * arch-utils.h (default_in_indirect_branch_thunk): New.
5659 * arch-utils.c (default_in_indirect_branch_thunk): New.
5660 * i386-tdep: Include x86-tdep.h.
5661 (i386_in_indirect_branch_thunk): New.
5662 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5664 * amd64-tdep: Include x86-tdep.h.
5665 (amd64_in_indirect_branch_thunk): New.
5666 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5668 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5671 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5672 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5673 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5676 2018-04-12 Tom Tromey <tom@tromey.com>
5678 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5679 (rust_evaluate_subexp): Likewise.
5681 2018-04-12 Pedro Alves <palves@redhat.com>
5683 * procfs.c (procfs_detach): Make forward declaration's prototype
5684 match definition's protototype.
5685 (proc_get_LDT_entry): Remove stale do_cleanups call.
5687 2018-04-12 Pedro Alves <palves@redhat.com>
5689 * target.h (target_ops::to_has_exited): Delete.
5690 (target_has_exited): Delete.
5691 * target-delegates.c: Regenerate.
5693 2018-04-11 Pedro Alves <palves@redhat.com>
5695 * target.c (fileio_fh_t::t): Add comment.
5696 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5697 (target_fileio_close): Handle a NULL target.
5698 (invalidate_fileio_fh): New.
5699 (target_close): Call it.
5700 * remote.c (remote_hostio_send_command): No longer check whether
5701 remote_desc is open.
5703 2018-04-11 Pedro Alves <palves@redhat.com>
5705 * target.c (fileio_fh_t): Make it a named struct instead of a
5707 (fileio_fh_t::is_closed): New method.
5708 (DEF_VEC_O (fileio_fh_t)): Remove.
5709 (fileio_fhandles): Now a std::vector.
5710 (is_closed_fileio_fh): Delete.
5711 (acquire_fileio_fd): Adjust. Rename parameters.
5712 (release_fileio_fd): Adjust.
5713 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5714 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5715 (target_fileio_close): Adjust.
5717 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5719 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5722 2018-04-10 Pedro Alves <palves@redhat.com>
5724 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5725 (scoped_finish_thread_state): New class.
5726 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5728 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5729 (fetch_inferior_event, normal_stop): Likewise.
5730 * thread.c (finish_thread_state_cleanup): Delete.
5732 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5733 Pedro Alves <palves@redhat.com>
5735 * value.c: Include "selftest.h" and "common/array-view.h".
5736 (struct range) <operator ==>: New.
5737 (test_ranges_contain): New.
5738 (check_ranges_vector): New.
5739 (test_insert_into_bit_range_vector): New.
5740 (_initialize_values): Register selftests.
5741 * common/array-view.h (operator==, operator!=): New.
5743 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5745 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5747 * inline-frame.c: Include <algorithm>.
5748 (struct inline_state): Add constructor.
5749 (inline_state_s): Remove.
5750 (DEF_VEC_O(inline_state_s)): Remove.
5751 (inline_states): Change type to std::vector.
5752 (find_inline_frame_state): Adjust to std::vector.
5753 (allocate_inline_frame_state): Remove.
5754 (clear_inline_frame_state): Adjust to std::vector.
5755 (skip_inline_frames): Adjust to std::vector.
5757 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5759 * tracepoint.h (struct trace_state_variable): Add constructor.
5760 <name>: Change type to std::string.
5761 * tracepoint.c (tsv_s): Remove.
5762 (DEF_VEC_O(tsv_s)): Remove.
5763 (tvariables): Change to std::vector.
5764 (create_trace_state_variable): Adjust to std::vector.
5765 (find_trace_state_variable): Likewise.
5766 (find_trace_state_variable_by_number): Likewise.
5767 (delete_trace_state_variable): Likewise.
5768 (trace_variable_command): Adjust to std::string.
5769 (delete_trace_variable_command): Likewise.
5770 (tvariables_info_1): Adjust to std::vector.
5771 (save_trace_state_variables): Likewise.
5772 (start_tracing): Likewise.
5773 (merge_uploaded_trace_state_variables): Adjust to std::vector
5775 * target.h (struct target_ops)
5776 <to_download_trace_state_variable>: Pass reference to
5777 trace_state_variable.
5778 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5779 * target-delegates.c: Re-generate.
5780 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5781 (mi_tsv_deleted): Likewise.
5782 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5783 * remote.c (remote_download_trace_state_variable): Change
5784 pointer to reference and adjust.
5785 * make-target-delegates (parse_argtypes): Handle references.
5786 (write_function_header): Likewise.
5787 (munge_type): Likewise.
5789 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5791 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5792 string_view-selftests.c.
5793 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5795 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5796 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5797 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5798 * unittests/basic_string_view/element_access/char/1.cc:
5800 * unittests/basic_string_view/element_access/char/empty.cc:
5802 * unittests/basic_string_view/element_access/char/front_back.cc:
5804 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5805 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5807 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5809 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5811 * unittests/basic_string_view/operations/compare/char/1.cc:
5813 * unittests/basic_string_view/operations/compare/char/13650.cc:
5815 * unittests/basic_string_view/operations/copy/char/1.cc:
5817 * unittests/basic_string_view/operations/data/char/1.cc:
5819 * unittests/basic_string_view/operations/find/char/1.cc:
5821 * unittests/basic_string_view/operations/find/char/2.cc:
5823 * unittests/basic_string_view/operations/find/char/3.cc:
5825 * unittests/basic_string_view/operations/find/char/4.cc:
5827 * unittests/basic_string_view/operations/rfind/char/1.cc:
5829 * unittests/basic_string_view/operations/rfind/char/2.cc:
5831 * unittests/basic_string_view/operations/rfind/char/3.cc:
5833 * unittests/basic_string_view/operations/substr/char/1.cc:
5835 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5836 * unittests/string_view-selftests.c: New file.
5838 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5840 * unittests/basic_string_view/capacity/1.cc: New file.
5841 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5842 * unittests/basic_string_view/cons/char/1.cc: New file.
5843 * unittests/basic_string_view/cons/char/2.cc: New file.
5844 * unittests/basic_string_view/cons/char/3.cc: New file.
5845 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5846 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5847 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5848 * unittests/basic_string_view/element_access/char/1.cc: New file.
5849 * unittests/basic_string_view/element_access/char/2.cc: New file.
5850 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5851 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5852 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5853 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5854 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5855 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5856 * unittests/basic_string_view/include.cc: New file.
5857 * unittests/basic_string_view/inserters/char/1.cc: New file.
5858 * unittests/basic_string_view/inserters/char/2.cc: New file.
5859 * unittests/basic_string_view/inserters/char/3.cc: New file.
5860 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5861 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5862 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5863 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5864 * unittests/basic_string_view/literals/types.cc: New file.
5865 * unittests/basic_string_view/literals/values.cc: New file.
5866 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5867 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5868 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5869 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5870 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5871 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5872 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5873 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5874 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5875 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5876 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5877 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5878 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5879 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5880 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5881 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5882 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5883 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5884 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5885 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5886 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5887 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5888 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5889 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5890 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5891 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5892 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5893 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5894 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5895 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5896 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5897 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5898 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5899 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5900 * unittests/basic_string_view/operators/char/2.cc: New file.
5901 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5902 * unittests/basic_string_view/range_access/char/1.cc: New file.
5903 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5904 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5905 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5906 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5907 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5908 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5909 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5910 * unittests/basic_string_view/typedefs.cc: New file.
5911 * unittests/basic_string_view/types/1.cc: New file.
5913 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5915 * common/gdb_string_view.h: Remove libstdc++ implementation
5916 details, adjust to gdb reality.
5917 * common/gdb_string_view.tcc: Likewise.
5918 * cli/cli-script.c (struct string_view): Remove.
5919 (user_args) <m_args>: Change element type to gdb::string_view.
5920 (user_args::insert_args): Adjust.
5922 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5924 * common/gdb_string_view.h: New file.
5925 * common/gdb_string_view.tcc: New file.
5927 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5929 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5930 * configure: Re-generate.
5932 2018-04-09 Pedro Alves <palves@redhat.com>
5934 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5935 (set_target_gdbarch): Call
5936 gdb::observers::architecture_changed.notify instead of
5937 observer_notify_architecture_changed.
5939 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5941 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5942 (do_restore_current_traceframe_cleanup): Remove.
5943 (restore_current_traceframe_cleanup_dtor): Remove.
5944 (make_cleanup_restore_current_traceframe): Remove.
5945 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5947 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5948 * infrun.c (fetch_inferior_event): Use
5949 scoped_restore_current_traceframe.
5951 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5953 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5955 <n_allocated_type_units>: Remove.
5956 <all_type_units>: Change to std::vector.
5957 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5958 to std::vector change.
5959 (dwarf2_per_objfile::get_cutu): Likewise.
5960 (dwarf2_per_objfile::get_tu): Likewise.
5961 (create_signatured_type_table_from_index): Likewise.
5962 (create_signatured_type_table_from_debug_names): Likewise.
5963 (dw2_symtab_iter_next): Likewise.
5964 (dw2_print_stats): Likewise.
5965 (dw2_expand_all_symtabs): Likewise.
5966 (dw2_expand_marked_cus): Likewise.
5967 (dw2_debug_names_iterator::next): Likewise.
5968 (dwarf2_initialize_objfile): Likewise.
5969 (add_signatured_type_cu_to_table): Likewise.
5970 (create_all_type_units): Likewise.
5971 (add_type_unit): Likewise.
5972 (struct tu_abbrev_offset): Add constructor.
5973 (build_type_psymtabs_1): Adjust to std::vector change.
5974 (print_tu_stats): Likewise.
5975 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5976 (write_debug_names): Likewise.
5978 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5980 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5981 Make an std::vector.
5982 <n_comp_units>: Remove.
5983 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5984 to std::vector change.
5985 (dwarf2_per_objfile::get_cutu): Likewise.
5986 (dwarf2_per_objfile::get_cu): Likewise.
5987 (create_cus_from_index): Likewise.
5988 (create_addrmap_from_index): Likewise.
5989 (create_addrmap_from_aranges): Likewise.
5990 (dwarf2_read_index): Likewise.
5991 (dw2_find_last_source_symtab): Likewise.
5992 (dw2_map_symtabs_matching_filename): Likewise.
5993 (dw2_symtab_iter_next): Likewise.
5994 (dw2_print_stats): Likewise.
5995 (dw2_expand_all_symtabs): Likewise.
5996 (dw2_expand_symtabs_with_fullname): Likewise.
5997 (dw2_expand_marked_cus): Likewise.
5998 (dw2_map_symbol_filenames): Likewise.
5999 (create_cus_from_debug_names): Likewise.
6000 (dwarf2_read_debug_names): Likewise.
6001 (dw2_debug_names_iterator::next): Likewise.
6002 (dwarf2_initialize_objfile): Likewise.
6003 (set_partial_user): Likewise.
6004 (dwarf2_build_psymtabs_hard): Likewise.
6005 (read_comp_units_from_section): Remove arguments, adjust to
6007 (create_all_comp_units): Adjust to std::vector and
6008 read_comp_units_from_section changes.
6009 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6011 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6012 (psyms_seen_size): Likewise.
6013 (write_gdbindex): Likewise.
6014 (write_debug_names): Likewise.
6016 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6018 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6019 with dwarf2_per_objfile.
6020 (create_cus_from_index): Likewise.
6021 (create_signatured_type_table_from_index): Likewise.
6022 (dwarf2_read_index): Likewise.
6023 (dwarf2_initialize_objfile): Likewise.
6024 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6025 per_cu rather than get_dwarf2_per_objfile.
6027 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6029 * dwarf2read.h (struct signatured_type): Forward declare.
6030 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6032 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6033 (dw2_get_cutu): ...this.
6034 (dwarf2_per_objfile::get_cu): Rename from...
6035 (dw2_get_cu): ...this.
6036 (dwarf2_per_objfile::get_tu): New.
6037 (create_addrmap_from_index): Adjust.
6038 (create_addrmap_from_aranges): Adjust.
6039 (dw2_find_last_source_symtab): Adjust.
6040 (dw2_map_symtabs_matching_filename): Adjust.
6041 (dw2_symtab_iter_next): Adjust.
6042 (dw2_print_stats): Adjust.
6043 (dw2_expand_all_symtabs): Adjust.
6044 (dw2_expand_symtabs_with_fullname): Adjust.
6045 (dw2_expand_marked_cus): Adjust.
6046 (dw_expand_symtabs_matching_file_matcher): Adjust.
6047 (dw2_map_symbol_filenames): Adjust.
6048 (dw2_debug_names_iterator::next): Adjust.
6049 (dwarf2_initialize_objfile): Adjust.
6050 (set_partial_user): Adjust.
6051 (dwarf2_build_psymtabs_hard): Adjust.
6053 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6055 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6056 Remove unused variables.
6057 (dw2_map_symtabs_matching_filename): Likewise.
6058 (dwarf2_record_block_ranges): Likewise.
6059 (dwarf2_read_addr_index): Likewise.
6060 (follow_die_offset): Likewise.
6062 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6064 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6065 to symbol_file_add_main.
6067 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6070 * mi/mi-console.c (do_fputc_async_safe): New.
6071 (mi_console_file::write_async_safe): New.
6072 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6073 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6075 * ui-file.c (ui_file::putstrn): Adjust call to
6076 fputstrn_unfiltered.
6077 * utils.c (printchar): Replace do_fputs and do_fprintf
6078 parameters by do_fputc.
6079 (fputstr_filtered): Adjust call to printchar.
6080 (fputstr_unfiltered): Likewise.
6081 (fputstrn_filtered): Likewise.
6082 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6084 * utils.h (do_fputc_ftype): New typedef.
6085 (fputstrn_unfiltered): Add do_fputc parameter.
6087 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6089 * regformats/i386/i386-avx.dat: Remove.
6091 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6094 * amd64-tdep.c (amd64_none_init_abi): New function.
6095 (amd64_x32_none_init_abi): New function.
6096 (_initialize_amd64_tdep): Register handlers for x86-64 and
6097 x64_32 with GDB_OSABI_NONE.
6098 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6099 GDB_OSABI_NONE osabi.
6101 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6104 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6106 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6107 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6109 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6111 * common/byte-vector.h (char_vector): New type.
6112 * target.h (target_read_alloc): Return
6113 gdb::optional<byte_vector>.
6114 (target_read_stralloc): Return gdb::optional<char_vector>.
6115 (target_get_osdata): Return gdb::optional<char_vector>.
6116 * target.c (target_read_alloc_1): Templatize. Replacement
6117 manual memory management with vector.
6118 (target_read_alloc): Change return type, adjust.
6119 (target_read_stralloc): Change return type, adjust.
6120 (target_get_osdata): Change return type, adjust.
6121 * auxv.c (struct auxv_info) <length>: Remove.
6122 <data>: Change type to gdb::optional<byte_vector>.
6123 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6124 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6125 (target_auxv_search): Adjust.
6126 (fprint_target_auxv): Adjust.
6127 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6128 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6129 (linux_make_corefile_notes): Adjust.
6130 * osdata.c (get_osdata): Adjust.
6131 * remote.c (remote_get_threads_with_qxfer): Adjust.
6132 (remote_memory_map): Adjust.
6133 (remote_traceframe_info): Adjust.
6134 (btrace_read_config): Adjust.
6135 (remote_read_btrace): Adjust.
6136 (remote_pid_to_exec_file): Adjust.
6137 * solib-aix.c (solib_aix_get_library_list): Adjust.
6138 * solib-dsbt.c (decode_loadmap): Don't free buf.
6139 (dsbt_get_initial_loadmaps): Adjust.
6140 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6141 * solib-target.c (solib_target_current_sos): Adjust.
6142 * tracepoint.c (sdata_make_value): Adjust.
6143 * xml-support.c (xinclude_start_include): Adjust.
6144 (xml_fetch_content_from_file): Adjust.
6145 * xml-support.h (xml_fetch_another): Change return type.
6146 (xml_fetch_content_from_file): Change return type.
6147 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6148 * xml-tdesc.c (file_read_description_xml): Adjust.
6149 (fetch_available_features_from_target): Change return type.
6150 (target_fetch_description_xml): Adjust.
6151 (target_read_description_xml): Adjust.
6153 2018-04-06 Tom Tromey <tom@tromey.com>
6155 * value.c (~value): Update.
6156 (struct value) <contents>: Now unique_xmalloc_ptr.
6157 (value_contents_bits_eq, allocate_value_contents)
6158 (value_contents_raw, value_contents_all_raw)
6159 (value_contents_for_printing, value_contents_for_printing_const)
6160 (set_value_enclosing_type): Update.
6162 2018-04-06 Tom Tromey <tom@tromey.com>
6164 * value.c (range_s): Remove typedef, VEC.
6165 (struct range): Add operator<.
6166 (range_lessthan): Remove.
6167 (ranges_contain): Change type.
6169 (struct value) <unavailable, optimized_out>: Now std::vector.
6170 (value_entirely_available)
6171 (value_entirely_covered_by_range_vector)
6172 (value_entirely_unavailable, value_entirely_optimized_out):
6174 (insert_into_bit_range_vector): Change argument type.
6175 (find_first_range_overlap): Likewise.
6176 (struct ranges_and_idx, value_contents_bits_eq)
6177 (require_not_optimized_out, require_available): Update.
6178 (ranges_copy_adjusted): Change argument types.
6179 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6181 2018-04-06 Tom Tromey <tom@tromey.com>
6183 * value.c (~value): Update.
6184 (struct value) <parent>: Now a value_ref_ptr.
6185 (value_parent, set_value_parent, value_address, value_copy):
6188 2018-04-06 Tom Tromey <tom@tromey.com>
6190 * value.c (struct value): Add constructor, destructor, and member
6192 (allocate_value_lazy, value_decref): Update.
6194 2018-04-06 Tom Tromey <tom@tromey.com>
6196 * value.c (struct value) <released, next>: Remove.
6197 (all_values): Now a std::vector.
6198 (allocate_value_lazy): Update.
6199 (value_next): Remove.
6200 (value_mark, value_free_to_mark, release_value)
6201 (value_release_to_mark): Update.
6203 2018-04-06 Tom Tromey <tom@tromey.com>
6205 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6206 (free_value_chain): Remove.
6207 * value.c (free_value_chain): Remove.
6208 (value_release_to_mark): Return a std::vector.
6209 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6211 (check_condition): Update.
6212 * eval.c (fetch_subexp_value): Change "val_chain" to a
6214 * breakpoint.c (update_watchpoint): Update.
6215 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6217 2018-04-06 Tom Tromey <tom@tromey.com>
6219 * value.h (free_all_values): Remove.
6220 * value.c (free_all_values): Remove.
6222 2018-04-06 Tom Tromey <tom@tromey.com>
6224 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6225 (value_history_chain, value_history_count): Remove.
6226 (value_history): New global.
6227 (record_latest_value, access_value_history, show_values)
6228 (preserve_values): Update.
6230 2018-04-06 Tom Tromey <tom@tromey.com>
6232 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6233 * varobj.c (varobj_set_display_format, varobj_set_value)
6234 (install_default_visualizer, construct_visualizer)
6235 (install_new_value, ~varobj, varobj_get_value_type)
6236 (my_value_of_variable, varobj_editable_p): Update.
6237 * c-varobj.c (c_describe_child, c_value_of_variable)
6238 (cplus_number_of_children, cplus_describe_child): Update.
6239 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6240 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6241 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6243 2018-04-06 Tom Tromey <tom@tromey.com>
6245 * printcmd.c (last_examine_address): Change type to
6247 (do_examine, x_command): Update.
6249 2018-04-06 Tom Tromey <tom@tromey.com>
6251 * value.c (release_value): Update.
6252 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6253 (struct bpstats) <val>: Now a value_ref_ptr.
6254 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6255 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6256 (~watchpoint, print_it_watchpoint, watch_command_1)
6257 (invalidate_bp_value_on_memory_change): Update.
6259 2018-04-06 Tom Tromey <tom@tromey.com>
6261 * varobj.c (varobj_clear_saved_item)
6262 (update_dynamic_varobj_children, install_new_value, ~varobj):
6264 * value.h (value_incref): Move declaration earlier.
6265 (value_decref): Rename from value_free.
6266 (struct value_ref_policy): New.
6267 (value_ref_ptr): New typedef.
6268 (struct value_deleter): Remove.
6269 (gdb_value_up): Remove typedef.
6270 (release_value): Change return type.
6271 (release_value_or_incref): Remove.
6272 * value.c (set_value_parent): Update.
6273 (value_incref): Change return type.
6274 (value_decref): Rename from value_free.
6275 (value_free_to_mark, free_all_values, free_value_chain): Update.
6276 (release_value): Return value_ref_ptr.
6277 (release_value_or_incref): Remove.
6278 (record_latest_value, set_internalvar, clear_internalvar):
6280 * stack.c (info_frame_command): Don't call value_free.
6281 * python/py-value.c (valpy_dealloc, valpy_new)
6282 (value_to_value_object): Update.
6283 * printcmd.c (do_examine): Update.
6284 * opencl-lang.c (lval_func_free_closure): Update.
6285 * mi/mi-main.c (register_changed_p): Don't call value_free.
6286 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6287 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6288 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6290 * guile/scm-value.c (vlscm_free_value_smob)
6291 (vlscm_scm_from_value): Update.
6292 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6293 (frame_unwind_register_unsigned, get_frame_register_bytes)
6294 (put_frame_register_bytes): Don't call value_free.
6295 * findvar.c (address_from_register): Don't call value_free.
6296 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6297 * dwarf2loc.c (entry_data_value_free_closure)
6298 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6299 (dwarf2_evaluate_loc_desc_full): Update.
6300 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6301 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6302 (~watchpoint, watch_command_1)
6303 (invalidate_bp_value_on_memory_change): Update.
6304 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6306 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6309 * warning.m4: Add -Wno-error=deprecated-register.
6310 * configure: Re-generate.
6312 2018-04-05 Tom Tromey <tom@tromey.com>
6314 * linespec.h: Remove include of "vec.h".
6316 2018-04-05 Tom Tromey <tom@tromey.com>
6318 * linespec.c (typep): Remove typedef.
6319 (find_methods, find_superclass_methods): Take a std::vector.
6320 (find_method): Use std::vector.
6322 2018-04-05 Tom Tromey <tom@tromey.com>
6324 * utils.c (compare_strings): Remove.
6325 * utils.h (compare_strings): Remove.
6326 * objc-lang.h (find_imps): Update.
6327 * objc-lang.c (find_methods): Take a std::vector.
6328 (uniquify_strings, find_imps): Likewise.
6329 * linespec.c (find_methods): Take a std::vector.
6330 (decode_objc): Use std::vector.
6331 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6333 (find_method, find_function_symbols): Use std::vector.
6335 2018-04-05 Tom Tromey <tom@tromey.com>
6337 * completer.c (completion_tracker::completion_tracker): Remove
6339 (completion_tracker::discard_completions): Likewise.
6340 * breakpoint.c (ambiguous_names_p): Remove cast.
6341 * ada-lang.c (_initialize_ada_language): Remove cast.
6342 * utils.h (streq): Update.
6343 (streq_hash): Add new declaration.
6344 * utils.c (streq): Return bool.
6345 (streq_hash): New function.
6347 2018-04-05 Tom Tromey <tom@tromey.com>
6349 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6350 Remove a string copy.
6352 2018-04-05 Tom Tromey <tom@tromey.com>
6354 * linespec.c (filter_results): Use std::vector.
6355 (decode_line_2, decode_line_full): Update.
6357 2018-04-05 Tom Tromey <tom@tromey.com>
6359 * linespec.c (canonical_to_fullform): Return std::string.
6360 (filter_results): Update.
6361 (struct decode_line_2_item): Add constructor.
6362 <fullform, displayform>: Now std::string.
6363 (decode_line_2_compare_items): Now a std::sort comparator.
6364 (decode_line_2): Update.
6366 2018-04-05 Tom Tromey <tom@tromey.com>
6368 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6369 (unexpected_linespec_error): Update.
6370 (linespec_parse_basic, parse_linespec): Update.
6372 2018-04-05 Tom Tromey <tom@tromey.com>
6374 * linespec.c (linespec_parse_basic): Reindent.
6376 2018-04-05 Tom Tromey <tom@tromey.com>
6378 * minsyms.h (iterate_over_minimal_symbols): Update.
6379 * minsyms.c (iterate_over_minimal_symbols): Take a
6381 * linespec.c (struct collect_minsyms): Remove.
6382 (compare_msyms): Now a std::sort comparator.
6383 (add_minsym): Add parameters.
6384 (search_minsyms_for_name): Update. Use std::vector.
6386 2018-04-03 Tom Tromey <tom@tromey.com>
6388 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6391 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6393 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6395 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6398 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6399 printing static type.
6401 2018-04-01 Tom Tromey <tom@tromey.com>
6403 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6404 (rs6000_xfer_shared_libraries): Update.
6406 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6408 * common/gdb_vecs.h (char_ptr): Remove.
6409 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6411 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6413 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6415 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6417 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6419 * tracepoint.h (struct uploaded_tp): Initialize fields.
6420 <actions, step_actions, cmd_strings>: Change type to
6421 std::vector<char *>.
6422 * tracepoint.c (get_uploaded_tp): Allocate with new.
6423 (free_uploaded_tps): Free with delete.
6424 (parse_tracepoint_definition): Adjust to std::vector change.
6425 * breakpoint.c (read_uploaded_action): Likewise.
6426 (create_tracepoint_from_upload): Likewise.
6427 * ctf.c (ctf_write_uploaded_tp): Likewise.
6428 (SET_ARRAY_FIELD): Likewise.
6429 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6431 2018-03-30 Tom Tromey <tom@tromey.com>
6433 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6435 (svr4_keep_data_in_core): Update.
6436 (svr4_read_so_list): Update.
6438 2018-03-30 Tom Tromey <tom@tromey.com>
6440 * windows-nat.c (handle_output_debug_string, handle_exception):
6442 * target.h (target_read_string): Update.
6443 * target.c (target_read_string): Change "string" to
6445 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6447 * solib-frv.c (frv_current_sos): Update.
6448 * solib-dsbt.c (dsbt_current_sos): Update.
6449 * solib-darwin.c (darwin_current_sos): Update.
6450 * linux-thread-db.c (inferior_has_bug): Update.
6451 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6452 Update. Remove alloca.
6453 * ada-lang.c (ada_main_name): Update.
6455 2018-03-30 Tom Tromey <tom@tromey.com>
6457 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6458 (struct dwo_file_deleter): New.
6459 (dwo_file_up): New typedef.
6460 (open_and_init_dwo_file): Use dwo_file_up.
6461 (free_dwo_file_cleanup): Remove.
6463 2018-03-30 Tom Tromey <tom@tromey.com>
6465 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6466 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6468 2018-03-30 Tom Tromey <tom@tromey.com>
6470 * dwarf2read.c (class free_cached_comp_units): New class.
6471 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6472 (free_cached_comp_units): Remove function.
6474 2018-03-30 Tom Tromey <tom@tromey.com>
6476 * utils.h (make_cleanup_unpush_target): Remove.
6477 * inf-ptrace.c (struct target_unpusher): New.
6478 (target_unpush_up) New typedef.
6479 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6481 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6483 2018-03-27 Tom Tromey <tom@tromey.com>
6485 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6487 2018-03-27 Pedro Alves <palves@redhat.com>
6488 Tom Tromey <tom@tromey.com>
6490 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6491 destructor. Now a class.
6492 (gdb_readline_wrapper_cleanup): Remove function.
6493 (gdb_readline_wrapper): Remove cleanups.
6495 2018-03-27 Tom Tromey <tom@tromey.com>
6497 * typeprint.h (struct type_print_options) <local_typedefs,
6498 global_typedefs>: Remove "struct" keyword.
6499 (class typedef_hash_table): New class.
6500 (recursively_update_typedef_hash, add_template_parameters)
6501 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6502 (find_typedef_in_hash): Don't declare.
6503 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6504 (typedef_hash_table::recursively_update): Rename from
6505 recursively_update_typedef_hash. Now a member.
6506 (typedef_hash_table::add_template_parameters): Rename from
6507 add_template_parameters. Now a member.
6508 (typedef_hash_table::typedef_hash_table): Now a constructor;
6509 rename from create_typedef_hash.
6510 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6511 rename from free_typedef_hash.
6512 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6513 (do_free_global_table): Remove.
6514 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6515 from copy_type_recursive.
6516 (create_global_typedef_table): Remove.
6517 (typedef_hash_table::find_global_typedef): Now a member of
6519 (typedef_hash_table::find_typedef): Rename from
6520 find_typedef_in_hash; now a member.
6521 (whatis_exp): Update.
6522 * extension.h (struct ext_lang_type_printers): Add constructor and
6524 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6526 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6527 Now a constructor; rename from start_ext_lang_type_printers.
6528 (ext_lang_type_printers): Now a destructor; rename from
6529 free_ext_lang_type_printers.
6530 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6532 (c_type_print_base_struct_union): Update. Remove cleanups.
6534 2018-03-27 Tom Tromey <tom@tromey.com>
6536 * dwarf-index-write.c: Include <cmath>.
6538 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6540 * NEWS: Add entry describing new "set|show varsize-limit" command.
6541 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6543 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6546 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6548 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6550 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6551 * dwarf-index-common.c: New file.
6552 * dwarf-index-common.h: New file.
6553 * dwarf-index-write.c: New file.
6554 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6555 (struct dwarf2_section_info): Move from here.
6556 (dwarf2_section_info_def): Likewise.
6557 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6558 (offset_type): Likewise.
6559 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6560 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6561 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6562 (byte_swap): Likewise.
6563 (MAYBE_SWAP): Likewise.
6564 (dwarf2_per_cu_ptr): Likewise.
6565 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6566 (struct tu_stats): Likewise.
6567 (struct dwarf2_per_objfile): Likewise.
6568 (struct dwarf2_per_cu_data): Likewise.
6569 (struct signatured_type): Likewise.
6570 (sig_type_ptr): Likewise.
6571 (DEF_VEC_P (sig_type_ptr)): Likewise.
6572 (INDEX4_SUFFIX): Likewise.
6573 (INDEX5_SUFFIX): Likewise.
6574 (DEBUG_STR_SUFFIX): Likewise.
6575 (dwarf2_read_section): Make non-static.
6576 (mapped_index_string_hash): Move from here.
6577 (dwarf5_djb_hash): Likewise.
6578 (file_write): Likewise.
6579 (class data_buf): Likewise.
6580 (struct symtab_index_entry): Likewise.
6581 (struct mapped_symtab): Likewise.
6582 (find_slot): Likewise.
6583 (hash_expand): Likewise.
6584 (add_index_entry): Likewise.
6585 (uniquify_cu_indices): Likewise.
6586 (class c_str_view): Likewise.
6587 (class c_str_view_hasher): Likewise.
6588 (class vector_hasher): Likewise.
6589 (write_hash_table): Likewise.
6590 (psym_index_map): Likewise.
6591 (struct addrmap_index_data): Likewise.
6592 (add_address_entry): Likewise.
6593 (add_address_entry_worker): Likewise.
6594 (write_address_map): Likewise.
6595 (symbol_kind): Likewise.
6596 (write_psymbols): Likewise.
6597 (struct signatured_type_index_data): Likewise.
6598 (write_one_signatured_type): Likewise.
6599 (recursively_count_psymbols): Likewise.
6600 (recursively_write_psymbols): Likewise.
6601 (class debug_names): Likewise.
6602 (check_dwarf64_offsets): Likewise.
6603 (psyms_seen_size): Likewise.
6604 (write_gdbindex): Likewise.
6605 (write_debug_names): Likewise.
6606 (assert_file_size): Likewise.
6607 (write_psymtabs_to_index): Likewise.
6608 (save_gdb_index_command): Likewise.
6609 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6611 * dwarf2read.h: New file.
6613 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6616 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6617 symbol name if the CU's language stores symbol names in linkage
6619 * language.h (struct language_defn)
6620 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6621 all instances of this struct.
6623 2018-03-26 Tom Tromey <tom@tromey.com>
6625 * stack.c (backtrace_command_1): Remove verbose code.
6627 2018-03-26 Tom Tromey <tom@tromey.com>
6629 * python/py-framefilter.c (py_print_type): Don't catch
6630 exceptions. Return void.
6631 (py_print_value): Likewise.
6632 (py_print_single_arg): Likewise.
6633 (enumerate_args): Don't catch exceptions.
6634 (py_print_args): Likewise.
6635 (py_print_frame): Likewise.
6636 (gdbpy_apply_frame_filter): Catch exceptions here.
6638 2018-03-26 Tom Tromey <tom@tromey.com>
6640 * stack.c (_initialize_stack): Remove trailing newlines from help
6641 text. Add "Usage" line to "backtrace" help.
6643 2018-03-26 Tom Tromey <tom@tromey.com>
6646 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6648 2018-03-26 Tom Tromey <tom@tromey.com>
6650 * python/py-framefilter.c (py_print_single_arg): Return
6651 EXT_LANG_BT_ERROR from catch.
6653 2018-03-26 Tom Tromey <tom@tromey.com>
6656 * stack.c (backtrace_command_1): Move some code into no-filters
6659 2018-03-26 Tom Tromey <tom@tromey.com>
6661 * python/py-framefilter.c (throw_quit_or_print_exception): New
6663 (gdbpy_apply_frame_filter): Use it.
6665 2018-03-26 Tom Tromey <tom@tromey.com>
6668 * python/py-framefilter.c (py_print_type, py_print_value)
6669 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6672 2018-03-26 Tom Tromey <tom@tromey.com>
6674 * python/py-framefilter.c (enumerate_args): Use
6675 gdb::unique_xmalloc_ptr.
6677 2018-03-26 Tom Tromey <tom@tromey.com>
6679 * python/py-framefilter.c (py_print_frame): Return
6681 (gdbpy_apply_frame_filter): Update comment.
6682 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6684 <EXT_LANG_BT_NO_FILTERS>: Change value.
6686 2018-03-26 Tom Tromey <tom@tromey.com>
6689 * stack.c (backtrace_command): Parse "hide" argument.
6690 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6691 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6694 2018-03-26 Tom Tromey <tom@tromey.com>
6696 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6698 (backtrace_command): Remove "fulltrace", add "flags".
6700 2018-03-26 Tom Tromey <tom@tromey.com>
6702 * stack.c (backtrace_command): Rewrite command line parsing.
6704 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6706 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6708 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6710 * filename-seen-cache.h: Add include guard.
6712 2018-03-26 Keith Seitz <keiths@redhat.com>
6714 * symfile.c (place_section): Remove "struct" from section_addr_info
6716 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6717 "struct" keyword from section_addr_info.
6719 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6721 * regformats/regdef.h (reg): Add constructors.
6723 2018-03-25 Pedro Alves <palves@redhat.com>
6725 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6726 if then/else bodies in var_func_name extraction.
6728 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6730 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6731 lookup_minimal_symbol() to find symbol entry.
6732 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6734 2018-03-23 Keith Seitz <keiths@redhat.com>
6737 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6738 nested type definitions for C++, too.
6740 2018-03-23 Tom Tromey <tom@tromey.com>
6742 * machoread.c (struct oso_el): Add a constructor. Don't define as
6744 (macho_register_oso): Remove.
6745 (macho_symtab_read): Take a std::vector.
6746 (oso_el_compare_name): Now a std::sort comparator.
6747 (macho_symfile_read_all_oso): Take a std::vector.
6748 (macho_symfile_read): Use std::vector. Remove cleanups.
6750 2018-03-22 Tom Tromey <tom@tromey.com>
6752 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6753 (record_full_goto_bookmark): Use std::string.
6755 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6758 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6761 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6763 * rs6000-tdep.c (store_insn_p): New function.
6764 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6765 and cr_reg to their unshifted values. Use store_insn_p to
6766 match LR saves using either R1 or fdata->alloca_reg. Use
6767 store_insn_p to match CR saves. Set alloca_reg_offset
6768 when alloca_reg and framep are set. Remove lr_reg shift
6769 when assigning to fdata->lr_register.
6771 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6773 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6774 command line args instead of emitting a warning.
6776 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6778 * tracepoint.h (struct static_tracepoint_marker): Initialize
6779 fields, define default constructor, move constructor and move
6780 assignment, disable the rest.
6781 <str_id, extra>: Make std::string.
6782 (release_static_tracepoint_marker): Remove.
6783 (free_current_marker): Remove.
6784 * tracepoint.c (free_current_marker): Remove.
6785 (parse_static_tracepoint_marker_definition): Adjust to
6786 std::string, use new hex2str overload.
6787 (release_static_tracepoint_marker): Remove.
6788 (print_one_static_tracepoint_marker): Get marker by reference
6789 and adjust to std::string.
6790 (info_static_tracepoint_markers_command): Adjust to std::vector
6792 * target.h (static_tracepoint_marker_p): Remove typedef.
6793 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6794 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6796 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6798 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6799 (target_debug_print_std_vector_static_tracepoint_marker): New.
6800 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6802 (target_debug_print_static_tracepoint_marker_p): ... this.
6803 * target-delegates.c: Re-generate.
6804 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6806 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6807 (decode_static_tracepoint_spec): Adjust to std::vector.
6808 (tracepoint_print_one_detail): Adjust to std::string.
6809 (strace_marker_decode_location): Adjust to std::string.
6810 (update_static_tracepoint): Adjust to std::string, remove call
6811 to release_static_tracepoint_marker.
6812 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6813 Adjust to std::vector.
6814 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6815 (remote_static_tracepoint_markers_by_strid): Adjust to
6817 * common/rsp-low.h (hex2str): New overload with explicit count
6819 * common/rsp-low.c (hex2str): New overload with explicit count
6821 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6822 (_initialize_rsp_low_selftests): Add test_hex2str test.
6823 * unittests/tracepoint-selftests.c
6824 (test_parse_static_tracepoint_marker_definition): Adjust to
6827 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6829 * tracepoint.c (parse_static_tracepoint_marker_definition):
6830 Consider case where the definition is followed by more
6832 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6833 tracepoint-selftests.c.
6834 * unittests/tracepoint-selftests.c: New.
6836 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6838 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6841 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6843 * symtab.c (find_pc_sect_line): fixed indentation.
6845 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6847 * symtab.c (find_pc_sect_line): now uses binary search.
6849 2018-03-19 Tom Tromey <tom@tromey.com>
6851 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6854 2018-03-19 Pedro Alves <palves@redhat.com>
6855 Tom Tromey <tom@tromey.com>
6857 * unittests/observable-selftests.c: New file.
6858 * common/observable.h: New file.
6859 * observable.h: New file.
6860 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6861 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6862 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6863 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6864 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6865 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6866 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6867 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6868 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6869 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6870 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6871 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6872 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6873 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6874 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6875 tui/tui-interp.c, valops.c: Update all users.
6876 * tui/tui-hooks.c (tui_bp_created_observer)
6877 (tui_bp_deleted_observer, tui_bp_modified_observer)
6878 (tui_inferior_exit_observer, tui_before_prompt_observer)
6879 (tui_normal_stop_observer, tui_register_changed_observer):
6881 (tui_observers_token): New global.
6882 (attach_or_detach, tui_attach_detach_observers): New functions.
6883 (tui_install_hooks, tui_remove_hooks): Use
6884 tui_attach_detach_observers.
6885 * record-btrace.c (record_btrace_thread_observer): Remove.
6886 (record_btrace_thread_observer_token): New global.
6887 * observer.sh: Remove.
6888 * observer.c: Rename to observable.c.
6889 * observable.c (namespace gdb_observers): Define new objects.
6890 (observer_debug): Move into gdb_observers namespace.
6891 (struct observer, struct observer_list, xalloc_observer_list_node)
6892 (xfree_observer_list_node, generic_observer_attach)
6893 (generic_observer_detach, generic_observer_notify): Remove.
6894 (_initialize_observer): Update.
6895 Don't include observer.inc.
6896 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6897 (clean mostlyclean): Likewise.
6898 (observer.h, observer.inc): Remove targets.
6899 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6900 (COMMON_SFILES): Use observable.c, not observer.c.
6901 * .gitignore: Remove observer.h.
6903 2018-03-18 Tom Tromey <tom@tromey.com>
6905 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6907 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6909 2018-03-17 Tom Tromey <tom@tromey.com>
6911 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6913 2018-03-17 Tom Tromey <tom@tromey.com>
6915 * target.c (class scoped_target_fd): New.
6916 (target_fileio_close_cleanup): Remove.
6917 (target_fileio_read_alloc_1): Use scoped_target_fd.
6919 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6921 * silent-rules.mk: New.
6922 * Makefile.in: Include silent-rules.mk
6923 (srcdir, VPATH, top_srcdir): Move up.
6924 (COMPILE): Add ECHO_CXX.
6925 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6926 (init.c): Add ECHO_INIT_C.
6927 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6928 (version.c): Add ECHO_GEN.
6929 (printcmd.o): Add ECHO_CXX.
6930 (target-float.o): Add ECHO_CXX.
6931 (ada-exp.o): Add ECHO_CXX.
6932 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6933 (insight$(EXEEXT)): Add ECHO_CXXLD.
6934 * gnulib/configure.ac: Add AM_SILENT_RULES.
6935 * gnulib/aclocal.m4: Re-generate.
6936 * gnulib/configure: Re-generate.
6937 * gnulib/import/Makefile.in: Re-generate.
6939 2018-03-16 Tom Tromey <tom@tromey.com>
6941 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6942 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6943 * utils.c (do_free_section_addr_info)
6944 (make_cleanup_free_section_addr_info): Remove.
6945 * symfile.h (struct other_sections): Add constructor.
6946 (struct section_addr_info): Remove.
6947 (section_addr_info): New typedef.
6948 (struct sym_fns) <sym_offsets>: Change type of parameter.
6949 (build_section_addr_info_from_objfile)
6950 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6951 (default_symfile_offsets, symbol_file_add)
6952 (symbol_file_add_from_bfd)
6953 (build_section_addr_info_from_section_table): Update.
6954 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6955 * symfile.c (alloc_section_addr_info): Remove.
6956 (build_section_addr_info_from_section_table): Change return type.
6958 (build_section_addr_info_from_bfd)
6959 (build_section_addr_info_from_objfile): Likewise.
6960 (free_section_addr_info): Remove.
6961 (relative_addr_info_to_section_offsets): Change type of "addrs".
6962 (addrs_section_compar): Now a std::sort comparator.
6963 (addrs_section_sort): Change return type.
6964 (addr_info_make_relative): Change type of "addrs". Update.
6965 (default_symfile_offsets, syms_from_objfile_1)
6966 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6967 (symbol_file_add_separate): Update.
6968 (symbol_file_add): Change type of "addrs". Update.
6969 (add_symbol_file_command): Update. Remove cleanups.
6970 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6972 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6973 * solib.c (solib_read_symbols): Update.
6974 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6975 * machoread.c (macho_symfile_offsets): Update.
6976 * jit.c (jit_bfd_try_read_symtab): Update.
6978 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6980 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6981 unittests/utils-selftests.c.
6982 * unittests/utils-selftests.c: New file.
6984 2018-03-14 Tom Tromey <tom@tromey.com>
6987 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6990 2018-03-14 Tom Tromey <tom@tromey.com>
6993 * printcmd.c (printf_pointer): Allow "-" in format.
6995 2018-03-14 Tom Tromey <tom@tromey.com>
6997 * printcmd.c (_initialize_printcmd): Add usage to printf.
6999 2018-03-14 Yao Qi <qiyao@sourceware.org>
7001 * MAINTAINERS: Update my email address.
7003 2018-03-13 Tom Tromey <tom@tromey.com>
7005 * machoread.c (macho_check_dsym): Change filenamep to a
7007 (macho_symfile_read): Update.
7008 * symfile.c (load_command): Use std::string.
7010 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7012 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7013 to error message string.
7014 (riscv_register_name): Use xsnprintf instead of sprintf.
7015 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7017 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7019 (riscv_push_dummy_call): Likewise.
7021 2018-03-12 Tom Tromey <tom@tromey.com>
7023 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7024 Use gdb::byte_vector.
7025 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7027 2018-03-12 Yao Qi <yao.qi@linaro.org>
7029 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7030 parameter type to readable_regcache.
7031 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7034 2018-03-11 Tom Tromey <tom@tromey.com>
7036 * dwarf2read.c (struct nextfield): Add initializers.
7037 (struct nextfnfield): Remove.
7038 (struct fnfieldlist): Add initializers. Remove "length" and
7039 "head", use std::vector.
7040 (struct decl_field_list): Remove.
7041 (struct field_info): Add initializers.
7042 <fields, baseclasses>: Now std::vector.
7043 <nbaseclasses, nfnfields, typedef_field_list_count,
7044 nested_types_list_count>: Remove.
7045 (dwarf2_add_field, dwarf2_add_type_defn)
7046 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7047 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7048 (process_structure_scope): Update.
7050 2018-03-11 Tom Tromey <tom@tromey.com>
7052 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7053 for use by std::sort.
7054 (build_type_psymtabs_1): Use std::vector.
7056 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7058 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7059 and LIBMPFR in the printed configuration.
7061 2018-03-08 Tom Tromey <tom@tromey.com>
7063 * source.c (get_filename_and_charpos): Use scoped_fd.
7064 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7065 (procfs_pidlist): Likewise.
7066 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7067 (iterate_over_mappings): Likewise.
7069 2018-03-08 Tom Tromey <tom@tromey.com>
7071 * infcall.c (struct call_return_meta_info)
7072 <stack_temporaries_enabled>: Remove.
7073 (get_call_return_value, call_function_by_hand_dummy): Update.
7074 * thread.c (disable_thread_stack_temporaries): Remove.
7075 (enable_thread_stack_temporaries): Remove.
7076 (thread_stack_temporaries_enabled_p): Return bool.
7077 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7078 (get_last_thread_stack_temporary): Update.
7079 * eval.c (evaluate_subexp): Update.
7080 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7081 class, not a function.
7082 (value_ptr, value_vec): Remove typedefs.
7083 (class thread_info) <stack_temporaries_enabled>: Now bool.
7084 <stack_temporaries>: Now a std::vector.
7085 (thread_stack_temporaries_enabled_p)
7086 (value_in_thread_stack_temporaries): Return bool.
7088 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7090 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7091 (getpkt_or_notif_sane_1): Likewise.
7093 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7095 * build-id.c (build_id_to_debug_bfd): Use std::string.
7097 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7099 * build-id.c (find_separate_debug_file_by_buildid): Return
7101 * build-id.h (find_separate_debug_file_by_buildid): Return
7103 * coffread.c (coff_symfile_read): Adjust to std::string.
7104 * elfread.c (elf_symfile_read): Adjust to std::string.
7105 * symfile.c (separate_debug_file_exists): Change parameter to
7107 (find_separate_debug_file): Return std::string.
7108 (find_separate_debug_file_by_debuglink): Return std::string.
7109 * symfile.h (find_separate_debug_file_by_debuglink): Return
7112 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7114 * common/xml-utils.c (xml_escape_text): Move code to...
7115 (xml_escape_text_append): ... this new function.
7116 * common/xml-utils.h (xml_escape_text_append): New declaration.
7117 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7119 (_initialize_xml_utils): register test_xml_escape_text_append as
7122 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7124 * defs.h: Remove MAX_REGISTER_SIZE.
7125 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7127 * python/py-unwind.c (pyuw_sniffer): Likewise.
7129 2018-03-07 Tom Tromey <tom@tromey.com>
7131 * linux-tdep.c (linux_info_proc): Update.
7132 * target.h (struct target_ops) <to_fileio_readlink>: Return
7134 (target_fileio_readlink): Return optional<string>.
7135 * remote.c (remote_hostio_readlink): Return optional<string>.
7136 * inf-child.c (inf_child_fileio_readlink): Return
7138 * target.c (target_fileio_readlink): Return optional<string>.
7140 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7142 * regcache.c (cooked_read_test): Add riscv to the list of
7143 architectures that have a save_reggroup.
7145 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7147 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7148 value is not a dynamic class object.
7150 2018-03-06 Tom Tromey <tom@tromey.com>
7152 * rust-exp.y: Formatting fixes.
7154 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7156 * riscv-tdep.c (riscv_register_name): Remove target description
7158 (riscv_gdbarch_init): Remove target description check.
7160 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7162 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7164 * riscv-tdep.h: Likewise.
7166 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7168 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7169 (riscv_pseudo_register_write): Delete.
7170 (riscv_gdbarch_init): Remove all use of pseudo registers.
7172 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7174 * record-btrace.c (btrace_print_lines): Replace cleanup
7175 parameter with RAII equivalents.
7176 (btrace_insn_history): Replace cleanup with RAII equivalents.
7177 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7178 make_cleanup_ui_out_tuple_begin_end): Remove.
7179 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7180 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7181 make_cleanup_ui_out_list_begin_end): Remove.
7183 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7185 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7186 parameter types to std::vector. Use bool.
7187 (record_btrace_wait): Replace VEC(tp_t) with
7188 std::vector<thread_info *>.
7189 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7191 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7193 * record-btrace.c (record_btrace_disable_callback): Remove.
7194 (struct scoped_btrace_disable): New.
7195 (record_btrace_open): Use scoped_btrace_disable.
7197 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7199 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7200 reading values from registers.
7202 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7204 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7207 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7209 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7210 change parameter type. Use GDB's print functions, and use
7211 core_addr_to_string where appropriate.
7212 (riscv_push_dummy_call): Use core_addr_to_string where
7213 appropriate, update call to riscv_print_arg_location, and reindent
7215 (riscv_return_value): Update call to riscv_print_arg_location.
7217 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7218 Tim Newsome <tim@sifive.com>
7219 Albert Ou <a0u@eecs.berkeley.edu>
7220 Darius Rad <darius@bluespec.com>
7222 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7223 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7224 (ALLDEPFILES): Add riscv-tdep.c
7225 * configure.tgt: Add riscv support.
7226 * riscv-tdep.c: New file.
7227 * riscv-tdep.h: New file.
7228 * NEWS: Mention new target.
7229 * MAINTAINERS: Add entry for riscv.
7231 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7233 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7234 fields within aggregates.
7236 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7238 * record-btrace.c (btrace_print_lines): Change type of flags to
7239 gdb_disassembly_flags.
7241 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7243 * fbsd-nat.c: Include "inf-ptrace.h".
7244 (USE_SIGTRAP_SIGINFO): Conditionally define.
7245 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7246 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7247 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7249 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7251 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7253 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7254 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7255 "supports_stopped_by_hw_breakpoint" target methods.
7257 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7259 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7260 * fbsd-nat.c (debug_fbsd_nat): New variable.
7261 (show_fbsd_nat_debug): New function.
7262 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7263 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7265 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7267 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7268 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7270 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7271 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7274 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7276 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7277 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7279 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7281 * charset.c (struct charset_vector): New.
7282 (charsets): Change type to charset_vector.
7283 (find_charset_names): Adjust.
7285 (_initialize_charset): Adjust.
7287 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7289 * progspace.h (struct program_space) <deleted_solibs>: Change
7290 type to std::vector<std::string>.
7291 * progspace.c (clear_program_space_solib_cache): Adjust.
7292 * breakpoint.c (print_solib_event): Adjust.
7293 (check_status_catch_solib): Adjust.
7294 * solib.c (update_solib_list): Adjust.
7295 * ui-out.h (class ui_out) <field_string>: New overload.
7296 * ui-out.c (ui_out::field_string): New overload.
7298 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7300 * progspace.h (struct program_space): Add constructor and
7301 destructor, initialize fields.
7302 (add_program_space): Remove.
7303 * progspace.c (add_program_space): Rename to...
7304 (program_space::program_space): ... this.
7305 (release_program_space): Rename to...
7306 (program_space::~program_space): ... this.
7307 (delete_program_space): Use delete to delete program_space.
7308 (initialize_progspace): Use new to allocate program_space.
7309 * inferior.c (add_inferior_with_spaces): Likewise.
7310 (clone_inferior_command): Likewise.
7311 * infrun.c (follow_fork_inferior): Likewise.
7312 (handle_vfork_child_exec_or_exit): Likewise.
7314 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7316 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7317 (delim_string_to_char_ptr_vec): Return std::vector of
7318 gdb::unique_xmalloc_ptr.
7319 (dirnames_to_char_ptr_vec_append): Take std::vector of
7320 gdb::unique_xmalloc_ptr.
7321 (dirnames_to_char_ptr_vec): Return std::vector of
7322 gdb::unique_xmalloc_ptr.
7323 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7324 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7325 (delim_string_to_char_ptr_vec): Return an std::vector of
7326 gdb::unique_xmalloc_ptr, adjust the code.
7327 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7328 gdb::unique_xmalloc_ptr, adjust the code.
7329 (dirnames_to_char_ptr_vec): Return an std::vector of
7330 gdb::unique_xmalloc_ptr, adjust the code.
7331 * auto-load.c (auto_load_safe_path_vec): Change type to
7332 std::vector of gdb::unique_xmalloc_ptr.
7333 (auto_load_expand_dir_vars): Return an std::vector of
7334 gdb::unique_xmalloc_ptr, adjust the code.
7335 (auto_load_safe_path_vec_update): Adjust.
7336 (filename_is_in_auto_load_safe_path_vec): Adjust.
7337 (auto_load_objfile_script_1): Adjust.
7338 * build-id.c (build_id_to_debug_bfd): Adjust.
7339 * linux-thread-db.c (thread_db_load_search): Adjust.
7340 * source.c (add_path): Adjust.
7342 * symfile.c (find_separate_debug_file): Adjust.
7343 * utils.c (do_free_char_ptr_vec): Remove.
7344 (make_cleanup_free_char_ptr_vec): Remove.
7346 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7349 * common/pathstuff.c: Conditionally include "<windows.h>".
7351 2018-03-01 Georg Sauthoff <mail@georg.so>
7354 * gcore.in: Quote variables and switch interpreter to bash.
7356 2018-03-01 Tom Tromey <tom@tromey.com>
7358 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7359 assertion. Add assertion for discriminant_index.
7360 (quirk_rust_enum): Use correct base type name in univariant case.
7362 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7364 * record.c (get_call_history_modifiers): Return a
7366 (cmd_record_call_history): Adjust.
7367 * record-btrace.c (record_btrace_call_history): Adjust.
7368 (record_btrace_call_history_range): Adjust.
7369 (record_btrace_call_history_from): Adjust.
7370 * target-debug.h (target_debug_print_record_print_flags): New.
7371 * target-delegates.c: Re-generate.
7372 * target.c (target_call_history): Change flags type.
7373 (target_call_history_from): Likewise.
7374 (target_call_history_range): Likewise.
7375 * target.h (struct target_ops) <target_call_history>: Likewise.
7376 (target_call_history_from): Likewise.
7377 (target_call_history_range): Likewise.
7379 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7380 Simon Marchi <simon.marchi@polymtl.ca>
7382 * common/common-utils.c: Include "sys/stat.h".
7383 (is_regular_file): Move here from "source.c"; change return
7385 * common/common-utils.h (is_regular_file): New prototype.
7386 * common/pathstuff.c (contains_dir_separator): New function.
7387 * common/pathstuff.h (contains_dir_separator): New prototype.
7388 * source.c: Don't include "sys/stat.h".
7389 (is_regular_file): Move to "common/common-utils.c".
7391 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7393 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7394 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7395 * auto-load.c: Include "common/pathstuff.h".
7396 * common/common-def.h (current_directory): Move here.
7397 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7399 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7401 * common/pathstuff.c: New file.
7402 * common/pathstuff.h: New file.
7403 * compile/compile.c: Include "common/pathstuff.h".
7404 * defs.h (current_directory): Move to "common/common-defs.h".
7405 * dwarf2read.c: Include "common/pathstuff.h".
7407 * guile/scm-safe-call.c: Likewise.
7408 * linux-thread-db.c: Likewise.
7410 * nto-tdep.c: Likewise.
7411 * objfiles.c: Likewise.
7412 * source.c: Likewise.
7413 * symtab.c: Likewise.
7414 * utils.c: Include "common/pathstuff.h".
7415 (gdb_realpath): Move to "common/pathstuff.c".
7416 (gdb_realpath_keepfile): Likewise.
7417 (gdb_abspath): Likewise.
7418 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7419 (gdb_realpath_keepfile): Likewise.
7420 (gdb_abspath): Likewise.
7422 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7424 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7425 wildcard process pid for super_resume for kernels with a
7428 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7430 * compile/compile.c (get_args): Add additional comments
7431 explaining function.
7433 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7434 Tom Tromey <tom@tromey.com>
7436 * target.h (memory_write_request_s): Remove typedef. Don't define
7438 (target_write_memory_blocks): Change argument to std::vector.
7439 (struct memory_write_request): Add constructor.
7440 * target-memory.c (compare_block_starting_address): Return bool.
7441 Change argument types.
7442 (claim_memory): Change arguments to use std::vector.
7443 (split_regular_and_flash_blocks, blocks_to_erase)
7444 (compute_garbled_blocks): Likewise.
7445 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7446 (target_write_memory_blocks): Change argument to std::vector.
7447 * symfile.c (struct load_section_data): Add constructor and
7448 destructor. Use std::vector for "requests".
7449 (struct load_progress_data): Add initializers.
7450 (load_section_callback): Update. Use "new".
7451 (clear_memory_write_data): Remove.
7452 (generic_load): Update.
7454 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7456 * arch/aarch64.h: Use common/tdesc.h.
7458 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7460 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7461 architecture with a 64-bit ABI.
7463 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7465 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7466 ahead of target description loading.
7468 2018-02-26 Tom Tromey <tom@tromey.com>
7470 * stack.c (backtrace_command_1): Update.
7471 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7473 * python/py-framefilter.c (py_print_frame)
7474 (gdbpy_apply_frame_filter): Change type of "flags".
7475 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7477 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7478 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7479 * extension.h (enum frame_filter_flag): Rename from
7481 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7482 (apply_ext_lang_frame_filter): Change type of "flags".
7483 * extension.c (apply_ext_lang_frame_filter): Change type of
7485 * extension-priv.h (struct extension_language_ops)
7486 <apply_frame_filter>: Change type of "flags".
7488 2018-02-26 Tom Tromey <tom@tromey.com>
7491 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7492 off-by-one in py_end computation.
7493 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7495 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7498 2018-02-26 Tom Tromey <tom@tromey.com>
7500 * dwarf2read.c (struct variant_field): New.
7501 (struct nextfield) <variant>: New field.
7502 (dwarf2_add_field): Handle DW_TAG_variant_part.
7503 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7504 discriminated union.
7505 (read_structure_type): Handle DW_TAG_variant_part.
7506 (handle_struct_member_die): New function, extracted from
7507 process_structure_scope. Handle DW_TAG_variant.
7508 (process_structure_scope): Handle discriminated unions. Call
7509 handle_struct_member_die.
7511 2018-02-26 Tom Tromey <tom@tromey.com>
7513 * rust-lang.h (rust_last_path_segment): Declare.
7514 * rust-lang.c (rust_last_path_segment): Now public. Change
7516 (struct disr_info): Remove.
7517 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7518 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7519 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7520 (rust_enum_p, rust_enum_variant): New function.
7521 (rust_underscore_fields): Remove "offset" parameter.
7522 (rust_print_enum): New function.
7523 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7524 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7525 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7527 (rust_internal_print_type): New function, from rust_print_type.
7529 (rust_print_type): Call rust_internal_print_type.
7530 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7531 Update enum handling.
7532 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7533 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7534 (rust_union_quirks): New functions.
7535 (process_full_comp_unit, process_full_type_unit): Call
7537 (process_structure_scope): Update rust_unions if necessary.
7539 2018-02-26 Tom Tromey <tom@tromey.com>
7541 * value.h (value_union_variant): Declare.
7542 * valops.c (value_union_variant): New function.
7543 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7544 (struct discriminant_info): New.
7545 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7547 (struct main_type) <flag_discriminated_union>: New field.
7549 2018-02-26 Tom Tromey <tom@tromey.com>
7551 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7552 unittests/unpack-selftests.c.
7553 * unittests/unpack-selftests.c: New file.
7554 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7556 2018-02-26 Yao Qi <yao.qi@linaro.org>
7558 * dwarf2read.c (struct partial_die_info) <read>: New method.
7559 (read_partial_die): Remove the declaration.
7560 (load_partial_dies): Update.
7561 (partial_die_info::partial_die_info):
7562 (read_partial_die): Change it to partial_die_info::read.
7564 2018-02-26 Yao Qi <yao.qi@linaro.org>
7566 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7567 (fixup_partial_die): Remove declaration.
7568 (scan_partial_symbols): Update.
7569 (partial_die_parent_scope): Likewise.
7570 (partial_die_full_name): Likewise.
7571 (fixup_partial_die): Change it to partial_die_info::fixup.
7573 2018-02-26 Yao Qi <yao.qi@linaro.org>
7575 * dwarf2read.c (read_partial_die): Update the declaration.
7576 (load_partial_dies): Caller update.
7577 (read_partial_die): Remove one argument abbrev_len.
7579 2018-02-26 Yao Qi <yao.qi@linaro.org>
7581 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7582 assignment operator.
7583 (load_partial_dies): Use ctor and copy ctor.
7584 (read_partial_die): Update.
7585 (dwarf2_cu::find_partial_die): Use ctor.
7587 2018-02-26 Yao Qi <yao.qi@linaro.org>
7589 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7590 (find_partial_die_in_comp_unit): Change it to
7591 dwarf2_cu::find_partial_die.
7592 (find_partial_die): Update.
7594 2018-02-26 Yao Qi <yao.qi@linaro.org>
7596 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7599 2018-02-26 Yao Qi <yao.qi@linaro.org>
7601 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7603 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7605 * arch/amd64.h: Use common/tdesc.h.
7606 * arch/i386.c: Likewise.
7607 * arch/i386.h: Likewise.
7608 * arch/tic6x.c: Likewise.
7609 * arch/tdesc.h: Move file from here...
7610 * common/tdesc.h: ...to here.
7611 * features/aarch64-core.c: Regenerate.
7612 * features/aarch64-fpu.c: Regenerate.
7613 * features/i386/32bit-avx.c: Regenerate.
7614 * features/i386/32bit-avx512.c: Regenerate.
7615 * features/i386/32bit-core.c: Regenerate.
7616 * features/i386/32bit-linux.c: Regenerate.
7617 * features/i386/32bit-mpx.c: Regenerate.
7618 * features/i386/32bit-pkeys.c: Regenerate.
7619 * features/i386/32bit-sse.c: Regenerate.
7620 * features/i386/64bit-avx.c: Regenerate.
7621 * features/i386/64bit-avx512.c: Regenerate.
7622 * features/i386/64bit-core.c: Regenerate.
7623 * features/i386/64bit-linux.c: Regenerate.
7624 * features/i386/64bit-mpx.c: Regenerate.
7625 * features/i386/64bit-pkeys.c: Regenerate.
7626 * features/i386/64bit-segments.c: Regenerate.
7627 * features/i386/64bit-sse.c: Regenerate.
7628 * features/i386/x32-core.c: Regenerate.
7629 * features/tic6x-c6xp.c: Regenerate.
7630 * features/tic6x-core.c: Regenerate.
7631 * features/tic6x-gp.c: Regenerate.
7632 * target-descriptions.c: Use common/tdesc.h.
7633 * target-descriptions.h: Likewise.
7635 2018-02-24 Tom Tromey <tom@tromey.com>
7637 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7638 (try_thread_db_load_from_dir, thread_db_load_search): Use
7640 (info_auto_load_libthread_db_compare): Return bool. Change
7642 (info_auto_load_libthread_db): Use std::vector, std::string.
7645 2018-02-24 Tom Tromey <tom@tromey.com>
7647 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7649 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7651 * gdbarch.c: Rebuild.
7652 * gdbarch.h: Rebuild.
7653 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7654 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7655 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7658 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7660 * gdbtypes.h (sect_offset): Change type to uint64_t.
7661 (sect_offset_str): New function.
7662 * dwarf2read.c (create_addrmap_from_aranges): Use
7664 (error_check_comp_unit_head): Likewise.
7665 (create_debug_type_hash_table): Likewise.
7666 (read_cutu_die_from_dwo): Likewise.
7667 (init_cutu_and_read_dies): Likewise.
7668 (init_cutu_and_read_dies_no_follow): Likewise.
7669 (process_psymtab_comp_unit_reader): Likewise.
7670 (partial_die_parent_scope): Likewise.
7671 (peek_die_abbrev): Likewise.
7672 (process_queue): Likewise.
7673 (dwarf2_physname): Likewise.
7674 (read_namespace_alias): Likewise.
7675 (read_import_statement): Likewise.
7676 (create_dwo_cu_reader): Likewise.
7677 (create_cus_hash_table): Likewise.
7678 (lookup_dwo_cutu): Likewise.
7679 (inherit_abstract_dies): Likewise.
7680 (read_func_scope): Likewise.
7681 (read_call_site_scope): Likewise.
7682 (dwarf2_add_member_fn): Likewise.
7683 (read_common_block): Likewise.
7684 (read_module_type): Likewise.
7685 (read_typedef): Likewise.
7686 (read_subrange_type): Likewise.
7687 (load_partial_dies): Likewise.
7688 (read_partial_die): Likewise.
7689 (find_partial_die): Likewise.
7690 (read_str_index): Likewise.
7691 (dwarf2_string_attr): Likewise.
7692 (build_error_marker_type): Likewise.
7693 (lookup_die_type): Likewise.
7694 (dump_die_shallow): Likewise.
7695 (follow_die_ref): Likewise.
7696 (dwarf2_fetch_die_loc_sect_off): Likewise.
7697 (dwarf2_fetch_constant_bytes): Likewise.
7698 (follow_die_sig): Likewise.
7699 (get_signatured_type): Likewise.
7700 (get_DW_AT_signature_type): Likewise.
7701 (dwarf2_find_containing_comp_unit): Likewise.
7702 (set_die_type): Likewise.
7704 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7706 * arch/aarch64.c: Include "common-defs.h".
7707 * arch/amd64.c: Likewise.
7708 * arch/i386.c: Likewise.
7710 2018-02-21 Tom Tromey <tom@tromey.com>
7712 * value.h: (extract_field_op): Update.
7713 * eval.c (extract_field_op): Return a const char *.
7714 * expression.h (parse_expression_for_completion): Update.
7715 * completer.c (complete_expression): Update.
7716 (add_struct_fields): Make fieldname const.
7717 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7718 (mark_completion_tag, parse_exp_in_context_1): Update.
7719 (parse_expression_for_completion): Change "name" to
7720 unique_xmalloc_ptr*.
7722 2018-02-21 Tom Tromey <tom@tromey.com>
7724 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7726 2018-02-21 Yao Qi <yao.qi@linaro.org>
7728 * avr-tdep.c (avr_read_pc): Change parameter type to
7730 * gdbarch.sh (read_pc): Likewise.
7731 * gdbarch.c: Re-generated.
7732 * gdbarch.h: Re-generated.
7733 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7735 * ia64-tdep.c (ia64_read_pc): Likewise.
7736 * mips-tdep.c (mips_read_pc): Likewise.
7737 * spu-tdep.c (spu_read_pc): Likewise.
7739 2018-02-21 Yao Qi <yao.qi@linaro.org>
7741 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7742 * regcache-dump.c: New file.
7743 * regcache.c: Move register_dump to regcache-dump.c.
7744 (maintenance_print_registers): Likewise.
7745 (maintenance_print_raw_registers): Likewise.
7746 (maintenance_print_cooked_registers): Likewise.
7747 (maintenance_print_register_groups): Likewise.
7748 (maintenance_print_remote_registers): Likewise.
7749 (_initialize_regcache): Likewise.
7750 * regcache.h (register_dump): Moved from regcache.c.
7752 2018-02-21 Yao Qi <yao.qi@linaro.org>
7754 * regcache.c (regcache::regcache): Update.
7755 (regcache::invalidate): Move it to detached_regcache::invalidate.
7756 (get_thread_arch_aspace_regcache): Update.
7757 (regcache::raw_update): Update.
7758 (regcache::cooked_read): Remove some code.
7759 (regcache::cooked_read_value): Likewise.
7760 (regcache::raw_write): Remove assert on m_readonly_p.
7761 (regcache::raw_supply_integer): Move it to
7762 detached_regcache::raw_supply_integer.
7763 (regcache::raw_supply_zeroed): Likewise.
7764 * regcache.h (detached_regcache) <raw_supply_integer>: New
7766 <raw_supply_zeroed, invalidate>: Likewise.
7767 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7768 <invalidate>: Likewise.
7769 <m_readonly_p>: Removed.
7771 2018-02-21 Yao Qi <yao.qi@linaro.org>
7773 * infcmd.c (get_return_value): Let stop_regs point to
7774 get_current_regcache.
7775 * regcache.c (regcache::regcache): Remove.
7776 (register_dump_reg_buffer): New class.
7777 (regcache_print): Adjust.
7778 * regcache.h (regcache): Remove constructors.
7780 2018-02-21 Yao Qi <yao.qi@linaro.org>
7782 * regcache.c (class register_dump): New class.
7783 (register_dump_regcache, register_dump_none): New class.
7784 (register_dump_remote, register_dump_groups): New class.
7785 (regcache_print): Update.
7786 * regcache.h (regcache_dump_what): Move it to regcache.c.
7787 (regcache) <dump>: Remove.
7789 2018-02-21 Yao Qi <yao.qi@linaro.org>
7791 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7793 (jit_unwind_reg_set_impl): Call raw_supply.
7794 (jit_frame_sniffer): Use reg_buffer_rw.
7795 * record-full.c (record_full_core_regbuf): Change its type.
7796 (record_full_core_open_1): Use reg_buffer_rw.
7797 (record_full_close): Likewise.
7798 (record_full_core_fetch_registers): Use regcache->raw_supply.
7799 (record_full_core_store_registers): Likewise.
7800 * regcache.c (regcache::get_register_status): Move it to
7802 (regcache_raw_set_cached_value): Remove.
7803 (regcache::raw_set_cached_value): Remove.
7804 (regcache::raw_write): Call raw_supply.
7805 (regcache::raw_supply): Move it to reg_buffer_rw.
7806 * regcache.h (regcache_raw_set_cached_value): Remove.
7807 (reg_buffer_rw): New class.
7809 2018-02-21 Yao Qi <yao.qi@linaro.org>
7811 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7812 readonly_detached_regcache.
7813 (dummy_frame_prev_register): Use regcache->cooked_read.
7814 * frame.c (frame_save_as_regcache): Change return type.
7815 (frame_pop): Update.
7816 * frame.h (frame_save_as_regcache): Update declaration.
7817 * inferior.h (get_infcall_suspend_state_regcache): Update
7819 * infrun.c (infcall_suspend_state) <registers>: use
7820 readonly_detached_regcache.
7821 (save_infcall_suspend_state): Don't use regcache_dup.
7822 (get_infcall_suspend_state_regcache): Change return type.
7823 * linux-fork.c (struct fork_info) <savedregs>: Change to
7824 readonly_detached_regcache.
7826 (fork_save_infrun_state): Don't use regcache_dup.
7827 (info_checkpoints_command): Adjust.
7828 * mi/mi-main.c (register_changed_p): Update declaration.
7829 (mi_cmd_data_list_changed_registers): Use
7830 readonly_detached_regcache.
7831 (register_changed_p): Change parameter type to
7832 readonly_detached_regcache.
7833 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7834 readonly_detached_regcache.
7835 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7836 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7838 (regcache::save): Move it to reg_buffer.
7839 (regcache::restore): Change parameter type.
7840 (regcache_dup): Remove.
7841 * regcache.h (reg_buffer) <save>: New method.
7842 (readonly_detached_regcache): New class.
7843 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7844 readonly_detached_regcache.
7845 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7847 2018-02-21 Yao Qi <yao.qi@linaro.org>
7849 * frame.c (frame_save_as_regcache): Use regcache method save.
7850 (frame_pop): Use regcache method restore.
7851 * infrun.c (restore_infcall_suspend_state): Likewise.
7852 * linux-fork.c (fork_load_infrun_state): Likewise.
7853 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7855 * regcache.c (regcache_save): Remove.
7856 (regcache::restore): More asserts.
7857 (regcache_cpy): Remove.
7858 * regcache.h (regcache_save): Remove the declaration.
7859 (regcache::restore): Move from private to public.
7860 Remove the friend declaration of regcache_cpy.
7861 (regcache_cpy): Remove declaration.
7863 2018-02-21 Yao Qi <yao.qi@linaro.org>
7865 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7866 parameter type to 'readable_regcache *'.
7867 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7868 * arm-tdep.c (arm_neon_quad_read): Likewise.
7869 (arm_pseudo_read): Likewise.
7870 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7871 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7872 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7873 * gdbarch.c: Re-generated.
7874 * gdbarch.h: Re-generated.
7875 * gdbarch.sh (pseudo_register_read): Change parameter type to
7876 'readable_regcache *'.
7877 (pseudo_register_read_value): Likewise.
7878 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7879 (h8300_pseudo_register_read): Likewise.
7880 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7881 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7882 (i386_pseudo_register_read_into_value): Likewise.
7883 (i386_pseudo_register_read_value): Likewise.
7884 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7886 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7887 * m32c-tdep.c (m32c_raw_read): Likewise.
7888 (m32c_read_flg): Likewise.
7889 (m32c_banked_register): Likewise.
7890 (m32c_banked_read): Likewise.
7891 (m32c_sb_read): Likewise.
7892 (m32c_part_read): Likewise.
7893 (m32c_cat_read): Likewise.
7894 (m32c_r3r2r1r0_read): Likewise.
7895 (m32c_pseudo_register_read): Likewise.
7896 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7897 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7898 (mep_pseudo_cr64_read): Likewise.
7899 (mep_pseudo_register_read): Likewise.
7900 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7901 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7902 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7903 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7904 (regcache::cooked_read): Likewise.
7905 (regcache::cooked_read_value): Likewise.
7906 (regcache_cooked_read_signed):
7907 (regcache::cooked_read): Likewise.
7908 * regcache.h (readable_regcache): New class.
7909 (regcache): Inherit readable_regcache. Move some methods to
7911 * rl78-tdep.c (rl78_pseudo_register_read): Change
7912 parameter type to 'readable_regcache *'.
7913 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7914 (e500_pseudo_register_read): Change parameter type to
7915 'readable_regcache *'.
7916 (dfp_pseudo_register_read): Likewise.
7917 (vsx_pseudo_register_read): Likewise.
7918 (efpr_pseudo_register_read): Likewise.
7919 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7920 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7921 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7922 (sh64_pseudo_register_read): Likewise.
7923 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7924 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7925 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7926 (spu_pseudo_register_read): Likewise.
7927 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7928 (xtensa_pseudo_register_read): Likewise.
7930 2018-02-21 Yao Qi <yao.qi@linaro.org>
7932 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7933 (regcache::arch): Move it to reg_buffer::arch.
7934 (regcache::register_buffer): Likewise.
7935 (regcache::assert_regnum): Likewise.
7936 (regcache::num_raw_registers): Likewise.
7937 * regcache.h (reg_buffer): New class.
7938 (regcache): Inherit reg_buffer.
7940 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7942 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7943 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7945 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7947 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7949 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7951 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7952 (SFILES): Remove common/*.c files.
7953 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7954 * common/common.host: Add common reference.
7955 * configure.ac: Likewise.
7956 * configure: Regenerate.
7958 2018-02-16 Yao Qi <yao.qi@linaro.org>
7960 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7961 (block_initialize_namespace): Use new.
7962 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7963 (dwarf2_free_objfile): Use delete.
7964 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7965 (copy_type_recursive): Use new.
7966 * gdb_obstack.h (allocate_on_obstack): New.
7968 2018-02-15 Yao Qi <yao.qi@linaro.org>
7971 * inferior.c (exit_inferior_1): Reset inf->control.
7973 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7975 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7978 2018-02-14 Pedro Alves <palves@redhat.com>
7980 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7981 frame_cleanup_after_sniffer on exception.
7983 2018-02-14 Tom Tromey <tom@tromey.com>
7985 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7987 (solib_bfd_open): Make pathname const.
7988 * solib.c (solib_bfd_open): Make pathname const.
7989 * solib-spu.c (spu_bfd_fopen): Make name const.
7990 (spu_bfd_open): Make pathname const.
7991 * solib-darwin.c (darwin_bfd_open): Make pathname const.
7992 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7994 2018-02-14 Tom Tromey <tom@tromey.com>
7996 * symfile.c (symfile_bfd_open): Update.
7997 * source.h (openp, source_full_path_of, find_and_open_source):
7998 Change argument type to unique_xmalloc_ptr.
7999 * source.c (openp): Take a unique_xmalloc_ptr.
8000 (source_full_path_of, find_and_open_source): Likewise.
8001 (open_source_file, symtab_to_fullname): Update.
8002 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8004 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8005 (exec_file_find): Update.
8006 * psymtab.c (psymtab_to_fullname): Update.
8007 * nto-tdep.h (nto_find_and_open_solib): Update.
8008 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8010 * exec.c (exec_file_attach): Update.
8011 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8012 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8014 2018-02-14 Tom Tromey <tom@tromey.com>
8016 * solib.c: Include source.h.
8017 * nto-tdep.c: Include source.h.
8018 * mi/mi-cmd-env.c: Include source.h.
8019 * infcmd.c: Include source.h.
8020 * exec.c: Include source.h.
8021 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8022 (add_path, directory_switch, source_path, init_source_path): Move
8024 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8025 (add_path, directory_switch, source_path, init_source_path):
8028 2018-02-14 Tom Tromey <tom@tromey.com>
8030 * solist.h (exec_file_find, solib_find): Return
8032 (solib_bfd_fopen): Take a const char *.
8033 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8034 (exec_file_find, solib_find): Likewise.
8035 (solib_bfd_fopen): Do not take ownership of "pathname".
8036 (solib_bfd_open): Use unique_xmalloc_ptr.
8037 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8038 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8039 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8040 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8042 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8044 * ada-lang.c (name_match_type_from_name): Remove reference to
8045 ada_name_for_lookup in function's documentation.
8046 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8048 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8050 * defs.h (enum openp_flags): New enum.
8051 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8052 Move to enum openp_flags.
8053 (openp_flags): New enum flags.
8054 (openp): Change parameter type to openp_flags.
8055 * source.c (openp): Change parameter type to openp_flags.
8056 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8057 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8059 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8061 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8064 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8066 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8068 (class dwarf2_queue_guard): ...the destructor of this new class.
8069 (dw2_do_instantiate_symtab): Create instance of the new class
8070 dwarf2_queue_guard, remove cleanup.
8072 2018-02-09 Tom Tromey <tom@tromey.com>
8074 * source.c (find_source_lines): Don't reference past the end of
8077 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8079 * remote.c (remote_btrace_maybe_reopen): Change error message.
8080 * btrace.c (btrace_enable): Likewise.
8081 (parse_xml_btrace): Likewise.
8082 (parse_xml_btrace_conf): Likewise.
8084 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8086 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8087 (linux_enable_pt, linux_enable_bts): Call
8088 diagnose_perf_event_open_fail.
8090 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8092 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8093 Remove parameter and change return type. Update callers. Move it.
8094 (linux_enable_bts, linux_enable_pt): Improve error message.
8095 (linux_enable_pt): Remove zero buffer size check.
8096 (linux_enable_btrace): Improve error messages. Remove NULL return
8099 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8101 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8102 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8103 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8104 (linux_supports_pt, linux_supports_btrace): Remove.
8105 (linux_enable_bts): Call cpu_supports_bts.
8106 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8107 * remote.c (remote_supports_btrace): Remove.
8108 (init_remote_ops): Remove remote_supports_btrace.
8109 * target-delegates.c: Regenerated.
8110 * target.c (target_supports_btrace): Remove.
8111 * target.h (target_ops) <to_supports_btrace>: Remove
8112 (target_supports_btrace): Remove.
8113 * x86-linux-nat.c (x86_linux_create_target): Remove
8114 linux_supports_btrace.
8116 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8118 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8120 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8121 exception and use message in own exception.
8123 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8125 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8126 (perf_event_pt_event_type): Use gdb_file_up.
8127 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8128 scoped_fd, and scoped_mmap.
8130 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8132 * common/scoped_mmap.h: New.
8133 * unittests/scoped_mmap-selftest.c: New.
8134 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8135 unittests/scoped_mmap-selftest.c.
8137 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8139 * common/scoped_fd.h: New.
8140 * unittests/scoped_fd-selftest.c: New.
8141 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8142 unittests/scoped_fd-selftest.c.
8144 2018-02-09 Tom Tromey <tom@tromey.com>
8146 * auto-load.c (auto_load_section_scripts): Use
8147 gdb::unique_xmalloc_ptr.
8149 2018-02-09 Tom Tromey <tom@tromey.com>
8151 * auto-load.c (execute_script_contents): Use std::string.
8153 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8155 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8156 Python function, rather than a new command.
8158 2018-02-08 Tom Tromey <tom@tromey.com>
8160 * solib.c (solib_find_1): Use std::string.
8161 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8163 2018-02-08 Tom Tromey <tom@tromey.com>
8165 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8167 2018-02-08 Tom Tromey <tom@tromey.com>
8169 * source.c (find_source_lines): Use gdb::def_vector.
8171 2018-02-08 Tom Tromey <tom@tromey.com>
8173 * macrocmd.c (struct temporary_macro_definition): New.
8174 (macro_define_command): Use temporary_macro_definition. Remove
8176 (free_macro_definition_ptr): Remove.
8178 2018-02-08 Tom Tromey <tom@tromey.com>
8180 * macroexp.c (maybe_expand): Use std::string.
8182 2018-02-08 Tom Tromey <tom@tromey.com>
8184 * macroexp.c (struct macro_buffer): Add initializers for some
8186 (init_buffer, init_shared_buffer, free_buffer)
8187 (free_buffer_return_text): Remove.
8188 (macro_buffer): New constructors.
8189 (~macro_buffer): New destructor.
8190 (macro_buffer::set_shared): New method.
8191 (macro_buffer::resize_buffer, macro_buffer::appendc)
8192 (macro_buffer::appendmem): Now methods, not free functions.
8193 (set_token, append_tokens_without_splicing, stringify)
8194 (macro_stringify): Update.
8195 (gather_arguments): Change return type. Remove argc_p argument,
8196 add args_ptr argument. Use std::vector.
8197 (substitute_args): Remove argc argument. Accept std::vector.
8198 (expand): Update. Use std::vector.
8199 (scan, macro_expand, macro_expand_next): Update.
8201 2018-02-08 Tom Tromey <tom@tromey.com>
8203 * symtab.c (default_collect_symbol_completion_matches_break_on):
8204 Use unique_xmalloc_ptr.
8205 * macroscope.h: (sal_macro_scope, user_macro_scope)
8206 (default_macro_scope): Return unique_xmalloc_ptr.
8207 * macroscope.c (sal_macro_scope, user_macro_scope)
8208 (default_macro_scope): Return unique_xmalloc_ptr.
8209 * macroexp.h (macro_expand, macro_expand_once): Return
8211 * macroexp.c (macro_expand, macro_expand_once): Return
8213 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8214 (info_macro_command, info_macros_command): Use
8216 * compile/compile-c-support.c (write_macro_definitions): Use
8218 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8220 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8222 * value.c (value_static_field): Assign field type instead of
8223 containing type when returning an optimized out value.
8225 2018-02-06 Yao Qi <yao.qi@linaro.org>
8227 * ft32-tdep.c (ft32_read_pc): Remove.
8228 (ft32_write_pc): Remove.
8229 (ft32_gdbarch_init): Update.
8230 * m32r-tdep.c (m32r_read_pc): Remove.
8231 (m32r_gdbarch_init): Update.
8232 * mep-tdep.c (mep_read_pc): Remove.
8233 (mep_gdbarch_init): Update.
8234 * microblaze-tdep.c (microblaze_write_pc): Remove.
8235 (microblaze_gdbarch_init): Update.
8236 * mn10300-tdep.c (mn10300_read_pc): Remove.
8237 (mn10300_write_pc): Remove.
8238 (mn10300_gdbarch_init): Update.
8239 * moxie-tdep.c (moxie_read_pc): Remove.
8240 (moxie_write_pc): Remove.
8241 (moxie_gdbarch_init): Update.
8243 2018-02-06 Yao Qi <yao.qi@linaro.org>
8245 * expprint.c (print_subexp_standard): Handle
8246 OP_F77_UNDETERMINED_ARGLIST.
8247 (dump_subexp_body_standard): Likewise.
8249 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8251 * target-descriptions.c (tdesc_element_visitor) Add empty
8253 (tdesc_type): Move make_gdb_type from here.
8254 (tdesc_type_builtin): Likewise.
8255 (tdesc_type_vector): Likewise.
8256 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8257 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8258 (make_gdb_type_union): Likewise.
8259 (make_gdb_type_flags): Likewise.
8260 (make_gdb_type_enum): Likewise.
8261 (make_gdb_type): New function.
8262 (tdesc_register_type): Use static make_gdb_type.
8264 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8266 * infcmd.c (default_print_one_register_info): Align natural-format
8267 column values consistently one under another.
8268 (pad_to_column): New function.
8270 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8272 * dwarf2read.c (dwarf2_physname): Move commment.
8274 2018-02-01 Leszek Swirski <leszeks@google.com>
8276 * varobj.c (varobj_formatted_print_options): Allow recursive
8277 pretty printing if pretty printing is enabled.
8279 2018-02-01 Leszek Swirski <leszeks@google.com>
8281 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8282 names after a structop as a filename.
8284 2018-02-01 Yao Qi <yao.qi@linaro.org>
8286 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8287 (arm_record_coproc_data_proc): Likewise.
8289 2018-02-01 Yao Qi <yao.qi@linaro.org>
8291 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8293 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8295 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8296 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8298 2018-01-31 Pedro Alves <palves@redhat.com>
8300 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8301 * inflow.c (child_terminal_save_inferior): Wrap reference to
8302 tcgetpgrp in HAVE_TERMIOS_H.
8303 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8305 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8306 always iterate over all inferiors.
8307 (gdbsim_cntrl_c): Adjust.
8308 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8310 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8312 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8313 index type is objfile-owned if the element type is as well.
8315 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8319 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8321 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8322 "features/s390x-linux64.c".
8323 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8324 s390_linux32 and s390x_linux64.
8325 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8327 * s390-tdep.c: Include "features/s390-linux32.c" and
8328 "features/s390x-linux64.c".
8329 (s390_tdesc_valid): Add check for tdesc_has_registers.
8330 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8331 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8332 tdesc_s390x_linux64.
8333 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8334 tdesc_s390x_linux64 to...
8335 * s390-tdep.h: ...here.
8337 2018-01-30 Pedro Alves <palves@redhat.com>
8340 * config.in, configure: Regenerate.
8341 * configure.ac: Check for getpgid.
8342 * go32-nat.c (go32_pass_ctrlc): New.
8343 (go32_target): Install it.
8344 * inf-child.c (inf_child_target): Install
8345 child_terminal_save_inferior, child_pass_ctrlc and
8347 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8348 (inf_ptrace_target): No longer install it.
8349 * infcmd.c (interrupt_target_1): Adjust.
8350 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8351 (child_interrupt): Declare.
8352 (inferior::terminal_state): New.
8353 * inflow.c (struct terminal_info): Update comments.
8354 (inferior_process_group): Delete.
8355 (terminal_is_ours): Delete.
8356 (gdb_tty_state): New.
8357 (child_terminal_init): Adjust.
8358 (is_gdb_terminal, sharing_input_terminal_1)
8359 (sharing_input_terminal): New functions.
8360 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8361 Set the process's actual process group in the foreground if
8362 possible. Handle is_ours_for_output/is_ours distinction. Don't
8363 mark terminal as the inferior's if not sharing GDB's terminal.
8364 Don't check attach_flag.
8365 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8366 pass down a target_terminal_state.
8367 (child_terminal_save_inferior): New, factored out from ...
8368 (child_terminal_ours_1): ... this. Handle
8369 target_terminal_state::is_ours_for_output.
8370 (child_interrupt, child_pass_ctrlc): New.
8371 (inflow_inferior_exit): Clear the inferior's terminal_state.
8372 (copy_terminal_info): Copy the inferior's terminal state.
8373 (_initialize_inflow): Remove reference to terminal_is_ours.
8374 * inflow.h (inferior_process_group): Delete.
8375 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8376 * procfs.c (procfs_target): Don't install procfs_interrupt.
8377 (procfs_interrupt): Delete.
8378 * remote.c (remote_serial_quit_handler): Adjust.
8379 (remote_interrupt): Remove ptid parameter. Adjust.
8380 * target-delegates.c: Regenerate.
8381 * target.c: Include "terminal.h".
8382 (target_terminal::terminal_state): Rename to ...
8383 (target_terminal::m_terminal_state): ... this.
8384 (target_terminal::init): Adjust.
8385 (target_terminal::inferior): Adjust to per-inferior
8387 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8388 (target_terminal::ours, target_terminal::ours_for_output): Use
8389 target_terminal_is_ours_kind.
8390 (target_interrupt): Remove ptid parameter. Adjust.
8391 (default_target_pass_ctrlc): Adjust.
8392 * target.h (target_ops::to_terminal_save_inferior): New field.
8393 (target_ops::to_interrupt): Remove ptid_t parameter.
8394 (target_interrupt): Remove ptid_t parameter. Update comment.
8395 (target_pass_ctrlc): Update comment.
8396 * target/target.h (target_terminal_state): New scoped enum,
8398 (target_terminal::terminal_state): ... here.
8399 (target_terminal::inferior): Update comments.
8400 (target_terminal::restore_inferior): New.
8401 (target_terminal::is_inferior, target_terminal::is_ours)
8402 (target_terminal::is_ours_for_output): Adjust.
8403 (target_terminal::scoped_restore_terminal_state): Adjust to
8404 rename, and call restore_inferior() instead of inferior().
8405 (target_terminal::scoped_restore_terminal_state::m_state): Change
8407 (target_terminal::terminal_state): Rename to ...
8408 (target_terminal::m_terminal_state): ... this and change type.
8410 2018-01-30 Pedro Alves <palves@redhat.com>
8412 * linux-nat.c (wait_for_signal): New function.
8413 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8415 (async_terminal_is_ours)
8416 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8417 (linux_nat_add_target): Don't override
8418 to_terminal_inferior/to_terminal_ours.
8420 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8422 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8424 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8426 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8427 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8428 dwarf2_per_objfile_free here.
8429 (dwarf2_per_objfile_free): Remove.
8430 (_initialize_dwarf2_read): Don't register
8431 dwarf2_per_objfile_free as a registry cleanup.
8433 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8435 Avoid compilation errors in MinGW native builds
8437 The error is triggered by including python-internal.h, and the
8440 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8441 from build-gnulib/import/math.h:27,
8442 from d:/usr/Python26/include/pyport.h:235,
8443 from d:/usr/Python26/include/Python.h:58,
8444 from python/python-internal.h:94,
8445 from python/py-arch.c:24:
8446 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8450 This happens because Python headers define 'hypot' to expand t
8451 '_hypot' in the Windows builds.
8452 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8453 'hypoth'. This avoids a compilation error.
8455 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8457 * MAINTAINERS (Write After Approval): Fix ordering.
8459 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8461 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8463 2018-01-26 Alan Modra <amodra@gmail.com>
8465 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8466 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8467 Remove nop. Make const. Comment.
8468 (powerpc32_plt_stub_so_2): New.
8469 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8470 Correct count. Update uses.
8471 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8472 Move common code reading PLT entry word. Correct
8473 powerpc32_plt_stub PLT address calculation.
8474 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8475 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8476 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8477 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8478 (ppc64_standard_linkage8): Likewise.
8479 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8480 Correct insns description.
8481 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8483 2018-01-24 Pedro Alves <palves@redhat.com>
8485 GCC PR libstdc++/83906
8486 * gdbtypes.c (operator==(const dynamic_prop &,
8487 const dynamic_prop &)): New.
8488 (operator==(const range_bounds &, const range_bounds &)): New.
8489 (check_types_equal): Use them instead of memcmp.
8490 * gdbtypes.h (operator==(const dynamic_prop &,
8491 const dynamic_prop &)): Declare.
8492 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8493 (operator==(const range_bounds &, const range_bounds &)): Declare.
8494 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8496 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8498 * s390-linux-tdep.c (s390_record_address_mask)
8499 (s390_record_calc_disp_common, s390_record_calc_disp)
8500 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8501 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8502 (s390_process_record): Move to s390-tdep.c.
8503 (s390_linux_init_abi_any): Adjust.
8504 * s390-tdep.c (s390_record_address_mask)
8505 (s390_record_calc_disp_common, s390_record_calc_disp)
8506 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8507 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8508 (s390_process_record): Moved from s390-linux-tdep.c
8509 (s390_gdbarch_init): Adjust.
8511 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8513 * s390-linux-nat.c (s390-tdep.h): New include.
8514 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8515 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8516 (ALLDEPFILES): Add s390-tdep.c.
8517 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8518 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8519 * s390-tdep.h: ...this. New file.
8520 * s390-linux-tdep.c (s390-tdep.h): New include.
8521 (_initialize_s390_tdep): Rename to...
8522 (_initialize_s390_linux_tdep): ...this and adjust.
8523 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8524 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8526 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8527 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8528 (s390_is_partial_instruction, s390_software_single_step)
8529 (is_non_branch_ril, s390_displaced_step_copy_insn)
8530 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8531 (s390_prologue_data, s390_addr, s390_store, s390_load)
8532 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8533 (s390_register_call_saved, s390_guess_tracepoint_registers)
8534 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8535 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8536 (s390_pseudo_register_name, s390_pseudo_register_type)
8537 (s390_pseudo_register_read, s390_pseudo_register_write)
8538 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8539 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8540 (s390_addr_bits_remove, s390_address_class_type_flags)
8541 (s390_address_class_type_flags_to_name)
8542 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8543 (s390_function_arg_float, s390_function_arg_vector)
8544 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8545 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8546 (s390_frame_align, s390_register_return_value, s390_return_value)
8547 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8548 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8549 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8550 (s390_trad_frame_prev_register, s390_unwind_cache)
8551 (s390_prologue_frame_unwind_cache)
8552 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8553 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8554 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8555 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8556 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8557 (s390_frame_base_address, s390_local_base_address)
8558 (s390_frame_base, s390_gcc_target_options)
8559 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8560 (s390_validate_reg_range, s390_tdesc_valid)
8561 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8562 * s390-tdep.c: ...this. New file.
8564 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8566 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8567 (s390_process_record, s390_gdbarch_tdep_alloc)
8568 (s390_linux_init_abi_any): Use/set new hook.
8570 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8572 * s390-linux-tdep.c (osabi.h): New include.
8573 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8574 (s390_linux_init_abi_any): New functions.
8575 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8577 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8579 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8580 tdesc_has_registers check
8582 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8584 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8585 (s390_validate_reg_range): New macro.
8586 (s390_gdbarch_init): Adjust.
8588 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8590 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8591 (s390_gdbarch_tdep_alloc): Adjust.
8592 (s390_gdbarch_init): Adjust.
8594 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8596 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8597 <have_tdb>: Change type to bool.
8598 (s390_gdbarch_tdep_alloc): Adjust.
8599 (s390_gdbarch_init): Adjust.
8601 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8603 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8604 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8605 (s390_gdbarch_tdep_alloc): New function.
8606 (s390_gdbarch_init): Allocate tdep at start and use its fields
8607 instead of separate variables.
8609 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8611 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8612 when looking for cached gdbarch and add comment for remaining.
8614 2018-01-22 Pedro Alves <palves@redhat.com>
8615 Sergio Durigan Junior <sergiodj@redhat.com>
8617 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8620 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8622 * MAINTAINERS: Update my company e-mail address.
8624 2018-01-22 Yao Qi <yao.qi@linaro.org>
8626 * regcache.c (cooked_write_test): New function.
8627 (_initialize_regcache): Register the test.
8629 2018-01-22 Yao Qi <yao.qi@linaro.org>
8631 * ia64-tdep.c (ia64_pseudo_register_read): Call
8632 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8633 * m32c-tdep.c (m32c_cat_read): Likewise.
8634 (m32c_r3r2r1r0_read): Likewise.
8635 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8636 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8638 2018-01-22 Yao Qi <yao.qi@linaro.org>
8640 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8641 method raw_read instead of regcache_raw_read.
8642 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8643 * arm-tdep.c (arm_neon_quad_read): Likewise.
8644 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8645 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8646 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8647 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8648 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8649 (i386_pseudo_register_read_into_value): Likewise.
8650 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8651 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8652 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8653 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8654 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8655 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8656 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8657 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8658 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8660 2018-01-22 Yao Qi <yao.qi@linaro.org>
8662 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8663 * configure.tgt: Remove target mt.
8664 * mt-tdep.c: Remove.
8665 * regcache.c (cooked_read_test): Remove the check for mt.
8667 2018-01-22 Yao Qi <yao.qi@linaro.org>
8669 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8670 instead of gdbarch_pseudo_register_read_value.
8672 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8674 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8677 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8679 * linespec.c (create_sals_line_offset): Remove code that preserved
8680 the symtab_and_line's line number.
8682 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8684 * varobj.c (varobj_create): Don't set valid_block when creating a
8687 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8689 * varobj.c (varobj_create): Remove out of date comment.
8691 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8694 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8695 updating innermost block.
8696 * parse.c (innermost_block_tracker::update): Take extra type
8697 parameter, and check types match before updating innermost block.
8698 (write_dollar_variable): Update innermost block for registers.
8699 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8700 (innermost_block_tracker::innermost_block_tracker): Initialise
8702 (innermost_block_tracker::reset): Take type parameter.
8703 (innermost_block_tracker::update): Take type parameter, and pass
8704 type through as needed.
8705 (innermost_block_tracker::m_types): New member.
8706 * varobj.c (varobj_create): Pass type when reseting innermost
8709 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8711 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8712 * ada-lang.c (resolve_subexp): Likewise.
8713 * breakpoint.c (set_breakpoint_condition) Likewise.
8714 (watch_command_1) Likewise.
8715 * c-exp.y (variable): Likewise.
8716 * d-exp.y (PrimaryExpression): Likewise.
8717 * f-exp.y (variable): Likewise.
8718 * go-exp.y (variable): Likewise.
8719 * m2-exp.y (variable): Likewise.
8720 * objfiles.c (objfile::~objfile): Likewise.
8721 * p-exp.y (variable): Likewise.
8722 * parse.c (innermost_block): Change type.
8723 * parser-defs.h (class innermost_block_tracker): New.
8724 (innermost_block): Change to innermost_block_tracker.
8725 * printcmd.c (display_command): Switch to innermost_block API.
8726 (do_one_display): Likewise.
8727 * rust-exp.y (do_one_display): Likewise.
8728 * symfile.c (clear_symtab_users): Likewise.
8729 * varobj.c (varobj_create): Switch to innermost_block API, replace
8730 use of innermost_block with block stored on varobj object.
8732 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8734 * expression.h (innermost_block): Remove declaration.
8735 * varobj.c: Add 'parser-defs.h' include.
8737 2018-01-19 Tom Tromey <tom@tromey.com>
8739 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8740 symbols in the static and global blocks.
8742 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8744 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8745 gdb_ptrace.h, and move including gdb_wait.h ...
8746 * nat/linux-ptrace.h: ... to here.
8748 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8750 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8751 inf_ptrace_detach_success.
8752 (inf_ptrace_detach_success): Add inferior parameter, use it
8753 instead of inferior_ptid, pass it to detach_inferior.
8754 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8756 * inferior.c (detach_inferior): Add overload that takes an
8758 * inferior.h (detach_inferior): Likewise.
8759 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8760 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8761 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8763 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8765 * target.h (struct target_ops) <to_detach>: Add inferior
8767 (target_detach): Likewise.
8768 * target.c (dispose_inferior): Pass inferior down.
8769 (target_detach): Pass inferior down. Assert that it is equal to
8770 the current inferior.
8771 * aix-thread.c (aix_thread_detach): Pass inferior down.
8772 * corefile.c (core_file_command): Pass current_inferior() down.
8773 * corelow.c (core_detach): Add inferior parameter.
8774 * darwin-nat.c (darwin_detach): Likewise.
8775 * gnu-nat.c (gnu_detach): Likewise.
8776 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8777 * infcmd.c (detach_command): Pass current_inferior() down to
8779 * infrun.c (follow_fork_inferior): Pass parent_inf to
8781 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8783 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8784 * linux-thread-db.c (thread_db_detach): Likewise.
8785 * nto-procfs.c (procfs_detach): Likewise.
8786 * procfs.c (procfs_detach): Likewise.
8787 * record.c (record_detach): Likewise.
8788 * record.h (struct inferior): Forward-declare.
8789 (record_detach): Add inferior parameter.
8790 * remote-sim.c (gdbsim_detach): Likewise.
8791 * remote.c (remote_detach_1): Likewise.
8792 (remote_detach): Likewise.
8793 (extended_remote_detach): Likewise.
8794 * sol-thread.c (sol_thread_detach): Likewise.
8795 * target-debug.h (target_debug_print_inferior_p): New macro.
8796 * target-delegates.c: Re-generate.
8797 * top.c (kill_or_detach): Pass inferior down to target_detach.
8798 * windows-nat.c (windows_detach): Add inferior parameter.
8800 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8802 * target.h (struct target_ops) <to_detach>: Remove args
8804 (target_detach): Likewise.
8805 * target.c (dispose_inferior): Adjust.
8806 (target_detach): Remove args parameter, adjust.
8807 * aix-thread.c (aix_thread_detach): Adjust.
8808 * corefile.c (core_file_command): Adjust.
8809 * corelow.c (core_detach): Adjust.
8810 * darwin-nat.c (darwin_detach): Adjust.
8811 * gnu-nat.c (gnu_detach): Adjust.
8812 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8813 * infcmd.c (detach_command): Adjust
8814 * infrun.c (follow_fork_inferior): Adjust.
8815 (handle_vfork_child_exec_or_exit): Adjust.
8816 * linux-fork.c (linux_fork_detach): Remove args parameter.
8817 * linux-fork.h (linux_fork_detach): Likewise.
8818 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8819 * linux-thread-db.c (thread_db_detach): Likewise.
8820 * nto-procfs.c (procfs_detach): Likewise.
8821 * procfs.c (procfs_detach): Likewise.
8822 (do_detach): Remove signo parameter.
8823 * record.c (record_detach): Remove args parameter.
8824 * record.h (record_detach): Likewise.
8825 * remote-sim.c (gdbsim_detach): Likewise.
8826 * remote.c (remote_detach_1): Likewise.
8827 (remote_detach): Likewise.
8828 (extended_remote_detach): Likewise.
8829 * sol-thread.c (sol_thread_detach): Likewise.
8830 * target-delegates.c: Re-generate.
8831 * top.c (struct qt_args) <args>: Remove field.
8832 (kill_or_detach): Don't pass args.
8833 (quit_force): Don't set args.
8834 * windows-nat.c (windows_detach): Remove args parameter.
8836 2018-01-19 Yao Qi <yao.qi@linaro.org>
8838 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8839 (arm_linux_init_abi): Install it.
8841 2018-01-19 Yao Qi <yao.qi@linaro.org>
8843 * osabi.c (gdb_osabi_names): Extend the regexp for
8844 arm-linux-gnueabihf.
8846 2018-01-18 Yao Qi <yao.qi@linaro.org>
8848 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8850 (abbrev_table::add_abbrev): Update.
8851 (abbrev_table::lookup_abbrev): Update.
8853 2018-01-18 Yao Qi <yao.qi@linaro.org>
8855 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8857 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8859 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8862 2018-01-17 Tom Tromey <tom@tromey.com>
8864 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8866 2018-01-17 Tom Tromey <tom@tromey.com>
8868 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8869 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8870 (create_array_type_with_stride): Update.
8871 * dwarf2read.c (set_die_type): Update.
8873 2018-01-17 Tom Tromey <tom@tromey.com>
8875 * dwarf2read.c (delayed_method_info): Remove typedef.
8876 (dwarf2_cu::method_info): Now a std::vector.
8877 (add_to_method_list): Update.
8878 (free_delayed_list): Remove.
8879 (compute_delayed_physnames): Update.
8880 (process_full_comp_unit, process_full_type_unit): Clear the method
8881 list. Remove cleanups.
8882 (psymtab_include_file_name): Add name_holder parameter. Use
8884 (dwarf_decode_lines): Update.
8886 2018-01-17 Tom Tromey <tom@tromey.com>
8887 Simon Marchi <simon.marchi@ericsson.com>
8889 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8890 (dwarf2_per_objfile::free_cached_comp_units)
8891 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8892 (init_cutu_and_read_dies_no_follow): Update.
8893 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8894 (dwarf2_cu::~dwarf2_cu): New.
8895 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8896 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8898 2018-01-17 Tom Tromey <tom@tromey.com>
8899 Simon Marchi <simon.marchi@ericsson.com>
8901 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8902 (struct die_reader_specs) <abbrev_table>: New member.
8903 (struct abbrev_table): Add constructor.
8904 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8905 <abbrev_obstack>: Now an auto_obstack.
8906 (abbrev_table_up): New typedef.
8907 (init_cu_die_reader): Add abbrev_table parameter.
8908 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8909 Add result_dwo_abbrev_table.
8910 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8911 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8913 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8915 (skip_children): Update.
8916 (abbrev_table::alloc_abbrev): Rename from
8917 abbrev_table_alloc_abbrev.
8918 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8919 (abbrev_table::lookup_abbrev): Rename from
8920 abbrev_table_lookup_abbrev.
8921 (abbrev_table_read_table): Return abbrev_table_up.
8922 (abbrev_table_free, abbrev_table_free_cleanup)
8923 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8924 (load_partial_dies): Update.
8926 2018-01-17 Tom Tromey <tom@tromey.com>
8928 * dwarf2read.c (dwarf2_compute_name): Update comment.
8929 (read_func_scope, read_variable): Update.
8930 (new_symbol): Remove.
8931 (new_symbol_full): Rename to new_symbol.
8933 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8936 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8937 a warning instead of throwing an error, set section size to 0 and return
8939 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8941 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8943 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8945 (linux_ptrace_attach_fail_reason_string): Likewise.
8946 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8948 (linux_ptrace_attach_fail_reason_string): Likewise.
8949 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8951 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8953 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8955 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8958 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8959 checking for fs_base/gs_base fields in struct user_regs_struct.
8960 * configure: Regenerate.
8962 2018-01-17 Yao Qi <yao.qi@linaro.org>
8964 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8966 (aarch64_linux_init_abi): Install it to gdbarch hook
8969 2018-01-15 Pedro Alves <palves@redhat.com>
8971 * common/signals-state-save-restore.c
8972 (save_original_signals_state): Fix typos.
8974 2017-01-12 Tom Tromey <tom@tromey.com>
8975 Sergio Durigan Junior <sergiodj@redhat.com>
8977 * Makefile.in (install-only): Install gdb-add-index.
8979 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8981 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8983 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8985 * infrun.c (keep_going_pass_signal): Clear step-over info when
8986 insert_breakpoints fails.
8988 2018-01-11 Pedro Alves <palves@redhat.com>
8991 * infrun.c (resume): Rename to ...
8992 (resume_1): ... this.
8993 (resume): Reimplement as wrapper around resume_1.
8995 2018-01-11 Pedro Alves <palves@redhat.com>
8998 * remote.c (remote_parse_stop_reply): Default to the last-set
8999 general thread instead of to 'magic_null_ptid'.
9001 2018-01-10 Pedro Alves <palves@redhat.com>
9003 * language.h (language_get_symbol_name_matcher): Rename ...
9004 (get_symbol_name_matcher): ... this.
9005 * language.c (language_get_symbol_name_matcher): Ditto.
9006 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9009 2018-01-10 Pedro Alves <palves@redhat.com>
9013 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9014 Adjust to use language_get_symbol_name_matcher instead of
9015 language_defn::la_get_symbol_name_matcher.
9016 * language.c (language_get_symbol_name_matcher): If in Ada mode
9017 and the lookup name is a verbatim match, return Ada's matcher.
9018 * language.h (language_get_symbol_name_matcher): Adjust comment.
9019 (ada_lookup_name_info::verbatim_p):: New method.
9021 2018-01-10 Pedro Alves <palves@redhat.com>
9024 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9025 minsym's language is language_auto or language_cplus, pass down
9026 language_ada instead.
9027 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9029 2018-01-10 Pedro Alves <palves@redhat.com>
9032 * minsyms.c (linkage_name_str): New function.
9033 (iterate_over_minimal_symbols): Use it.
9035 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9037 * NEWS: Document that 'info proc' now works on FreeBSD.
9039 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9041 * configure.ac: Check for kinfo_getfile in libutil.
9042 * configure: Regenerate.
9043 * config.in: Regenerate.
9044 * fbsd-nat.c: Include "fbsd-tdep.h".
9045 (fbsd_fetch_cmdline): New.
9046 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9047 rather than calling error.
9048 (fbsd_info_proc): New.
9049 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9050 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9051 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9053 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9055 * fbsd-nat.c (struct free_deleter): Remove.
9056 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9058 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9060 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9061 NULL for an empty pathname.
9063 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9065 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9066 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9067 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9068 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9069 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9070 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9071 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9072 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9073 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9074 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9075 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9076 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9077 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9078 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9079 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9081 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9083 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9084 (gnu_xfer_auxv): New function.
9085 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9088 2018-01-08 Yao Qi <yao.qi@linaro.org>
9089 Simon Marchi <simon.marchi@ericsson.com>
9091 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9093 (COMMON_OBS): Remove selftest.o.
9094 * configure.ac: Append selftest-arch.c and common/selftest.c to
9095 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9096 * configure: Re-generated.
9097 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9099 (maintenance_info_selftests): Likewise.
9101 2018-01-08 Xavier Roirand <roirand@adacore.com>
9103 * ada-valprint.c (val_print_packed_array_elements): Use
9104 proper number of elements when printing an array indexed
9105 by an enumeration type.
9107 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9109 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9110 (dw2_get_file_names_reader): Adjust.
9111 (lookup_dwo_signatured_type): Adjust.
9112 (lookup_dwp_signatured_type): Adjust.
9113 (lookup_signatured_type): Adjust.
9114 (create_type_unit_group): Adjust.
9115 (get_type_unit_group): Adjust.
9116 (process_psymtab_comp_unit_reader): Adjust.
9117 (build_type_psymtabs_reader): Adjust.
9118 (scan_partial_symbols): Adjust.
9119 (add_partial_symbol): Adjust.
9120 (add_partial_subprogram): Adjust.
9121 (peek_die_abbrev): Adjust.
9122 (fixup_go_packaging): Adjust.
9123 (process_imported_unit_die): Adjust.
9124 (dwarf2_compute_name): Adjust.
9125 (dwarf2_physname): Adjust.
9126 (read_import_statement): Adjust.
9127 (handle_DW_AT_stmt_list): Adjust.
9128 (read_file_scope): Adjust.
9129 (read_func_scope): Adjust.
9130 (read_lexical_block_scope): Adjust.
9131 (read_call_site_scope): Adjust.
9132 (read_variable): Adjust.
9133 (dwarf2_rnglists_process): Adjust.
9134 (dwarf2_ranges_process): Adjust.
9135 (dwarf2_ranges_read): Adjust.
9136 (dwarf2_get_pc_bounds): Adjust.
9137 (dwarf2_record_block_ranges): Adjust.
9138 (dwarf2_add_field): Adjust.
9139 (dwarf2_add_member_fn): Adjust.
9140 (read_structure_type): Adjust.
9141 (process_structure_scope): Adjust.
9142 (read_enumeration_type): Adjust.
9143 (read_array_type): Adjust.
9144 (mark_common_block_symbol_computed): Adjust.
9145 (read_common_block): Adjust.
9146 (read_namespace_type): Adjust.
9147 (read_namespace): Adjust.
9148 (read_module_type): Adjust.
9149 (read_tag_pointer_type): Adjust.
9150 (read_tag_ptr_to_member_type): Adjust.
9151 (read_tag_string_type): Adjust.
9152 (read_subroutine_type): Adjust.
9153 (read_typedef): Adjust.
9154 (read_base_type): Adjust.
9155 (attr_to_dynamic_prop): Adjust.
9156 (read_subrange_type): Adjust.
9157 (read_unspecified_type): Adjust.
9158 (dwarf2_read_abbrevs): Adjust.
9159 (load_partial_dies): Adjust.
9160 (read_partial_die): Adjust.
9161 (find_partial_die): Adjust.
9162 (guess_partial_die_structure_name): Adjust.
9163 (fixup_partial_die): Adjust.
9164 (read_attribute_value): Adjust.
9165 (read_addr_index): Adjust.
9166 (read_addr_index_from_leb128): Adjust.
9167 (read_str_index): Adjust.
9168 (dwarf2_string_attr): Adjust.
9169 (get_debug_line_section): Adjust.
9170 (dwarf_decode_line_header): Adjust.
9171 (lnp_state_machine::check_line_address): Adjust.
9172 (dwarf_decode_lines_1): Adjust.
9173 (dwarf_decode_lines): Adjust.
9174 (dwarf2_start_symtab): Adjust.
9175 (var_decode_location): Adjust.
9176 (new_symbol_full): Adjust.
9177 (dwarf2_const_value_data): Adjust.
9178 (dwarf2_const_value_attr): Adjust.
9179 (dwarf2_const_value): Adjust.
9181 (die_containing_type): Adjust.
9182 (build_error_marker_type): Adjust.
9183 (lookup_die_type): Adjust.
9184 (guess_full_die_structure_name): Adjust.
9185 (anonymous_struct_prefix): Adjust.
9186 (determine_prefix): Adjust.
9187 (dwarf2_name): Adjust.
9188 (follow_die_ref_or_sig): Adjust.
9189 (follow_die_offset): Adjust.
9190 (follow_die_ref): Adjust.
9191 (follow_die_sig_1): Adjust.
9192 (follow_die_sig): Adjust.
9193 (get_signatured_type): Adjust.
9194 (get_DW_AT_signature_type): Adjust.
9195 (decode_locdesc): Adjust.
9196 (dwarf_decode_macros): Adjust.
9197 (cu_debug_loc_section): Adjust.
9198 (fill_in_loclist_baton): Adjust.
9199 (dwarf2_symbol_mark_computed): Adjust.
9200 (init_one_comp_unit): Don't assign
9201 dwarf2_cu::dwarf2_per_objfile.
9202 (set_die_type): Adjust.
9204 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9206 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9207 <dwarf2_per_objfile>: New field.
9208 (dwarf2_per_objfile): Remove global.
9209 (get_dwarf2_per_objfile): New function.
9210 (set_dwarf2_per_objfile): New function.
9211 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9213 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9214 (read_abbrev_offset): Likewise.
9215 (read_indirect_string): Likewise.
9216 (read_indirect_line_string): Likewise.
9217 (read_indirect_string_at_offset): Likewise.
9218 (read_indirect_string_from_dwz): Likewise.
9219 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9221 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9222 (create_all_comp_units): Change objfile parameter to
9224 (create_all_type_units): Likewise.
9225 (process_queue): Add dwarf2_per_objfile parameter.
9226 (read_and_check_comp_unit_head): Likewise.
9227 (lookup_dwo_unit_in_dwp): Likewise.
9228 (get_dwp_file): Likewise.
9229 (process_cu_includes): Likewise.
9230 (struct free_dwo_file_cleanup_data): New struct.
9231 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9232 set_dwarf2_per_objfile.
9233 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9234 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9235 context, adjust calls.
9236 (dw2_instantiate_symtab): Likewise.
9237 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9238 (dw2_get_cu): Likewise.
9239 (create_cu_from_index_list): Change objfile parameter to
9241 (create_cus_from_index_list): Get dwarf2_per_objfile from
9242 context, adjust calls.
9243 (create_cus_from_index): Likewise.
9244 (create_signatured_type_table_from_index): Change objfile
9245 parameter to dwarf2_per_objfile.
9246 (create_signatured_type_table_from_debug_names): Change objfile
9247 parameter to dwarf2_per_objfile.
9248 (create_addrmap_from_index): Likewise.
9249 (create_addrmap_from_aranges): Likewise.
9250 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9251 (dw2_setup): Remove.
9252 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9254 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9255 get_dwarf2_per_objfile.
9256 (dw2_forget_cached_source_info): Likewise.
9257 (dw2_map_symtabs_matching_filename): Likewise.
9258 (struct dw2_symtab_iterator) <index>: Remove.
9259 <dwarf2_per_objfile>: New field.
9260 (dw2_symtab_iter_init): Replace index parameter with
9262 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9263 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9264 (dw2_print_stats): Likewise.
9265 (dw2_dump): Likewise.
9266 (dw2_expand_symtabs_for_function): Likewise.
9267 (dw2_expand_all_symtabs): Likewise.
9268 (dw2_expand_symtabs_with_fullname): Likewise.
9269 (dw2_expand_marked_cus): Replace index and objfile parameters
9270 with dwarf2_per_objfile.
9271 (dw_expand_symtabs_matching_file_matcher): Add
9272 dwarf2_per_objfile parameter and adjust calls.
9273 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9275 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9276 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9278 (create_cus_from_debug_names_list): Replace objfile parameter
9279 with dwarf2_per_objfile and adjust calls.
9280 (create_cus_from_debug_names): Likewise.
9281 (dwarf2_read_debug_names): Likewise.
9282 (mapped_debug_names::namei_to_name): Adjust call.
9283 (dw2_debug_names_iterator::next): Likewise.
9284 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9285 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9286 (dw2_debug_names_dump): Likewise.
9287 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9288 (dw2_debug_names_expand_symtabs_matching): Likewise.
9289 (dwarf2_initialize_objfile): Likewise.
9290 (dwarf2_build_psymtabs): Likewise.
9291 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9293 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9294 (read_and_check_comp_unit_head): Likewise.
9295 (read_abbrev_offset): Likewise.
9296 (create_debug_type_hash_table): Likewise.
9297 (create_debug_types_hash_table): Likewise.
9298 (create_all_type_units): Replace objfile parameter with
9300 (add_type_unit): Add dwarf2_per_objfile parameter.
9301 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9302 with dwarf2_per_objfile.
9303 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9304 (lookup_dwp_signatured_type): Likewise.
9305 (lookup_signatured_type): Likewise.
9306 (read_cutu_die_from_dwo): Likewise.
9307 (init_tu_and_read_dwo_dies): Likewise.
9308 (init_cutu_and_read_dies): Likewise.
9309 (init_cutu_and_read_dies_no_follow): Likewise.
9310 (allocate_type_unit_groups_table): Add objfile parameter.
9311 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9312 (get_type_unit_group): Likewise.
9313 (process_psymtab_comp_unit): Update call.
9314 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9315 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9316 (print_tu_stats): Likewise.
9317 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9319 (build_type_psymtabs): Change objfile parameter to
9321 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9322 passed in void* parameter.
9323 (process_skeletonless_type_units): Change objfile parameter to
9325 (set_partial_user): Likewise.
9326 (dwarf2_build_psymtabs_hard): Likewise.
9327 (read_comp_units_from_section): Likewise.
9328 (create_all_comp_units): Likewise.
9329 (scan_partial_symbols): Update calls.
9330 (add_partial_symbol): Likewise.
9331 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9332 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9333 (process_queue): Add dwarf2_per_objfile parameter.
9334 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9335 (compute_compunit_symtab_includes): Likewise.
9336 (process_cu_includes): Add dwarf2_per_objfile parameter.
9337 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9338 (process_full_type_unit): Likewise.
9339 (process_imported_unit_die): Update call.
9340 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9341 (read_file_scope): Likewise.
9342 (allocate_dwo_file_hash_table): Add objfile parameter.
9343 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9344 (create_cus_hash_table): Likewise.
9345 (create_dwp_hash_table): Likewise.
9346 (create_dwo_unit_in_dwp_v1): Likewise.
9347 (create_dwp_v2_section): Likewise.
9348 (create_dwo_unit_in_dwp_v2): Likewise.
9349 (lookup_dwo_unit_in_dwp): Likewise.
9350 (try_open_dwop_file): Likewise.
9351 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9352 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9353 cleanup to include a reference to dwarf2_per_objfile.
9354 (open_dwp_file): Add dwarf2_per_objfile parameter.
9355 (open_and_init_dwp_file): Likewise.
9356 (get_dwp_file): Likewise.
9357 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9358 (queue_and_load_all_dwo_tus): Update call.
9359 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9361 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9362 (dwarf2_ranges_process): Likewise.
9363 (dwarf2_get_pc_bounds): Likewise.
9364 (mark_common_block_symbol_computed): Likewise.
9365 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9366 (dwarf2_read_abbrevs): Update call.
9367 (read_partial_die): Use dwarf2_per_objfile from cu.
9368 (find_partial_die): Likewise.
9369 (fixup_partial_die): Likewise.
9370 (read_attribute_value): Likewise.
9371 (read_indirect_string_at_offset_from): Add objfile parameter.
9372 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9374 (read_indirect_string_from_dwz): Add objfile parameter.
9375 (read_indirect_string): Add objfile parameter.
9376 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9377 (read_addr_index): Use dwarf2_per_objfile from cu.
9378 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9380 (read_str_index): Use dwarf2_per_objfile from cu.
9381 (get_debug_line_section): Likewise.
9382 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9383 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9384 (new_symbol_full): Use dwarf2_per_objfile from cu.
9385 (build_error_marker_type): Likewise.
9386 (lookup_die_type): Likewise.
9387 (determine_prefix): Likewise.
9388 (follow_die_offset): Likewise.
9389 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9390 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9391 (dwarf2_fetch_die_type_sect_off): Likewise.
9392 (dwarf2_get_die_type): Likewise.
9393 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9394 (get_signatured_type): Likewise.
9395 (get_DW_AT_signature_type): Likewise.
9396 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9397 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9398 (cu_debug_loc_section): Likewise.
9399 (fill_in_loclist_baton): Likewise.
9400 (dwarf2_symbol_mark_computed): Likewise.
9401 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9403 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9405 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9406 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9407 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9408 (set_die_type): Use dwarf2_free_objfile from cu.
9409 (get_die_type_at_offset): Likewise.
9410 (dwarf2_per_objfile_free): Don't assign global variable.
9411 (debug_names) <constructor>: Add dwarf2_per_objfile
9412 parameter, update m_debugstrlookup construction.
9413 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9415 <m_dwarf2_per_objfile>: New field.
9416 <lookup>: Use m_dwarf2_per_objfile.
9417 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9418 (psyms_seen_size): Likewise.
9419 (write_gdbindex): Replace objfile parameter with
9421 (write_debug_names): Likewise.
9422 (write_psymtabs_to_index): Likewise.
9423 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9426 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9428 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9429 <dwarf2_per_objfile>: New field.
9430 (struct dwarf2_per_cu_data) <objfile>: Remove.
9431 <dwarf2_per_objfile>: New field.
9432 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9434 (create_signatured_type_table_from_index): Likewise.
9435 (create_debug_type_hash_table): Likewise.
9436 (fill_in_sig_entry_from_dwo_entry): Likewise.
9437 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9438 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9440 (create_partial_symtab): Access objfile through
9442 (process_psymtab_comp_unit_reader): Likewise.
9443 (read_comp_units_from_section): Likewise.
9444 (scan_partial_symbols): Likewise.
9445 (add_partial_symbol): Likewise.
9446 (add_partial_subprogram): Likewise.
9447 (peek_die_abbrev): Likewise.
9448 (fixup_go_packaging): Likewise.
9449 (process_full_comp_unit): Likewise.
9450 (process_full_type_unit): Likewise.
9451 (process_imported_unit_die): Likewise.
9452 (dwarf2_compute_name): Likewise.
9453 (dwarf2_physname): Likewise.
9454 (read_import_statement): Likewise.
9455 (create_cus_hash_table): Assign dwarf2_physname instead of
9457 (read_func_scope): Access objfile through dwarf2_per_objfile.
9458 (read_lexical_block_scope): Likewise.
9459 (read_call_site_scope): Likewise.
9460 (read_variable): Likewise.
9461 (dwarf2_rnglists_process): Likewise.
9462 (dwarf2_ranges_process): Likewise.
9463 (dwarf2_ranges_read): Likewise.
9464 (dwarf2_record_block_ranges): Likewise.
9465 (dwarf2_add_field): Likewise.
9466 (dwarf2_add_member_fn): Likewise.
9467 (read_structure_type): Likewise.
9468 (process_structure_scope): Likewise.
9469 (read_enumeration_type): Likewise.
9470 (read_array_type): Likewise.
9471 (read_common_block): Likewise.
9472 (read_namespace_type): Likewise.
9473 (read_namespace): Likewise.
9474 (read_module_type): Likewise.
9475 (read_tag_pointer_type): Likewise.
9476 (read_tag_ptr_to_member_type): Likewise.
9477 (read_tag_string_type): Likewise.
9478 (read_subroutine_type): Likewise.
9479 (read_typedef): Likewise.
9480 (read_base_type): Likewise.
9481 (attr_to_dynamic_prop): Likewise.
9482 (read_subrange_type): Likewise.
9483 (read_unspecified_type): Likewise.
9484 (load_partial_dies): Likewise.
9485 (read_partial_die): Likewise.
9486 (find_partial_die): Likewise.
9487 (guess_partial_die_structure_name): Likewise.
9488 (fixup_partial_die): Likewise.
9489 (read_attribute_value): Likewise.
9490 (read_addr_index_from_leb128): Likewise.
9491 (dwarf2_read_addr_index): Likewise.
9492 (dwarf2_string_attr): Likewise.
9493 (lnp_state_machine::check_line_address): Likewise.
9494 (dwarf_decode_lines_1): Likewise.
9495 (dwarf_decode_lines): Likewise.
9496 (dwarf2_start_symtab): Likewise.
9497 (var_decode_location): Likewise.
9498 (new_symbol_full): Likewise.
9499 (dwarf2_const_value_data): Likewise.
9500 (dwarf2_const_value_attr): Likewise.
9501 (dwarf2_const_value): Likewise.
9502 (die_type): Likewise.
9503 (die_containing_type): Likewise.
9504 (lookup_die_type): Likewise.
9505 (guess_full_die_structure_name): Likewise.
9506 (anonymous_struct_prefix): Likewise.
9507 (dwarf2_name): Likewise.
9508 (follow_die_ref_or_sig): Likewise.
9509 (follow_die_offset): Likewise.
9510 (follow_die_ref): Likewise.
9511 (dwarf2_fetch_die_loc_sect_off): Likewise.
9512 (dwarf2_fetch_constant_bytes): Likewise.
9513 (dwarf2_fetch_die_type_sect_off): Likewise.
9514 (dwarf2_get_die_type): Likewise.
9515 (follow_die_sig): Likewise.
9516 (decode_locdesc): Likewise.
9517 (dwarf2_per_cu_objfile): Likewise.
9518 (dwarf2_per_cu_text_offset): Likewise.
9519 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9521 (set_die_type): Access objfile through
9524 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9526 * valprint.c (converted_character_d): Remove typedef.
9527 (DEF_VEC_O (converted_character_d)): Remove.
9528 (count_next_character): Use std::vector.
9529 (print_converted_chars_to_obstack): Likewise.
9530 (generic_printstr): Likewise.
9532 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9534 * xml-support.h (struct gdb_xml_value): Add constructor.
9535 <value>: Change type to unique_xmalloc_ptr.
9536 (gdb_xml_value_s): Remove typedef.
9537 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9538 (gdb_xml_element_start_handler): Change parameter type to
9540 (xml_find_attribute): Likewise.
9541 * xml-support.c (xml_find_attribute): Change parameter type to
9542 std::vector and adjust.
9543 (gdb_xml_values_cleanup): Remove.
9544 (gdb_xml_parser::start_element): Adjust to std::vector.
9545 (xinclude_start_include): Change paraeter type to std::vector
9547 * btrace.c (check_xml_btrace_version): Likewise.
9548 (parse_xml_btrace_block): Likewise.
9549 (parse_xml_btrace_pt_config_cpu): Likewise.
9550 (parse_xml_btrace_pt): Likewise.
9551 (parse_xml_btrace_conf_bts): Likewise.
9552 (parse_xml_btrace_conf_pt): Likewise.
9553 * memory-map.c (memory_map_start_memory): Likewise.
9554 (memory_map_start_property): Likewise.
9555 * osdata.c (osdata_start_osdata): Likewise.
9556 (osdata_start_item): Likewise.
9557 (osdata_start_column): Likewise.
9558 * remote.c (start_thread): Likewise.
9559 * solib-aix.c (library_list_start_library): Likewise.
9560 (library_list_start_list): Likewise.
9561 * solib-svr4.c (library_list_start_library): Likewise.
9562 (svr4_library_list_start_list): Likewise.
9563 * solib-target.c (library_list_start_segment): Likewise.
9564 (library_list_start_section): Likewise.
9565 (library_list_start_library): Likewise.
9566 (library_list_start_list): Likewise.
9567 * tracepoint.c (traceframe_info_start_memory): Likewise.
9568 (traceframe_info_start_tvar): Likewise.
9569 * xml-syscall.c (syscall_start_syscall): Likewise.
9570 * xml-tdesc.c (tdesc_start_target): Likewise.
9571 (tdesc_start_feature): Likewise.
9572 (tdesc_start_reg): Likewise.
9573 (tdesc_start_union): Likewise.
9574 (tdesc_start_struct): Likewise.
9575 (tdesc_start_flags): Likewise.
9576 (tdesc_start_enum): Likewise.
9577 (tdesc_start_field): Likewise.
9578 (tdesc_start_enum_value): Likewise.
9579 (tdesc_start_vector): Likewise.
9581 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9583 * extension.h (struct xmethod_worker) <clone>: Remove.
9584 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9586 (python_xmethod_worker::clone): Remove.
9587 * valops.c (find_overload_match): Use std::move instead of
9590 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9592 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9593 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9594 <free_xmethod_worker_data>: Remove.
9595 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9596 <get_xmethod_arg_types>: Remove.
9597 <get_xmethod_result_type>: Remove.
9598 <invoke_xmethod>: Remove.
9599 * extension.c (new_xmethod_worker): Remove.
9600 (clone_xmethod_worker): Remove.
9601 (get_matching_xmethod_workers): Return void, pass std::vector by
9603 (get_xmethod_arg_types): Rename to...
9604 (xmethod_worker::get_arg_types): ... this, and adjust.
9605 (get_xmethod_result_type): Rename to...
9606 (xmethod_worker::get_result_type): ... this, and adjust.
9607 (invoke_xmethod): Remove.
9608 (free_xmethod_worker): Remove.
9609 (free_xmethod_worker_vec): Remove.
9610 * extension.h (enum ext_lang_rc): Move here from
9612 (struct xmethod_worker): Add constructor and destructor.
9615 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9616 virtual pure methods.
9617 <get_arg_types, get_result_type>: New methods.
9618 (xmethod_worker_ptr): Remove typedef.
9619 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9620 (xmethod_worker_vec): Remove typedef.
9621 (xmethod_worker_up): New typedef.
9622 (invoke_xmethod): Remove.
9623 (clone_xmethod_worker): Remove.
9624 (free_xmethod_worker): Remove.
9625 (free_xmethod_worker_vec): Remove.
9626 (get_xmethod_arg_types): Remove.
9627 (get_xmethod_result_type): Remove.
9628 * valops.c (find_method_list): Use std::vector, don't use
9629 intermediate vector.
9630 (value_find_oload_method_list): Use std::vector.
9631 (find_overload_match): Use std::vector.
9632 (find_oload_champ): Use std::vector.
9633 * value.c (value_free): Use operator delete.
9634 (value_of_xmethod): Rename to...
9635 (value_from_xmethod): ... this. Don't assign
9636 xmethod_worker::value, take rvalue-reference.
9637 (result_type_of_xmethod): Adjust.
9638 (call_xmethod): Adjust.
9639 * value.h: Include extension.h.
9640 (struct xmethod_worker): Don't forward-declare.
9641 (value_of_xmethod): Rename to...
9642 (value_from_xmethod): ... this, take rvalue-reference.
9643 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9644 (struct python_xmethod_worker): ... this, add constructor and
9646 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9647 (gdbpy_free_xmethod_worker_data): Rename to...
9648 (python_xmethod_worker::~python_xmethod_worker): ... this and
9650 (gdbpy_clone_xmethod_worker_data): Rename to...
9651 (python_xmethod_worker::clone): ... this and adjust.
9652 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9654 (gdbpy_get_xmethod_arg_types): Rename to...
9655 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9656 (gdbpy_get_xmethod_result_type): Rename to...
9657 (python_xmethod_worker::do_get_result_type): ... this and
9659 (gdbpy_invoke_xmethod): Rename to...
9660 (python_xmethod_worker::invoke): ... this and adjust.
9661 (new_python_xmethod_worker): Rename to...
9662 (python_xmethod_worker::python_xmethod_worker): ... this and
9664 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9666 (gdbpy_free_xmethod_worker_data): Remove.
9667 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9668 (gdbpy_get_xmethod_arg_types): Remove.
9669 (gdbpy_get_xmethod_result_type): Remove.
9670 (gdbpy_invoke_xmethod): Remove.
9671 * python/python.c (python_extension_ops): Remove obsolete
9674 2018-01-05 Pedro Alves <palves@redhat.com>
9677 * common/signals-state-save-restore.c
9678 (save_original_signals_state): New parameter 'quiet'. Warn if we
9679 find a custom handler preinstalled, instead of internal erroring.
9680 But only warn if !quiet.
9681 * common/signals-state-save-restore.h
9682 (save_original_signals_state): New parameter 'quiet'.
9683 * main.c (captured_main_1): Move save_original_signals_state call
9684 after option handling, and pass QUIET.
9686 2018-01-05 Pedro Alves <palves@redhat.com>
9688 * spu-tdep.c (spu_catch_start): Pass
9689 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9691 2018-01-05 Pedro Alves <palves@redhat.com>
9694 * ada-lang.c (literal_symbol_name_matcher): New function.
9695 (ada_get_symbol_name_matcher): Use it for
9696 symbol_name_match_type::SEARCH_NAME.
9697 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9698 it down instead of assuming symbol_name_match_type::FULL.
9699 * block.h (block_lookup_symbol): New parameter 'match_type'.
9700 * c-valprint.c (print_unpacked_pointer): Use
9701 lookup_symbol_search_name instead of lookup_symbol.
9702 * compile/compile-object-load.c (get_out_value_type): Pass down
9703 symbol_name_match_type::SEARCH_NAME.
9704 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9705 symbol_name_match_type::FULL.
9706 * cp-support.c (cp_get_symbol_name_matcher): Handle
9707 symbol_name_match_type::SEARCH_NAME.
9708 * infrun.c (insert_exception_resume_breakpoint): Use
9709 lookup_symbol_search_name.
9710 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9711 * psymtab.c (maintenance_check_psymtabs): Use
9712 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9713 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9715 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9716 if symbol_name_match_type::SEARCH_NAME.
9717 (lookup_symbol_in_language): Pass down
9718 symbol_name_match_type::FULL.
9719 (lookup_symbol_search_name): New.
9720 (lookup_language_this): Pass down
9721 symbol_name_match_type::SEARCH_NAME.
9722 (lookup_symbol_aux, lookup_local_symbol): New parameter
9723 'match_type'. Pass it down.
9724 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9725 (lookup_symbol_search_name): New declaration.
9726 (lookup_symbol_in_block): New 'match_type' parameter.
9728 2018-01-05 Pedro Alves <palves@redhat.com>
9731 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9733 (ada_lookup_symbol): Reimplement in terms of
9734 ada_lookup_symbol_list, bits factored out from
9735 ada_lookup_encoded_symbol.
9737 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9739 * ada-exp.y (write_object_renaming): When subscripting an array
9740 using a symbol as the index, pass the block in call to
9741 ada_lookup_encoded_symbol when looking that symbol up.
9743 2018-01-05 Jerome Guitton <guitton@adacore.com>
9745 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9748 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9750 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9751 the case where VALUE_LVAL (val0) is not lval_memory.
9753 2018-01-05 Xavier Roirand <roirand@adacore.com>
9755 * ada-valprint.c (print_optional_low_bound): Handle
9756 character-indexed array printing like boolean-indexed array
9759 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9761 * NEWS: Create a new section for the next release branch.
9762 Rename the section of the current branch, now that it has
9765 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9767 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9768 * version.in: Bump version to 8.1.50.DATE-git.
9770 2018-01-03 Xavier Roirand <roirand@adacore.com>
9772 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9774 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9776 (default_exception_support_info) <catch_handlers_sym>: Add field.
9777 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9778 (ada_exception_name_addr_1): Add "catch handlers" handling.
9779 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9781 (create_excep_cond_exprs) <ex>: Add parameter.
9782 (re_set_exception): Update create_excep_cond_exprs call.
9783 (print_it_exception, print_one_exception, print_mention_exception)
9784 (print_recreate_exception): Add "catch handler" handling.
9785 (allocate_location_catch_handlers, re_set_catch_handlers)
9786 (check_status_catch_handlers, print_it_catch_handlers)
9787 (print_one_catch_handlers, print_mention_catch_handlers)
9788 (print_recreate_catch_handlers): New function.
9789 (catch_handlers_breakpoint_ops): New variable.
9790 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9791 Add parameter. Add "catch handler" handling.
9792 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9793 Add "catch handler" handling.
9794 (ada_exception_catchpoint_cond_string): Add "catch handler"
9796 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9798 (catch_ada_handlers_command): New function.
9799 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9800 operations structure.
9801 (_initialize_ada_language): Add "catch handlers" command entry.
9802 * NEWS: Document "catch handlers" feature.
9804 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9806 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9807 account when creating the array type of the slice.
9808 (ada_value_slice): Likewise.
9810 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9812 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9814 (create_array_type_with_stride): Add byte_stride_prop parameter.
9815 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9816 New parameter. Update all callers in this file.
9817 (array_type_has_dynamic_stride): New function.
9818 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9819 of arrays with dynamic byte strides.
9820 * dwarf2read.c (read_array_type): Add support for dynamic
9821 DW_AT_byte_stride attributes.
9823 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9825 * dwarf2read.c (read_unspecified_type): Treat
9826 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9828 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9830 Update copyright year range in all GDB files.
9832 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9834 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9835 and gdb/testsuite/gdb.base/step-line.c.
9837 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9839 * copyright.py (main): Dump the contents of
9840 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9841 even if BY_HAND is empty.
9843 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9845 * top.c (print_gdb_version): Update Copyright year in version
9848 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9850 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9852 For older changes see ChangeLog-2017.
9858 version-control: never