1 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3 * stack.c: (trailing_outermost_frame): New function, mostly
4 extracted from backtrace_command_1.
5 (leading_innermost_frame): New function.
6 (backtrace_command_1): Update to call trailing_outermost_frame.
7 (frame_apply_command_count): New function.
8 (frame_apply_level_command): New function.
9 (frame_apply_all_command): New function.
10 (frame_apply_command): New function.
11 (faas_command): New function.
12 (frame_cmd_list): New variable.
13 (_initialize_stack): Update to setup the new commands 'frame apply'
16 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
18 * cli-utils.c (number_or_range_parser::get_number): Only handle
19 numbers or convenience var as numbers.
20 (parse_flags): New function.
21 (parse_flags_qcs): New function.
22 (number_or_range_parser::finished): Ensure parsing end is detected
24 * cli-utils.h (parse_flags): New function.
25 (parse_flags_qcs): New function.
26 (number_or_range_parser): Remove m_finished bool.
27 (number_or_range_parser::skip_range): Set m_in_range to false.
29 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
31 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
34 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
35 Jan Kratochvil <jan.kratochvil@redhat.com>
36 Paul Fertser <fercerpav@gmail.com>
37 Tsutomu Seki <sekiriki@gmail.com>
38 Pedro Alves <palves@redhat.com>
40 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
41 'unittests/parse-connection-spec-selftests.c'.
42 (COMMON_SFILES): Add 'common/netstuff.c'.
43 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
44 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
45 * common/netstuff.c: New file.
46 * common/netstuff.h: New file.
47 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
48 (wait_for_connect): Update comment. New parameter
49 'gdb::optional<int> sock' instead of 'struct serial *scb'.
50 Use 'sock' directly instead of 'scb->fd'.
51 (try_connect): New function, with code from 'net_open'.
52 (net_open): Rewrite main loop to deal with multiple
53 sockets/addresses. Handle IPv6-style hostnames; implement
54 support for IPv6 connections.
55 * unittests/parse-connection-spec-selftests.c: New file.
57 2018-07-11 Pedro Alves <palves@redhat.com>
60 * remote.c (remote_target::remote_detach_pid): Call
63 2018-07-11 Pedro Alves <palves@redhat.com>
65 * h8300-tdep.c (h8300_gdbarch_init): Remove
66 set_gdbarch_ecoff_reg_to_regnum calls.
68 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
71 * c-typeprint.c (c_type_print_base_struct_union): Don't print
72 offsets/sizes for static members of a class/struct.
74 2018-07-11 Alan Hayward <alan.hayward@arm.com>
76 * target-descriptions.c (tdesc_register_bitsize): Rename.
77 * target-descriptions.h (tdesc_register_bitsize): Likewise.
78 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
79 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
81 2018-07-10 Tom Tromey <tom@tromey.com>
83 * breakpoint.c (moribund_locations): Now static and a
85 (breakpoint_init_inferior, moribund_breakpoint_here_p)
86 (build_bpstat_chain, update_global_location_list)
87 (breakpoint_retire_moribund): Update.
88 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
91 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
93 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
94 (riscv_register_reggroup_p): Use new function, remove unneeded
96 (riscv_push_dummy_call): Extend assert to compare against xlen or
97 flen based on register type.
99 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
101 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
103 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
105 * remote.c (show_hardware_watchpoint_limit): New function.
106 (show_hardware_watchpoint_length_limit): New function.
107 (show_hardware_breakpoint_limit): New function.
108 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
109 where appropriate, update help text.
111 2018-07-09 Tom Tromey <tom@tromey.com>
113 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
114 (CLIBS): Don't mention NAT_CLIBS.
116 2018-07-09 Tom Tromey <tom@tromey.com>
118 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
119 (LIBGDB_OBS, clean mostlyclean): Update.
120 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
122 2018-07-09 Tom Tromey <tom@tromey.com>
124 * Makefile.in (%.c: %.y): Use ECHO_YACC.
125 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
126 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
128 2018-07-09 Tom Tromey <tom@tromey.com>
130 * Makefile.in (ALLDEPFILES): Remove exec.c.
131 (COMMON_OBS): Remove exec.o.
132 (COMMON_SFILES): Add exec.c.
134 2018-07-09 Tom Tromey <tom@tromey.com>
136 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
138 2018-07-09 Tom Tromey <tom@tromey.com>
140 * Makefile.in (clean mostlyclean): Remove stamp-version.
141 (version.c): Depend on stamp-version.
142 (stamp-version): New rule, from version.c rule.
144 2018-07-09 Tom Tromey <tom@tromey.com>
146 * Makefile.in (init.c): Depend on stamp-init.
147 (stamp-init): New rule, from init.c rule.
148 (clean mostlyclean): Remove stamp-init.
150 2018-07-09 Tom Tromey <tom@tromey.com>
152 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
153 SUBDIR_GCC_COMPILE_SRCS.
155 2018-07-09 Tom Tromey <tom@tromey.com>
157 * Makefile.in (init.c): Remove some unused sed rules.
159 2018-07-09 Tom Tromey <tom@tromey.com>
161 * Makefile.in (TSOBS): Remove.
162 (INIT_FILES): Update.
163 (LIBGDB_OBS): Update.
164 (COMMON_SFILES): Add inflow.c.
165 (SFILES): Remove inflow.c.
167 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
169 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
171 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
173 * ia64-tdep.c (get_reg_name, get_fpreg_name, get_saveloc_name,
174 is_signal_frame_name, step_name, init_remote_name,
175 create_addr_space_name, destroy_addr_space_name,
176 search_unwind_table_name, find_dyn_list_name): Constify.
178 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
180 * darwin-nat.c (darwin_pthread_kill): New function.
181 (darwin_resume_thread): Use darwin_pthread_kill.
183 2018-07-05 Tom de Vries <tdevries@suse.de>
185 * macroexp.c (macro_buffer) <operator=>: New member function.
187 2018-07-04 Tom Tromey <tom@tromey.com>
189 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
191 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
193 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
194 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
198 2018-07-04 Joel Brobecker <brobecker@adacore.com>
200 * NEWS: Create a new section for the next release branch.
201 Rename the section of the current branch, now that it has
204 2018-07-04 Joel Brobecker <brobecker@adacore.com>
206 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
207 * version.in: Bump version to 8.2.50.DATE-git.
209 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
210 Pedro Alves <palves@redhat.com>
212 * linux-nat.c (linux_init_ptrace): Rename to ...
213 (linux_init_ptrace_procfs): ... this. Call
214 linux_proc_init_warnings.
215 (linux_nat_target::post_attach)
216 (linux_nat_target::post_startup_inferior): Adjust.
217 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
218 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
220 2018-07-04 Tom de Vries <tdevries@suse.de>
222 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
224 (read_comp_unit_head): ... here.
226 2018-07-03 Tom Tromey <tom@tromey.com>
228 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
229 (stop_tracing, tstatus_command)
230 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
231 (print_one_static_tracepoint_marker): Update.
232 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
234 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
236 (all_tracepoints, static_tracepoints_here): Return std::vector.
238 2018-07-03 Tom Tromey <tom@tromey.com>
240 * common/ptid.c (ptid_equal): Remove.
241 * common/ptid.h (ptid_equal): Don't declare.
242 * ada-tasks.c: Update.
243 * breakpoint.c: Update.
244 * common/agent.c: Update.
246 * darwin-nat-info.c: Update.
247 * darwin-nat.c: Update.
249 * dtrace-probe.c: Update.
250 * dummy-frame.c: Update.
251 * fbsd-nat.c: Update.
253 * gdbthread.h: Update.
255 * go32-nat.c: Update.
256 * inf-loop.c: Update.
257 * inf-ptrace.c: Update.
262 * linux-fork.c: Update.
263 * linux-nat.c: Update.
264 * linux-thread-db.c: Update.
265 * mi/mi-cmd-var.c: Update.
266 * mi/mi-interp.c: Update.
267 * mi/mi-main.c: Update.
268 * nto-procfs.c: Update.
269 * ppc-linux-tdep.c: Update.
271 * python/py-inferior.c: Update.
272 * python/py-record-btrace.c: Update.
273 * python/py-record.c: Update.
274 * ravenscar-thread.c: Update.
275 * regcache.c: Update.
276 * remote-sim.c: Update.
278 * sol-thread.c: Update.
281 * tui/tui-stack.c: Update.
283 * windows-nat.c: Update.
284 * windows-tdep.c: Update.
286 2018-07-03 Tom Tromey <tom@tromey.com>
288 * common/ptid.c (ptid_match): Remove.
289 * common/ptid.h (ptid_match): Don't declare.
290 * fbsd-nat.c: Update.
293 * linux-nat.c: Update.
294 * record-btrace.c: Update.
295 * regcache.c: Update.
298 2018-07-03 Tom Tromey <tom@tromey.com>
300 * common/ptid.c (ptid_tid_p): Remove.
301 * common/ptid.h (ptid_tid_p): Don't declare.
302 * sol-thread.c: Update.
304 2018-07-03 Tom Tromey <tom@tromey.com>
306 * common/ptid.c (ptid_lwp_p): Remove.
307 * common/ptid.h (ptid_lwp_p): Don't declare.
308 * fbsd-nat.c: Update.
309 * linux-nat.c: Update.
310 * nat/linux-procfs.c: Update.
311 * nat/x86-linux-dregs.c: Update.
312 * sol-thread.c: Update.
314 2018-07-03 Tom Tromey <tom@tromey.com>
316 * common/ptid.c (ptid_is_pid): Remove.
317 * common/ptid.h (ptid_is_pid): Don't declare.
319 * linux-nat.c: Update.
320 * mi/mi-interp.c: Update.
324 2018-07-03 Tom Tromey <tom@tromey.com>
326 * common/ptid.c (ptid_get_tid): Remove.
327 * common/ptid.h (ptid_get_tid): Don't declare.
328 * ada-tasks.c: Update.
329 * aix-thread.c: Update.
330 * bsd-uthread.c: Update.
331 * darwin-nat.c: Update.
332 * fbsd-nat.c: Update.
333 * i386-darwin-nat.c: Update.
335 * linux-tdep.c: Update.
336 * nto-procfs.c: Update.
337 * ppc-ravenscar-thread.c: Update.
338 * python/py-infthread.c: Update.
339 * ravenscar-thread.c: Update.
340 * sol-thread.c: Update.
341 * sparc-ravenscar-thread.c: Update.
342 * windows-nat.c: Update.
344 2018-07-03 Tom Tromey <tom@tromey.com>
346 * common/ptid.c (ptid_get_lwp): Remove.
347 * common/ptid.h (ptid_get_lwp): Don't declare.
348 * aarch64-linux-nat.c: Update.
349 * ada-tasks.c: Update.
350 * aix-thread.c: Update.
351 * amd64-linux-nat.c: Update.
352 * arm-linux-nat.c: Update.
354 * fbsd-nat.c: Update.
355 * fbsd-tdep.c: Update.
357 * i386-cygwin-tdep.c: Update.
358 * i386-gnu-nat.c: Update.
359 * i386-linux-nat.c: Update.
360 * ia64-linux-nat.c: Update.
361 * inf-ptrace.c: Update.
363 * linux-fork.c: Update.
364 * linux-nat.c: Update.
365 * linux-tdep.c: Update.
366 * linux-thread-db.c: Update.
367 * mips-linux-nat.c: Update.
368 * nat/aarch64-linux-hw-point.c: Update.
369 * nat/aarch64-linux.c: Update.
370 * nat/linux-btrace.c: Update.
371 * nat/linux-osdata.c: Update.
372 * nat/linux-procfs.c: Update.
373 * nat/x86-linux-dregs.c: Update.
374 * obsd-nat.c: Update.
375 * ppc-fbsd-nat.c: Update.
376 * ppc-linux-nat.c: Update.
378 * python/py-infthread.c: Update.
379 * ravenscar-thread.c: Update.
381 * s390-linux-nat.c: Update.
382 * sol-thread.c: Update.
383 * sol2-tdep.c: Update.
384 * spu-linux-nat.c: Update.
385 * x86-linux-nat.c: Update.
386 * xtensa-linux-nat.c: Update.
388 2018-07-03 Tom Tromey <tom@tromey.com>
390 * common/ptid.c (ptid_get_pid): Remove.
391 * common/ptid.h (ptid_get_pid): Don't declare.
392 * aarch64-linux-nat.c: Update.
393 * ada-lang.c: Update.
394 * aix-thread.c: Update.
395 * alpha-bsd-nat.c: Update.
396 * amd64-fbsd-nat.c: Update.
397 * amd64-linux-nat.c: Update.
398 * arm-linux-nat.c: Update.
399 * arm-nbsd-nat.c: Update.
401 * break-catch-syscall.c: Update.
402 * breakpoint.c: Update.
403 * bsd-uthread.c: Update.
406 * darwin-nat.c: Update.
407 * fbsd-nat.c: Update.
408 * fbsd-tdep.c: Update.
411 * hppa-nbsd-nat.c: Update.
412 * hppa-obsd-nat.c: Update.
413 * i386-fbsd-nat.c: Update.
414 * ia64-linux-nat.c: Update.
415 * inf-ptrace.c: Update.
417 * inferior.c: Update.
418 * inferior.h: Update.
421 * linux-fork.c: Update.
422 * linux-nat.c: Update.
423 * linux-tdep.c: Update.
424 * linux-thread-db.c: Update.
425 * m68k-bsd-nat.c: Update.
426 * mi/mi-interp.c: Update.
427 * mi/mi-main.c: Update.
428 * mips-linux-nat.c: Update.
429 * mips-nbsd-nat.c: Update.
430 * mips64-obsd-nat.c: Update.
431 * nat/aarch64-linux-hw-point.c: Update.
432 * nat/aarch64-linux.c: Update.
433 * nat/linux-btrace.c: Update.
434 * nat/linux-osdata.c: Update.
435 * nat/linux-procfs.c: Update.
436 * nat/x86-linux-dregs.c: Update.
437 * nto-procfs.c: Update.
438 * obsd-nat.c: Update.
439 * ppc-linux-nat.c: Update.
440 * ppc-nbsd-nat.c: Update.
441 * ppc-obsd-nat.c: Update.
442 * proc-service.c: Update.
444 * python/py-inferior.c: Update.
445 * python/py-infthread.c: Update.
446 * ravenscar-thread.c: Update.
448 * remote-sim.c: Update.
450 * rs6000-nat.c: Update.
451 * s390-linux-nat.c: Update.
452 * sh-nbsd-nat.c: Update.
453 * sol-thread.c: Update.
454 * sparc-nat.c: Update.
455 * sparc64-tdep.c: Update.
456 * spu-linux-nat.c: Update.
457 * spu-tdep.c: Update.
458 * target-debug.h: Update.
461 * tid-parse.c: Update.
462 * tracefile-tfile.c: Update.
463 * vax-bsd-nat.c: Update.
464 * windows-nat.c: Update.
465 * x86-linux-nat.c: Update.
468 2018-07-03 Tom Tromey <tom@tromey.com>
470 * common/ptid.c (pid_to_ptid): Remove.
471 * common/ptid.h (pid_to_ptid): Don't declare.
472 * aix-thread.c: Update.
473 * arm-linux-nat.c: Update.
474 * common/ptid.c: Update.
475 * common/ptid.h: Update.
478 * darwin-nat.c: Update.
479 * fbsd-nat.c: Update.
480 * fork-child.c: Update.
482 * go32-nat.c: Update.
483 * inf-ptrace.c: Update.
485 * inferior.c: Update.
487 * linux-fork.c: Update.
488 * linux-nat.c: Update.
489 * nat/aarch64-linux-hw-point.c: Update.
490 * nat/fork-inferior.c: Update.
491 * nat/x86-linux-dregs.c: Update.
492 * nto-procfs.c: Update.
493 * obsd-nat.c: Update.
495 * progspace.c: Update.
497 * rs6000-nat.c: Update.
498 * s390-linux-nat.c: Update.
499 * sol-thread.c: Update.
500 * spu-linux-nat.c: Update.
503 * tracefile-tfile.c: Update.
504 * windows-nat.c: Update.
506 2018-07-03 Tom Tromey <tom@tromey.com>
508 * common/ptid.h (ptid_build): Don't declare.
509 * common/ptid.c (ptid_build): Remove.
510 * aix-thread.c: Update.
512 * bsd-uthread.c: Update.
513 * common/agent.c: Update.
514 * common/ptid.c: Update.
515 * common/ptid.h: Update.
517 * darwin-nat.c: Update.
518 * fbsd-nat.c: Update.
520 * linux-fork.c: Update.
521 * linux-nat.c: Update.
522 * linux-thread-db.c: Update.
523 * nat/linux-osdata.c: Update.
524 * nat/linux-procfs.c: Update.
525 * nto-procfs.c: Update.
526 * obsd-nat.c: Update.
527 * proc-service.c: Update.
529 * ravenscar-thread.c: Update.
530 * remote-sim.c: Update.
532 * sol-thread.c: Update.
534 * windows-nat.c: Update.
536 2018-07-03 Tom Tromey <tom@tromey.com>
538 * infrun.c (follow_exec): Use exit_inferior_silent.
539 * inferior.c (exit_inferior_num_silent): Remove.
540 * inferior.h (exit_inferior_num_silent): Don't declare.
542 2018-07-03 Tom Tromey <tom@tromey.com>
545 * darwin-nat.c (darwin_attach_pid): Reset inferior and
546 inferior_ptid on error.
548 2018-07-02 Maciej W. Rozycki <macro@mips.com>
549 Simon Marchi <simon.marchi@polymtl.ca>
552 * disasm.h (gdb_disassembler): Add
553 `m_disassembler_options_holder'. member
554 * disasm.c (get_all_disassembler_options): New function.
555 (gdb_disassembler::gdb_disassembler): Use it.
556 (gdb_buffered_insn_length_init_dis): Likewise.
557 (gdb_buffered_insn_length): Adjust accordingly.
558 (set_disassembler_options): Handle options with arguments.
559 (show_disassembler_options_sfunc): Likewise. Add a leading new
560 line if showing options with descriptions.
561 (disassembler_options_completer): Adapt to using the
562 `disasm_options_and_args_t' structure.
563 * mips-tdep.c (mips_disassembler_options): New variable.
564 (mips_disassembler_options_o32): Likewise.
565 (mips_disassembler_options_n32): Likewise.
566 (mips_disassembler_options_n64): Likewise.
567 (gdb_print_insn_mips): Don't set `disassembler_options'.
568 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
570 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
571 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
572 `gdbarch_disassembler_options_implicit' and
573 `gdbarch_valid_disassembler_options'.
574 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
575 `disasm_options_and_args_t' structure.
576 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
578 (valid_disassembler_options): Switch from `disasm_options_t' to
579 the `disasm_options_and_args_t' structure.
580 * NEWS: Document `set disassembler-options' support for the MIPS
582 * gdbarch.h: Regenerate.
583 * gdbarch.c: Regenerate.
585 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
587 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
589 2018-06-29 Joel Brobecker <brobecker@adacore.com>
591 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
592 parameter in call to amd64_target_description.
593 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
594 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
595 (amd64fbsd_init_abi): Likewise.
596 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
597 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
598 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
599 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
601 2018-06-29 Pedro Alves <palves@redhat.com>
603 * gdb/amd64-tdep.h (amd64_create_target_description): Add
604 "segments" parameter.
605 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
606 (_initialize_amd64_tdep): Update call to
607 amd64_create_target_description.
608 (amd64_target_description): Add "segments" parameter. Adjust
609 the implementation to use it.
610 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
611 call to amd64_create_target_description.
612 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
613 * gdb/arch/amd64.h (amd64_create_target_description): Add
615 * gdb/arch/amd64.c (amd64_create_target_description): Add
616 "segments" parameter. Call create_feature_i386_64bit_segments
617 only if SEGMENTS is true.
618 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
619 call to amd64_create_target_description.
621 2018-06-29 Pedro Alves <palves@redhat.com>
623 * thread.c (thread_target_id_str): New, factored out from ...
624 (print_thread_info_1): ... here. Use it to compute the max
625 "Target Id" column width.
627 2018-06-29 Pedro Alves <palves@redhat.com>
629 * remote.c (remote_target::extra_thread_info): Delete
630 'display_buf' and 'n' locals. from the cache, regardless of
631 packet mechanims is in use. Use cache for qThreadExtra and qP
634 2018-06-29 Pedro Alves <palves@redhat.com>
636 * blockframe.c (find_pc_sect_containing_function): New function.
637 * breakpoint.c (print_breakpoint_location): Don't call
638 find_pc_sect_function.
639 * linespec.c (create_sals_line_offset): Record the location's
641 * linespec.c (convert_address_location_to_sals): Fill in sal's
642 symbol with find_pc_sect_containing_function.
643 * symtab.c (find_function_start_sal): Rename to ...
644 (find_function_start_sal_1): ... this.
645 (find_function_start_sal): Reimplement as wrapper around
646 find_function_start_sal_1, and use
647 find_pc_sect_containing_function to fill in the sal's symbol.
648 (find_function_start_sal(symbol*, bool)): Adjust.
649 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
651 (find_pc_sect_containing_function): Declare.
653 2018-06-29 Pedro Alves <palves@redhat.com>
655 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
656 true if the the location has no symbol.
658 2018-06-28 Tom Tromey <tom@tromey.com>
660 * NEWS: Mention --enable-codesign.
661 * silent-rules.mk (ECHO_SIGN): New variable.
662 * configure.ac: Add --enable-codesign.
663 * configure: Rebuild.
664 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
665 (gdb$(EXEEXT)): Optionally invoke codesign.
667 2018-06-28 Pedro Alves <palves@redhat.com>
669 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
671 (switch_to_thread_no_regs): Adjust comment.
672 * infcmd.c (stop_pc): Delete.
673 (post_create_inferior, info_program_command): Replace references
674 to stop_pc with references to thread_info->suspend.stop_pc.
675 * inferior.h (stop_pc): Delete declaration.
676 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
677 (handle_inferior_event_1, handle_signal_stop)
678 (process_event_stop_test, keep_going_stepped_thread)
679 (handle_step_into_function, handle_step_into_function_backward)
680 (print_stop_location): Replace references to stop_pc with
681 references to thread_info->suspend.stop_pc.
682 (struct infcall_suspend_state) <stop_pc>: Delete field.
683 (save_infcall_suspend_state, restore_infcall_suspend_state):
684 Remove references to inf_stat->stop_pc.
685 * linux-fork.c (fork_load_infrun_state): Likewise.
686 * record-btrace.c (record_btrace_set_replay): Likewise.
687 * record-full.c (record_full_goto_entry): Likewise.
688 * remote.c (print_one_stopped_thread): Likewise.
689 * target.c (target_resume): Extend comment.
690 * thread.c (set_executing_thread): New.
691 (set_executing): Use it.
692 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
693 Remove references to stop_pc.
695 2018-06-28 Pedro Alves <palves@redhat.com>
697 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
698 Moving fetching stop_pc until after ecs->event_thread is refreshed.
700 2018-06-28 Tom Tromey <tom@tromey.com>
702 * coffread.c (coff_symfile_finish): Update.
703 * xcoffread.c (xcoff_symfile_finish): Update.
704 * elfread.c (elf_symfile_finish): Update.
705 * symfile.h (dwarf2_free_objfile): Don't declare.
706 * dwarf2read.c (_initialize_dwarf2_read): Use
707 register_objfile_data_with_cleanup.
708 (dwarf2_free_objfile): Now static. Change signature.
710 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
712 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
713 option "-o" to add-symbol-file-load to add an offset to each
714 section's load address.
715 * symfile.c (set_objfile_default_section_offset): New function.
717 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
719 * symfile.c (add_symbol_file_command): Make sure that sections
720 with the same name are sorted in the same order.
722 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
724 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
725 require the second argument. If omitted, load sections at the
726 addresses specified in the file.
728 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
730 * symfile.c (symbol_file_command, symbol_file_add_main_1)
731 (_initialize_symfile): Add option "-o" to symbol-file to add an
732 offset to each section of the symbol file.
734 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
736 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
738 2018-06-27 Tom Tromey <tom@tromey.com>
740 * stack.c (_initialize_stack): Update "func" help text.
742 2018-06-27 Tom Tromey <tom@tromey.com>
744 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
746 (unwind_infopy_str, pyuw_create_unwind_info)
747 (unwind_infopy_add_saved_register, pyuw_sniffer)
748 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
750 (struct saved_reg): Add constructor.
751 <value>: Now a gdbpy_ref<>.
753 2018-06-27 Tom Tromey <tom@tromey.com>
755 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
757 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
759 * gdb-gdb.py.in: Format using autopep8.
761 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
763 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
764 (type_lookup_function): Recognize CORE_ADDR values.
766 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
768 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
771 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
773 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
776 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
778 * gdb-gdb.py: Move to...
779 * gdb-gdb.py.in: ... here.
780 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
781 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
783 (distclean): Remove gdb-gdb.py when cleaning.
784 (gdb-gdb.py, gdb-gdb.gdb): New rules.
785 * configure: Re-generate.
787 2018-06-27 Pedro Alves <palves@redhat.com>
789 * proc-service.c (get_ps_regcache): New.
790 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
791 (ps_lsetfpregs): Use it.
793 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
796 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
797 (dwarf_decode_lines_1): Adjust.
799 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
801 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
803 <info_proc>: Likewise.
805 2018-06-26 Joel Brobecker <brobecker@adacore.com>
807 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
808 to windows_fetch_one_register, and only handle the case of
809 fetching one register. Move the code that reloads the context
810 and iterates over all registers if R is negative to...
811 (windows_nat_target::fetch_registers): ... here.
812 (do_windows_store_inferior_registers): Rename to
813 windows_store_one_register, and only handle the case of storing
814 one register. Move the code that handles the case where r is
816 (windows_nat_target::store_registers) ... here.
818 2018-06-26 Tom Tromey <tom@tromey.com>
821 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
822 * rust-lang.c (rust_print_struct_def): Add podata parameter.
824 (rust_internal_print_type): Add podata parameter.
825 (rust_print_type): Update.
827 2018-06-26 Tom Tromey <tom@tromey.com>
829 * typeprint.h (struct print_offset_data) <update, finish,
830 maybe_print_hole>: New methods.
831 <indentation>: New constant.
832 * typeprint.c (print_offset_data::indentation): Define.
833 (print_offset_data::maybe_print_hole, print_offset_data::update)
834 (print_offset_data::finish): Move from c-typeprint.c and rename.
835 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
836 (print_spaces_filtered_with_print_options): Update.
837 (c_print_type_union_field_offset, maybe_print_hole)
838 (c_print_type_struct_field_offset): Move to typeprint.c and
840 (c_type_print_base_struct_union): Update.
842 2018-06-25 Pedro Alves <palves@redhat.com>
844 * gdbthread.h (thread_info_ref, delete_thread)
845 (delete_thread_silent, first_thread_of_inferior)
846 (any_thread_of_inferior, switch_to_thread)
847 (enable_thread_stack_temporaries)
848 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
849 (get_last_thread_stack_temporary)
850 (value_in_thread_stack_temporaries, can_access_registers_thread):
851 Spell out "struct thread_info" instead of just "thread_info".
852 * inferior.h (notice_new_inferior): Likewise.
854 2018-06-25 Pedro Alves <palves@redhat.com>
856 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
857 pass thread_info pointer to delete_thread.
858 (windows_nat_target::detach): Pass inferior pointer to
860 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
862 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
863 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
864 and pass a thread_info pointer to delete_thread.
865 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
866 pass thread_info pointer to delete_thread.
867 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
868 delete_thread_silent call.
869 * procfs.c (procfs_target::detach): Pass inferior pointer to
871 (procfs_target::wait): Pass thread_info pointer to delete_thread.
872 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
873 delete_thread_silent call.
874 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
875 pass thread_info pointer to delete_thread.
876 (windows_nat_target::detach): Pass inferior pointer to
879 2018-06-22 Alan Hayward <alan.hayward@arm.com>
881 * regcache.c (readable_regcache::read_part): Fix asserts.
882 (reg_buffer::raw_collect_part): New function.
883 (regcache::write_part): Fix asserts.
884 (reg_buffer::raw_supply_part): New function.
885 (regcache::transfer_regset_register): New helper function.
886 (regcache::transfer_regset): Call new functions.
887 (regcache_supply_regset): Use gdb_byte*.
888 (regcache::supply_regset): Likewise.
889 (regcache_collect_regset): Likewise.
890 (regcache::collect_regset): Likewise.
891 * regcache.h (reg_buffer::raw_collect_part): New declaration.
892 (reg_buffer::raw_supply_part): Likewise.
893 (regcache::transfer_regset_register): Likewise.
894 (regcache::transfer_regset): Use gdb_byte*.
896 2018-06-22 Alan Hayward <alan.hayward@arm.com>
898 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
900 2018-06-21 Pedro Alves <palves@redhat.com>
902 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
903 instead of a ptid_t. All callers adjusted.
904 * ada-tasks.c (ada_get_task_number): Likewise. All callers
906 (print_ada_task_info, display_current_task_id, task_command_1):
908 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
910 (breakpoint_kind): Adjust.
911 (remove_breakpoints_pid): Rename to ...
912 (remove_breakpoints_inf): ... this. Adjust to take an inferior
913 pointer. All callers adjusted.
914 (bpstat_clear_actions): Use inferior_thread.
915 (get_bpstat_thread): New.
916 (bpstat_do_actions): Use it.
917 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
918 to take a thread_info pointer. All callers adjusted.
919 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
920 (breakpoint_re_set_thread): Use inferior_thread.
921 * breakpoint.h (struct inferior): Forward declare.
922 (bpstat_stop_status): Update.
923 (remove_breakpoints_pid): Delete.
924 (remove_breakpoints_inf): New.
925 * bsd-uthread.c (bsd_uthread_target::wait)
926 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
927 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
928 (maint_btrace_packet_history_cmd)
929 (maint_btrace_clear_packet_history_cmd): Adjust.
930 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
932 * cli/cli-interp.c: Include "inferior.h".
933 * common/refcounted-object.h (struct
934 refcounted_object_ref_policy): New.
935 * compile/compile-object-load.c: Include gdbthread.h.
936 (store_regs): Use inferior_thread.
937 * corelow.c (core_target::close): Use current_inferior.
938 (core_target_open): Adjust to use first_thread_of_inferior and use
939 the current inferior.
940 * ctf.c (ctf_target::close): Adjust to use current_inferior.
941 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
942 <thread>: ... this new field. All references adjusted.
943 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
944 Take a thread_info pointer instead of a ptid_t.
945 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
946 (dummy_frame_discard, register_dummy_frame_dtor): Take a
947 thread_info pointer instead of a ptid_t.
948 * elfread.c: Include "inferior.h".
949 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
951 * eval.c (evaluate_subexp): Likewise.
952 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
954 * gdb_proc_service.h (struct thread_info): Forward declare.
955 (struct ps_prochandle) <ptid>: Delete, replaced by ...
956 <thread>: ... this new field. All references adjusted.
957 * gdbarch.h, gdbarch.c: Regenerate.
958 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
959 'thread' parameter. All implementations and callers adjusted.
960 * gdbthread.h (thread_info) <set_running>: New method.
961 (delete_thread, delete_thread_silent): Take a thread_info pointer
963 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
964 (first_thread_of_process): Delete, replaced by ...
965 (first_thread_of_inferior): ... this new function. All callers
967 (any_live_thread_of_process): Delete, replaced by ...
968 (any_live_thread_of_inferior): ... this new function. All callers
970 (switch_to_thread, switch_to_no_thread): Declare.
971 (is_executing): Delete.
972 (enable_thread_stack_temporaries): Update comment.
973 <enable_thread_stack_temporaries>: Take a thread_info pointer
974 instead of a ptid_t. Incref the thread.
975 <~enable_thread_stack_temporaries>: Decref the thread.
978 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
979 (get_last_thread_stack_temporary)
980 (value_in_thread_stack_temporaries, can_access_registers_thread):
981 Take a thread_info pointer instead of a ptid_t. All callers
983 * infcall.c (get_call_return_value): Use inferior_thread.
984 (run_inferior_call): Work with thread pointers instead of ptid_t.
985 (call_function_by_hand_dummy): Work with thread pointers instead
986 of ptid_t. Use thread_info_ref.
987 * infcmd.c (proceed_thread_callback): Access thread's state
989 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
990 access thread's state directly.
991 (continue_command): Use inferior_thread.
992 (info_program_command): Use find_thread_ptid and access thread
994 (proceed_after_attach_callback): Use thread state directly.
995 (notice_new_inferior): Take a thread_info pointer instead of a
996 ptid_t. All callers adjusted.
997 (exit_inferior): Take an inferior pointer instead of a pid. All
999 (exit_inferior_silent): New.
1000 (detach_inferior): Delete.
1001 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1002 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1003 (detach_inferior_command, kill_inferior_command): Use
1004 find_inferior_id instead of valid_gdb_inferior_id and
1005 gdb_inferior_id_to_pid.
1006 (inferior_command): Use inferior and thread pointers.
1007 * inferior.h (struct thread_info): Forward declare.
1008 (notice_new_inferior): Take a thread_info pointer instead of a
1009 ptid_t. All callers adjusted.
1010 (detach_inferior): Delete declaration.
1011 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1012 instead of a pid. All callers adjusted.
1013 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1014 (valid_gdb_inferior_id): Delete.
1015 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1016 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1017 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1019 <inf>: ... this new field.
1020 <step_ptid>: Delete, replaced by ...
1021 <step_thread>: ... this new field.
1022 (get_displaced_stepping_state): Take an inferior pointer instead
1023 of a pid. All callers adjusted.
1024 (displaced_step_in_progress_any_inferior): Adjust.
1025 (displaced_step_in_progress_thread): Take a thread pointer instead
1026 of a ptid_t. All callers adjusted.
1027 (displaced_step_in_progress, add_displaced_stepping_state): Take
1028 an inferior pointer instead of a pid. All callers adjusted.
1029 (get_displaced_step_closure_by_addr): Adjust.
1030 (remove_displaced_stepping_state): Take an inferior pointer
1031 instead of a pid. All callers adjusted.
1032 (displaced_step_prepare_throw, displaced_step_prepare)
1033 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1034 All callers adjusted.
1035 (start_step_over): Adjust.
1036 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1037 displaced step queue.
1038 (do_target_resume): Adjust.
1039 (fetch_inferior_event): Use inferior_thread.
1040 (context_switch, get_inferior_stop_soon): Take an
1041 execution_control_state pointer instead of a ptid_t. All callers
1043 (switch_to_thread_cleanup): Delete.
1044 (stop_all_threads): Use scoped_restore_current_thread.
1045 * inline-frame.c: Include "gdbthread.h".
1046 (inline_state) <inline_state>: Take a thread pointer instead of a
1047 ptid_t. All callers adjusted.
1048 <ptid>: Delete, replaced by ...
1049 <thread>: ... this new field.
1050 (find_inline_frame_state): Take a thread pointer instead of a
1051 ptid_t. All callers adjusted.
1052 (skip_inline_frames, step_into_inline_frame)
1053 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1054 pointer instead of a ptid_t. All callers adjusted.
1055 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1056 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1057 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1059 * linux-nat.c (get_detach_signal): Likewise.
1060 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1061 (thread_db_notice_clone): Adjust.
1062 (thread_db_find_new_threads_silently)
1063 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1064 a thread pointer instead of a ptid_t. All callers adjusted.
1065 * mi/mi-cmd-var.c: Include "inferior.h".
1066 (mi_cmd_var_update_iter): Update to use thread pointers.
1067 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1069 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1071 (mi_output_running): ... this new function.
1072 (mi_on_resume_1): Adjust to use it.
1073 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1074 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1076 (interrupt_thread_callback): : Adjust to use thread and inferior
1078 * proc-service.c: Include "gdbthread.h".
1079 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1080 * progspace-and-thread.c: Include "inferior.h".
1081 * progspace.c: Include "inferior.h".
1082 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1083 hold a reference to an inferior_object.
1084 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1086 * python/py-inferior.c (struct inferior_object): Give the type a
1087 tag name instead of a typedef.
1088 (python_on_normal_stop): No need to check if the current thread is
1090 (inferior_to_inferior_object): Change return type to
1091 inferior_object. All callers adjusted.
1092 (find_thread_object): Delete, bits factored out to ...
1093 (thread_to_thread_object): ... this new function.
1094 * python/py-infthread.c (create_thread_object): Use
1095 inferior_to_inferior_object.
1096 (thpy_is_stopped): Use thread pointer directly.
1097 (gdbpy_selected_thread): Use inferior_thread.
1098 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1099 field, replaced with ...
1100 <thread>: ... this new field. All users adjusted.
1101 (btpy_insn_or_gap_new): Drop const.
1102 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1104 * python/py-record.c: Include "gdbthread.h".
1105 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1106 a ptid_t. All callers adjusted.
1107 (gdbpy_current_recording): Use inferior_thread.
1108 * python/py-record.h (recpy_record_object) <ptid>: Delete
1109 field, replaced with ...
1110 <thread>: ... this new field. All users adjusted.
1111 (recpy_element_object) <ptid>: Delete
1112 field, replaced with ...
1113 <thread>: ... this new field. All users adjusted.
1114 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1115 a ptid_t. All callers adjusted.
1116 * python/py-threadevent.c: Include "gdbthread.h".
1117 (get_event_thread): Use thread_to_thread_object.
1118 * python/python-internal.h (struct inferior_object): Forward
1120 (find_thread_object, find_inferior_object): Delete declarations.
1121 (thread_to_thread_object, inferior_to_inferior_object): New
1123 * record-btrace.c: Include "inferior.h".
1124 (require_btrace_thread): Use inferior_thread.
1125 (record_btrace_frame_sniffer)
1126 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1127 (get_thread_current_frame): Use scoped_restore_current_thread and
1129 (get_thread_current_frame): Use thread pointer directly.
1130 (record_btrace_replay_at_breakpoint): Use thread's inferior
1132 * record-full.c: Include "inferior.h".
1133 * regcache.c: Include "gdbthread.h".
1134 (get_thread_arch_regcache): Use the inferior's address space
1136 (get_thread_regcache, registers_changed_thread): New.
1137 * regcache.h (get_thread_regcache(thread_info *thread)): New
1139 (registers_changed_thread): New.
1140 (remote_target) <remote_detach_1>: Swap order of parameters.
1141 (remote_add_thread): <remote_add_thread>: Return the new thread.
1142 (get_remote_thread_info(ptid_t)): New overload.
1143 (remote_target::remote_notice_new_inferior): Use thread pointers
1145 (remote_target::process_initial_stop_replies): Use
1146 thread_info::set_running.
1147 (remote_target::remote_detach_1, remote_target::detach)
1148 (extended_remote_target::detach): Adjust.
1149 * stack.c (frame_show_address): Use inferior_thread.
1150 * target-debug.h (target_debug_print_thread_info_pp): New.
1151 * target-delegates.c: Regenerate.
1152 * target.c (default_thread_address_space): Delete.
1153 (memory_xfer_partial_1): Use current_inferior.
1154 (target_detach): Use current_inferior.
1155 (target_thread_address_space): Delete.
1156 (generic_mourn_inferior): Use current_inferior.
1157 * target.h (struct target_ops) <thread_address_space>: Delete.
1158 (target_thread_address_space): Delete.
1159 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1161 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1162 thread pointer instead of a ptid_t. Adjust all callers.
1163 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1164 (first_thread_of_process): Delete, replaced by ...
1165 (first_thread_of_inferior): ... this new function. All callers
1167 (any_thread_of_process): Rename to ...
1168 (any_thread_of_inferior): ... this, and take an inferior pointer.
1169 (any_live_thread_of_process): Rename to ...
1170 (any_live_thread_of_inferior): ... this, and take an inferior
1172 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1173 (value_in_thread_stack_temporaries)
1174 (get_last_thread_stack_temporary): Take a thread pointer instead
1175 of a ptid_t. Adjust all callers.
1176 (thread_info::set_running): New.
1177 (validate_registers_access): Use inferior_thread.
1178 (can_access_registers_ptid): Rename to ...
1179 (can_access_registers_thread): ... this, and take a thread
1181 (print_thread_info_1): Adjust to compare thread pointers instead
1183 (switch_to_no_thread, switch_to_thread): Make extern.
1184 (scoped_restore_current_thread::~scoped_restore_current_thread):
1185 Use m_thread pointer directly.
1186 (scoped_restore_current_thread::scoped_restore_current_thread):
1187 Use inferior_thread.
1188 (thread_command): Use thread pointer directly.
1189 (thread_num_make_value_helper): Use inferior_thread.
1190 * top.c (execute_command): Use inferior_thread.
1191 * tui/tui-interp.c: Include "inferior.h".
1192 * varobj.c (varobj_create): Use inferior_thread.
1193 (value_of_root_1): Use find_thread_global_id instead of
1194 global_thread_id_to_ptid.
1196 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1198 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1200 (regcache::write_part): Likewise.
1201 (readable_regcache::cooked_read_part): Update comment.
1202 (readable_regcache::cooked_write_part): Likewise.
1203 * regcache.h: (readable_regcache::read_part): Likewise.
1204 (regcache::write_part): Likewise.
1206 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1207 Dirk Schubert <dirk.schubert@arm.com>
1209 * aarch64-linux-nat.c (post_attach): New.
1210 (aarch64_linux_nat_target::post_attach): Override post_attach to
1211 record the number of hardware debug registers.
1213 2018-06-20 Tom Tromey <tom@tromey.com>
1215 * python/py-param.c (add_setshow_generic): Make parameters const.
1216 (parmpy_init): Update.
1218 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1220 * regcache.h (regcache_cooked_read_ftype): Rename to...
1221 (register_read_ftype): ...this, change type to function_view.
1222 (class reg_buffer) <save>: Remove src parameter.
1223 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1224 parameter non-const in first overload. Remove src parameter in
1226 * regcache.c (do_cooked_read): Remove.
1227 (readonly_detached_regcache::readonly_detached_regcache): Make
1228 parameter non-const, adjust call to other constructor.
1229 (reg_buffer::save): Remove src parameter.
1230 * frame.c (do_frame_register_read): Remove.
1231 (frame_save_as_regcache): Use lambda function.
1232 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1233 parameter to ppu2spu_data *.
1234 (ppu2spu_sniffer): Use lambda function.
1236 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1238 * record-full.c (record_full_target::insert_breakpoint): Remove
1239 "struct" keyword, add const.
1241 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1243 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1244 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1245 * configure.ac: Remove AC_PREREQ, add missing quoting.
1246 * gnulib/configure.ac: Modernize usage of
1247 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1248 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1249 (AUTOMAKE_VERSION): Bump to 1.15.1.
1250 * configure: Re-generate.
1251 * config.in: Re-generate.
1252 * aclocal.m4: Re-generate.
1253 * gnulib/aclocal.m4: Re-generate.
1254 * gnulib/config.in: Re-generate.
1255 * gnulib/configure: Re-generate.
1256 * gnulib/import/Makefile.in: Re-generate.
1258 2018-06-19 Pedro Alves <palves@redhat.com>
1260 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1261 (lookup_minimal_symbol_by_pc_section): ... here with
1262 gdb_assert_not_reached added.
1264 2018-06-19 Pedro Alves <palves@redhat.com>
1266 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1267 parameter with a block parameter. Compare location's block symbol
1268 with the frame's block instead of addresses.
1269 (skip_inline_frames): Pass the current block instead of the
1270 frame's address. Break out as soon as we determine the frame
1271 should not be skipped.
1273 2018-06-18 Tom Tromey <tom@tromey.com>
1275 * solib-aix.c (solib_aix_get_section_offsets): Return
1277 (solib_aix_solib_create_inferior_hook): Update.
1279 2018-06-18 Tom Tromey <tom@tromey.com>
1281 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1283 2018-06-18 Tom Tromey <tom@tromey.com>
1285 * solib-frv.c (frv_relocate_main_executable): Use
1287 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1290 2018-06-18 Tom Tromey <tom@tromey.com>
1292 * objfiles.h (inhibit_section_map_updates): Update.
1293 (resume_section_map_updates, resume_section_map_updates_cleanup):
1295 * solib-svr4.c (svr4_handle_solib_event): Update.
1296 * objfiles.c (inhibit_section_map_updates): Return
1297 scoped_restore_tmpl<int>.
1298 (resume_section_map_updates, resume_section_map_updates_cleanup):
1301 2018-06-18 Tom Tromey <tom@tromey.com>
1303 * valprint.h (read_string): Update.
1304 * valprint.c (read_string): Change type of "buffer".
1305 (val_print_string): Update.
1306 * python/py-value.c (valpy_string): Update.
1307 * language.h (struct language_defn) <la_get_string>: Change
1309 (default_get_string, c_get_string): Update.
1310 * language.c (default_get_string): Change type of "buffer".
1311 * guile/scm-value.c (gdbscm_value_to_string): Update.
1312 * c-lang.c (c_get_string): Change type of "buffer".
1314 2018-06-18 Tom Tromey <tom@tromey.com>
1316 * ser-mingw.c (struct pipe_state_destroyer): New.
1317 (pipe_state_up): New typedef.
1318 (cleanup_pipe_state): Remove.
1319 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1321 2018-06-18 Tom Tromey <tom@tromey.com>
1323 * rust-lang.h (rust_yyerror): Don't declare.
1324 * rust-lang.c (rust_language_defn): Update.
1325 * rust-exp.y (yyerror): Now static.
1326 * parse.c (parse_exp_in_context_1): Update.
1327 * p-lang.h (p_yyerror): Don't declare.
1328 * p-lang.c (p_language_defn): Update.
1329 * p-exp.y (yyerror): Now static.
1330 * opencl-lang.c (opencl_language_defn): Update.
1331 * objc-lang.c (objc_language_defn): Update.
1332 * m2-lang.h (m2_yyerror): Don't declare.
1333 * m2-lang.c (m2_language_defn): Update.
1334 * m2-exp.y (yyerror): Now static.
1335 * language.h (struct language_defn) <la_error>: Remove.
1336 * language.c (unk_lang_error): Remove.
1337 (unknown_language_defn, auto_language_defn): Remove.
1338 * go-lang.h (go_yyerror): Don't declare.
1339 * go-lang.c (go_language_defn): Update.
1340 * go-exp.y (yyerror): Now static.
1341 * f-lang.h (f_yyerror): Don't declare.
1342 * f-lang.c (f_language_defn): Update.
1343 * f-exp.y (yyerror): Now static.
1344 * d-lang.h (d_yyerror): Don't declare.
1345 * d-lang.c (d_language_defn): Update.
1346 * d-exp.y (yyerror): Now static.
1347 * c-lang.h (c_yyerror): Don't declare.
1348 * c-lang.c (c_language_defn, cplus_language_defn)
1349 (asm_language_defn, minimal_language_defn): Update.
1350 * c-exp.y (yyerror): Now static.
1351 * ada-lang.h (ada_yyerror): Don't declare.
1352 * ada-lang.c (ada_language_defn): Update.
1353 * ada-exp.y (yyerror): Now static.
1355 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1357 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1358 (store_sveregs_to_thread): Likewise.
1359 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1360 (aarch64_linux_store_inferior_registers): Likewise.
1361 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1363 (aarch64_sve_regs_copy_to_regcache): Likewise.
1364 (aarch64_sve_regs_copy_from_regcache): Likewise.
1365 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1367 (aarch64_sve_regs_copy_to_regcache): Likewise.
1368 (aarch64_sve_regs_copy_from_regcache): Likewise.
1369 (sve_context): Structure from Linux headers.
1370 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1371 (SVE_SIG_ZREG_SIZE): Likewise.
1372 (SVE_SIG_PREG_SIZE): Likewise.
1373 (SVE_SIG_FFR_SIZE): Likewise.
1374 (SVE_SIG_REGS_OFFSET): Likewise.
1375 (SVE_SIG_ZREGS_OFFSET): Likewise.
1376 (SVE_SIG_ZREG_OFFSET): Likewise.
1377 (SVE_SIG_ZREGS_SIZE): Likewise.
1378 (SVE_SIG_PREGS_OFFSET): Likewise.
1379 (SVE_SIG_PREG_OFFSET): Likewise.
1380 (SVE_SIG_PREGS_SIZE): Likewise.
1381 (SVE_SIG_FFR_OFFSET): Likewise.
1382 (SVE_SIG_REGS_SIZE): Likewise.
1383 (SVE_SIG_CONTEXT_SIZE): Likewise.
1384 (SVE_PT_REGS_MASK): Likewise.
1385 (SVE_PT_REGS_FPSIMD): Likewise.
1386 (SVE_PT_REGS_SVE): Likewise.
1387 (SVE_PT_VL_INHERIT): Likewise.
1388 (SVE_PT_VL_ONEXEC): Likewise.
1389 (SVE_PT_REGS_OFFSET): Likewise.
1390 (SVE_PT_FPSIMD_OFFSET): Likewise.
1391 (SVE_PT_FPSIMD_SIZE): Likewise.
1392 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1393 (SVE_PT_SVE_PREG_SIZE): Likewise.
1394 (SVE_PT_SVE_FFR_SIZE): Likewise.
1395 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1396 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1397 (__SVE_SIG_TO_PT): Likewise.
1398 (SVE_PT_SVE_OFFSET): Likewise.
1399 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1400 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1401 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1402 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1403 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1404 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1405 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1406 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1407 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1408 (SVE_PT_SVE_SIZE): Likewise.
1409 (SVE_PT_SIZE): Likewise.
1410 (HAS_SVE_STATE): New define.
1412 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1414 * nat/aarch64-sve-linux-sigcontext.h: New file.
1415 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1417 (SVE_VQ_MIN): Likewise.
1418 (SVE_VQ_MAX): Likewise.
1419 (SVE_VL_MIN): Likewise.
1420 (SVE_VL_MAX): Likewise.
1421 (SVE_NUM_ZREGS): Likewise.
1422 (SVE_NUM_PREGS): Likewise.
1423 (sve_vl_valid): Likewise.
1424 (struct user_sve_header): Likewise.
1426 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1427 Richard Bunt <Richard.Bunt@arm.com>
1429 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1430 was requested by GDB.
1432 2018-06-15 Tom de Vries <tdevries@suse.de>
1434 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1436 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1438 * gnulib/update-gnulib.sh: Print expected versions of
1441 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1443 * arch-utils.c (default_type_align): Use type_length_units.
1444 * gdbtypes.c (type_align): Use type_length_units.
1446 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1448 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1449 of 'define' command.
1451 2018-06-14 Tom de Vries <tdevries@suse.de>
1454 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1455 get_no_prettyformat_print_options.
1457 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1459 * sparc-nat.h: Include target.h.
1460 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1461 <fetch_registers>: Remove this argument in function call.
1462 <store_registers>: Remove this argument in function call, remove
1464 <low_forget_process>: Call sparc64_forget_process instead of
1465 sparc_forget_process.
1467 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1469 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1470 (procfs_target::make_corefile_notes): Adjust to new
1471 target_read_alloc return type.
1473 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1474 Stephen Roberts <stephen.roberts@arm.com>
1477 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1478 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1479 Move should_notify_stop local into more inner scope.
1481 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1482 Stephen Roberts <stephen.roberts@arm.com>
1485 * infrun.c (resume_1): Add call to mark_async_event_handler.
1487 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1489 * infrun.c (do_target_wait): Change old version of $pc printed.
1491 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1493 * dwarf2read.c (read_index_from_section): Rename to...
1494 (read_gdb_index_from_section): ... this, update all callers.
1495 (dwarf2_read_index): Rename to...
1496 (dwarf2_read_gdb_index): ... this, update all callers.
1498 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1500 * gdb/hppa-linux-nat.c
1501 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1502 hppa_linux_nat_target::fetch_registers.
1504 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1506 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1507 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1508 (AARCH64_DWARF_SVE_FFR): Likewise.
1509 (AARCH64_DWARF_SVE_P0): Likewise.
1510 (AARCH64_DWARF_SVE_Z0): Likewise.
1512 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1514 * common/common-regcache.h (raw_compare): New function.
1515 * regcache.c (regcache::raw_compare): Likewise.
1516 * regcache.h (regcache::raw_compare): New declaration.
1518 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1520 * common/common-regcache.h (reg_buffer_common): New structure.
1521 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1522 (reg_buffer::raw_supply): Likewise.
1523 (reg_buffer::raw_supply_integer): Likewise.
1524 (reg_buffer::raw_supply_zeroed): Likewise.
1525 (reg_buffer::raw_collect): Likewise.
1526 (reg_buffer::raw_collect_integer): Likewise.
1527 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1528 (reg_buffer::raw_supply): Likewise.
1529 (reg_buffer::raw_supply_integer): Likewise.
1530 (reg_buffer::raw_supply_zeroed): Likewise.
1531 (reg_buffer::raw_collect): Likewise.
1532 (reg_buffer::raw_collect_integer): Likewise.
1534 2018-06-10 Tom Tromey <tom@tromey.com>
1536 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1537 (class remote_state) <stop_reply_queue>: Now std::vector.
1538 (remote_state::~remote_state)
1539 (remote_target::stop_reply_queue_length): Update.
1540 (struct queue_iter_param, remove_child_of_pending_fork)
1541 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1542 (check_pending_event_prevents_wildcard_vcont_callback)
1543 (remove_stop_reply_for_inferior)
1544 (remove_stop_reply_of_remote_state)
1545 (remote_notif_remove_once_on_match)
1546 (stop_reply_match_ptid_and_ws)
1547 (remote_kill_child_of_pending_fork): Remove.
1548 (remote_target::remove_new_fork_children)
1549 (remote_target::check_pending_events_prevent_wildcard_vcont)
1550 (remote_target::discard_pending_stop_replies)
1551 (remote_target::discard_pending_stop_replies_in_queue)
1552 (remote_target::remote_notif_remove_queued_reply)
1553 (remote_target::queued_stop_reply)
1554 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1555 (remote_target::wait, remote_target::kill_new_fork_children)
1556 (remote_target::async): Update.
1558 2018-06-10 Tom Tromey <tom@tromey.com>
1560 * record-full.c (record_full_arch_list_cleanups): Remove.
1561 (record_full_message): Use try/catch.
1562 (record_full_wait_cleanups): Remove.
1563 (record_full_wait_1): Use try/catch.
1564 (record_full_restore): Likewise.
1566 2018-06-10 Tom Tromey <tom@tromey.com>
1568 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1569 declare VEC. Add constructor.
1570 <in_target_beneath>: Now bool.
1571 (record_full_breakpoints): Now a std::vector, static.
1572 (record_full_sync_record_breakpoints)
1573 (record_full_init_record_breakpoints)
1574 (record_full_target::insert_breakpoint)
1575 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1577 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1579 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1580 * serial.c (serial_interface_lookup): Remove struct keyword.
1582 2018-06-10 Tom Tromey <tom@tromey.com>
1584 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1586 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1588 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1590 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1591 "beneath" as a method.
1592 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1593 Use "beneath" as a method.
1595 2018-06-10 Tom Tromey <tom@tromey.com>
1597 * tracefile.c (struct trace_file_writer_deleter): New.
1598 <operator()>: Rename from trace_file_writer_xfree.
1599 (trace_file_writer_up): New typedef.
1600 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1602 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1604 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1605 <m_registers, m_register_status>: Change type to
1607 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1610 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1612 * common/common-regcache.h (enum register_status): Add
1613 underlying type "signed char".
1614 * regcache.h (reg_buffer) <m_register_status>: Change type to
1616 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1617 register_status instead of signed char.
1618 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1619 (reg_buffer::get_register_status): Remove cast.
1620 (readable_regcache::raw_read): Remove cast.
1621 (readable_regcache::cooked_read): Remove cast.
1623 2018-06-09 Tom Tromey <tom@tromey.com>
1625 * source.c (reverse_search_command, forward_search_command): Use
1628 2018-06-09 Tom Tromey <tom@tromey.com>
1630 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1631 (serial_ops_list): Now static, std::vector.
1632 (serial_interface_lookup, serial_add_interface): Update.
1634 2018-06-09 Tom Tromey <tom@tromey.com>
1636 * dwarf2read.c (process_cu_includes): Update.
1637 (process_full_comp_unit): Update.
1638 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1641 2018-06-08 Paul Koning <paul_koning@dell.com>
1645 * python/python.c (do_start_initialization):
1646 Avoid call to internal Python API.
1647 (init__gdb_module): New function.
1649 2018-06-08 Gary Benson <gbenson@redhat.com>
1651 * linux-thread-db.c (valprint.h): New include.
1652 (struct check_thread_db_info): New structure.
1653 (check_thread_db_on_load, tdb_testinfo): New static globals.
1654 (check_thread_db, check_thread_db_callback): New functions.
1655 (try_thread_db_load_1): Run integrity checks if requested.
1656 (maintenance_check_libthread_db): New function.
1657 (_initialize_thread_db): Register "maint check libthread-db"
1658 and "maint set/show check-libthread-db".
1659 * NEWS: Mention the above new commands.
1661 2018-06-08 Tom Tromey <tom@tromey.com>
1663 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1666 2018-06-08 Tom Tromey <tom@tromey.com>
1668 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1670 2018-06-08 Tom Tromey <tom@tromey.com>
1672 * common/btrace-common.h (struct btrace_data): Add constructor,
1673 destructor, move assignment operator.
1674 <empty, clear, fini>: New methods.
1675 <format>: Initialize.
1676 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1677 (btrace_data_empty): Don't declare.
1678 * common/btrace-common.c (btrace_data_init): Remove.
1679 (btrace_data::fini): Rename from btrace_data_fini.
1680 (btrace_data::empty): Rename from btrace_data_empty.
1681 (btrace_data::clear): Rename from btrace_data_clear. Return
1683 * btrace.h (make_cleanup_btrace_data): Don't declare.
1684 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1685 (parse_xml_btrace): Update.
1686 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1687 (maint_btrace_clear_packet_history_cmd): Update.
1689 2018-06-07 Pedro Alves <palves@redhat.com>
1691 * target.h (target_ops) <beneath>: Now a method. All references
1693 (class target_stack): New.
1694 * target.c (g_target_stack): New.
1695 (g_current_top_target): Delete.
1696 (current_top_target): Get the top target out of g_target_stack.
1697 (target_stack::push, target_stack::unpush): New.
1698 (push_target, unpush_target): Reimplement.
1699 (target_is_pushed): Reimplement in terms of g_target_stack.
1700 (target_ops::beneath, target_stack::find_beneath): New.
1702 2018-06-07 Pedro Alves <palves@redhat.com>
1704 * target.h (find_target_beneath): Delete declaration.
1705 * target.c (find_target_beneath): Delete definition.
1706 * aix-thread.c: All callers of find_target_beneath adjusted to
1707 call target_ops::beneath instead.
1708 * bsd-uthread.c: Likewise.
1709 * linux-thread-db.c: Likewise.
1710 * ravenscar-thread.c: Likewise.
1711 * sol-thread.c: Likewise.
1712 * spu-multiarch.c: Likewise.
1714 2018-06-07 Pedro Alves <palves@redhat.com>
1716 * target.h (target_ops) <beneath>: Now a method. All references
1718 (target_ops) <m_beneath>: New.
1719 * target.c (target_ops::beneath): New.
1720 * corelow.c: Adjust all references to target_ops::beneath.
1721 * linux-thread-db.c: Likewise.
1722 * make-target-delegates: Likewise.
1723 * record-btrace.c: Likewise.
1724 * record-full.c: Likewise.
1725 * remote.c: Likewise.
1726 * target.c: Likewise.
1727 * target-delegates.c: Regenerate.
1729 2018-06-07 Pedro Alves <palves@redhat.com>
1731 * target.h (target_stack): Delete.
1732 (current_top_target): Declare function.
1733 * target.c (target_stack): Delete.
1734 (g_current_top_target): New.
1735 (current_top_target): New function.
1736 * auxv.c: Use current_top_target instead of target_stack
1738 * avr-tdep.c: Likewise.
1739 * breakpoint.c: Likewise.
1740 * corefile.c: Likewise.
1741 * elfread.c: Likewise.
1743 * exceptions.c: Likewise.
1744 * frame.c: Likewise.
1745 * gdbarch-selftests.c: Likewise.
1746 * gnu-v3-abi.c: Likewise.
1747 * ia64-tdep.c: Likewise.
1748 * ia64-vms-tdep.c: Likewise.
1749 * infcall.c: Likewise.
1750 * infcmd.c: Likewise.
1751 * infrun.c: Likewise.
1752 * linespec.c: Likewise.
1753 * linux-tdep.c: Likewise.
1754 * minsyms.c: Likewise.
1755 * ppc-linux-nat.c: Likewise.
1756 * ppc-linux-tdep.c: Likewise.
1757 * procfs.c: Likewise.
1758 * regcache.c: Likewise.
1759 * remote.c: Likewise.
1760 * rs6000-tdep.c: Likewise.
1761 * s390-linux-nat.c: Likewise.
1762 * s390-tdep.c: Likewise.
1763 * solib-aix.c: Likewise.
1764 * solib-darwin.c: Likewise.
1765 * solib-dsbt.c: Likewise.
1766 * solib-spu.c: Likewise.
1767 * solib-svr4.c: Likewise.
1768 * solib-target.c: Likewise.
1769 * sparc-tdep.c: Likewise.
1770 * sparc64-tdep.c: Likewise.
1771 * spu-tdep.c: Likewise.
1772 * symfile.c: Likewise.
1773 * symtab.c: Likewise.
1774 * target-descriptions.c: Likewise.
1775 * target-memory.c: Likewise.
1776 * target.c: Likewise.
1777 * target.h: Likewise.
1778 * tracefile-tfile.c: Likewise.
1779 * tracepoint.c: Likewise.
1780 * valops.c: Likewise.
1781 * valprint.c: Likewise.
1782 * value.c: Likewise.
1783 * windows-tdep.c: Likewise.
1784 * mi/mi-main.c: Likewise.
1786 2018-06-07 Tom Tromey <tom@tromey.com>
1788 * valprint.h (build_address_symbolic): Declare.
1789 * printcmd.c (print_address_symbolic): Update.
1790 (build_address_symbolic): Change "name" and "filename" to
1792 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1794 * defs.h (build_address_symbolic): Remove declaration.
1796 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1798 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1799 (aarch64_vnv_type): Add function.
1800 (aarch64_pseudo_register_name): Add V regs for SVE.
1801 (aarch64_pseudo_register_type): Likewise.
1802 (aarch64_pseudo_register_reggroup_p): Likewise.
1803 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1804 (aarch64_pseudo_read_value): Add V regs for SVE.
1805 (aarch64_pseudo_write_2): Use V0 offset for SVE
1806 (aarch64_pseudo_write): Add V regs for SVE.
1807 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1809 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1811 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1812 (sve_vl_from_vq): Likewise.
1814 2018-06-05 Tom Tromey <tom@tromey.com>
1816 * cli/cli-cmds.c (show_version): Update.
1817 * top.c (print_gdb_version): Add "interactive" parameter.
1819 * main.c (captured_main_1): Update.
1820 * top.h (print_gdb_version): Add "interactive" parameter and a
1823 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1825 * common/enum-flags.h: Add trailing semicolon to example in
1828 2018-06-05 Tom Tromey <tom@tromey.com>
1831 * NEWS: Add entry about pager.
1832 * utils.c (pagination_disabled_for_command): New global.
1833 (prompt_for_continue): Allow "c" response to prompt.
1834 (reinitialize_more_filter): Clear
1835 pagination_disabled_for_command.
1836 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1838 2018-06-04 Tom Tromey <tom@tromey.com>
1840 * ada-lang.h (ada_lookup_symbol_list): Update.
1841 * ada-lang.c (resolve_subexp): Update.
1842 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1844 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1845 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1846 results parameter to std::vector.
1847 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1849 * ada-exp.y (block_lookup): Update.
1850 (select_possible_type_sym): Change type of syms. Remove nsyms
1852 (write_var_or_type, write_name_assoc): Update.
1854 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1856 * windows-nat.c (windows_nat_target::xfer_partial): Return
1857 TARGET_XFER_E_IO if we need to delegate to the target beneath
1858 but BENEATH is NULL.
1860 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1862 * Makefile.in (config.status): Add configure.nat as a
1865 2018-06-04 Tom Tromey <tom@tromey.com>
1867 * cp-name-parser.y (cpname_state): Add method declarations.
1868 (HANDLE_QUAL): Update.
1869 (cpname_state::d_grab, cpname_state::fill_comp)
1870 (cpname_state::make_operator, cpname_state::make_dtor)
1871 (cpname_state::make_builtin_type, cpname_state::make_name)
1872 (cpname_state::d_qualify, cpname_state::d_int_type)
1873 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1874 (%union): Move earlier.
1876 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1878 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1880 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1882 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1883 (aarch64_pseudo_write_1): Likewise.
1884 (aarch64_pseudo_read_value): Use helper.
1885 (aarch64_pseudo_write): Likewise.
1887 2018-06-04 Pedro Alves <palves@redhat.com>
1889 * darwin-nat.c (darwin_ops): Delete.
1890 (darwin_attach_pid): Use get_native_target.
1892 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1894 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1895 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1897 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1899 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1900 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1901 (aarch64_gdbarch_init): Check for SVE.
1902 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1904 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1906 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1907 * aarch64-tdep.h (aarch64_read_description): Likewise.
1908 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1909 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1910 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1911 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1912 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1914 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1916 * value.c (value_fetch_lazy_bitfield): New.
1917 (value_fetch_lazy_memory): New.
1918 (value_fetch_lazy_register): New.
1919 (value_fetch_lazy): Factor out to smaller functions.
1921 2018-06-01 Tom Tromey <tom@tromey.com>
1923 * cp-name-parser.y (backslashable, represented): Now const.
1925 2018-06-01 Tom Tromey <tom@tromey.com>
1927 * cp-name-parser.y: Include parser-defs.h.
1928 (parser_fprintf): Remove declaration.
1930 2018-06-01 Tom Tromey <tom@tromey.com>
1932 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1934 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1935 (global_result): Remove globals.
1936 (struct cpname_state): New.
1937 (yyparse): Don't declare.
1938 (yylex, yyerror): Move declarations after %union.
1939 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1940 (make_name): Add state parameter.
1942 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1944 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1946 (yylex): Add lvalp, state parameters.
1947 (yyerror): Add state parameter.
1948 (cp_demangled_name_to_comp): Update.
1950 2018-06-01 Tom Tromey <tom@tromey.com>
1952 * cp-name-parser.y (parser_fprintf): Declare.
1953 (GDB_YY_REMAP_PREFIX): Define.
1954 Include yy-remap.h. Don't redefine yy* identifiers.
1956 2018-06-01 Tom Tromey <tom@tromey.com>
1958 * python/py-type.c (typy_legacy_template_argument): Update.
1959 * cp-support.h (cp_demangled_name_to_comp): Update.
1960 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1961 parameter to be a "std::string *".
1964 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1966 * ada-lex.l: Include "diagnostics.h" instead of
1967 "common/diagnostics.h".
1968 * unittests/environ-selftests.c: Likewise.
1969 * common/diagnostics.h: Moved to ../include.
1971 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1973 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1974 to language_mode_manual while calling breakpoint_re_set_one.
1976 2018-06-01 Tom Tromey <tom@tromey.com>
1978 * valops.c (value_cast_structs, destructor_name_p): Update.
1979 * symtab.c (gdb_mangle_name): Update.
1980 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1982 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1983 (pascal_object_print_value_fields, pascal_object_print_value):
1985 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1986 * linespec.c (find_methods): Update.
1987 * gdbtypes.h (type_name_no_tag): Remove.
1988 (type_name_or_error): Rename from type_name_no_tag_or_error.
1989 * gdbtypes.c (type_name_no_tag): Remove.
1990 (type_name_or_error): Rename from type_name_no_tag_or_error.
1991 (lookup_struct_elt_type, check_typedef): Update.
1992 * expprint.c (print_subexp_standard): Update.
1993 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1994 * d-namespace.c (d_lookup_nested_symbol): Update.
1995 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1996 (cp_print_class_member): Update.
1997 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1998 * completer.c (add_struct_fields): Update.
1999 * c-typeprint.c (cp_type_print_derivation_info)
2000 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2002 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2003 (ada_prefer_type, ada_is_exception_sym): Update.
2005 2018-06-01 Tom Tromey <tom@tromey.com>
2007 * valops.c (enum_constant_from_type, value_namespace_elt)
2008 (value_maybe_namespace_elt): Update.
2009 * valarith.c (find_size_for_pointer_math): Update.
2010 * target-descriptions.c (make_gdb_type): Update.
2011 * symmisc.c (print_symbol): Update.
2012 * stabsread.c (define_symbol, read_type)
2013 (complain_about_struct_wipeout, add_undefined_type)
2014 (cleanup_undefined_types_1): Update.
2015 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2016 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2017 (rust_internal_print_type, rust_composite_type)
2018 (rust_evaluate_funcall, rust_evaluate_subexp)
2019 (rust_inclusive_range_type_p): Update.
2020 * python/py-type.c (typy_get_tag): Update.
2021 * p-typeprint.c (pascal_type_print_base): Update.
2022 * mdebugread.c (parse_symbol, parse_type): Update.
2023 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2025 * guile/scm-type.c (gdbscm_type_tag): Update.
2026 * go-lang.c (sixg_string_p): Update.
2027 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2029 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2030 (TYPE_TAG_NAME): Remove.
2031 * gdbtypes.c (type_name_no_tag): Simplify.
2032 (check_typedef, check_types_equal, recursive_dump_type)
2033 (copy_type_recursive, arch_composite_type): Update.
2034 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2035 in summary mode when needed.
2036 * eval.c (evaluate_funcall): Update.
2037 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2038 (process_structure_scope, read_enumeration_type)
2039 (read_namespace_type, read_module_type, determine_prefix): Update.
2040 * cp-support.c (inspect_type): Update.
2041 * coffread.c (process_coff_symbol, decode_base_type): Update.
2042 * c-varobj.c (c_is_path_expr_parent): Update.
2043 * c-typeprint.c (c_type_print_base_struct_union): Update.
2044 (c_type_print_base_1): Update. Print struct/class/union/enum in
2045 summary when using C language.
2046 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2047 (gen_maybe_namespace_elt): Update.
2048 * ada-lang.c (ada_type_name): Simplify.
2049 (empty_record, ada_template_to_fixed_record_type_1)
2050 (template_to_static_fixed_type)
2051 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2053 2018-06-01 Tom Tromey <tom@tromey.com>
2055 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2057 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2058 (c_print_type): Update.
2059 (c_print_type): New overload.
2060 (c_type_print_varspec_prefix, c_type_print_args)
2061 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2062 (c_type_print_base_struct_union, c_type_print_base_1)
2063 (cp_type_print_method_args): Add "language" parameter.
2064 (c_type_print_base): Update.
2065 * c-lang.h (c_print_type): Add new overload.
2067 2018-06-01 Tom Tromey <tom@tromey.com>
2069 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2070 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2072 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2074 * aarch64-tdep.c (aarch64_sve_register_names): New const
2076 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2077 (AARCH64_SVE_Z_REGS_NUM): New define.
2078 (AARCH64_SVE_P_REGS_NUM): Likewise.
2079 (AARCH64_SVE_NUM_REGS): Likewise.
2081 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2083 * nat/linux-ptrace.h [__alpha__]
2084 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2087 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2089 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2090 the endianness selected.
2091 * NEWS: Document `set endian auto' mode operation update.
2093 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2095 * Makefile.in: Add new header.
2096 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2097 (sve_vl_from_vg): Likewise.
2098 (sve_vq_from_vl): Likewise.
2099 (sve_vl_from_vq): Likewise.
2100 (sve_vq_from_vg): Likewise.
2101 (sve_vg_from_vq): Likewise.
2102 * configure.nat: Add new c file.
2103 * nat/aarch64-sve-linux-ptrace.c: New file.
2104 * nat/aarch64-sve-linux-ptrace.h: New file.
2106 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2108 * aarch64-linux-nat.c (aarch64_linux_read_description):
2110 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2112 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2113 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2114 (aarch64_gdbarch_init): Add parmeter zero.
2115 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2116 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2117 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2119 * doc/gdb.texinfo: Describe SVE feature
2120 * features/aarch64-sve.c: New file.
2122 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2125 * gdbarch.sh (significant_addr_bit): Default to zero when
2126 not set by target architecture.
2127 * gdbarch.c: Re-generated.
2128 * utils.c (address_significant): Update.
2130 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2132 * stack.c (func_command): Remove trailing newline in call to error.
2134 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2136 * regcache.h (regcache_raw_collect): Remove, update callers to
2137 use regcache::raw_collect.
2138 * regcache.c (regcache_raw_collect): Remove.
2140 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2142 * regcache.h (regcache_raw_supply): Remove, update callers to
2143 use detached_regcache::raw_supply.
2144 * regcache.c (regcache_raw_supply): Remove.
2146 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2148 * regcache.h (regcache_cooked_write_part): Remove, update
2149 callers to use regcache::cooked_write_part.
2150 * regcache.c (regcache_cooked_write_part): Remove.
2152 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2154 * regcache.h (regcache_cooked_read_part): Remove, update callers
2155 to use readable_regcache::cooked_read_part.
2156 * regcache.c (regcache_cooked_read_part): Remove.
2158 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2160 * regcache.h (regcache_cooked_read_value): Remove, update
2161 callers to use readable_regcache::cooked_read_value.
2162 * regcache.c (regcache_cooked_read_value): Remove.
2164 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2166 * regcache.h (regcache_cooked_write): Remove, update callers to
2167 use regcache::cooked_write.
2168 * regcache.c (regcache_cooked_write): Remove.
2170 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2172 * regcache.h (regcache_invalidate): Remove, update callers to
2173 use detached_regcache::invalidate instead.
2174 * regcache.c (regcache_invalidate): Remove.
2176 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2178 * regcache.h (regcache_raw_write_part): Remove, update callers
2179 to use regcache::raw_write_part instead.
2180 * regcache.c (regcache_raw_write_part): Remove.
2182 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2184 * regcache.h (regcache_raw_read_part): Remove, update callers to
2185 use readable_regcache::raw_read_part instead.
2186 * regcache.c (regcache_raw_read_part): Remove.
2188 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2190 * regcache.h (regcache_cooked_read): Remove, update callers to
2191 use readable_regcache::cooked_read instead.
2192 * regcache.c (regcache_cooked_read): Remove.
2194 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2196 * regcache.h (regcache_raw_write): Remove, update callers to use
2197 regcache::raw_write instead.
2198 * regcache.c (regcache_raw_write): Remove.
2200 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2202 * regcache.h (regcache_raw_read): Remove, update callers to use
2203 readable_regcache::raw_read instead.
2204 * regcache.c (regcache_raw_read): Remove.
2206 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2208 * regcache.h (regcache_raw_update): Remove, update callers to
2209 use readable_regcache::raw_update instead.
2210 * regcache.c (regcache_raw_update): Remove.
2212 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2214 * regcache.h (regcache_register_status): Remove, update callers
2215 to use reg_buffer::get_register_status directly instead.
2216 * regcache.c (regcache_register_status): Remove.
2218 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2220 * regcache.h (regcache_get_ptid): Remove, update all callers to
2221 call regcache::ptid instead.
2222 * regcache.c (regcache_get_ptid): Remove.
2224 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2226 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2228 2018-05-30 Pedro Alves <palves@redhat.com>
2230 * common/common-exceptions.h (exception_rethrow): Use
2233 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2235 * breakpoint.c (print_solib_event, check_status_catch_solib):
2236 Remove struct keyword in range-based for loops.
2237 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2238 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2240 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2242 * symfile.c (addr_info_make_relative): Likewise.
2243 * thread.c (value_in_thread_stack_temporaries): Likewise.
2245 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2248 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2249 aggregate type to get its real type before accessing it.
2251 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2253 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2254 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2255 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2256 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2257 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2258 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2259 * printcmd.c (info_address_command): Likewise.
2261 2018-05-29 Tom Tromey <tom@tromey.com>
2263 * windows-nat.c (handle_exception): Update fall-through comment.
2265 2018-05-29 Tom Tromey <tom@tromey.com>
2267 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2268 (struct program_space) <added_solibs>: Now a std::vector.
2269 * breakpoint.c (print_solib_event): Update.
2270 (check_status_catch_solib): Update.
2271 * progspace.c (clear_program_space_solib_cache): Update.
2272 * solib.c (update_solib_list): Update.
2274 2018-05-29 Tom Tromey <tom@tromey.com>
2276 * python/py-type.c (typy_richcompare): Update.
2277 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2278 * gdbtypes.h (types_deeply_equal): Return bool.
2279 (types_equal): Likewise.
2280 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2282 (check_types_equal): Change worklist to std::vector. Return
2284 (struct type_equality_entry): Add constructor.
2285 (compare_maybe_null_strings): Return bool.
2286 (check_types_worklist): Return bool. Change worklist to
2288 (types_deeply_equal): Use std::vector.
2289 (types_equal): Return bool.
2290 (compare_maybe_null_strings): Simplify.
2292 2018-05-29 Tom Tromey <tom@tromey.com>
2294 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2296 2018-05-29 Tom Tromey <tom@tromey.com>
2298 * objc-lang.h: Don't include cp-support.h.
2299 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2302 2018-05-27 Tom Tromey <tom@tromey.com>
2304 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2306 2018-05-25 Tom Tromey <tom@tromey.com>
2308 * value.c (value::location): Initialize.
2310 2018-05-25 Tom Tromey <tom@tromey.com>
2312 * dbxread.c (init_bincl_list): Remove.
2313 (bincl_list): Now a std::vector.
2314 (bincls_allocated, next_bincl): Remove.
2315 (free_bincl_list, do_free_bincl_list_cleanup)
2316 (make_cleanup_free_bincl_list): Remove.
2317 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2319 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2320 (struct header_file_location): Add constructor.
2321 (add_bincl_to_list): Remove.
2323 2018-05-25 Tom Tromey <tom@tromey.com>
2325 * tui/tui.c (tui_enable): Update.
2326 * mi/mi-interp.c (mi_interp::init): Update.
2327 * interps.h (class interp) <name>: New method.
2328 <m_name>: Rename from name.
2329 (~scoped_restore_interp): Update.
2330 * interps.c (interp::interp): Update.
2331 (interp_add, interp_set, interp_lookup_existing)
2332 (current_interp_named_p): Update.
2334 2018-05-25 Tom Tromey <tom@tromey.com>
2336 * interps.c (interp_name): Remove.
2337 * mi/mi-interp.c (mi_interp::init): Update.
2338 * interps.h (interp_name): Remove.
2339 (~scoped_restore_interp): Update.
2340 * tui/tui.c (tui_enable): Update.
2342 2018-05-25 Tom Tromey <tom@tromey.com>
2344 * utils.c (fputs_maybe_filtered): Update.
2345 * linespec.c (decode_line_full): Update.
2346 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2347 (mi_print_breakpoint_for_event, mi_solib_loaded)
2348 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2349 (mi_user_selected_context_changed): Update.
2350 * mi/mi-main.c (mi_execute_command): Update.
2351 * cli/cli-script.c (execute_control_command): Update.
2352 * python/python.c (execute_gdb_command): Update.
2353 * solib.c (info_sharedlibrary_command): Update.
2354 * interps.c (interp_ui_out): Remove.
2355 * interps.h (interp_ui_out): Remove.
2357 2018-05-25 Tom Tromey <tom@tromey.com>
2359 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2360 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2361 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2363 2018-05-25 Tom Tromey <tom@tromey.com>
2365 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2366 * interps.c (interp_exec): Use scoped_restore.
2368 2018-05-25 Tom Tromey <tom@tromey.com>
2370 * remote.c (remote_target::remote_file_get): Use
2372 (remote_target::remote_file_put): Likewise.
2374 2018-05-25 Tom Tromey <tom@tromey.com>
2376 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2378 (get_pe_section_index, add_pe_exported_sym): Update.
2379 (read_pe_exported_syms): Use gdb::def_vector.
2381 2018-05-25 Tom Tromey <tom@tromey.com>
2383 * frame.c (remove_prev_frame): Remove.
2384 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2386 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2388 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2390 * mips-linux-nat.c (supply_fpregset): Always call
2391 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2392 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2393 `mips_fill_fpregset'.
2394 * mips-linux-tdep.c (mips_supply_fpregset)
2395 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2396 (mips_fill_fpregset_wrapper): Remove functions.
2397 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2398 (mips_linux_fpregset): Remove variable.
2399 (mips_linux_iterate_over_regset_sections): Use
2400 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2401 (mips_linux_o32_sigframe_init): Remove comment.
2403 2018-05-25 Pedro Alves <palves@redhat.com>
2405 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2406 (struct readahead_cache, struct packet_reg, struct
2407 remote_arch_state, class remote_state): Move higher up in the
2409 (remote_target::m_remote_state): Now an object instead of a pointer.
2410 (remote_target::get_remote_state): Adjust.
2412 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2414 * stack.c (select_and_print_frame): Delete.
2415 (struct function_bounds): Move struct within function.
2416 (func_command): Most content moved into new function
2417 find_frame_for_function, use new function, print result, add
2419 (find_frame_for_function): New function, now returns a result.
2421 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2423 * stack.c (iterate_over_block_arg_vars): Fix comment.
2424 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2426 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2430 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2432 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2434 * frame.h (class scoped_restore_selected_frame): New class.
2435 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2436 of any exception, use scoped_restore_selected_frame to restore the
2439 2018-05-24 Pedro Alves <palves@redhat.com>
2441 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2444 2018-05-23 Tom Tromey <tom@tromey.com>
2446 * complaints.c (struct complaints): Remove.
2447 (symfile_complaint_book): Remove.
2448 (series): New global.
2449 (complaint_internal): Update.
2450 (clear_complaints): Update.
2452 2018-05-23 Tom Tromey <tom@tromey.com>
2454 * complaints.c (counters): New global.
2455 (struct complain): Remove.
2456 (struct complaints) <root>: Remove.
2457 (complaint_sentinel): Remove.
2458 (symfile_complaint_book): Update.
2459 (find_complaint) Remove.
2460 (complaint_internal, clear_complaints): Update.
2462 2018-05-23 Tom Tromey <tom@tromey.com>
2464 * complaints.c (struct complain) <file, line>: Remove.
2465 (find_complaint): Remove file, line parameters.
2466 (complaint_internal): Update.
2468 2018-05-23 Tom Tromey <tom@tromey.com>
2470 * complaints.c (vcomplaint): Remove.
2471 (complaint_internal) Merge in contents of vcomplaint.
2473 2018-05-23 Tom Tromey <tom@tromey.com>
2475 * complaints.c (struct complaints) <explanation>: Remove.
2476 (symfile_explanations): Remove.
2477 (symfile_complaint_book): Update.
2478 (vcomplaint): Update.
2479 (struct explanation): Remove.
2481 2018-05-23 Tom Tromey <tom@tromey.com>
2483 * complaints.c (symfile_complaints): Remove.
2484 (complaint_internal): Remove "complaints" parameter.
2485 (clear_complaints, vcomplaint): Remove "c" parameter.
2486 (get_complaints): Remove.
2487 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2488 (dwarf2_debug_line_missing_file_complaint)
2489 (dwarf2_debug_line_missing_end_sequence_complaint)
2490 (dwarf2_complex_location_expr_complaint)
2491 (dwarf2_const_value_length_mismatch_complaint)
2492 (dwarf2_section_buffer_overflow_complaint)
2493 (dwarf2_macro_malformed_definition_complaint)
2494 (dwarf2_invalid_attrib_class_complaint)
2495 (create_addrmap_from_index, dw2_symtab_iter_next)
2496 (dw2_expand_marked_cus)
2497 (dw2_debug_names_iterator::find_vec_in_debug_names)
2498 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2499 (create_debug_type_hash_table, init_cutu_and_read_dies)
2500 (partial_die_parent_scope, add_partial_enumeration)
2501 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2502 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2503 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2504 (create_cus_hash_table, create_dwp_hash_table)
2505 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2506 (dwarf2_rnglists_process, dwarf2_ranges_process)
2507 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2508 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2509 (handle_struct_member_die, process_structure_scope)
2510 (read_array_type, read_common_block, read_module_type)
2511 (read_tag_pointer_type, read_typedef, read_base_type)
2512 (read_subrange_type, load_partial_dies, partial_die_info::read)
2513 (partial_die_info::read, partial_die_info::read)
2514 (partial_die_info::read, read_checked_initial_length_and_offset)
2515 (dwarf2_string_attr, read_formatted_entries)
2516 (dwarf_decode_line_header)
2517 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2518 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2519 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2520 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2521 (get_signatured_type, get_DW_AT_signature_type)
2522 (decode_locdesc, file_file_name, consume_improper_spaces)
2523 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2524 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2525 (dwarf2_symbol_mark_computed, set_die_type)
2526 (read_attribute_value): Update.
2527 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2529 * dbxread.c (unknown_symtype_complaint)
2530 (lbrac_mismatch_complaint, repeated_header_complaint)
2531 (set_namestring, function_outside_compilation_unit_complaint)
2532 (read_dbx_symtab, process_one_symbol): Update.
2533 * gdbtypes.c (stub_noname_complaint): Update.
2534 * windows-nat.c (handle_unload_dll): Update.
2535 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2536 (decode_base_type): Update.
2537 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2538 (eb_complaint, record_include_begin, record_include_end)
2539 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2540 (process_xcoff_symbol, read_symbol)
2541 (function_outside_compilation_unit_complaint)
2542 (scan_xcoff_symtab): Update.
2543 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2544 * buildsym.c (finish_block_internal, make_blockvector)
2545 (end_symtab_get_static_block, augment_type_symtab): Update.
2546 * dtrace-probe.c (dtrace_process_dof)
2547 (dtrace_static_probe_ops::get_probes): Update.
2548 * complaints.h (struct complaint): Don't declare.
2549 (symfile_complaints): Remove.
2550 (complaint_internal): Remove "complaints" parameter.
2551 (complaint): Likewise.
2552 (clear_complaints): Likewise.
2553 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2554 (reread_symbols): Update.
2555 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2556 (dwarf2_frame_cache, decode_frame_entry): Update.
2557 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2558 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2559 (info_selectors_command): Update.
2560 * macrotab.c (macro_include, check_for_redefinition)
2561 (macro_undef): Update.
2562 * objfiles.c (filter_overlapping_sections): Update.
2563 * stabsread.c (invalid_cpp_abbrev_complaint)
2564 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2565 (define_symbol, error_type, read_type, rs6000_builtin_type)
2566 (stabs_method_name_from_physname, read_member_functions)
2567 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2568 (attach_fields_to_type, complain_about_struct_wipeout)
2569 (read_range_type, read_args, common_block_start)
2570 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2572 * mdebugread.c (index_complaint, unknown_ext_complaint)
2573 (basic_type_complaint, bad_tag_guess_complaint)
2574 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2575 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2576 (parse_procedure, parse_lines)
2577 (function_outside_compilation_unit_complaint)
2578 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2579 (bad_tag_guess_complaint, reg_value_complaint): Update.
2580 * cp-support.c (demangled_name_complaint): Update.
2581 * macroscope.c (sal_macro_scope): Update.
2582 * dwarf-index-write.c (class debug_names): Update.
2584 2018-05-23 Tom Tromey <tom@tromey.com>
2586 * complaints.c (clear_complaints): Remove "noisy" parameter.
2587 * complaints.h (clear_complaints): Update.
2588 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2589 (reread_symbols): Update.
2591 2018-05-23 Tom Tromey <tom@tromey.com>
2593 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2595 (vcomplaint, clear_complaints): Update.
2596 (symfile_explanations): Remove some messages.
2598 2018-05-23 Tom Tromey <tom@tromey.com>
2600 * complaints.c (internal_complaint): Remove.
2601 * complaints.h (internal_complaint): Remove.
2603 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2605 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2607 2018-05-22 Pedro Alves <palves@redhat.com>
2609 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2610 (remote_fileio_badfd, remote_fileio_return_errno)
2611 (remote_fileio_return_success, remote_fileio_func_open)
2612 (remote_fileio_func_open, remote_fileio_func_close)
2613 (remote_fileio_func_read, remote_fileio_func_write)
2614 (remote_fileio_func_lseek, remote_fileio_func_rename)
2615 (remote_fileio_func_unlink, remote_fileio_func_stat)
2616 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2617 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2618 remote_target parameter.
2619 (remote_fio_func_map) <func>: Add remote_target parameter.
2620 (do_remote_fileio_request, remote_fileio_request):
2621 * remote-fileio.h (remote_fileio_request):
2622 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2623 remote_target parameter.
2624 (remote_notif_process, handle_notification): Adjust to pass down
2626 (remote_notif_state_allocate): Add remote_target parameter. Save
2628 * remote-notif.h (struct remote_target): Forward declare.
2629 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2630 remote_target parameter.
2631 (struct remote_notif_state) <remote>: New field.
2632 (remote_notif_ack, remote_notif_parse): Add remote_target
2634 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2635 remote_target parameter.
2636 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2637 (threads_listing_context, rmt_thread_action, protocol_feature)
2638 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2639 (packet_result, struct threads_listing_context, remote_state):
2640 Move definitions and declarations higher up.
2641 (remote_target) <~remote_target>: Declare.
2642 (remote_download_command_source, remote_file_put, remote_file_get)
2643 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2644 (remote_hostio_pread_vFile, remote_hostio_send_command)
2645 (remote_hostio_set_filesystem, remote_hostio_open)
2646 (remote_hostio_close, remote_hostio_unlink, remote_state)
2647 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2648 (get_memory_write_packet_size, get_memory_read_packet_size)
2649 (append_pending_thread_resumptions, remote_detach_1)
2650 (append_resumption, remote_resume_with_vcont)
2651 (add_current_inferior_and_thread, wait_ns, wait_as)
2652 (process_stop_reply, remote_notice_new_inferior)
2653 (process_initial_stop_replies, remote_add_thread)
2654 (btrace_sync_conf, remote_btrace_maybe_reopen)
2655 (remove_new_fork_children, kill_new_fork_children)
2656 (discard_pending_stop_replies, stop_reply_queue_length)
2657 (check_pending_events_prevent_wildcard_vcont)
2658 (discard_pending_stop_replies_in_queue, stop_reply)
2659 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2660 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2661 (remote_interrupt_as, remote_interrupt_ns)
2662 (remote_get_noisy_reply, remote_query_attached)
2663 (remote_add_inferior, remote_current_thread, get_current_thread)
2664 (set_thread, set_general_thread, set_continue_thread)
2665 (set_general_process, write_ptid)
2666 (remote_unpack_thread_info_response, remote_get_threadinfo)
2667 (parse_threadlist_response, remote_get_threadlist)
2668 (remote_threadlist_iterator, remote_get_threads_with_ql)
2669 (remote_get_threads_with_qxfer)
2670 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2671 (get_offsets, remote_check_symbols, remote_supported_packet)
2672 (remote_query_supported, remote_packet_size)
2673 (remote_serial_quit_handler, remote_detach_pid)
2674 (remote_vcont_probe, remote_resume_with_hc)
2675 (send_interrupt_sequence, interrupt_query)
2676 (remote_notif_get_pending_events, fetch_register_using_p)
2677 (send_g_packet, process_g_packet, fetch_registers_using_g)
2678 (store_register_using_P, store_registers_using_G)
2679 (set_remote_traceframe, check_binary_download)
2680 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2681 (remote_xfer_live_readonly_partial, remote_read_bytes)
2682 (remote_send_printf, remote_flash_write, readchar)
2683 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2684 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2685 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2686 (extended_remote_disable_randomization, extended_remote_run)
2687 (send_environment_packet, extended_remote_environment_support)
2688 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2689 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2690 (packet_command): Now methods of ...
2691 (remote_target): ... this class.
2692 (m_remote_state) <remote_target>: New field.
2693 (struct remote_state) <stop_reply_queue,
2694 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2696 (remote_state::remote_state): Allocate stop_reply_queue.
2697 (remote_state): Delete global.
2698 (get_remote_state_raw): Delete.
2699 (remote_target::get_remote_state): Allocate m_remote_state on
2701 (get_current_remote_target): New.
2702 (remote_ops, extended_remote_ops): Delete.
2703 (wait_forever_enabled_p, remote_async_inferior_event_token):
2704 Delete, moved to struct remote_state.
2705 (remote_target::close): Delete self. Destruction bits split to
2707 (remote_target::~remote_target): ... this.
2708 (show_memory_packet_size): Adjust to use
2709 get_current_remote_target.
2710 (struct protocol_feature) <func>: Add remote_target parameter.
2711 All callers adjusted.
2712 (curr_quit_handler_target): New.
2713 (remote_serial_quit_handler): Reimplement.
2714 (remote_target::open_1): Adjust to use get_current_remote_target.
2715 Heap-allocate remote_target/extended_remote_target instances.
2716 (vcont_builder::vcont_builder): Add remote_target parameter, and
2717 save it in m_remote. All callers adjusted.
2718 (vcont_builder::m_remote): New field.
2719 (vcont_builder::restart, vcont_builder::flush)
2720 (vcont_builder::push_action): Use it.
2721 (remote_target::commit_resume): Use it.
2722 (struct queue_iter_param) <remote>: New field.
2723 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2724 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2725 (check_pending_event_prevents_wildcard_vcont_callback)
2726 (remote_target::check_pending_events_prevent_wildcard_vcont)
2727 (remote_target::discard_pending_stop_replies)
2728 (remote_target::discard_pending_stop_replies_in_queue)
2729 (remote_target::remote_notif_remove_queued_reply): Fill in
2731 (remote_notif_get_pending_events): New.
2732 (remote_target::readchar, remote_target::remote_serial_write):
2733 Save/restore curr_quit_handler_target.
2735 (kill_new_fork_children): Fill in 'remote' field.
2736 (packet_command): Use get_current_remote_target, defer to
2737 remote_target method of same name.
2738 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2739 parameter, and save it in m_remote. All callers adjusted.
2740 (scoped_remote_fd::release): Use m_remote.
2741 (scoped_remote_fd::m_remote): New field.
2742 (remote_file_put, remote_file_get, remote_file_delete): Use
2743 get_current_remote_target, defer to remote_target method of same
2745 (remote_btrace_reset): Add remote_state paremeter. Update all
2747 (remote_async_inferior_event_handler). Pass down 'data'.
2748 (remote_new_objfile): Use get_current_remote_target.
2749 (remote_target::vcont_r_supported): New.
2750 (set_range_stepping): Use get_current_remote_target and
2751 remote_target::vcont_r_supported.
2752 (_initialize_remote): Don't allocate 'remote_state' and
2753 'stop_reply_queue' globals.
2754 * remote.h (struct remote_target): Forward declare.
2755 (getpkt, putpkt, remote_notif_get_pending_events): Add
2756 'remote_target' parameter.
2758 2018-05-22 Pedro Alves <palves@redhat.com>
2760 * remote.c (vcont_builder): Now a class. Make all data members
2762 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2764 (vcont_builder_restart): Rename to ...
2765 (vcont_builder::restart): ... this.
2766 (vcont_builder_flush): Rename to ...
2767 (vcont_builder::flush): ... this.
2768 (vcont_builder_push_action): Rename to ...
2769 (vcont_builder::push_action): ... this.
2770 (remote_target::commit_resume): Adjust.
2772 2018-05-22 Pedro Alves <palves@redhat.com>
2774 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2775 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2776 (get_fixed_memory_packet_size): New.
2777 (get_memory_packet_size): Use it.
2778 (set_memory_packet_size): Don't override the config size with
2779 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2780 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2781 Don't refer to get_memory_packet_size if not connected to a remote
2782 target. Show "(default)" if configured size is 0.
2784 2018-05-22 Pedro Alves <palves@redhat.com>
2786 * remote.c (remote_target::mourn_inferior): Move
2787 discard_pending_stop_replies call here from ...
2788 (_initialize_remote): ... here.
2790 2018-05-22 Pedro Alves <palves@redhat.com>
2792 * remote.c (compare_section_command): Remove set_general_process
2795 2018-05-22 Pedro Alves <palves@redhat.com>
2797 * remote.c (struct packet_reg, struct remote_arch_state):
2798 Move higher up in the file.
2799 (remote_state) <m_arch_states>: Store remote_arch_state values
2800 instead of remote_arch_state pointers.
2801 (remote_state::get_remote_arch_state): Adjust.
2803 2018-05-22 Pedro Alves <palves@redhat.com>
2805 * remote.c: Include <unordered_map>.
2806 (remote_state): Now a class.
2807 (remote_state) <get_remote_arch_state>: Declare method.
2808 <get_remote_arch_state>: New field.
2809 (remote_arch_state) <remote_arch_state>: Declare ctor.
2810 <regs>: Now a unique_ptr.
2811 (remote_gdbarch_data_handle): Delete.
2812 (get_remote_arch_state): Delete.
2813 (remote_state::get_remote_arch_state): New.
2814 (get_remote_state): Adjust to call remote_state's
2815 get_remote_arch_state method.
2816 (init_remote_state): Delete, bits factored out to ...
2817 (remote_arch_state::remote_arch_state): ... this new method.
2818 (get_remote_packet_size, get_memory_packet_size)
2819 (process_g_packet, remote_target::fetch_registers)
2820 (remote_target::prepare_to_store, store_registers_using_G)
2821 (remote_target::store_registers, remote_target::get_trace_status):
2822 Adjust to call remote_state's method.
2823 (_initialize_remote): Remove reference to
2824 remote_gdbarch_data_handle.
2826 2018-05-22 Pedro Alves <palves@redhat.com>
2828 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2829 pread>: New method declarations.
2830 (remote_target::open_1): Adjust.
2831 (readahead_cache_invalidate): Rename to ...
2832 (readahead_cache::invalidate): ... this, and adjust to be a class
2834 (readahead_cache_invalidate_fd): Rename to ...
2835 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2837 (remote_hostio_pwrite): Adjust.
2838 (remote_hostio_pread_from_cache): Rename to ...
2839 (readahead_cache::pread): ... this, and adjust to be a class
2841 (remote_hostio_close): Adjust.
2843 2018-05-22 Pedro Alves <palves@redhat.com>
2845 * remote.c (remote_hostio_close_cleanup): Delete.
2846 (class scoped_remote_fd): New.
2847 (remote_file_put, remote_file_get): Use it.
2849 2018-05-22 Pedro Alves <palves@redhat.com>
2851 (struct vCont_action_support): Use bool and initialize all fields.
2852 (struct readahead_cache): Initialize all fields.
2853 (remote_state): Use bool and initialize all fields.
2854 (remote_state::remote_state, remote_state::~remote_state): New.
2855 (new_remote_state): Delete.
2856 (_initialize_remote): Use new to allocate remote_state.
2858 2018-05-22 Pedro Alves <palves@redhat.com>
2862 * c-exp.y: Include "c-support.h".
2863 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2864 of tolower. Use c_ident_is_alpha to scan names.
2865 * c-lang.c: Include "c-support.h".
2866 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2867 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2868 * c-support.h: New file, with bits factored out from ...
2869 * cp-name-parser.y: ... this file.
2870 Include "c-support.h".
2871 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2872 c-support.h and renamed.
2873 (symbol_end, yylex): Adjust.
2875 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2877 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2878 parameter type to CORE_ADDR.
2879 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2880 parameter type in declaration to CORE_ADDR.
2881 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2882 target_auxv_search to get AT_HWCAP and use the result to get the
2884 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2885 to CORE_ADDR. Remove the cast of the return value to unsigned
2886 long. Fix error predicate of target_auxv_search.
2887 (ppc_linux_nat_target::read_description): Change the type of the
2888 hwcap variable to CORE_ADDR.
2890 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2892 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2893 if the size of fpscr is larger than 32 bits.
2895 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2897 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2898 (ppc32_linux_vsxregmap): New global.
2899 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2900 regcache_supply_regset, and regcache_collect_regset.
2901 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2902 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2903 (fetch_vsx_register, store_vsx_register): Remove.
2904 (fetch_vsx_registers): Add regno parameter. Get regset using
2905 ppc_linux_vsxregset. Use regset to supply registers.
2906 (store_vsx_registers): Add regno parameter. Get regset using
2907 ppc_linux_vsxregset. Use regset to collect registers.
2908 (fetch_register): Call fetch_vsx_registers instead of
2910 (store_register): Call store_vsx_registers instead of
2912 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2913 new regno parameter.
2914 (store_ppc_registers): Call store_vsx_registers with -1 for the
2915 new regno parameter.
2916 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2917 (ppc_collect_vsxregset): Remove.
2919 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2921 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2923 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2924 for vector register offset fields.
2925 (ppc64_fbsd_reg_offsets): Likewise.
2926 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2927 to vector register offset fields.
2928 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2929 to vector register offset fields.
2930 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2931 vector register offset fields.
2932 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2933 initializers for vector register offset fields.
2934 (rs6000_aix64_reg_offsets): Likewise.
2935 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2936 (ppc_supply_vrregset): Remove.
2937 (ppc_collect_vrregset): Remove.
2938 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2939 (ppc_linux_vrregset) : New function.
2940 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2941 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2942 (ppc32_linux_vrregset): Remove.
2943 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2944 and use result instead of ppc32_linux_vrregset.
2945 (ppc32_linux_reg_offsets): Remove initializers for vector register
2947 (ppc64_linux_reg_offsets): Likewise.
2948 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2949 * ppc-linux-nat.c: Include regset.h.
2950 (gdb_vrregset_t): Adjust comment to account for little-endian
2952 (supply_vrregset, fill_vrregset): Remove.
2953 (fetch_altivec_register, store_altivec_register): Remove.
2954 (fetch_altivec_registers): Add regno parameter. Get regset using
2955 ppc_linux_vrregset. Use regset to supply registers.
2956 (store_altivec_registers): Add regno parameter. Get regset using
2957 ppc_linux_vrregset. Use regset to collect registers.
2958 (fetch_register): Call fetch_altivec_registers instead of
2959 fetch_altivec_register.
2960 (store_register): Call store_altivec_registers instead of
2961 store_altivec_register.
2962 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2963 the new regno parameter.
2964 (store_ppc_registers): Call store_altivec_registers with -1 for
2965 the new regno parameter.
2967 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2969 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2970 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2971 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2972 (gdb_vrregset_t): Change array type size to
2973 PPC_LINUX_SIZEOF_VRREGSET.
2974 (gdb_vsxregset_t): Change array type size to
2975 PPC_LINUX_SIZEOF_VSXREGSET.
2976 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2977 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2978 PPC_LINUX_SIZEOF_VSXREGSET.
2980 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2982 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2983 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2985 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2986 ppc_linux_target_wordsize with tid.
2987 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2989 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2990 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2991 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2992 tid parameter. Remove static specifier.
2993 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2994 (ppc_linux_target_wordsize): New declaration.
2996 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2998 * arch/ppc-linux-common.c: New file.
2999 * arch/ppc-linux-common.h: New file.
3000 * arch/ppc-linux-tdesc.h: New file.
3001 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3002 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3003 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3004 arch/ppc-linux-tdesc.h.
3005 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3006 arch/ppc-linux-tdesc.h.
3007 (ppc_linux_nat_target::read_description): Remove target
3008 description matching code. Fill a ppc_linux_features struct and
3009 call ppc_linux_match_description with it. Move comment about ISA
3010 2.05 to ppc-linux-common.c.
3011 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3012 arch/ppc-linux-tdesc.h.
3013 (ppc_linux_core_read_description): Remove target description
3014 matching code. Fill a ppc_linux_features struct and call
3015 ppc_linux_match_description with it.
3016 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3017 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3018 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3019 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3020 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3021 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3022 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3023 (tdesc_powerpc_e500l): Remove.
3025 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3027 * ada-lang.c (catch_assert_command): Pass empty string instead
3028 of NULL for excep_string argument.
3030 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3032 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3033 the width of the requested register exceeds the width of the
3036 2018-05-21 Tom Tromey <tom@tromey.com>
3038 * printcmd.c (output_command): Remove.
3039 (output_command_const): Rename to output_command.
3040 * valprint.h (output_command): Rename from output_command_const.
3041 * tracepoint.c (trace_dump_actions): Call output_command.
3043 2018-05-21 Tom Tromey <tom@tromey.com>
3045 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3046 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3047 * ada-lang.h (create_ada_exception_catchpoint): Update.
3048 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3050 (create_excep_cond_exprs, ~ada_catchpoint)
3051 (should_stop_exception, print_one_exception)
3052 (print_mention_exception, print_recreate_exception): Update.
3053 (ada_get_next_arg): Remove.
3054 (catch_ada_exception_command_split): Use std::string. Change type
3055 of "excep_string", "cond_string".
3056 (catch_ada_exception_command): Update.
3057 (create_ada_exception_catchpoint): Change type of excep_string.
3058 (ada_exception_sal): Remove excep_string parameter.
3059 (~ada_catchpoint): Remove.
3061 2018-05-21 Tom Tromey <tom@tromey.com>
3063 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3066 2018-05-21 Tom Tromey <tom@tromey.com>
3068 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3069 Return unique_xmalloc_ptr.
3070 (print_it_exception): Update.
3072 2018-05-21 Tom Tromey <tom@tromey.com>
3074 * tracepoint.c (trace_dump_actions): Use std::string.
3076 2018-05-21 Tom Tromey <tom@tromey.com>
3078 * symfile.c (reread_symbols): Use std::string for original_name.
3080 2018-05-21 Tom Tromey <tom@tromey.com>
3082 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3083 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3086 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3088 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3090 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3091 * objfiles.c (get_objfile_bfd_data): Allocate
3092 objfile_per_bfd_storage with obstack_new when allocating on
3095 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3097 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3099 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3100 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3101 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3102 (add_pending): Likewise.
3103 (parse_symbol): Likewise.
3104 (parse_partial_symbols): Likewise.
3105 (psymtab_to_symtab_1): Likewise.
3106 (new_psymtab): Likewise.
3107 (elfmdebug_build_psymtabs): Likewise.
3108 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3109 * objfiles.c (get_objfile_bfd_data): Likewise.
3110 (objfile_register_static_link): Likewise.
3111 * psymtab.c (allocate_psymtab): Likewise.
3112 * stabsread.c (read_member_functions): Likewise.
3113 * xcoffread.c (xcoff_end_psymtab): Likewise.
3115 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3117 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3118 compiler supports std::is_trivially_constructible.
3119 * common/poison.h: Include obstack.h.
3120 (IsMallocable): Define to is_trivially_constructible if the
3121 compiler supports it, define to true_type otherwise.
3125 (XOBNEWVEC): Redefine.
3126 * gdb_obstack.h (obstack_zalloc): New.
3127 (OBSTACK_ZALLOC): Redefine.
3128 (obstack_calloc): New.
3129 (OBSTACK_CALLOC): Redefine.
3131 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3132 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3134 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3135 obstack_calloc/obstack_zalloc.
3136 (gdbarch_obstack_zalloc): Remove.
3137 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3139 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3141 * stack.c (backtrace_command_1): Remove useless variable int i.
3143 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3145 * stack.c (print_frame_info): Fix comment.
3147 2018-05-18 Tom Tromey <tom@tromey.com>
3149 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3150 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3151 (~dwarf2_per_objfile): Update
3152 (dwarf2_get_dwz_file): Use new.
3153 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3156 2018-05-18 Tom Tromey <tom@tromey.com>
3158 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3160 * dwarf2read.c (struct dwp_file): Add constructor and
3162 (open_and_init_dwp_file): Return a unique_ptr.
3163 (dwarf2_per_objfile, create_dwp_hash_table)
3164 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3165 (lookup_dwo_unit_in_dwp): Update.
3166 (open_and_init_dwp_file, get_dwp_file): Update.
3168 2018-05-18 Tom Tromey <tom@tromey.com>
3170 * dwarf2read.c (dwarf2_per_objfile): Update.
3171 (struct mapped_index): Add initializers.
3172 (dwarf2_read_index): Use new.
3173 (dw2_symtab_iter_init): Update.
3174 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3177 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3179 * dwarf2read.c (mapped_index) <total_size>: Remove.
3181 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3183 * unittests/format_pieces-selftests.c (test_format_specifier):
3186 2018-05-18 Tom Tromey <tom@tromey.com>
3188 * c-typeprint.c (maybe_print_hole): New function.
3189 (c_print_type_struct_field_offset): Update.
3190 (c_type_print_base_struct_union): Call maybe_print_hole.
3192 2018-05-17 Keith Seitz <keiths@redhat.com>
3194 * breakpoint.c (build_bpstat_chain): New function, moved from
3196 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3197 If no stop chain is passed, call build_bpstat_chain to build it.
3198 * breakpoint.h (build_bpstat_chain): Declare.
3199 (bpstat_stop_status): Move documentation here from breakpoint.c.
3200 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3201 build the stop chain and pass it to skip_inline_frames.
3202 Pass this stop chain to bpstat_stop_status.
3203 * inline-frame.c: Include breakpoint.h.
3204 (stopped_by_user_bp_inline_frame): New function.
3205 (skip_inline_frames): Add parameter `stop_chain'.
3206 Move documention to inline-frame.h.
3207 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3208 whether the frame should be elided.
3209 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3210 Add moved documentation and update for new parameter.
3212 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3215 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3216 unittests/format_pieces-selftests.c.
3217 * common/format.h (format_piece) <operator==>: New.
3218 (format_pieces) <operator[]>: Remove.
3219 * common/format.c (format_pieces::format_pieces): Handle \e.
3220 * unittests/format_pieces-selftests.c: New.
3222 2018-05-17 Tom Tromey <tom@tromey.com>
3225 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3226 (dw2_instantiate_symtab): Add skip_partial parameter.
3227 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3228 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3229 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3230 (dw2_expand_symtabs_matching_one)
3231 (dw2_find_pc_sect_compunit_symtab)
3232 (dw2_debug_names_lookup_symbol)
3233 (dw2_debug_names_expand_symtabs_for_function): Update.
3234 (init_cutu_and_read_dies): Add skip_partial parameter.
3235 (process_psymtab_comp_unit, build_type_psymtabs_1)
3236 (process_skeletonless_type_unit, load_partial_comp_unit)
3237 (psymtab_to_symtab_1): Update.
3238 (load_full_comp_unit): Add skip_partial parameter.
3239 (process_imported_unit_die, dwarf2_read_addr_index)
3240 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3241 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3242 (read_signatured_type): Update.
3244 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3246 * value.c (release_value): Remove unused variable.
3247 (record_latest_value): Likewise.
3248 (access_value_history): Likewise.
3249 (preserve_values): Likewise.
3251 2018-05-17 Tom Tromey <tom@tromey.com>
3253 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3256 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3259 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3260 Also handle registers whose width is not a multiple of
3262 (linux_nat_trad_target::store_register): Likewise.
3264 2018-05-16 Tom Tromey <tom@tromey.com>
3266 * gdbcore.h (core_bfd): Redefine.
3267 * corelow.c (core_target::close): Update.
3268 (core_target_open): Update.
3269 * progspace.h (struct program_space) <cbfd>: Now a
3272 2018-05-16 Tom Tromey <tom@tromey.com>
3275 * symfile-add-flags.h (enum symfile_add_flags)
3276 <SYMFILE_NOT_FILENAME>: New constant.
3277 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3278 objfile name from BFD.
3279 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3280 * minidebug.c (find_separate_debug_file_in_section): Put
3281 ".gnu_debugdata" into BFD's file name.
3283 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3285 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3288 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3291 * aarch64-tdep.c (aarch64_analyze_prologue,
3292 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3293 Indicate not interested in errors.
3295 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3297 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3298 Supply the MIPS_ZERO_REGNUM register.
3300 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3302 * mips-tdep.c (mask_address_var): Make variable static.
3304 2018-05-14 Tom Tromey <tom@tromey.com>
3306 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3308 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3310 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3311 FXSAVE_ADDR for the mxcsr register.
3313 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3315 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3317 2018-05-11 Pedro Alves <palves@redhat.com>
3319 * corelow.c (core_target) <core_target>: No longer inline.
3320 Initialize m_core_gdbarch, m_core_vec and build the section table
3322 <~core_target>: New.
3323 <core_gdbarch, get_core_register_section>: New methods.
3324 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3325 factored out from ...
3326 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3328 (sniff_core_bfd): Add gdbarch parameter.
3329 (core_close): Delete, merged into ...
3330 (core_target::close): ... here. Delete self.
3331 (core_close_cleanup): Delete.
3332 (core_target_open): Allocate a core_target on the heap. Use a
3333 unique_ptr instead of a cleanup. Bits moved into the core_target
3334 ctor. Adjust to use core_target methods instead of globals.
3335 (get_core_register_section): Rename to ...
3336 (core_target::get_core_register_section): ... this and adjust.
3337 (struct get_core_registers_cb_data): New.
3338 (get_core_registers_cb): Use it. Use bool.
3339 (core_target::fetch_registers, core_target::files_info)
3340 (core_target::xfer_partial, core_target::read_description)
3341 (core_target::pid_to, core_target::thread_name): Adjust to
3342 reference class fields instead of globals.
3343 * target.h (struct target_ops_deleter, target_ops_up): New.
3345 2018-05-11 Pedro Alves <palves@redhat.com>
3347 * corefile.c (core_file_command): Move to corelow.c.
3348 * corelow.c (the_core_target): Delete.
3349 (core_file_command): Moved from corefile.c. Check exec_bfd
3350 instead of the_core_target. Use target_detach instead of calling
3351 into the_core_target directly.
3352 (maybe_say_no_core_file_now): New.
3353 (core_target::detach): Use it.
3354 (_initialize_corelow): Remove references to the_core_target.
3355 * gdbcore.h (the_core_target): Delete.
3357 2018-05-11 Tom Tromey <tromey@redhat.com>
3358 Pedro Alves <palves@redhat.com>
3360 * corefile.c (core_bfd): Remove.
3361 * gdbcore.h (core_bfd): Now a macro.
3362 * progspace.h (struct program_space) <cbfd>: New field.
3364 2018-05-11 Tom Tromey <tom@tromey.com>
3366 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3369 2018-05-10 Tom Tromey <tom@tromey.com>
3371 * configure: Rebuild.
3372 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3374 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3377 * regformats/regdat.sh: Adjust script, following the addition
3378 of the new expedite_regs parameter to init_target_desc.
3380 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3383 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3384 set_gdbarch_significant_addr_bit.
3385 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3386 set_gdbarch_significant_addr_bit.
3387 * utils.c (address_significant): Update to sign extend addr.
3389 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3391 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3392 (xtensa_linux_init_abi): Limit tdep->num_regs by
3393 tdep->num_nopriv_regs.
3394 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3395 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3398 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3400 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3402 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3404 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3405 (I387_MXCSR_INIT_VAL): New constant.
3406 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3407 buffer if it was supplied by the inferior.
3408 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3409 (i387_xsave_get_clear_bv): New function.
3410 (i387_supply_xsave): Only read x87 control registers from the
3411 xsave buffer if the feature is enabled, and the state will have
3412 been written, otherwise, provide a suitable default.
3413 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3414 including x87 control registers. Update control registers if they
3415 have changed from the default value, and mark features as enabled
3417 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3419 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3421 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3423 2018-05-07 Tom Tromey <tom@tromey.com>
3425 * configure: Rebuild.
3426 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3428 2018-05-07 Tom Tromey <tom@tromey.com>
3431 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3432 bit. Use correct value for VDIV.
3434 2018-05-04 Tom Tromey <tom@tromey.com>
3436 * configure: Rebuild.
3437 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3439 2018-05-04 Tom Tromey <tom@tromey.com>
3441 * linux-record.c (record_linux_system_call) <case
3442 RECORD_SYS_RECVFROM>: Add "break".
3444 2018-05-04 Tom Tromey <tom@tromey.com>
3446 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3447 Add missing "break".
3448 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3449 Add missing "break".
3451 2018-05-04 Tom Tromey <tom@tromey.com>
3453 * rs6000-tdep.c (ppc_process_record_op4)
3454 (ppc_process_record_op63): Add fall-through comment.
3456 2018-05-04 Tom Tromey <tom@tromey.com>
3458 * i386-tdep.c (i386_process_record): Add fall-through comment.
3460 2018-05-04 Tom Tromey <tom@tromey.com>
3462 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3465 2018-05-04 Tom Tromey <tom@tromey.com>
3467 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3468 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3469 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3471 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3473 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3476 2018-05-04 Tom Tromey <tom@tromey.com>
3478 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3480 2018-05-04 Tom Tromey <tom@tromey.com>
3482 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3483 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3484 * symfile.c (section_is_mapped): Fix fall-through comment.
3485 * stabsread.c (define_symbol, read_member_functions): Fix
3486 fall-through comment.
3487 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3489 * remote.c (remote_wait_as): Fix fall-through comment.
3490 * p-exp.y (yylex): Fix fall-through comment.
3491 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3493 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3494 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3495 * jv-exp.y (yylex): Fix fall-through comment.
3496 * go-exp.y (lex_one_token): Fix fall-through comment.
3497 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3498 fall-through comment.
3499 * f-exp.y (yylex): Fix fall-through comment.
3500 * dwarf2read.c (process_die): Fix fall-through comments.
3501 * dbxread.c (process_one_symbol): Fix fall-through comment.
3502 * d-exp.y (lex_one_token): Fix fall-through comment.
3503 * cp-name-parser.y (yylex): Fix fall-through comment.
3504 * coffread.c (coff_symtab_read): Fix fall-through comment.
3505 * c-exp.y (lex_one_token): Fix fall-through comment.
3506 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3508 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3511 2018-05-04 Tom Tromey <tom@tromey.com>
3514 * NEWS: Mention gdb.execute change.
3515 * gdbcmd.h (execute_control_command): Don't declare.
3516 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3517 execute_control_commands, execute_control_commands_to_string.
3518 * cli/cli-script.h (execute_control_commands)
3519 (execute_control_commands_to_string): Declare.
3520 (execute_control_command): Add from_tty parameter.
3521 * cli/cli-script.c (execute_control_commands)
3522 (execute_control_commands_to_string): New functions.
3523 (execute_user_command): Use execute_control_commands.
3524 (execute_control_command_1): Add "from_tty" parameter. Update.
3525 (execute_control_command): Likewise.
3527 2018-05-04 Tom Tromey <tom@tromey.com>
3530 * NEWS: Mention that breakpoint commands are writable.
3531 * python/py-breakpoint.c (bppy_set_commands): New function.
3532 (breakpoint_object_getset) <"commands">: Use it.
3534 2018-05-04 Tom Tromey <tom@tromey.com>
3536 * tracepoint.c (actions_command): Update.
3537 * mi/mi-cmd-break.c (mi_command_line_array)
3538 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3539 (mi_read_next_line): Remove.
3540 (mi_cmd_break_commands): Update.
3541 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3543 * cli/cli-script.c (get_command_line): Update.
3544 (process_next_line): Use function_view. Constify.
3545 (recurse_read_control_structure, read_command_lines)
3546 (read_command_lines_1): Change argument types to function_view.
3547 (do_define_command, document_command): Update.
3548 * breakpoint.h (check_tracepoint_command): Don't declare.
3549 * breakpoint.c (check_tracepoint_command): Remove.
3550 (commands_command_1, create_tracepoint_from_upload): Update.
3552 2018-05-04 Tom Tromey <tom@tromey.com>
3555 * cli/cli-script.h (enum command_control_type) <define_control>:
3557 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3558 (build_command_line, execute_control_command_1)
3559 (process_next_line): Likewise.
3560 (do_define_command): New function, extracted from define_command.
3561 (define_command): Use it.
3563 2018-05-04 Tom Tromey <tom@tromey.com>
3565 * tracepoint.c (actions_command): Update.
3566 * cli/cli-script.h (read_command_lines): Update.
3567 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3568 (MAX_TMPBUF): Remove define.
3569 (define_command): Use string_printf.
3570 (document_command): Likewise.
3571 * breakpoint.c (commands_command_1): Update.
3573 2018-05-04 Tom Tromey <tom@tromey.com>
3575 * top.c (execute_command): Update.
3576 * cli/cli-script.h (print_command_lines): Now varargs.
3577 * cli/cli-script.c (print_command_lines): Now varargs.
3578 (execute_control_command_1) <case while_control, case if_control>:
3581 2018-05-04 Tom Tromey <tom@tromey.com>
3583 * tracepoint.c (all_tracepoint_actions): Rename from
3584 all_tracepoint_actions_and_cleanup. Change return type.
3585 (actions_command, encode_actions_1, encode_actions)
3586 (trace_dump_actions, tdump_command): Update.
3587 * remote.c (remote_download_command_source): Update.
3588 * python/python.c (gdbpy_eval_from_control_command)
3589 (python_command, python_interactive_command): Update.
3590 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3591 * guile/guile.c (guile_command)
3592 (gdbscm_eval_from_control_command, guile_command): Update.
3593 * compile/compile.c (compile_code_command)
3594 (compile_print_command, compile_to_object): Update.
3595 * cli/cli-script.h (struct command_lines_deleter): New.
3596 (counted_command_line): New typedef.
3597 (struct command_line): Add constructor, destructor.
3598 <body_list>: Remove.
3599 <body_list_0, body_list_1>: New members.
3600 (command_line_up): Remove typedef.
3601 (read_command_lines, read_command_lines_1, get_command_line):
3603 (copy_command_lines): Don't declare.
3604 * cli/cli-script.c (build_command_line): Use "new".
3605 (get_command_line): Return counted_command_line.
3606 (print_command_lines, execute_user_command)
3607 (execute_control_command_1, while_command, if_command): Update.
3608 (realloc_body_list): Remove.
3609 (process_next_line, recurse_read_control_structure): Update.
3610 (read_command_lines, read_command_lines_1): Return counted_command_line.
3611 (free_command_lines): Use "delete".
3612 (copy_command_lines): Remove.
3613 (define_command, document_command, show_user_1): Update.
3614 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3615 a counted_command_line.
3616 * breakpoint.h (counted_command_line): Remove typedef.
3617 (breakpoint_set_commands): Update.
3618 * breakpoint.c (check_no_tracepoint_commands)
3619 (validate_commands_for_breakpoint): Update.
3620 (breakpoint_set_commands): Change commands to be a
3621 counted_command_line.
3622 (commands_command_1, update_dprintf_command_list)
3623 (create_tracepoint_from_upload): Update.
3625 2018-05-04 Tom Tromey <tom@tromey.com>
3627 * cli/cli-decode.h (cmd_list_element): New constructor.
3628 (~cmd_list_element): New destructor.
3629 (struct cmd_list_element): Add initializers.
3630 * cli/cli-decode.c (do_add_cmd): Use "new".
3631 (delete_cmd): Use "delete".
3633 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3634 Pedro Alves <palves@redhat.com>
3636 PR breakpoints/19806 and support for PR external/20207.
3637 * NEWS: Mention Aarch64 watchpoint improvements.
3638 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3639 watchpoints and PR external/20207 watchpoints.
3640 * nat/aarch64-linux-hw-point.c
3641 (kernel_supports_any_contiguous_range): New.
3642 (aarch64_watchpoint_offset): New.
3643 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3644 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3645 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3646 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3647 next_addr_orig_p. Support PR external/20207 watchpoints.
3648 (aarch64_downgrade_regs): New.
3649 (aarch64_dr_state_insert_one_point): New parameters offset and
3651 (aarch64_dr_state_remove_one_point): Likewise.
3652 (aarch64_handle_breakpoint): Update caller.
3653 (aarch64_handle_aligned_watchpoint): Likewise.
3654 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3656 (aarch64_linux_set_debug_regs): Remove const from state. Call
3657 aarch64_downgrade_regs.
3658 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3659 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3660 (DR_CONTROL_MASK): ... this.
3661 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3662 (unsigned int aarch64_watchpoint_offset): New prototype.
3663 (aarch64_linux_set_debug_regs): Remove const from state.
3664 * utils.c (align_up, align_down): Move to ...
3665 * common/common-utils.c (align_up, align_down): ... here.
3666 * utils.h (align_up, align_down): Move to ...
3667 * common/common-utils.h (align_up, align_down): ... here.
3669 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3671 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3672 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3673 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3674 Re-implement to match the ABI as summarized in GCC's
3675 gcc/config/sparc/sparc.c. All callers updated.
3676 (sparc32_store_arguments): Remove assertion.
3678 2018-05-04 Tom Tromey <tom@tromey.com>
3680 * printcmd.c: Don't include tui.h.
3681 (decode_format): Use skip_spaces.
3683 2018-05-04 Tom Tromey <tom@tromey.com>
3686 * printcmd.c (last_count): New global.
3687 (x_command): Use saved count when repeating.
3689 2018-05-04 Tom Tromey <tom@tromey.com>
3691 * nto-procfs.c (do_closedir_cleanup): Remove.
3692 (procfs_pidlist): Use gdb_dir_up.
3693 * procfs.c (do_closedir_cleanup): Remove.
3694 (proc_update_threads): Use gdb_dir_up.
3695 * common/filestuff.h (struct gdb_dir_deleter): New.
3696 (gdb_dir_up): New typedef.
3698 2018-05-04 Tom Tromey <tom@tromey.com>
3700 * ada-lang.c (print_mention_exception): Use std::string.
3702 2018-05-04 Tom Tromey <tom@tromey.com>
3704 * ada-lang.c (create_excep_cond_exprs): Update.
3705 (ada_exception_catchpoint_cond_string): Use std::string.
3707 2018-05-04 Tom Tromey <tom@tromey.com>
3709 * ada-lang.c (xget_renaming_scope): Return std::string.
3710 (old_renaming_is_invisible): Update.
3712 2018-05-04 Tom Tromey <tom@tromey.com>
3714 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3715 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3717 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3719 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3721 2018-05-04 Tom Tromey <tom@tromey.com>
3723 * remote.c (remote_query_supported_append): Change type.
3724 (remote_check_symbols): Update.
3726 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3729 * configure.ac: Prepend libpython.
3730 * python/python-config.py: Likewise.
3731 * configure: Regenerate.
3733 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3735 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3737 2018-05-03 Pedro Alves <palves@redhat.com>
3740 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3741 override. Write 'true' instead of '1'.
3742 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3745 2018-05-02 Pedro Alves <palves@redhat.com>
3747 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3748 add_inf_child_target.
3749 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3750 add_inf_child_target.
3751 * aix-thread.c (aix_thread_target_info): New.
3752 (aix_thread_target) <shortname, longname, doc>: Delete.
3754 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3755 add_inf_child_target.
3756 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3757 add_inf_child_target.
3758 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3759 add_inf_child_target.
3760 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3761 add_inf_child_target.
3762 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3763 add_inf_child_target.
3764 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3765 add_inf_child_target.
3766 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3767 add_inf_child_target.
3768 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3769 add_inf_child_target.
3770 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3771 add_inf_child_target.
3772 * bfd-target.c (target_bfd_target_info): New.
3773 (target_bfd) <shortname, longname, doc>: Delete.
3775 * bsd-kvm.c (bsd_kvm_target_info): New.
3776 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3778 (bsd_kvm_target::open): Rename to ...
3779 (bsd_kvm_target_open): ... this. Adjust.
3780 * bsd-uthread.c (bsd_uthread_target_info): New.
3781 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3783 * corefile.c (core_file_command): Adjust.
3784 * corelow.c (core_target_info): New.
3785 (core_target) <shortname, longname, doc>: Delete.
3787 (core_target::open): Rename to ...
3788 (core_target_open): ... this. Adjust.
3789 * ctf.c (ctf_target_info): New.
3790 (ctf_target) <shortname, longname, doc>: Delete.
3792 (ctf_target::open): Rename to ...
3793 (ctf_target_open): ... this.
3794 (_initialize_ctf): Adjust.
3795 * exec.c (exec_target_info): New.
3796 (exec_target) <shortname, longname, doc>: Delete.
3798 (exec_target::open): Rename to ...
3799 (exec_target_open): ... this.
3800 * gdbcore.h (core_target_open): Declare.
3801 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3802 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3803 add_inf_child_target.
3804 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3805 add_inf_child_target.
3806 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3807 add_inf_child_target.
3808 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3809 add_inf_child_target.
3810 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3811 add_inf_child_target.
3812 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3813 add_inf_child_target.
3814 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3815 add_inf_child_target.
3816 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3817 add_inf_child_target.
3818 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3819 add_inf_child_target.
3820 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3821 add_inf_child_target.
3822 * inf-child.c (inf_child_target_info): New.
3823 (inf_child_target::info): New.
3824 (inf_child_open_target): Remove 'target' parameter. Use
3825 get_native_target instead.
3826 (inf_child_target::open): Delete.
3827 (add_inf_child_target): New.
3828 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3831 (add_inf_child_target): Declare.
3832 (inf_child_open_target): Declare.
3833 * linux-thread-db.c (thread_db_target_info): New.
3834 (thread_db_target) <shortname, longname, doc>: Delete.
3836 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3837 add_inf_child_target.
3838 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3839 add_inf_child_target.
3840 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3841 add_inf_child_target.
3842 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3843 add_inf_child_target.
3844 * make-target-delegates (print_class): Adjust.
3845 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3846 add_inf_child_target.
3847 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3848 add_inf_child_target.
3849 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3850 add_inf_child_target.
3851 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3852 add_inf_child_target.
3853 * nto-procfs.c (nto_native_target_info): New.
3854 (nto_procfs_target_native) <shortname, longname, doc>:
3857 (nto_procfs_target_info): New.
3858 (nto_procfs_target_procfs) <shortname, longname, doc>:
3861 (init_procfs_targets): Adjust.
3862 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3863 add_inf_child_target.
3864 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3865 add_inf_child_target.
3866 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3867 add_inf_child_target.
3868 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3869 add_inf_child_target.
3870 * ravenscar-thread.c (ravenscar_target_info): New.
3871 (ravenscar_thread_target) <shortname, longname, doc>:
3874 * record-btrace.c (record_btrace_target_info):
3875 (record_btrace_target) <shortname, longname, doc>: Delete.
3877 (record_btrace_target::open): Rename to ...
3878 (record_btrace_target_open): ... this. Adjust.
3879 * record-full.c (record_longname, record_doc): New.
3880 (record_full_base_target) <shortname, longname, doc>: Delete.
3882 (record_full_target_info): New.
3883 (record_full_target): <shortname>: Delete.
3885 (record_full_core_open_1, record_full_open_1): Update comments.
3886 (record_full_base_target::open): Rename to ...
3887 (record_full_open): ... this.
3888 (cmd_record_full_restore): Update.
3889 (_initialize_record_full): Update.
3890 * remote-sim.c (remote_sim_target_info): New.
3891 (gdbsim_target) <shortname, longname, doc>: Delete.
3893 (gdbsim_target::open): Rename to ...
3894 (gdbsim_target_open): ... this.
3895 (_initialize_remote_sim): Adjust.
3896 * remote.c (remote_doc): New.
3897 (remote_target_info): New.
3898 (remote_target) <shortname, longname, doc>: Delete.
3900 (extended_remote_target_info): New.
3901 (extended_remote_target) <shortname, longname, doc>: Delete.
3903 (remote_target::open_1): Make static. Adjust.
3904 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3905 * s390-linux-nat.c (_initialize_s390_nat): Use
3906 add_inf_child_target.
3907 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3908 add_inf_child_target.
3909 * sol-thread.c (thread_db_target_info): New.
3910 (sol_thread_target) <shortname, longname, doc>: Delete.
3912 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3913 add_inf_child_target.
3914 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3915 add_inf_child_target.
3916 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3917 add_inf_child_target.
3918 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3919 add_inf_child_target.
3920 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3921 add_inf_child_target.
3922 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3923 add_inf_child_target.
3924 * spu-linux-nat.c (_initialize_spu_nat): Use
3925 add_inf_child_target.
3926 * spu-multiarch.c (spu_multiarch_target_info): New.
3927 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3929 * target-delegates.c: Regenerate.
3930 * target.c: Include <unordered_map>.
3931 (target_ops_p): Delete.
3932 (DEF_VEC_P(target_ops_p)): Delete.
3933 (target_factories): New.
3934 (test_target_info): New.
3935 (test_target_ops::info): New.
3936 (open_target): Adjust to use target_factories.
3937 (add_target_with_completer): Rename to ...
3938 (add_target): ... this. Change prototype. Register target_info
3939 and open callback in target_factories. Register target_info in
3940 command context instead of target_ops.
3941 (add_target): Delete old implementation.
3942 (add_deprecated_target_alias): Change prototype. Adjust.
3943 (the_native_target): New.
3944 (set_native_target, get_native_target): New.
3945 (find_default_run_target): Use the_native_target.
3946 (find_attach_target, find_run_target): Simplify.
3947 (target_ops::open): Delete.
3948 (dummy_target_info): New.
3949 (dummy_target::shortname, dummy_target::longname)
3950 (dummy_target::doc): Delete.
3951 (dummy_target::info): New.
3952 (debug_target::shortname, debug_target::longname)
3953 (debug_target::doc): Delete.
3954 (debug_target::info): New.
3955 * target.h (struct target_info): New.
3956 (target_ops::~target_ops): Add comment.
3957 (target_ops::info): New.
3958 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3959 longer virtual. Implement in terms of target_info.
3960 (set_native_target, get_native_target): Declare.
3961 (target_open_ftype): New.
3962 (add_target, add_target_with_completer)
3963 (add_deprecated_target_alias): Change prototype.
3964 (test_target) <shortname, longname, doc>: Delete.
3966 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3967 add_inf_child_target.
3968 * tracefile-tfile.c (tfile_target_info): New.
3969 (tfile_target) <shortname, longname, doc>: Delete.
3971 (tfile_target::open): Rename to ...
3972 (tfile_target_open): ... this.
3973 (_initialize_tracefile_tfile): Adjust.
3974 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3975 add_inf_child_target.
3976 * windows-nat.c (_initialize_windows_nat): Use
3977 add_inf_child_target.
3978 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3979 add_inf_child_target.
3981 2018-05-02 Pedro Alves <palves@redhat.com>
3983 * linux-nat.h (linux_nat_target) <low_new_thread,
3984 low_delete_thread, low_new_fork, low_forget_process,
3985 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3986 New virtual methods.
3987 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3988 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3989 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3990 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3991 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3993 * linux-fork.c (delete_fork): Adjust to call low method.
3994 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3995 (linux_nat_new_fork, linux_nat_forget_process_hook)
3996 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3997 (linux_nat_status_is_event):
3998 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3999 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4001 (sigtrap_is_event): Rename to ...
4002 (linux_nat_target::low_status_is_event): ... this.
4003 (linux_nat_set_status_is_event): Delete.
4004 (save_stop_reason, linux_nat_wait_1)
4005 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4007 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4008 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4009 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4010 (linux_nat_set_prepare_to_resume): Delete.
4011 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4012 low virtual methods.
4013 * amd64-linux-nat.c: Likewise.
4014 * arm-linux-nat.c: Likewise.
4015 * i386-linux-nat.c: Likewise.
4016 * ia64-linux-nat.c: Likewise.
4017 * mips-linux-nat.c: Likewise.
4018 * ppc-linux-nat.c: Likewise.
4019 * s390-linux-nat.c: Likewise.
4020 * sparc64-linux-nat.c: Likewise.
4021 * x86-linux-nat.c: Likewise.
4022 * x86-linux-nat.h: Include "nat/x86-linux.h".
4023 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4024 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4027 2018-05-02 Pedro Alves <palves@redhat.com>
4029 * target.h (target_ops)
4030 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4031 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4032 stopped_by_watchpoint, have_continuable_watchpoint,
4033 stopped_data_address, watchpoint_addr_within_range,
4034 can_accel_watchpoint_condition, can_run, thread_alive,
4035 has_all_memory, has_memory, has_stack, has_registers,
4036 has_execution, can_async_p, is_async_p, supports_non_stop,
4037 always_non_stop_p, can_execute_reverse, supports_multi_process,
4038 supports_enable_disable_tracepoint,
4039 supports_disable_randomization, supports_string_tracing,
4040 supports_evaluation_of_breakpoint_conditions,
4041 can_run_breakpoint_commands, filesystem_is_local,
4042 can_download_tracepoint, get_trace_state_variable_value,
4043 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4044 record_is_replaying, record_will_replay,
4045 augmented_libraries_svr4_read>: Adjust to return bool.
4046 * aarch64-linux-nat.c: All implementations adjusted.
4047 * aix-thread.c: All implementations adjusted.
4048 * arm-linux-nat.c: All implementations adjusted.
4049 * breakpoint.c: All implementations adjusted.
4050 * bsd-kvm.c: All implementations adjusted.
4051 * bsd-uthread.c: All implementations adjusted.
4052 * corelow.c: All implementations adjusted.
4053 * ctf.c: All implementations adjusted.
4054 * darwin-nat.c: All implementations adjusted.
4055 * darwin-nat.h: All implementations adjusted.
4056 * exec.c: All implementations adjusted.
4057 * fbsd-nat.c: All implementations adjusted.
4058 * fbsd-nat.h: All implementations adjusted.
4059 * gnu-nat.c: All implementations adjusted.
4060 * gnu-nat.h: All implementations adjusted.
4061 * go32-nat.c: All implementations adjusted.
4062 * ia64-linux-nat.c: All implementations adjusted.
4063 * inf-child.c: All implementations adjusted.
4064 * inf-child.h: All implementations adjusted.
4065 * inf-ptrace.c: All implementations adjusted.
4066 * inf-ptrace.h: All implementations adjusted.
4067 * linux-nat.c: All implementations adjusted.
4068 * linux-nat.h: All implementations adjusted.
4069 * mips-linux-nat.c: All implementations adjusted.
4070 * nto-procfs.c: All implementations adjusted.
4071 * ppc-linux-nat.c: All implementations adjusted.
4072 * procfs.c: All implementations adjusted.
4073 * ravenscar-thread.c: All implementations adjusted.
4074 * record-btrace.c: All implementations adjusted.
4075 * record-full.c: All implementations adjusted.
4076 * remote-sim.c: All implementations adjusted.
4077 * remote.c: All implementations adjusted.
4078 * s390-linux-nat.c: All implementations adjusted.
4079 * sol-thread.c: All implementations adjusted.
4080 * spu-multiarch.c: All implementations adjusted.
4081 * target-delegates.c: All implementations adjusted.
4082 * target.c: All implementations adjusted.
4083 * target.h: All implementations adjusted.
4084 * tracefile-tfile.c: All implementations adjusted.
4085 * tracefile.c: All implementations adjusted.
4086 * tracefile.h: All implementations adjusted.
4087 * windows-nat.c: All implementations adjusted.
4088 * x86-linux-nat.h: All implementations adjusted.
4089 * x86-nat.h: All implementations adjusted.
4091 2018-05-02 Pedro Alves <palves@redhat.com>
4093 * make-target-delegates (scan_target_h): Don't trim lines here.
4094 Replace sequences of tabs and/or whitespace with a single
4096 (top level, parsing methods): Trim each line before processing it
4099 2018-05-02 Pedro Alves <palves@redhat.com>
4100 John Baldwin <jhb@freebsd.org>
4102 * target.h (enum strata) <debug_stratum>: New.
4103 (struct target_ops) <all delegation methods>: Replace by C++
4104 virtual methods, and drop "to_" prefix. All references updated
4106 <to_shortname, to_longname, to_doc, to_data,
4107 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4108 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4109 virtual methods. All references updated throughout.
4110 <can_attach, supports_terminal_ours, can_create_inferior,
4111 get_thread_control_capabilities, attach_no_wait>: New
4113 <insert_breakpoint, remove_breakpoint>: Now
4114 TARGET_DEFAULT_NORETURN methods.
4115 <info_proc>: Now returns bool.
4117 (OPS_MAGIC): Delete.
4118 (current_target): Delete. All references replaced by references
4120 (target_stack): ... this. New.
4121 (target_shortname, target_longname): Adjust.
4122 (target_can_run): Now a function declaration.
4123 (default_child_has_all_memory, default_child_has_memory)
4124 (default_child_has_stack, default_child_has_registers)
4125 (default_child_has_execution): Remove target_ops parameter.
4126 (complete_target_initialization): Delete.
4127 (memory_breakpoint_target): New template class.
4128 (test_target_ops): Refactor as a C++ class with virtual methods.
4129 * make-target-delegates (NAME_PART): Tighten.
4130 (POINTER_PART, CP_SYMBOL): New.
4131 (SIMPLE_RETURN_PART): Reimplement.
4132 (VEC_RETURN_PART): Expect less.
4133 (RETURN_PART, VIRTUAL_PART): New.
4134 (METHOD): Adjust to C++ virtual methods.
4135 (scan_target_h): Remove reference to C99.
4136 (dname): Output "target_ops::" prefix.
4137 (write_function_header): Adjust to output a C++ class method.
4138 (write_declaration): New.
4139 (write_delegator): Adjust to output a C++ class method.
4140 (tdname): Output "dummy_target::" prefix.
4141 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4143 (tdefault_names, debug_names): Delete.
4144 (return_types, tdefaults, styles, argtypes_array): New.
4145 (top level): All methods are delegators.
4147 (top level): Print dummy_target and debug_target classes.
4148 * target-delegates.c: Regenerate.
4149 * target-debug.h (target_debug_print_enum_info_proc_what)
4150 (target_debug_print_thread_control_capabilities)
4151 (target_debug_print_thread_info_p): New.
4152 * target.c (dummy_target): Delete.
4153 (the_dummy_target, the_debug_target): New.
4154 (target_stack): Now extern.
4155 (set_targetdebug): Push/unpush debug target.
4156 (default_child_has_all_memory, default_child_has_memory)
4157 (default_child_has_stack, default_child_has_registers)
4158 (default_child_has_execution): Remove target_ops parameter.
4159 (complete_target_initialization): Delete.
4160 (add_target_with_completer): No longer call
4161 complete_target_initialization.
4162 (target_supports_terminal_ours): Use regular delegation.
4163 (update_current_target): Delete.
4164 (push_target): No longer check magic number. Don't call
4165 update_current_target.
4166 (unpush_target): Don't call update_current_target.
4167 (target_is_pushed): No longer check magic number.
4168 (target_require_runnable): Skip for all stratums over
4170 (target_ops::info_proc): New.
4171 (target_info_proc): Use find_target_at and
4172 find_default_run_target.
4173 (target_supports_disable_randomization): Use regular delegation.
4174 (target_get_osdata): Use find_target_at.
4175 (target_ops::open, target_ops::close, target_ops::can_attach)
4176 (target_ops::attach, target_ops::can_create_inferior)
4177 (target_ops::create_inferior, target_ops::can_run)
4178 (target_can_run): New.
4179 (default_fileio_target): Use regular delegation.
4180 (target_ops::fileio_open, target_ops::fileio_pwrite)
4181 (target_ops::fileio_pread, target_ops::fileio_fstat)
4182 (target_ops::fileio_close, target_ops::fileio_unlink)
4183 (target_ops::fileio_readlink): New.
4184 (target_fileio_open_1, target_fileio_unlink)
4185 (target_fileio_readlink): Always call the target method. Handle
4187 (return_zero, return_zero_has_execution): Delete.
4188 (init_dummy_target): Delete.
4189 (dummy_target::dummy_target, dummy_target::shortname)
4190 (dummy_target::longname, dummy_target::doc)
4191 (debug_target::debug_target, debug_target::shortname)
4192 (debug_target::longname, debug_target::doc): New.
4193 (target_supports_delete_record): Use regular delegation.
4194 (setup_target_debug): Delete.
4195 (maintenance_print_target_stack): Skip debug_stratum.
4196 (initialize_targets): Instantiate the_dummy_target and
4198 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4200 (target_auxv_search, fprint_target_auxv): Adjust.
4201 (info_auxv_command): Adjust to use target_stack.
4202 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4203 * exceptions.c (print_flush): Handle a NULL target_stack.
4204 * regcache.c (target_ops_no_register): Refactor as class with
4207 * exec.c (exec_target): New class.
4208 (exec_ops): Now an exec_target.
4209 (exec_open, exec_close_1, exec_get_section_table)
4210 (exec_xfer_partial, exec_files_info, exec_has_memory)
4211 (exec_make_note_section): Refactor as exec_target methods.
4212 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4214 (exec_target::find_memory_regions): New.
4215 (_initialize_exec): Don't call init_exec_ops.
4216 * gdbcore.h (exec_file_clear): Delete.
4218 * corefile.c (core_target): Delete.
4219 (core_file_command): Adjust.
4220 * corelow.c (core_target): New class.
4221 (the_core_target): New.
4222 (core_close): Remove target_ops parameter.
4223 (core_close_cleanup): Adjust.
4224 (core_target::close): New.
4225 (core_open, core_detach, get_core_registers, core_files_info)
4226 (core_xfer_partial, core_thread_alive, core_read_description)
4227 (core_pid_to_str, core_thread_name, core_has_memory)
4228 (core_has_stack, core_has_registers, core_info_proc): Rework as
4229 core_target methods.
4230 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4231 (_initialize_corelow): Initialize the_core_target.
4232 * gdbcore.h (core_target): Delete.
4233 (the_core_target): New.
4235 * ctf.c: (ctf_target): New class.
4236 (ctf_ops): Now a ctf_target.
4237 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4238 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4239 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4241 (init_ctf_ops): Delete.
4242 (_initialize_ctf): Don't call it.
4243 * tracefile-tfile.c (tfile_target): New class.
4244 (tfile_ops): Now a tfile_target.
4245 (tfile_open, tfile_close, tfile_files_info)
4246 (tfile_get_tracepoint_status, tfile_trace_find)
4247 (tfile_fetch_registers, tfile_xfer_partial)
4248 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4249 Refactor as tfile_target methods.
4250 (tfile_xfer_partial_features): Remove target_ops parameter.
4251 (init_tfile_ops): Delete.
4252 (_initialize_tracefile_tfile): Don't call it.
4253 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4254 (tracefile_has_stack, tracefile_has_registers)
4255 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4256 tracefile_target methods.
4257 (init_tracefile_ops): Delete.
4258 (tracefile_target::tracefile_target): New.
4259 * tracefile.h: Include "target.h".
4260 (tracefile_target): New class.
4261 (init_tracefile_ops): Delete.
4263 * spu-multiarch.c (spu_multiarch_target): New class.
4264 (spu_ops): Now a spu_multiarch_target.
4265 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4266 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4267 (spu_search_memory, spu_mourn_inferior): Refactor as
4268 spu_multiarch_target methods.
4269 (init_spu_ops): Delete.
4270 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4271 complete_target_initialization.
4273 * ravenscar-thread.c (ravenscar_thread_target): New class.
4274 (ravenscar_ops): Now a ravenscar_thread_target.
4275 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4276 (ravenscar_thread_alive, ravenscar_pid_to_str)
4277 (ravenscar_fetch_registers, ravenscar_store_registers)
4278 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4279 (ravenscar_stopped_by_hw_breakpoint)
4280 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4281 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4282 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4284 (init_ravenscar_thread_ops): Delete.
4285 (_initialize_ravenscar): Remove references to
4286 init_ravenscar_thread_ops and complete_target_initialization.
4288 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4289 (bsd_uthread_target): New class.
4290 (bsd_uthread_ops): Now a bsd_uthread_target.
4291 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4292 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4293 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4294 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4295 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4296 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4297 (bsd_uthread_target): Delete function.
4298 (_initialize_bsd_uthread): Remove reference to
4299 complete_target_initialization.
4301 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4302 (target_bfd): ... this new class.
4303 (target_bfd_xfer_partial, target_bfd_get_section_table)
4304 (target_bfd_close): Refactor as target_bfd methods.
4305 (target_bfd::~target_bfd): New.
4306 (target_bfd_reopen): Adjust.
4307 (target_bfd::close): New.
4309 * record-btrace.c (record_btrace_target): New class.
4310 (record_btrace_ops): Now a record_btrace_target.
4311 (record_btrace_open, record_btrace_stop_recording)
4312 (record_btrace_disconnect, record_btrace_close)
4313 (record_btrace_async, record_btrace_info)
4314 (record_btrace_insn_history, record_btrace_insn_history_range)
4315 (record_btrace_insn_history_from, record_btrace_call_history)
4316 (record_btrace_call_history_range)
4317 (record_btrace_call_history_from, record_btrace_record_method)
4318 (record_btrace_is_replaying, record_btrace_will_replay)
4319 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4320 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4321 (record_btrace_store_registers, record_btrace_prepare_to_store)
4322 (record_btrace_to_get_unwinder)
4323 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4324 (record_btrace_commit_resume, record_btrace_wait)
4325 (record_btrace_stop, record_btrace_can_execute_reverse)
4326 (record_btrace_stopped_by_sw_breakpoint)
4327 (record_btrace_supports_stopped_by_sw_breakpoint)
4328 (record_btrace_stopped_by_hw_breakpoint)
4329 (record_btrace_supports_stopped_by_hw_breakpoint)
4330 (record_btrace_update_thread_list, record_btrace_thread_alive)
4331 (record_btrace_goto_begin, record_btrace_goto_end)
4332 (record_btrace_goto, record_btrace_stop_replaying_all)
4333 (record_btrace_execution_direction)
4334 (record_btrace_prepare_to_generate_core)
4335 (record_btrace_done_generating_core): Refactor as
4336 record_btrace_target methods.
4337 (init_record_btrace_ops): Delete.
4338 (_initialize_record_btrace): Remove reference to
4339 init_record_btrace_ops.
4340 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4341 the execution_direction global.
4342 (record_full_base_target, record_full_target)
4343 (record_full_core_target): New classes.
4344 (record_full_ops): Now a record_full_target.
4345 (record_full_core_ops): Now a record_full_core_target.
4346 (record_full_target::detach, record_full_target::disconnect)
4347 (record_full_core_target::disconnect)
4348 (record_full_target::mourn_inferior, record_full_target::kill):
4350 (record_full_open, record_full_close, record_full_async): Refactor
4351 as methods of the record_full_base_target class.
4352 (record_full_resume, record_full_commit_resume): Refactor
4353 as methods of the record_full_target class.
4354 (record_full_wait, record_full_stopped_by_watchpoint)
4355 (record_full_stopped_data_address)
4356 (record_full_stopped_by_sw_breakpoint)
4357 (record_full_supports_stopped_by_sw_breakpoint)
4358 (record_full_stopped_by_hw_breakpoint)
4359 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4360 methods of the record_full_base_target class.
4361 (record_full_store_registers, record_full_xfer_partial)
4362 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4363 Refactor as methods of the record_full_target class.
4364 (record_full_can_execute_reverse, record_full_get_bookmark)
4365 (record_full_goto_bookmark, record_full_execution_direction)
4366 (record_full_record_method, record_full_info, record_full_delete)
4367 (record_full_is_replaying, record_full_will_replay)
4368 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4369 (record_full_stop_replaying): Refactor as methods of the
4370 record_full_base_target class.
4371 (record_full_core_resume, record_full_core_kill)
4372 (record_full_core_fetch_registers)
4373 (record_full_core_prepare_to_store)
4374 (record_full_core_store_registers, record_full_core_xfer_partial)
4375 (record_full_core_insert_breakpoint)
4376 (record_full_core_remove_breakpoint)
4377 (record_full_core_has_execution): Refactor
4378 as methods of the record_full_core_target class.
4379 (record_full_base_target::supports_delete_record): New.
4380 (init_record_full_ops): Delete.
4381 (init_record_full_core_ops): Delete.
4382 (record_full_save): Refactor as method of the
4383 record_full_base_target class.
4384 (_initialize_record_full): Remove references to
4385 init_record_full_ops and init_record_full_core_ops.
4387 * remote.c (remote_target, extended_remote_target): New classes.
4388 (remote_ops): Now a remote_target.
4389 (extended_remote_ops): Now an extended_remote_target.
4390 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4391 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4392 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4393 (remote_pass_signals, remote_set_syscall_catchpoint)
4394 (remote_program_signals, )
4395 (remote_thread_always_alive): Remove target_ops parameter.
4396 (remote_thread_alive, remote_thread_name)
4397 (remote_update_thread_list, remote_threads_extra_info)
4398 (remote_static_tracepoint_marker_at)
4399 (remote_static_tracepoint_markers_by_strid)
4400 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4401 (remote_open): Refactor as methods of remote_target.
4402 (extended_remote_open, extended_remote_detach)
4403 (extended_remote_attach, extended_remote_post_attach):
4404 (extended_remote_supports_disable_randomization)
4405 (extended_remote_create_inferior): : Refactor as method of
4406 extended_remote_target.
4407 (remote_set_permissions, remote_open_1, remote_detach)
4408 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4409 (remote_resume, remote_commit_resume, remote_stop)
4410 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4411 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4412 (remote_prepare_to_store, remote_store_registers)
4413 (remote_flash_erase, remote_flash_done, remote_files_info)
4414 (remote_kill, remote_mourn, remote_insert_breakpoint)
4415 (remote_remove_breakpoint, remote_insert_watchpoint)
4416 (remote_watchpoint_addr_within_range)
4417 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4418 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4419 (remote_supports_stopped_by_sw_breakpoint)
4420 (remote_stopped_by_hw_breakpoint)
4421 (remote_supports_stopped_by_hw_breakpoint)
4422 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4423 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4424 (remote_verify_memory): Refactor as methods of remote_target.
4425 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4427 (remote_xfer_partial, remote_get_memory_xfer_limit)
4428 (remote_search_memory, remote_rcmd, remote_memory_map)
4429 (remote_pid_to_str, remote_get_thread_local_address)
4430 (remote_get_tib_address, remote_read_description): Refactor as
4431 methods of remote_target.
4432 (remote_target::fileio_open, remote_target::fileio_pwrite)
4433 (remote_target::fileio_pread, remote_target::fileio_close): New.
4434 (remote_hostio_readlink, remote_hostio_fstat)
4435 (remote_filesystem_is_local, remote_can_execute_reverse)
4436 (remote_supports_non_stop, remote_supports_disable_randomization)
4437 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4438 (remote_supports_enable_disable_tracepoint)
4439 (remote_supports_string_tracing)
4440 (remote_can_run_breakpoint_commands, remote_trace_init)
4441 (remote_download_tracepoint, remote_can_download_tracepoint)
4442 (remote_download_trace_state_variable, remote_enable_tracepoint)
4443 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4444 (remote_trace_start, remote_get_trace_status)
4445 (remote_get_tracepoint_status, remote_trace_stop)
4446 (remote_trace_find, remote_get_trace_state_variable_value)
4447 (remote_save_trace_data, remote_get_raw_trace_data)
4448 (remote_set_disconnected_tracing, remote_core_of_thread)
4449 (remote_set_circular_trace_buffer, remote_traceframe_info)
4450 (remote_get_min_fast_tracepoint_insn_len)
4451 (remote_set_trace_buffer_size, remote_set_trace_notes)
4452 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4453 (remote_disable_btrace, remote_teardown_btrace)
4454 (remote_read_btrace, remote_btrace_conf)
4455 (remote_augmented_libraries_svr4_read, remote_load)
4456 (remote_pid_to_exec_file, remote_can_do_single_step)
4457 (remote_execution_direction, remote_thread_handle_to_thread_info):
4458 Refactor as methods of remote_target.
4459 (init_remote_ops, init_extended_remote_ops): Delete.
4460 (remote_can_async_p, remote_is_async_p, remote_async)
4461 (remote_thread_events, remote_upload_tracepoints)
4462 (remote_upload_trace_state_variables): Refactor as methods of
4464 (_initialize_remote): Remove references to init_remote_ops and
4465 init_extended_remote_ops.
4467 * remote-sim.c (gdbsim_target): New class.
4468 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4469 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4470 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4471 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4472 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4473 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4474 Refactor as methods of gdbsim_target.
4475 (gdbsim_ops): Now a gdbsim_target.
4476 (init_gdbsim_ops): Delete.
4477 (gdbsim_cntrl_c): Adjust.
4478 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4480 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4481 (the_amd64_linux_nat_target): New.
4482 (amd64_linux_fetch_inferior_registers)
4483 (amd64_linux_store_inferior_registers): Refactor as methods of
4484 amd64_linux_nat_target.
4485 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4486 * i386-linux-nat.c: Don't include "linux-nat.h".
4487 (i386_linux_nat_target): New class.
4488 (the_i386_linux_nat_target): New.
4489 (i386_linux_fetch_inferior_registers)
4490 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4491 as methods of i386_linux_nat_target.
4492 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4493 * inf-child.c (inf_child_ops): Delete.
4494 (inf_child_fetch_inferior_registers)
4495 (inf_child_store_inferior_registers): Delete.
4496 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4497 methods of inf_child_target.
4498 (inf_child_target::supports_terminal_ours)
4499 (inf_child_target::terminal_init)
4500 (inf_child_target::terminal_inferior)
4501 (inf_child_target::terminal_ours_for_output)
4502 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4503 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4505 (inf_child_open, inf_child_disconnect, inf_child_close)
4506 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4507 (inf_child_post_startup_inferior, inf_child_can_run)
4508 (inf_child_pid_to_exec_file): Refactor as methods of
4510 (inf_child_follow_fork): Delete.
4511 (inf_child_target::can_create_inferior)
4512 (inf_child_target::can_attach): New.
4513 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4514 (inf_child_target::has_stack, inf_child_target::has_registers)
4515 (inf_child_target::has_execution): New.
4516 (inf_child_fileio_open, inf_child_fileio_pwrite)
4517 (inf_child_fileio_pread, inf_child_fileio_fstat)
4518 (inf_child_fileio_close, inf_child_fileio_unlink)
4519 (inf_child_fileio_readlink, inf_child_use_agent)
4520 (inf_child_can_use_agent): Refactor as methods of
4522 (return_zero, inf_child_target): Delete.
4523 (inf_child_target::inf_child_target): New.
4524 * inf-child.h: Include "target.h".
4525 (inf_child_target): Delete function prototype.
4526 (inf_child_target): New class.
4527 (inf_child_open_target, inf_child_mourn_inferior)
4528 (inf_child_maybe_unpush_target): Delete.
4529 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4530 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4531 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4532 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4533 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4534 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4535 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4536 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4537 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4538 methods of inf_ptrace_target.
4539 (inf_ptrace_target): Delete function.
4540 * inf-ptrace.h: Include "inf-child.h".
4541 (inf_ptrace_target): Delete function declaration.
4542 (inf_ptrace_target): New class.
4543 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4544 * linux-nat.c (linux_target): New.
4545 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4546 (linux_nat_target::~linux_nat_target): New.
4547 (linux_child_post_attach, linux_child_post_startup_inferior)
4548 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4549 (linux_child_remove_fork_catchpoint)
4550 (linux_child_insert_vfork_catchpoint)
4551 (linux_child_remove_vfork_catchpoint)
4552 (linux_child_insert_exec_catchpoint)
4553 (linux_child_remove_exec_catchpoint)
4554 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4555 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4556 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4557 (linux_nat_stopped_data_address)
4558 (linux_nat_stopped_by_sw_breakpoint)
4559 (linux_nat_supports_stopped_by_sw_breakpoint)
4560 (linux_nat_stopped_by_hw_breakpoint)
4561 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4562 (linux_nat_kill, linux_nat_mourn_inferior)
4563 (linux_nat_xfer_partial, linux_nat_thread_alive)
4564 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4565 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4566 (linux_child_static_tracepoint_markers_by_strid)
4567 (linux_nat_is_async_p, linux_nat_can_async_p)
4568 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4569 (linux_nat_supports_multi_process)
4570 (linux_nat_supports_disable_randomization, linux_nat_async)
4571 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4572 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4573 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4574 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4575 methods of linux_nat_target.
4576 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4577 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4579 (check_stopped_by_watchpoint): Adjust.
4580 (linux_xfer_partial): Delete.
4581 (linux_target_install_ops, linux_target, linux_nat_add_target):
4583 (linux_nat_target::linux_nat_target): New.
4584 * linux-nat.h: Include "inf-ptrace.h".
4585 (linux_nat_target): New.
4586 (linux_target, linux_target_install_ops, linux_nat_add_target):
4587 Delete function declarations.
4588 (linux_target): Declare global.
4589 * linux-thread-db.c (thread_db_target): New.
4590 (thread_db_target::thread_db_target): New.
4591 (thread_db_ops): Delete.
4592 (the_thread_db_target): New.
4593 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4594 (thread_db_update_thread_list, thread_db_pid_to_str)
4595 (thread_db_extra_thread_info)
4596 (thread_db_thread_handle_to_thread_info)
4597 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4598 (thread_db_resume): Refactor as methods of thread_db_target.
4599 (init_thread_db_ops): Delete.
4600 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4601 * x86-linux-nat.c: Don't include "linux-nat.h".
4602 (super_post_startup_inferior): Delete.
4603 (x86_linux_nat_target::~x86_linux_nat_target): New.
4604 (x86_linux_child_post_startup_inferior)
4605 (x86_linux_read_description, x86_linux_enable_btrace)
4606 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4607 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4608 methods of x86_linux_nat_target.
4609 (x86_linux_create_target): Delete. Bits folded ...
4610 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4612 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4613 (x86_linux_nat_target): New class.
4614 (x86_linux_create_target): Delete.
4615 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4616 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4617 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4618 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4619 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4620 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4622 (x86_use_watchpoints): Delete.
4623 * x86-nat.h: Include "breakpoint.h" and "target.h".
4624 (x86_use_watchpoints): Delete.
4625 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4626 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4627 (x86_insert_watchpoint, x86_remove_watchpoint)
4628 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4629 (x86_stopped_by_hw_breakpoint): New declarations.
4630 (x86_nat_target): New template class.
4632 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4633 (the_ppc_linux_nat_target): New.
4634 (ppc_linux_fetch_inferior_registers)
4635 (ppc_linux_can_use_hw_breakpoint)
4636 (ppc_linux_region_ok_for_hw_watchpoint)
4637 (ppc_linux_ranged_break_num_registers)
4638 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4639 (ppc_linux_insert_mask_watchpoint)
4640 (ppc_linux_remove_mask_watchpoint)
4641 (ppc_linux_can_accel_watchpoint_condition)
4642 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4643 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4644 (ppc_linux_watchpoint_addr_within_range)
4645 (ppc_linux_masked_watch_num_registers)
4646 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4647 (ppc_linux_read_description): Refactor as methods of
4648 ppc_linux_nat_target.
4649 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4651 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4652 (procfs_target): New class.
4653 (the_procfs_target): New.
4654 (procfs_target): Delete function.
4655 (procfs_auxv_parse, procfs_attach, procfs_detach)
4656 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4657 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4658 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4659 (procfs_create_inferior, procfs_update_thread_list)
4660 (procfs_thread_alive, procfs_pid_to_str)
4661 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4662 (procfs_stopped_data_address, procfs_insert_watchpoint)
4663 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4664 (proc_find_memory_regions, procfs_info_proc)
4665 (procfs_make_note_section): Refactor as methods of procfs_target.
4666 (_initialize_procfs): Adjust.
4667 * sol-thread.c (sol_thread_target): New class.
4668 (sol_thread_ops): Now a sol_thread_target.
4669 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4670 (sol_thread_fetch_registers, sol_thread_store_registers)
4671 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4672 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4673 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4674 (init_sol_thread_ops): Delete.
4675 (_initialize_sol_thread): Adjust. Remove references to
4676 init_sol_thread_ops and complete_target_initialization.
4678 * windows-nat.c (windows_nat_target): New class.
4679 (windows_fetch_inferior_registers)
4680 (windows_store_inferior_registers, windows_resume, windows_wait)
4681 (windows_attach, windows_detach, windows_pid_to_exec_file)
4682 (windows_files_info, windows_create_inferior)
4683 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4684 (windows_close, windows_pid_to_str, windows_xfer_partial)
4685 (windows_get_tib_address, windows_get_ada_task_ptid)
4686 (windows_thread_name, windows_thread_alive): Refactor as
4687 windows_nat_target methods.
4688 (do_initial_windows_stuff): Adjust.
4689 (windows_target): Delete function.
4690 (_initialize_windows_nat): Adjust.
4692 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4693 (darwin_mourn_inferior, darwin_kill_inferior)
4694 (darwin_create_inferior, darwin_attach, darwin_detach)
4695 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4696 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4697 (darwin_supports_multi_process): Refactor as darwin_nat_target
4699 (darwin_resume_to, darwin_files_info): Delete.
4700 (_initialize_darwin_inferior): Rename to ...
4701 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4702 * darwin-nat.h: Include "inf-child.h".
4703 (darwin_nat_target): New class.
4704 (darwin_complete_target): Delete.
4705 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4706 (darwin_target): New.
4707 (i386_darwin_fetch_inferior_registers)
4708 (i386_darwin_store_inferior_registers): Refactor as methods of
4710 (darwin_complete_target): Delete, with ...
4711 (_initialize_i386_darwin_nat): ... bits factored out here.
4713 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4714 (the_alpha_linux_nat_target): New.
4715 (alpha_linux_register_u_offset): Refactor as
4716 alpha_linux_nat_target method.
4717 (_initialize_alpha_linux_nat): Adjust.
4718 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4719 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4720 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4721 methods of linux_nat_trad_target.
4722 (linux_trad_target): Delete.
4723 * linux-nat-trad.h (linux_trad_target): Delete function.
4724 (linux_nat_trad_target): New class.
4725 * mips-linux-nat.c (mips_linux_nat_target): New class.
4726 (super_fetch_registers, super_store_registers, super_close):
4728 (the_mips_linux_nat_target): New.
4729 (mips64_linux_regsets_fetch_registers)
4730 (mips64_linux_regsets_store_registers)
4731 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4732 (mips_linux_register_u_offset, mips_linux_read_description)
4733 (mips_linux_can_use_hw_breakpoint)
4734 (mips_linux_stopped_by_watchpoint)
4735 (mips_linux_stopped_data_address)
4736 (mips_linux_region_ok_for_hw_watchpoint)
4737 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4738 (mips_linux_close): Refactor as methods of mips_linux_nat.
4739 (_initialize_mips_linux_nat): Adjust to C++ification.
4741 * aix-thread.c (aix_thread_target): New class.
4742 (aix_thread_ops): Now an aix_thread_target.
4743 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4744 (aix_thread_fetch_registers, aix_thread_store_registers)
4745 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4746 (aix_thread_thread_alive, aix_thread_pid_to_str)
4747 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4748 Refactor as methods of aix_thread_target.
4749 (init_aix_thread_ops): Delete.
4750 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4751 and complete_target_initialization.
4752 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4753 (rs6000_nat_target): New class.
4754 (the_rs6000_nat_target): New.
4755 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4756 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4757 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4758 (super_create_inferior): Delete.
4759 (_initialize_rs6000_nat): Adjust to C++ification.
4761 * arm-linux-nat.c (arm_linux_nat_target): New class.
4762 (the_arm_linux_nat_target): New.
4763 (arm_linux_fetch_inferior_registers)
4764 (arm_linux_store_inferior_registers, arm_linux_read_description)
4765 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4766 (arm_linux_remove_hw_breakpoint)
4767 (arm_linux_region_ok_for_hw_watchpoint)
4768 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4769 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4770 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4771 arm_linux_nat_target.
4772 (_initialize_arm_linux_nat): Adjust to C++ification.
4774 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4775 (the_aarch64_linux_nat_target): New.
4776 (aarch64_linux_fetch_inferior_registers)
4777 (aarch64_linux_store_inferior_registers)
4778 (aarch64_linux_child_post_startup_inferior)
4779 (aarch64_linux_read_description)
4780 (aarch64_linux_can_use_hw_breakpoint)
4781 (aarch64_linux_insert_hw_breakpoint)
4782 (aarch64_linux_remove_hw_breakpoint)
4783 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4784 (aarch64_linux_region_ok_for_hw_watchpoint)
4785 (aarch64_linux_stopped_data_address)
4786 (aarch64_linux_stopped_by_watchpoint)
4787 (aarch64_linux_watchpoint_addr_within_range)
4788 (aarch64_linux_can_do_single_step): Refactor as methods of
4789 aarch64_linux_nat_target.
4790 (super_post_startup_inferior): Delete.
4791 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4793 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4794 (the_hppa_linux_nat_target): New.
4795 (hppa_linux_fetch_inferior_registers)
4796 (hppa_linux_store_inferior_registers): Refactor as methods of
4797 hppa_linux_nat_target.
4798 (_initialize_hppa_linux_nat): Adjust to C++ification.
4800 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4801 (the_ia64_linux_nat_target): New.
4802 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4803 (ia64_linux_stopped_data_address)
4804 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4805 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4806 ia64_linux_nat_target methods.
4807 (super_xfer_partial): Delete.
4808 (_initialize_ia64_linux_nat): Adjust to C++ification.
4810 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4811 (the_m32r_linux_nat_target): New.
4812 (m32r_linux_fetch_inferior_registers)
4813 (m32r_linux_store_inferior_registers): Refactor as
4814 m32r_linux_nat_target methods.
4815 (_initialize_m32r_linux_nat): Adjust to C++ification.
4817 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4818 (the_m68k_linux_nat_target): New.
4819 (m68k_linux_fetch_inferior_registers)
4820 (m68k_linux_store_inferior_registers): Refactor as
4821 m68k_linux_nat_target methods.
4822 (_initialize_m68k_linux_nat): Adjust to C++ification.
4824 * s390-linux-nat.c (s390_linux_nat_target): New class.
4825 (the_s390_linux_nat_target): New.
4826 (s390_linux_fetch_inferior_registers)
4827 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4828 (s390_insert_watchpoint, s390_remove_watchpoint)
4829 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4830 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4831 (s390_auxv_parse, s390_read_description): Refactor as methods of
4832 s390_linux_nat_target.
4833 (_initialize_s390_nat): Adjust to C++ification.
4835 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4836 (the_sparc_linux_nat_target): New.
4837 (_initialize_sparc_linux_nat): Adjust to C++ification.
4838 * sparc-nat.c (sparc_fetch_inferior_registers)
4839 (sparc_store_inferior_registers): Remove target_ops parameter.
4840 * sparc-nat.h (sparc_fetch_inferior_registers)
4841 (sparc_store_inferior_registers): Remove target_ops parameter.
4842 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4843 (the_sparc64_linux_nat_target): New.
4844 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4846 * spu-linux-nat.c (spu_linux_nat_target): New class.
4847 (the_spu_linux_nat_target): New.
4848 (spu_child_post_startup_inferior, spu_child_post_attach)
4849 (spu_child_wait, spu_fetch_inferior_registers)
4850 (spu_store_inferior_registers, spu_xfer_partial)
4851 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4853 (_initialize_spu_nat): Adjust to C++ification.
4855 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4856 (the_tilegx_linux_nat_target): New.
4857 (fetch_inferior_registers, store_inferior_registers):
4858 Refactor as methods.
4859 (_initialize_tile_linux_nat): Adjust to C++ification.
4861 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4862 (the_xtensa_linux_nat_target): New.
4863 (xtensa_linux_fetch_inferior_registers)
4864 (xtensa_linux_store_inferior_registers): Refactor as
4865 xtensa_linux_nat_target methods.
4866 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4868 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4869 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4870 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4871 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4872 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4873 (fbsd_stopped_by_sw_breakpoint)
4874 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4875 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4876 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4877 (fbsd_post_startup_inferior, fbsd_post_attach)
4878 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4879 (fbsd_set_syscall_catchpoint)
4880 (super_xfer_partial, super_resume, super_wait)
4881 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4882 (fbsd_handle_debug_trap): Remove target_ops parameter.
4883 (fbsd_nat_add_target): Delete.
4884 * fbsd-nat.h: Include "inf-ptrace.h".
4885 (fbsd_nat_add_target): Delete.
4886 (USE_SIGTRAP_SIGINFO): Define.
4887 (fbsd_nat_target): New class.
4889 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4890 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4891 (amd64bsd_target): Delete.
4892 * amd64-bsd-nat.h: New file.
4893 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4895 (amd64_fbsd_nat_target): New class.
4896 (the_amd64_fbsd_nat_target): New.
4897 (amd64fbsd_read_description): Refactor as method of
4898 amd64_fbsd_nat_target.
4899 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4900 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4901 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4902 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4903 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4904 (i386bsd_target): Delete.
4905 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4906 (i386bsd_fetch_inferior_registers)
4907 (i386bsd_store_inferior_registers): Declare.
4908 (i386_bsd_nat_target): New class.
4909 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4910 (the_i386_fbsd_nat_target): New.
4911 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4912 i386_fbsd_nat_target methods.
4913 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4914 (_initialize_i386fbsd_nat): Adjust to C++ification.
4915 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4916 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4917 (_initialize_x86_bsd_nat): Adjust to C++ification.
4918 * x86-bsd-nat.h: Include "x86-nat.h".
4919 (x86bsd_target): Delete declaration.
4920 (x86bsd_nat_target): New class.
4922 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4923 (the_aarch64_fbsd_nat_target): New.
4924 (aarch64_fbsd_fetch_inferior_registers)
4925 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4926 aarch64_fbsd_nat_target.
4927 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4928 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4929 (the_alpha_bsd_nat_target): New.
4930 (alphabsd_fetch_inferior_registers)
4931 (alphabsd_store_inferior_registers): Refactor as
4932 alpha_bsd_nat_target methods.
4933 (_initialize_alphabsd_nat): Refactor as methods of
4934 alpha_bsd_nat_target.
4935 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4936 (the_amd64_nbsd_nat_target): New.
4937 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4938 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4939 (the_amd64_obsd_nat_target): New.
4940 (_initialize_amd64obsd_nat): Adjust to C++ification.
4941 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4942 (the_arm_fbsd_nat_target): New.
4943 (arm_fbsd_fetch_inferior_registers)
4944 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4945 (_initialize_arm_fbsd_nat): Refactor as methods of
4946 arm_fbsd_nat_target.
4947 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4948 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4949 (the_arm_netbsd_nat_target): New.
4950 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4951 arm_netbsd_nat_target.
4952 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4953 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4954 (the_hppa_nbsd_nat_target): New.
4955 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4956 hppa_nbsd_nat_target methods.
4957 (_initialize_hppanbsd_nat): Adjust to C++ification.
4958 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4959 (the_hppa_obsd_nat_target): New.
4960 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4961 methods of hppa_obsd_nat_target.
4962 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4964 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4965 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4967 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4968 (_initialize_i386obsd_nat): Use add_target.
4969 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4970 (the_m68k_bsd_nat_target): New.
4971 (m68kbsd_fetch_inferior_registers)
4972 (m68kbsd_store_inferior_registers): Refactor as methods of
4973 m68k_bsd_nat_target.
4974 (_initialize_m68kbsd_nat): Adjust to C++ification.
4975 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4976 (the_mips_fbsd_nat_target): New.
4977 (mips_fbsd_fetch_inferior_registers)
4978 (mips_fbsd_store_inferior_registers): Refactor as methods of
4979 mips_fbsd_nat_target.
4980 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4982 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4983 (the_mips_nbsd_nat_target): New.
4984 (mipsnbsd_fetch_inferior_registers)
4985 (mipsnbsd_store_inferior_registers): Refactor as methods of
4986 mips_nbsd_nat_target.
4987 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4988 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4989 (the_mips64_obsd_nat_target): New.
4990 (mips64obsd_fetch_inferior_registers)
4991 (mips64obsd_store_inferior_registers): Refactor as methods of
4992 mips64_obsd_nat_target.
4993 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4995 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4997 * nbsd-nat.h: Include "inf-ptrace.h".
4998 (nbsd_nat_target): New class.
4999 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5000 (obsd_wait): Refactor as methods of obsd_nat_target.
5001 (obsd_add_target): Delete.
5002 * obsd-nat.h: Include "inf-ptrace.h".
5003 (obsd_nat_target): New class.
5004 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5005 (the_ppc_fbsd_nat_target): New.
5006 (ppcfbsd_fetch_inferior_registers)
5007 (ppcfbsd_store_inferior_registers): Refactor as methods of
5008 ppc_fbsd_nat_target.
5009 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5011 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5012 (the_ppc_nbsd_nat_target): New.
5013 (ppcnbsd_fetch_inferior_registers)
5014 (ppcnbsd_store_inferior_registers): Refactor as methods of
5015 ppc_nbsd_nat_target.
5016 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5017 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5018 (the_ppc_obsd_nat_target): New.
5019 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5020 methods of ppc_obsd_nat_target.
5021 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5023 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5024 (the_sh_nbsd_nat_target): New.
5025 (shnbsd_fetch_inferior_registers)
5026 (shnbsd_store_inferior_registers): Refactor as methods of
5028 (_initialize_shnbsd_nat): Adjust to C++ification.
5029 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5030 (inf_ptrace_xfer_partial): Delete.
5031 (sparc_xfer_partial, sparc_target): Delete.
5032 * sparc-nat.h (sparc_fetch_inferior_registers)
5033 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5034 (sparc_target): Delete function declaration.
5035 (sparc_target): New template class.
5036 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5037 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5038 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5039 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5041 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5042 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5043 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5044 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5046 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5047 (the_vax_bsd_nat_target): New.
5048 (vaxbsd_fetch_inferior_registers)
5049 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5051 (_initialize_vaxbsd_nat): Adjust to C++ification.
5053 * bsd-kvm.c (bsd_kvm_target): New class.
5054 (bsd_kvm_ops): Now a bsd_kvm_target.
5055 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5056 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5057 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5059 (bsd_kvm_return_one): Delete.
5060 (bsd_kvm_add_target): Adjust to C++ification.
5062 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5063 (nto_procfs_target_procfs): New classes.
5064 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5065 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5066 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5067 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5068 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5069 (procfs_remove_hw_breakpoint, procfs_resume)
5070 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5071 (procfs_kill_inferior, procfs_store_registers)
5072 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5073 as methods of nto_procfs_target.
5074 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5075 (nto_native_ops): Delete.
5076 (procfs_open, procfs_native_open): Delete.
5077 (nto_native_ops): Now an nto_procfs_target_native.
5078 (init_procfs_targets): Adjust to C++ification.
5079 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5080 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5081 Refactor as methods of nto_procfs_target.
5083 * go32-nat.c (go32_nat_target): New class.
5084 (the_go32_nat_target): New.
5085 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5086 (go32_store_registers, go32_xfer_partial, go32_files_info)
5087 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5088 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5089 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5090 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5091 (go32_target): Delete.
5092 (_initialize_go32_nat): Adjust to C++ification.
5094 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5095 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5096 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5097 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5099 (gnu_target): Delete.
5100 * gnu-nat.h (gnu_target): Delete.
5101 (gnu_nat_target): New class.
5102 * i386-gnu-nat.c (gnu_base_target): New.
5103 (i386_gnu_nat_target): New class.
5104 (the_i386_gnu_nat_target): New.
5105 (_initialize_i386gnu_nat): Adjust to C++ification.
5107 2018-05-02 Pedro Alves <palves@redhat.com>
5109 * bfd-target.c (target_bfd_xclose): Rename to ...
5110 (target_bfd_close): ... this.
5111 (target_bfd_reopen): Adjust.
5112 * target.c (target_close): Remove references to to_xclose.
5113 * target.h (target_ops::to_xclose): Delete.
5114 (target_ops::to_close): Update comments.
5116 2018-05-02 Pedro Alves <palves@redhat.com>
5118 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5120 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5121 * inf-ptrace.c (inf_ptrace_register_u_offset)
5122 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5123 (inf_ptrace_store_register, inf_ptrace_store_registers)
5124 (inf_ptrace_trad_target): Move to ...
5125 * linux-nat-trad.c: ... this new file.
5126 * linux-nat-trad.h: New file.
5127 * linux-nat.c (linux_target_install_ops): Make extern.
5128 (linux_trad_target): Delete.
5129 * linux-nat.h (linux_trad_target): Delete declaration.
5130 (linux_target_install_ops): Declare.
5131 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5134 2018-05-02 Pedro Alves <palves@redhat.com>
5136 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5137 procfs_target/add_target here.
5138 * procfs.c (procfs_target): Make static.
5139 (_initialize_procfs): Call add_target here.
5140 * procfs.h (struct target_ops): Remove forward declaration.
5141 (procfs_target): Remove declaration.
5142 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5144 2018-05-02 Pedro Alves <palves@redhat.com>
5146 * procfs.c (procfs_stopped_by_watchpoint)
5147 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5148 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5150 (procfs_use_watchpoints): Delete, move contents...
5151 (procfs_target): ... here.
5152 * procfs.h (procfs_use_watchpoints): Delete declaration.
5153 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5154 procfs_use_watchpoints.
5155 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5156 procfs_use_watchpoints.
5158 2018-05-02 Tom Tromey <tom@tromey.com>
5161 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5162 and var_zuinteger_unlimited.
5163 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5164 and PARAM_ZUINTEGER_UNLIMITED.
5165 (set_parameter_value): Handle var_zuinteger and
5166 var_zuinteger_unlimited.
5167 (add_setshow_generic): Likewise.
5168 (parmpy_init): Likewise.
5170 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5173 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5174 pointer is not null before dereferencing it.
5176 2018-04-30 Tom Tromey <tom@tromey.com>
5178 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5181 2018-04-30 Tom Tromey <tom@tromey.com>
5183 * breakpoint.c (mention): Remove use of is_mi_like_p.
5184 (print_mention_ranged_breakpoint): Likewise.
5185 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5188 2018-04-30 Tom Tromey <tom@tromey.com>
5190 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5192 2018-04-30 Tom Tromey <tom@tromey.com>
5194 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5195 (info_spu_event_command): Remove some uses of is_mi_like_p.
5197 2018-04-30 Tom Tromey <tom@tromey.com>
5199 * python/py-framefilter.c (py_print_single_arg)
5200 (enumerate_locals, py_print_args, py_print_frame): Remove some
5201 uses of is_mi_like_p.
5203 2018-04-30 Tom Tromey <tom@tromey.com>
5206 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5207 * ui-out.h (ui_out::is_mi_like_p): Now const.
5208 (ui_out::do_is_mi_like_p): Now const.
5209 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5211 2018-04-30 Tom Tromey <tom@tromey.com>
5213 * varobj.c (varobj_set_visualizer): Use new_reference.
5214 * python/python.c (gdbpy_decode_line): Use new_reference.
5215 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5218 2018-04-30 Tom Tromey <tom@tromey.com>
5220 * varobj.c (install_new_value): Use new_reference.
5221 * value.h (value_incref): Return void. Swap intro comment with
5223 * value.c (set_value_parent): Use new_reference.
5224 (value_incref): Return void. Update intro comment.
5225 (release_value): Use new_reference.
5226 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5228 2018-04-30 Tom Tromey <tom@tromey.com>
5230 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5231 * gdb_bfd.h (new_bfd_ref): Remove.
5232 (gdb_bfd_open): Update comment.
5233 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5234 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5235 (gdb_bfd_fdopenr): Use new_reference.
5236 * exec.c (exec_file_attach): Use new_reference.
5238 2018-04-30 Tom Tromey <tom@tromey.com>
5240 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5243 2018-04-30 Tom Tromey <tom@tromey.com>
5245 * jit.c (jit_read_code_entry): Use type_align.
5246 * i386-tdep.c (i386_gdbarch_init): Don't call
5247 set_gdbarch_long_long_align_bit.
5248 * gdbarch.sh: Remove long_long_align_bit.
5249 * gdbarch.c, gdbarch.h: Rebuild.
5250 * arc-tdep.c (arc_type_align): New function.
5251 (arc_gdbarch_init): Use arc_type_align. Don't call
5252 set_gdbarch_long_long_align_bit.
5254 2018-04-30 Tom Tromey <tom@tromey.com>
5256 * rust-lang.c (rust_type_alignment): Remove.
5257 (rust_composite_type): Use type_align.
5259 2018-04-30 Tom Tromey <tom@tromey.com>
5261 * NEWS: Mention Type.align.
5262 * python/py-type.c (typy_get_alignof): New function.
5263 (type_object_getset): Add "alignof".
5265 2018-04-30 Tom Tromey <tom@tromey.com>
5269 * std-operator.def (UNOP_ALIGNOF): New operator.
5270 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5272 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5273 * c-lang.c (c_op_print_tab): Add alignof.
5274 * c-exp.y (ALIGNOF): New token.
5275 (exp): Add "ALIGNOF" production.
5276 (ident_tokens): Add _Alignof and alignof.
5278 2018-04-30 Tom Tromey <tom@tromey.com>
5280 * i386-tdep.c (i386_type_align): New function.
5281 (i386_gdbarch_init): Update.
5282 * gdbarch.sh (type_align): New method.
5283 * gdbarch.c, gdbarch.h: Rebuild.
5284 * arch-utils.h (default_type_align): Declare.
5285 * arch-utils.c (default_type_align): New function.
5286 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5287 (struct type) <align_log2>: New field.
5288 <instance_flags>: Now a bitfield.
5289 (TYPE_RAW_ALIGN): New macro.
5290 (type_align, type_raw_align, set_type_align): Declare.
5291 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5293 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5294 (get_alignment, maybe_set_alignment): New functions.
5295 (read_structure_type, read_enumeration_type, read_array_type)
5296 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5297 (read_subrange_type, read_base_type): Set type alignment.
5299 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5301 * dwarf2read.c (read_index_from_section): Use bool.
5303 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5306 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5309 2018-04-29 John Reiser <jreiser@BitWagon.com>
5312 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5313 last step, and do it atomically.
5315 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5317 * compile/compile-c-types.c (convert_int, convert_float):
5320 2018-04-27 Tom Tromey <tom@tromey.com>
5323 * rust-lang.c (rust_inclusive_range_type_p): New function.
5324 (rust_range): Handle inclusive ranges.
5325 (rust_compute_range): Likewise.
5326 * rust-exp.y (struct rust_op) <inclusive>: New field.
5327 (DOTDOTEQ): New constant.
5328 (range_expr): Add "..=" productions.
5329 (operator_tokens): Add "..=" token.
5330 (ast_range): Add "inclusive" parameter.
5331 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5333 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5335 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5336 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5338 * expprint.c (print_subexp_standard): Handle new bounds values.
5339 (dump_subexp_body_standard): Likewise.
5341 2018-04-27 Tom Tromey <tom@tromey.com>
5343 * configure: Rebuild.
5344 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5345 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5347 (class symbol_needs_eval_context): Likewise.
5348 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5349 (mock_mapped_index::symbol_name_at): Use "override". Remove
5351 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5353 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5354 * aarch64-tdep.c (instruction_reader::read): Use "override".
5355 (instruction_reader_test::read): Likewise.
5356 * arm-tdep.c (instruction_reader::read): Use "override".
5357 (instruction_reader_thumb::read): Likewise.
5359 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5362 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5363 instead of remote_send.
5364 (remote_send): Remove.
5366 2018-04-26 Pedro Alves <palves@redhat.com>
5368 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5369 find_function_start_sal instead of find_pc_line.
5371 2018-04-26 Pedro Alves <palves@redhat.com>
5373 * breakpoint.c (set_breakpoint_location_function): Handle
5375 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5376 * elfread.c (elf_symtab_read): Give data symbols with
5377 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5378 (elf_rel_plt_read): Update comment.
5379 * linespec.c (convert_linespec_to_sals): Handle
5381 (minsym_found): Handle mst_data_gnu_ifunc.
5382 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5383 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5384 * parse.c (find_minsym_type_and_address): Handle
5386 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5387 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5388 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5390 <mst_data_gnu_ifunc>: New enumerator.
5392 2018-04-26 Pedro Alves <palves@redhat.com>
5394 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5395 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5396 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5398 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5399 (lookup_minimal_symbol_by_pc): Adjust.
5400 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5401 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5402 * minsyms.h (lookup_msym_prefer): New enum.
5403 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5404 parameter by a lookup_msym_prefer parameter.
5406 2018-04-26 Pedro Alves <palves@redhat.com>
5408 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5409 ends in "@plt" instead of looking at the symbol's section.
5411 2018-04-26 Pedro Alves <palves@redhat.com>
5413 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5415 (find_pc_partial_function_gnu_ifunc): Rename to ...
5416 (find_pc_partial_function): ... this, and remove references to
5418 (find_pc_partial_function): Delete old implementation.
5419 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5421 2018-04-26 Pedro Alves <palves@redhat.com>
5423 * linespec.c (struct bound_minimal_symbol_search_key): New.
5424 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5425 skip first line if we found a GNU ifunc minimal symbol by name.
5426 (compare_msymbols): Change parameters to work with a destructured
5428 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5431 2018-04-26 Pedro Alves <palves@redhat.com>
5433 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5434 ifunc targets here. Instead, if we have an ifunc minsym, use its
5436 (add_location_to_breakpoint): Store the minsym and the objfile in
5437 the breakpoint location.
5438 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5439 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5440 Record the minsym in the sal.
5441 * symtab.h (symtab_and_line) <msymbol>: New field.
5443 2018-04-26 Pedro Alves <palves@redhat.com>
5445 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5446 unless we actually resolved the ifunc.
5448 2018-04-26 Pedro Alves <palves@redhat.com>
5450 * c-exp.y (variable production): Prefer ifunc minsyms over
5451 regular function symbols.
5452 * symtab.c (find_gnu_ifunc): New function.
5453 * minsyms.h (lookup_msym_prefer): New enum.
5454 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5455 parameter by a lookup_msym_prefer parameter.
5456 * symtab.h (find_gnu_ifunc): New declaration.
5458 2018-04-26 Pedro Alves <palves@redhat.com>
5460 * blockframe.c (find_gnu_ifunc_target_type): New function.
5461 (find_function_type): New.
5462 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5463 return a value with a memory address.
5464 (eval_call): For calls to GNU ifunc functions, try to find the
5465 type of the target function from the type that the resolver
5467 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5469 * infcall.c (find_function_return_type): Delete.
5470 (find_function_addr): Add 'function_type' parameter. For calls to
5471 GNU ifunc functions, try to find the type of the target function
5472 from the type that the resolver returns, and return it via
5474 (call_function_by_hand_dummy): Adjust to use the function type
5475 returned by find_function_addr.
5476 (find_function_addr): Add 'function_type' parameter and move
5478 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5481 2018-04-26 Pedro Alves <palves@redhat.com>
5483 * c-exp.y (variable production): Skip finding an alias for ifunc
5486 2018-04-26 Pedro Alves <palves@redhat.com>
5488 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5490 2018-04-25 Pedro Alves <palves@redhat.com>
5492 * infcmd.c (kill_command): Print the pid as string, not the whole
5493 thread's ptid. Add comment. s/has been killed/killed/ in output
5495 * remote.c (remote_detach_1): Print the pid as string, not the
5496 whole thread's ptid.
5498 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5499 Sergio Durigan Junior <sergiodj@redhat.com>
5500 Pedro Alves <palves@redhat.com>
5502 * infcmd.c (kill_command): Print message when inferior has
5504 * inferior.c (print_inferior_events): Remove 'static'. Set as
5506 (add_inferior): Improve message printed when
5507 'print_inferior_events' is on.
5508 (exit_inferior): Remove message printed when
5509 'print_inferior_events' is on.
5510 (detach_inferior): Improve message printed when
5511 'print_inferior_events' is on.
5512 (initialize_inferiors): Use 'add_inferior_silent' to set
5513 'current_inferior_'.
5514 * inferior.h (print_inferior_events): Declare here as
5516 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5517 '[Detaching...]' messages when 'print_inferior_events' is on.
5518 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5519 as prefix/suffix for messages. Remove periods. Fix erroneous
5520 'Detaching after fork from child...', replace it by '... from
5522 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5523 prefix/suffix when printing 'Detaching...' messages. Print
5524 them when 'print_inferior_events' is on.
5525 * remote.c (remote_detach_1): Print message when detaching
5526 from inferior and '!is_fork_parent'.
5528 2018-04-24 Tom Tromey <tom@tromey.com>
5530 * cli-out.h: Reindent.
5532 2018-04-24 Tom Tromey <tom@tromey.com>
5534 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5535 (cli_ui_out::do_field_string): Use fputs_filtered.
5536 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5538 2018-04-23 Tom Tromey <tom@tromey.com>
5540 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5541 gdb::unique_xmalloc_ptr.
5543 2018-04-23 Tom Tromey <tom@tromey.com>
5545 * configure: Rebuild.
5547 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5550 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5551 prepare_for_testing. Set normal_bp to r_debug_state if target
5554 2018-04-21 Pedro Alves <palves@redhat.com>
5555 Rajendra SY <rajendra.sy@gmail.com>
5557 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5558 * remote.c (extended_remote_attach): In all-stop mode, mark the
5559 thread as executing.
5561 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5563 * thread.c (thread_apply_all_command): Fix comment.
5564 (thread_command): Fix comment.
5566 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5568 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5570 * features/aarch64-core.c (create_feature_aarch64_core):
5572 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5574 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5576 * features/i386/32bit-avx512.c
5577 (create_feature_i386_32bit_avx512): Likewise.
5578 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5580 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5582 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5584 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5586 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5588 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5590 * features/i386/64bit-avx512.c
5591 (create_feature_i386_64bit_avx512): Likewise.
5592 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5594 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5596 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5598 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5600 * features/i386/64bit-segments.c
5601 (create_feature_i386_64bit_segments): Likewise.
5602 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5604 * features/i386/x32-core.c
5605 (create_feature_i386_x32_core): Likewise.
5606 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5607 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5608 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5609 * target-descriptions.c: In generated code, don't pass xml
5612 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5614 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5615 (print_xml_feature::visit_post): Likewise.
5616 (print_xml_feature::visit): Likewise.
5617 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5618 (print_xml_feature): Add new class.
5619 * regformats/regdat.sh: Null xmltarget on feature targets.
5620 * target-descriptions.c (struct target_desc): Add xmltarget.
5621 (maintenance_check_tdesc_xml_convert): Add unittest function.
5622 (tdesc_get_features_xml): Add function to get xml.
5623 (maintenance_check_xml_descriptions): Test xml generation.
5624 * xml-tdesc.c (string_read_description_xml): Add function.
5625 * xml-tdesc.h (string_read_description_xml): Add declaration.
5627 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5629 * features/Makefile: Add feature marker to targets with new style
5630 target descriptions.
5631 * regformats/aarch64.dat: Regenerate.
5632 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5633 * regformats/i386/amd64-avx-linux.dat: Likewise.
5634 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5635 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5636 * regformats/i386/amd64-linux.dat: Likewise.
5637 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5638 * regformats/i386/amd64.dat: Likewise.
5639 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5640 * regformats/i386/i386-avx-linux.dat: Likewise.
5641 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5642 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5643 * regformats/i386/i386-linux.dat: Likewise.
5644 * regformats/i386/i386-mmx-linux.dat: Likewise.
5645 * regformats/i386/i386-mpx-linux.dat: Likewise.
5646 * regformats/i386/i386.dat: Likewise.
5647 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5648 * regformats/i386/x32-avx-linux.dat: Likewise.
5649 * regformats/i386/x32-linux.dat: Likewise.
5650 * regformats/tic6x-c62x-linux.dat: Likewise.
5651 * regformats/tic6x-c64x-linux.dat: Likewise.
5652 * regformats/tic6x-c64xp-linux.dat: Likewise.
5653 * regformats/regdat.sh: Parse feature marker.
5655 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5657 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5658 (tdesc_osabi_name): Likewise.
5659 * target-descriptions.c (tdesc_architecture_name): Add new
5661 (tdesc_osabi_name): Likewise.
5663 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5665 * common/tdesc.c (tdesc_predefined_type): Move to here.
5666 (tdesc_named_type): Likewise.
5667 (tdesc_create_vector): Likewise.
5668 (tdesc_create_struct): Likewise.
5669 (tdesc_set_struct_size): Likewise.
5670 (tdesc_create_union): Likewise.
5671 (tdesc_create_flags): Likewise.
5672 (tdesc_create_enum): Likewise.
5673 (tdesc_add_field): Likewise.
5674 (tdesc_add_typed_bitfield): Likewise.
5675 (tdesc_add_bitfield): Likewise.
5676 (tdesc_add_flag): Likewise.
5677 (tdesc_add_enum_value): Likewise.
5678 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5679 (struct tdesc_type_vector): Likewise.
5680 (struct tdesc_type_field): Likewise.
5681 (struct tdesc_type_with_fields): Likewise.
5682 (tdesc_create_enum): Add declaration.
5683 (tdesc_add_typed_bitfield): Likewise.
5684 (tdesc_add_enum_value): Likewise.
5685 * target-descriptions.c (tdesc_type_field): Move from here.
5686 (tdesc_type_builtin): Likewise.
5687 (tdesc_type_vector): Likewise.
5688 (tdesc_type_with_fields): Likewise.
5689 (tdesc_predefined_types): Likewise.
5690 (tdesc_named_type): Likewise.
5691 (tdesc_create_vector): Likewise.
5692 (tdesc_create_struct): Likewise.
5693 (tdesc_set_struct_size): Likewise.
5694 (tdesc_create_union): Likewise.
5695 (tdesc_create_flags): Likewise.
5696 (tdesc_create_enum): Likewise.
5697 (tdesc_add_field): Likewise.
5698 (tdesc_add_typed_bitfield): Likewise.
5699 (tdesc_add_bitfield): Likewise.
5700 (tdesc_add_flag): Likewise.
5701 (tdesc_add_enum_value): Likewise.
5702 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5703 (tdesc_add_typed_bitfield): Likewise.
5704 (tdesc_add_enum_value): Likewise.
5706 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5708 * common/tdesc.c (tdesc_feature::accept): Move to here.
5709 (tdesc_feature::operator==): Likewise.
5710 (tdesc_create_reg): Likewise.
5711 * common/tdesc.h (tdesc_type_kind): Likewise.
5712 (struct tdesc_type): Likewise.
5713 (struct tdesc_feature): Likewise.
5714 * regformats/regdat.sh: Create a feature.
5715 * target-descriptions.c (tdesc_type_kind): Move from here.
5716 (tdesc_type): Likewise.
5717 (tdesc_type_up): Likewise.
5718 (tdesc_feature): Likewise.
5719 (tdesc_create_reg): Likewise.
5721 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5723 * Makefile.in: Add arch/tdesc.c
5724 * common/tdesc.c: New file.
5725 * common/tdesc.h (tdesc_element_visitor): Move to here.
5726 (tdesc_element): Likewise.
5727 (tdesc_reg): Likewise.
5728 (tdesc_reg_up): Likewise.
5729 * regformats/regdef.h (reg): Add offset to constructors.
5730 * target-descriptions.c (tdesc_element_visitor): Move from here.
5731 (tdesc_element): Likewise.
5732 (tdesc_reg): Likewise.
5733 (tdesc_reg_up): Likewise.
5735 2018-04-17 Tom Tromey <tom@tromey.com>
5737 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5740 2018-04-17 Tom Tromey <tom@tromey.com>
5742 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5744 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5746 * symtab.c (print_symbol_info): Skip printing filename and line
5747 number when `last' is NULL.
5748 (symtab_symbol_info): Use empty string instead of NULL for first
5749 invocation of print_symbol_info.
5750 (rbreak_command): Pass NULL to `last' parameter of
5753 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5755 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5758 2018-04-16 Pedro Alves <palves@redhat.com>
5760 * MAINTAINERS (sh): Remove.
5761 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5762 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5763 (ALLDEPFILES): Remove sh64-tdep.c.
5764 * NEWS: Mentions that support for SH-5/SH64 is removed.
5765 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5766 (sh*-*-openbsd*): Ditto.
5767 (sh64-*-elf*): Remove.
5769 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5770 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5771 * sh-tdep.c: No longer include "sh64-tdep.h".
5772 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5773 * sh64-tdep.c, sh64-tdep.h: Remove files.
5775 2018-04-16 Pedro Alves <palves@redhat.com>
5777 * MAINTAINERS: Remove m88k.
5778 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5779 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5780 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5781 * NEWS: Mention that support for m88k was removed.
5782 * configure.host (m88*-*-*): Remove support.
5783 * configure.nat (m88k-*-*): Remove support.
5784 * configure.tgt (m88*-*-openbsd*): Remove.
5785 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5787 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5789 * configure.tgt (x86_tobjs): New variable.
5790 (amd64_tobjs, i386_tobjs): Use it.
5792 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5794 * symtab.c (print_symbol_info): Precede the symbol definition by
5795 the line number when available.
5796 * NEWS: Advertise this enhancement.
5798 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5800 * NEWS (New options): announce set/show record btrace cpu.
5801 * btrace.c: Include record-btrace.h.
5802 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5803 the vendor is unknown.
5804 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5805 Maybe overwrite the btrace configuration's cpu.
5806 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5807 (btrace_fetch): Add cpu parameter. Update callers.
5808 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5809 Maybe overwrite the btrace configuration's cpu. Skip enabling
5810 errata workarounds if the vendor is unknown.
5811 * python/py-record-btrace.c: Include record-btrace.h.
5812 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5813 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5814 * record-btrace.c (record_btrace_cpu_state_kind): New.
5815 (record_btrace_cpu): New.
5816 (set_record_btrace_cpu_cmdlist): New.
5817 (record_btrace_get_cpu): New.
5818 (require_btrace_thread, record_btrace_info)
5819 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5820 (cmd_set_record_btrace_cpu_none): New.
5821 (cmd_set_record_btrace_cpu_auto): New.
5822 (cmd_set_record_btrace_cpu): New.
5823 (cmd_show_record_btrace_cpu): New.
5824 (_initialize_record_btrace): Initialize set/show record btrace cpu
5826 * record-btrace.h (record_btrace_get_cpu): New.
5828 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5830 * record.c (set_record_command): Fix typo in message.
5832 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5834 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5836 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5838 * infrun.c (process_event_stop_test): Call
5839 gdbarch_in_indirect_branch_thunk.
5840 * gdbarch.sh (in_indirect_branch_thunk): New.
5841 * gdbarch.c: Regenerated.
5842 * gdbarch.h: Regenerated.
5845 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5846 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5847 (ALLDEPFILES): Add x86-tdep.c.
5848 * arch-utils.h (default_in_indirect_branch_thunk): New.
5849 * arch-utils.c (default_in_indirect_branch_thunk): New.
5850 * i386-tdep: Include x86-tdep.h.
5851 (i386_in_indirect_branch_thunk): New.
5852 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5854 * amd64-tdep: Include x86-tdep.h.
5855 (amd64_in_indirect_branch_thunk): New.
5856 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5858 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5861 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5862 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5863 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5866 2018-04-12 Tom Tromey <tom@tromey.com>
5868 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5869 (rust_evaluate_subexp): Likewise.
5871 2018-04-12 Pedro Alves <palves@redhat.com>
5873 * procfs.c (procfs_detach): Make forward declaration's prototype
5874 match definition's protototype.
5875 (proc_get_LDT_entry): Remove stale do_cleanups call.
5877 2018-04-12 Pedro Alves <palves@redhat.com>
5879 * target.h (target_ops::to_has_exited): Delete.
5880 (target_has_exited): Delete.
5881 * target-delegates.c: Regenerate.
5883 2018-04-11 Pedro Alves <palves@redhat.com>
5885 * target.c (fileio_fh_t::t): Add comment.
5886 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5887 (target_fileio_close): Handle a NULL target.
5888 (invalidate_fileio_fh): New.
5889 (target_close): Call it.
5890 * remote.c (remote_hostio_send_command): No longer check whether
5891 remote_desc is open.
5893 2018-04-11 Pedro Alves <palves@redhat.com>
5895 * target.c (fileio_fh_t): Make it a named struct instead of a
5897 (fileio_fh_t::is_closed): New method.
5898 (DEF_VEC_O (fileio_fh_t)): Remove.
5899 (fileio_fhandles): Now a std::vector.
5900 (is_closed_fileio_fh): Delete.
5901 (acquire_fileio_fd): Adjust. Rename parameters.
5902 (release_fileio_fd): Adjust.
5903 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5904 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5905 (target_fileio_close): Adjust.
5907 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5909 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5912 2018-04-10 Pedro Alves <palves@redhat.com>
5914 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5915 (scoped_finish_thread_state): New class.
5916 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5918 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5919 (fetch_inferior_event, normal_stop): Likewise.
5920 * thread.c (finish_thread_state_cleanup): Delete.
5922 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5923 Pedro Alves <palves@redhat.com>
5925 * value.c: Include "selftest.h" and "common/array-view.h".
5926 (struct range) <operator ==>: New.
5927 (test_ranges_contain): New.
5928 (check_ranges_vector): New.
5929 (test_insert_into_bit_range_vector): New.
5930 (_initialize_values): Register selftests.
5931 * common/array-view.h (operator==, operator!=): New.
5933 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5935 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5937 * inline-frame.c: Include <algorithm>.
5938 (struct inline_state): Add constructor.
5939 (inline_state_s): Remove.
5940 (DEF_VEC_O(inline_state_s)): Remove.
5941 (inline_states): Change type to std::vector.
5942 (find_inline_frame_state): Adjust to std::vector.
5943 (allocate_inline_frame_state): Remove.
5944 (clear_inline_frame_state): Adjust to std::vector.
5945 (skip_inline_frames): Adjust to std::vector.
5947 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5949 * tracepoint.h (struct trace_state_variable): Add constructor.
5950 <name>: Change type to std::string.
5951 * tracepoint.c (tsv_s): Remove.
5952 (DEF_VEC_O(tsv_s)): Remove.
5953 (tvariables): Change to std::vector.
5954 (create_trace_state_variable): Adjust to std::vector.
5955 (find_trace_state_variable): Likewise.
5956 (find_trace_state_variable_by_number): Likewise.
5957 (delete_trace_state_variable): Likewise.
5958 (trace_variable_command): Adjust to std::string.
5959 (delete_trace_variable_command): Likewise.
5960 (tvariables_info_1): Adjust to std::vector.
5961 (save_trace_state_variables): Likewise.
5962 (start_tracing): Likewise.
5963 (merge_uploaded_trace_state_variables): Adjust to std::vector
5965 * target.h (struct target_ops)
5966 <to_download_trace_state_variable>: Pass reference to
5967 trace_state_variable.
5968 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5969 * target-delegates.c: Re-generate.
5970 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5971 (mi_tsv_deleted): Likewise.
5972 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5973 * remote.c (remote_download_trace_state_variable): Change
5974 pointer to reference and adjust.
5975 * make-target-delegates (parse_argtypes): Handle references.
5976 (write_function_header): Likewise.
5977 (munge_type): Likewise.
5979 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5981 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5982 string_view-selftests.c.
5983 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5985 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5986 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5987 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5988 * unittests/basic_string_view/element_access/char/1.cc:
5990 * unittests/basic_string_view/element_access/char/empty.cc:
5992 * unittests/basic_string_view/element_access/char/front_back.cc:
5994 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5995 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5997 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5999 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6001 * unittests/basic_string_view/operations/compare/char/1.cc:
6003 * unittests/basic_string_view/operations/compare/char/13650.cc:
6005 * unittests/basic_string_view/operations/copy/char/1.cc:
6007 * unittests/basic_string_view/operations/data/char/1.cc:
6009 * unittests/basic_string_view/operations/find/char/1.cc:
6011 * unittests/basic_string_view/operations/find/char/2.cc:
6013 * unittests/basic_string_view/operations/find/char/3.cc:
6015 * unittests/basic_string_view/operations/find/char/4.cc:
6017 * unittests/basic_string_view/operations/rfind/char/1.cc:
6019 * unittests/basic_string_view/operations/rfind/char/2.cc:
6021 * unittests/basic_string_view/operations/rfind/char/3.cc:
6023 * unittests/basic_string_view/operations/substr/char/1.cc:
6025 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6026 * unittests/string_view-selftests.c: New file.
6028 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6030 * unittests/basic_string_view/capacity/1.cc: New file.
6031 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6032 * unittests/basic_string_view/cons/char/1.cc: New file.
6033 * unittests/basic_string_view/cons/char/2.cc: New file.
6034 * unittests/basic_string_view/cons/char/3.cc: New file.
6035 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6036 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6037 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6038 * unittests/basic_string_view/element_access/char/1.cc: New file.
6039 * unittests/basic_string_view/element_access/char/2.cc: New file.
6040 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6041 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6042 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6043 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6044 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6045 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6046 * unittests/basic_string_view/include.cc: New file.
6047 * unittests/basic_string_view/inserters/char/1.cc: New file.
6048 * unittests/basic_string_view/inserters/char/2.cc: New file.
6049 * unittests/basic_string_view/inserters/char/3.cc: New file.
6050 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6051 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6052 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6053 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6054 * unittests/basic_string_view/literals/types.cc: New file.
6055 * unittests/basic_string_view/literals/values.cc: New file.
6056 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6057 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6058 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6059 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6060 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6061 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6062 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6063 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6064 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6065 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6066 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6067 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6068 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6069 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6070 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6071 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6072 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6073 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6074 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6075 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6076 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6077 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6078 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6079 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6080 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6081 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6082 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6083 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6084 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6085 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6086 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6087 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6088 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6089 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6090 * unittests/basic_string_view/operators/char/2.cc: New file.
6091 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6092 * unittests/basic_string_view/range_access/char/1.cc: New file.
6093 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6094 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6095 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6096 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6097 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6098 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6099 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6100 * unittests/basic_string_view/typedefs.cc: New file.
6101 * unittests/basic_string_view/types/1.cc: New file.
6103 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6105 * common/gdb_string_view.h: Remove libstdc++ implementation
6106 details, adjust to gdb reality.
6107 * common/gdb_string_view.tcc: Likewise.
6108 * cli/cli-script.c (struct string_view): Remove.
6109 (user_args) <m_args>: Change element type to gdb::string_view.
6110 (user_args::insert_args): Adjust.
6112 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6114 * common/gdb_string_view.h: New file.
6115 * common/gdb_string_view.tcc: New file.
6117 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6119 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6120 * configure: Re-generate.
6122 2018-04-09 Pedro Alves <palves@redhat.com>
6124 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6125 (set_target_gdbarch): Call
6126 gdb::observers::architecture_changed.notify instead of
6127 observer_notify_architecture_changed.
6129 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6131 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6132 (do_restore_current_traceframe_cleanup): Remove.
6133 (restore_current_traceframe_cleanup_dtor): Remove.
6134 (make_cleanup_restore_current_traceframe): Remove.
6135 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6137 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6138 * infrun.c (fetch_inferior_event): Use
6139 scoped_restore_current_traceframe.
6141 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6143 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6145 <n_allocated_type_units>: Remove.
6146 <all_type_units>: Change to std::vector.
6147 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6148 to std::vector change.
6149 (dwarf2_per_objfile::get_cutu): Likewise.
6150 (dwarf2_per_objfile::get_tu): Likewise.
6151 (create_signatured_type_table_from_index): Likewise.
6152 (create_signatured_type_table_from_debug_names): Likewise.
6153 (dw2_symtab_iter_next): Likewise.
6154 (dw2_print_stats): Likewise.
6155 (dw2_expand_all_symtabs): Likewise.
6156 (dw2_expand_marked_cus): Likewise.
6157 (dw2_debug_names_iterator::next): Likewise.
6158 (dwarf2_initialize_objfile): Likewise.
6159 (add_signatured_type_cu_to_table): Likewise.
6160 (create_all_type_units): Likewise.
6161 (add_type_unit): Likewise.
6162 (struct tu_abbrev_offset): Add constructor.
6163 (build_type_psymtabs_1): Adjust to std::vector change.
6164 (print_tu_stats): Likewise.
6165 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6166 (write_debug_names): Likewise.
6168 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6170 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6171 Make an std::vector.
6172 <n_comp_units>: Remove.
6173 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6174 to std::vector change.
6175 (dwarf2_per_objfile::get_cutu): Likewise.
6176 (dwarf2_per_objfile::get_cu): Likewise.
6177 (create_cus_from_index): Likewise.
6178 (create_addrmap_from_index): Likewise.
6179 (create_addrmap_from_aranges): Likewise.
6180 (dwarf2_read_index): Likewise.
6181 (dw2_find_last_source_symtab): Likewise.
6182 (dw2_map_symtabs_matching_filename): Likewise.
6183 (dw2_symtab_iter_next): Likewise.
6184 (dw2_print_stats): Likewise.
6185 (dw2_expand_all_symtabs): Likewise.
6186 (dw2_expand_symtabs_with_fullname): Likewise.
6187 (dw2_expand_marked_cus): Likewise.
6188 (dw2_map_symbol_filenames): Likewise.
6189 (create_cus_from_debug_names): Likewise.
6190 (dwarf2_read_debug_names): Likewise.
6191 (dw2_debug_names_iterator::next): Likewise.
6192 (dwarf2_initialize_objfile): Likewise.
6193 (set_partial_user): Likewise.
6194 (dwarf2_build_psymtabs_hard): Likewise.
6195 (read_comp_units_from_section): Remove arguments, adjust to
6197 (create_all_comp_units): Adjust to std::vector and
6198 read_comp_units_from_section changes.
6199 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6201 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6202 (psyms_seen_size): Likewise.
6203 (write_gdbindex): Likewise.
6204 (write_debug_names): Likewise.
6206 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6208 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6209 with dwarf2_per_objfile.
6210 (create_cus_from_index): Likewise.
6211 (create_signatured_type_table_from_index): Likewise.
6212 (dwarf2_read_index): Likewise.
6213 (dwarf2_initialize_objfile): Likewise.
6214 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6215 per_cu rather than get_dwarf2_per_objfile.
6217 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6219 * dwarf2read.h (struct signatured_type): Forward declare.
6220 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6222 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6223 (dw2_get_cutu): ...this.
6224 (dwarf2_per_objfile::get_cu): Rename from...
6225 (dw2_get_cu): ...this.
6226 (dwarf2_per_objfile::get_tu): New.
6227 (create_addrmap_from_index): Adjust.
6228 (create_addrmap_from_aranges): Adjust.
6229 (dw2_find_last_source_symtab): Adjust.
6230 (dw2_map_symtabs_matching_filename): Adjust.
6231 (dw2_symtab_iter_next): Adjust.
6232 (dw2_print_stats): Adjust.
6233 (dw2_expand_all_symtabs): Adjust.
6234 (dw2_expand_symtabs_with_fullname): Adjust.
6235 (dw2_expand_marked_cus): Adjust.
6236 (dw_expand_symtabs_matching_file_matcher): Adjust.
6237 (dw2_map_symbol_filenames): Adjust.
6238 (dw2_debug_names_iterator::next): Adjust.
6239 (dwarf2_initialize_objfile): Adjust.
6240 (set_partial_user): Adjust.
6241 (dwarf2_build_psymtabs_hard): Adjust.
6243 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6245 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6246 Remove unused variables.
6247 (dw2_map_symtabs_matching_filename): Likewise.
6248 (dwarf2_record_block_ranges): Likewise.
6249 (dwarf2_read_addr_index): Likewise.
6250 (follow_die_offset): Likewise.
6252 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6254 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6255 to symbol_file_add_main.
6257 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6260 * mi/mi-console.c (do_fputc_async_safe): New.
6261 (mi_console_file::write_async_safe): New.
6262 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6263 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6265 * ui-file.c (ui_file::putstrn): Adjust call to
6266 fputstrn_unfiltered.
6267 * utils.c (printchar): Replace do_fputs and do_fprintf
6268 parameters by do_fputc.
6269 (fputstr_filtered): Adjust call to printchar.
6270 (fputstr_unfiltered): Likewise.
6271 (fputstrn_filtered): Likewise.
6272 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6274 * utils.h (do_fputc_ftype): New typedef.
6275 (fputstrn_unfiltered): Add do_fputc parameter.
6277 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6279 * regformats/i386/i386-avx.dat: Remove.
6281 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6284 * amd64-tdep.c (amd64_none_init_abi): New function.
6285 (amd64_x32_none_init_abi): New function.
6286 (_initialize_amd64_tdep): Register handlers for x86-64 and
6287 x64_32 with GDB_OSABI_NONE.
6288 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6289 GDB_OSABI_NONE osabi.
6291 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6294 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6296 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6297 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6299 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6301 * common/byte-vector.h (char_vector): New type.
6302 * target.h (target_read_alloc): Return
6303 gdb::optional<byte_vector>.
6304 (target_read_stralloc): Return gdb::optional<char_vector>.
6305 (target_get_osdata): Return gdb::optional<char_vector>.
6306 * target.c (target_read_alloc_1): Templatize. Replacement
6307 manual memory management with vector.
6308 (target_read_alloc): Change return type, adjust.
6309 (target_read_stralloc): Change return type, adjust.
6310 (target_get_osdata): Change return type, adjust.
6311 * auxv.c (struct auxv_info) <length>: Remove.
6312 <data>: Change type to gdb::optional<byte_vector>.
6313 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6314 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6315 (target_auxv_search): Adjust.
6316 (fprint_target_auxv): Adjust.
6317 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6318 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6319 (linux_make_corefile_notes): Adjust.
6320 * osdata.c (get_osdata): Adjust.
6321 * remote.c (remote_get_threads_with_qxfer): Adjust.
6322 (remote_memory_map): Adjust.
6323 (remote_traceframe_info): Adjust.
6324 (btrace_read_config): Adjust.
6325 (remote_read_btrace): Adjust.
6326 (remote_pid_to_exec_file): Adjust.
6327 * solib-aix.c (solib_aix_get_library_list): Adjust.
6328 * solib-dsbt.c (decode_loadmap): Don't free buf.
6329 (dsbt_get_initial_loadmaps): Adjust.
6330 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6331 * solib-target.c (solib_target_current_sos): Adjust.
6332 * tracepoint.c (sdata_make_value): Adjust.
6333 * xml-support.c (xinclude_start_include): Adjust.
6334 (xml_fetch_content_from_file): Adjust.
6335 * xml-support.h (xml_fetch_another): Change return type.
6336 (xml_fetch_content_from_file): Change return type.
6337 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6338 * xml-tdesc.c (file_read_description_xml): Adjust.
6339 (fetch_available_features_from_target): Change return type.
6340 (target_fetch_description_xml): Adjust.
6341 (target_read_description_xml): Adjust.
6343 2018-04-06 Tom Tromey <tom@tromey.com>
6345 * value.c (~value): Update.
6346 (struct value) <contents>: Now unique_xmalloc_ptr.
6347 (value_contents_bits_eq, allocate_value_contents)
6348 (value_contents_raw, value_contents_all_raw)
6349 (value_contents_for_printing, value_contents_for_printing_const)
6350 (set_value_enclosing_type): Update.
6352 2018-04-06 Tom Tromey <tom@tromey.com>
6354 * value.c (range_s): Remove typedef, VEC.
6355 (struct range): Add operator<.
6356 (range_lessthan): Remove.
6357 (ranges_contain): Change type.
6359 (struct value) <unavailable, optimized_out>: Now std::vector.
6360 (value_entirely_available)
6361 (value_entirely_covered_by_range_vector)
6362 (value_entirely_unavailable, value_entirely_optimized_out):
6364 (insert_into_bit_range_vector): Change argument type.
6365 (find_first_range_overlap): Likewise.
6366 (struct ranges_and_idx, value_contents_bits_eq)
6367 (require_not_optimized_out, require_available): Update.
6368 (ranges_copy_adjusted): Change argument types.
6369 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6371 2018-04-06 Tom Tromey <tom@tromey.com>
6373 * value.c (~value): Update.
6374 (struct value) <parent>: Now a value_ref_ptr.
6375 (value_parent, set_value_parent, value_address, value_copy):
6378 2018-04-06 Tom Tromey <tom@tromey.com>
6380 * value.c (struct value): Add constructor, destructor, and member
6382 (allocate_value_lazy, value_decref): Update.
6384 2018-04-06 Tom Tromey <tom@tromey.com>
6386 * value.c (struct value) <released, next>: Remove.
6387 (all_values): Now a std::vector.
6388 (allocate_value_lazy): Update.
6389 (value_next): Remove.
6390 (value_mark, value_free_to_mark, release_value)
6391 (value_release_to_mark): Update.
6393 2018-04-06 Tom Tromey <tom@tromey.com>
6395 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6396 (free_value_chain): Remove.
6397 * value.c (free_value_chain): Remove.
6398 (value_release_to_mark): Return a std::vector.
6399 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6401 (check_condition): Update.
6402 * eval.c (fetch_subexp_value): Change "val_chain" to a
6404 * breakpoint.c (update_watchpoint): Update.
6405 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6407 2018-04-06 Tom Tromey <tom@tromey.com>
6409 * value.h (free_all_values): Remove.
6410 * value.c (free_all_values): Remove.
6412 2018-04-06 Tom Tromey <tom@tromey.com>
6414 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6415 (value_history_chain, value_history_count): Remove.
6416 (value_history): New global.
6417 (record_latest_value, access_value_history, show_values)
6418 (preserve_values): Update.
6420 2018-04-06 Tom Tromey <tom@tromey.com>
6422 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6423 * varobj.c (varobj_set_display_format, varobj_set_value)
6424 (install_default_visualizer, construct_visualizer)
6425 (install_new_value, ~varobj, varobj_get_value_type)
6426 (my_value_of_variable, varobj_editable_p): Update.
6427 * c-varobj.c (c_describe_child, c_value_of_variable)
6428 (cplus_number_of_children, cplus_describe_child): Update.
6429 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6430 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6431 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6433 2018-04-06 Tom Tromey <tom@tromey.com>
6435 * printcmd.c (last_examine_address): Change type to
6437 (do_examine, x_command): Update.
6439 2018-04-06 Tom Tromey <tom@tromey.com>
6441 * value.c (release_value): Update.
6442 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6443 (struct bpstats) <val>: Now a value_ref_ptr.
6444 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6445 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6446 (~watchpoint, print_it_watchpoint, watch_command_1)
6447 (invalidate_bp_value_on_memory_change): Update.
6449 2018-04-06 Tom Tromey <tom@tromey.com>
6451 * varobj.c (varobj_clear_saved_item)
6452 (update_dynamic_varobj_children, install_new_value, ~varobj):
6454 * value.h (value_incref): Move declaration earlier.
6455 (value_decref): Rename from value_free.
6456 (struct value_ref_policy): New.
6457 (value_ref_ptr): New typedef.
6458 (struct value_deleter): Remove.
6459 (gdb_value_up): Remove typedef.
6460 (release_value): Change return type.
6461 (release_value_or_incref): Remove.
6462 * value.c (set_value_parent): Update.
6463 (value_incref): Change return type.
6464 (value_decref): Rename from value_free.
6465 (value_free_to_mark, free_all_values, free_value_chain): Update.
6466 (release_value): Return value_ref_ptr.
6467 (release_value_or_incref): Remove.
6468 (record_latest_value, set_internalvar, clear_internalvar):
6470 * stack.c (info_frame_command): Don't call value_free.
6471 * python/py-value.c (valpy_dealloc, valpy_new)
6472 (value_to_value_object): Update.
6473 * printcmd.c (do_examine): Update.
6474 * opencl-lang.c (lval_func_free_closure): Update.
6475 * mi/mi-main.c (register_changed_p): Don't call value_free.
6476 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6477 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6478 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6480 * guile/scm-value.c (vlscm_free_value_smob)
6481 (vlscm_scm_from_value): Update.
6482 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6483 (frame_unwind_register_unsigned, get_frame_register_bytes)
6484 (put_frame_register_bytes): Don't call value_free.
6485 * findvar.c (address_from_register): Don't call value_free.
6486 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6487 * dwarf2loc.c (entry_data_value_free_closure)
6488 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6489 (dwarf2_evaluate_loc_desc_full): Update.
6490 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6491 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6492 (~watchpoint, watch_command_1)
6493 (invalidate_bp_value_on_memory_change): Update.
6494 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6496 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6499 * warning.m4: Add -Wno-error=deprecated-register.
6500 * configure: Re-generate.
6502 2018-04-05 Tom Tromey <tom@tromey.com>
6504 * linespec.h: Remove include of "vec.h".
6506 2018-04-05 Tom Tromey <tom@tromey.com>
6508 * linespec.c (typep): Remove typedef.
6509 (find_methods, find_superclass_methods): Take a std::vector.
6510 (find_method): Use std::vector.
6512 2018-04-05 Tom Tromey <tom@tromey.com>
6514 * utils.c (compare_strings): Remove.
6515 * utils.h (compare_strings): Remove.
6516 * objc-lang.h (find_imps): Update.
6517 * objc-lang.c (find_methods): Take a std::vector.
6518 (uniquify_strings, find_imps): Likewise.
6519 * linespec.c (find_methods): Take a std::vector.
6520 (decode_objc): Use std::vector.
6521 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6523 (find_method, find_function_symbols): Use std::vector.
6525 2018-04-05 Tom Tromey <tom@tromey.com>
6527 * completer.c (completion_tracker::completion_tracker): Remove
6529 (completion_tracker::discard_completions): Likewise.
6530 * breakpoint.c (ambiguous_names_p): Remove cast.
6531 * ada-lang.c (_initialize_ada_language): Remove cast.
6532 * utils.h (streq): Update.
6533 (streq_hash): Add new declaration.
6534 * utils.c (streq): Return bool.
6535 (streq_hash): New function.
6537 2018-04-05 Tom Tromey <tom@tromey.com>
6539 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6540 Remove a string copy.
6542 2018-04-05 Tom Tromey <tom@tromey.com>
6544 * linespec.c (filter_results): Use std::vector.
6545 (decode_line_2, decode_line_full): Update.
6547 2018-04-05 Tom Tromey <tom@tromey.com>
6549 * linespec.c (canonical_to_fullform): Return std::string.
6550 (filter_results): Update.
6551 (struct decode_line_2_item): Add constructor.
6552 <fullform, displayform>: Now std::string.
6553 (decode_line_2_compare_items): Now a std::sort comparator.
6554 (decode_line_2): Update.
6556 2018-04-05 Tom Tromey <tom@tromey.com>
6558 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6559 (unexpected_linespec_error): Update.
6560 (linespec_parse_basic, parse_linespec): Update.
6562 2018-04-05 Tom Tromey <tom@tromey.com>
6564 * linespec.c (linespec_parse_basic): Reindent.
6566 2018-04-05 Tom Tromey <tom@tromey.com>
6568 * minsyms.h (iterate_over_minimal_symbols): Update.
6569 * minsyms.c (iterate_over_minimal_symbols): Take a
6571 * linespec.c (struct collect_minsyms): Remove.
6572 (compare_msyms): Now a std::sort comparator.
6573 (add_minsym): Add parameters.
6574 (search_minsyms_for_name): Update. Use std::vector.
6576 2018-04-03 Tom Tromey <tom@tromey.com>
6578 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6581 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6583 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6585 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6588 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6589 printing static type.
6591 2018-04-01 Tom Tromey <tom@tromey.com>
6593 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6594 (rs6000_xfer_shared_libraries): Update.
6596 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6598 * common/gdb_vecs.h (char_ptr): Remove.
6599 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6601 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6603 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6605 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6607 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6609 * tracepoint.h (struct uploaded_tp): Initialize fields.
6610 <actions, step_actions, cmd_strings>: Change type to
6611 std::vector<char *>.
6612 * tracepoint.c (get_uploaded_tp): Allocate with new.
6613 (free_uploaded_tps): Free with delete.
6614 (parse_tracepoint_definition): Adjust to std::vector change.
6615 * breakpoint.c (read_uploaded_action): Likewise.
6616 (create_tracepoint_from_upload): Likewise.
6617 * ctf.c (ctf_write_uploaded_tp): Likewise.
6618 (SET_ARRAY_FIELD): Likewise.
6619 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6621 2018-03-30 Tom Tromey <tom@tromey.com>
6623 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6625 (svr4_keep_data_in_core): Update.
6626 (svr4_read_so_list): Update.
6628 2018-03-30 Tom Tromey <tom@tromey.com>
6630 * windows-nat.c (handle_output_debug_string, handle_exception):
6632 * target.h (target_read_string): Update.
6633 * target.c (target_read_string): Change "string" to
6635 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6637 * solib-frv.c (frv_current_sos): Update.
6638 * solib-dsbt.c (dsbt_current_sos): Update.
6639 * solib-darwin.c (darwin_current_sos): Update.
6640 * linux-thread-db.c (inferior_has_bug): Update.
6641 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6642 Update. Remove alloca.
6643 * ada-lang.c (ada_main_name): Update.
6645 2018-03-30 Tom Tromey <tom@tromey.com>
6647 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6648 (struct dwo_file_deleter): New.
6649 (dwo_file_up): New typedef.
6650 (open_and_init_dwo_file): Use dwo_file_up.
6651 (free_dwo_file_cleanup): Remove.
6653 2018-03-30 Tom Tromey <tom@tromey.com>
6655 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6656 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6658 2018-03-30 Tom Tromey <tom@tromey.com>
6660 * dwarf2read.c (class free_cached_comp_units): New class.
6661 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6662 (free_cached_comp_units): Remove function.
6664 2018-03-30 Tom Tromey <tom@tromey.com>
6666 * utils.h (make_cleanup_unpush_target): Remove.
6667 * inf-ptrace.c (struct target_unpusher): New.
6668 (target_unpush_up) New typedef.
6669 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6671 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6673 2018-03-27 Tom Tromey <tom@tromey.com>
6675 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6677 2018-03-27 Pedro Alves <palves@redhat.com>
6678 Tom Tromey <tom@tromey.com>
6680 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6681 destructor. Now a class.
6682 (gdb_readline_wrapper_cleanup): Remove function.
6683 (gdb_readline_wrapper): Remove cleanups.
6685 2018-03-27 Tom Tromey <tom@tromey.com>
6687 * typeprint.h (struct type_print_options) <local_typedefs,
6688 global_typedefs>: Remove "struct" keyword.
6689 (class typedef_hash_table): New class.
6690 (recursively_update_typedef_hash, add_template_parameters)
6691 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6692 (find_typedef_in_hash): Don't declare.
6693 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6694 (typedef_hash_table::recursively_update): Rename from
6695 recursively_update_typedef_hash. Now a member.
6696 (typedef_hash_table::add_template_parameters): Rename from
6697 add_template_parameters. Now a member.
6698 (typedef_hash_table::typedef_hash_table): Now a constructor;
6699 rename from create_typedef_hash.
6700 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6701 rename from free_typedef_hash.
6702 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6703 (do_free_global_table): Remove.
6704 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6705 from copy_type_recursive.
6706 (create_global_typedef_table): Remove.
6707 (typedef_hash_table::find_global_typedef): Now a member of
6709 (typedef_hash_table::find_typedef): Rename from
6710 find_typedef_in_hash; now a member.
6711 (whatis_exp): Update.
6712 * extension.h (struct ext_lang_type_printers): Add constructor and
6714 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6716 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6717 Now a constructor; rename from start_ext_lang_type_printers.
6718 (ext_lang_type_printers): Now a destructor; rename from
6719 free_ext_lang_type_printers.
6720 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6722 (c_type_print_base_struct_union): Update. Remove cleanups.
6724 2018-03-27 Tom Tromey <tom@tromey.com>
6726 * dwarf-index-write.c: Include <cmath>.
6728 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6730 * NEWS: Add entry describing new "set|show varsize-limit" command.
6731 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6733 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6736 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6738 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6740 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6741 * dwarf-index-common.c: New file.
6742 * dwarf-index-common.h: New file.
6743 * dwarf-index-write.c: New file.
6744 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6745 (struct dwarf2_section_info): Move from here.
6746 (dwarf2_section_info_def): Likewise.
6747 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6748 (offset_type): Likewise.
6749 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6750 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6751 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6752 (byte_swap): Likewise.
6753 (MAYBE_SWAP): Likewise.
6754 (dwarf2_per_cu_ptr): Likewise.
6755 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6756 (struct tu_stats): Likewise.
6757 (struct dwarf2_per_objfile): Likewise.
6758 (struct dwarf2_per_cu_data): Likewise.
6759 (struct signatured_type): Likewise.
6760 (sig_type_ptr): Likewise.
6761 (DEF_VEC_P (sig_type_ptr)): Likewise.
6762 (INDEX4_SUFFIX): Likewise.
6763 (INDEX5_SUFFIX): Likewise.
6764 (DEBUG_STR_SUFFIX): Likewise.
6765 (dwarf2_read_section): Make non-static.
6766 (mapped_index_string_hash): Move from here.
6767 (dwarf5_djb_hash): Likewise.
6768 (file_write): Likewise.
6769 (class data_buf): Likewise.
6770 (struct symtab_index_entry): Likewise.
6771 (struct mapped_symtab): Likewise.
6772 (find_slot): Likewise.
6773 (hash_expand): Likewise.
6774 (add_index_entry): Likewise.
6775 (uniquify_cu_indices): Likewise.
6776 (class c_str_view): Likewise.
6777 (class c_str_view_hasher): Likewise.
6778 (class vector_hasher): Likewise.
6779 (write_hash_table): Likewise.
6780 (psym_index_map): Likewise.
6781 (struct addrmap_index_data): Likewise.
6782 (add_address_entry): Likewise.
6783 (add_address_entry_worker): Likewise.
6784 (write_address_map): Likewise.
6785 (symbol_kind): Likewise.
6786 (write_psymbols): Likewise.
6787 (struct signatured_type_index_data): Likewise.
6788 (write_one_signatured_type): Likewise.
6789 (recursively_count_psymbols): Likewise.
6790 (recursively_write_psymbols): Likewise.
6791 (class debug_names): Likewise.
6792 (check_dwarf64_offsets): Likewise.
6793 (psyms_seen_size): Likewise.
6794 (write_gdbindex): Likewise.
6795 (write_debug_names): Likewise.
6796 (assert_file_size): Likewise.
6797 (write_psymtabs_to_index): Likewise.
6798 (save_gdb_index_command): Likewise.
6799 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6801 * dwarf2read.h: New file.
6803 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6806 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6807 symbol name if the CU's language stores symbol names in linkage
6809 * language.h (struct language_defn)
6810 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6811 all instances of this struct.
6813 2018-03-26 Tom Tromey <tom@tromey.com>
6815 * stack.c (backtrace_command_1): Remove verbose code.
6817 2018-03-26 Tom Tromey <tom@tromey.com>
6819 * python/py-framefilter.c (py_print_type): Don't catch
6820 exceptions. Return void.
6821 (py_print_value): Likewise.
6822 (py_print_single_arg): Likewise.
6823 (enumerate_args): Don't catch exceptions.
6824 (py_print_args): Likewise.
6825 (py_print_frame): Likewise.
6826 (gdbpy_apply_frame_filter): Catch exceptions here.
6828 2018-03-26 Tom Tromey <tom@tromey.com>
6830 * stack.c (_initialize_stack): Remove trailing newlines from help
6831 text. Add "Usage" line to "backtrace" help.
6833 2018-03-26 Tom Tromey <tom@tromey.com>
6836 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6838 2018-03-26 Tom Tromey <tom@tromey.com>
6840 * python/py-framefilter.c (py_print_single_arg): Return
6841 EXT_LANG_BT_ERROR from catch.
6843 2018-03-26 Tom Tromey <tom@tromey.com>
6846 * stack.c (backtrace_command_1): Move some code into no-filters
6849 2018-03-26 Tom Tromey <tom@tromey.com>
6851 * python/py-framefilter.c (throw_quit_or_print_exception): New
6853 (gdbpy_apply_frame_filter): Use it.
6855 2018-03-26 Tom Tromey <tom@tromey.com>
6858 * python/py-framefilter.c (py_print_type, py_print_value)
6859 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6862 2018-03-26 Tom Tromey <tom@tromey.com>
6864 * python/py-framefilter.c (enumerate_args): Use
6865 gdb::unique_xmalloc_ptr.
6867 2018-03-26 Tom Tromey <tom@tromey.com>
6869 * python/py-framefilter.c (py_print_frame): Return
6871 (gdbpy_apply_frame_filter): Update comment.
6872 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6874 <EXT_LANG_BT_NO_FILTERS>: Change value.
6876 2018-03-26 Tom Tromey <tom@tromey.com>
6879 * stack.c (backtrace_command): Parse "hide" argument.
6880 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6881 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6884 2018-03-26 Tom Tromey <tom@tromey.com>
6886 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6888 (backtrace_command): Remove "fulltrace", add "flags".
6890 2018-03-26 Tom Tromey <tom@tromey.com>
6892 * stack.c (backtrace_command): Rewrite command line parsing.
6894 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6896 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6898 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6900 * filename-seen-cache.h: Add include guard.
6902 2018-03-26 Keith Seitz <keiths@redhat.com>
6904 * symfile.c (place_section): Remove "struct" from section_addr_info
6906 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6907 "struct" keyword from section_addr_info.
6909 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6911 * regformats/regdef.h (reg): Add constructors.
6913 2018-03-25 Pedro Alves <palves@redhat.com>
6915 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6916 if then/else bodies in var_func_name extraction.
6918 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6920 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6921 lookup_minimal_symbol() to find symbol entry.
6922 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6924 2018-03-23 Keith Seitz <keiths@redhat.com>
6927 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6928 nested type definitions for C++, too.
6930 2018-03-23 Tom Tromey <tom@tromey.com>
6932 * machoread.c (struct oso_el): Add a constructor. Don't define as
6934 (macho_register_oso): Remove.
6935 (macho_symtab_read): Take a std::vector.
6936 (oso_el_compare_name): Now a std::sort comparator.
6937 (macho_symfile_read_all_oso): Take a std::vector.
6938 (macho_symfile_read): Use std::vector. Remove cleanups.
6940 2018-03-22 Tom Tromey <tom@tromey.com>
6942 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6943 (record_full_goto_bookmark): Use std::string.
6945 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6948 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6951 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6953 * rs6000-tdep.c (store_insn_p): New function.
6954 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6955 and cr_reg to their unshifted values. Use store_insn_p to
6956 match LR saves using either R1 or fdata->alloca_reg. Use
6957 store_insn_p to match CR saves. Set alloca_reg_offset
6958 when alloca_reg and framep are set. Remove lr_reg shift
6959 when assigning to fdata->lr_register.
6961 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6963 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6964 command line args instead of emitting a warning.
6966 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6968 * tracepoint.h (struct static_tracepoint_marker): Initialize
6969 fields, define default constructor, move constructor and move
6970 assignment, disable the rest.
6971 <str_id, extra>: Make std::string.
6972 (release_static_tracepoint_marker): Remove.
6973 (free_current_marker): Remove.
6974 * tracepoint.c (free_current_marker): Remove.
6975 (parse_static_tracepoint_marker_definition): Adjust to
6976 std::string, use new hex2str overload.
6977 (release_static_tracepoint_marker): Remove.
6978 (print_one_static_tracepoint_marker): Get marker by reference
6979 and adjust to std::string.
6980 (info_static_tracepoint_markers_command): Adjust to std::vector
6982 * target.h (static_tracepoint_marker_p): Remove typedef.
6983 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6984 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6986 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6988 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6989 (target_debug_print_std_vector_static_tracepoint_marker): New.
6990 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6992 (target_debug_print_static_tracepoint_marker_p): ... this.
6993 * target-delegates.c: Re-generate.
6994 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6996 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6997 (decode_static_tracepoint_spec): Adjust to std::vector.
6998 (tracepoint_print_one_detail): Adjust to std::string.
6999 (strace_marker_decode_location): Adjust to std::string.
7000 (update_static_tracepoint): Adjust to std::string, remove call
7001 to release_static_tracepoint_marker.
7002 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7003 Adjust to std::vector.
7004 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7005 (remote_static_tracepoint_markers_by_strid): Adjust to
7007 * common/rsp-low.h (hex2str): New overload with explicit count
7009 * common/rsp-low.c (hex2str): New overload with explicit count
7011 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7012 (_initialize_rsp_low_selftests): Add test_hex2str test.
7013 * unittests/tracepoint-selftests.c
7014 (test_parse_static_tracepoint_marker_definition): Adjust to
7017 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7019 * tracepoint.c (parse_static_tracepoint_marker_definition):
7020 Consider case where the definition is followed by more
7022 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7023 tracepoint-selftests.c.
7024 * unittests/tracepoint-selftests.c: New.
7026 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7028 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7031 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7033 * symtab.c (find_pc_sect_line): fixed indentation.
7035 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7037 * symtab.c (find_pc_sect_line): now uses binary search.
7039 2018-03-19 Tom Tromey <tom@tromey.com>
7041 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7044 2018-03-19 Pedro Alves <palves@redhat.com>
7045 Tom Tromey <tom@tromey.com>
7047 * unittests/observable-selftests.c: New file.
7048 * common/observable.h: New file.
7049 * observable.h: New file.
7050 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7051 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7052 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7053 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7054 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7055 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7056 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7057 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7058 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7059 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7060 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7061 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7062 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7063 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7064 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7065 tui/tui-interp.c, valops.c: Update all users.
7066 * tui/tui-hooks.c (tui_bp_created_observer)
7067 (tui_bp_deleted_observer, tui_bp_modified_observer)
7068 (tui_inferior_exit_observer, tui_before_prompt_observer)
7069 (tui_normal_stop_observer, tui_register_changed_observer):
7071 (tui_observers_token): New global.
7072 (attach_or_detach, tui_attach_detach_observers): New functions.
7073 (tui_install_hooks, tui_remove_hooks): Use
7074 tui_attach_detach_observers.
7075 * record-btrace.c (record_btrace_thread_observer): Remove.
7076 (record_btrace_thread_observer_token): New global.
7077 * observer.sh: Remove.
7078 * observer.c: Rename to observable.c.
7079 * observable.c (namespace gdb_observers): Define new objects.
7080 (observer_debug): Move into gdb_observers namespace.
7081 (struct observer, struct observer_list, xalloc_observer_list_node)
7082 (xfree_observer_list_node, generic_observer_attach)
7083 (generic_observer_detach, generic_observer_notify): Remove.
7084 (_initialize_observer): Update.
7085 Don't include observer.inc.
7086 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7087 (clean mostlyclean): Likewise.
7088 (observer.h, observer.inc): Remove targets.
7089 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7090 (COMMON_SFILES): Use observable.c, not observer.c.
7091 * .gitignore: Remove observer.h.
7093 2018-03-18 Tom Tromey <tom@tromey.com>
7095 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7097 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7099 2018-03-17 Tom Tromey <tom@tromey.com>
7101 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7103 2018-03-17 Tom Tromey <tom@tromey.com>
7105 * target.c (class scoped_target_fd): New.
7106 (target_fileio_close_cleanup): Remove.
7107 (target_fileio_read_alloc_1): Use scoped_target_fd.
7109 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7111 * silent-rules.mk: New.
7112 * Makefile.in: Include silent-rules.mk
7113 (srcdir, VPATH, top_srcdir): Move up.
7114 (COMPILE): Add ECHO_CXX.
7115 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7116 (init.c): Add ECHO_INIT_C.
7117 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7118 (version.c): Add ECHO_GEN.
7119 (printcmd.o): Add ECHO_CXX.
7120 (target-float.o): Add ECHO_CXX.
7121 (ada-exp.o): Add ECHO_CXX.
7122 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7123 (insight$(EXEEXT)): Add ECHO_CXXLD.
7124 * gnulib/configure.ac: Add AM_SILENT_RULES.
7125 * gnulib/aclocal.m4: Re-generate.
7126 * gnulib/configure: Re-generate.
7127 * gnulib/import/Makefile.in: Re-generate.
7129 2018-03-16 Tom Tromey <tom@tromey.com>
7131 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7132 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7133 * utils.c (do_free_section_addr_info)
7134 (make_cleanup_free_section_addr_info): Remove.
7135 * symfile.h (struct other_sections): Add constructor.
7136 (struct section_addr_info): Remove.
7137 (section_addr_info): New typedef.
7138 (struct sym_fns) <sym_offsets>: Change type of parameter.
7139 (build_section_addr_info_from_objfile)
7140 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7141 (default_symfile_offsets, symbol_file_add)
7142 (symbol_file_add_from_bfd)
7143 (build_section_addr_info_from_section_table): Update.
7144 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7145 * symfile.c (alloc_section_addr_info): Remove.
7146 (build_section_addr_info_from_section_table): Change return type.
7148 (build_section_addr_info_from_bfd)
7149 (build_section_addr_info_from_objfile): Likewise.
7150 (free_section_addr_info): Remove.
7151 (relative_addr_info_to_section_offsets): Change type of "addrs".
7152 (addrs_section_compar): Now a std::sort comparator.
7153 (addrs_section_sort): Change return type.
7154 (addr_info_make_relative): Change type of "addrs". Update.
7155 (default_symfile_offsets, syms_from_objfile_1)
7156 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7157 (symbol_file_add_separate): Update.
7158 (symbol_file_add): Change type of "addrs". Update.
7159 (add_symbol_file_command): Update. Remove cleanups.
7160 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7162 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7163 * solib.c (solib_read_symbols): Update.
7164 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7165 * machoread.c (macho_symfile_offsets): Update.
7166 * jit.c (jit_bfd_try_read_symtab): Update.
7168 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7170 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7171 unittests/utils-selftests.c.
7172 * unittests/utils-selftests.c: New file.
7174 2018-03-14 Tom Tromey <tom@tromey.com>
7177 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7180 2018-03-14 Tom Tromey <tom@tromey.com>
7183 * printcmd.c (printf_pointer): Allow "-" in format.
7185 2018-03-14 Tom Tromey <tom@tromey.com>
7187 * printcmd.c (_initialize_printcmd): Add usage to printf.
7189 2018-03-14 Yao Qi <qiyao@sourceware.org>
7191 * MAINTAINERS: Update my email address.
7193 2018-03-13 Tom Tromey <tom@tromey.com>
7195 * machoread.c (macho_check_dsym): Change filenamep to a
7197 (macho_symfile_read): Update.
7198 * symfile.c (load_command): Use std::string.
7200 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7202 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7203 to error message string.
7204 (riscv_register_name): Use xsnprintf instead of sprintf.
7205 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7207 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7209 (riscv_push_dummy_call): Likewise.
7211 2018-03-12 Tom Tromey <tom@tromey.com>
7213 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7214 Use gdb::byte_vector.
7215 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7217 2018-03-12 Yao Qi <yao.qi@linaro.org>
7219 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7220 parameter type to readable_regcache.
7221 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7224 2018-03-11 Tom Tromey <tom@tromey.com>
7226 * dwarf2read.c (struct nextfield): Add initializers.
7227 (struct nextfnfield): Remove.
7228 (struct fnfieldlist): Add initializers. Remove "length" and
7229 "head", use std::vector.
7230 (struct decl_field_list): Remove.
7231 (struct field_info): Add initializers.
7232 <fields, baseclasses>: Now std::vector.
7233 <nbaseclasses, nfnfields, typedef_field_list_count,
7234 nested_types_list_count>: Remove.
7235 (dwarf2_add_field, dwarf2_add_type_defn)
7236 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7237 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7238 (process_structure_scope): Update.
7240 2018-03-11 Tom Tromey <tom@tromey.com>
7242 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7243 for use by std::sort.
7244 (build_type_psymtabs_1): Use std::vector.
7246 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7248 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7249 and LIBMPFR in the printed configuration.
7251 2018-03-08 Tom Tromey <tom@tromey.com>
7253 * source.c (get_filename_and_charpos): Use scoped_fd.
7254 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7255 (procfs_pidlist): Likewise.
7256 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7257 (iterate_over_mappings): Likewise.
7259 2018-03-08 Tom Tromey <tom@tromey.com>
7261 * infcall.c (struct call_return_meta_info)
7262 <stack_temporaries_enabled>: Remove.
7263 (get_call_return_value, call_function_by_hand_dummy): Update.
7264 * thread.c (disable_thread_stack_temporaries): Remove.
7265 (enable_thread_stack_temporaries): Remove.
7266 (thread_stack_temporaries_enabled_p): Return bool.
7267 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7268 (get_last_thread_stack_temporary): Update.
7269 * eval.c (evaluate_subexp): Update.
7270 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7271 class, not a function.
7272 (value_ptr, value_vec): Remove typedefs.
7273 (class thread_info) <stack_temporaries_enabled>: Now bool.
7274 <stack_temporaries>: Now a std::vector.
7275 (thread_stack_temporaries_enabled_p)
7276 (value_in_thread_stack_temporaries): Return bool.
7278 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7280 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7281 (getpkt_or_notif_sane_1): Likewise.
7283 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7285 * build-id.c (build_id_to_debug_bfd): Use std::string.
7287 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7289 * build-id.c (find_separate_debug_file_by_buildid): Return
7291 * build-id.h (find_separate_debug_file_by_buildid): Return
7293 * coffread.c (coff_symfile_read): Adjust to std::string.
7294 * elfread.c (elf_symfile_read): Adjust to std::string.
7295 * symfile.c (separate_debug_file_exists): Change parameter to
7297 (find_separate_debug_file): Return std::string.
7298 (find_separate_debug_file_by_debuglink): Return std::string.
7299 * symfile.h (find_separate_debug_file_by_debuglink): Return
7302 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7304 * common/xml-utils.c (xml_escape_text): Move code to...
7305 (xml_escape_text_append): ... this new function.
7306 * common/xml-utils.h (xml_escape_text_append): New declaration.
7307 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7309 (_initialize_xml_utils): register test_xml_escape_text_append as
7312 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7314 * defs.h: Remove MAX_REGISTER_SIZE.
7315 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7317 * python/py-unwind.c (pyuw_sniffer): Likewise.
7319 2018-03-07 Tom Tromey <tom@tromey.com>
7321 * linux-tdep.c (linux_info_proc): Update.
7322 * target.h (struct target_ops) <to_fileio_readlink>: Return
7324 (target_fileio_readlink): Return optional<string>.
7325 * remote.c (remote_hostio_readlink): Return optional<string>.
7326 * inf-child.c (inf_child_fileio_readlink): Return
7328 * target.c (target_fileio_readlink): Return optional<string>.
7330 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7332 * regcache.c (cooked_read_test): Add riscv to the list of
7333 architectures that have a save_reggroup.
7335 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7337 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7338 value is not a dynamic class object.
7340 2018-03-06 Tom Tromey <tom@tromey.com>
7342 * rust-exp.y: Formatting fixes.
7344 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7346 * riscv-tdep.c (riscv_register_name): Remove target description
7348 (riscv_gdbarch_init): Remove target description check.
7350 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7352 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7354 * riscv-tdep.h: Likewise.
7356 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7358 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7359 (riscv_pseudo_register_write): Delete.
7360 (riscv_gdbarch_init): Remove all use of pseudo registers.
7362 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7364 * record-btrace.c (btrace_print_lines): Replace cleanup
7365 parameter with RAII equivalents.
7366 (btrace_insn_history): Replace cleanup with RAII equivalents.
7367 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7368 make_cleanup_ui_out_tuple_begin_end): Remove.
7369 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7370 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7371 make_cleanup_ui_out_list_begin_end): Remove.
7373 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7375 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7376 parameter types to std::vector. Use bool.
7377 (record_btrace_wait): Replace VEC(tp_t) with
7378 std::vector<thread_info *>.
7379 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7381 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7383 * record-btrace.c (record_btrace_disable_callback): Remove.
7384 (struct scoped_btrace_disable): New.
7385 (record_btrace_open): Use scoped_btrace_disable.
7387 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7389 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7390 reading values from registers.
7392 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7394 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7397 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7399 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7400 change parameter type. Use GDB's print functions, and use
7401 core_addr_to_string where appropriate.
7402 (riscv_push_dummy_call): Use core_addr_to_string where
7403 appropriate, update call to riscv_print_arg_location, and reindent
7405 (riscv_return_value): Update call to riscv_print_arg_location.
7407 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7408 Tim Newsome <tim@sifive.com>
7409 Albert Ou <a0u@eecs.berkeley.edu>
7410 Darius Rad <darius@bluespec.com>
7412 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7413 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7414 (ALLDEPFILES): Add riscv-tdep.c
7415 * configure.tgt: Add riscv support.
7416 * riscv-tdep.c: New file.
7417 * riscv-tdep.h: New file.
7418 * NEWS: Mention new target.
7419 * MAINTAINERS: Add entry for riscv.
7421 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7423 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7424 fields within aggregates.
7426 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7428 * record-btrace.c (btrace_print_lines): Change type of flags to
7429 gdb_disassembly_flags.
7431 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7433 * fbsd-nat.c: Include "inf-ptrace.h".
7434 (USE_SIGTRAP_SIGINFO): Conditionally define.
7435 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7436 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7437 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7439 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7441 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7443 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7444 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7445 "supports_stopped_by_hw_breakpoint" target methods.
7447 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7449 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7450 * fbsd-nat.c (debug_fbsd_nat): New variable.
7451 (show_fbsd_nat_debug): New function.
7452 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7453 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7455 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7457 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7458 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7460 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7461 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7464 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7466 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7467 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7469 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7471 * charset.c (struct charset_vector): New.
7472 (charsets): Change type to charset_vector.
7473 (find_charset_names): Adjust.
7475 (_initialize_charset): Adjust.
7477 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7479 * progspace.h (struct program_space) <deleted_solibs>: Change
7480 type to std::vector<std::string>.
7481 * progspace.c (clear_program_space_solib_cache): Adjust.
7482 * breakpoint.c (print_solib_event): Adjust.
7483 (check_status_catch_solib): Adjust.
7484 * solib.c (update_solib_list): Adjust.
7485 * ui-out.h (class ui_out) <field_string>: New overload.
7486 * ui-out.c (ui_out::field_string): New overload.
7488 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7490 * progspace.h (struct program_space): Add constructor and
7491 destructor, initialize fields.
7492 (add_program_space): Remove.
7493 * progspace.c (add_program_space): Rename to...
7494 (program_space::program_space): ... this.
7495 (release_program_space): Rename to...
7496 (program_space::~program_space): ... this.
7497 (delete_program_space): Use delete to delete program_space.
7498 (initialize_progspace): Use new to allocate program_space.
7499 * inferior.c (add_inferior_with_spaces): Likewise.
7500 (clone_inferior_command): Likewise.
7501 * infrun.c (follow_fork_inferior): Likewise.
7502 (handle_vfork_child_exec_or_exit): Likewise.
7504 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7506 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7507 (delim_string_to_char_ptr_vec): Return std::vector of
7508 gdb::unique_xmalloc_ptr.
7509 (dirnames_to_char_ptr_vec_append): Take std::vector of
7510 gdb::unique_xmalloc_ptr.
7511 (dirnames_to_char_ptr_vec): Return std::vector of
7512 gdb::unique_xmalloc_ptr.
7513 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7514 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7515 (delim_string_to_char_ptr_vec): Return an std::vector of
7516 gdb::unique_xmalloc_ptr, adjust the code.
7517 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7518 gdb::unique_xmalloc_ptr, adjust the code.
7519 (dirnames_to_char_ptr_vec): Return an std::vector of
7520 gdb::unique_xmalloc_ptr, adjust the code.
7521 * auto-load.c (auto_load_safe_path_vec): Change type to
7522 std::vector of gdb::unique_xmalloc_ptr.
7523 (auto_load_expand_dir_vars): Return an std::vector of
7524 gdb::unique_xmalloc_ptr, adjust the code.
7525 (auto_load_safe_path_vec_update): Adjust.
7526 (filename_is_in_auto_load_safe_path_vec): Adjust.
7527 (auto_load_objfile_script_1): Adjust.
7528 * build-id.c (build_id_to_debug_bfd): Adjust.
7529 * linux-thread-db.c (thread_db_load_search): Adjust.
7530 * source.c (add_path): Adjust.
7532 * symfile.c (find_separate_debug_file): Adjust.
7533 * utils.c (do_free_char_ptr_vec): Remove.
7534 (make_cleanup_free_char_ptr_vec): Remove.
7536 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7539 * common/pathstuff.c: Conditionally include "<windows.h>".
7541 2018-03-01 Georg Sauthoff <mail@georg.so>
7544 * gcore.in: Quote variables and switch interpreter to bash.
7546 2018-03-01 Tom Tromey <tom@tromey.com>
7548 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7549 assertion. Add assertion for discriminant_index.
7550 (quirk_rust_enum): Use correct base type name in univariant case.
7552 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7554 * record.c (get_call_history_modifiers): Return a
7556 (cmd_record_call_history): Adjust.
7557 * record-btrace.c (record_btrace_call_history): Adjust.
7558 (record_btrace_call_history_range): Adjust.
7559 (record_btrace_call_history_from): Adjust.
7560 * target-debug.h (target_debug_print_record_print_flags): New.
7561 * target-delegates.c: Re-generate.
7562 * target.c (target_call_history): Change flags type.
7563 (target_call_history_from): Likewise.
7564 (target_call_history_range): Likewise.
7565 * target.h (struct target_ops) <target_call_history>: Likewise.
7566 (target_call_history_from): Likewise.
7567 (target_call_history_range): Likewise.
7569 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7570 Simon Marchi <simon.marchi@polymtl.ca>
7572 * common/common-utils.c: Include "sys/stat.h".
7573 (is_regular_file): Move here from "source.c"; change return
7575 * common/common-utils.h (is_regular_file): New prototype.
7576 * common/pathstuff.c (contains_dir_separator): New function.
7577 * common/pathstuff.h (contains_dir_separator): New prototype.
7578 * source.c: Don't include "sys/stat.h".
7579 (is_regular_file): Move to "common/common-utils.c".
7581 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7583 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7584 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7585 * auto-load.c: Include "common/pathstuff.h".
7586 * common/common-def.h (current_directory): Move here.
7587 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7589 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7591 * common/pathstuff.c: New file.
7592 * common/pathstuff.h: New file.
7593 * compile/compile.c: Include "common/pathstuff.h".
7594 * defs.h (current_directory): Move to "common/common-defs.h".
7595 * dwarf2read.c: Include "common/pathstuff.h".
7597 * guile/scm-safe-call.c: Likewise.
7598 * linux-thread-db.c: Likewise.
7600 * nto-tdep.c: Likewise.
7601 * objfiles.c: Likewise.
7602 * source.c: Likewise.
7603 * symtab.c: Likewise.
7604 * utils.c: Include "common/pathstuff.h".
7605 (gdb_realpath): Move to "common/pathstuff.c".
7606 (gdb_realpath_keepfile): Likewise.
7607 (gdb_abspath): Likewise.
7608 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7609 (gdb_realpath_keepfile): Likewise.
7610 (gdb_abspath): Likewise.
7612 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7614 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7615 wildcard process pid for super_resume for kernels with a
7618 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7620 * compile/compile.c (get_args): Add additional comments
7621 explaining function.
7623 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7624 Tom Tromey <tom@tromey.com>
7626 * target.h (memory_write_request_s): Remove typedef. Don't define
7628 (target_write_memory_blocks): Change argument to std::vector.
7629 (struct memory_write_request): Add constructor.
7630 * target-memory.c (compare_block_starting_address): Return bool.
7631 Change argument types.
7632 (claim_memory): Change arguments to use std::vector.
7633 (split_regular_and_flash_blocks, blocks_to_erase)
7634 (compute_garbled_blocks): Likewise.
7635 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7636 (target_write_memory_blocks): Change argument to std::vector.
7637 * symfile.c (struct load_section_data): Add constructor and
7638 destructor. Use std::vector for "requests".
7639 (struct load_progress_data): Add initializers.
7640 (load_section_callback): Update. Use "new".
7641 (clear_memory_write_data): Remove.
7642 (generic_load): Update.
7644 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7646 * arch/aarch64.h: Use common/tdesc.h.
7648 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7650 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7651 architecture with a 64-bit ABI.
7653 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7655 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7656 ahead of target description loading.
7658 2018-02-26 Tom Tromey <tom@tromey.com>
7660 * stack.c (backtrace_command_1): Update.
7661 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7663 * python/py-framefilter.c (py_print_frame)
7664 (gdbpy_apply_frame_filter): Change type of "flags".
7665 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7667 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7668 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7669 * extension.h (enum frame_filter_flag): Rename from
7671 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7672 (apply_ext_lang_frame_filter): Change type of "flags".
7673 * extension.c (apply_ext_lang_frame_filter): Change type of
7675 * extension-priv.h (struct extension_language_ops)
7676 <apply_frame_filter>: Change type of "flags".
7678 2018-02-26 Tom Tromey <tom@tromey.com>
7681 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7682 off-by-one in py_end computation.
7683 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7685 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7688 2018-02-26 Tom Tromey <tom@tromey.com>
7690 * dwarf2read.c (struct variant_field): New.
7691 (struct nextfield) <variant>: New field.
7692 (dwarf2_add_field): Handle DW_TAG_variant_part.
7693 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7694 discriminated union.
7695 (read_structure_type): Handle DW_TAG_variant_part.
7696 (handle_struct_member_die): New function, extracted from
7697 process_structure_scope. Handle DW_TAG_variant.
7698 (process_structure_scope): Handle discriminated unions. Call
7699 handle_struct_member_die.
7701 2018-02-26 Tom Tromey <tom@tromey.com>
7703 * rust-lang.h (rust_last_path_segment): Declare.
7704 * rust-lang.c (rust_last_path_segment): Now public. Change
7706 (struct disr_info): Remove.
7707 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7708 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7709 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7710 (rust_enum_p, rust_enum_variant): New function.
7711 (rust_underscore_fields): Remove "offset" parameter.
7712 (rust_print_enum): New function.
7713 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7714 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7715 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7717 (rust_internal_print_type): New function, from rust_print_type.
7719 (rust_print_type): Call rust_internal_print_type.
7720 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7721 Update enum handling.
7722 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7723 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7724 (rust_union_quirks): New functions.
7725 (process_full_comp_unit, process_full_type_unit): Call
7727 (process_structure_scope): Update rust_unions if necessary.
7729 2018-02-26 Tom Tromey <tom@tromey.com>
7731 * value.h (value_union_variant): Declare.
7732 * valops.c (value_union_variant): New function.
7733 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7734 (struct discriminant_info): New.
7735 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7737 (struct main_type) <flag_discriminated_union>: New field.
7739 2018-02-26 Tom Tromey <tom@tromey.com>
7741 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7742 unittests/unpack-selftests.c.
7743 * unittests/unpack-selftests.c: New file.
7744 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7746 2018-02-26 Yao Qi <yao.qi@linaro.org>
7748 * dwarf2read.c (struct partial_die_info) <read>: New method.
7749 (read_partial_die): Remove the declaration.
7750 (load_partial_dies): Update.
7751 (partial_die_info::partial_die_info):
7752 (read_partial_die): Change it to partial_die_info::read.
7754 2018-02-26 Yao Qi <yao.qi@linaro.org>
7756 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7757 (fixup_partial_die): Remove declaration.
7758 (scan_partial_symbols): Update.
7759 (partial_die_parent_scope): Likewise.
7760 (partial_die_full_name): Likewise.
7761 (fixup_partial_die): Change it to partial_die_info::fixup.
7763 2018-02-26 Yao Qi <yao.qi@linaro.org>
7765 * dwarf2read.c (read_partial_die): Update the declaration.
7766 (load_partial_dies): Caller update.
7767 (read_partial_die): Remove one argument abbrev_len.
7769 2018-02-26 Yao Qi <yao.qi@linaro.org>
7771 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7772 assignment operator.
7773 (load_partial_dies): Use ctor and copy ctor.
7774 (read_partial_die): Update.
7775 (dwarf2_cu::find_partial_die): Use ctor.
7777 2018-02-26 Yao Qi <yao.qi@linaro.org>
7779 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7780 (find_partial_die_in_comp_unit): Change it to
7781 dwarf2_cu::find_partial_die.
7782 (find_partial_die): Update.
7784 2018-02-26 Yao Qi <yao.qi@linaro.org>
7786 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7789 2018-02-26 Yao Qi <yao.qi@linaro.org>
7791 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7793 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7795 * arch/amd64.h: Use common/tdesc.h.
7796 * arch/i386.c: Likewise.
7797 * arch/i386.h: Likewise.
7798 * arch/tic6x.c: Likewise.
7799 * arch/tdesc.h: Move file from here...
7800 * common/tdesc.h: ...to here.
7801 * features/aarch64-core.c: Regenerate.
7802 * features/aarch64-fpu.c: Regenerate.
7803 * features/i386/32bit-avx.c: Regenerate.
7804 * features/i386/32bit-avx512.c: Regenerate.
7805 * features/i386/32bit-core.c: Regenerate.
7806 * features/i386/32bit-linux.c: Regenerate.
7807 * features/i386/32bit-mpx.c: Regenerate.
7808 * features/i386/32bit-pkeys.c: Regenerate.
7809 * features/i386/32bit-sse.c: Regenerate.
7810 * features/i386/64bit-avx.c: Regenerate.
7811 * features/i386/64bit-avx512.c: Regenerate.
7812 * features/i386/64bit-core.c: Regenerate.
7813 * features/i386/64bit-linux.c: Regenerate.
7814 * features/i386/64bit-mpx.c: Regenerate.
7815 * features/i386/64bit-pkeys.c: Regenerate.
7816 * features/i386/64bit-segments.c: Regenerate.
7817 * features/i386/64bit-sse.c: Regenerate.
7818 * features/i386/x32-core.c: Regenerate.
7819 * features/tic6x-c6xp.c: Regenerate.
7820 * features/tic6x-core.c: Regenerate.
7821 * features/tic6x-gp.c: Regenerate.
7822 * target-descriptions.c: Use common/tdesc.h.
7823 * target-descriptions.h: Likewise.
7825 2018-02-24 Tom Tromey <tom@tromey.com>
7827 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7828 (try_thread_db_load_from_dir, thread_db_load_search): Use
7830 (info_auto_load_libthread_db_compare): Return bool. Change
7832 (info_auto_load_libthread_db): Use std::vector, std::string.
7835 2018-02-24 Tom Tromey <tom@tromey.com>
7837 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7839 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7841 * gdbarch.c: Rebuild.
7842 * gdbarch.h: Rebuild.
7843 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7844 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7845 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7848 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7850 * gdbtypes.h (sect_offset): Change type to uint64_t.
7851 (sect_offset_str): New function.
7852 * dwarf2read.c (create_addrmap_from_aranges): Use
7854 (error_check_comp_unit_head): Likewise.
7855 (create_debug_type_hash_table): Likewise.
7856 (read_cutu_die_from_dwo): Likewise.
7857 (init_cutu_and_read_dies): Likewise.
7858 (init_cutu_and_read_dies_no_follow): Likewise.
7859 (process_psymtab_comp_unit_reader): Likewise.
7860 (partial_die_parent_scope): Likewise.
7861 (peek_die_abbrev): Likewise.
7862 (process_queue): Likewise.
7863 (dwarf2_physname): Likewise.
7864 (read_namespace_alias): Likewise.
7865 (read_import_statement): Likewise.
7866 (create_dwo_cu_reader): Likewise.
7867 (create_cus_hash_table): Likewise.
7868 (lookup_dwo_cutu): Likewise.
7869 (inherit_abstract_dies): Likewise.
7870 (read_func_scope): Likewise.
7871 (read_call_site_scope): Likewise.
7872 (dwarf2_add_member_fn): Likewise.
7873 (read_common_block): Likewise.
7874 (read_module_type): Likewise.
7875 (read_typedef): Likewise.
7876 (read_subrange_type): Likewise.
7877 (load_partial_dies): Likewise.
7878 (read_partial_die): Likewise.
7879 (find_partial_die): Likewise.
7880 (read_str_index): Likewise.
7881 (dwarf2_string_attr): Likewise.
7882 (build_error_marker_type): Likewise.
7883 (lookup_die_type): Likewise.
7884 (dump_die_shallow): Likewise.
7885 (follow_die_ref): Likewise.
7886 (dwarf2_fetch_die_loc_sect_off): Likewise.
7887 (dwarf2_fetch_constant_bytes): Likewise.
7888 (follow_die_sig): Likewise.
7889 (get_signatured_type): Likewise.
7890 (get_DW_AT_signature_type): Likewise.
7891 (dwarf2_find_containing_comp_unit): Likewise.
7892 (set_die_type): Likewise.
7894 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7896 * arch/aarch64.c: Include "common-defs.h".
7897 * arch/amd64.c: Likewise.
7898 * arch/i386.c: Likewise.
7900 2018-02-21 Tom Tromey <tom@tromey.com>
7902 * value.h: (extract_field_op): Update.
7903 * eval.c (extract_field_op): Return a const char *.
7904 * expression.h (parse_expression_for_completion): Update.
7905 * completer.c (complete_expression): Update.
7906 (add_struct_fields): Make fieldname const.
7907 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7908 (mark_completion_tag, parse_exp_in_context_1): Update.
7909 (parse_expression_for_completion): Change "name" to
7910 unique_xmalloc_ptr*.
7912 2018-02-21 Tom Tromey <tom@tromey.com>
7914 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7916 2018-02-21 Yao Qi <yao.qi@linaro.org>
7918 * avr-tdep.c (avr_read_pc): Change parameter type to
7920 * gdbarch.sh (read_pc): Likewise.
7921 * gdbarch.c: Re-generated.
7922 * gdbarch.h: Re-generated.
7923 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7925 * ia64-tdep.c (ia64_read_pc): Likewise.
7926 * mips-tdep.c (mips_read_pc): Likewise.
7927 * spu-tdep.c (spu_read_pc): Likewise.
7929 2018-02-21 Yao Qi <yao.qi@linaro.org>
7931 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7932 * regcache-dump.c: New file.
7933 * regcache.c: Move register_dump to regcache-dump.c.
7934 (maintenance_print_registers): Likewise.
7935 (maintenance_print_raw_registers): Likewise.
7936 (maintenance_print_cooked_registers): Likewise.
7937 (maintenance_print_register_groups): Likewise.
7938 (maintenance_print_remote_registers): Likewise.
7939 (_initialize_regcache): Likewise.
7940 * regcache.h (register_dump): Moved from regcache.c.
7942 2018-02-21 Yao Qi <yao.qi@linaro.org>
7944 * regcache.c (regcache::regcache): Update.
7945 (regcache::invalidate): Move it to detached_regcache::invalidate.
7946 (get_thread_arch_aspace_regcache): Update.
7947 (regcache::raw_update): Update.
7948 (regcache::cooked_read): Remove some code.
7949 (regcache::cooked_read_value): Likewise.
7950 (regcache::raw_write): Remove assert on m_readonly_p.
7951 (regcache::raw_supply_integer): Move it to
7952 detached_regcache::raw_supply_integer.
7953 (regcache::raw_supply_zeroed): Likewise.
7954 * regcache.h (detached_regcache) <raw_supply_integer>: New
7956 <raw_supply_zeroed, invalidate>: Likewise.
7957 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7958 <invalidate>: Likewise.
7959 <m_readonly_p>: Removed.
7961 2018-02-21 Yao Qi <yao.qi@linaro.org>
7963 * infcmd.c (get_return_value): Let stop_regs point to
7964 get_current_regcache.
7965 * regcache.c (regcache::regcache): Remove.
7966 (register_dump_reg_buffer): New class.
7967 (regcache_print): Adjust.
7968 * regcache.h (regcache): Remove constructors.
7970 2018-02-21 Yao Qi <yao.qi@linaro.org>
7972 * regcache.c (class register_dump): New class.
7973 (register_dump_regcache, register_dump_none): New class.
7974 (register_dump_remote, register_dump_groups): New class.
7975 (regcache_print): Update.
7976 * regcache.h (regcache_dump_what): Move it to regcache.c.
7977 (regcache) <dump>: Remove.
7979 2018-02-21 Yao Qi <yao.qi@linaro.org>
7981 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7983 (jit_unwind_reg_set_impl): Call raw_supply.
7984 (jit_frame_sniffer): Use reg_buffer_rw.
7985 * record-full.c (record_full_core_regbuf): Change its type.
7986 (record_full_core_open_1): Use reg_buffer_rw.
7987 (record_full_close): Likewise.
7988 (record_full_core_fetch_registers): Use regcache->raw_supply.
7989 (record_full_core_store_registers): Likewise.
7990 * regcache.c (regcache::get_register_status): Move it to
7992 (regcache_raw_set_cached_value): Remove.
7993 (regcache::raw_set_cached_value): Remove.
7994 (regcache::raw_write): Call raw_supply.
7995 (regcache::raw_supply): Move it to reg_buffer_rw.
7996 * regcache.h (regcache_raw_set_cached_value): Remove.
7997 (reg_buffer_rw): New class.
7999 2018-02-21 Yao Qi <yao.qi@linaro.org>
8001 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8002 readonly_detached_regcache.
8003 (dummy_frame_prev_register): Use regcache->cooked_read.
8004 * frame.c (frame_save_as_regcache): Change return type.
8005 (frame_pop): Update.
8006 * frame.h (frame_save_as_regcache): Update declaration.
8007 * inferior.h (get_infcall_suspend_state_regcache): Update
8009 * infrun.c (infcall_suspend_state) <registers>: use
8010 readonly_detached_regcache.
8011 (save_infcall_suspend_state): Don't use regcache_dup.
8012 (get_infcall_suspend_state_regcache): Change return type.
8013 * linux-fork.c (struct fork_info) <savedregs>: Change to
8014 readonly_detached_regcache.
8016 (fork_save_infrun_state): Don't use regcache_dup.
8017 (info_checkpoints_command): Adjust.
8018 * mi/mi-main.c (register_changed_p): Update declaration.
8019 (mi_cmd_data_list_changed_registers): Use
8020 readonly_detached_regcache.
8021 (register_changed_p): Change parameter type to
8022 readonly_detached_regcache.
8023 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8024 readonly_detached_regcache.
8025 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8026 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8028 (regcache::save): Move it to reg_buffer.
8029 (regcache::restore): Change parameter type.
8030 (regcache_dup): Remove.
8031 * regcache.h (reg_buffer) <save>: New method.
8032 (readonly_detached_regcache): New class.
8033 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8034 readonly_detached_regcache.
8035 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8037 2018-02-21 Yao Qi <yao.qi@linaro.org>
8039 * frame.c (frame_save_as_regcache): Use regcache method save.
8040 (frame_pop): Use regcache method restore.
8041 * infrun.c (restore_infcall_suspend_state): Likewise.
8042 * linux-fork.c (fork_load_infrun_state): Likewise.
8043 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8045 * regcache.c (regcache_save): Remove.
8046 (regcache::restore): More asserts.
8047 (regcache_cpy): Remove.
8048 * regcache.h (regcache_save): Remove the declaration.
8049 (regcache::restore): Move from private to public.
8050 Remove the friend declaration of regcache_cpy.
8051 (regcache_cpy): Remove declaration.
8053 2018-02-21 Yao Qi <yao.qi@linaro.org>
8055 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8056 parameter type to 'readable_regcache *'.
8057 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8058 * arm-tdep.c (arm_neon_quad_read): Likewise.
8059 (arm_pseudo_read): Likewise.
8060 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8061 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8062 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8063 * gdbarch.c: Re-generated.
8064 * gdbarch.h: Re-generated.
8065 * gdbarch.sh (pseudo_register_read): Change parameter type to
8066 'readable_regcache *'.
8067 (pseudo_register_read_value): Likewise.
8068 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8069 (h8300_pseudo_register_read): Likewise.
8070 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8071 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8072 (i386_pseudo_register_read_into_value): Likewise.
8073 (i386_pseudo_register_read_value): Likewise.
8074 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8076 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8077 * m32c-tdep.c (m32c_raw_read): Likewise.
8078 (m32c_read_flg): Likewise.
8079 (m32c_banked_register): Likewise.
8080 (m32c_banked_read): Likewise.
8081 (m32c_sb_read): Likewise.
8082 (m32c_part_read): Likewise.
8083 (m32c_cat_read): Likewise.
8084 (m32c_r3r2r1r0_read): Likewise.
8085 (m32c_pseudo_register_read): Likewise.
8086 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8087 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8088 (mep_pseudo_cr64_read): Likewise.
8089 (mep_pseudo_register_read): Likewise.
8090 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8091 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8092 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8093 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8094 (regcache::cooked_read): Likewise.
8095 (regcache::cooked_read_value): Likewise.
8096 (regcache_cooked_read_signed):
8097 (regcache::cooked_read): Likewise.
8098 * regcache.h (readable_regcache): New class.
8099 (regcache): Inherit readable_regcache. Move some methods to
8101 * rl78-tdep.c (rl78_pseudo_register_read): Change
8102 parameter type to 'readable_regcache *'.
8103 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8104 (e500_pseudo_register_read): Change parameter type to
8105 'readable_regcache *'.
8106 (dfp_pseudo_register_read): Likewise.
8107 (vsx_pseudo_register_read): Likewise.
8108 (efpr_pseudo_register_read): Likewise.
8109 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8110 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8111 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8112 (sh64_pseudo_register_read): Likewise.
8113 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8114 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8115 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8116 (spu_pseudo_register_read): Likewise.
8117 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8118 (xtensa_pseudo_register_read): Likewise.
8120 2018-02-21 Yao Qi <yao.qi@linaro.org>
8122 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8123 (regcache::arch): Move it to reg_buffer::arch.
8124 (regcache::register_buffer): Likewise.
8125 (regcache::assert_regnum): Likewise.
8126 (regcache::num_raw_registers): Likewise.
8127 * regcache.h (reg_buffer): New class.
8128 (regcache): Inherit reg_buffer.
8130 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8132 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8133 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8135 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8137 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8139 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8141 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8142 (SFILES): Remove common/*.c files.
8143 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8144 * common/common.host: Add common reference.
8145 * configure.ac: Likewise.
8146 * configure: Regenerate.
8148 2018-02-16 Yao Qi <yao.qi@linaro.org>
8150 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8151 (block_initialize_namespace): Use new.
8152 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8153 (dwarf2_free_objfile): Use delete.
8154 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8155 (copy_type_recursive): Use new.
8156 * gdb_obstack.h (allocate_on_obstack): New.
8158 2018-02-15 Yao Qi <yao.qi@linaro.org>
8161 * inferior.c (exit_inferior_1): Reset inf->control.
8163 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8165 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8168 2018-02-14 Pedro Alves <palves@redhat.com>
8170 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8171 frame_cleanup_after_sniffer on exception.
8173 2018-02-14 Tom Tromey <tom@tromey.com>
8175 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8177 (solib_bfd_open): Make pathname const.
8178 * solib.c (solib_bfd_open): Make pathname const.
8179 * solib-spu.c (spu_bfd_fopen): Make name const.
8180 (spu_bfd_open): Make pathname const.
8181 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8182 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8184 2018-02-14 Tom Tromey <tom@tromey.com>
8186 * symfile.c (symfile_bfd_open): Update.
8187 * source.h (openp, source_full_path_of, find_and_open_source):
8188 Change argument type to unique_xmalloc_ptr.
8189 * source.c (openp): Take a unique_xmalloc_ptr.
8190 (source_full_path_of, find_and_open_source): Likewise.
8191 (open_source_file, symtab_to_fullname): Update.
8192 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8194 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8195 (exec_file_find): Update.
8196 * psymtab.c (psymtab_to_fullname): Update.
8197 * nto-tdep.h (nto_find_and_open_solib): Update.
8198 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8200 * exec.c (exec_file_attach): Update.
8201 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8202 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8204 2018-02-14 Tom Tromey <tom@tromey.com>
8206 * solib.c: Include source.h.
8207 * nto-tdep.c: Include source.h.
8208 * mi/mi-cmd-env.c: Include source.h.
8209 * infcmd.c: Include source.h.
8210 * exec.c: Include source.h.
8211 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8212 (add_path, directory_switch, source_path, init_source_path): Move
8214 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8215 (add_path, directory_switch, source_path, init_source_path):
8218 2018-02-14 Tom Tromey <tom@tromey.com>
8220 * solist.h (exec_file_find, solib_find): Return
8222 (solib_bfd_fopen): Take a const char *.
8223 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8224 (exec_file_find, solib_find): Likewise.
8225 (solib_bfd_fopen): Do not take ownership of "pathname".
8226 (solib_bfd_open): Use unique_xmalloc_ptr.
8227 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8228 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8229 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8230 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8232 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8234 * ada-lang.c (name_match_type_from_name): Remove reference to
8235 ada_name_for_lookup in function's documentation.
8236 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8238 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8240 * defs.h (enum openp_flags): New enum.
8241 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8242 Move to enum openp_flags.
8243 (openp_flags): New enum flags.
8244 (openp): Change parameter type to openp_flags.
8245 * source.c (openp): Change parameter type to openp_flags.
8246 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8247 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8249 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8251 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8254 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8256 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8258 (class dwarf2_queue_guard): ...the destructor of this new class.
8259 (dw2_do_instantiate_symtab): Create instance of the new class
8260 dwarf2_queue_guard, remove cleanup.
8262 2018-02-09 Tom Tromey <tom@tromey.com>
8264 * source.c (find_source_lines): Don't reference past the end of
8267 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8269 * remote.c (remote_btrace_maybe_reopen): Change error message.
8270 * btrace.c (btrace_enable): Likewise.
8271 (parse_xml_btrace): Likewise.
8272 (parse_xml_btrace_conf): Likewise.
8274 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8276 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8277 (linux_enable_pt, linux_enable_bts): Call
8278 diagnose_perf_event_open_fail.
8280 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8282 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8283 Remove parameter and change return type. Update callers. Move it.
8284 (linux_enable_bts, linux_enable_pt): Improve error message.
8285 (linux_enable_pt): Remove zero buffer size check.
8286 (linux_enable_btrace): Improve error messages. Remove NULL return
8289 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8291 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8292 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8293 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8294 (linux_supports_pt, linux_supports_btrace): Remove.
8295 (linux_enable_bts): Call cpu_supports_bts.
8296 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8297 * remote.c (remote_supports_btrace): Remove.
8298 (init_remote_ops): Remove remote_supports_btrace.
8299 * target-delegates.c: Regenerated.
8300 * target.c (target_supports_btrace): Remove.
8301 * target.h (target_ops) <to_supports_btrace>: Remove
8302 (target_supports_btrace): Remove.
8303 * x86-linux-nat.c (x86_linux_create_target): Remove
8304 linux_supports_btrace.
8306 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8308 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8310 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8311 exception and use message in own exception.
8313 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8315 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8316 (perf_event_pt_event_type): Use gdb_file_up.
8317 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8318 scoped_fd, and scoped_mmap.
8320 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8322 * common/scoped_mmap.h: New.
8323 * unittests/scoped_mmap-selftest.c: New.
8324 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8325 unittests/scoped_mmap-selftest.c.
8327 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8329 * common/scoped_fd.h: New.
8330 * unittests/scoped_fd-selftest.c: New.
8331 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8332 unittests/scoped_fd-selftest.c.
8334 2018-02-09 Tom Tromey <tom@tromey.com>
8336 * auto-load.c (auto_load_section_scripts): Use
8337 gdb::unique_xmalloc_ptr.
8339 2018-02-09 Tom Tromey <tom@tromey.com>
8341 * auto-load.c (execute_script_contents): Use std::string.
8343 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8345 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8346 Python function, rather than a new command.
8348 2018-02-08 Tom Tromey <tom@tromey.com>
8350 * solib.c (solib_find_1): Use std::string.
8351 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8353 2018-02-08 Tom Tromey <tom@tromey.com>
8355 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8357 2018-02-08 Tom Tromey <tom@tromey.com>
8359 * source.c (find_source_lines): Use gdb::def_vector.
8361 2018-02-08 Tom Tromey <tom@tromey.com>
8363 * macrocmd.c (struct temporary_macro_definition): New.
8364 (macro_define_command): Use temporary_macro_definition. Remove
8366 (free_macro_definition_ptr): Remove.
8368 2018-02-08 Tom Tromey <tom@tromey.com>
8370 * macroexp.c (maybe_expand): Use std::string.
8372 2018-02-08 Tom Tromey <tom@tromey.com>
8374 * macroexp.c (struct macro_buffer): Add initializers for some
8376 (init_buffer, init_shared_buffer, free_buffer)
8377 (free_buffer_return_text): Remove.
8378 (macro_buffer): New constructors.
8379 (~macro_buffer): New destructor.
8380 (macro_buffer::set_shared): New method.
8381 (macro_buffer::resize_buffer, macro_buffer::appendc)
8382 (macro_buffer::appendmem): Now methods, not free functions.
8383 (set_token, append_tokens_without_splicing, stringify)
8384 (macro_stringify): Update.
8385 (gather_arguments): Change return type. Remove argc_p argument,
8386 add args_ptr argument. Use std::vector.
8387 (substitute_args): Remove argc argument. Accept std::vector.
8388 (expand): Update. Use std::vector.
8389 (scan, macro_expand, macro_expand_next): Update.
8391 2018-02-08 Tom Tromey <tom@tromey.com>
8393 * symtab.c (default_collect_symbol_completion_matches_break_on):
8394 Use unique_xmalloc_ptr.
8395 * macroscope.h: (sal_macro_scope, user_macro_scope)
8396 (default_macro_scope): Return unique_xmalloc_ptr.
8397 * macroscope.c (sal_macro_scope, user_macro_scope)
8398 (default_macro_scope): Return unique_xmalloc_ptr.
8399 * macroexp.h (macro_expand, macro_expand_once): Return
8401 * macroexp.c (macro_expand, macro_expand_once): Return
8403 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8404 (info_macro_command, info_macros_command): Use
8406 * compile/compile-c-support.c (write_macro_definitions): Use
8408 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8410 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8412 * value.c (value_static_field): Assign field type instead of
8413 containing type when returning an optimized out value.
8415 2018-02-06 Yao Qi <yao.qi@linaro.org>
8417 * ft32-tdep.c (ft32_read_pc): Remove.
8418 (ft32_write_pc): Remove.
8419 (ft32_gdbarch_init): Update.
8420 * m32r-tdep.c (m32r_read_pc): Remove.
8421 (m32r_gdbarch_init): Update.
8422 * mep-tdep.c (mep_read_pc): Remove.
8423 (mep_gdbarch_init): Update.
8424 * microblaze-tdep.c (microblaze_write_pc): Remove.
8425 (microblaze_gdbarch_init): Update.
8426 * mn10300-tdep.c (mn10300_read_pc): Remove.
8427 (mn10300_write_pc): Remove.
8428 (mn10300_gdbarch_init): Update.
8429 * moxie-tdep.c (moxie_read_pc): Remove.
8430 (moxie_write_pc): Remove.
8431 (moxie_gdbarch_init): Update.
8433 2018-02-06 Yao Qi <yao.qi@linaro.org>
8435 * expprint.c (print_subexp_standard): Handle
8436 OP_F77_UNDETERMINED_ARGLIST.
8437 (dump_subexp_body_standard): Likewise.
8439 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8441 * target-descriptions.c (tdesc_element_visitor) Add empty
8443 (tdesc_type): Move make_gdb_type from here.
8444 (tdesc_type_builtin): Likewise.
8445 (tdesc_type_vector): Likewise.
8446 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8447 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8448 (make_gdb_type_union): Likewise.
8449 (make_gdb_type_flags): Likewise.
8450 (make_gdb_type_enum): Likewise.
8451 (make_gdb_type): New function.
8452 (tdesc_register_type): Use static make_gdb_type.
8454 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8456 * infcmd.c (default_print_one_register_info): Align natural-format
8457 column values consistently one under another.
8458 (pad_to_column): New function.
8460 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8462 * dwarf2read.c (dwarf2_physname): Move commment.
8464 2018-02-01 Leszek Swirski <leszeks@google.com>
8466 * varobj.c (varobj_formatted_print_options): Allow recursive
8467 pretty printing if pretty printing is enabled.
8469 2018-02-01 Leszek Swirski <leszeks@google.com>
8471 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8472 names after a structop as a filename.
8474 2018-02-01 Yao Qi <yao.qi@linaro.org>
8476 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8477 (arm_record_coproc_data_proc): Likewise.
8479 2018-02-01 Yao Qi <yao.qi@linaro.org>
8481 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8483 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8485 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8486 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8488 2018-01-31 Pedro Alves <palves@redhat.com>
8490 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8491 * inflow.c (child_terminal_save_inferior): Wrap reference to
8492 tcgetpgrp in HAVE_TERMIOS_H.
8493 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8495 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8496 always iterate over all inferiors.
8497 (gdbsim_cntrl_c): Adjust.
8498 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8500 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8502 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8503 index type is objfile-owned if the element type is as well.
8505 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8509 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8511 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8512 "features/s390x-linux64.c".
8513 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8514 s390_linux32 and s390x_linux64.
8515 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8517 * s390-tdep.c: Include "features/s390-linux32.c" and
8518 "features/s390x-linux64.c".
8519 (s390_tdesc_valid): Add check for tdesc_has_registers.
8520 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8521 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8522 tdesc_s390x_linux64.
8523 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8524 tdesc_s390x_linux64 to...
8525 * s390-tdep.h: ...here.
8527 2018-01-30 Pedro Alves <palves@redhat.com>
8530 * config.in, configure: Regenerate.
8531 * configure.ac: Check for getpgid.
8532 * go32-nat.c (go32_pass_ctrlc): New.
8533 (go32_target): Install it.
8534 * inf-child.c (inf_child_target): Install
8535 child_terminal_save_inferior, child_pass_ctrlc and
8537 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8538 (inf_ptrace_target): No longer install it.
8539 * infcmd.c (interrupt_target_1): Adjust.
8540 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8541 (child_interrupt): Declare.
8542 (inferior::terminal_state): New.
8543 * inflow.c (struct terminal_info): Update comments.
8544 (inferior_process_group): Delete.
8545 (terminal_is_ours): Delete.
8546 (gdb_tty_state): New.
8547 (child_terminal_init): Adjust.
8548 (is_gdb_terminal, sharing_input_terminal_1)
8549 (sharing_input_terminal): New functions.
8550 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8551 Set the process's actual process group in the foreground if
8552 possible. Handle is_ours_for_output/is_ours distinction. Don't
8553 mark terminal as the inferior's if not sharing GDB's terminal.
8554 Don't check attach_flag.
8555 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8556 pass down a target_terminal_state.
8557 (child_terminal_save_inferior): New, factored out from ...
8558 (child_terminal_ours_1): ... this. Handle
8559 target_terminal_state::is_ours_for_output.
8560 (child_interrupt, child_pass_ctrlc): New.
8561 (inflow_inferior_exit): Clear the inferior's terminal_state.
8562 (copy_terminal_info): Copy the inferior's terminal state.
8563 (_initialize_inflow): Remove reference to terminal_is_ours.
8564 * inflow.h (inferior_process_group): Delete.
8565 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8566 * procfs.c (procfs_target): Don't install procfs_interrupt.
8567 (procfs_interrupt): Delete.
8568 * remote.c (remote_serial_quit_handler): Adjust.
8569 (remote_interrupt): Remove ptid parameter. Adjust.
8570 * target-delegates.c: Regenerate.
8571 * target.c: Include "terminal.h".
8572 (target_terminal::terminal_state): Rename to ...
8573 (target_terminal::m_terminal_state): ... this.
8574 (target_terminal::init): Adjust.
8575 (target_terminal::inferior): Adjust to per-inferior
8577 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8578 (target_terminal::ours, target_terminal::ours_for_output): Use
8579 target_terminal_is_ours_kind.
8580 (target_interrupt): Remove ptid parameter. Adjust.
8581 (default_target_pass_ctrlc): Adjust.
8582 * target.h (target_ops::to_terminal_save_inferior): New field.
8583 (target_ops::to_interrupt): Remove ptid_t parameter.
8584 (target_interrupt): Remove ptid_t parameter. Update comment.
8585 (target_pass_ctrlc): Update comment.
8586 * target/target.h (target_terminal_state): New scoped enum,
8588 (target_terminal::terminal_state): ... here.
8589 (target_terminal::inferior): Update comments.
8590 (target_terminal::restore_inferior): New.
8591 (target_terminal::is_inferior, target_terminal::is_ours)
8592 (target_terminal::is_ours_for_output): Adjust.
8593 (target_terminal::scoped_restore_terminal_state): Adjust to
8594 rename, and call restore_inferior() instead of inferior().
8595 (target_terminal::scoped_restore_terminal_state::m_state): Change
8597 (target_terminal::terminal_state): Rename to ...
8598 (target_terminal::m_terminal_state): ... this and change type.
8600 2018-01-30 Pedro Alves <palves@redhat.com>
8602 * linux-nat.c (wait_for_signal): New function.
8603 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8605 (async_terminal_is_ours)
8606 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8607 (linux_nat_add_target): Don't override
8608 to_terminal_inferior/to_terminal_ours.
8610 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8612 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8614 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8616 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8617 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8618 dwarf2_per_objfile_free here.
8619 (dwarf2_per_objfile_free): Remove.
8620 (_initialize_dwarf2_read): Don't register
8621 dwarf2_per_objfile_free as a registry cleanup.
8623 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8625 Avoid compilation errors in MinGW native builds
8627 The error is triggered by including python-internal.h, and the
8630 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8631 from build-gnulib/import/math.h:27,
8632 from d:/usr/Python26/include/pyport.h:235,
8633 from d:/usr/Python26/include/Python.h:58,
8634 from python/python-internal.h:94,
8635 from python/py-arch.c:24:
8636 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8640 This happens because Python headers define 'hypot' to expand t
8641 '_hypot' in the Windows builds.
8642 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8643 'hypoth'. This avoids a compilation error.
8645 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8647 * MAINTAINERS (Write After Approval): Fix ordering.
8649 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8651 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8653 2018-01-26 Alan Modra <amodra@gmail.com>
8655 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8656 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8657 Remove nop. Make const. Comment.
8658 (powerpc32_plt_stub_so_2): New.
8659 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8660 Correct count. Update uses.
8661 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8662 Move common code reading PLT entry word. Correct
8663 powerpc32_plt_stub PLT address calculation.
8664 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8665 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8666 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8667 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8668 (ppc64_standard_linkage8): Likewise.
8669 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8670 Correct insns description.
8671 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8673 2018-01-24 Pedro Alves <palves@redhat.com>
8675 GCC PR libstdc++/83906
8676 * gdbtypes.c (operator==(const dynamic_prop &,
8677 const dynamic_prop &)): New.
8678 (operator==(const range_bounds &, const range_bounds &)): New.
8679 (check_types_equal): Use them instead of memcmp.
8680 * gdbtypes.h (operator==(const dynamic_prop &,
8681 const dynamic_prop &)): Declare.
8682 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8683 (operator==(const range_bounds &, const range_bounds &)): Declare.
8684 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8686 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8688 * s390-linux-tdep.c (s390_record_address_mask)
8689 (s390_record_calc_disp_common, s390_record_calc_disp)
8690 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8691 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8692 (s390_process_record): Move to s390-tdep.c.
8693 (s390_linux_init_abi_any): Adjust.
8694 * s390-tdep.c (s390_record_address_mask)
8695 (s390_record_calc_disp_common, s390_record_calc_disp)
8696 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8697 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8698 (s390_process_record): Moved from s390-linux-tdep.c
8699 (s390_gdbarch_init): Adjust.
8701 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8703 * s390-linux-nat.c (s390-tdep.h): New include.
8704 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8705 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8706 (ALLDEPFILES): Add s390-tdep.c.
8707 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8708 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8709 * s390-tdep.h: ...this. New file.
8710 * s390-linux-tdep.c (s390-tdep.h): New include.
8711 (_initialize_s390_tdep): Rename to...
8712 (_initialize_s390_linux_tdep): ...this and adjust.
8713 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8714 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8716 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8717 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8718 (s390_is_partial_instruction, s390_software_single_step)
8719 (is_non_branch_ril, s390_displaced_step_copy_insn)
8720 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8721 (s390_prologue_data, s390_addr, s390_store, s390_load)
8722 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8723 (s390_register_call_saved, s390_guess_tracepoint_registers)
8724 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8725 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8726 (s390_pseudo_register_name, s390_pseudo_register_type)
8727 (s390_pseudo_register_read, s390_pseudo_register_write)
8728 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8729 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8730 (s390_addr_bits_remove, s390_address_class_type_flags)
8731 (s390_address_class_type_flags_to_name)
8732 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8733 (s390_function_arg_float, s390_function_arg_vector)
8734 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8735 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8736 (s390_frame_align, s390_register_return_value, s390_return_value)
8737 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8738 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8739 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8740 (s390_trad_frame_prev_register, s390_unwind_cache)
8741 (s390_prologue_frame_unwind_cache)
8742 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8743 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8744 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8745 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8746 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8747 (s390_frame_base_address, s390_local_base_address)
8748 (s390_frame_base, s390_gcc_target_options)
8749 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8750 (s390_validate_reg_range, s390_tdesc_valid)
8751 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8752 * s390-tdep.c: ...this. New file.
8754 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8756 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8757 (s390_process_record, s390_gdbarch_tdep_alloc)
8758 (s390_linux_init_abi_any): Use/set new hook.
8760 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8762 * s390-linux-tdep.c (osabi.h): New include.
8763 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8764 (s390_linux_init_abi_any): New functions.
8765 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8767 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8769 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8770 tdesc_has_registers check
8772 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8774 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8775 (s390_validate_reg_range): New macro.
8776 (s390_gdbarch_init): Adjust.
8778 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8780 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8781 (s390_gdbarch_tdep_alloc): Adjust.
8782 (s390_gdbarch_init): Adjust.
8784 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8786 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8787 <have_tdb>: Change type to bool.
8788 (s390_gdbarch_tdep_alloc): Adjust.
8789 (s390_gdbarch_init): Adjust.
8791 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8793 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8794 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8795 (s390_gdbarch_tdep_alloc): New function.
8796 (s390_gdbarch_init): Allocate tdep at start and use its fields
8797 instead of separate variables.
8799 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8801 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8802 when looking for cached gdbarch and add comment for remaining.
8804 2018-01-22 Pedro Alves <palves@redhat.com>
8805 Sergio Durigan Junior <sergiodj@redhat.com>
8807 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8810 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8812 * MAINTAINERS: Update my company e-mail address.
8814 2018-01-22 Yao Qi <yao.qi@linaro.org>
8816 * regcache.c (cooked_write_test): New function.
8817 (_initialize_regcache): Register the test.
8819 2018-01-22 Yao Qi <yao.qi@linaro.org>
8821 * ia64-tdep.c (ia64_pseudo_register_read): Call
8822 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8823 * m32c-tdep.c (m32c_cat_read): Likewise.
8824 (m32c_r3r2r1r0_read): Likewise.
8825 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8826 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8828 2018-01-22 Yao Qi <yao.qi@linaro.org>
8830 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8831 method raw_read instead of regcache_raw_read.
8832 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8833 * arm-tdep.c (arm_neon_quad_read): Likewise.
8834 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8835 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8836 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8837 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8838 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8839 (i386_pseudo_register_read_into_value): Likewise.
8840 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8841 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8842 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8843 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8844 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8845 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8846 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8847 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8848 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8850 2018-01-22 Yao Qi <yao.qi@linaro.org>
8852 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8853 * configure.tgt: Remove target mt.
8854 * mt-tdep.c: Remove.
8855 * regcache.c (cooked_read_test): Remove the check for mt.
8857 2018-01-22 Yao Qi <yao.qi@linaro.org>
8859 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8860 instead of gdbarch_pseudo_register_read_value.
8862 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8864 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8867 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8869 * linespec.c (create_sals_line_offset): Remove code that preserved
8870 the symtab_and_line's line number.
8872 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8874 * varobj.c (varobj_create): Don't set valid_block when creating a
8877 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8879 * varobj.c (varobj_create): Remove out of date comment.
8881 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8884 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8885 updating innermost block.
8886 * parse.c (innermost_block_tracker::update): Take extra type
8887 parameter, and check types match before updating innermost block.
8888 (write_dollar_variable): Update innermost block for registers.
8889 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8890 (innermost_block_tracker::innermost_block_tracker): Initialise
8892 (innermost_block_tracker::reset): Take type parameter.
8893 (innermost_block_tracker::update): Take type parameter, and pass
8894 type through as needed.
8895 (innermost_block_tracker::m_types): New member.
8896 * varobj.c (varobj_create): Pass type when reseting innermost
8899 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8901 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8902 * ada-lang.c (resolve_subexp): Likewise.
8903 * breakpoint.c (set_breakpoint_condition) Likewise.
8904 (watch_command_1) Likewise.
8905 * c-exp.y (variable): Likewise.
8906 * d-exp.y (PrimaryExpression): Likewise.
8907 * f-exp.y (variable): Likewise.
8908 * go-exp.y (variable): Likewise.
8909 * m2-exp.y (variable): Likewise.
8910 * objfiles.c (objfile::~objfile): Likewise.
8911 * p-exp.y (variable): Likewise.
8912 * parse.c (innermost_block): Change type.
8913 * parser-defs.h (class innermost_block_tracker): New.
8914 (innermost_block): Change to innermost_block_tracker.
8915 * printcmd.c (display_command): Switch to innermost_block API.
8916 (do_one_display): Likewise.
8917 * rust-exp.y (do_one_display): Likewise.
8918 * symfile.c (clear_symtab_users): Likewise.
8919 * varobj.c (varobj_create): Switch to innermost_block API, replace
8920 use of innermost_block with block stored on varobj object.
8922 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8924 * expression.h (innermost_block): Remove declaration.
8925 * varobj.c: Add 'parser-defs.h' include.
8927 2018-01-19 Tom Tromey <tom@tromey.com>
8929 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8930 symbols in the static and global blocks.
8932 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8934 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8935 gdb_ptrace.h, and move including gdb_wait.h ...
8936 * nat/linux-ptrace.h: ... to here.
8938 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8940 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8941 inf_ptrace_detach_success.
8942 (inf_ptrace_detach_success): Add inferior parameter, use it
8943 instead of inferior_ptid, pass it to detach_inferior.
8944 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8946 * inferior.c (detach_inferior): Add overload that takes an
8948 * inferior.h (detach_inferior): Likewise.
8949 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8950 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8951 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8953 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8955 * target.h (struct target_ops) <to_detach>: Add inferior
8957 (target_detach): Likewise.
8958 * target.c (dispose_inferior): Pass inferior down.
8959 (target_detach): Pass inferior down. Assert that it is equal to
8960 the current inferior.
8961 * aix-thread.c (aix_thread_detach): Pass inferior down.
8962 * corefile.c (core_file_command): Pass current_inferior() down.
8963 * corelow.c (core_detach): Add inferior parameter.
8964 * darwin-nat.c (darwin_detach): Likewise.
8965 * gnu-nat.c (gnu_detach): Likewise.
8966 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8967 * infcmd.c (detach_command): Pass current_inferior() down to
8969 * infrun.c (follow_fork_inferior): Pass parent_inf to
8971 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8973 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8974 * linux-thread-db.c (thread_db_detach): Likewise.
8975 * nto-procfs.c (procfs_detach): Likewise.
8976 * procfs.c (procfs_detach): Likewise.
8977 * record.c (record_detach): Likewise.
8978 * record.h (struct inferior): Forward-declare.
8979 (record_detach): Add inferior parameter.
8980 * remote-sim.c (gdbsim_detach): Likewise.
8981 * remote.c (remote_detach_1): Likewise.
8982 (remote_detach): Likewise.
8983 (extended_remote_detach): Likewise.
8984 * sol-thread.c (sol_thread_detach): Likewise.
8985 * target-debug.h (target_debug_print_inferior_p): New macro.
8986 * target-delegates.c: Re-generate.
8987 * top.c (kill_or_detach): Pass inferior down to target_detach.
8988 * windows-nat.c (windows_detach): Add inferior parameter.
8990 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8992 * target.h (struct target_ops) <to_detach>: Remove args
8994 (target_detach): Likewise.
8995 * target.c (dispose_inferior): Adjust.
8996 (target_detach): Remove args parameter, adjust.
8997 * aix-thread.c (aix_thread_detach): Adjust.
8998 * corefile.c (core_file_command): Adjust.
8999 * corelow.c (core_detach): Adjust.
9000 * darwin-nat.c (darwin_detach): Adjust.
9001 * gnu-nat.c (gnu_detach): Adjust.
9002 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9003 * infcmd.c (detach_command): Adjust
9004 * infrun.c (follow_fork_inferior): Adjust.
9005 (handle_vfork_child_exec_or_exit): Adjust.
9006 * linux-fork.c (linux_fork_detach): Remove args parameter.
9007 * linux-fork.h (linux_fork_detach): Likewise.
9008 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9009 * linux-thread-db.c (thread_db_detach): Likewise.
9010 * nto-procfs.c (procfs_detach): Likewise.
9011 * procfs.c (procfs_detach): Likewise.
9012 (do_detach): Remove signo parameter.
9013 * record.c (record_detach): Remove args parameter.
9014 * record.h (record_detach): Likewise.
9015 * remote-sim.c (gdbsim_detach): Likewise.
9016 * remote.c (remote_detach_1): Likewise.
9017 (remote_detach): Likewise.
9018 (extended_remote_detach): Likewise.
9019 * sol-thread.c (sol_thread_detach): Likewise.
9020 * target-delegates.c: Re-generate.
9021 * top.c (struct qt_args) <args>: Remove field.
9022 (kill_or_detach): Don't pass args.
9023 (quit_force): Don't set args.
9024 * windows-nat.c (windows_detach): Remove args parameter.
9026 2018-01-19 Yao Qi <yao.qi@linaro.org>
9028 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9029 (arm_linux_init_abi): Install it.
9031 2018-01-19 Yao Qi <yao.qi@linaro.org>
9033 * osabi.c (gdb_osabi_names): Extend the regexp for
9034 arm-linux-gnueabihf.
9036 2018-01-18 Yao Qi <yao.qi@linaro.org>
9038 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9040 (abbrev_table::add_abbrev): Update.
9041 (abbrev_table::lookup_abbrev): Update.
9043 2018-01-18 Yao Qi <yao.qi@linaro.org>
9045 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9047 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9049 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9052 2018-01-17 Tom Tromey <tom@tromey.com>
9054 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9056 2018-01-17 Tom Tromey <tom@tromey.com>
9058 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9059 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9060 (create_array_type_with_stride): Update.
9061 * dwarf2read.c (set_die_type): Update.
9063 2018-01-17 Tom Tromey <tom@tromey.com>
9065 * dwarf2read.c (delayed_method_info): Remove typedef.
9066 (dwarf2_cu::method_info): Now a std::vector.
9067 (add_to_method_list): Update.
9068 (free_delayed_list): Remove.
9069 (compute_delayed_physnames): Update.
9070 (process_full_comp_unit, process_full_type_unit): Clear the method
9071 list. Remove cleanups.
9072 (psymtab_include_file_name): Add name_holder parameter. Use
9074 (dwarf_decode_lines): Update.
9076 2018-01-17 Tom Tromey <tom@tromey.com>
9077 Simon Marchi <simon.marchi@ericsson.com>
9079 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9080 (dwarf2_per_objfile::free_cached_comp_units)
9081 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9082 (init_cutu_and_read_dies_no_follow): Update.
9083 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9084 (dwarf2_cu::~dwarf2_cu): New.
9085 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9086 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9088 2018-01-17 Tom Tromey <tom@tromey.com>
9089 Simon Marchi <simon.marchi@ericsson.com>
9091 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9092 (struct die_reader_specs) <abbrev_table>: New member.
9093 (struct abbrev_table): Add constructor.
9094 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9095 <abbrev_obstack>: Now an auto_obstack.
9096 (abbrev_table_up): New typedef.
9097 (init_cu_die_reader): Add abbrev_table parameter.
9098 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9099 Add result_dwo_abbrev_table.
9100 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9101 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9103 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9105 (skip_children): Update.
9106 (abbrev_table::alloc_abbrev): Rename from
9107 abbrev_table_alloc_abbrev.
9108 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9109 (abbrev_table::lookup_abbrev): Rename from
9110 abbrev_table_lookup_abbrev.
9111 (abbrev_table_read_table): Return abbrev_table_up.
9112 (abbrev_table_free, abbrev_table_free_cleanup)
9113 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9114 (load_partial_dies): Update.
9116 2018-01-17 Tom Tromey <tom@tromey.com>
9118 * dwarf2read.c (dwarf2_compute_name): Update comment.
9119 (read_func_scope, read_variable): Update.
9120 (new_symbol): Remove.
9121 (new_symbol_full): Rename to new_symbol.
9123 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9126 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9127 a warning instead of throwing an error, set section size to 0 and return
9129 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9131 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9133 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9135 (linux_ptrace_attach_fail_reason_string): Likewise.
9136 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9138 (linux_ptrace_attach_fail_reason_string): Likewise.
9139 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9141 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9143 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9145 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9148 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9149 checking for fs_base/gs_base fields in struct user_regs_struct.
9150 * configure: Regenerate.
9152 2018-01-17 Yao Qi <yao.qi@linaro.org>
9154 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9156 (aarch64_linux_init_abi): Install it to gdbarch hook
9159 2018-01-15 Pedro Alves <palves@redhat.com>
9161 * common/signals-state-save-restore.c
9162 (save_original_signals_state): Fix typos.
9164 2017-01-12 Tom Tromey <tom@tromey.com>
9165 Sergio Durigan Junior <sergiodj@redhat.com>
9167 * Makefile.in (install-only): Install gdb-add-index.
9169 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9171 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9173 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9175 * infrun.c (keep_going_pass_signal): Clear step-over info when
9176 insert_breakpoints fails.
9178 2018-01-11 Pedro Alves <palves@redhat.com>
9181 * infrun.c (resume): Rename to ...
9182 (resume_1): ... this.
9183 (resume): Reimplement as wrapper around resume_1.
9185 2018-01-11 Pedro Alves <palves@redhat.com>
9188 * remote.c (remote_parse_stop_reply): Default to the last-set
9189 general thread instead of to 'magic_null_ptid'.
9191 2018-01-10 Pedro Alves <palves@redhat.com>
9193 * language.h (language_get_symbol_name_matcher): Rename ...
9194 (get_symbol_name_matcher): ... this.
9195 * language.c (language_get_symbol_name_matcher): Ditto.
9196 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9199 2018-01-10 Pedro Alves <palves@redhat.com>
9203 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9204 Adjust to use language_get_symbol_name_matcher instead of
9205 language_defn::la_get_symbol_name_matcher.
9206 * language.c (language_get_symbol_name_matcher): If in Ada mode
9207 and the lookup name is a verbatim match, return Ada's matcher.
9208 * language.h (language_get_symbol_name_matcher): Adjust comment.
9209 (ada_lookup_name_info::verbatim_p):: New method.
9211 2018-01-10 Pedro Alves <palves@redhat.com>
9214 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9215 minsym's language is language_auto or language_cplus, pass down
9216 language_ada instead.
9217 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9219 2018-01-10 Pedro Alves <palves@redhat.com>
9222 * minsyms.c (linkage_name_str): New function.
9223 (iterate_over_minimal_symbols): Use it.
9225 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9227 * NEWS: Document that 'info proc' now works on FreeBSD.
9229 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9231 * configure.ac: Check for kinfo_getfile in libutil.
9232 * configure: Regenerate.
9233 * config.in: Regenerate.
9234 * fbsd-nat.c: Include "fbsd-tdep.h".
9235 (fbsd_fetch_cmdline): New.
9236 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9237 rather than calling error.
9238 (fbsd_info_proc): New.
9239 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9240 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9241 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9243 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9245 * fbsd-nat.c (struct free_deleter): Remove.
9246 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9248 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9250 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9251 NULL for an empty pathname.
9253 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9255 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9256 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9257 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9258 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9259 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9260 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9261 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9262 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9263 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9264 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9265 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9266 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9267 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9268 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9269 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9271 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9273 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9274 (gnu_xfer_auxv): New function.
9275 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9278 2018-01-08 Yao Qi <yao.qi@linaro.org>
9279 Simon Marchi <simon.marchi@ericsson.com>
9281 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9283 (COMMON_OBS): Remove selftest.o.
9284 * configure.ac: Append selftest-arch.c and common/selftest.c to
9285 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9286 * configure: Re-generated.
9287 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9289 (maintenance_info_selftests): Likewise.
9291 2018-01-08 Xavier Roirand <roirand@adacore.com>
9293 * ada-valprint.c (val_print_packed_array_elements): Use
9294 proper number of elements when printing an array indexed
9295 by an enumeration type.
9297 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9299 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9300 (dw2_get_file_names_reader): Adjust.
9301 (lookup_dwo_signatured_type): Adjust.
9302 (lookup_dwp_signatured_type): Adjust.
9303 (lookup_signatured_type): Adjust.
9304 (create_type_unit_group): Adjust.
9305 (get_type_unit_group): Adjust.
9306 (process_psymtab_comp_unit_reader): Adjust.
9307 (build_type_psymtabs_reader): Adjust.
9308 (scan_partial_symbols): Adjust.
9309 (add_partial_symbol): Adjust.
9310 (add_partial_subprogram): Adjust.
9311 (peek_die_abbrev): Adjust.
9312 (fixup_go_packaging): Adjust.
9313 (process_imported_unit_die): Adjust.
9314 (dwarf2_compute_name): Adjust.
9315 (dwarf2_physname): Adjust.
9316 (read_import_statement): Adjust.
9317 (handle_DW_AT_stmt_list): Adjust.
9318 (read_file_scope): Adjust.
9319 (read_func_scope): Adjust.
9320 (read_lexical_block_scope): Adjust.
9321 (read_call_site_scope): Adjust.
9322 (read_variable): Adjust.
9323 (dwarf2_rnglists_process): Adjust.
9324 (dwarf2_ranges_process): Adjust.
9325 (dwarf2_ranges_read): Adjust.
9326 (dwarf2_get_pc_bounds): Adjust.
9327 (dwarf2_record_block_ranges): Adjust.
9328 (dwarf2_add_field): Adjust.
9329 (dwarf2_add_member_fn): Adjust.
9330 (read_structure_type): Adjust.
9331 (process_structure_scope): Adjust.
9332 (read_enumeration_type): Adjust.
9333 (read_array_type): Adjust.
9334 (mark_common_block_symbol_computed): Adjust.
9335 (read_common_block): Adjust.
9336 (read_namespace_type): Adjust.
9337 (read_namespace): Adjust.
9338 (read_module_type): Adjust.
9339 (read_tag_pointer_type): Adjust.
9340 (read_tag_ptr_to_member_type): Adjust.
9341 (read_tag_string_type): Adjust.
9342 (read_subroutine_type): Adjust.
9343 (read_typedef): Adjust.
9344 (read_base_type): Adjust.
9345 (attr_to_dynamic_prop): Adjust.
9346 (read_subrange_type): Adjust.
9347 (read_unspecified_type): Adjust.
9348 (dwarf2_read_abbrevs): Adjust.
9349 (load_partial_dies): Adjust.
9350 (read_partial_die): Adjust.
9351 (find_partial_die): Adjust.
9352 (guess_partial_die_structure_name): Adjust.
9353 (fixup_partial_die): Adjust.
9354 (read_attribute_value): Adjust.
9355 (read_addr_index): Adjust.
9356 (read_addr_index_from_leb128): Adjust.
9357 (read_str_index): Adjust.
9358 (dwarf2_string_attr): Adjust.
9359 (get_debug_line_section): Adjust.
9360 (dwarf_decode_line_header): Adjust.
9361 (lnp_state_machine::check_line_address): Adjust.
9362 (dwarf_decode_lines_1): Adjust.
9363 (dwarf_decode_lines): Adjust.
9364 (dwarf2_start_symtab): Adjust.
9365 (var_decode_location): Adjust.
9366 (new_symbol_full): Adjust.
9367 (dwarf2_const_value_data): Adjust.
9368 (dwarf2_const_value_attr): Adjust.
9369 (dwarf2_const_value): Adjust.
9371 (die_containing_type): Adjust.
9372 (build_error_marker_type): Adjust.
9373 (lookup_die_type): Adjust.
9374 (guess_full_die_structure_name): Adjust.
9375 (anonymous_struct_prefix): Adjust.
9376 (determine_prefix): Adjust.
9377 (dwarf2_name): Adjust.
9378 (follow_die_ref_or_sig): Adjust.
9379 (follow_die_offset): Adjust.
9380 (follow_die_ref): Adjust.
9381 (follow_die_sig_1): Adjust.
9382 (follow_die_sig): Adjust.
9383 (get_signatured_type): Adjust.
9384 (get_DW_AT_signature_type): Adjust.
9385 (decode_locdesc): Adjust.
9386 (dwarf_decode_macros): Adjust.
9387 (cu_debug_loc_section): Adjust.
9388 (fill_in_loclist_baton): Adjust.
9389 (dwarf2_symbol_mark_computed): Adjust.
9390 (init_one_comp_unit): Don't assign
9391 dwarf2_cu::dwarf2_per_objfile.
9392 (set_die_type): Adjust.
9394 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9396 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9397 <dwarf2_per_objfile>: New field.
9398 (dwarf2_per_objfile): Remove global.
9399 (get_dwarf2_per_objfile): New function.
9400 (set_dwarf2_per_objfile): New function.
9401 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9403 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9404 (read_abbrev_offset): Likewise.
9405 (read_indirect_string): Likewise.
9406 (read_indirect_line_string): Likewise.
9407 (read_indirect_string_at_offset): Likewise.
9408 (read_indirect_string_from_dwz): Likewise.
9409 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9411 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9412 (create_all_comp_units): Change objfile parameter to
9414 (create_all_type_units): Likewise.
9415 (process_queue): Add dwarf2_per_objfile parameter.
9416 (read_and_check_comp_unit_head): Likewise.
9417 (lookup_dwo_unit_in_dwp): Likewise.
9418 (get_dwp_file): Likewise.
9419 (process_cu_includes): Likewise.
9420 (struct free_dwo_file_cleanup_data): New struct.
9421 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9422 set_dwarf2_per_objfile.
9423 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9424 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9425 context, adjust calls.
9426 (dw2_instantiate_symtab): Likewise.
9427 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9428 (dw2_get_cu): Likewise.
9429 (create_cu_from_index_list): Change objfile parameter to
9431 (create_cus_from_index_list): Get dwarf2_per_objfile from
9432 context, adjust calls.
9433 (create_cus_from_index): Likewise.
9434 (create_signatured_type_table_from_index): Change objfile
9435 parameter to dwarf2_per_objfile.
9436 (create_signatured_type_table_from_debug_names): Change objfile
9437 parameter to dwarf2_per_objfile.
9438 (create_addrmap_from_index): Likewise.
9439 (create_addrmap_from_aranges): Likewise.
9440 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9441 (dw2_setup): Remove.
9442 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9444 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9445 get_dwarf2_per_objfile.
9446 (dw2_forget_cached_source_info): Likewise.
9447 (dw2_map_symtabs_matching_filename): Likewise.
9448 (struct dw2_symtab_iterator) <index>: Remove.
9449 <dwarf2_per_objfile>: New field.
9450 (dw2_symtab_iter_init): Replace index parameter with
9452 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9453 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9454 (dw2_print_stats): Likewise.
9455 (dw2_dump): Likewise.
9456 (dw2_expand_symtabs_for_function): Likewise.
9457 (dw2_expand_all_symtabs): Likewise.
9458 (dw2_expand_symtabs_with_fullname): Likewise.
9459 (dw2_expand_marked_cus): Replace index and objfile parameters
9460 with dwarf2_per_objfile.
9461 (dw_expand_symtabs_matching_file_matcher): Add
9462 dwarf2_per_objfile parameter and adjust calls.
9463 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9465 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9466 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9468 (create_cus_from_debug_names_list): Replace objfile parameter
9469 with dwarf2_per_objfile and adjust calls.
9470 (create_cus_from_debug_names): Likewise.
9471 (dwarf2_read_debug_names): Likewise.
9472 (mapped_debug_names::namei_to_name): Adjust call.
9473 (dw2_debug_names_iterator::next): Likewise.
9474 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9475 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9476 (dw2_debug_names_dump): Likewise.
9477 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9478 (dw2_debug_names_expand_symtabs_matching): Likewise.
9479 (dwarf2_initialize_objfile): Likewise.
9480 (dwarf2_build_psymtabs): Likewise.
9481 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9483 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9484 (read_and_check_comp_unit_head): Likewise.
9485 (read_abbrev_offset): Likewise.
9486 (create_debug_type_hash_table): Likewise.
9487 (create_debug_types_hash_table): Likewise.
9488 (create_all_type_units): Replace objfile parameter with
9490 (add_type_unit): Add dwarf2_per_objfile parameter.
9491 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9492 with dwarf2_per_objfile.
9493 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9494 (lookup_dwp_signatured_type): Likewise.
9495 (lookup_signatured_type): Likewise.
9496 (read_cutu_die_from_dwo): Likewise.
9497 (init_tu_and_read_dwo_dies): Likewise.
9498 (init_cutu_and_read_dies): Likewise.
9499 (init_cutu_and_read_dies_no_follow): Likewise.
9500 (allocate_type_unit_groups_table): Add objfile parameter.
9501 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9502 (get_type_unit_group): Likewise.
9503 (process_psymtab_comp_unit): Update call.
9504 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9505 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9506 (print_tu_stats): Likewise.
9507 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9509 (build_type_psymtabs): Change objfile parameter to
9511 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9512 passed in void* parameter.
9513 (process_skeletonless_type_units): Change objfile parameter to
9515 (set_partial_user): Likewise.
9516 (dwarf2_build_psymtabs_hard): Likewise.
9517 (read_comp_units_from_section): Likewise.
9518 (create_all_comp_units): Likewise.
9519 (scan_partial_symbols): Update calls.
9520 (add_partial_symbol): Likewise.
9521 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9522 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9523 (process_queue): Add dwarf2_per_objfile parameter.
9524 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9525 (compute_compunit_symtab_includes): Likewise.
9526 (process_cu_includes): Add dwarf2_per_objfile parameter.
9527 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9528 (process_full_type_unit): Likewise.
9529 (process_imported_unit_die): Update call.
9530 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9531 (read_file_scope): Likewise.
9532 (allocate_dwo_file_hash_table): Add objfile parameter.
9533 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9534 (create_cus_hash_table): Likewise.
9535 (create_dwp_hash_table): Likewise.
9536 (create_dwo_unit_in_dwp_v1): Likewise.
9537 (create_dwp_v2_section): Likewise.
9538 (create_dwo_unit_in_dwp_v2): Likewise.
9539 (lookup_dwo_unit_in_dwp): Likewise.
9540 (try_open_dwop_file): Likewise.
9541 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9542 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9543 cleanup to include a reference to dwarf2_per_objfile.
9544 (open_dwp_file): Add dwarf2_per_objfile parameter.
9545 (open_and_init_dwp_file): Likewise.
9546 (get_dwp_file): Likewise.
9547 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9548 (queue_and_load_all_dwo_tus): Update call.
9549 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9551 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9552 (dwarf2_ranges_process): Likewise.
9553 (dwarf2_get_pc_bounds): Likewise.
9554 (mark_common_block_symbol_computed): Likewise.
9555 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9556 (dwarf2_read_abbrevs): Update call.
9557 (read_partial_die): Use dwarf2_per_objfile from cu.
9558 (find_partial_die): Likewise.
9559 (fixup_partial_die): Likewise.
9560 (read_attribute_value): Likewise.
9561 (read_indirect_string_at_offset_from): Add objfile parameter.
9562 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9564 (read_indirect_string_from_dwz): Add objfile parameter.
9565 (read_indirect_string): Add objfile parameter.
9566 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9567 (read_addr_index): Use dwarf2_per_objfile from cu.
9568 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9570 (read_str_index): Use dwarf2_per_objfile from cu.
9571 (get_debug_line_section): Likewise.
9572 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9573 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9574 (new_symbol_full): Use dwarf2_per_objfile from cu.
9575 (build_error_marker_type): Likewise.
9576 (lookup_die_type): Likewise.
9577 (determine_prefix): Likewise.
9578 (follow_die_offset): Likewise.
9579 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9580 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9581 (dwarf2_fetch_die_type_sect_off): Likewise.
9582 (dwarf2_get_die_type): Likewise.
9583 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9584 (get_signatured_type): Likewise.
9585 (get_DW_AT_signature_type): Likewise.
9586 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9587 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9588 (cu_debug_loc_section): Likewise.
9589 (fill_in_loclist_baton): Likewise.
9590 (dwarf2_symbol_mark_computed): Likewise.
9591 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9593 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9595 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9596 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9597 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9598 (set_die_type): Use dwarf2_free_objfile from cu.
9599 (get_die_type_at_offset): Likewise.
9600 (dwarf2_per_objfile_free): Don't assign global variable.
9601 (debug_names) <constructor>: Add dwarf2_per_objfile
9602 parameter, update m_debugstrlookup construction.
9603 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9605 <m_dwarf2_per_objfile>: New field.
9606 <lookup>: Use m_dwarf2_per_objfile.
9607 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9608 (psyms_seen_size): Likewise.
9609 (write_gdbindex): Replace objfile parameter with
9611 (write_debug_names): Likewise.
9612 (write_psymtabs_to_index): Likewise.
9613 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9616 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9618 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9619 <dwarf2_per_objfile>: New field.
9620 (struct dwarf2_per_cu_data) <objfile>: Remove.
9621 <dwarf2_per_objfile>: New field.
9622 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9624 (create_signatured_type_table_from_index): Likewise.
9625 (create_debug_type_hash_table): Likewise.
9626 (fill_in_sig_entry_from_dwo_entry): Likewise.
9627 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9628 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9630 (create_partial_symtab): Access objfile through
9632 (process_psymtab_comp_unit_reader): Likewise.
9633 (read_comp_units_from_section): Likewise.
9634 (scan_partial_symbols): Likewise.
9635 (add_partial_symbol): Likewise.
9636 (add_partial_subprogram): Likewise.
9637 (peek_die_abbrev): Likewise.
9638 (fixup_go_packaging): Likewise.
9639 (process_full_comp_unit): Likewise.
9640 (process_full_type_unit): Likewise.
9641 (process_imported_unit_die): Likewise.
9642 (dwarf2_compute_name): Likewise.
9643 (dwarf2_physname): Likewise.
9644 (read_import_statement): Likewise.
9645 (create_cus_hash_table): Assign dwarf2_physname instead of
9647 (read_func_scope): Access objfile through dwarf2_per_objfile.
9648 (read_lexical_block_scope): Likewise.
9649 (read_call_site_scope): Likewise.
9650 (read_variable): Likewise.
9651 (dwarf2_rnglists_process): Likewise.
9652 (dwarf2_ranges_process): Likewise.
9653 (dwarf2_ranges_read): Likewise.
9654 (dwarf2_record_block_ranges): Likewise.
9655 (dwarf2_add_field): Likewise.
9656 (dwarf2_add_member_fn): Likewise.
9657 (read_structure_type): Likewise.
9658 (process_structure_scope): Likewise.
9659 (read_enumeration_type): Likewise.
9660 (read_array_type): Likewise.
9661 (read_common_block): Likewise.
9662 (read_namespace_type): Likewise.
9663 (read_namespace): Likewise.
9664 (read_module_type): Likewise.
9665 (read_tag_pointer_type): Likewise.
9666 (read_tag_ptr_to_member_type): Likewise.
9667 (read_tag_string_type): Likewise.
9668 (read_subroutine_type): Likewise.
9669 (read_typedef): Likewise.
9670 (read_base_type): Likewise.
9671 (attr_to_dynamic_prop): Likewise.
9672 (read_subrange_type): Likewise.
9673 (read_unspecified_type): Likewise.
9674 (load_partial_dies): Likewise.
9675 (read_partial_die): Likewise.
9676 (find_partial_die): Likewise.
9677 (guess_partial_die_structure_name): Likewise.
9678 (fixup_partial_die): Likewise.
9679 (read_attribute_value): Likewise.
9680 (read_addr_index_from_leb128): Likewise.
9681 (dwarf2_read_addr_index): Likewise.
9682 (dwarf2_string_attr): Likewise.
9683 (lnp_state_machine::check_line_address): Likewise.
9684 (dwarf_decode_lines_1): Likewise.
9685 (dwarf_decode_lines): Likewise.
9686 (dwarf2_start_symtab): Likewise.
9687 (var_decode_location): Likewise.
9688 (new_symbol_full): Likewise.
9689 (dwarf2_const_value_data): Likewise.
9690 (dwarf2_const_value_attr): Likewise.
9691 (dwarf2_const_value): Likewise.
9692 (die_type): Likewise.
9693 (die_containing_type): Likewise.
9694 (lookup_die_type): Likewise.
9695 (guess_full_die_structure_name): Likewise.
9696 (anonymous_struct_prefix): Likewise.
9697 (dwarf2_name): Likewise.
9698 (follow_die_ref_or_sig): Likewise.
9699 (follow_die_offset): Likewise.
9700 (follow_die_ref): Likewise.
9701 (dwarf2_fetch_die_loc_sect_off): Likewise.
9702 (dwarf2_fetch_constant_bytes): Likewise.
9703 (dwarf2_fetch_die_type_sect_off): Likewise.
9704 (dwarf2_get_die_type): Likewise.
9705 (follow_die_sig): Likewise.
9706 (decode_locdesc): Likewise.
9707 (dwarf2_per_cu_objfile): Likewise.
9708 (dwarf2_per_cu_text_offset): Likewise.
9709 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9711 (set_die_type): Access objfile through
9714 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9716 * valprint.c (converted_character_d): Remove typedef.
9717 (DEF_VEC_O (converted_character_d)): Remove.
9718 (count_next_character): Use std::vector.
9719 (print_converted_chars_to_obstack): Likewise.
9720 (generic_printstr): Likewise.
9722 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9724 * xml-support.h (struct gdb_xml_value): Add constructor.
9725 <value>: Change type to unique_xmalloc_ptr.
9726 (gdb_xml_value_s): Remove typedef.
9727 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9728 (gdb_xml_element_start_handler): Change parameter type to
9730 (xml_find_attribute): Likewise.
9731 * xml-support.c (xml_find_attribute): Change parameter type to
9732 std::vector and adjust.
9733 (gdb_xml_values_cleanup): Remove.
9734 (gdb_xml_parser::start_element): Adjust to std::vector.
9735 (xinclude_start_include): Change paraeter type to std::vector
9737 * btrace.c (check_xml_btrace_version): Likewise.
9738 (parse_xml_btrace_block): Likewise.
9739 (parse_xml_btrace_pt_config_cpu): Likewise.
9740 (parse_xml_btrace_pt): Likewise.
9741 (parse_xml_btrace_conf_bts): Likewise.
9742 (parse_xml_btrace_conf_pt): Likewise.
9743 * memory-map.c (memory_map_start_memory): Likewise.
9744 (memory_map_start_property): Likewise.
9745 * osdata.c (osdata_start_osdata): Likewise.
9746 (osdata_start_item): Likewise.
9747 (osdata_start_column): Likewise.
9748 * remote.c (start_thread): Likewise.
9749 * solib-aix.c (library_list_start_library): Likewise.
9750 (library_list_start_list): Likewise.
9751 * solib-svr4.c (library_list_start_library): Likewise.
9752 (svr4_library_list_start_list): Likewise.
9753 * solib-target.c (library_list_start_segment): Likewise.
9754 (library_list_start_section): Likewise.
9755 (library_list_start_library): Likewise.
9756 (library_list_start_list): Likewise.
9757 * tracepoint.c (traceframe_info_start_memory): Likewise.
9758 (traceframe_info_start_tvar): Likewise.
9759 * xml-syscall.c (syscall_start_syscall): Likewise.
9760 * xml-tdesc.c (tdesc_start_target): Likewise.
9761 (tdesc_start_feature): Likewise.
9762 (tdesc_start_reg): Likewise.
9763 (tdesc_start_union): Likewise.
9764 (tdesc_start_struct): Likewise.
9765 (tdesc_start_flags): Likewise.
9766 (tdesc_start_enum): Likewise.
9767 (tdesc_start_field): Likewise.
9768 (tdesc_start_enum_value): Likewise.
9769 (tdesc_start_vector): Likewise.
9771 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9773 * extension.h (struct xmethod_worker) <clone>: Remove.
9774 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9776 (python_xmethod_worker::clone): Remove.
9777 * valops.c (find_overload_match): Use std::move instead of
9780 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9782 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9783 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9784 <free_xmethod_worker_data>: Remove.
9785 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9786 <get_xmethod_arg_types>: Remove.
9787 <get_xmethod_result_type>: Remove.
9788 <invoke_xmethod>: Remove.
9789 * extension.c (new_xmethod_worker): Remove.
9790 (clone_xmethod_worker): Remove.
9791 (get_matching_xmethod_workers): Return void, pass std::vector by
9793 (get_xmethod_arg_types): Rename to...
9794 (xmethod_worker::get_arg_types): ... this, and adjust.
9795 (get_xmethod_result_type): Rename to...
9796 (xmethod_worker::get_result_type): ... this, and adjust.
9797 (invoke_xmethod): Remove.
9798 (free_xmethod_worker): Remove.
9799 (free_xmethod_worker_vec): Remove.
9800 * extension.h (enum ext_lang_rc): Move here from
9802 (struct xmethod_worker): Add constructor and destructor.
9805 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9806 virtual pure methods.
9807 <get_arg_types, get_result_type>: New methods.
9808 (xmethod_worker_ptr): Remove typedef.
9809 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9810 (xmethod_worker_vec): Remove typedef.
9811 (xmethod_worker_up): New typedef.
9812 (invoke_xmethod): Remove.
9813 (clone_xmethod_worker): Remove.
9814 (free_xmethod_worker): Remove.
9815 (free_xmethod_worker_vec): Remove.
9816 (get_xmethod_arg_types): Remove.
9817 (get_xmethod_result_type): Remove.
9818 * valops.c (find_method_list): Use std::vector, don't use
9819 intermediate vector.
9820 (value_find_oload_method_list): Use std::vector.
9821 (find_overload_match): Use std::vector.
9822 (find_oload_champ): Use std::vector.
9823 * value.c (value_free): Use operator delete.
9824 (value_of_xmethod): Rename to...
9825 (value_from_xmethod): ... this. Don't assign
9826 xmethod_worker::value, take rvalue-reference.
9827 (result_type_of_xmethod): Adjust.
9828 (call_xmethod): Adjust.
9829 * value.h: Include extension.h.
9830 (struct xmethod_worker): Don't forward-declare.
9831 (value_of_xmethod): Rename to...
9832 (value_from_xmethod): ... this, take rvalue-reference.
9833 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9834 (struct python_xmethod_worker): ... this, add constructor and
9836 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9837 (gdbpy_free_xmethod_worker_data): Rename to...
9838 (python_xmethod_worker::~python_xmethod_worker): ... this and
9840 (gdbpy_clone_xmethod_worker_data): Rename to...
9841 (python_xmethod_worker::clone): ... this and adjust.
9842 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9844 (gdbpy_get_xmethod_arg_types): Rename to...
9845 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9846 (gdbpy_get_xmethod_result_type): Rename to...
9847 (python_xmethod_worker::do_get_result_type): ... this and
9849 (gdbpy_invoke_xmethod): Rename to...
9850 (python_xmethod_worker::invoke): ... this and adjust.
9851 (new_python_xmethod_worker): Rename to...
9852 (python_xmethod_worker::python_xmethod_worker): ... this and
9854 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9856 (gdbpy_free_xmethod_worker_data): Remove.
9857 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9858 (gdbpy_get_xmethod_arg_types): Remove.
9859 (gdbpy_get_xmethod_result_type): Remove.
9860 (gdbpy_invoke_xmethod): Remove.
9861 * python/python.c (python_extension_ops): Remove obsolete
9864 2018-01-05 Pedro Alves <palves@redhat.com>
9867 * common/signals-state-save-restore.c
9868 (save_original_signals_state): New parameter 'quiet'. Warn if we
9869 find a custom handler preinstalled, instead of internal erroring.
9870 But only warn if !quiet.
9871 * common/signals-state-save-restore.h
9872 (save_original_signals_state): New parameter 'quiet'.
9873 * main.c (captured_main_1): Move save_original_signals_state call
9874 after option handling, and pass QUIET.
9876 2018-01-05 Pedro Alves <palves@redhat.com>
9878 * spu-tdep.c (spu_catch_start): Pass
9879 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9881 2018-01-05 Pedro Alves <palves@redhat.com>
9884 * ada-lang.c (literal_symbol_name_matcher): New function.
9885 (ada_get_symbol_name_matcher): Use it for
9886 symbol_name_match_type::SEARCH_NAME.
9887 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9888 it down instead of assuming symbol_name_match_type::FULL.
9889 * block.h (block_lookup_symbol): New parameter 'match_type'.
9890 * c-valprint.c (print_unpacked_pointer): Use
9891 lookup_symbol_search_name instead of lookup_symbol.
9892 * compile/compile-object-load.c (get_out_value_type): Pass down
9893 symbol_name_match_type::SEARCH_NAME.
9894 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9895 symbol_name_match_type::FULL.
9896 * cp-support.c (cp_get_symbol_name_matcher): Handle
9897 symbol_name_match_type::SEARCH_NAME.
9898 * infrun.c (insert_exception_resume_breakpoint): Use
9899 lookup_symbol_search_name.
9900 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9901 * psymtab.c (maintenance_check_psymtabs): Use
9902 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9903 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9905 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9906 if symbol_name_match_type::SEARCH_NAME.
9907 (lookup_symbol_in_language): Pass down
9908 symbol_name_match_type::FULL.
9909 (lookup_symbol_search_name): New.
9910 (lookup_language_this): Pass down
9911 symbol_name_match_type::SEARCH_NAME.
9912 (lookup_symbol_aux, lookup_local_symbol): New parameter
9913 'match_type'. Pass it down.
9914 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9915 (lookup_symbol_search_name): New declaration.
9916 (lookup_symbol_in_block): New 'match_type' parameter.
9918 2018-01-05 Pedro Alves <palves@redhat.com>
9921 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9923 (ada_lookup_symbol): Reimplement in terms of
9924 ada_lookup_symbol_list, bits factored out from
9925 ada_lookup_encoded_symbol.
9927 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9929 * ada-exp.y (write_object_renaming): When subscripting an array
9930 using a symbol as the index, pass the block in call to
9931 ada_lookup_encoded_symbol when looking that symbol up.
9933 2018-01-05 Jerome Guitton <guitton@adacore.com>
9935 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9938 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9940 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9941 the case where VALUE_LVAL (val0) is not lval_memory.
9943 2018-01-05 Xavier Roirand <roirand@adacore.com>
9945 * ada-valprint.c (print_optional_low_bound): Handle
9946 character-indexed array printing like boolean-indexed array
9949 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9951 * NEWS: Create a new section for the next release branch.
9952 Rename the section of the current branch, now that it has
9955 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9957 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9958 * version.in: Bump version to 8.1.50.DATE-git.
9960 2018-01-03 Xavier Roirand <roirand@adacore.com>
9962 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9964 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9966 (default_exception_support_info) <catch_handlers_sym>: Add field.
9967 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9968 (ada_exception_name_addr_1): Add "catch handlers" handling.
9969 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9971 (create_excep_cond_exprs) <ex>: Add parameter.
9972 (re_set_exception): Update create_excep_cond_exprs call.
9973 (print_it_exception, print_one_exception, print_mention_exception)
9974 (print_recreate_exception): Add "catch handler" handling.
9975 (allocate_location_catch_handlers, re_set_catch_handlers)
9976 (check_status_catch_handlers, print_it_catch_handlers)
9977 (print_one_catch_handlers, print_mention_catch_handlers)
9978 (print_recreate_catch_handlers): New function.
9979 (catch_handlers_breakpoint_ops): New variable.
9980 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9981 Add parameter. Add "catch handler" handling.
9982 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9983 Add "catch handler" handling.
9984 (ada_exception_catchpoint_cond_string): Add "catch handler"
9986 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9988 (catch_ada_handlers_command): New function.
9989 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9990 operations structure.
9991 (_initialize_ada_language): Add "catch handlers" command entry.
9992 * NEWS: Document "catch handlers" feature.
9994 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9996 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9997 account when creating the array type of the slice.
9998 (ada_value_slice): Likewise.
10000 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10002 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10004 (create_array_type_with_stride): Add byte_stride_prop parameter.
10005 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10006 New parameter. Update all callers in this file.
10007 (array_type_has_dynamic_stride): New function.
10008 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10009 of arrays with dynamic byte strides.
10010 * dwarf2read.c (read_array_type): Add support for dynamic
10011 DW_AT_byte_stride attributes.
10013 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10015 * dwarf2read.c (read_unspecified_type): Treat
10016 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10018 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10020 Update copyright year range in all GDB files.
10022 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10024 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10025 and gdb/testsuite/gdb.base/step-line.c.
10027 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10029 * copyright.py (main): Dump the contents of
10030 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10031 even if BY_HAND is empty.
10033 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10035 * top.c (print_gdb_version): Update Copyright year in version
10038 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10040 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10042 For older changes see ChangeLog-2017.
10048 version-control: never