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