1 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2 Jan Kratochvil <jan.kratochvil@redhat.com>
3 Paul Fertser <fercerpav@gmail.com>
4 Tsutomu Seki <sekiriki@gmail.com>
5 Pedro Alves <palves@redhat.com>
7 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8 'unittests/parse-connection-spec-selftests.c'.
9 (COMMON_SFILES): Add 'common/netstuff.c'.
10 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
11 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
12 * common/netstuff.c: New file.
13 * common/netstuff.h: New file.
14 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
15 (wait_for_connect): Update comment. New parameter
16 'gdb::optional<int> sock' instead of 'struct serial *scb'.
17 Use 'sock' directly instead of 'scb->fd'.
18 (try_connect): New function, with code from 'net_open'.
19 (net_open): Rewrite main loop to deal with multiple
20 sockets/addresses. Handle IPv6-style hostnames; implement
21 support for IPv6 connections.
22 * unittests/parse-connection-spec-selftests.c: New file.
24 2018-07-11 Pedro Alves <palves@redhat.com>
27 * remote.c (remote_target::remote_detach_pid): Call
30 2018-07-11 Pedro Alves <palves@redhat.com>
32 * h8300-tdep.c (h8300_gdbarch_init): Remove
33 set_gdbarch_ecoff_reg_to_regnum calls.
35 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
38 * c-typeprint.c (c_type_print_base_struct_union): Don't print
39 offsets/sizes for static members of a class/struct.
41 2018-07-11 Alan Hayward <alan.hayward@arm.com>
43 * target-descriptions.c (tdesc_register_bitsize): Rename.
44 * target-descriptions.h (tdesc_register_bitsize): Likewise.
45 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
46 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
48 2018-07-10 Tom Tromey <tom@tromey.com>
50 * breakpoint.c (moribund_locations): Now static and a
52 (breakpoint_init_inferior, moribund_breakpoint_here_p)
53 (build_bpstat_chain, update_global_location_list)
54 (breakpoint_retire_moribund): Update.
55 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
58 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
60 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
61 (riscv_register_reggroup_p): Use new function, remove unneeded
63 (riscv_push_dummy_call): Extend assert to compare against xlen or
64 flen based on register type.
66 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
68 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
70 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
72 * remote.c (show_hardware_watchpoint_limit): New function.
73 (show_hardware_watchpoint_length_limit): New function.
74 (show_hardware_breakpoint_limit): New function.
75 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
76 where appropriate, update help text.
78 2018-07-09 Tom Tromey <tom@tromey.com>
80 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
81 (CLIBS): Don't mention NAT_CLIBS.
83 2018-07-09 Tom Tromey <tom@tromey.com>
85 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
86 (LIBGDB_OBS, clean mostlyclean): Update.
87 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
89 2018-07-09 Tom Tromey <tom@tromey.com>
91 * Makefile.in (%.c: %.y): Use ECHO_YACC.
92 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
93 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
95 2018-07-09 Tom Tromey <tom@tromey.com>
97 * Makefile.in (ALLDEPFILES): Remove exec.c.
98 (COMMON_OBS): Remove exec.o.
99 (COMMON_SFILES): Add exec.c.
101 2018-07-09 Tom Tromey <tom@tromey.com>
103 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
105 2018-07-09 Tom Tromey <tom@tromey.com>
107 * Makefile.in (clean mostlyclean): Remove stamp-version.
108 (version.c): Depend on stamp-version.
109 (stamp-version): New rule, from version.c rule.
111 2018-07-09 Tom Tromey <tom@tromey.com>
113 * Makefile.in (init.c): Depend on stamp-init.
114 (stamp-init): New rule, from init.c rule.
115 (clean mostlyclean): Remove stamp-init.
117 2018-07-09 Tom Tromey <tom@tromey.com>
119 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
120 SUBDIR_GCC_COMPILE_SRCS.
122 2018-07-09 Tom Tromey <tom@tromey.com>
124 * Makefile.in (init.c): Remove some unused sed rules.
126 2018-07-09 Tom Tromey <tom@tromey.com>
128 * Makefile.in (TSOBS): Remove.
129 (INIT_FILES): Update.
130 (LIBGDB_OBS): Update.
131 (COMMON_SFILES): Add inflow.c.
132 (SFILES): Remove inflow.c.
134 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
136 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
138 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
140 * ia64-tdep.c (get_reg_name, get_fpreg_name, get_saveloc_name,
141 is_signal_frame_name, step_name, init_remote_name,
142 create_addr_space_name, destroy_addr_space_name,
143 search_unwind_table_name, find_dyn_list_name): Constify.
145 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
147 * darwin-nat.c (darwin_pthread_kill): New function.
148 (darwin_resume_thread): Use darwin_pthread_kill.
150 2018-07-05 Tom de Vries <tdevries@suse.de>
152 * macroexp.c (macro_buffer) <operator=>: New member function.
154 2018-07-04 Tom Tromey <tom@tromey.com>
156 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
158 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
160 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
161 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
165 2018-07-04 Joel Brobecker <brobecker@adacore.com>
167 * NEWS: Create a new section for the next release branch.
168 Rename the section of the current branch, now that it has
171 2018-07-04 Joel Brobecker <brobecker@adacore.com>
173 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
174 * version.in: Bump version to 8.2.50.DATE-git.
176 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
177 Pedro Alves <palves@redhat.com>
179 * linux-nat.c (linux_init_ptrace): Rename to ...
180 (linux_init_ptrace_procfs): ... this. Call
181 linux_proc_init_warnings.
182 (linux_nat_target::post_attach)
183 (linux_nat_target::post_startup_inferior): Adjust.
184 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
185 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
187 2018-07-04 Tom de Vries <tdevries@suse.de>
189 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
191 (read_comp_unit_head): ... here.
193 2018-07-03 Tom Tromey <tom@tromey.com>
195 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
196 (stop_tracing, tstatus_command)
197 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
198 (print_one_static_tracepoint_marker): Update.
199 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
201 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
203 (all_tracepoints, static_tracepoints_here): Return std::vector.
205 2018-07-03 Tom Tromey <tom@tromey.com>
207 * common/ptid.c (ptid_equal): Remove.
208 * common/ptid.h (ptid_equal): Don't declare.
209 * ada-tasks.c: Update.
210 * breakpoint.c: Update.
211 * common/agent.c: Update.
213 * darwin-nat-info.c: Update.
214 * darwin-nat.c: Update.
216 * dtrace-probe.c: Update.
217 * dummy-frame.c: Update.
218 * fbsd-nat.c: Update.
220 * gdbthread.h: Update.
222 * go32-nat.c: Update.
223 * inf-loop.c: Update.
224 * inf-ptrace.c: Update.
229 * linux-fork.c: Update.
230 * linux-nat.c: Update.
231 * linux-thread-db.c: Update.
232 * mi/mi-cmd-var.c: Update.
233 * mi/mi-interp.c: Update.
234 * mi/mi-main.c: Update.
235 * nto-procfs.c: Update.
236 * ppc-linux-tdep.c: Update.
238 * python/py-inferior.c: Update.
239 * python/py-record-btrace.c: Update.
240 * python/py-record.c: Update.
241 * ravenscar-thread.c: Update.
242 * regcache.c: Update.
243 * remote-sim.c: Update.
245 * sol-thread.c: Update.
248 * tui/tui-stack.c: Update.
250 * windows-nat.c: Update.
251 * windows-tdep.c: Update.
253 2018-07-03 Tom Tromey <tom@tromey.com>
255 * common/ptid.c (ptid_match): Remove.
256 * common/ptid.h (ptid_match): Don't declare.
257 * fbsd-nat.c: Update.
260 * linux-nat.c: Update.
261 * record-btrace.c: Update.
262 * regcache.c: Update.
265 2018-07-03 Tom Tromey <tom@tromey.com>
267 * common/ptid.c (ptid_tid_p): Remove.
268 * common/ptid.h (ptid_tid_p): Don't declare.
269 * sol-thread.c: Update.
271 2018-07-03 Tom Tromey <tom@tromey.com>
273 * common/ptid.c (ptid_lwp_p): Remove.
274 * common/ptid.h (ptid_lwp_p): Don't declare.
275 * fbsd-nat.c: Update.
276 * linux-nat.c: Update.
277 * nat/linux-procfs.c: Update.
278 * nat/x86-linux-dregs.c: Update.
279 * sol-thread.c: Update.
281 2018-07-03 Tom Tromey <tom@tromey.com>
283 * common/ptid.c (ptid_is_pid): Remove.
284 * common/ptid.h (ptid_is_pid): Don't declare.
286 * linux-nat.c: Update.
287 * mi/mi-interp.c: Update.
291 2018-07-03 Tom Tromey <tom@tromey.com>
293 * common/ptid.c (ptid_get_tid): Remove.
294 * common/ptid.h (ptid_get_tid): Don't declare.
295 * ada-tasks.c: Update.
296 * aix-thread.c: Update.
297 * bsd-uthread.c: Update.
298 * darwin-nat.c: Update.
299 * fbsd-nat.c: Update.
300 * i386-darwin-nat.c: Update.
302 * linux-tdep.c: Update.
303 * nto-procfs.c: Update.
304 * ppc-ravenscar-thread.c: Update.
305 * python/py-infthread.c: Update.
306 * ravenscar-thread.c: Update.
307 * sol-thread.c: Update.
308 * sparc-ravenscar-thread.c: Update.
309 * windows-nat.c: Update.
311 2018-07-03 Tom Tromey <tom@tromey.com>
313 * common/ptid.c (ptid_get_lwp): Remove.
314 * common/ptid.h (ptid_get_lwp): Don't declare.
315 * aarch64-linux-nat.c: Update.
316 * ada-tasks.c: Update.
317 * aix-thread.c: Update.
318 * amd64-linux-nat.c: Update.
319 * arm-linux-nat.c: Update.
321 * fbsd-nat.c: Update.
322 * fbsd-tdep.c: Update.
324 * i386-cygwin-tdep.c: Update.
325 * i386-gnu-nat.c: Update.
326 * i386-linux-nat.c: Update.
327 * ia64-linux-nat.c: Update.
328 * inf-ptrace.c: Update.
330 * linux-fork.c: Update.
331 * linux-nat.c: Update.
332 * linux-tdep.c: Update.
333 * linux-thread-db.c: Update.
334 * mips-linux-nat.c: Update.
335 * nat/aarch64-linux-hw-point.c: Update.
336 * nat/aarch64-linux.c: Update.
337 * nat/linux-btrace.c: Update.
338 * nat/linux-osdata.c: Update.
339 * nat/linux-procfs.c: Update.
340 * nat/x86-linux-dregs.c: Update.
341 * obsd-nat.c: Update.
342 * ppc-fbsd-nat.c: Update.
343 * ppc-linux-nat.c: Update.
345 * python/py-infthread.c: Update.
346 * ravenscar-thread.c: Update.
348 * s390-linux-nat.c: Update.
349 * sol-thread.c: Update.
350 * sol2-tdep.c: Update.
351 * spu-linux-nat.c: Update.
352 * x86-linux-nat.c: Update.
353 * xtensa-linux-nat.c: Update.
355 2018-07-03 Tom Tromey <tom@tromey.com>
357 * common/ptid.c (ptid_get_pid): Remove.
358 * common/ptid.h (ptid_get_pid): Don't declare.
359 * aarch64-linux-nat.c: Update.
360 * ada-lang.c: Update.
361 * aix-thread.c: Update.
362 * alpha-bsd-nat.c: Update.
363 * amd64-fbsd-nat.c: Update.
364 * amd64-linux-nat.c: Update.
365 * arm-linux-nat.c: Update.
366 * arm-nbsd-nat.c: Update.
368 * break-catch-syscall.c: Update.
369 * breakpoint.c: Update.
370 * bsd-uthread.c: Update.
373 * darwin-nat.c: Update.
374 * fbsd-nat.c: Update.
375 * fbsd-tdep.c: Update.
378 * hppa-nbsd-nat.c: Update.
379 * hppa-obsd-nat.c: Update.
380 * i386-fbsd-nat.c: Update.
381 * ia64-linux-nat.c: Update.
382 * inf-ptrace.c: Update.
384 * inferior.c: Update.
385 * inferior.h: Update.
388 * linux-fork.c: Update.
389 * linux-nat.c: Update.
390 * linux-tdep.c: Update.
391 * linux-thread-db.c: Update.
392 * m68k-bsd-nat.c: Update.
393 * mi/mi-interp.c: Update.
394 * mi/mi-main.c: Update.
395 * mips-linux-nat.c: Update.
396 * mips-nbsd-nat.c: Update.
397 * mips64-obsd-nat.c: Update.
398 * nat/aarch64-linux-hw-point.c: Update.
399 * nat/aarch64-linux.c: Update.
400 * nat/linux-btrace.c: Update.
401 * nat/linux-osdata.c: Update.
402 * nat/linux-procfs.c: Update.
403 * nat/x86-linux-dregs.c: Update.
404 * nto-procfs.c: Update.
405 * obsd-nat.c: Update.
406 * ppc-linux-nat.c: Update.
407 * ppc-nbsd-nat.c: Update.
408 * ppc-obsd-nat.c: Update.
409 * proc-service.c: Update.
411 * python/py-inferior.c: Update.
412 * python/py-infthread.c: Update.
413 * ravenscar-thread.c: Update.
415 * remote-sim.c: Update.
417 * rs6000-nat.c: Update.
418 * s390-linux-nat.c: Update.
419 * sh-nbsd-nat.c: Update.
420 * sol-thread.c: Update.
421 * sparc-nat.c: Update.
422 * sparc64-tdep.c: Update.
423 * spu-linux-nat.c: Update.
424 * spu-tdep.c: Update.
425 * target-debug.h: Update.
428 * tid-parse.c: Update.
429 * tracefile-tfile.c: Update.
430 * vax-bsd-nat.c: Update.
431 * windows-nat.c: Update.
432 * x86-linux-nat.c: Update.
435 2018-07-03 Tom Tromey <tom@tromey.com>
437 * common/ptid.c (pid_to_ptid): Remove.
438 * common/ptid.h (pid_to_ptid): Don't declare.
439 * aix-thread.c: Update.
440 * arm-linux-nat.c: Update.
441 * common/ptid.c: Update.
442 * common/ptid.h: Update.
445 * darwin-nat.c: Update.
446 * fbsd-nat.c: Update.
447 * fork-child.c: Update.
449 * go32-nat.c: Update.
450 * inf-ptrace.c: Update.
452 * inferior.c: Update.
454 * linux-fork.c: Update.
455 * linux-nat.c: Update.
456 * nat/aarch64-linux-hw-point.c: Update.
457 * nat/fork-inferior.c: Update.
458 * nat/x86-linux-dregs.c: Update.
459 * nto-procfs.c: Update.
460 * obsd-nat.c: Update.
462 * progspace.c: Update.
464 * rs6000-nat.c: Update.
465 * s390-linux-nat.c: Update.
466 * sol-thread.c: Update.
467 * spu-linux-nat.c: Update.
470 * tracefile-tfile.c: Update.
471 * windows-nat.c: Update.
473 2018-07-03 Tom Tromey <tom@tromey.com>
475 * common/ptid.h (ptid_build): Don't declare.
476 * common/ptid.c (ptid_build): Remove.
477 * aix-thread.c: Update.
479 * bsd-uthread.c: Update.
480 * common/agent.c: Update.
481 * common/ptid.c: Update.
482 * common/ptid.h: Update.
484 * darwin-nat.c: Update.
485 * fbsd-nat.c: Update.
487 * linux-fork.c: Update.
488 * linux-nat.c: Update.
489 * linux-thread-db.c: Update.
490 * nat/linux-osdata.c: Update.
491 * nat/linux-procfs.c: Update.
492 * nto-procfs.c: Update.
493 * obsd-nat.c: Update.
494 * proc-service.c: Update.
496 * ravenscar-thread.c: Update.
497 * remote-sim.c: Update.
499 * sol-thread.c: Update.
501 * windows-nat.c: Update.
503 2018-07-03 Tom Tromey <tom@tromey.com>
505 * infrun.c (follow_exec): Use exit_inferior_silent.
506 * inferior.c (exit_inferior_num_silent): Remove.
507 * inferior.h (exit_inferior_num_silent): Don't declare.
509 2018-07-03 Tom Tromey <tom@tromey.com>
512 * darwin-nat.c (darwin_attach_pid): Reset inferior and
513 inferior_ptid on error.
515 2018-07-02 Maciej W. Rozycki <macro@mips.com>
516 Simon Marchi <simon.marchi@polymtl.ca>
519 * disasm.h (gdb_disassembler): Add
520 `m_disassembler_options_holder'. member
521 * disasm.c (get_all_disassembler_options): New function.
522 (gdb_disassembler::gdb_disassembler): Use it.
523 (gdb_buffered_insn_length_init_dis): Likewise.
524 (gdb_buffered_insn_length): Adjust accordingly.
525 (set_disassembler_options): Handle options with arguments.
526 (show_disassembler_options_sfunc): Likewise. Add a leading new
527 line if showing options with descriptions.
528 (disassembler_options_completer): Adapt to using the
529 `disasm_options_and_args_t' structure.
530 * mips-tdep.c (mips_disassembler_options): New variable.
531 (mips_disassembler_options_o32): Likewise.
532 (mips_disassembler_options_n32): Likewise.
533 (mips_disassembler_options_n64): Likewise.
534 (gdb_print_insn_mips): Don't set `disassembler_options'.
535 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
537 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
538 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
539 `gdbarch_disassembler_options_implicit' and
540 `gdbarch_valid_disassembler_options'.
541 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
542 `disasm_options_and_args_t' structure.
543 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
545 (valid_disassembler_options): Switch from `disasm_options_t' to
546 the `disasm_options_and_args_t' structure.
547 * NEWS: Document `set disassembler-options' support for the MIPS
549 * gdbarch.h: Regenerate.
550 * gdbarch.c: Regenerate.
552 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
554 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
556 2018-06-29 Joel Brobecker <brobecker@adacore.com>
558 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
559 parameter in call to amd64_target_description.
560 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
561 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
562 (amd64fbsd_init_abi): Likewise.
563 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
564 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
565 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
566 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
568 2018-06-29 Pedro Alves <palves@redhat.com>
570 * gdb/amd64-tdep.h (amd64_create_target_description): Add
571 "segments" parameter.
572 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
573 (_initialize_amd64_tdep): Update call to
574 amd64_create_target_description.
575 (amd64_target_description): Add "segments" parameter. Adjust
576 the implementation to use it.
577 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
578 call to amd64_create_target_description.
579 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
580 * gdb/arch/amd64.h (amd64_create_target_description): Add
582 * gdb/arch/amd64.c (amd64_create_target_description): Add
583 "segments" parameter. Call create_feature_i386_64bit_segments
584 only if SEGMENTS is true.
585 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
586 call to amd64_create_target_description.
588 2018-06-29 Pedro Alves <palves@redhat.com>
590 * thread.c (thread_target_id_str): New, factored out from ...
591 (print_thread_info_1): ... here. Use it to compute the max
592 "Target Id" column width.
594 2018-06-29 Pedro Alves <palves@redhat.com>
596 * remote.c (remote_target::extra_thread_info): Delete
597 'display_buf' and 'n' locals. from the cache, regardless of
598 packet mechanims is in use. Use cache for qThreadExtra and qP
601 2018-06-29 Pedro Alves <palves@redhat.com>
603 * blockframe.c (find_pc_sect_containing_function): New function.
604 * breakpoint.c (print_breakpoint_location): Don't call
605 find_pc_sect_function.
606 * linespec.c (create_sals_line_offset): Record the location's
608 * linespec.c (convert_address_location_to_sals): Fill in sal's
609 symbol with find_pc_sect_containing_function.
610 * symtab.c (find_function_start_sal): Rename to ...
611 (find_function_start_sal_1): ... this.
612 (find_function_start_sal): Reimplement as wrapper around
613 find_function_start_sal_1, and use
614 find_pc_sect_containing_function to fill in the sal's symbol.
615 (find_function_start_sal(symbol*, bool)): Adjust.
616 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
618 (find_pc_sect_containing_function): Declare.
620 2018-06-29 Pedro Alves <palves@redhat.com>
622 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
623 true if the the location has no symbol.
625 2018-06-28 Tom Tromey <tom@tromey.com>
627 * NEWS: Mention --enable-codesign.
628 * silent-rules.mk (ECHO_SIGN): New variable.
629 * configure.ac: Add --enable-codesign.
630 * configure: Rebuild.
631 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
632 (gdb$(EXEEXT)): Optionally invoke codesign.
634 2018-06-28 Pedro Alves <palves@redhat.com>
636 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
638 (switch_to_thread_no_regs): Adjust comment.
639 * infcmd.c (stop_pc): Delete.
640 (post_create_inferior, info_program_command): Replace references
641 to stop_pc with references to thread_info->suspend.stop_pc.
642 * inferior.h (stop_pc): Delete declaration.
643 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
644 (handle_inferior_event_1, handle_signal_stop)
645 (process_event_stop_test, keep_going_stepped_thread)
646 (handle_step_into_function, handle_step_into_function_backward)
647 (print_stop_location): Replace references to stop_pc with
648 references to thread_info->suspend.stop_pc.
649 (struct infcall_suspend_state) <stop_pc>: Delete field.
650 (save_infcall_suspend_state, restore_infcall_suspend_state):
651 Remove references to inf_stat->stop_pc.
652 * linux-fork.c (fork_load_infrun_state): Likewise.
653 * record-btrace.c (record_btrace_set_replay): Likewise.
654 * record-full.c (record_full_goto_entry): Likewise.
655 * remote.c (print_one_stopped_thread): Likewise.
656 * target.c (target_resume): Extend comment.
657 * thread.c (set_executing_thread): New.
658 (set_executing): Use it.
659 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
660 Remove references to stop_pc.
662 2018-06-28 Pedro Alves <palves@redhat.com>
664 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
665 Moving fetching stop_pc until after ecs->event_thread is refreshed.
667 2018-06-28 Tom Tromey <tom@tromey.com>
669 * coffread.c (coff_symfile_finish): Update.
670 * xcoffread.c (xcoff_symfile_finish): Update.
671 * elfread.c (elf_symfile_finish): Update.
672 * symfile.h (dwarf2_free_objfile): Don't declare.
673 * dwarf2read.c (_initialize_dwarf2_read): Use
674 register_objfile_data_with_cleanup.
675 (dwarf2_free_objfile): Now static. Change signature.
677 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
679 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
680 option "-o" to add-symbol-file-load to add an offset to each
681 section's load address.
682 * symfile.c (set_objfile_default_section_offset): New function.
684 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
686 * symfile.c (add_symbol_file_command): Make sure that sections
687 with the same name are sorted in the same order.
689 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
691 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
692 require the second argument. If omitted, load sections at the
693 addresses specified in the file.
695 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
697 * symfile.c (symbol_file_command, symbol_file_add_main_1)
698 (_initialize_symfile): Add option "-o" to symbol-file to add an
699 offset to each section of the symbol file.
701 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
703 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
705 2018-06-27 Tom Tromey <tom@tromey.com>
707 * stack.c (_initialize_stack): Update "func" help text.
709 2018-06-27 Tom Tromey <tom@tromey.com>
711 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
713 (unwind_infopy_str, pyuw_create_unwind_info)
714 (unwind_infopy_add_saved_register, pyuw_sniffer)
715 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
717 (struct saved_reg): Add constructor.
718 <value>: Now a gdbpy_ref<>.
720 2018-06-27 Tom Tromey <tom@tromey.com>
722 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
724 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
726 * gdb-gdb.py.in: Format using autopep8.
728 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
730 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
731 (type_lookup_function): Recognize CORE_ADDR values.
733 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
735 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
738 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
740 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
743 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
745 * gdb-gdb.py: Move to...
746 * gdb-gdb.py.in: ... here.
747 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
748 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
750 (distclean): Remove gdb-gdb.py when cleaning.
751 (gdb-gdb.py, gdb-gdb.gdb): New rules.
752 * configure: Re-generate.
754 2018-06-27 Pedro Alves <palves@redhat.com>
756 * proc-service.c (get_ps_regcache): New.
757 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
758 (ps_lsetfpregs): Use it.
760 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
763 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
764 (dwarf_decode_lines_1): Adjust.
766 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
768 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
770 <info_proc>: Likewise.
772 2018-06-26 Joel Brobecker <brobecker@adacore.com>
774 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
775 to windows_fetch_one_register, and only handle the case of
776 fetching one register. Move the code that reloads the context
777 and iterates over all registers if R is negative to...
778 (windows_nat_target::fetch_registers): ... here.
779 (do_windows_store_inferior_registers): Rename to
780 windows_store_one_register, and only handle the case of storing
781 one register. Move the code that handles the case where r is
783 (windows_nat_target::store_registers) ... here.
785 2018-06-26 Tom Tromey <tom@tromey.com>
788 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
789 * rust-lang.c (rust_print_struct_def): Add podata parameter.
791 (rust_internal_print_type): Add podata parameter.
792 (rust_print_type): Update.
794 2018-06-26 Tom Tromey <tom@tromey.com>
796 * typeprint.h (struct print_offset_data) <update, finish,
797 maybe_print_hole>: New methods.
798 <indentation>: New constant.
799 * typeprint.c (print_offset_data::indentation): Define.
800 (print_offset_data::maybe_print_hole, print_offset_data::update)
801 (print_offset_data::finish): Move from c-typeprint.c and rename.
802 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
803 (print_spaces_filtered_with_print_options): Update.
804 (c_print_type_union_field_offset, maybe_print_hole)
805 (c_print_type_struct_field_offset): Move to typeprint.c and
807 (c_type_print_base_struct_union): Update.
809 2018-06-25 Pedro Alves <palves@redhat.com>
811 * gdbthread.h (thread_info_ref, delete_thread)
812 (delete_thread_silent, first_thread_of_inferior)
813 (any_thread_of_inferior, switch_to_thread)
814 (enable_thread_stack_temporaries)
815 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
816 (get_last_thread_stack_temporary)
817 (value_in_thread_stack_temporaries, can_access_registers_thread):
818 Spell out "struct thread_info" instead of just "thread_info".
819 * inferior.h (notice_new_inferior): Likewise.
821 2018-06-25 Pedro Alves <palves@redhat.com>
823 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
824 pass thread_info pointer to delete_thread.
825 (windows_nat_target::detach): Pass inferior pointer to
827 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
829 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
830 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
831 and pass a thread_info pointer to delete_thread.
832 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
833 pass thread_info pointer to delete_thread.
834 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
835 delete_thread_silent call.
836 * procfs.c (procfs_target::detach): Pass inferior pointer to
838 (procfs_target::wait): Pass thread_info pointer to delete_thread.
839 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
840 delete_thread_silent call.
841 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
842 pass thread_info pointer to delete_thread.
843 (windows_nat_target::detach): Pass inferior pointer to
846 2018-06-22 Alan Hayward <alan.hayward@arm.com>
848 * regcache.c (readable_regcache::read_part): Fix asserts.
849 (reg_buffer::raw_collect_part): New function.
850 (regcache::write_part): Fix asserts.
851 (reg_buffer::raw_supply_part): New function.
852 (regcache::transfer_regset_register): New helper function.
853 (regcache::transfer_regset): Call new functions.
854 (regcache_supply_regset): Use gdb_byte*.
855 (regcache::supply_regset): Likewise.
856 (regcache_collect_regset): Likewise.
857 (regcache::collect_regset): Likewise.
858 * regcache.h (reg_buffer::raw_collect_part): New declaration.
859 (reg_buffer::raw_supply_part): Likewise.
860 (regcache::transfer_regset_register): Likewise.
861 (regcache::transfer_regset): Use gdb_byte*.
863 2018-06-22 Alan Hayward <alan.hayward@arm.com>
865 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
867 2018-06-21 Pedro Alves <palves@redhat.com>
869 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
870 instead of a ptid_t. All callers adjusted.
871 * ada-tasks.c (ada_get_task_number): Likewise. All callers
873 (print_ada_task_info, display_current_task_id, task_command_1):
875 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
877 (breakpoint_kind): Adjust.
878 (remove_breakpoints_pid): Rename to ...
879 (remove_breakpoints_inf): ... this. Adjust to take an inferior
880 pointer. All callers adjusted.
881 (bpstat_clear_actions): Use inferior_thread.
882 (get_bpstat_thread): New.
883 (bpstat_do_actions): Use it.
884 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
885 to take a thread_info pointer. All callers adjusted.
886 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
887 (breakpoint_re_set_thread): Use inferior_thread.
888 * breakpoint.h (struct inferior): Forward declare.
889 (bpstat_stop_status): Update.
890 (remove_breakpoints_pid): Delete.
891 (remove_breakpoints_inf): New.
892 * bsd-uthread.c (bsd_uthread_target::wait)
893 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
894 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
895 (maint_btrace_packet_history_cmd)
896 (maint_btrace_clear_packet_history_cmd): Adjust.
897 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
899 * cli/cli-interp.c: Include "inferior.h".
900 * common/refcounted-object.h (struct
901 refcounted_object_ref_policy): New.
902 * compile/compile-object-load.c: Include gdbthread.h.
903 (store_regs): Use inferior_thread.
904 * corelow.c (core_target::close): Use current_inferior.
905 (core_target_open): Adjust to use first_thread_of_inferior and use
906 the current inferior.
907 * ctf.c (ctf_target::close): Adjust to use current_inferior.
908 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
909 <thread>: ... this new field. All references adjusted.
910 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
911 Take a thread_info pointer instead of a ptid_t.
912 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
913 (dummy_frame_discard, register_dummy_frame_dtor): Take a
914 thread_info pointer instead of a ptid_t.
915 * elfread.c: Include "inferior.h".
916 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
918 * eval.c (evaluate_subexp): Likewise.
919 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
921 * gdb_proc_service.h (struct thread_info): Forward declare.
922 (struct ps_prochandle) <ptid>: Delete, replaced by ...
923 <thread>: ... this new field. All references adjusted.
924 * gdbarch.h, gdbarch.c: Regenerate.
925 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
926 'thread' parameter. All implementations and callers adjusted.
927 * gdbthread.h (thread_info) <set_running>: New method.
928 (delete_thread, delete_thread_silent): Take a thread_info pointer
930 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
931 (first_thread_of_process): Delete, replaced by ...
932 (first_thread_of_inferior): ... this new function. All callers
934 (any_live_thread_of_process): Delete, replaced by ...
935 (any_live_thread_of_inferior): ... this new function. All callers
937 (switch_to_thread, switch_to_no_thread): Declare.
938 (is_executing): Delete.
939 (enable_thread_stack_temporaries): Update comment.
940 <enable_thread_stack_temporaries>: Take a thread_info pointer
941 instead of a ptid_t. Incref the thread.
942 <~enable_thread_stack_temporaries>: Decref the thread.
945 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
946 (get_last_thread_stack_temporary)
947 (value_in_thread_stack_temporaries, can_access_registers_thread):
948 Take a thread_info pointer instead of a ptid_t. All callers
950 * infcall.c (get_call_return_value): Use inferior_thread.
951 (run_inferior_call): Work with thread pointers instead of ptid_t.
952 (call_function_by_hand_dummy): Work with thread pointers instead
953 of ptid_t. Use thread_info_ref.
954 * infcmd.c (proceed_thread_callback): Access thread's state
956 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
957 access thread's state directly.
958 (continue_command): Use inferior_thread.
959 (info_program_command): Use find_thread_ptid and access thread
961 (proceed_after_attach_callback): Use thread state directly.
962 (notice_new_inferior): Take a thread_info pointer instead of a
963 ptid_t. All callers adjusted.
964 (exit_inferior): Take an inferior pointer instead of a pid. All
966 (exit_inferior_silent): New.
967 (detach_inferior): Delete.
968 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
969 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
970 (detach_inferior_command, kill_inferior_command): Use
971 find_inferior_id instead of valid_gdb_inferior_id and
972 gdb_inferior_id_to_pid.
973 (inferior_command): Use inferior and thread pointers.
974 * inferior.h (struct thread_info): Forward declare.
975 (notice_new_inferior): Take a thread_info pointer instead of a
976 ptid_t. All callers adjusted.
977 (detach_inferior): Delete declaration.
978 (exit_inferior, exit_inferior_silent): Take an inferior pointer
979 instead of a pid. All callers adjusted.
980 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
981 (valid_gdb_inferior_id): Delete.
982 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
983 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
984 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
986 <inf>: ... this new field.
987 <step_ptid>: Delete, replaced by ...
988 <step_thread>: ... this new field.
989 (get_displaced_stepping_state): Take an inferior pointer instead
990 of a pid. All callers adjusted.
991 (displaced_step_in_progress_any_inferior): Adjust.
992 (displaced_step_in_progress_thread): Take a thread pointer instead
993 of a ptid_t. All callers adjusted.
994 (displaced_step_in_progress, add_displaced_stepping_state): Take
995 an inferior pointer instead of a pid. All callers adjusted.
996 (get_displaced_step_closure_by_addr): Adjust.
997 (remove_displaced_stepping_state): Take an inferior pointer
998 instead of a pid. All callers adjusted.
999 (displaced_step_prepare_throw, displaced_step_prepare)
1000 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1001 All callers adjusted.
1002 (start_step_over): Adjust.
1003 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1004 displaced step queue.
1005 (do_target_resume): Adjust.
1006 (fetch_inferior_event): Use inferior_thread.
1007 (context_switch, get_inferior_stop_soon): Take an
1008 execution_control_state pointer instead of a ptid_t. All callers
1010 (switch_to_thread_cleanup): Delete.
1011 (stop_all_threads): Use scoped_restore_current_thread.
1012 * inline-frame.c: Include "gdbthread.h".
1013 (inline_state) <inline_state>: Take a thread pointer instead of a
1014 ptid_t. All callers adjusted.
1015 <ptid>: Delete, replaced by ...
1016 <thread>: ... this new field.
1017 (find_inline_frame_state): Take a thread pointer instead of a
1018 ptid_t. All callers adjusted.
1019 (skip_inline_frames, step_into_inline_frame)
1020 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1021 pointer instead of a ptid_t. All callers adjusted.
1022 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1023 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1024 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1026 * linux-nat.c (get_detach_signal): Likewise.
1027 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1028 (thread_db_notice_clone): Adjust.
1029 (thread_db_find_new_threads_silently)
1030 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1031 a thread pointer instead of a ptid_t. All callers adjusted.
1032 * mi/mi-cmd-var.c: Include "inferior.h".
1033 (mi_cmd_var_update_iter): Update to use thread pointers.
1034 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1036 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1038 (mi_output_running): ... this new function.
1039 (mi_on_resume_1): Adjust to use it.
1040 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1041 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1043 (interrupt_thread_callback): : Adjust to use thread and inferior
1045 * proc-service.c: Include "gdbthread.h".
1046 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1047 * progspace-and-thread.c: Include "inferior.h".
1048 * progspace.c: Include "inferior.h".
1049 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1050 hold a reference to an inferior_object.
1051 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1053 * python/py-inferior.c (struct inferior_object): Give the type a
1054 tag name instead of a typedef.
1055 (python_on_normal_stop): No need to check if the current thread is
1057 (inferior_to_inferior_object): Change return type to
1058 inferior_object. All callers adjusted.
1059 (find_thread_object): Delete, bits factored out to ...
1060 (thread_to_thread_object): ... this new function.
1061 * python/py-infthread.c (create_thread_object): Use
1062 inferior_to_inferior_object.
1063 (thpy_is_stopped): Use thread pointer directly.
1064 (gdbpy_selected_thread): Use inferior_thread.
1065 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1066 field, replaced with ...
1067 <thread>: ... this new field. All users adjusted.
1068 (btpy_insn_or_gap_new): Drop const.
1069 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1071 * python/py-record.c: Include "gdbthread.h".
1072 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1073 a ptid_t. All callers adjusted.
1074 (gdbpy_current_recording): Use inferior_thread.
1075 * python/py-record.h (recpy_record_object) <ptid>: Delete
1076 field, replaced with ...
1077 <thread>: ... this new field. All users adjusted.
1078 (recpy_element_object) <ptid>: Delete
1079 field, replaced with ...
1080 <thread>: ... this new field. All users adjusted.
1081 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1082 a ptid_t. All callers adjusted.
1083 * python/py-threadevent.c: Include "gdbthread.h".
1084 (get_event_thread): Use thread_to_thread_object.
1085 * python/python-internal.h (struct inferior_object): Forward
1087 (find_thread_object, find_inferior_object): Delete declarations.
1088 (thread_to_thread_object, inferior_to_inferior_object): New
1090 * record-btrace.c: Include "inferior.h".
1091 (require_btrace_thread): Use inferior_thread.
1092 (record_btrace_frame_sniffer)
1093 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1094 (get_thread_current_frame): Use scoped_restore_current_thread and
1096 (get_thread_current_frame): Use thread pointer directly.
1097 (record_btrace_replay_at_breakpoint): Use thread's inferior
1099 * record-full.c: Include "inferior.h".
1100 * regcache.c: Include "gdbthread.h".
1101 (get_thread_arch_regcache): Use the inferior's address space
1103 (get_thread_regcache, registers_changed_thread): New.
1104 * regcache.h (get_thread_regcache(thread_info *thread)): New
1106 (registers_changed_thread): New.
1107 (remote_target) <remote_detach_1>: Swap order of parameters.
1108 (remote_add_thread): <remote_add_thread>: Return the new thread.
1109 (get_remote_thread_info(ptid_t)): New overload.
1110 (remote_target::remote_notice_new_inferior): Use thread pointers
1112 (remote_target::process_initial_stop_replies): Use
1113 thread_info::set_running.
1114 (remote_target::remote_detach_1, remote_target::detach)
1115 (extended_remote_target::detach): Adjust.
1116 * stack.c (frame_show_address): Use inferior_thread.
1117 * target-debug.h (target_debug_print_thread_info_pp): New.
1118 * target-delegates.c: Regenerate.
1119 * target.c (default_thread_address_space): Delete.
1120 (memory_xfer_partial_1): Use current_inferior.
1121 (target_detach): Use current_inferior.
1122 (target_thread_address_space): Delete.
1123 (generic_mourn_inferior): Use current_inferior.
1124 * target.h (struct target_ops) <thread_address_space>: Delete.
1125 (target_thread_address_space): Delete.
1126 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1128 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1129 thread pointer instead of a ptid_t. Adjust all callers.
1130 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1131 (first_thread_of_process): Delete, replaced by ...
1132 (first_thread_of_inferior): ... this new function. All callers
1134 (any_thread_of_process): Rename to ...
1135 (any_thread_of_inferior): ... this, and take an inferior pointer.
1136 (any_live_thread_of_process): Rename to ...
1137 (any_live_thread_of_inferior): ... this, and take an inferior
1139 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1140 (value_in_thread_stack_temporaries)
1141 (get_last_thread_stack_temporary): Take a thread pointer instead
1142 of a ptid_t. Adjust all callers.
1143 (thread_info::set_running): New.
1144 (validate_registers_access): Use inferior_thread.
1145 (can_access_registers_ptid): Rename to ...
1146 (can_access_registers_thread): ... this, and take a thread
1148 (print_thread_info_1): Adjust to compare thread pointers instead
1150 (switch_to_no_thread, switch_to_thread): Make extern.
1151 (scoped_restore_current_thread::~scoped_restore_current_thread):
1152 Use m_thread pointer directly.
1153 (scoped_restore_current_thread::scoped_restore_current_thread):
1154 Use inferior_thread.
1155 (thread_command): Use thread pointer directly.
1156 (thread_num_make_value_helper): Use inferior_thread.
1157 * top.c (execute_command): Use inferior_thread.
1158 * tui/tui-interp.c: Include "inferior.h".
1159 * varobj.c (varobj_create): Use inferior_thread.
1160 (value_of_root_1): Use find_thread_global_id instead of
1161 global_thread_id_to_ptid.
1163 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1165 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1167 (regcache::write_part): Likewise.
1168 (readable_regcache::cooked_read_part): Update comment.
1169 (readable_regcache::cooked_write_part): Likewise.
1170 * regcache.h: (readable_regcache::read_part): Likewise.
1171 (regcache::write_part): Likewise.
1173 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1174 Dirk Schubert <dirk.schubert@arm.com>
1176 * aarch64-linux-nat.c (post_attach): New.
1177 (aarch64_linux_nat_target::post_attach): Override post_attach to
1178 record the number of hardware debug registers.
1180 2018-06-20 Tom Tromey <tom@tromey.com>
1182 * python/py-param.c (add_setshow_generic): Make parameters const.
1183 (parmpy_init): Update.
1185 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1187 * regcache.h (regcache_cooked_read_ftype): Rename to...
1188 (register_read_ftype): ...this, change type to function_view.
1189 (class reg_buffer) <save>: Remove src parameter.
1190 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1191 parameter non-const in first overload. Remove src parameter in
1193 * regcache.c (do_cooked_read): Remove.
1194 (readonly_detached_regcache::readonly_detached_regcache): Make
1195 parameter non-const, adjust call to other constructor.
1196 (reg_buffer::save): Remove src parameter.
1197 * frame.c (do_frame_register_read): Remove.
1198 (frame_save_as_regcache): Use lambda function.
1199 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1200 parameter to ppu2spu_data *.
1201 (ppu2spu_sniffer): Use lambda function.
1203 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1205 * record-full.c (record_full_target::insert_breakpoint): Remove
1206 "struct" keyword, add const.
1208 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1210 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1211 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1212 * configure.ac: Remove AC_PREREQ, add missing quoting.
1213 * gnulib/configure.ac: Modernize usage of
1214 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1215 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1216 (AUTOMAKE_VERSION): Bump to 1.15.1.
1217 * configure: Re-generate.
1218 * config.in: Re-generate.
1219 * aclocal.m4: Re-generate.
1220 * gnulib/aclocal.m4: Re-generate.
1221 * gnulib/config.in: Re-generate.
1222 * gnulib/configure: Re-generate.
1223 * gnulib/import/Makefile.in: Re-generate.
1225 2018-06-19 Pedro Alves <palves@redhat.com>
1227 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1228 (lookup_minimal_symbol_by_pc_section): ... here with
1229 gdb_assert_not_reached added.
1231 2018-06-19 Pedro Alves <palves@redhat.com>
1233 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1234 parameter with a block parameter. Compare location's block symbol
1235 with the frame's block instead of addresses.
1236 (skip_inline_frames): Pass the current block instead of the
1237 frame's address. Break out as soon as we determine the frame
1238 should not be skipped.
1240 2018-06-18 Tom Tromey <tom@tromey.com>
1242 * solib-aix.c (solib_aix_get_section_offsets): Return
1244 (solib_aix_solib_create_inferior_hook): Update.
1246 2018-06-18 Tom Tromey <tom@tromey.com>
1248 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1250 2018-06-18 Tom Tromey <tom@tromey.com>
1252 * solib-frv.c (frv_relocate_main_executable): Use
1254 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1257 2018-06-18 Tom Tromey <tom@tromey.com>
1259 * objfiles.h (inhibit_section_map_updates): Update.
1260 (resume_section_map_updates, resume_section_map_updates_cleanup):
1262 * solib-svr4.c (svr4_handle_solib_event): Update.
1263 * objfiles.c (inhibit_section_map_updates): Return
1264 scoped_restore_tmpl<int>.
1265 (resume_section_map_updates, resume_section_map_updates_cleanup):
1268 2018-06-18 Tom Tromey <tom@tromey.com>
1270 * valprint.h (read_string): Update.
1271 * valprint.c (read_string): Change type of "buffer".
1272 (val_print_string): Update.
1273 * python/py-value.c (valpy_string): Update.
1274 * language.h (struct language_defn) <la_get_string>: Change
1276 (default_get_string, c_get_string): Update.
1277 * language.c (default_get_string): Change type of "buffer".
1278 * guile/scm-value.c (gdbscm_value_to_string): Update.
1279 * c-lang.c (c_get_string): Change type of "buffer".
1281 2018-06-18 Tom Tromey <tom@tromey.com>
1283 * ser-mingw.c (struct pipe_state_destroyer): New.
1284 (pipe_state_up): New typedef.
1285 (cleanup_pipe_state): Remove.
1286 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1288 2018-06-18 Tom Tromey <tom@tromey.com>
1290 * rust-lang.h (rust_yyerror): Don't declare.
1291 * rust-lang.c (rust_language_defn): Update.
1292 * rust-exp.y (yyerror): Now static.
1293 * parse.c (parse_exp_in_context_1): Update.
1294 * p-lang.h (p_yyerror): Don't declare.
1295 * p-lang.c (p_language_defn): Update.
1296 * p-exp.y (yyerror): Now static.
1297 * opencl-lang.c (opencl_language_defn): Update.
1298 * objc-lang.c (objc_language_defn): Update.
1299 * m2-lang.h (m2_yyerror): Don't declare.
1300 * m2-lang.c (m2_language_defn): Update.
1301 * m2-exp.y (yyerror): Now static.
1302 * language.h (struct language_defn) <la_error>: Remove.
1303 * language.c (unk_lang_error): Remove.
1304 (unknown_language_defn, auto_language_defn): Remove.
1305 * go-lang.h (go_yyerror): Don't declare.
1306 * go-lang.c (go_language_defn): Update.
1307 * go-exp.y (yyerror): Now static.
1308 * f-lang.h (f_yyerror): Don't declare.
1309 * f-lang.c (f_language_defn): Update.
1310 * f-exp.y (yyerror): Now static.
1311 * d-lang.h (d_yyerror): Don't declare.
1312 * d-lang.c (d_language_defn): Update.
1313 * d-exp.y (yyerror): Now static.
1314 * c-lang.h (c_yyerror): Don't declare.
1315 * c-lang.c (c_language_defn, cplus_language_defn)
1316 (asm_language_defn, minimal_language_defn): Update.
1317 * c-exp.y (yyerror): Now static.
1318 * ada-lang.h (ada_yyerror): Don't declare.
1319 * ada-lang.c (ada_language_defn): Update.
1320 * ada-exp.y (yyerror): Now static.
1322 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1324 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1325 (store_sveregs_to_thread): Likewise.
1326 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1327 (aarch64_linux_store_inferior_registers): Likewise.
1328 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1330 (aarch64_sve_regs_copy_to_regcache): Likewise.
1331 (aarch64_sve_regs_copy_from_regcache): Likewise.
1332 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1334 (aarch64_sve_regs_copy_to_regcache): Likewise.
1335 (aarch64_sve_regs_copy_from_regcache): Likewise.
1336 (sve_context): Structure from Linux headers.
1337 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1338 (SVE_SIG_ZREG_SIZE): Likewise.
1339 (SVE_SIG_PREG_SIZE): Likewise.
1340 (SVE_SIG_FFR_SIZE): Likewise.
1341 (SVE_SIG_REGS_OFFSET): Likewise.
1342 (SVE_SIG_ZREGS_OFFSET): Likewise.
1343 (SVE_SIG_ZREG_OFFSET): Likewise.
1344 (SVE_SIG_ZREGS_SIZE): Likewise.
1345 (SVE_SIG_PREGS_OFFSET): Likewise.
1346 (SVE_SIG_PREG_OFFSET): Likewise.
1347 (SVE_SIG_PREGS_SIZE): Likewise.
1348 (SVE_SIG_FFR_OFFSET): Likewise.
1349 (SVE_SIG_REGS_SIZE): Likewise.
1350 (SVE_SIG_CONTEXT_SIZE): Likewise.
1351 (SVE_PT_REGS_MASK): Likewise.
1352 (SVE_PT_REGS_FPSIMD): Likewise.
1353 (SVE_PT_REGS_SVE): Likewise.
1354 (SVE_PT_VL_INHERIT): Likewise.
1355 (SVE_PT_VL_ONEXEC): Likewise.
1356 (SVE_PT_REGS_OFFSET): Likewise.
1357 (SVE_PT_FPSIMD_OFFSET): Likewise.
1358 (SVE_PT_FPSIMD_SIZE): Likewise.
1359 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1360 (SVE_PT_SVE_PREG_SIZE): Likewise.
1361 (SVE_PT_SVE_FFR_SIZE): Likewise.
1362 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1363 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1364 (__SVE_SIG_TO_PT): Likewise.
1365 (SVE_PT_SVE_OFFSET): Likewise.
1366 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1367 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1368 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1369 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1370 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1371 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1372 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1373 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1374 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1375 (SVE_PT_SVE_SIZE): Likewise.
1376 (SVE_PT_SIZE): Likewise.
1377 (HAS_SVE_STATE): New define.
1379 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1381 * nat/aarch64-sve-linux-sigcontext.h: New file.
1382 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1384 (SVE_VQ_MIN): Likewise.
1385 (SVE_VQ_MAX): Likewise.
1386 (SVE_VL_MIN): Likewise.
1387 (SVE_VL_MAX): Likewise.
1388 (SVE_NUM_ZREGS): Likewise.
1389 (SVE_NUM_PREGS): Likewise.
1390 (sve_vl_valid): Likewise.
1391 (struct user_sve_header): Likewise.
1393 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1394 Richard Bunt <Richard.Bunt@arm.com>
1396 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1397 was requested by GDB.
1399 2018-06-15 Tom de Vries <tdevries@suse.de>
1401 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1403 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1405 * gnulib/update-gnulib.sh: Print expected versions of
1408 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1410 * arch-utils.c (default_type_align): Use type_length_units.
1411 * gdbtypes.c (type_align): Use type_length_units.
1413 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1415 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1416 of 'define' command.
1418 2018-06-14 Tom de Vries <tdevries@suse.de>
1421 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1422 get_no_prettyformat_print_options.
1424 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1426 * sparc-nat.h: Include target.h.
1427 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1428 <fetch_registers>: Remove this argument in function call.
1429 <store_registers>: Remove this argument in function call, remove
1431 <low_forget_process>: Call sparc64_forget_process instead of
1432 sparc_forget_process.
1434 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1436 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1437 (procfs_target::make_corefile_notes): Adjust to new
1438 target_read_alloc return type.
1440 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1441 Stephen Roberts <stephen.roberts@arm.com>
1444 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1445 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1446 Move should_notify_stop local into more inner scope.
1448 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1449 Stephen Roberts <stephen.roberts@arm.com>
1452 * infrun.c (resume_1): Add call to mark_async_event_handler.
1454 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1456 * infrun.c (do_target_wait): Change old version of $pc printed.
1458 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1460 * dwarf2read.c (read_index_from_section): Rename to...
1461 (read_gdb_index_from_section): ... this, update all callers.
1462 (dwarf2_read_index): Rename to...
1463 (dwarf2_read_gdb_index): ... this, update all callers.
1465 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1467 * gdb/hppa-linux-nat.c
1468 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1469 hppa_linux_nat_target::fetch_registers.
1471 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1473 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1474 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1475 (AARCH64_DWARF_SVE_FFR): Likewise.
1476 (AARCH64_DWARF_SVE_P0): Likewise.
1477 (AARCH64_DWARF_SVE_Z0): Likewise.
1479 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1481 * common/common-regcache.h (raw_compare): New function.
1482 * regcache.c (regcache::raw_compare): Likewise.
1483 * regcache.h (regcache::raw_compare): New declaration.
1485 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1487 * common/common-regcache.h (reg_buffer_common): New structure.
1488 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1489 (reg_buffer::raw_supply): Likewise.
1490 (reg_buffer::raw_supply_integer): Likewise.
1491 (reg_buffer::raw_supply_zeroed): Likewise.
1492 (reg_buffer::raw_collect): Likewise.
1493 (reg_buffer::raw_collect_integer): Likewise.
1494 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1495 (reg_buffer::raw_supply): Likewise.
1496 (reg_buffer::raw_supply_integer): Likewise.
1497 (reg_buffer::raw_supply_zeroed): Likewise.
1498 (reg_buffer::raw_collect): Likewise.
1499 (reg_buffer::raw_collect_integer): Likewise.
1501 2018-06-10 Tom Tromey <tom@tromey.com>
1503 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1504 (class remote_state) <stop_reply_queue>: Now std::vector.
1505 (remote_state::~remote_state)
1506 (remote_target::stop_reply_queue_length): Update.
1507 (struct queue_iter_param, remove_child_of_pending_fork)
1508 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1509 (check_pending_event_prevents_wildcard_vcont_callback)
1510 (remove_stop_reply_for_inferior)
1511 (remove_stop_reply_of_remote_state)
1512 (remote_notif_remove_once_on_match)
1513 (stop_reply_match_ptid_and_ws)
1514 (remote_kill_child_of_pending_fork): Remove.
1515 (remote_target::remove_new_fork_children)
1516 (remote_target::check_pending_events_prevent_wildcard_vcont)
1517 (remote_target::discard_pending_stop_replies)
1518 (remote_target::discard_pending_stop_replies_in_queue)
1519 (remote_target::remote_notif_remove_queued_reply)
1520 (remote_target::queued_stop_reply)
1521 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1522 (remote_target::wait, remote_target::kill_new_fork_children)
1523 (remote_target::async): Update.
1525 2018-06-10 Tom Tromey <tom@tromey.com>
1527 * record-full.c (record_full_arch_list_cleanups): Remove.
1528 (record_full_message): Use try/catch.
1529 (record_full_wait_cleanups): Remove.
1530 (record_full_wait_1): Use try/catch.
1531 (record_full_restore): Likewise.
1533 2018-06-10 Tom Tromey <tom@tromey.com>
1535 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1536 declare VEC. Add constructor.
1537 <in_target_beneath>: Now bool.
1538 (record_full_breakpoints): Now a std::vector, static.
1539 (record_full_sync_record_breakpoints)
1540 (record_full_init_record_breakpoints)
1541 (record_full_target::insert_breakpoint)
1542 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1544 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1546 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1547 * serial.c (serial_interface_lookup): Remove struct keyword.
1549 2018-06-10 Tom Tromey <tom@tromey.com>
1551 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1553 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1555 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1557 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1558 "beneath" as a method.
1559 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1560 Use "beneath" as a method.
1562 2018-06-10 Tom Tromey <tom@tromey.com>
1564 * tracefile.c (struct trace_file_writer_deleter): New.
1565 <operator()>: Rename from trace_file_writer_xfree.
1566 (trace_file_writer_up): New typedef.
1567 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1569 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1571 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1572 <m_registers, m_register_status>: Change type to
1574 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1577 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1579 * common/common-regcache.h (enum register_status): Add
1580 underlying type "signed char".
1581 * regcache.h (reg_buffer) <m_register_status>: Change type to
1583 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1584 register_status instead of signed char.
1585 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1586 (reg_buffer::get_register_status): Remove cast.
1587 (readable_regcache::raw_read): Remove cast.
1588 (readable_regcache::cooked_read): Remove cast.
1590 2018-06-09 Tom Tromey <tom@tromey.com>
1592 * source.c (reverse_search_command, forward_search_command): Use
1595 2018-06-09 Tom Tromey <tom@tromey.com>
1597 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1598 (serial_ops_list): Now static, std::vector.
1599 (serial_interface_lookup, serial_add_interface): Update.
1601 2018-06-09 Tom Tromey <tom@tromey.com>
1603 * dwarf2read.c (process_cu_includes): Update.
1604 (process_full_comp_unit): Update.
1605 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1608 2018-06-08 Paul Koning <paul_koning@dell.com>
1612 * python/python.c (do_start_initialization):
1613 Avoid call to internal Python API.
1614 (init__gdb_module): New function.
1616 2018-06-08 Gary Benson <gbenson@redhat.com>
1618 * linux-thread-db.c (valprint.h): New include.
1619 (struct check_thread_db_info): New structure.
1620 (check_thread_db_on_load, tdb_testinfo): New static globals.
1621 (check_thread_db, check_thread_db_callback): New functions.
1622 (try_thread_db_load_1): Run integrity checks if requested.
1623 (maintenance_check_libthread_db): New function.
1624 (_initialize_thread_db): Register "maint check libthread-db"
1625 and "maint set/show check-libthread-db".
1626 * NEWS: Mention the above new commands.
1628 2018-06-08 Tom Tromey <tom@tromey.com>
1630 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1633 2018-06-08 Tom Tromey <tom@tromey.com>
1635 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1637 2018-06-08 Tom Tromey <tom@tromey.com>
1639 * common/btrace-common.h (struct btrace_data): Add constructor,
1640 destructor, move assignment operator.
1641 <empty, clear, fini>: New methods.
1642 <format>: Initialize.
1643 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1644 (btrace_data_empty): Don't declare.
1645 * common/btrace-common.c (btrace_data_init): Remove.
1646 (btrace_data::fini): Rename from btrace_data_fini.
1647 (btrace_data::empty): Rename from btrace_data_empty.
1648 (btrace_data::clear): Rename from btrace_data_clear. Return
1650 * btrace.h (make_cleanup_btrace_data): Don't declare.
1651 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1652 (parse_xml_btrace): Update.
1653 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1654 (maint_btrace_clear_packet_history_cmd): Update.
1656 2018-06-07 Pedro Alves <palves@redhat.com>
1658 * target.h (target_ops) <beneath>: Now a method. All references
1660 (class target_stack): New.
1661 * target.c (g_target_stack): New.
1662 (g_current_top_target): Delete.
1663 (current_top_target): Get the top target out of g_target_stack.
1664 (target_stack::push, target_stack::unpush): New.
1665 (push_target, unpush_target): Reimplement.
1666 (target_is_pushed): Reimplement in terms of g_target_stack.
1667 (target_ops::beneath, target_stack::find_beneath): New.
1669 2018-06-07 Pedro Alves <palves@redhat.com>
1671 * target.h (find_target_beneath): Delete declaration.
1672 * target.c (find_target_beneath): Delete definition.
1673 * aix-thread.c: All callers of find_target_beneath adjusted to
1674 call target_ops::beneath instead.
1675 * bsd-uthread.c: Likewise.
1676 * linux-thread-db.c: Likewise.
1677 * ravenscar-thread.c: Likewise.
1678 * sol-thread.c: Likewise.
1679 * spu-multiarch.c: Likewise.
1681 2018-06-07 Pedro Alves <palves@redhat.com>
1683 * target.h (target_ops) <beneath>: Now a method. All references
1685 (target_ops) <m_beneath>: New.
1686 * target.c (target_ops::beneath): New.
1687 * corelow.c: Adjust all references to target_ops::beneath.
1688 * linux-thread-db.c: Likewise.
1689 * make-target-delegates: Likewise.
1690 * record-btrace.c: Likewise.
1691 * record-full.c: Likewise.
1692 * remote.c: Likewise.
1693 * target.c: Likewise.
1694 * target-delegates.c: Regenerate.
1696 2018-06-07 Pedro Alves <palves@redhat.com>
1698 * target.h (target_stack): Delete.
1699 (current_top_target): Declare function.
1700 * target.c (target_stack): Delete.
1701 (g_current_top_target): New.
1702 (current_top_target): New function.
1703 * auxv.c: Use current_top_target instead of target_stack
1705 * avr-tdep.c: Likewise.
1706 * breakpoint.c: Likewise.
1707 * corefile.c: Likewise.
1708 * elfread.c: Likewise.
1710 * exceptions.c: Likewise.
1711 * frame.c: Likewise.
1712 * gdbarch-selftests.c: Likewise.
1713 * gnu-v3-abi.c: Likewise.
1714 * ia64-tdep.c: Likewise.
1715 * ia64-vms-tdep.c: Likewise.
1716 * infcall.c: Likewise.
1717 * infcmd.c: Likewise.
1718 * infrun.c: Likewise.
1719 * linespec.c: Likewise.
1720 * linux-tdep.c: Likewise.
1721 * minsyms.c: Likewise.
1722 * ppc-linux-nat.c: Likewise.
1723 * ppc-linux-tdep.c: Likewise.
1724 * procfs.c: Likewise.
1725 * regcache.c: Likewise.
1726 * remote.c: Likewise.
1727 * rs6000-tdep.c: Likewise.
1728 * s390-linux-nat.c: Likewise.
1729 * s390-tdep.c: Likewise.
1730 * solib-aix.c: Likewise.
1731 * solib-darwin.c: Likewise.
1732 * solib-dsbt.c: Likewise.
1733 * solib-spu.c: Likewise.
1734 * solib-svr4.c: Likewise.
1735 * solib-target.c: Likewise.
1736 * sparc-tdep.c: Likewise.
1737 * sparc64-tdep.c: Likewise.
1738 * spu-tdep.c: Likewise.
1739 * symfile.c: Likewise.
1740 * symtab.c: Likewise.
1741 * target-descriptions.c: Likewise.
1742 * target-memory.c: Likewise.
1743 * target.c: Likewise.
1744 * target.h: Likewise.
1745 * tracefile-tfile.c: Likewise.
1746 * tracepoint.c: Likewise.
1747 * valops.c: Likewise.
1748 * valprint.c: Likewise.
1749 * value.c: Likewise.
1750 * windows-tdep.c: Likewise.
1751 * mi/mi-main.c: Likewise.
1753 2018-06-07 Tom Tromey <tom@tromey.com>
1755 * valprint.h (build_address_symbolic): Declare.
1756 * printcmd.c (print_address_symbolic): Update.
1757 (build_address_symbolic): Change "name" and "filename" to
1759 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1761 * defs.h (build_address_symbolic): Remove declaration.
1763 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1765 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1766 (aarch64_vnv_type): Add function.
1767 (aarch64_pseudo_register_name): Add V regs for SVE.
1768 (aarch64_pseudo_register_type): Likewise.
1769 (aarch64_pseudo_register_reggroup_p): Likewise.
1770 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1771 (aarch64_pseudo_read_value): Add V regs for SVE.
1772 (aarch64_pseudo_write_2): Use V0 offset for SVE
1773 (aarch64_pseudo_write): Add V regs for SVE.
1774 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1776 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1778 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1779 (sve_vl_from_vq): Likewise.
1781 2018-06-05 Tom Tromey <tom@tromey.com>
1783 * cli/cli-cmds.c (show_version): Update.
1784 * top.c (print_gdb_version): Add "interactive" parameter.
1786 * main.c (captured_main_1): Update.
1787 * top.h (print_gdb_version): Add "interactive" parameter and a
1790 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1792 * common/enum-flags.h: Add trailing semicolon to example in
1795 2018-06-05 Tom Tromey <tom@tromey.com>
1798 * NEWS: Add entry about pager.
1799 * utils.c (pagination_disabled_for_command): New global.
1800 (prompt_for_continue): Allow "c" response to prompt.
1801 (reinitialize_more_filter): Clear
1802 pagination_disabled_for_command.
1803 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1805 2018-06-04 Tom Tromey <tom@tromey.com>
1807 * ada-lang.h (ada_lookup_symbol_list): Update.
1808 * ada-lang.c (resolve_subexp): Update.
1809 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1811 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1812 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1813 results parameter to std::vector.
1814 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1816 * ada-exp.y (block_lookup): Update.
1817 (select_possible_type_sym): Change type of syms. Remove nsyms
1819 (write_var_or_type, write_name_assoc): Update.
1821 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1823 * windows-nat.c (windows_nat_target::xfer_partial): Return
1824 TARGET_XFER_E_IO if we need to delegate to the target beneath
1825 but BENEATH is NULL.
1827 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1829 * Makefile.in (config.status): Add configure.nat as a
1832 2018-06-04 Tom Tromey <tom@tromey.com>
1834 * cp-name-parser.y (cpname_state): Add method declarations.
1835 (HANDLE_QUAL): Update.
1836 (cpname_state::d_grab, cpname_state::fill_comp)
1837 (cpname_state::make_operator, cpname_state::make_dtor)
1838 (cpname_state::make_builtin_type, cpname_state::make_name)
1839 (cpname_state::d_qualify, cpname_state::d_int_type)
1840 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1841 (%union): Move earlier.
1843 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1845 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1847 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1849 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1850 (aarch64_pseudo_write_1): Likewise.
1851 (aarch64_pseudo_read_value): Use helper.
1852 (aarch64_pseudo_write): Likewise.
1854 2018-06-04 Pedro Alves <palves@redhat.com>
1856 * darwin-nat.c (darwin_ops): Delete.
1857 (darwin_attach_pid): Use get_native_target.
1859 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1861 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1862 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1864 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1866 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1867 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1868 (aarch64_gdbarch_init): Check for SVE.
1869 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1871 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1873 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1874 * aarch64-tdep.h (aarch64_read_description): Likewise.
1875 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1876 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1877 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1878 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1879 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1881 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1883 * value.c (value_fetch_lazy_bitfield): New.
1884 (value_fetch_lazy_memory): New.
1885 (value_fetch_lazy_register): New.
1886 (value_fetch_lazy): Factor out to smaller functions.
1888 2018-06-01 Tom Tromey <tom@tromey.com>
1890 * cp-name-parser.y (backslashable, represented): Now const.
1892 2018-06-01 Tom Tromey <tom@tromey.com>
1894 * cp-name-parser.y: Include parser-defs.h.
1895 (parser_fprintf): Remove declaration.
1897 2018-06-01 Tom Tromey <tom@tromey.com>
1899 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1901 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1902 (global_result): Remove globals.
1903 (struct cpname_state): New.
1904 (yyparse): Don't declare.
1905 (yylex, yyerror): Move declarations after %union.
1906 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1907 (make_name): Add state parameter.
1909 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1911 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1913 (yylex): Add lvalp, state parameters.
1914 (yyerror): Add state parameter.
1915 (cp_demangled_name_to_comp): Update.
1917 2018-06-01 Tom Tromey <tom@tromey.com>
1919 * cp-name-parser.y (parser_fprintf): Declare.
1920 (GDB_YY_REMAP_PREFIX): Define.
1921 Include yy-remap.h. Don't redefine yy* identifiers.
1923 2018-06-01 Tom Tromey <tom@tromey.com>
1925 * python/py-type.c (typy_legacy_template_argument): Update.
1926 * cp-support.h (cp_demangled_name_to_comp): Update.
1927 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1928 parameter to be a "std::string *".
1931 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1933 * ada-lex.l: Include "diagnostics.h" instead of
1934 "common/diagnostics.h".
1935 * unittests/environ-selftests.c: Likewise.
1936 * common/diagnostics.h: Moved to ../include.
1938 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1940 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1941 to language_mode_manual while calling breakpoint_re_set_one.
1943 2018-06-01 Tom Tromey <tom@tromey.com>
1945 * valops.c (value_cast_structs, destructor_name_p): Update.
1946 * symtab.c (gdb_mangle_name): Update.
1947 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1949 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1950 (pascal_object_print_value_fields, pascal_object_print_value):
1952 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1953 * linespec.c (find_methods): Update.
1954 * gdbtypes.h (type_name_no_tag): Remove.
1955 (type_name_or_error): Rename from type_name_no_tag_or_error.
1956 * gdbtypes.c (type_name_no_tag): Remove.
1957 (type_name_or_error): Rename from type_name_no_tag_or_error.
1958 (lookup_struct_elt_type, check_typedef): Update.
1959 * expprint.c (print_subexp_standard): Update.
1960 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1961 * d-namespace.c (d_lookup_nested_symbol): Update.
1962 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1963 (cp_print_class_member): Update.
1964 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1965 * completer.c (add_struct_fields): Update.
1966 * c-typeprint.c (cp_type_print_derivation_info)
1967 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1969 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1970 (ada_prefer_type, ada_is_exception_sym): Update.
1972 2018-06-01 Tom Tromey <tom@tromey.com>
1974 * valops.c (enum_constant_from_type, value_namespace_elt)
1975 (value_maybe_namespace_elt): Update.
1976 * valarith.c (find_size_for_pointer_math): Update.
1977 * target-descriptions.c (make_gdb_type): Update.
1978 * symmisc.c (print_symbol): Update.
1979 * stabsread.c (define_symbol, read_type)
1980 (complain_about_struct_wipeout, add_undefined_type)
1981 (cleanup_undefined_types_1): Update.
1982 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1983 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1984 (rust_internal_print_type, rust_composite_type)
1985 (rust_evaluate_funcall, rust_evaluate_subexp)
1986 (rust_inclusive_range_type_p): Update.
1987 * python/py-type.c (typy_get_tag): Update.
1988 * p-typeprint.c (pascal_type_print_base): Update.
1989 * mdebugread.c (parse_symbol, parse_type): Update.
1990 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1992 * guile/scm-type.c (gdbscm_type_tag): Update.
1993 * go-lang.c (sixg_string_p): Update.
1994 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1996 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1997 (TYPE_TAG_NAME): Remove.
1998 * gdbtypes.c (type_name_no_tag): Simplify.
1999 (check_typedef, check_types_equal, recursive_dump_type)
2000 (copy_type_recursive, arch_composite_type): Update.
2001 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2002 in summary mode when needed.
2003 * eval.c (evaluate_funcall): Update.
2004 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2005 (process_structure_scope, read_enumeration_type)
2006 (read_namespace_type, read_module_type, determine_prefix): Update.
2007 * cp-support.c (inspect_type): Update.
2008 * coffread.c (process_coff_symbol, decode_base_type): Update.
2009 * c-varobj.c (c_is_path_expr_parent): Update.
2010 * c-typeprint.c (c_type_print_base_struct_union): Update.
2011 (c_type_print_base_1): Update. Print struct/class/union/enum in
2012 summary when using C language.
2013 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2014 (gen_maybe_namespace_elt): Update.
2015 * ada-lang.c (ada_type_name): Simplify.
2016 (empty_record, ada_template_to_fixed_record_type_1)
2017 (template_to_static_fixed_type)
2018 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2020 2018-06-01 Tom Tromey <tom@tromey.com>
2022 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2024 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2025 (c_print_type): Update.
2026 (c_print_type): New overload.
2027 (c_type_print_varspec_prefix, c_type_print_args)
2028 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2029 (c_type_print_base_struct_union, c_type_print_base_1)
2030 (cp_type_print_method_args): Add "language" parameter.
2031 (c_type_print_base): Update.
2032 * c-lang.h (c_print_type): Add new overload.
2034 2018-06-01 Tom Tromey <tom@tromey.com>
2036 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2037 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2039 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2041 * aarch64-tdep.c (aarch64_sve_register_names): New const
2043 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2044 (AARCH64_SVE_Z_REGS_NUM): New define.
2045 (AARCH64_SVE_P_REGS_NUM): Likewise.
2046 (AARCH64_SVE_NUM_REGS): Likewise.
2048 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2050 * nat/linux-ptrace.h [__alpha__]
2051 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2054 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2056 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2057 the endianness selected.
2058 * NEWS: Document `set endian auto' mode operation update.
2060 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2062 * Makefile.in: Add new header.
2063 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2064 (sve_vl_from_vg): Likewise.
2065 (sve_vq_from_vl): Likewise.
2066 (sve_vl_from_vq): Likewise.
2067 (sve_vq_from_vg): Likewise.
2068 (sve_vg_from_vq): Likewise.
2069 * configure.nat: Add new c file.
2070 * nat/aarch64-sve-linux-ptrace.c: New file.
2071 * nat/aarch64-sve-linux-ptrace.h: New file.
2073 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2075 * aarch64-linux-nat.c (aarch64_linux_read_description):
2077 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2079 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2080 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2081 (aarch64_gdbarch_init): Add parmeter zero.
2082 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2083 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2084 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2086 * doc/gdb.texinfo: Describe SVE feature
2087 * features/aarch64-sve.c: New file.
2089 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2092 * gdbarch.sh (significant_addr_bit): Default to zero when
2093 not set by target architecture.
2094 * gdbarch.c: Re-generated.
2095 * utils.c (address_significant): Update.
2097 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2099 * stack.c (func_command): Remove trailing newline in call to error.
2101 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2103 * regcache.h (regcache_raw_collect): Remove, update callers to
2104 use regcache::raw_collect.
2105 * regcache.c (regcache_raw_collect): Remove.
2107 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2109 * regcache.h (regcache_raw_supply): Remove, update callers to
2110 use detached_regcache::raw_supply.
2111 * regcache.c (regcache_raw_supply): Remove.
2113 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2115 * regcache.h (regcache_cooked_write_part): Remove, update
2116 callers to use regcache::cooked_write_part.
2117 * regcache.c (regcache_cooked_write_part): Remove.
2119 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2121 * regcache.h (regcache_cooked_read_part): Remove, update callers
2122 to use readable_regcache::cooked_read_part.
2123 * regcache.c (regcache_cooked_read_part): Remove.
2125 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2127 * regcache.h (regcache_cooked_read_value): Remove, update
2128 callers to use readable_regcache::cooked_read_value.
2129 * regcache.c (regcache_cooked_read_value): Remove.
2131 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2133 * regcache.h (regcache_cooked_write): Remove, update callers to
2134 use regcache::cooked_write.
2135 * regcache.c (regcache_cooked_write): Remove.
2137 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2139 * regcache.h (regcache_invalidate): Remove, update callers to
2140 use detached_regcache::invalidate instead.
2141 * regcache.c (regcache_invalidate): Remove.
2143 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2145 * regcache.h (regcache_raw_write_part): Remove, update callers
2146 to use regcache::raw_write_part instead.
2147 * regcache.c (regcache_raw_write_part): Remove.
2149 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2151 * regcache.h (regcache_raw_read_part): Remove, update callers to
2152 use readable_regcache::raw_read_part instead.
2153 * regcache.c (regcache_raw_read_part): Remove.
2155 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2157 * regcache.h (regcache_cooked_read): Remove, update callers to
2158 use readable_regcache::cooked_read instead.
2159 * regcache.c (regcache_cooked_read): Remove.
2161 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2163 * regcache.h (regcache_raw_write): Remove, update callers to use
2164 regcache::raw_write instead.
2165 * regcache.c (regcache_raw_write): Remove.
2167 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2169 * regcache.h (regcache_raw_read): Remove, update callers to use
2170 readable_regcache::raw_read instead.
2171 * regcache.c (regcache_raw_read): Remove.
2173 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2175 * regcache.h (regcache_raw_update): Remove, update callers to
2176 use readable_regcache::raw_update instead.
2177 * regcache.c (regcache_raw_update): Remove.
2179 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2181 * regcache.h (regcache_register_status): Remove, update callers
2182 to use reg_buffer::get_register_status directly instead.
2183 * regcache.c (regcache_register_status): Remove.
2185 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2187 * regcache.h (regcache_get_ptid): Remove, update all callers to
2188 call regcache::ptid instead.
2189 * regcache.c (regcache_get_ptid): Remove.
2191 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2193 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2195 2018-05-30 Pedro Alves <palves@redhat.com>
2197 * common/common-exceptions.h (exception_rethrow): Use
2200 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2202 * breakpoint.c (print_solib_event, check_status_catch_solib):
2203 Remove struct keyword in range-based for loops.
2204 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2205 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2207 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2209 * symfile.c (addr_info_make_relative): Likewise.
2210 * thread.c (value_in_thread_stack_temporaries): Likewise.
2212 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2215 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2216 aggregate type to get its real type before accessing it.
2218 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2220 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2221 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2222 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2223 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2224 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2225 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2226 * printcmd.c (info_address_command): Likewise.
2228 2018-05-29 Tom Tromey <tom@tromey.com>
2230 * windows-nat.c (handle_exception): Update fall-through comment.
2232 2018-05-29 Tom Tromey <tom@tromey.com>
2234 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2235 (struct program_space) <added_solibs>: Now a std::vector.
2236 * breakpoint.c (print_solib_event): Update.
2237 (check_status_catch_solib): Update.
2238 * progspace.c (clear_program_space_solib_cache): Update.
2239 * solib.c (update_solib_list): Update.
2241 2018-05-29 Tom Tromey <tom@tromey.com>
2243 * python/py-type.c (typy_richcompare): Update.
2244 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2245 * gdbtypes.h (types_deeply_equal): Return bool.
2246 (types_equal): Likewise.
2247 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2249 (check_types_equal): Change worklist to std::vector. Return
2251 (struct type_equality_entry): Add constructor.
2252 (compare_maybe_null_strings): Return bool.
2253 (check_types_worklist): Return bool. Change worklist to
2255 (types_deeply_equal): Use std::vector.
2256 (types_equal): Return bool.
2257 (compare_maybe_null_strings): Simplify.
2259 2018-05-29 Tom Tromey <tom@tromey.com>
2261 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2263 2018-05-29 Tom Tromey <tom@tromey.com>
2265 * objc-lang.h: Don't include cp-support.h.
2266 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2269 2018-05-27 Tom Tromey <tom@tromey.com>
2271 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2273 2018-05-25 Tom Tromey <tom@tromey.com>
2275 * value.c (value::location): Initialize.
2277 2018-05-25 Tom Tromey <tom@tromey.com>
2279 * dbxread.c (init_bincl_list): Remove.
2280 (bincl_list): Now a std::vector.
2281 (bincls_allocated, next_bincl): Remove.
2282 (free_bincl_list, do_free_bincl_list_cleanup)
2283 (make_cleanup_free_bincl_list): Remove.
2284 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2286 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2287 (struct header_file_location): Add constructor.
2288 (add_bincl_to_list): Remove.
2290 2018-05-25 Tom Tromey <tom@tromey.com>
2292 * tui/tui.c (tui_enable): Update.
2293 * mi/mi-interp.c (mi_interp::init): Update.
2294 * interps.h (class interp) <name>: New method.
2295 <m_name>: Rename from name.
2296 (~scoped_restore_interp): Update.
2297 * interps.c (interp::interp): Update.
2298 (interp_add, interp_set, interp_lookup_existing)
2299 (current_interp_named_p): Update.
2301 2018-05-25 Tom Tromey <tom@tromey.com>
2303 * interps.c (interp_name): Remove.
2304 * mi/mi-interp.c (mi_interp::init): Update.
2305 * interps.h (interp_name): Remove.
2306 (~scoped_restore_interp): Update.
2307 * tui/tui.c (tui_enable): Update.
2309 2018-05-25 Tom Tromey <tom@tromey.com>
2311 * utils.c (fputs_maybe_filtered): Update.
2312 * linespec.c (decode_line_full): Update.
2313 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2314 (mi_print_breakpoint_for_event, mi_solib_loaded)
2315 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2316 (mi_user_selected_context_changed): Update.
2317 * mi/mi-main.c (mi_execute_command): Update.
2318 * cli/cli-script.c (execute_control_command): Update.
2319 * python/python.c (execute_gdb_command): Update.
2320 * solib.c (info_sharedlibrary_command): Update.
2321 * interps.c (interp_ui_out): Remove.
2322 * interps.h (interp_ui_out): Remove.
2324 2018-05-25 Tom Tromey <tom@tromey.com>
2326 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2327 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2328 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2330 2018-05-25 Tom Tromey <tom@tromey.com>
2332 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2333 * interps.c (interp_exec): Use scoped_restore.
2335 2018-05-25 Tom Tromey <tom@tromey.com>
2337 * remote.c (remote_target::remote_file_get): Use
2339 (remote_target::remote_file_put): Likewise.
2341 2018-05-25 Tom Tromey <tom@tromey.com>
2343 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2345 (get_pe_section_index, add_pe_exported_sym): Update.
2346 (read_pe_exported_syms): Use gdb::def_vector.
2348 2018-05-25 Tom Tromey <tom@tromey.com>
2350 * frame.c (remove_prev_frame): Remove.
2351 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2353 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2355 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2357 * mips-linux-nat.c (supply_fpregset): Always call
2358 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2359 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2360 `mips_fill_fpregset'.
2361 * mips-linux-tdep.c (mips_supply_fpregset)
2362 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2363 (mips_fill_fpregset_wrapper): Remove functions.
2364 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2365 (mips_linux_fpregset): Remove variable.
2366 (mips_linux_iterate_over_regset_sections): Use
2367 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2368 (mips_linux_o32_sigframe_init): Remove comment.
2370 2018-05-25 Pedro Alves <palves@redhat.com>
2372 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2373 (struct readahead_cache, struct packet_reg, struct
2374 remote_arch_state, class remote_state): Move higher up in the
2376 (remote_target::m_remote_state): Now an object instead of a pointer.
2377 (remote_target::get_remote_state): Adjust.
2379 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2381 * stack.c (select_and_print_frame): Delete.
2382 (struct function_bounds): Move struct within function.
2383 (func_command): Most content moved into new function
2384 find_frame_for_function, use new function, print result, add
2386 (find_frame_for_function): New function, now returns a result.
2388 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2390 * stack.c (iterate_over_block_arg_vars): Fix comment.
2391 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2393 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2397 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2399 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2401 * frame.h (class scoped_restore_selected_frame): New class.
2402 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2403 of any exception, use scoped_restore_selected_frame to restore the
2406 2018-05-24 Pedro Alves <palves@redhat.com>
2408 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2411 2018-05-23 Tom Tromey <tom@tromey.com>
2413 * complaints.c (struct complaints): Remove.
2414 (symfile_complaint_book): Remove.
2415 (series): New global.
2416 (complaint_internal): Update.
2417 (clear_complaints): Update.
2419 2018-05-23 Tom Tromey <tom@tromey.com>
2421 * complaints.c (counters): New global.
2422 (struct complain): Remove.
2423 (struct complaints) <root>: Remove.
2424 (complaint_sentinel): Remove.
2425 (symfile_complaint_book): Update.
2426 (find_complaint) Remove.
2427 (complaint_internal, clear_complaints): Update.
2429 2018-05-23 Tom Tromey <tom@tromey.com>
2431 * complaints.c (struct complain) <file, line>: Remove.
2432 (find_complaint): Remove file, line parameters.
2433 (complaint_internal): Update.
2435 2018-05-23 Tom Tromey <tom@tromey.com>
2437 * complaints.c (vcomplaint): Remove.
2438 (complaint_internal) Merge in contents of vcomplaint.
2440 2018-05-23 Tom Tromey <tom@tromey.com>
2442 * complaints.c (struct complaints) <explanation>: Remove.
2443 (symfile_explanations): Remove.
2444 (symfile_complaint_book): Update.
2445 (vcomplaint): Update.
2446 (struct explanation): Remove.
2448 2018-05-23 Tom Tromey <tom@tromey.com>
2450 * complaints.c (symfile_complaints): Remove.
2451 (complaint_internal): Remove "complaints" parameter.
2452 (clear_complaints, vcomplaint): Remove "c" parameter.
2453 (get_complaints): Remove.
2454 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2455 (dwarf2_debug_line_missing_file_complaint)
2456 (dwarf2_debug_line_missing_end_sequence_complaint)
2457 (dwarf2_complex_location_expr_complaint)
2458 (dwarf2_const_value_length_mismatch_complaint)
2459 (dwarf2_section_buffer_overflow_complaint)
2460 (dwarf2_macro_malformed_definition_complaint)
2461 (dwarf2_invalid_attrib_class_complaint)
2462 (create_addrmap_from_index, dw2_symtab_iter_next)
2463 (dw2_expand_marked_cus)
2464 (dw2_debug_names_iterator::find_vec_in_debug_names)
2465 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2466 (create_debug_type_hash_table, init_cutu_and_read_dies)
2467 (partial_die_parent_scope, add_partial_enumeration)
2468 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2469 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2470 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2471 (create_cus_hash_table, create_dwp_hash_table)
2472 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2473 (dwarf2_rnglists_process, dwarf2_ranges_process)
2474 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2475 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2476 (handle_struct_member_die, process_structure_scope)
2477 (read_array_type, read_common_block, read_module_type)
2478 (read_tag_pointer_type, read_typedef, read_base_type)
2479 (read_subrange_type, load_partial_dies, partial_die_info::read)
2480 (partial_die_info::read, partial_die_info::read)
2481 (partial_die_info::read, read_checked_initial_length_and_offset)
2482 (dwarf2_string_attr, read_formatted_entries)
2483 (dwarf_decode_line_header)
2484 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2485 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2486 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2487 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2488 (get_signatured_type, get_DW_AT_signature_type)
2489 (decode_locdesc, file_file_name, consume_improper_spaces)
2490 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2491 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2492 (dwarf2_symbol_mark_computed, set_die_type)
2493 (read_attribute_value): Update.
2494 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2496 * dbxread.c (unknown_symtype_complaint)
2497 (lbrac_mismatch_complaint, repeated_header_complaint)
2498 (set_namestring, function_outside_compilation_unit_complaint)
2499 (read_dbx_symtab, process_one_symbol): Update.
2500 * gdbtypes.c (stub_noname_complaint): Update.
2501 * windows-nat.c (handle_unload_dll): Update.
2502 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2503 (decode_base_type): Update.
2504 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2505 (eb_complaint, record_include_begin, record_include_end)
2506 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2507 (process_xcoff_symbol, read_symbol)
2508 (function_outside_compilation_unit_complaint)
2509 (scan_xcoff_symtab): Update.
2510 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2511 * buildsym.c (finish_block_internal, make_blockvector)
2512 (end_symtab_get_static_block, augment_type_symtab): Update.
2513 * dtrace-probe.c (dtrace_process_dof)
2514 (dtrace_static_probe_ops::get_probes): Update.
2515 * complaints.h (struct complaint): Don't declare.
2516 (symfile_complaints): Remove.
2517 (complaint_internal): Remove "complaints" parameter.
2518 (complaint): Likewise.
2519 (clear_complaints): Likewise.
2520 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2521 (reread_symbols): Update.
2522 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2523 (dwarf2_frame_cache, decode_frame_entry): Update.
2524 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2525 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2526 (info_selectors_command): Update.
2527 * macrotab.c (macro_include, check_for_redefinition)
2528 (macro_undef): Update.
2529 * objfiles.c (filter_overlapping_sections): Update.
2530 * stabsread.c (invalid_cpp_abbrev_complaint)
2531 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2532 (define_symbol, error_type, read_type, rs6000_builtin_type)
2533 (stabs_method_name_from_physname, read_member_functions)
2534 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2535 (attach_fields_to_type, complain_about_struct_wipeout)
2536 (read_range_type, read_args, common_block_start)
2537 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2539 * mdebugread.c (index_complaint, unknown_ext_complaint)
2540 (basic_type_complaint, bad_tag_guess_complaint)
2541 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2542 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2543 (parse_procedure, parse_lines)
2544 (function_outside_compilation_unit_complaint)
2545 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2546 (bad_tag_guess_complaint, reg_value_complaint): Update.
2547 * cp-support.c (demangled_name_complaint): Update.
2548 * macroscope.c (sal_macro_scope): Update.
2549 * dwarf-index-write.c (class debug_names): Update.
2551 2018-05-23 Tom Tromey <tom@tromey.com>
2553 * complaints.c (clear_complaints): Remove "noisy" parameter.
2554 * complaints.h (clear_complaints): Update.
2555 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2556 (reread_symbols): Update.
2558 2018-05-23 Tom Tromey <tom@tromey.com>
2560 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2562 (vcomplaint, clear_complaints): Update.
2563 (symfile_explanations): Remove some messages.
2565 2018-05-23 Tom Tromey <tom@tromey.com>
2567 * complaints.c (internal_complaint): Remove.
2568 * complaints.h (internal_complaint): Remove.
2570 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2572 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2574 2018-05-22 Pedro Alves <palves@redhat.com>
2576 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2577 (remote_fileio_badfd, remote_fileio_return_errno)
2578 (remote_fileio_return_success, remote_fileio_func_open)
2579 (remote_fileio_func_open, remote_fileio_func_close)
2580 (remote_fileio_func_read, remote_fileio_func_write)
2581 (remote_fileio_func_lseek, remote_fileio_func_rename)
2582 (remote_fileio_func_unlink, remote_fileio_func_stat)
2583 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2584 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2585 remote_target parameter.
2586 (remote_fio_func_map) <func>: Add remote_target parameter.
2587 (do_remote_fileio_request, remote_fileio_request):
2588 * remote-fileio.h (remote_fileio_request):
2589 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2590 remote_target parameter.
2591 (remote_notif_process, handle_notification): Adjust to pass down
2593 (remote_notif_state_allocate): Add remote_target parameter. Save
2595 * remote-notif.h (struct remote_target): Forward declare.
2596 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2597 remote_target parameter.
2598 (struct remote_notif_state) <remote>: New field.
2599 (remote_notif_ack, remote_notif_parse): Add remote_target
2601 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2602 remote_target parameter.
2603 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2604 (threads_listing_context, rmt_thread_action, protocol_feature)
2605 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2606 (packet_result, struct threads_listing_context, remote_state):
2607 Move definitions and declarations higher up.
2608 (remote_target) <~remote_target>: Declare.
2609 (remote_download_command_source, remote_file_put, remote_file_get)
2610 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2611 (remote_hostio_pread_vFile, remote_hostio_send_command)
2612 (remote_hostio_set_filesystem, remote_hostio_open)
2613 (remote_hostio_close, remote_hostio_unlink, remote_state)
2614 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2615 (get_memory_write_packet_size, get_memory_read_packet_size)
2616 (append_pending_thread_resumptions, remote_detach_1)
2617 (append_resumption, remote_resume_with_vcont)
2618 (add_current_inferior_and_thread, wait_ns, wait_as)
2619 (process_stop_reply, remote_notice_new_inferior)
2620 (process_initial_stop_replies, remote_add_thread)
2621 (btrace_sync_conf, remote_btrace_maybe_reopen)
2622 (remove_new_fork_children, kill_new_fork_children)
2623 (discard_pending_stop_replies, stop_reply_queue_length)
2624 (check_pending_events_prevent_wildcard_vcont)
2625 (discard_pending_stop_replies_in_queue, stop_reply)
2626 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2627 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2628 (remote_interrupt_as, remote_interrupt_ns)
2629 (remote_get_noisy_reply, remote_query_attached)
2630 (remote_add_inferior, remote_current_thread, get_current_thread)
2631 (set_thread, set_general_thread, set_continue_thread)
2632 (set_general_process, write_ptid)
2633 (remote_unpack_thread_info_response, remote_get_threadinfo)
2634 (parse_threadlist_response, remote_get_threadlist)
2635 (remote_threadlist_iterator, remote_get_threads_with_ql)
2636 (remote_get_threads_with_qxfer)
2637 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2638 (get_offsets, remote_check_symbols, remote_supported_packet)
2639 (remote_query_supported, remote_packet_size)
2640 (remote_serial_quit_handler, remote_detach_pid)
2641 (remote_vcont_probe, remote_resume_with_hc)
2642 (send_interrupt_sequence, interrupt_query)
2643 (remote_notif_get_pending_events, fetch_register_using_p)
2644 (send_g_packet, process_g_packet, fetch_registers_using_g)
2645 (store_register_using_P, store_registers_using_G)
2646 (set_remote_traceframe, check_binary_download)
2647 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2648 (remote_xfer_live_readonly_partial, remote_read_bytes)
2649 (remote_send_printf, remote_flash_write, readchar)
2650 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2651 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2652 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2653 (extended_remote_disable_randomization, extended_remote_run)
2654 (send_environment_packet, extended_remote_environment_support)
2655 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2656 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2657 (packet_command): Now methods of ...
2658 (remote_target): ... this class.
2659 (m_remote_state) <remote_target>: New field.
2660 (struct remote_state) <stop_reply_queue,
2661 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2663 (remote_state::remote_state): Allocate stop_reply_queue.
2664 (remote_state): Delete global.
2665 (get_remote_state_raw): Delete.
2666 (remote_target::get_remote_state): Allocate m_remote_state on
2668 (get_current_remote_target): New.
2669 (remote_ops, extended_remote_ops): Delete.
2670 (wait_forever_enabled_p, remote_async_inferior_event_token):
2671 Delete, moved to struct remote_state.
2672 (remote_target::close): Delete self. Destruction bits split to
2674 (remote_target::~remote_target): ... this.
2675 (show_memory_packet_size): Adjust to use
2676 get_current_remote_target.
2677 (struct protocol_feature) <func>: Add remote_target parameter.
2678 All callers adjusted.
2679 (curr_quit_handler_target): New.
2680 (remote_serial_quit_handler): Reimplement.
2681 (remote_target::open_1): Adjust to use get_current_remote_target.
2682 Heap-allocate remote_target/extended_remote_target instances.
2683 (vcont_builder::vcont_builder): Add remote_target parameter, and
2684 save it in m_remote. All callers adjusted.
2685 (vcont_builder::m_remote): New field.
2686 (vcont_builder::restart, vcont_builder::flush)
2687 (vcont_builder::push_action): Use it.
2688 (remote_target::commit_resume): Use it.
2689 (struct queue_iter_param) <remote>: New field.
2690 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2691 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2692 (check_pending_event_prevents_wildcard_vcont_callback)
2693 (remote_target::check_pending_events_prevent_wildcard_vcont)
2694 (remote_target::discard_pending_stop_replies)
2695 (remote_target::discard_pending_stop_replies_in_queue)
2696 (remote_target::remote_notif_remove_queued_reply): Fill in
2698 (remote_notif_get_pending_events): New.
2699 (remote_target::readchar, remote_target::remote_serial_write):
2700 Save/restore curr_quit_handler_target.
2702 (kill_new_fork_children): Fill in 'remote' field.
2703 (packet_command): Use get_current_remote_target, defer to
2704 remote_target method of same name.
2705 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2706 parameter, and save it in m_remote. All callers adjusted.
2707 (scoped_remote_fd::release): Use m_remote.
2708 (scoped_remote_fd::m_remote): New field.
2709 (remote_file_put, remote_file_get, remote_file_delete): Use
2710 get_current_remote_target, defer to remote_target method of same
2712 (remote_btrace_reset): Add remote_state paremeter. Update all
2714 (remote_async_inferior_event_handler). Pass down 'data'.
2715 (remote_new_objfile): Use get_current_remote_target.
2716 (remote_target::vcont_r_supported): New.
2717 (set_range_stepping): Use get_current_remote_target and
2718 remote_target::vcont_r_supported.
2719 (_initialize_remote): Don't allocate 'remote_state' and
2720 'stop_reply_queue' globals.
2721 * remote.h (struct remote_target): Forward declare.
2722 (getpkt, putpkt, remote_notif_get_pending_events): Add
2723 'remote_target' parameter.
2725 2018-05-22 Pedro Alves <palves@redhat.com>
2727 * remote.c (vcont_builder): Now a class. Make all data members
2729 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2731 (vcont_builder_restart): Rename to ...
2732 (vcont_builder::restart): ... this.
2733 (vcont_builder_flush): Rename to ...
2734 (vcont_builder::flush): ... this.
2735 (vcont_builder_push_action): Rename to ...
2736 (vcont_builder::push_action): ... this.
2737 (remote_target::commit_resume): Adjust.
2739 2018-05-22 Pedro Alves <palves@redhat.com>
2741 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2742 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2743 (get_fixed_memory_packet_size): New.
2744 (get_memory_packet_size): Use it.
2745 (set_memory_packet_size): Don't override the config size with
2746 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2747 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2748 Don't refer to get_memory_packet_size if not connected to a remote
2749 target. Show "(default)" if configured size is 0.
2751 2018-05-22 Pedro Alves <palves@redhat.com>
2753 * remote.c (remote_target::mourn_inferior): Move
2754 discard_pending_stop_replies call here from ...
2755 (_initialize_remote): ... here.
2757 2018-05-22 Pedro Alves <palves@redhat.com>
2759 * remote.c (compare_section_command): Remove set_general_process
2762 2018-05-22 Pedro Alves <palves@redhat.com>
2764 * remote.c (struct packet_reg, struct remote_arch_state):
2765 Move higher up in the file.
2766 (remote_state) <m_arch_states>: Store remote_arch_state values
2767 instead of remote_arch_state pointers.
2768 (remote_state::get_remote_arch_state): Adjust.
2770 2018-05-22 Pedro Alves <palves@redhat.com>
2772 * remote.c: Include <unordered_map>.
2773 (remote_state): Now a class.
2774 (remote_state) <get_remote_arch_state>: Declare method.
2775 <get_remote_arch_state>: New field.
2776 (remote_arch_state) <remote_arch_state>: Declare ctor.
2777 <regs>: Now a unique_ptr.
2778 (remote_gdbarch_data_handle): Delete.
2779 (get_remote_arch_state): Delete.
2780 (remote_state::get_remote_arch_state): New.
2781 (get_remote_state): Adjust to call remote_state's
2782 get_remote_arch_state method.
2783 (init_remote_state): Delete, bits factored out to ...
2784 (remote_arch_state::remote_arch_state): ... this new method.
2785 (get_remote_packet_size, get_memory_packet_size)
2786 (process_g_packet, remote_target::fetch_registers)
2787 (remote_target::prepare_to_store, store_registers_using_G)
2788 (remote_target::store_registers, remote_target::get_trace_status):
2789 Adjust to call remote_state's method.
2790 (_initialize_remote): Remove reference to
2791 remote_gdbarch_data_handle.
2793 2018-05-22 Pedro Alves <palves@redhat.com>
2795 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2796 pread>: New method declarations.
2797 (remote_target::open_1): Adjust.
2798 (readahead_cache_invalidate): Rename to ...
2799 (readahead_cache::invalidate): ... this, and adjust to be a class
2801 (readahead_cache_invalidate_fd): Rename to ...
2802 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2804 (remote_hostio_pwrite): Adjust.
2805 (remote_hostio_pread_from_cache): Rename to ...
2806 (readahead_cache::pread): ... this, and adjust to be a class
2808 (remote_hostio_close): Adjust.
2810 2018-05-22 Pedro Alves <palves@redhat.com>
2812 * remote.c (remote_hostio_close_cleanup): Delete.
2813 (class scoped_remote_fd): New.
2814 (remote_file_put, remote_file_get): Use it.
2816 2018-05-22 Pedro Alves <palves@redhat.com>
2818 (struct vCont_action_support): Use bool and initialize all fields.
2819 (struct readahead_cache): Initialize all fields.
2820 (remote_state): Use bool and initialize all fields.
2821 (remote_state::remote_state, remote_state::~remote_state): New.
2822 (new_remote_state): Delete.
2823 (_initialize_remote): Use new to allocate remote_state.
2825 2018-05-22 Pedro Alves <palves@redhat.com>
2829 * c-exp.y: Include "c-support.h".
2830 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2831 of tolower. Use c_ident_is_alpha to scan names.
2832 * c-lang.c: Include "c-support.h".
2833 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2834 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2835 * c-support.h: New file, with bits factored out from ...
2836 * cp-name-parser.y: ... this file.
2837 Include "c-support.h".
2838 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2839 c-support.h and renamed.
2840 (symbol_end, yylex): Adjust.
2842 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2844 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2845 parameter type to CORE_ADDR.
2846 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2847 parameter type in declaration to CORE_ADDR.
2848 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2849 target_auxv_search to get AT_HWCAP and use the result to get the
2851 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2852 to CORE_ADDR. Remove the cast of the return value to unsigned
2853 long. Fix error predicate of target_auxv_search.
2854 (ppc_linux_nat_target::read_description): Change the type of the
2855 hwcap variable to CORE_ADDR.
2857 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2859 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2860 if the size of fpscr is larger than 32 bits.
2862 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2864 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2865 (ppc32_linux_vsxregmap): New global.
2866 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2867 regcache_supply_regset, and regcache_collect_regset.
2868 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2869 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2870 (fetch_vsx_register, store_vsx_register): Remove.
2871 (fetch_vsx_registers): Add regno parameter. Get regset using
2872 ppc_linux_vsxregset. Use regset to supply registers.
2873 (store_vsx_registers): Add regno parameter. Get regset using
2874 ppc_linux_vsxregset. Use regset to collect registers.
2875 (fetch_register): Call fetch_vsx_registers instead of
2877 (store_register): Call store_vsx_registers instead of
2879 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2880 new regno parameter.
2881 (store_ppc_registers): Call store_vsx_registers with -1 for the
2882 new regno parameter.
2883 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2884 (ppc_collect_vsxregset): Remove.
2886 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2888 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2890 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2891 for vector register offset fields.
2892 (ppc64_fbsd_reg_offsets): Likewise.
2893 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2894 to vector register offset fields.
2895 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2896 to vector register offset fields.
2897 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2898 vector register offset fields.
2899 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2900 initializers for vector register offset fields.
2901 (rs6000_aix64_reg_offsets): Likewise.
2902 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2903 (ppc_supply_vrregset): Remove.
2904 (ppc_collect_vrregset): Remove.
2905 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2906 (ppc_linux_vrregset) : New function.
2907 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2908 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2909 (ppc32_linux_vrregset): Remove.
2910 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2911 and use result instead of ppc32_linux_vrregset.
2912 (ppc32_linux_reg_offsets): Remove initializers for vector register
2914 (ppc64_linux_reg_offsets): Likewise.
2915 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2916 * ppc-linux-nat.c: Include regset.h.
2917 (gdb_vrregset_t): Adjust comment to account for little-endian
2919 (supply_vrregset, fill_vrregset): Remove.
2920 (fetch_altivec_register, store_altivec_register): Remove.
2921 (fetch_altivec_registers): Add regno parameter. Get regset using
2922 ppc_linux_vrregset. Use regset to supply registers.
2923 (store_altivec_registers): Add regno parameter. Get regset using
2924 ppc_linux_vrregset. Use regset to collect registers.
2925 (fetch_register): Call fetch_altivec_registers instead of
2926 fetch_altivec_register.
2927 (store_register): Call store_altivec_registers instead of
2928 store_altivec_register.
2929 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2930 the new regno parameter.
2931 (store_ppc_registers): Call store_altivec_registers with -1 for
2932 the new regno parameter.
2934 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2936 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2937 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2938 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2939 (gdb_vrregset_t): Change array type size to
2940 PPC_LINUX_SIZEOF_VRREGSET.
2941 (gdb_vsxregset_t): Change array type size to
2942 PPC_LINUX_SIZEOF_VSXREGSET.
2943 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2944 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2945 PPC_LINUX_SIZEOF_VSXREGSET.
2947 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2949 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2950 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2952 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2953 ppc_linux_target_wordsize with tid.
2954 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2956 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2957 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2958 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2959 tid parameter. Remove static specifier.
2960 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2961 (ppc_linux_target_wordsize): New declaration.
2963 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2965 * arch/ppc-linux-common.c: New file.
2966 * arch/ppc-linux-common.h: New file.
2967 * arch/ppc-linux-tdesc.h: New file.
2968 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2969 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2970 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2971 arch/ppc-linux-tdesc.h.
2972 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2973 arch/ppc-linux-tdesc.h.
2974 (ppc_linux_nat_target::read_description): Remove target
2975 description matching code. Fill a ppc_linux_features struct and
2976 call ppc_linux_match_description with it. Move comment about ISA
2977 2.05 to ppc-linux-common.c.
2978 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2979 arch/ppc-linux-tdesc.h.
2980 (ppc_linux_core_read_description): Remove target description
2981 matching code. Fill a ppc_linux_features struct and call
2982 ppc_linux_match_description with it.
2983 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2984 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2985 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2986 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2987 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2988 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2989 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2990 (tdesc_powerpc_e500l): Remove.
2992 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2994 * ada-lang.c (catch_assert_command): Pass empty string instead
2995 of NULL for excep_string argument.
2997 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2999 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3000 the width of the requested register exceeds the width of the
3003 2018-05-21 Tom Tromey <tom@tromey.com>
3005 * printcmd.c (output_command): Remove.
3006 (output_command_const): Rename to output_command.
3007 * valprint.h (output_command): Rename from output_command_const.
3008 * tracepoint.c (trace_dump_actions): Call output_command.
3010 2018-05-21 Tom Tromey <tom@tromey.com>
3012 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3013 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3014 * ada-lang.h (create_ada_exception_catchpoint): Update.
3015 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3017 (create_excep_cond_exprs, ~ada_catchpoint)
3018 (should_stop_exception, print_one_exception)
3019 (print_mention_exception, print_recreate_exception): Update.
3020 (ada_get_next_arg): Remove.
3021 (catch_ada_exception_command_split): Use std::string. Change type
3022 of "excep_string", "cond_string".
3023 (catch_ada_exception_command): Update.
3024 (create_ada_exception_catchpoint): Change type of excep_string.
3025 (ada_exception_sal): Remove excep_string parameter.
3026 (~ada_catchpoint): Remove.
3028 2018-05-21 Tom Tromey <tom@tromey.com>
3030 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3033 2018-05-21 Tom Tromey <tom@tromey.com>
3035 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3036 Return unique_xmalloc_ptr.
3037 (print_it_exception): Update.
3039 2018-05-21 Tom Tromey <tom@tromey.com>
3041 * tracepoint.c (trace_dump_actions): Use std::string.
3043 2018-05-21 Tom Tromey <tom@tromey.com>
3045 * symfile.c (reread_symbols): Use std::string for original_name.
3047 2018-05-21 Tom Tromey <tom@tromey.com>
3049 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3050 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3053 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3055 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3057 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3058 * objfiles.c (get_objfile_bfd_data): Allocate
3059 objfile_per_bfd_storage with obstack_new when allocating on
3062 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3064 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3066 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3067 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3068 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3069 (add_pending): Likewise.
3070 (parse_symbol): Likewise.
3071 (parse_partial_symbols): Likewise.
3072 (psymtab_to_symtab_1): Likewise.
3073 (new_psymtab): Likewise.
3074 (elfmdebug_build_psymtabs): Likewise.
3075 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3076 * objfiles.c (get_objfile_bfd_data): Likewise.
3077 (objfile_register_static_link): Likewise.
3078 * psymtab.c (allocate_psymtab): Likewise.
3079 * stabsread.c (read_member_functions): Likewise.
3080 * xcoffread.c (xcoff_end_psymtab): Likewise.
3082 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3084 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3085 compiler supports std::is_trivially_constructible.
3086 * common/poison.h: Include obstack.h.
3087 (IsMallocable): Define to is_trivially_constructible if the
3088 compiler supports it, define to true_type otherwise.
3092 (XOBNEWVEC): Redefine.
3093 * gdb_obstack.h (obstack_zalloc): New.
3094 (OBSTACK_ZALLOC): Redefine.
3095 (obstack_calloc): New.
3096 (OBSTACK_CALLOC): Redefine.
3098 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3099 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3101 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3102 obstack_calloc/obstack_zalloc.
3103 (gdbarch_obstack_zalloc): Remove.
3104 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3106 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3108 * stack.c (backtrace_command_1): Remove useless variable int i.
3110 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3112 * stack.c (print_frame_info): Fix comment.
3114 2018-05-18 Tom Tromey <tom@tromey.com>
3116 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3117 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3118 (~dwarf2_per_objfile): Update
3119 (dwarf2_get_dwz_file): Use new.
3120 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3123 2018-05-18 Tom Tromey <tom@tromey.com>
3125 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3127 * dwarf2read.c (struct dwp_file): Add constructor and
3129 (open_and_init_dwp_file): Return a unique_ptr.
3130 (dwarf2_per_objfile, create_dwp_hash_table)
3131 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3132 (lookup_dwo_unit_in_dwp): Update.
3133 (open_and_init_dwp_file, get_dwp_file): Update.
3135 2018-05-18 Tom Tromey <tom@tromey.com>
3137 * dwarf2read.c (dwarf2_per_objfile): Update.
3138 (struct mapped_index): Add initializers.
3139 (dwarf2_read_index): Use new.
3140 (dw2_symtab_iter_init): Update.
3141 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3144 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3146 * dwarf2read.c (mapped_index) <total_size>: Remove.
3148 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3150 * unittests/format_pieces-selftests.c (test_format_specifier):
3153 2018-05-18 Tom Tromey <tom@tromey.com>
3155 * c-typeprint.c (maybe_print_hole): New function.
3156 (c_print_type_struct_field_offset): Update.
3157 (c_type_print_base_struct_union): Call maybe_print_hole.
3159 2018-05-17 Keith Seitz <keiths@redhat.com>
3161 * breakpoint.c (build_bpstat_chain): New function, moved from
3163 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3164 If no stop chain is passed, call build_bpstat_chain to build it.
3165 * breakpoint.h (build_bpstat_chain): Declare.
3166 (bpstat_stop_status): Move documentation here from breakpoint.c.
3167 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3168 build the stop chain and pass it to skip_inline_frames.
3169 Pass this stop chain to bpstat_stop_status.
3170 * inline-frame.c: Include breakpoint.h.
3171 (stopped_by_user_bp_inline_frame): New function.
3172 (skip_inline_frames): Add parameter `stop_chain'.
3173 Move documention to inline-frame.h.
3174 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3175 whether the frame should be elided.
3176 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3177 Add moved documentation and update for new parameter.
3179 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3182 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3183 unittests/format_pieces-selftests.c.
3184 * common/format.h (format_piece) <operator==>: New.
3185 (format_pieces) <operator[]>: Remove.
3186 * common/format.c (format_pieces::format_pieces): Handle \e.
3187 * unittests/format_pieces-selftests.c: New.
3189 2018-05-17 Tom Tromey <tom@tromey.com>
3192 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3193 (dw2_instantiate_symtab): Add skip_partial parameter.
3194 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3195 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3196 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3197 (dw2_expand_symtabs_matching_one)
3198 (dw2_find_pc_sect_compunit_symtab)
3199 (dw2_debug_names_lookup_symbol)
3200 (dw2_debug_names_expand_symtabs_for_function): Update.
3201 (init_cutu_and_read_dies): Add skip_partial parameter.
3202 (process_psymtab_comp_unit, build_type_psymtabs_1)
3203 (process_skeletonless_type_unit, load_partial_comp_unit)
3204 (psymtab_to_symtab_1): Update.
3205 (load_full_comp_unit): Add skip_partial parameter.
3206 (process_imported_unit_die, dwarf2_read_addr_index)
3207 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3208 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3209 (read_signatured_type): Update.
3211 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3213 * value.c (release_value): Remove unused variable.
3214 (record_latest_value): Likewise.
3215 (access_value_history): Likewise.
3216 (preserve_values): Likewise.
3218 2018-05-17 Tom Tromey <tom@tromey.com>
3220 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3223 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3226 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3227 Also handle registers whose width is not a multiple of
3229 (linux_nat_trad_target::store_register): Likewise.
3231 2018-05-16 Tom Tromey <tom@tromey.com>
3233 * gdbcore.h (core_bfd): Redefine.
3234 * corelow.c (core_target::close): Update.
3235 (core_target_open): Update.
3236 * progspace.h (struct program_space) <cbfd>: Now a
3239 2018-05-16 Tom Tromey <tom@tromey.com>
3242 * symfile-add-flags.h (enum symfile_add_flags)
3243 <SYMFILE_NOT_FILENAME>: New constant.
3244 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3245 objfile name from BFD.
3246 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3247 * minidebug.c (find_separate_debug_file_in_section): Put
3248 ".gnu_debugdata" into BFD's file name.
3250 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3252 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3255 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3258 * aarch64-tdep.c (aarch64_analyze_prologue,
3259 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3260 Indicate not interested in errors.
3262 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3264 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3265 Supply the MIPS_ZERO_REGNUM register.
3267 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3269 * mips-tdep.c (mask_address_var): Make variable static.
3271 2018-05-14 Tom Tromey <tom@tromey.com>
3273 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3275 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3277 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3278 FXSAVE_ADDR for the mxcsr register.
3280 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3282 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3284 2018-05-11 Pedro Alves <palves@redhat.com>
3286 * corelow.c (core_target) <core_target>: No longer inline.
3287 Initialize m_core_gdbarch, m_core_vec and build the section table
3289 <~core_target>: New.
3290 <core_gdbarch, get_core_register_section>: New methods.
3291 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3292 factored out from ...
3293 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3295 (sniff_core_bfd): Add gdbarch parameter.
3296 (core_close): Delete, merged into ...
3297 (core_target::close): ... here. Delete self.
3298 (core_close_cleanup): Delete.
3299 (core_target_open): Allocate a core_target on the heap. Use a
3300 unique_ptr instead of a cleanup. Bits moved into the core_target
3301 ctor. Adjust to use core_target methods instead of globals.
3302 (get_core_register_section): Rename to ...
3303 (core_target::get_core_register_section): ... this and adjust.
3304 (struct get_core_registers_cb_data): New.
3305 (get_core_registers_cb): Use it. Use bool.
3306 (core_target::fetch_registers, core_target::files_info)
3307 (core_target::xfer_partial, core_target::read_description)
3308 (core_target::pid_to, core_target::thread_name): Adjust to
3309 reference class fields instead of globals.
3310 * target.h (struct target_ops_deleter, target_ops_up): New.
3312 2018-05-11 Pedro Alves <palves@redhat.com>
3314 * corefile.c (core_file_command): Move to corelow.c.
3315 * corelow.c (the_core_target): Delete.
3316 (core_file_command): Moved from corefile.c. Check exec_bfd
3317 instead of the_core_target. Use target_detach instead of calling
3318 into the_core_target directly.
3319 (maybe_say_no_core_file_now): New.
3320 (core_target::detach): Use it.
3321 (_initialize_corelow): Remove references to the_core_target.
3322 * gdbcore.h (the_core_target): Delete.
3324 2018-05-11 Tom Tromey <tromey@redhat.com>
3325 Pedro Alves <palves@redhat.com>
3327 * corefile.c (core_bfd): Remove.
3328 * gdbcore.h (core_bfd): Now a macro.
3329 * progspace.h (struct program_space) <cbfd>: New field.
3331 2018-05-11 Tom Tromey <tom@tromey.com>
3333 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3336 2018-05-10 Tom Tromey <tom@tromey.com>
3338 * configure: Rebuild.
3339 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3341 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3344 * regformats/regdat.sh: Adjust script, following the addition
3345 of the new expedite_regs parameter to init_target_desc.
3347 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3350 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3351 set_gdbarch_significant_addr_bit.
3352 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3353 set_gdbarch_significant_addr_bit.
3354 * utils.c (address_significant): Update to sign extend addr.
3356 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3358 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3359 (xtensa_linux_init_abi): Limit tdep->num_regs by
3360 tdep->num_nopriv_regs.
3361 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3362 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3365 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3367 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3369 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3371 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3372 (I387_MXCSR_INIT_VAL): New constant.
3373 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3374 buffer if it was supplied by the inferior.
3375 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3376 (i387_xsave_get_clear_bv): New function.
3377 (i387_supply_xsave): Only read x87 control registers from the
3378 xsave buffer if the feature is enabled, and the state will have
3379 been written, otherwise, provide a suitable default.
3380 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3381 including x87 control registers. Update control registers if they
3382 have changed from the default value, and mark features as enabled
3384 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3386 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3388 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3390 2018-05-07 Tom Tromey <tom@tromey.com>
3392 * configure: Rebuild.
3393 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3395 2018-05-07 Tom Tromey <tom@tromey.com>
3398 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3399 bit. Use correct value for VDIV.
3401 2018-05-04 Tom Tromey <tom@tromey.com>
3403 * configure: Rebuild.
3404 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3406 2018-05-04 Tom Tromey <tom@tromey.com>
3408 * linux-record.c (record_linux_system_call) <case
3409 RECORD_SYS_RECVFROM>: Add "break".
3411 2018-05-04 Tom Tromey <tom@tromey.com>
3413 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3414 Add missing "break".
3415 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3416 Add missing "break".
3418 2018-05-04 Tom Tromey <tom@tromey.com>
3420 * rs6000-tdep.c (ppc_process_record_op4)
3421 (ppc_process_record_op63): Add fall-through comment.
3423 2018-05-04 Tom Tromey <tom@tromey.com>
3425 * i386-tdep.c (i386_process_record): Add fall-through comment.
3427 2018-05-04 Tom Tromey <tom@tromey.com>
3429 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3432 2018-05-04 Tom Tromey <tom@tromey.com>
3434 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3435 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3436 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3438 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3440 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3443 2018-05-04 Tom Tromey <tom@tromey.com>
3445 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3447 2018-05-04 Tom Tromey <tom@tromey.com>
3449 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3450 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3451 * symfile.c (section_is_mapped): Fix fall-through comment.
3452 * stabsread.c (define_symbol, read_member_functions): Fix
3453 fall-through comment.
3454 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3456 * remote.c (remote_wait_as): Fix fall-through comment.
3457 * p-exp.y (yylex): Fix fall-through comment.
3458 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3460 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3461 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3462 * jv-exp.y (yylex): Fix fall-through comment.
3463 * go-exp.y (lex_one_token): Fix fall-through comment.
3464 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3465 fall-through comment.
3466 * f-exp.y (yylex): Fix fall-through comment.
3467 * dwarf2read.c (process_die): Fix fall-through comments.
3468 * dbxread.c (process_one_symbol): Fix fall-through comment.
3469 * d-exp.y (lex_one_token): Fix fall-through comment.
3470 * cp-name-parser.y (yylex): Fix fall-through comment.
3471 * coffread.c (coff_symtab_read): Fix fall-through comment.
3472 * c-exp.y (lex_one_token): Fix fall-through comment.
3473 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3475 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3478 2018-05-04 Tom Tromey <tom@tromey.com>
3481 * NEWS: Mention gdb.execute change.
3482 * gdbcmd.h (execute_control_command): Don't declare.
3483 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3484 execute_control_commands, execute_control_commands_to_string.
3485 * cli/cli-script.h (execute_control_commands)
3486 (execute_control_commands_to_string): Declare.
3487 (execute_control_command): Add from_tty parameter.
3488 * cli/cli-script.c (execute_control_commands)
3489 (execute_control_commands_to_string): New functions.
3490 (execute_user_command): Use execute_control_commands.
3491 (execute_control_command_1): Add "from_tty" parameter. Update.
3492 (execute_control_command): Likewise.
3494 2018-05-04 Tom Tromey <tom@tromey.com>
3497 * NEWS: Mention that breakpoint commands are writable.
3498 * python/py-breakpoint.c (bppy_set_commands): New function.
3499 (breakpoint_object_getset) <"commands">: Use it.
3501 2018-05-04 Tom Tromey <tom@tromey.com>
3503 * tracepoint.c (actions_command): Update.
3504 * mi/mi-cmd-break.c (mi_command_line_array)
3505 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3506 (mi_read_next_line): Remove.
3507 (mi_cmd_break_commands): Update.
3508 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3510 * cli/cli-script.c (get_command_line): Update.
3511 (process_next_line): Use function_view. Constify.
3512 (recurse_read_control_structure, read_command_lines)
3513 (read_command_lines_1): Change argument types to function_view.
3514 (do_define_command, document_command): Update.
3515 * breakpoint.h (check_tracepoint_command): Don't declare.
3516 * breakpoint.c (check_tracepoint_command): Remove.
3517 (commands_command_1, create_tracepoint_from_upload): Update.
3519 2018-05-04 Tom Tromey <tom@tromey.com>
3522 * cli/cli-script.h (enum command_control_type) <define_control>:
3524 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3525 (build_command_line, execute_control_command_1)
3526 (process_next_line): Likewise.
3527 (do_define_command): New function, extracted from define_command.
3528 (define_command): Use it.
3530 2018-05-04 Tom Tromey <tom@tromey.com>
3532 * tracepoint.c (actions_command): Update.
3533 * cli/cli-script.h (read_command_lines): Update.
3534 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3535 (MAX_TMPBUF): Remove define.
3536 (define_command): Use string_printf.
3537 (document_command): Likewise.
3538 * breakpoint.c (commands_command_1): Update.
3540 2018-05-04 Tom Tromey <tom@tromey.com>
3542 * top.c (execute_command): Update.
3543 * cli/cli-script.h (print_command_lines): Now varargs.
3544 * cli/cli-script.c (print_command_lines): Now varargs.
3545 (execute_control_command_1) <case while_control, case if_control>:
3548 2018-05-04 Tom Tromey <tom@tromey.com>
3550 * tracepoint.c (all_tracepoint_actions): Rename from
3551 all_tracepoint_actions_and_cleanup. Change return type.
3552 (actions_command, encode_actions_1, encode_actions)
3553 (trace_dump_actions, tdump_command): Update.
3554 * remote.c (remote_download_command_source): Update.
3555 * python/python.c (gdbpy_eval_from_control_command)
3556 (python_command, python_interactive_command): Update.
3557 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3558 * guile/guile.c (guile_command)
3559 (gdbscm_eval_from_control_command, guile_command): Update.
3560 * compile/compile.c (compile_code_command)
3561 (compile_print_command, compile_to_object): Update.
3562 * cli/cli-script.h (struct command_lines_deleter): New.
3563 (counted_command_line): New typedef.
3564 (struct command_line): Add constructor, destructor.
3565 <body_list>: Remove.
3566 <body_list_0, body_list_1>: New members.
3567 (command_line_up): Remove typedef.
3568 (read_command_lines, read_command_lines_1, get_command_line):
3570 (copy_command_lines): Don't declare.
3571 * cli/cli-script.c (build_command_line): Use "new".
3572 (get_command_line): Return counted_command_line.
3573 (print_command_lines, execute_user_command)
3574 (execute_control_command_1, while_command, if_command): Update.
3575 (realloc_body_list): Remove.
3576 (process_next_line, recurse_read_control_structure): Update.
3577 (read_command_lines, read_command_lines_1): Return counted_command_line.
3578 (free_command_lines): Use "delete".
3579 (copy_command_lines): Remove.
3580 (define_command, document_command, show_user_1): Update.
3581 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3582 a counted_command_line.
3583 * breakpoint.h (counted_command_line): Remove typedef.
3584 (breakpoint_set_commands): Update.
3585 * breakpoint.c (check_no_tracepoint_commands)
3586 (validate_commands_for_breakpoint): Update.
3587 (breakpoint_set_commands): Change commands to be a
3588 counted_command_line.
3589 (commands_command_1, update_dprintf_command_list)
3590 (create_tracepoint_from_upload): Update.
3592 2018-05-04 Tom Tromey <tom@tromey.com>
3594 * cli/cli-decode.h (cmd_list_element): New constructor.
3595 (~cmd_list_element): New destructor.
3596 (struct cmd_list_element): Add initializers.
3597 * cli/cli-decode.c (do_add_cmd): Use "new".
3598 (delete_cmd): Use "delete".
3600 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3601 Pedro Alves <palves@redhat.com>
3603 PR breakpoints/19806 and support for PR external/20207.
3604 * NEWS: Mention Aarch64 watchpoint improvements.
3605 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3606 watchpoints and PR external/20207 watchpoints.
3607 * nat/aarch64-linux-hw-point.c
3608 (kernel_supports_any_contiguous_range): New.
3609 (aarch64_watchpoint_offset): New.
3610 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3611 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3612 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3613 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3614 next_addr_orig_p. Support PR external/20207 watchpoints.
3615 (aarch64_downgrade_regs): New.
3616 (aarch64_dr_state_insert_one_point): New parameters offset and
3618 (aarch64_dr_state_remove_one_point): Likewise.
3619 (aarch64_handle_breakpoint): Update caller.
3620 (aarch64_handle_aligned_watchpoint): Likewise.
3621 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3623 (aarch64_linux_set_debug_regs): Remove const from state. Call
3624 aarch64_downgrade_regs.
3625 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3626 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3627 (DR_CONTROL_MASK): ... this.
3628 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3629 (unsigned int aarch64_watchpoint_offset): New prototype.
3630 (aarch64_linux_set_debug_regs): Remove const from state.
3631 * utils.c (align_up, align_down): Move to ...
3632 * common/common-utils.c (align_up, align_down): ... here.
3633 * utils.h (align_up, align_down): Move to ...
3634 * common/common-utils.h (align_up, align_down): ... here.
3636 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3638 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3639 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3640 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3641 Re-implement to match the ABI as summarized in GCC's
3642 gcc/config/sparc/sparc.c. All callers updated.
3643 (sparc32_store_arguments): Remove assertion.
3645 2018-05-04 Tom Tromey <tom@tromey.com>
3647 * printcmd.c: Don't include tui.h.
3648 (decode_format): Use skip_spaces.
3650 2018-05-04 Tom Tromey <tom@tromey.com>
3653 * printcmd.c (last_count): New global.
3654 (x_command): Use saved count when repeating.
3656 2018-05-04 Tom Tromey <tom@tromey.com>
3658 * nto-procfs.c (do_closedir_cleanup): Remove.
3659 (procfs_pidlist): Use gdb_dir_up.
3660 * procfs.c (do_closedir_cleanup): Remove.
3661 (proc_update_threads): Use gdb_dir_up.
3662 * common/filestuff.h (struct gdb_dir_deleter): New.
3663 (gdb_dir_up): New typedef.
3665 2018-05-04 Tom Tromey <tom@tromey.com>
3667 * ada-lang.c (print_mention_exception): Use std::string.
3669 2018-05-04 Tom Tromey <tom@tromey.com>
3671 * ada-lang.c (create_excep_cond_exprs): Update.
3672 (ada_exception_catchpoint_cond_string): Use std::string.
3674 2018-05-04 Tom Tromey <tom@tromey.com>
3676 * ada-lang.c (xget_renaming_scope): Return std::string.
3677 (old_renaming_is_invisible): Update.
3679 2018-05-04 Tom Tromey <tom@tromey.com>
3681 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3682 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3684 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3686 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3688 2018-05-04 Tom Tromey <tom@tromey.com>
3690 * remote.c (remote_query_supported_append): Change type.
3691 (remote_check_symbols): Update.
3693 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3696 * configure.ac: Prepend libpython.
3697 * python/python-config.py: Likewise.
3698 * configure: Regenerate.
3700 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3702 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3704 2018-05-03 Pedro Alves <palves@redhat.com>
3707 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3708 override. Write 'true' instead of '1'.
3709 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3712 2018-05-02 Pedro Alves <palves@redhat.com>
3714 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3715 add_inf_child_target.
3716 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3717 add_inf_child_target.
3718 * aix-thread.c (aix_thread_target_info): New.
3719 (aix_thread_target) <shortname, longname, doc>: Delete.
3721 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3722 add_inf_child_target.
3723 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3724 add_inf_child_target.
3725 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3726 add_inf_child_target.
3727 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3728 add_inf_child_target.
3729 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3730 add_inf_child_target.
3731 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3732 add_inf_child_target.
3733 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3734 add_inf_child_target.
3735 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3736 add_inf_child_target.
3737 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3738 add_inf_child_target.
3739 * bfd-target.c (target_bfd_target_info): New.
3740 (target_bfd) <shortname, longname, doc>: Delete.
3742 * bsd-kvm.c (bsd_kvm_target_info): New.
3743 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3745 (bsd_kvm_target::open): Rename to ...
3746 (bsd_kvm_target_open): ... this. Adjust.
3747 * bsd-uthread.c (bsd_uthread_target_info): New.
3748 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3750 * corefile.c (core_file_command): Adjust.
3751 * corelow.c (core_target_info): New.
3752 (core_target) <shortname, longname, doc>: Delete.
3754 (core_target::open): Rename to ...
3755 (core_target_open): ... this. Adjust.
3756 * ctf.c (ctf_target_info): New.
3757 (ctf_target) <shortname, longname, doc>: Delete.
3759 (ctf_target::open): Rename to ...
3760 (ctf_target_open): ... this.
3761 (_initialize_ctf): Adjust.
3762 * exec.c (exec_target_info): New.
3763 (exec_target) <shortname, longname, doc>: Delete.
3765 (exec_target::open): Rename to ...
3766 (exec_target_open): ... this.
3767 * gdbcore.h (core_target_open): Declare.
3768 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3769 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3770 add_inf_child_target.
3771 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3772 add_inf_child_target.
3773 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3774 add_inf_child_target.
3775 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3776 add_inf_child_target.
3777 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3778 add_inf_child_target.
3779 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3780 add_inf_child_target.
3781 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3782 add_inf_child_target.
3783 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3784 add_inf_child_target.
3785 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3786 add_inf_child_target.
3787 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3788 add_inf_child_target.
3789 * inf-child.c (inf_child_target_info): New.
3790 (inf_child_target::info): New.
3791 (inf_child_open_target): Remove 'target' parameter. Use
3792 get_native_target instead.
3793 (inf_child_target::open): Delete.
3794 (add_inf_child_target): New.
3795 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3798 (add_inf_child_target): Declare.
3799 (inf_child_open_target): Declare.
3800 * linux-thread-db.c (thread_db_target_info): New.
3801 (thread_db_target) <shortname, longname, doc>: Delete.
3803 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3804 add_inf_child_target.
3805 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3806 add_inf_child_target.
3807 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3808 add_inf_child_target.
3809 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3810 add_inf_child_target.
3811 * make-target-delegates (print_class): Adjust.
3812 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3813 add_inf_child_target.
3814 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3815 add_inf_child_target.
3816 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3817 add_inf_child_target.
3818 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3819 add_inf_child_target.
3820 * nto-procfs.c (nto_native_target_info): New.
3821 (nto_procfs_target_native) <shortname, longname, doc>:
3824 (nto_procfs_target_info): New.
3825 (nto_procfs_target_procfs) <shortname, longname, doc>:
3828 (init_procfs_targets): Adjust.
3829 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3830 add_inf_child_target.
3831 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3832 add_inf_child_target.
3833 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3834 add_inf_child_target.
3835 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3836 add_inf_child_target.
3837 * ravenscar-thread.c (ravenscar_target_info): New.
3838 (ravenscar_thread_target) <shortname, longname, doc>:
3841 * record-btrace.c (record_btrace_target_info):
3842 (record_btrace_target) <shortname, longname, doc>: Delete.
3844 (record_btrace_target::open): Rename to ...
3845 (record_btrace_target_open): ... this. Adjust.
3846 * record-full.c (record_longname, record_doc): New.
3847 (record_full_base_target) <shortname, longname, doc>: Delete.
3849 (record_full_target_info): New.
3850 (record_full_target): <shortname>: Delete.
3852 (record_full_core_open_1, record_full_open_1): Update comments.
3853 (record_full_base_target::open): Rename to ...
3854 (record_full_open): ... this.
3855 (cmd_record_full_restore): Update.
3856 (_initialize_record_full): Update.
3857 * remote-sim.c (remote_sim_target_info): New.
3858 (gdbsim_target) <shortname, longname, doc>: Delete.
3860 (gdbsim_target::open): Rename to ...
3861 (gdbsim_target_open): ... this.
3862 (_initialize_remote_sim): Adjust.
3863 * remote.c (remote_doc): New.
3864 (remote_target_info): New.
3865 (remote_target) <shortname, longname, doc>: Delete.
3867 (extended_remote_target_info): New.
3868 (extended_remote_target) <shortname, longname, doc>: Delete.
3870 (remote_target::open_1): Make static. Adjust.
3871 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3872 * s390-linux-nat.c (_initialize_s390_nat): Use
3873 add_inf_child_target.
3874 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3875 add_inf_child_target.
3876 * sol-thread.c (thread_db_target_info): New.
3877 (sol_thread_target) <shortname, longname, doc>: Delete.
3879 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3880 add_inf_child_target.
3881 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3882 add_inf_child_target.
3883 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3884 add_inf_child_target.
3885 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3886 add_inf_child_target.
3887 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3888 add_inf_child_target.
3889 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3890 add_inf_child_target.
3891 * spu-linux-nat.c (_initialize_spu_nat): Use
3892 add_inf_child_target.
3893 * spu-multiarch.c (spu_multiarch_target_info): New.
3894 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3896 * target-delegates.c: Regenerate.
3897 * target.c: Include <unordered_map>.
3898 (target_ops_p): Delete.
3899 (DEF_VEC_P(target_ops_p)): Delete.
3900 (target_factories): New.
3901 (test_target_info): New.
3902 (test_target_ops::info): New.
3903 (open_target): Adjust to use target_factories.
3904 (add_target_with_completer): Rename to ...
3905 (add_target): ... this. Change prototype. Register target_info
3906 and open callback in target_factories. Register target_info in
3907 command context instead of target_ops.
3908 (add_target): Delete old implementation.
3909 (add_deprecated_target_alias): Change prototype. Adjust.
3910 (the_native_target): New.
3911 (set_native_target, get_native_target): New.
3912 (find_default_run_target): Use the_native_target.
3913 (find_attach_target, find_run_target): Simplify.
3914 (target_ops::open): Delete.
3915 (dummy_target_info): New.
3916 (dummy_target::shortname, dummy_target::longname)
3917 (dummy_target::doc): Delete.
3918 (dummy_target::info): New.
3919 (debug_target::shortname, debug_target::longname)
3920 (debug_target::doc): Delete.
3921 (debug_target::info): New.
3922 * target.h (struct target_info): New.
3923 (target_ops::~target_ops): Add comment.
3924 (target_ops::info): New.
3925 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3926 longer virtual. Implement in terms of target_info.
3927 (set_native_target, get_native_target): Declare.
3928 (target_open_ftype): New.
3929 (add_target, add_target_with_completer)
3930 (add_deprecated_target_alias): Change prototype.
3931 (test_target) <shortname, longname, doc>: Delete.
3933 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3934 add_inf_child_target.
3935 * tracefile-tfile.c (tfile_target_info): New.
3936 (tfile_target) <shortname, longname, doc>: Delete.
3938 (tfile_target::open): Rename to ...
3939 (tfile_target_open): ... this.
3940 (_initialize_tracefile_tfile): Adjust.
3941 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3942 add_inf_child_target.
3943 * windows-nat.c (_initialize_windows_nat): Use
3944 add_inf_child_target.
3945 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3946 add_inf_child_target.
3948 2018-05-02 Pedro Alves <palves@redhat.com>
3950 * linux-nat.h (linux_nat_target) <low_new_thread,
3951 low_delete_thread, low_new_fork, low_forget_process,
3952 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3953 New virtual methods.
3954 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3955 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3956 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3957 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3958 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3960 * linux-fork.c (delete_fork): Adjust to call low method.
3961 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3962 (linux_nat_new_fork, linux_nat_forget_process_hook)
3963 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3964 (linux_nat_status_is_event):
3965 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3966 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3968 (sigtrap_is_event): Rename to ...
3969 (linux_nat_target::low_status_is_event): ... this.
3970 (linux_nat_set_status_is_event): Delete.
3971 (save_stop_reason, linux_nat_wait_1)
3972 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3974 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3975 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3976 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3977 (linux_nat_set_prepare_to_resume): Delete.
3978 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3979 low virtual methods.
3980 * amd64-linux-nat.c: Likewise.
3981 * arm-linux-nat.c: Likewise.
3982 * i386-linux-nat.c: Likewise.
3983 * ia64-linux-nat.c: Likewise.
3984 * mips-linux-nat.c: Likewise.
3985 * ppc-linux-nat.c: Likewise.
3986 * s390-linux-nat.c: Likewise.
3987 * sparc64-linux-nat.c: Likewise.
3988 * x86-linux-nat.c: Likewise.
3989 * x86-linux-nat.h: Include "nat/x86-linux.h".
3990 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3991 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3994 2018-05-02 Pedro Alves <palves@redhat.com>
3996 * target.h (target_ops)
3997 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3998 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3999 stopped_by_watchpoint, have_continuable_watchpoint,
4000 stopped_data_address, watchpoint_addr_within_range,
4001 can_accel_watchpoint_condition, can_run, thread_alive,
4002 has_all_memory, has_memory, has_stack, has_registers,
4003 has_execution, can_async_p, is_async_p, supports_non_stop,
4004 always_non_stop_p, can_execute_reverse, supports_multi_process,
4005 supports_enable_disable_tracepoint,
4006 supports_disable_randomization, supports_string_tracing,
4007 supports_evaluation_of_breakpoint_conditions,
4008 can_run_breakpoint_commands, filesystem_is_local,
4009 can_download_tracepoint, get_trace_state_variable_value,
4010 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4011 record_is_replaying, record_will_replay,
4012 augmented_libraries_svr4_read>: Adjust to return bool.
4013 * aarch64-linux-nat.c: All implementations adjusted.
4014 * aix-thread.c: All implementations adjusted.
4015 * arm-linux-nat.c: All implementations adjusted.
4016 * breakpoint.c: All implementations adjusted.
4017 * bsd-kvm.c: All implementations adjusted.
4018 * bsd-uthread.c: All implementations adjusted.
4019 * corelow.c: All implementations adjusted.
4020 * ctf.c: All implementations adjusted.
4021 * darwin-nat.c: All implementations adjusted.
4022 * darwin-nat.h: All implementations adjusted.
4023 * exec.c: All implementations adjusted.
4024 * fbsd-nat.c: All implementations adjusted.
4025 * fbsd-nat.h: All implementations adjusted.
4026 * gnu-nat.c: All implementations adjusted.
4027 * gnu-nat.h: All implementations adjusted.
4028 * go32-nat.c: All implementations adjusted.
4029 * ia64-linux-nat.c: All implementations adjusted.
4030 * inf-child.c: All implementations adjusted.
4031 * inf-child.h: All implementations adjusted.
4032 * inf-ptrace.c: All implementations adjusted.
4033 * inf-ptrace.h: All implementations adjusted.
4034 * linux-nat.c: All implementations adjusted.
4035 * linux-nat.h: All implementations adjusted.
4036 * mips-linux-nat.c: All implementations adjusted.
4037 * nto-procfs.c: All implementations adjusted.
4038 * ppc-linux-nat.c: All implementations adjusted.
4039 * procfs.c: All implementations adjusted.
4040 * ravenscar-thread.c: All implementations adjusted.
4041 * record-btrace.c: All implementations adjusted.
4042 * record-full.c: All implementations adjusted.
4043 * remote-sim.c: All implementations adjusted.
4044 * remote.c: All implementations adjusted.
4045 * s390-linux-nat.c: All implementations adjusted.
4046 * sol-thread.c: All implementations adjusted.
4047 * spu-multiarch.c: All implementations adjusted.
4048 * target-delegates.c: All implementations adjusted.
4049 * target.c: All implementations adjusted.
4050 * target.h: All implementations adjusted.
4051 * tracefile-tfile.c: All implementations adjusted.
4052 * tracefile.c: All implementations adjusted.
4053 * tracefile.h: All implementations adjusted.
4054 * windows-nat.c: All implementations adjusted.
4055 * x86-linux-nat.h: All implementations adjusted.
4056 * x86-nat.h: All implementations adjusted.
4058 2018-05-02 Pedro Alves <palves@redhat.com>
4060 * make-target-delegates (scan_target_h): Don't trim lines here.
4061 Replace sequences of tabs and/or whitespace with a single
4063 (top level, parsing methods): Trim each line before processing it
4066 2018-05-02 Pedro Alves <palves@redhat.com>
4067 John Baldwin <jhb@freebsd.org>
4069 * target.h (enum strata) <debug_stratum>: New.
4070 (struct target_ops) <all delegation methods>: Replace by C++
4071 virtual methods, and drop "to_" prefix. All references updated
4073 <to_shortname, to_longname, to_doc, to_data,
4074 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4075 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4076 virtual methods. All references updated throughout.
4077 <can_attach, supports_terminal_ours, can_create_inferior,
4078 get_thread_control_capabilities, attach_no_wait>: New
4080 <insert_breakpoint, remove_breakpoint>: Now
4081 TARGET_DEFAULT_NORETURN methods.
4082 <info_proc>: Now returns bool.
4084 (OPS_MAGIC): Delete.
4085 (current_target): Delete. All references replaced by references
4087 (target_stack): ... this. New.
4088 (target_shortname, target_longname): Adjust.
4089 (target_can_run): Now a function declaration.
4090 (default_child_has_all_memory, default_child_has_memory)
4091 (default_child_has_stack, default_child_has_registers)
4092 (default_child_has_execution): Remove target_ops parameter.
4093 (complete_target_initialization): Delete.
4094 (memory_breakpoint_target): New template class.
4095 (test_target_ops): Refactor as a C++ class with virtual methods.
4096 * make-target-delegates (NAME_PART): Tighten.
4097 (POINTER_PART, CP_SYMBOL): New.
4098 (SIMPLE_RETURN_PART): Reimplement.
4099 (VEC_RETURN_PART): Expect less.
4100 (RETURN_PART, VIRTUAL_PART): New.
4101 (METHOD): Adjust to C++ virtual methods.
4102 (scan_target_h): Remove reference to C99.
4103 (dname): Output "target_ops::" prefix.
4104 (write_function_header): Adjust to output a C++ class method.
4105 (write_declaration): New.
4106 (write_delegator): Adjust to output a C++ class method.
4107 (tdname): Output "dummy_target::" prefix.
4108 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4110 (tdefault_names, debug_names): Delete.
4111 (return_types, tdefaults, styles, argtypes_array): New.
4112 (top level): All methods are delegators.
4114 (top level): Print dummy_target and debug_target classes.
4115 * target-delegates.c: Regenerate.
4116 * target-debug.h (target_debug_print_enum_info_proc_what)
4117 (target_debug_print_thread_control_capabilities)
4118 (target_debug_print_thread_info_p): New.
4119 * target.c (dummy_target): Delete.
4120 (the_dummy_target, the_debug_target): New.
4121 (target_stack): Now extern.
4122 (set_targetdebug): Push/unpush debug target.
4123 (default_child_has_all_memory, default_child_has_memory)
4124 (default_child_has_stack, default_child_has_registers)
4125 (default_child_has_execution): Remove target_ops parameter.
4126 (complete_target_initialization): Delete.
4127 (add_target_with_completer): No longer call
4128 complete_target_initialization.
4129 (target_supports_terminal_ours): Use regular delegation.
4130 (update_current_target): Delete.
4131 (push_target): No longer check magic number. Don't call
4132 update_current_target.
4133 (unpush_target): Don't call update_current_target.
4134 (target_is_pushed): No longer check magic number.
4135 (target_require_runnable): Skip for all stratums over
4137 (target_ops::info_proc): New.
4138 (target_info_proc): Use find_target_at and
4139 find_default_run_target.
4140 (target_supports_disable_randomization): Use regular delegation.
4141 (target_get_osdata): Use find_target_at.
4142 (target_ops::open, target_ops::close, target_ops::can_attach)
4143 (target_ops::attach, target_ops::can_create_inferior)
4144 (target_ops::create_inferior, target_ops::can_run)
4145 (target_can_run): New.
4146 (default_fileio_target): Use regular delegation.
4147 (target_ops::fileio_open, target_ops::fileio_pwrite)
4148 (target_ops::fileio_pread, target_ops::fileio_fstat)
4149 (target_ops::fileio_close, target_ops::fileio_unlink)
4150 (target_ops::fileio_readlink): New.
4151 (target_fileio_open_1, target_fileio_unlink)
4152 (target_fileio_readlink): Always call the target method. Handle
4154 (return_zero, return_zero_has_execution): Delete.
4155 (init_dummy_target): Delete.
4156 (dummy_target::dummy_target, dummy_target::shortname)
4157 (dummy_target::longname, dummy_target::doc)
4158 (debug_target::debug_target, debug_target::shortname)
4159 (debug_target::longname, debug_target::doc): New.
4160 (target_supports_delete_record): Use regular delegation.
4161 (setup_target_debug): Delete.
4162 (maintenance_print_target_stack): Skip debug_stratum.
4163 (initialize_targets): Instantiate the_dummy_target and
4165 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4167 (target_auxv_search, fprint_target_auxv): Adjust.
4168 (info_auxv_command): Adjust to use target_stack.
4169 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4170 * exceptions.c (print_flush): Handle a NULL target_stack.
4171 * regcache.c (target_ops_no_register): Refactor as class with
4174 * exec.c (exec_target): New class.
4175 (exec_ops): Now an exec_target.
4176 (exec_open, exec_close_1, exec_get_section_table)
4177 (exec_xfer_partial, exec_files_info, exec_has_memory)
4178 (exec_make_note_section): Refactor as exec_target methods.
4179 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4181 (exec_target::find_memory_regions): New.
4182 (_initialize_exec): Don't call init_exec_ops.
4183 * gdbcore.h (exec_file_clear): Delete.
4185 * corefile.c (core_target): Delete.
4186 (core_file_command): Adjust.
4187 * corelow.c (core_target): New class.
4188 (the_core_target): New.
4189 (core_close): Remove target_ops parameter.
4190 (core_close_cleanup): Adjust.
4191 (core_target::close): New.
4192 (core_open, core_detach, get_core_registers, core_files_info)
4193 (core_xfer_partial, core_thread_alive, core_read_description)
4194 (core_pid_to_str, core_thread_name, core_has_memory)
4195 (core_has_stack, core_has_registers, core_info_proc): Rework as
4196 core_target methods.
4197 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4198 (_initialize_corelow): Initialize the_core_target.
4199 * gdbcore.h (core_target): Delete.
4200 (the_core_target): New.
4202 * ctf.c: (ctf_target): New class.
4203 (ctf_ops): Now a ctf_target.
4204 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4205 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4206 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4208 (init_ctf_ops): Delete.
4209 (_initialize_ctf): Don't call it.
4210 * tracefile-tfile.c (tfile_target): New class.
4211 (tfile_ops): Now a tfile_target.
4212 (tfile_open, tfile_close, tfile_files_info)
4213 (tfile_get_tracepoint_status, tfile_trace_find)
4214 (tfile_fetch_registers, tfile_xfer_partial)
4215 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4216 Refactor as tfile_target methods.
4217 (tfile_xfer_partial_features): Remove target_ops parameter.
4218 (init_tfile_ops): Delete.
4219 (_initialize_tracefile_tfile): Don't call it.
4220 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4221 (tracefile_has_stack, tracefile_has_registers)
4222 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4223 tracefile_target methods.
4224 (init_tracefile_ops): Delete.
4225 (tracefile_target::tracefile_target): New.
4226 * tracefile.h: Include "target.h".
4227 (tracefile_target): New class.
4228 (init_tracefile_ops): Delete.
4230 * spu-multiarch.c (spu_multiarch_target): New class.
4231 (spu_ops): Now a spu_multiarch_target.
4232 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4233 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4234 (spu_search_memory, spu_mourn_inferior): Refactor as
4235 spu_multiarch_target methods.
4236 (init_spu_ops): Delete.
4237 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4238 complete_target_initialization.
4240 * ravenscar-thread.c (ravenscar_thread_target): New class.
4241 (ravenscar_ops): Now a ravenscar_thread_target.
4242 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4243 (ravenscar_thread_alive, ravenscar_pid_to_str)
4244 (ravenscar_fetch_registers, ravenscar_store_registers)
4245 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4246 (ravenscar_stopped_by_hw_breakpoint)
4247 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4248 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4249 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4251 (init_ravenscar_thread_ops): Delete.
4252 (_initialize_ravenscar): Remove references to
4253 init_ravenscar_thread_ops and complete_target_initialization.
4255 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4256 (bsd_uthread_target): New class.
4257 (bsd_uthread_ops): Now a bsd_uthread_target.
4258 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4259 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4260 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4261 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4262 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4263 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4264 (bsd_uthread_target): Delete function.
4265 (_initialize_bsd_uthread): Remove reference to
4266 complete_target_initialization.
4268 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4269 (target_bfd): ... this new class.
4270 (target_bfd_xfer_partial, target_bfd_get_section_table)
4271 (target_bfd_close): Refactor as target_bfd methods.
4272 (target_bfd::~target_bfd): New.
4273 (target_bfd_reopen): Adjust.
4274 (target_bfd::close): New.
4276 * record-btrace.c (record_btrace_target): New class.
4277 (record_btrace_ops): Now a record_btrace_target.
4278 (record_btrace_open, record_btrace_stop_recording)
4279 (record_btrace_disconnect, record_btrace_close)
4280 (record_btrace_async, record_btrace_info)
4281 (record_btrace_insn_history, record_btrace_insn_history_range)
4282 (record_btrace_insn_history_from, record_btrace_call_history)
4283 (record_btrace_call_history_range)
4284 (record_btrace_call_history_from, record_btrace_record_method)
4285 (record_btrace_is_replaying, record_btrace_will_replay)
4286 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4287 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4288 (record_btrace_store_registers, record_btrace_prepare_to_store)
4289 (record_btrace_to_get_unwinder)
4290 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4291 (record_btrace_commit_resume, record_btrace_wait)
4292 (record_btrace_stop, record_btrace_can_execute_reverse)
4293 (record_btrace_stopped_by_sw_breakpoint)
4294 (record_btrace_supports_stopped_by_sw_breakpoint)
4295 (record_btrace_stopped_by_hw_breakpoint)
4296 (record_btrace_supports_stopped_by_hw_breakpoint)
4297 (record_btrace_update_thread_list, record_btrace_thread_alive)
4298 (record_btrace_goto_begin, record_btrace_goto_end)
4299 (record_btrace_goto, record_btrace_stop_replaying_all)
4300 (record_btrace_execution_direction)
4301 (record_btrace_prepare_to_generate_core)
4302 (record_btrace_done_generating_core): Refactor as
4303 record_btrace_target methods.
4304 (init_record_btrace_ops): Delete.
4305 (_initialize_record_btrace): Remove reference to
4306 init_record_btrace_ops.
4307 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4308 the execution_direction global.
4309 (record_full_base_target, record_full_target)
4310 (record_full_core_target): New classes.
4311 (record_full_ops): Now a record_full_target.
4312 (record_full_core_ops): Now a record_full_core_target.
4313 (record_full_target::detach, record_full_target::disconnect)
4314 (record_full_core_target::disconnect)
4315 (record_full_target::mourn_inferior, record_full_target::kill):
4317 (record_full_open, record_full_close, record_full_async): Refactor
4318 as methods of the record_full_base_target class.
4319 (record_full_resume, record_full_commit_resume): Refactor
4320 as methods of the record_full_target class.
4321 (record_full_wait, record_full_stopped_by_watchpoint)
4322 (record_full_stopped_data_address)
4323 (record_full_stopped_by_sw_breakpoint)
4324 (record_full_supports_stopped_by_sw_breakpoint)
4325 (record_full_stopped_by_hw_breakpoint)
4326 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4327 methods of the record_full_base_target class.
4328 (record_full_store_registers, record_full_xfer_partial)
4329 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4330 Refactor as methods of the record_full_target class.
4331 (record_full_can_execute_reverse, record_full_get_bookmark)
4332 (record_full_goto_bookmark, record_full_execution_direction)
4333 (record_full_record_method, record_full_info, record_full_delete)
4334 (record_full_is_replaying, record_full_will_replay)
4335 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4336 (record_full_stop_replaying): Refactor as methods of the
4337 record_full_base_target class.
4338 (record_full_core_resume, record_full_core_kill)
4339 (record_full_core_fetch_registers)
4340 (record_full_core_prepare_to_store)
4341 (record_full_core_store_registers, record_full_core_xfer_partial)
4342 (record_full_core_insert_breakpoint)
4343 (record_full_core_remove_breakpoint)
4344 (record_full_core_has_execution): Refactor
4345 as methods of the record_full_core_target class.
4346 (record_full_base_target::supports_delete_record): New.
4347 (init_record_full_ops): Delete.
4348 (init_record_full_core_ops): Delete.
4349 (record_full_save): Refactor as method of the
4350 record_full_base_target class.
4351 (_initialize_record_full): Remove references to
4352 init_record_full_ops and init_record_full_core_ops.
4354 * remote.c (remote_target, extended_remote_target): New classes.
4355 (remote_ops): Now a remote_target.
4356 (extended_remote_ops): Now an extended_remote_target.
4357 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4358 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4359 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4360 (remote_pass_signals, remote_set_syscall_catchpoint)
4361 (remote_program_signals, )
4362 (remote_thread_always_alive): Remove target_ops parameter.
4363 (remote_thread_alive, remote_thread_name)
4364 (remote_update_thread_list, remote_threads_extra_info)
4365 (remote_static_tracepoint_marker_at)
4366 (remote_static_tracepoint_markers_by_strid)
4367 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4368 (remote_open): Refactor as methods of remote_target.
4369 (extended_remote_open, extended_remote_detach)
4370 (extended_remote_attach, extended_remote_post_attach):
4371 (extended_remote_supports_disable_randomization)
4372 (extended_remote_create_inferior): : Refactor as method of
4373 extended_remote_target.
4374 (remote_set_permissions, remote_open_1, remote_detach)
4375 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4376 (remote_resume, remote_commit_resume, remote_stop)
4377 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4378 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4379 (remote_prepare_to_store, remote_store_registers)
4380 (remote_flash_erase, remote_flash_done, remote_files_info)
4381 (remote_kill, remote_mourn, remote_insert_breakpoint)
4382 (remote_remove_breakpoint, remote_insert_watchpoint)
4383 (remote_watchpoint_addr_within_range)
4384 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4385 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4386 (remote_supports_stopped_by_sw_breakpoint)
4387 (remote_stopped_by_hw_breakpoint)
4388 (remote_supports_stopped_by_hw_breakpoint)
4389 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4390 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4391 (remote_verify_memory): Refactor as methods of remote_target.
4392 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4394 (remote_xfer_partial, remote_get_memory_xfer_limit)
4395 (remote_search_memory, remote_rcmd, remote_memory_map)
4396 (remote_pid_to_str, remote_get_thread_local_address)
4397 (remote_get_tib_address, remote_read_description): Refactor as
4398 methods of remote_target.
4399 (remote_target::fileio_open, remote_target::fileio_pwrite)
4400 (remote_target::fileio_pread, remote_target::fileio_close): New.
4401 (remote_hostio_readlink, remote_hostio_fstat)
4402 (remote_filesystem_is_local, remote_can_execute_reverse)
4403 (remote_supports_non_stop, remote_supports_disable_randomization)
4404 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4405 (remote_supports_enable_disable_tracepoint)
4406 (remote_supports_string_tracing)
4407 (remote_can_run_breakpoint_commands, remote_trace_init)
4408 (remote_download_tracepoint, remote_can_download_tracepoint)
4409 (remote_download_trace_state_variable, remote_enable_tracepoint)
4410 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4411 (remote_trace_start, remote_get_trace_status)
4412 (remote_get_tracepoint_status, remote_trace_stop)
4413 (remote_trace_find, remote_get_trace_state_variable_value)
4414 (remote_save_trace_data, remote_get_raw_trace_data)
4415 (remote_set_disconnected_tracing, remote_core_of_thread)
4416 (remote_set_circular_trace_buffer, remote_traceframe_info)
4417 (remote_get_min_fast_tracepoint_insn_len)
4418 (remote_set_trace_buffer_size, remote_set_trace_notes)
4419 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4420 (remote_disable_btrace, remote_teardown_btrace)
4421 (remote_read_btrace, remote_btrace_conf)
4422 (remote_augmented_libraries_svr4_read, remote_load)
4423 (remote_pid_to_exec_file, remote_can_do_single_step)
4424 (remote_execution_direction, remote_thread_handle_to_thread_info):
4425 Refactor as methods of remote_target.
4426 (init_remote_ops, init_extended_remote_ops): Delete.
4427 (remote_can_async_p, remote_is_async_p, remote_async)
4428 (remote_thread_events, remote_upload_tracepoints)
4429 (remote_upload_trace_state_variables): Refactor as methods of
4431 (_initialize_remote): Remove references to init_remote_ops and
4432 init_extended_remote_ops.
4434 * remote-sim.c (gdbsim_target): New class.
4435 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4436 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4437 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4438 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4439 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4440 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4441 Refactor as methods of gdbsim_target.
4442 (gdbsim_ops): Now a gdbsim_target.
4443 (init_gdbsim_ops): Delete.
4444 (gdbsim_cntrl_c): Adjust.
4445 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4447 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4448 (the_amd64_linux_nat_target): New.
4449 (amd64_linux_fetch_inferior_registers)
4450 (amd64_linux_store_inferior_registers): Refactor as methods of
4451 amd64_linux_nat_target.
4452 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4453 * i386-linux-nat.c: Don't include "linux-nat.h".
4454 (i386_linux_nat_target): New class.
4455 (the_i386_linux_nat_target): New.
4456 (i386_linux_fetch_inferior_registers)
4457 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4458 as methods of i386_linux_nat_target.
4459 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4460 * inf-child.c (inf_child_ops): Delete.
4461 (inf_child_fetch_inferior_registers)
4462 (inf_child_store_inferior_registers): Delete.
4463 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4464 methods of inf_child_target.
4465 (inf_child_target::supports_terminal_ours)
4466 (inf_child_target::terminal_init)
4467 (inf_child_target::terminal_inferior)
4468 (inf_child_target::terminal_ours_for_output)
4469 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4470 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4472 (inf_child_open, inf_child_disconnect, inf_child_close)
4473 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4474 (inf_child_post_startup_inferior, inf_child_can_run)
4475 (inf_child_pid_to_exec_file): Refactor as methods of
4477 (inf_child_follow_fork): Delete.
4478 (inf_child_target::can_create_inferior)
4479 (inf_child_target::can_attach): New.
4480 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4481 (inf_child_target::has_stack, inf_child_target::has_registers)
4482 (inf_child_target::has_execution): New.
4483 (inf_child_fileio_open, inf_child_fileio_pwrite)
4484 (inf_child_fileio_pread, inf_child_fileio_fstat)
4485 (inf_child_fileio_close, inf_child_fileio_unlink)
4486 (inf_child_fileio_readlink, inf_child_use_agent)
4487 (inf_child_can_use_agent): Refactor as methods of
4489 (return_zero, inf_child_target): Delete.
4490 (inf_child_target::inf_child_target): New.
4491 * inf-child.h: Include "target.h".
4492 (inf_child_target): Delete function prototype.
4493 (inf_child_target): New class.
4494 (inf_child_open_target, inf_child_mourn_inferior)
4495 (inf_child_maybe_unpush_target): Delete.
4496 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4497 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4498 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4499 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4500 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4501 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4502 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4503 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4504 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4505 methods of inf_ptrace_target.
4506 (inf_ptrace_target): Delete function.
4507 * inf-ptrace.h: Include "inf-child.h".
4508 (inf_ptrace_target): Delete function declaration.
4509 (inf_ptrace_target): New class.
4510 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4511 * linux-nat.c (linux_target): New.
4512 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4513 (linux_nat_target::~linux_nat_target): New.
4514 (linux_child_post_attach, linux_child_post_startup_inferior)
4515 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4516 (linux_child_remove_fork_catchpoint)
4517 (linux_child_insert_vfork_catchpoint)
4518 (linux_child_remove_vfork_catchpoint)
4519 (linux_child_insert_exec_catchpoint)
4520 (linux_child_remove_exec_catchpoint)
4521 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4522 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4523 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4524 (linux_nat_stopped_data_address)
4525 (linux_nat_stopped_by_sw_breakpoint)
4526 (linux_nat_supports_stopped_by_sw_breakpoint)
4527 (linux_nat_stopped_by_hw_breakpoint)
4528 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4529 (linux_nat_kill, linux_nat_mourn_inferior)
4530 (linux_nat_xfer_partial, linux_nat_thread_alive)
4531 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4532 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4533 (linux_child_static_tracepoint_markers_by_strid)
4534 (linux_nat_is_async_p, linux_nat_can_async_p)
4535 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4536 (linux_nat_supports_multi_process)
4537 (linux_nat_supports_disable_randomization, linux_nat_async)
4538 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4539 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4540 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4541 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4542 methods of linux_nat_target.
4543 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4544 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4546 (check_stopped_by_watchpoint): Adjust.
4547 (linux_xfer_partial): Delete.
4548 (linux_target_install_ops, linux_target, linux_nat_add_target):
4550 (linux_nat_target::linux_nat_target): New.
4551 * linux-nat.h: Include "inf-ptrace.h".
4552 (linux_nat_target): New.
4553 (linux_target, linux_target_install_ops, linux_nat_add_target):
4554 Delete function declarations.
4555 (linux_target): Declare global.
4556 * linux-thread-db.c (thread_db_target): New.
4557 (thread_db_target::thread_db_target): New.
4558 (thread_db_ops): Delete.
4559 (the_thread_db_target): New.
4560 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4561 (thread_db_update_thread_list, thread_db_pid_to_str)
4562 (thread_db_extra_thread_info)
4563 (thread_db_thread_handle_to_thread_info)
4564 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4565 (thread_db_resume): Refactor as methods of thread_db_target.
4566 (init_thread_db_ops): Delete.
4567 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4568 * x86-linux-nat.c: Don't include "linux-nat.h".
4569 (super_post_startup_inferior): Delete.
4570 (x86_linux_nat_target::~x86_linux_nat_target): New.
4571 (x86_linux_child_post_startup_inferior)
4572 (x86_linux_read_description, x86_linux_enable_btrace)
4573 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4574 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4575 methods of x86_linux_nat_target.
4576 (x86_linux_create_target): Delete. Bits folded ...
4577 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4579 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4580 (x86_linux_nat_target): New class.
4581 (x86_linux_create_target): Delete.
4582 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4583 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4584 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4585 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4586 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4587 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4589 (x86_use_watchpoints): Delete.
4590 * x86-nat.h: Include "breakpoint.h" and "target.h".
4591 (x86_use_watchpoints): Delete.
4592 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4593 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4594 (x86_insert_watchpoint, x86_remove_watchpoint)
4595 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4596 (x86_stopped_by_hw_breakpoint): New declarations.
4597 (x86_nat_target): New template class.
4599 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4600 (the_ppc_linux_nat_target): New.
4601 (ppc_linux_fetch_inferior_registers)
4602 (ppc_linux_can_use_hw_breakpoint)
4603 (ppc_linux_region_ok_for_hw_watchpoint)
4604 (ppc_linux_ranged_break_num_registers)
4605 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4606 (ppc_linux_insert_mask_watchpoint)
4607 (ppc_linux_remove_mask_watchpoint)
4608 (ppc_linux_can_accel_watchpoint_condition)
4609 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4610 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4611 (ppc_linux_watchpoint_addr_within_range)
4612 (ppc_linux_masked_watch_num_registers)
4613 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4614 (ppc_linux_read_description): Refactor as methods of
4615 ppc_linux_nat_target.
4616 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4618 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4619 (procfs_target): New class.
4620 (the_procfs_target): New.
4621 (procfs_target): Delete function.
4622 (procfs_auxv_parse, procfs_attach, procfs_detach)
4623 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4624 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4625 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4626 (procfs_create_inferior, procfs_update_thread_list)
4627 (procfs_thread_alive, procfs_pid_to_str)
4628 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4629 (procfs_stopped_data_address, procfs_insert_watchpoint)
4630 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4631 (proc_find_memory_regions, procfs_info_proc)
4632 (procfs_make_note_section): Refactor as methods of procfs_target.
4633 (_initialize_procfs): Adjust.
4634 * sol-thread.c (sol_thread_target): New class.
4635 (sol_thread_ops): Now a sol_thread_target.
4636 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4637 (sol_thread_fetch_registers, sol_thread_store_registers)
4638 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4639 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4640 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4641 (init_sol_thread_ops): Delete.
4642 (_initialize_sol_thread): Adjust. Remove references to
4643 init_sol_thread_ops and complete_target_initialization.
4645 * windows-nat.c (windows_nat_target): New class.
4646 (windows_fetch_inferior_registers)
4647 (windows_store_inferior_registers, windows_resume, windows_wait)
4648 (windows_attach, windows_detach, windows_pid_to_exec_file)
4649 (windows_files_info, windows_create_inferior)
4650 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4651 (windows_close, windows_pid_to_str, windows_xfer_partial)
4652 (windows_get_tib_address, windows_get_ada_task_ptid)
4653 (windows_thread_name, windows_thread_alive): Refactor as
4654 windows_nat_target methods.
4655 (do_initial_windows_stuff): Adjust.
4656 (windows_target): Delete function.
4657 (_initialize_windows_nat): Adjust.
4659 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4660 (darwin_mourn_inferior, darwin_kill_inferior)
4661 (darwin_create_inferior, darwin_attach, darwin_detach)
4662 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4663 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4664 (darwin_supports_multi_process): Refactor as darwin_nat_target
4666 (darwin_resume_to, darwin_files_info): Delete.
4667 (_initialize_darwin_inferior): Rename to ...
4668 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4669 * darwin-nat.h: Include "inf-child.h".
4670 (darwin_nat_target): New class.
4671 (darwin_complete_target): Delete.
4672 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4673 (darwin_target): New.
4674 (i386_darwin_fetch_inferior_registers)
4675 (i386_darwin_store_inferior_registers): Refactor as methods of
4677 (darwin_complete_target): Delete, with ...
4678 (_initialize_i386_darwin_nat): ... bits factored out here.
4680 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4681 (the_alpha_linux_nat_target): New.
4682 (alpha_linux_register_u_offset): Refactor as
4683 alpha_linux_nat_target method.
4684 (_initialize_alpha_linux_nat): Adjust.
4685 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4686 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4687 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4688 methods of linux_nat_trad_target.
4689 (linux_trad_target): Delete.
4690 * linux-nat-trad.h (linux_trad_target): Delete function.
4691 (linux_nat_trad_target): New class.
4692 * mips-linux-nat.c (mips_linux_nat_target): New class.
4693 (super_fetch_registers, super_store_registers, super_close):
4695 (the_mips_linux_nat_target): New.
4696 (mips64_linux_regsets_fetch_registers)
4697 (mips64_linux_regsets_store_registers)
4698 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4699 (mips_linux_register_u_offset, mips_linux_read_description)
4700 (mips_linux_can_use_hw_breakpoint)
4701 (mips_linux_stopped_by_watchpoint)
4702 (mips_linux_stopped_data_address)
4703 (mips_linux_region_ok_for_hw_watchpoint)
4704 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4705 (mips_linux_close): Refactor as methods of mips_linux_nat.
4706 (_initialize_mips_linux_nat): Adjust to C++ification.
4708 * aix-thread.c (aix_thread_target): New class.
4709 (aix_thread_ops): Now an aix_thread_target.
4710 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4711 (aix_thread_fetch_registers, aix_thread_store_registers)
4712 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4713 (aix_thread_thread_alive, aix_thread_pid_to_str)
4714 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4715 Refactor as methods of aix_thread_target.
4716 (init_aix_thread_ops): Delete.
4717 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4718 and complete_target_initialization.
4719 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4720 (rs6000_nat_target): New class.
4721 (the_rs6000_nat_target): New.
4722 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4723 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4724 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4725 (super_create_inferior): Delete.
4726 (_initialize_rs6000_nat): Adjust to C++ification.
4728 * arm-linux-nat.c (arm_linux_nat_target): New class.
4729 (the_arm_linux_nat_target): New.
4730 (arm_linux_fetch_inferior_registers)
4731 (arm_linux_store_inferior_registers, arm_linux_read_description)
4732 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4733 (arm_linux_remove_hw_breakpoint)
4734 (arm_linux_region_ok_for_hw_watchpoint)
4735 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4736 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4737 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4738 arm_linux_nat_target.
4739 (_initialize_arm_linux_nat): Adjust to C++ification.
4741 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4742 (the_aarch64_linux_nat_target): New.
4743 (aarch64_linux_fetch_inferior_registers)
4744 (aarch64_linux_store_inferior_registers)
4745 (aarch64_linux_child_post_startup_inferior)
4746 (aarch64_linux_read_description)
4747 (aarch64_linux_can_use_hw_breakpoint)
4748 (aarch64_linux_insert_hw_breakpoint)
4749 (aarch64_linux_remove_hw_breakpoint)
4750 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4751 (aarch64_linux_region_ok_for_hw_watchpoint)
4752 (aarch64_linux_stopped_data_address)
4753 (aarch64_linux_stopped_by_watchpoint)
4754 (aarch64_linux_watchpoint_addr_within_range)
4755 (aarch64_linux_can_do_single_step): Refactor as methods of
4756 aarch64_linux_nat_target.
4757 (super_post_startup_inferior): Delete.
4758 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4760 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4761 (the_hppa_linux_nat_target): New.
4762 (hppa_linux_fetch_inferior_registers)
4763 (hppa_linux_store_inferior_registers): Refactor as methods of
4764 hppa_linux_nat_target.
4765 (_initialize_hppa_linux_nat): Adjust to C++ification.
4767 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4768 (the_ia64_linux_nat_target): New.
4769 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4770 (ia64_linux_stopped_data_address)
4771 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4772 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4773 ia64_linux_nat_target methods.
4774 (super_xfer_partial): Delete.
4775 (_initialize_ia64_linux_nat): Adjust to C++ification.
4777 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4778 (the_m32r_linux_nat_target): New.
4779 (m32r_linux_fetch_inferior_registers)
4780 (m32r_linux_store_inferior_registers): Refactor as
4781 m32r_linux_nat_target methods.
4782 (_initialize_m32r_linux_nat): Adjust to C++ification.
4784 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4785 (the_m68k_linux_nat_target): New.
4786 (m68k_linux_fetch_inferior_registers)
4787 (m68k_linux_store_inferior_registers): Refactor as
4788 m68k_linux_nat_target methods.
4789 (_initialize_m68k_linux_nat): Adjust to C++ification.
4791 * s390-linux-nat.c (s390_linux_nat_target): New class.
4792 (the_s390_linux_nat_target): New.
4793 (s390_linux_fetch_inferior_registers)
4794 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4795 (s390_insert_watchpoint, s390_remove_watchpoint)
4796 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4797 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4798 (s390_auxv_parse, s390_read_description): Refactor as methods of
4799 s390_linux_nat_target.
4800 (_initialize_s390_nat): Adjust to C++ification.
4802 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4803 (the_sparc_linux_nat_target): New.
4804 (_initialize_sparc_linux_nat): Adjust to C++ification.
4805 * sparc-nat.c (sparc_fetch_inferior_registers)
4806 (sparc_store_inferior_registers): Remove target_ops parameter.
4807 * sparc-nat.h (sparc_fetch_inferior_registers)
4808 (sparc_store_inferior_registers): Remove target_ops parameter.
4809 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4810 (the_sparc64_linux_nat_target): New.
4811 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4813 * spu-linux-nat.c (spu_linux_nat_target): New class.
4814 (the_spu_linux_nat_target): New.
4815 (spu_child_post_startup_inferior, spu_child_post_attach)
4816 (spu_child_wait, spu_fetch_inferior_registers)
4817 (spu_store_inferior_registers, spu_xfer_partial)
4818 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4820 (_initialize_spu_nat): Adjust to C++ification.
4822 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4823 (the_tilegx_linux_nat_target): New.
4824 (fetch_inferior_registers, store_inferior_registers):
4825 Refactor as methods.
4826 (_initialize_tile_linux_nat): Adjust to C++ification.
4828 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4829 (the_xtensa_linux_nat_target): New.
4830 (xtensa_linux_fetch_inferior_registers)
4831 (xtensa_linux_store_inferior_registers): Refactor as
4832 xtensa_linux_nat_target methods.
4833 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4835 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4836 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4837 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4838 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4839 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4840 (fbsd_stopped_by_sw_breakpoint)
4841 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4842 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4843 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4844 (fbsd_post_startup_inferior, fbsd_post_attach)
4845 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4846 (fbsd_set_syscall_catchpoint)
4847 (super_xfer_partial, super_resume, super_wait)
4848 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4849 (fbsd_handle_debug_trap): Remove target_ops parameter.
4850 (fbsd_nat_add_target): Delete.
4851 * fbsd-nat.h: Include "inf-ptrace.h".
4852 (fbsd_nat_add_target): Delete.
4853 (USE_SIGTRAP_SIGINFO): Define.
4854 (fbsd_nat_target): New class.
4856 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4857 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4858 (amd64bsd_target): Delete.
4859 * amd64-bsd-nat.h: New file.
4860 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4862 (amd64_fbsd_nat_target): New class.
4863 (the_amd64_fbsd_nat_target): New.
4864 (amd64fbsd_read_description): Refactor as method of
4865 amd64_fbsd_nat_target.
4866 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4867 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4868 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4869 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4870 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4871 (i386bsd_target): Delete.
4872 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4873 (i386bsd_fetch_inferior_registers)
4874 (i386bsd_store_inferior_registers): Declare.
4875 (i386_bsd_nat_target): New class.
4876 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4877 (the_i386_fbsd_nat_target): New.
4878 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4879 i386_fbsd_nat_target methods.
4880 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4881 (_initialize_i386fbsd_nat): Adjust to C++ification.
4882 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4883 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4884 (_initialize_x86_bsd_nat): Adjust to C++ification.
4885 * x86-bsd-nat.h: Include "x86-nat.h".
4886 (x86bsd_target): Delete declaration.
4887 (x86bsd_nat_target): New class.
4889 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4890 (the_aarch64_fbsd_nat_target): New.
4891 (aarch64_fbsd_fetch_inferior_registers)
4892 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4893 aarch64_fbsd_nat_target.
4894 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4895 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4896 (the_alpha_bsd_nat_target): New.
4897 (alphabsd_fetch_inferior_registers)
4898 (alphabsd_store_inferior_registers): Refactor as
4899 alpha_bsd_nat_target methods.
4900 (_initialize_alphabsd_nat): Refactor as methods of
4901 alpha_bsd_nat_target.
4902 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4903 (the_amd64_nbsd_nat_target): New.
4904 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4905 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4906 (the_amd64_obsd_nat_target): New.
4907 (_initialize_amd64obsd_nat): Adjust to C++ification.
4908 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4909 (the_arm_fbsd_nat_target): New.
4910 (arm_fbsd_fetch_inferior_registers)
4911 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4912 (_initialize_arm_fbsd_nat): Refactor as methods of
4913 arm_fbsd_nat_target.
4914 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4915 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4916 (the_arm_netbsd_nat_target): New.
4917 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4918 arm_netbsd_nat_target.
4919 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4920 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4921 (the_hppa_nbsd_nat_target): New.
4922 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4923 hppa_nbsd_nat_target methods.
4924 (_initialize_hppanbsd_nat): Adjust to C++ification.
4925 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4926 (the_hppa_obsd_nat_target): New.
4927 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4928 methods of hppa_obsd_nat_target.
4929 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4931 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4932 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4934 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4935 (_initialize_i386obsd_nat): Use add_target.
4936 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4937 (the_m68k_bsd_nat_target): New.
4938 (m68kbsd_fetch_inferior_registers)
4939 (m68kbsd_store_inferior_registers): Refactor as methods of
4940 m68k_bsd_nat_target.
4941 (_initialize_m68kbsd_nat): Adjust to C++ification.
4942 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4943 (the_mips_fbsd_nat_target): New.
4944 (mips_fbsd_fetch_inferior_registers)
4945 (mips_fbsd_store_inferior_registers): Refactor as methods of
4946 mips_fbsd_nat_target.
4947 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4949 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4950 (the_mips_nbsd_nat_target): New.
4951 (mipsnbsd_fetch_inferior_registers)
4952 (mipsnbsd_store_inferior_registers): Refactor as methods of
4953 mips_nbsd_nat_target.
4954 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4955 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4956 (the_mips64_obsd_nat_target): New.
4957 (mips64obsd_fetch_inferior_registers)
4958 (mips64obsd_store_inferior_registers): Refactor as methods of
4959 mips64_obsd_nat_target.
4960 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4962 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4964 * nbsd-nat.h: Include "inf-ptrace.h".
4965 (nbsd_nat_target): New class.
4966 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4967 (obsd_wait): Refactor as methods of obsd_nat_target.
4968 (obsd_add_target): Delete.
4969 * obsd-nat.h: Include "inf-ptrace.h".
4970 (obsd_nat_target): New class.
4971 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4972 (the_ppc_fbsd_nat_target): New.
4973 (ppcfbsd_fetch_inferior_registers)
4974 (ppcfbsd_store_inferior_registers): Refactor as methods of
4975 ppc_fbsd_nat_target.
4976 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4978 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4979 (the_ppc_nbsd_nat_target): New.
4980 (ppcnbsd_fetch_inferior_registers)
4981 (ppcnbsd_store_inferior_registers): Refactor as methods of
4982 ppc_nbsd_nat_target.
4983 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4984 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4985 (the_ppc_obsd_nat_target): New.
4986 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4987 methods of ppc_obsd_nat_target.
4988 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4990 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4991 (the_sh_nbsd_nat_target): New.
4992 (shnbsd_fetch_inferior_registers)
4993 (shnbsd_store_inferior_registers): Refactor as methods of
4995 (_initialize_shnbsd_nat): Adjust to C++ification.
4996 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4997 (inf_ptrace_xfer_partial): Delete.
4998 (sparc_xfer_partial, sparc_target): Delete.
4999 * sparc-nat.h (sparc_fetch_inferior_registers)
5000 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5001 (sparc_target): Delete function declaration.
5002 (sparc_target): New template class.
5003 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5004 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5005 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5006 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5008 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5009 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5010 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5011 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5013 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5014 (the_vax_bsd_nat_target): New.
5015 (vaxbsd_fetch_inferior_registers)
5016 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5018 (_initialize_vaxbsd_nat): Adjust to C++ification.
5020 * bsd-kvm.c (bsd_kvm_target): New class.
5021 (bsd_kvm_ops): Now a bsd_kvm_target.
5022 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5023 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5024 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5026 (bsd_kvm_return_one): Delete.
5027 (bsd_kvm_add_target): Adjust to C++ification.
5029 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5030 (nto_procfs_target_procfs): New classes.
5031 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5032 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5033 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5034 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5035 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5036 (procfs_remove_hw_breakpoint, procfs_resume)
5037 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5038 (procfs_kill_inferior, procfs_store_registers)
5039 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5040 as methods of nto_procfs_target.
5041 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5042 (nto_native_ops): Delete.
5043 (procfs_open, procfs_native_open): Delete.
5044 (nto_native_ops): Now an nto_procfs_target_native.
5045 (init_procfs_targets): Adjust to C++ification.
5046 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5047 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5048 Refactor as methods of nto_procfs_target.
5050 * go32-nat.c (go32_nat_target): New class.
5051 (the_go32_nat_target): New.
5052 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5053 (go32_store_registers, go32_xfer_partial, go32_files_info)
5054 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5055 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5056 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5057 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5058 (go32_target): Delete.
5059 (_initialize_go32_nat): Adjust to C++ification.
5061 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5062 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5063 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5064 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5066 (gnu_target): Delete.
5067 * gnu-nat.h (gnu_target): Delete.
5068 (gnu_nat_target): New class.
5069 * i386-gnu-nat.c (gnu_base_target): New.
5070 (i386_gnu_nat_target): New class.
5071 (the_i386_gnu_nat_target): New.
5072 (_initialize_i386gnu_nat): Adjust to C++ification.
5074 2018-05-02 Pedro Alves <palves@redhat.com>
5076 * bfd-target.c (target_bfd_xclose): Rename to ...
5077 (target_bfd_close): ... this.
5078 (target_bfd_reopen): Adjust.
5079 * target.c (target_close): Remove references to to_xclose.
5080 * target.h (target_ops::to_xclose): Delete.
5081 (target_ops::to_close): Update comments.
5083 2018-05-02 Pedro Alves <palves@redhat.com>
5085 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5087 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5088 * inf-ptrace.c (inf_ptrace_register_u_offset)
5089 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5090 (inf_ptrace_store_register, inf_ptrace_store_registers)
5091 (inf_ptrace_trad_target): Move to ...
5092 * linux-nat-trad.c: ... this new file.
5093 * linux-nat-trad.h: New file.
5094 * linux-nat.c (linux_target_install_ops): Make extern.
5095 (linux_trad_target): Delete.
5096 * linux-nat.h (linux_trad_target): Delete declaration.
5097 (linux_target_install_ops): Declare.
5098 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5101 2018-05-02 Pedro Alves <palves@redhat.com>
5103 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5104 procfs_target/add_target here.
5105 * procfs.c (procfs_target): Make static.
5106 (_initialize_procfs): Call add_target here.
5107 * procfs.h (struct target_ops): Remove forward declaration.
5108 (procfs_target): Remove declaration.
5109 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5111 2018-05-02 Pedro Alves <palves@redhat.com>
5113 * procfs.c (procfs_stopped_by_watchpoint)
5114 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5115 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5117 (procfs_use_watchpoints): Delete, move contents...
5118 (procfs_target): ... here.
5119 * procfs.h (procfs_use_watchpoints): Delete declaration.
5120 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5121 procfs_use_watchpoints.
5122 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5123 procfs_use_watchpoints.
5125 2018-05-02 Tom Tromey <tom@tromey.com>
5128 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5129 and var_zuinteger_unlimited.
5130 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5131 and PARAM_ZUINTEGER_UNLIMITED.
5132 (set_parameter_value): Handle var_zuinteger and
5133 var_zuinteger_unlimited.
5134 (add_setshow_generic): Likewise.
5135 (parmpy_init): Likewise.
5137 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5140 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5141 pointer is not null before dereferencing it.
5143 2018-04-30 Tom Tromey <tom@tromey.com>
5145 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5148 2018-04-30 Tom Tromey <tom@tromey.com>
5150 * breakpoint.c (mention): Remove use of is_mi_like_p.
5151 (print_mention_ranged_breakpoint): Likewise.
5152 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5155 2018-04-30 Tom Tromey <tom@tromey.com>
5157 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5159 2018-04-30 Tom Tromey <tom@tromey.com>
5161 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5162 (info_spu_event_command): Remove some uses of is_mi_like_p.
5164 2018-04-30 Tom Tromey <tom@tromey.com>
5166 * python/py-framefilter.c (py_print_single_arg)
5167 (enumerate_locals, py_print_args, py_print_frame): Remove some
5168 uses of is_mi_like_p.
5170 2018-04-30 Tom Tromey <tom@tromey.com>
5173 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5174 * ui-out.h (ui_out::is_mi_like_p): Now const.
5175 (ui_out::do_is_mi_like_p): Now const.
5176 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5178 2018-04-30 Tom Tromey <tom@tromey.com>
5180 * varobj.c (varobj_set_visualizer): Use new_reference.
5181 * python/python.c (gdbpy_decode_line): Use new_reference.
5182 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5185 2018-04-30 Tom Tromey <tom@tromey.com>
5187 * varobj.c (install_new_value): Use new_reference.
5188 * value.h (value_incref): Return void. Swap intro comment with
5190 * value.c (set_value_parent): Use new_reference.
5191 (value_incref): Return void. Update intro comment.
5192 (release_value): Use new_reference.
5193 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5195 2018-04-30 Tom Tromey <tom@tromey.com>
5197 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5198 * gdb_bfd.h (new_bfd_ref): Remove.
5199 (gdb_bfd_open): Update comment.
5200 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5201 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5202 (gdb_bfd_fdopenr): Use new_reference.
5203 * exec.c (exec_file_attach): Use new_reference.
5205 2018-04-30 Tom Tromey <tom@tromey.com>
5207 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5210 2018-04-30 Tom Tromey <tom@tromey.com>
5212 * jit.c (jit_read_code_entry): Use type_align.
5213 * i386-tdep.c (i386_gdbarch_init): Don't call
5214 set_gdbarch_long_long_align_bit.
5215 * gdbarch.sh: Remove long_long_align_bit.
5216 * gdbarch.c, gdbarch.h: Rebuild.
5217 * arc-tdep.c (arc_type_align): New function.
5218 (arc_gdbarch_init): Use arc_type_align. Don't call
5219 set_gdbarch_long_long_align_bit.
5221 2018-04-30 Tom Tromey <tom@tromey.com>
5223 * rust-lang.c (rust_type_alignment): Remove.
5224 (rust_composite_type): Use type_align.
5226 2018-04-30 Tom Tromey <tom@tromey.com>
5228 * NEWS: Mention Type.align.
5229 * python/py-type.c (typy_get_alignof): New function.
5230 (type_object_getset): Add "alignof".
5232 2018-04-30 Tom Tromey <tom@tromey.com>
5236 * std-operator.def (UNOP_ALIGNOF): New operator.
5237 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5239 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5240 * c-lang.c (c_op_print_tab): Add alignof.
5241 * c-exp.y (ALIGNOF): New token.
5242 (exp): Add "ALIGNOF" production.
5243 (ident_tokens): Add _Alignof and alignof.
5245 2018-04-30 Tom Tromey <tom@tromey.com>
5247 * i386-tdep.c (i386_type_align): New function.
5248 (i386_gdbarch_init): Update.
5249 * gdbarch.sh (type_align): New method.
5250 * gdbarch.c, gdbarch.h: Rebuild.
5251 * arch-utils.h (default_type_align): Declare.
5252 * arch-utils.c (default_type_align): New function.
5253 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5254 (struct type) <align_log2>: New field.
5255 <instance_flags>: Now a bitfield.
5256 (TYPE_RAW_ALIGN): New macro.
5257 (type_align, type_raw_align, set_type_align): Declare.
5258 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5260 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5261 (get_alignment, maybe_set_alignment): New functions.
5262 (read_structure_type, read_enumeration_type, read_array_type)
5263 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5264 (read_subrange_type, read_base_type): Set type alignment.
5266 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5268 * dwarf2read.c (read_index_from_section): Use bool.
5270 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5273 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5276 2018-04-29 John Reiser <jreiser@BitWagon.com>
5279 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5280 last step, and do it atomically.
5282 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5284 * compile/compile-c-types.c (convert_int, convert_float):
5287 2018-04-27 Tom Tromey <tom@tromey.com>
5290 * rust-lang.c (rust_inclusive_range_type_p): New function.
5291 (rust_range): Handle inclusive ranges.
5292 (rust_compute_range): Likewise.
5293 * rust-exp.y (struct rust_op) <inclusive>: New field.
5294 (DOTDOTEQ): New constant.
5295 (range_expr): Add "..=" productions.
5296 (operator_tokens): Add "..=" token.
5297 (ast_range): Add "inclusive" parameter.
5298 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5300 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5302 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5303 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5305 * expprint.c (print_subexp_standard): Handle new bounds values.
5306 (dump_subexp_body_standard): Likewise.
5308 2018-04-27 Tom Tromey <tom@tromey.com>
5310 * configure: Rebuild.
5311 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5312 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5314 (class symbol_needs_eval_context): Likewise.
5315 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5316 (mock_mapped_index::symbol_name_at): Use "override". Remove
5318 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5320 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5321 * aarch64-tdep.c (instruction_reader::read): Use "override".
5322 (instruction_reader_test::read): Likewise.
5323 * arm-tdep.c (instruction_reader::read): Use "override".
5324 (instruction_reader_thumb::read): Likewise.
5326 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5329 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5330 instead of remote_send.
5331 (remote_send): Remove.
5333 2018-04-26 Pedro Alves <palves@redhat.com>
5335 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5336 find_function_start_sal instead of find_pc_line.
5338 2018-04-26 Pedro Alves <palves@redhat.com>
5340 * breakpoint.c (set_breakpoint_location_function): Handle
5342 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5343 * elfread.c (elf_symtab_read): Give data symbols with
5344 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5345 (elf_rel_plt_read): Update comment.
5346 * linespec.c (convert_linespec_to_sals): Handle
5348 (minsym_found): Handle mst_data_gnu_ifunc.
5349 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5350 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5351 * parse.c (find_minsym_type_and_address): Handle
5353 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5354 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5355 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5357 <mst_data_gnu_ifunc>: New enumerator.
5359 2018-04-26 Pedro Alves <palves@redhat.com>
5361 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5362 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5363 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5365 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5366 (lookup_minimal_symbol_by_pc): Adjust.
5367 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5368 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5369 * minsyms.h (lookup_msym_prefer): New enum.
5370 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5371 parameter by a lookup_msym_prefer parameter.
5373 2018-04-26 Pedro Alves <palves@redhat.com>
5375 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5376 ends in "@plt" instead of looking at the symbol's section.
5378 2018-04-26 Pedro Alves <palves@redhat.com>
5380 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5382 (find_pc_partial_function_gnu_ifunc): Rename to ...
5383 (find_pc_partial_function): ... this, and remove references to
5385 (find_pc_partial_function): Delete old implementation.
5386 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5388 2018-04-26 Pedro Alves <palves@redhat.com>
5390 * linespec.c (struct bound_minimal_symbol_search_key): New.
5391 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5392 skip first line if we found a GNU ifunc minimal symbol by name.
5393 (compare_msymbols): Change parameters to work with a destructured
5395 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5398 2018-04-26 Pedro Alves <palves@redhat.com>
5400 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5401 ifunc targets here. Instead, if we have an ifunc minsym, use its
5403 (add_location_to_breakpoint): Store the minsym and the objfile in
5404 the breakpoint location.
5405 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5406 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5407 Record the minsym in the sal.
5408 * symtab.h (symtab_and_line) <msymbol>: New field.
5410 2018-04-26 Pedro Alves <palves@redhat.com>
5412 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5413 unless we actually resolved the ifunc.
5415 2018-04-26 Pedro Alves <palves@redhat.com>
5417 * c-exp.y (variable production): Prefer ifunc minsyms over
5418 regular function symbols.
5419 * symtab.c (find_gnu_ifunc): New function.
5420 * minsyms.h (lookup_msym_prefer): New enum.
5421 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5422 parameter by a lookup_msym_prefer parameter.
5423 * symtab.h (find_gnu_ifunc): New declaration.
5425 2018-04-26 Pedro Alves <palves@redhat.com>
5427 * blockframe.c (find_gnu_ifunc_target_type): New function.
5428 (find_function_type): New.
5429 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5430 return a value with a memory address.
5431 (eval_call): For calls to GNU ifunc functions, try to find the
5432 type of the target function from the type that the resolver
5434 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5436 * infcall.c (find_function_return_type): Delete.
5437 (find_function_addr): Add 'function_type' parameter. For calls to
5438 GNU ifunc functions, try to find the type of the target function
5439 from the type that the resolver returns, and return it via
5441 (call_function_by_hand_dummy): Adjust to use the function type
5442 returned by find_function_addr.
5443 (find_function_addr): Add 'function_type' parameter and move
5445 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5448 2018-04-26 Pedro Alves <palves@redhat.com>
5450 * c-exp.y (variable production): Skip finding an alias for ifunc
5453 2018-04-26 Pedro Alves <palves@redhat.com>
5455 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5457 2018-04-25 Pedro Alves <palves@redhat.com>
5459 * infcmd.c (kill_command): Print the pid as string, not the whole
5460 thread's ptid. Add comment. s/has been killed/killed/ in output
5462 * remote.c (remote_detach_1): Print the pid as string, not the
5463 whole thread's ptid.
5465 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5466 Sergio Durigan Junior <sergiodj@redhat.com>
5467 Pedro Alves <palves@redhat.com>
5469 * infcmd.c (kill_command): Print message when inferior has
5471 * inferior.c (print_inferior_events): Remove 'static'. Set as
5473 (add_inferior): Improve message printed when
5474 'print_inferior_events' is on.
5475 (exit_inferior): Remove message printed when
5476 'print_inferior_events' is on.
5477 (detach_inferior): Improve message printed when
5478 'print_inferior_events' is on.
5479 (initialize_inferiors): Use 'add_inferior_silent' to set
5480 'current_inferior_'.
5481 * inferior.h (print_inferior_events): Declare here as
5483 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5484 '[Detaching...]' messages when 'print_inferior_events' is on.
5485 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5486 as prefix/suffix for messages. Remove periods. Fix erroneous
5487 'Detaching after fork from child...', replace it by '... from
5489 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5490 prefix/suffix when printing 'Detaching...' messages. Print
5491 them when 'print_inferior_events' is on.
5492 * remote.c (remote_detach_1): Print message when detaching
5493 from inferior and '!is_fork_parent'.
5495 2018-04-24 Tom Tromey <tom@tromey.com>
5497 * cli-out.h: Reindent.
5499 2018-04-24 Tom Tromey <tom@tromey.com>
5501 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5502 (cli_ui_out::do_field_string): Use fputs_filtered.
5503 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5505 2018-04-23 Tom Tromey <tom@tromey.com>
5507 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5508 gdb::unique_xmalloc_ptr.
5510 2018-04-23 Tom Tromey <tom@tromey.com>
5512 * configure: Rebuild.
5514 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5517 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5518 prepare_for_testing. Set normal_bp to r_debug_state if target
5521 2018-04-21 Pedro Alves <palves@redhat.com>
5522 Rajendra SY <rajendra.sy@gmail.com>
5524 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5525 * remote.c (extended_remote_attach): In all-stop mode, mark the
5526 thread as executing.
5528 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5530 * thread.c (thread_apply_all_command): Fix comment.
5531 (thread_command): Fix comment.
5533 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5535 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5537 * features/aarch64-core.c (create_feature_aarch64_core):
5539 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5541 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5543 * features/i386/32bit-avx512.c
5544 (create_feature_i386_32bit_avx512): Likewise.
5545 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5547 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5549 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5551 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5553 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5555 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5557 * features/i386/64bit-avx512.c
5558 (create_feature_i386_64bit_avx512): Likewise.
5559 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5561 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5563 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5565 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5567 * features/i386/64bit-segments.c
5568 (create_feature_i386_64bit_segments): Likewise.
5569 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5571 * features/i386/x32-core.c
5572 (create_feature_i386_x32_core): Likewise.
5573 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5574 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5575 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5576 * target-descriptions.c: In generated code, don't pass xml
5579 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5581 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5582 (print_xml_feature::visit_post): Likewise.
5583 (print_xml_feature::visit): Likewise.
5584 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5585 (print_xml_feature): Add new class.
5586 * regformats/regdat.sh: Null xmltarget on feature targets.
5587 * target-descriptions.c (struct target_desc): Add xmltarget.
5588 (maintenance_check_tdesc_xml_convert): Add unittest function.
5589 (tdesc_get_features_xml): Add function to get xml.
5590 (maintenance_check_xml_descriptions): Test xml generation.
5591 * xml-tdesc.c (string_read_description_xml): Add function.
5592 * xml-tdesc.h (string_read_description_xml): Add declaration.
5594 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5596 * features/Makefile: Add feature marker to targets with new style
5597 target descriptions.
5598 * regformats/aarch64.dat: Regenerate.
5599 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5600 * regformats/i386/amd64-avx-linux.dat: Likewise.
5601 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5602 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5603 * regformats/i386/amd64-linux.dat: Likewise.
5604 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5605 * regformats/i386/amd64.dat: Likewise.
5606 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5607 * regformats/i386/i386-avx-linux.dat: Likewise.
5608 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5609 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5610 * regformats/i386/i386-linux.dat: Likewise.
5611 * regformats/i386/i386-mmx-linux.dat: Likewise.
5612 * regformats/i386/i386-mpx-linux.dat: Likewise.
5613 * regformats/i386/i386.dat: Likewise.
5614 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5615 * regformats/i386/x32-avx-linux.dat: Likewise.
5616 * regformats/i386/x32-linux.dat: Likewise.
5617 * regformats/tic6x-c62x-linux.dat: Likewise.
5618 * regformats/tic6x-c64x-linux.dat: Likewise.
5619 * regformats/tic6x-c64xp-linux.dat: Likewise.
5620 * regformats/regdat.sh: Parse feature marker.
5622 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5624 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5625 (tdesc_osabi_name): Likewise.
5626 * target-descriptions.c (tdesc_architecture_name): Add new
5628 (tdesc_osabi_name): Likewise.
5630 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5632 * common/tdesc.c (tdesc_predefined_type): Move to here.
5633 (tdesc_named_type): Likewise.
5634 (tdesc_create_vector): Likewise.
5635 (tdesc_create_struct): Likewise.
5636 (tdesc_set_struct_size): Likewise.
5637 (tdesc_create_union): Likewise.
5638 (tdesc_create_flags): Likewise.
5639 (tdesc_create_enum): Likewise.
5640 (tdesc_add_field): Likewise.
5641 (tdesc_add_typed_bitfield): Likewise.
5642 (tdesc_add_bitfield): Likewise.
5643 (tdesc_add_flag): Likewise.
5644 (tdesc_add_enum_value): Likewise.
5645 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5646 (struct tdesc_type_vector): Likewise.
5647 (struct tdesc_type_field): Likewise.
5648 (struct tdesc_type_with_fields): Likewise.
5649 (tdesc_create_enum): Add declaration.
5650 (tdesc_add_typed_bitfield): Likewise.
5651 (tdesc_add_enum_value): Likewise.
5652 * target-descriptions.c (tdesc_type_field): Move from here.
5653 (tdesc_type_builtin): Likewise.
5654 (tdesc_type_vector): Likewise.
5655 (tdesc_type_with_fields): Likewise.
5656 (tdesc_predefined_types): Likewise.
5657 (tdesc_named_type): Likewise.
5658 (tdesc_create_vector): Likewise.
5659 (tdesc_create_struct): Likewise.
5660 (tdesc_set_struct_size): Likewise.
5661 (tdesc_create_union): Likewise.
5662 (tdesc_create_flags): Likewise.
5663 (tdesc_create_enum): Likewise.
5664 (tdesc_add_field): Likewise.
5665 (tdesc_add_typed_bitfield): Likewise.
5666 (tdesc_add_bitfield): Likewise.
5667 (tdesc_add_flag): Likewise.
5668 (tdesc_add_enum_value): Likewise.
5669 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5670 (tdesc_add_typed_bitfield): Likewise.
5671 (tdesc_add_enum_value): Likewise.
5673 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5675 * common/tdesc.c (tdesc_feature::accept): Move to here.
5676 (tdesc_feature::operator==): Likewise.
5677 (tdesc_create_reg): Likewise.
5678 * common/tdesc.h (tdesc_type_kind): Likewise.
5679 (struct tdesc_type): Likewise.
5680 (struct tdesc_feature): Likewise.
5681 * regformats/regdat.sh: Create a feature.
5682 * target-descriptions.c (tdesc_type_kind): Move from here.
5683 (tdesc_type): Likewise.
5684 (tdesc_type_up): Likewise.
5685 (tdesc_feature): Likewise.
5686 (tdesc_create_reg): Likewise.
5688 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5690 * Makefile.in: Add arch/tdesc.c
5691 * common/tdesc.c: New file.
5692 * common/tdesc.h (tdesc_element_visitor): Move to here.
5693 (tdesc_element): Likewise.
5694 (tdesc_reg): Likewise.
5695 (tdesc_reg_up): Likewise.
5696 * regformats/regdef.h (reg): Add offset to constructors.
5697 * target-descriptions.c (tdesc_element_visitor): Move from here.
5698 (tdesc_element): Likewise.
5699 (tdesc_reg): Likewise.
5700 (tdesc_reg_up): Likewise.
5702 2018-04-17 Tom Tromey <tom@tromey.com>
5704 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5707 2018-04-17 Tom Tromey <tom@tromey.com>
5709 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5711 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5713 * symtab.c (print_symbol_info): Skip printing filename and line
5714 number when `last' is NULL.
5715 (symtab_symbol_info): Use empty string instead of NULL for first
5716 invocation of print_symbol_info.
5717 (rbreak_command): Pass NULL to `last' parameter of
5720 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5722 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5725 2018-04-16 Pedro Alves <palves@redhat.com>
5727 * MAINTAINERS (sh): Remove.
5728 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5729 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5730 (ALLDEPFILES): Remove sh64-tdep.c.
5731 * NEWS: Mentions that support for SH-5/SH64 is removed.
5732 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5733 (sh*-*-openbsd*): Ditto.
5734 (sh64-*-elf*): Remove.
5736 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5737 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5738 * sh-tdep.c: No longer include "sh64-tdep.h".
5739 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5740 * sh64-tdep.c, sh64-tdep.h: Remove files.
5742 2018-04-16 Pedro Alves <palves@redhat.com>
5744 * MAINTAINERS: Remove m88k.
5745 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5746 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5747 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5748 * NEWS: Mention that support for m88k was removed.
5749 * configure.host (m88*-*-*): Remove support.
5750 * configure.nat (m88k-*-*): Remove support.
5751 * configure.tgt (m88*-*-openbsd*): Remove.
5752 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5754 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5756 * configure.tgt (x86_tobjs): New variable.
5757 (amd64_tobjs, i386_tobjs): Use it.
5759 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5761 * symtab.c (print_symbol_info): Precede the symbol definition by
5762 the line number when available.
5763 * NEWS: Advertise this enhancement.
5765 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5767 * NEWS (New options): announce set/show record btrace cpu.
5768 * btrace.c: Include record-btrace.h.
5769 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5770 the vendor is unknown.
5771 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5772 Maybe overwrite the btrace configuration's cpu.
5773 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5774 (btrace_fetch): Add cpu parameter. Update callers.
5775 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5776 Maybe overwrite the btrace configuration's cpu. Skip enabling
5777 errata workarounds if the vendor is unknown.
5778 * python/py-record-btrace.c: Include record-btrace.h.
5779 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5780 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5781 * record-btrace.c (record_btrace_cpu_state_kind): New.
5782 (record_btrace_cpu): New.
5783 (set_record_btrace_cpu_cmdlist): New.
5784 (record_btrace_get_cpu): New.
5785 (require_btrace_thread, record_btrace_info)
5786 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5787 (cmd_set_record_btrace_cpu_none): New.
5788 (cmd_set_record_btrace_cpu_auto): New.
5789 (cmd_set_record_btrace_cpu): New.
5790 (cmd_show_record_btrace_cpu): New.
5791 (_initialize_record_btrace): Initialize set/show record btrace cpu
5793 * record-btrace.h (record_btrace_get_cpu): New.
5795 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5797 * record.c (set_record_command): Fix typo in message.
5799 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5801 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5803 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5805 * infrun.c (process_event_stop_test): Call
5806 gdbarch_in_indirect_branch_thunk.
5807 * gdbarch.sh (in_indirect_branch_thunk): New.
5808 * gdbarch.c: Regenerated.
5809 * gdbarch.h: Regenerated.
5812 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5813 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5814 (ALLDEPFILES): Add x86-tdep.c.
5815 * arch-utils.h (default_in_indirect_branch_thunk): New.
5816 * arch-utils.c (default_in_indirect_branch_thunk): New.
5817 * i386-tdep: Include x86-tdep.h.
5818 (i386_in_indirect_branch_thunk): New.
5819 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5821 * amd64-tdep: Include x86-tdep.h.
5822 (amd64_in_indirect_branch_thunk): New.
5823 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5825 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5828 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5829 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5830 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5833 2018-04-12 Tom Tromey <tom@tromey.com>
5835 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5836 (rust_evaluate_subexp): Likewise.
5838 2018-04-12 Pedro Alves <palves@redhat.com>
5840 * procfs.c (procfs_detach): Make forward declaration's prototype
5841 match definition's protototype.
5842 (proc_get_LDT_entry): Remove stale do_cleanups call.
5844 2018-04-12 Pedro Alves <palves@redhat.com>
5846 * target.h (target_ops::to_has_exited): Delete.
5847 (target_has_exited): Delete.
5848 * target-delegates.c: Regenerate.
5850 2018-04-11 Pedro Alves <palves@redhat.com>
5852 * target.c (fileio_fh_t::t): Add comment.
5853 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5854 (target_fileio_close): Handle a NULL target.
5855 (invalidate_fileio_fh): New.
5856 (target_close): Call it.
5857 * remote.c (remote_hostio_send_command): No longer check whether
5858 remote_desc is open.
5860 2018-04-11 Pedro Alves <palves@redhat.com>
5862 * target.c (fileio_fh_t): Make it a named struct instead of a
5864 (fileio_fh_t::is_closed): New method.
5865 (DEF_VEC_O (fileio_fh_t)): Remove.
5866 (fileio_fhandles): Now a std::vector.
5867 (is_closed_fileio_fh): Delete.
5868 (acquire_fileio_fd): Adjust. Rename parameters.
5869 (release_fileio_fd): Adjust.
5870 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5871 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5872 (target_fileio_close): Adjust.
5874 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5876 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5879 2018-04-10 Pedro Alves <palves@redhat.com>
5881 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5882 (scoped_finish_thread_state): New class.
5883 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5885 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5886 (fetch_inferior_event, normal_stop): Likewise.
5887 * thread.c (finish_thread_state_cleanup): Delete.
5889 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5890 Pedro Alves <palves@redhat.com>
5892 * value.c: Include "selftest.h" and "common/array-view.h".
5893 (struct range) <operator ==>: New.
5894 (test_ranges_contain): New.
5895 (check_ranges_vector): New.
5896 (test_insert_into_bit_range_vector): New.
5897 (_initialize_values): Register selftests.
5898 * common/array-view.h (operator==, operator!=): New.
5900 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5902 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5904 * inline-frame.c: Include <algorithm>.
5905 (struct inline_state): Add constructor.
5906 (inline_state_s): Remove.
5907 (DEF_VEC_O(inline_state_s)): Remove.
5908 (inline_states): Change type to std::vector.
5909 (find_inline_frame_state): Adjust to std::vector.
5910 (allocate_inline_frame_state): Remove.
5911 (clear_inline_frame_state): Adjust to std::vector.
5912 (skip_inline_frames): Adjust to std::vector.
5914 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5916 * tracepoint.h (struct trace_state_variable): Add constructor.
5917 <name>: Change type to std::string.
5918 * tracepoint.c (tsv_s): Remove.
5919 (DEF_VEC_O(tsv_s)): Remove.
5920 (tvariables): Change to std::vector.
5921 (create_trace_state_variable): Adjust to std::vector.
5922 (find_trace_state_variable): Likewise.
5923 (find_trace_state_variable_by_number): Likewise.
5924 (delete_trace_state_variable): Likewise.
5925 (trace_variable_command): Adjust to std::string.
5926 (delete_trace_variable_command): Likewise.
5927 (tvariables_info_1): Adjust to std::vector.
5928 (save_trace_state_variables): Likewise.
5929 (start_tracing): Likewise.
5930 (merge_uploaded_trace_state_variables): Adjust to std::vector
5932 * target.h (struct target_ops)
5933 <to_download_trace_state_variable>: Pass reference to
5934 trace_state_variable.
5935 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5936 * target-delegates.c: Re-generate.
5937 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5938 (mi_tsv_deleted): Likewise.
5939 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5940 * remote.c (remote_download_trace_state_variable): Change
5941 pointer to reference and adjust.
5942 * make-target-delegates (parse_argtypes): Handle references.
5943 (write_function_header): Likewise.
5944 (munge_type): Likewise.
5946 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5948 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5949 string_view-selftests.c.
5950 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5952 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5953 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5954 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5955 * unittests/basic_string_view/element_access/char/1.cc:
5957 * unittests/basic_string_view/element_access/char/empty.cc:
5959 * unittests/basic_string_view/element_access/char/front_back.cc:
5961 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5962 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5964 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5966 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5968 * unittests/basic_string_view/operations/compare/char/1.cc:
5970 * unittests/basic_string_view/operations/compare/char/13650.cc:
5972 * unittests/basic_string_view/operations/copy/char/1.cc:
5974 * unittests/basic_string_view/operations/data/char/1.cc:
5976 * unittests/basic_string_view/operations/find/char/1.cc:
5978 * unittests/basic_string_view/operations/find/char/2.cc:
5980 * unittests/basic_string_view/operations/find/char/3.cc:
5982 * unittests/basic_string_view/operations/find/char/4.cc:
5984 * unittests/basic_string_view/operations/rfind/char/1.cc:
5986 * unittests/basic_string_view/operations/rfind/char/2.cc:
5988 * unittests/basic_string_view/operations/rfind/char/3.cc:
5990 * unittests/basic_string_view/operations/substr/char/1.cc:
5992 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5993 * unittests/string_view-selftests.c: New file.
5995 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5997 * unittests/basic_string_view/capacity/1.cc: New file.
5998 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5999 * unittests/basic_string_view/cons/char/1.cc: New file.
6000 * unittests/basic_string_view/cons/char/2.cc: New file.
6001 * unittests/basic_string_view/cons/char/3.cc: New file.
6002 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6003 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6004 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6005 * unittests/basic_string_view/element_access/char/1.cc: New file.
6006 * unittests/basic_string_view/element_access/char/2.cc: New file.
6007 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6008 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6009 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6010 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6011 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6012 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6013 * unittests/basic_string_view/include.cc: New file.
6014 * unittests/basic_string_view/inserters/char/1.cc: New file.
6015 * unittests/basic_string_view/inserters/char/2.cc: New file.
6016 * unittests/basic_string_view/inserters/char/3.cc: New file.
6017 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6018 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6019 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6020 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6021 * unittests/basic_string_view/literals/types.cc: New file.
6022 * unittests/basic_string_view/literals/values.cc: New file.
6023 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6024 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6025 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6026 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6027 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6028 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6029 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6030 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6031 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6032 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6033 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6034 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6035 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6036 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6037 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6038 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6039 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6040 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6041 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6042 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6043 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6044 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6045 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6046 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6047 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6048 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6049 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6050 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6051 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6052 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6053 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6054 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6055 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6056 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6057 * unittests/basic_string_view/operators/char/2.cc: New file.
6058 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6059 * unittests/basic_string_view/range_access/char/1.cc: New file.
6060 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6061 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6062 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6063 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6064 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6065 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6066 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6067 * unittests/basic_string_view/typedefs.cc: New file.
6068 * unittests/basic_string_view/types/1.cc: New file.
6070 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6072 * common/gdb_string_view.h: Remove libstdc++ implementation
6073 details, adjust to gdb reality.
6074 * common/gdb_string_view.tcc: Likewise.
6075 * cli/cli-script.c (struct string_view): Remove.
6076 (user_args) <m_args>: Change element type to gdb::string_view.
6077 (user_args::insert_args): Adjust.
6079 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6081 * common/gdb_string_view.h: New file.
6082 * common/gdb_string_view.tcc: New file.
6084 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6086 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6087 * configure: Re-generate.
6089 2018-04-09 Pedro Alves <palves@redhat.com>
6091 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6092 (set_target_gdbarch): Call
6093 gdb::observers::architecture_changed.notify instead of
6094 observer_notify_architecture_changed.
6096 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6098 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6099 (do_restore_current_traceframe_cleanup): Remove.
6100 (restore_current_traceframe_cleanup_dtor): Remove.
6101 (make_cleanup_restore_current_traceframe): Remove.
6102 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6104 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6105 * infrun.c (fetch_inferior_event): Use
6106 scoped_restore_current_traceframe.
6108 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6110 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6112 <n_allocated_type_units>: Remove.
6113 <all_type_units>: Change to std::vector.
6114 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6115 to std::vector change.
6116 (dwarf2_per_objfile::get_cutu): Likewise.
6117 (dwarf2_per_objfile::get_tu): Likewise.
6118 (create_signatured_type_table_from_index): Likewise.
6119 (create_signatured_type_table_from_debug_names): Likewise.
6120 (dw2_symtab_iter_next): Likewise.
6121 (dw2_print_stats): Likewise.
6122 (dw2_expand_all_symtabs): Likewise.
6123 (dw2_expand_marked_cus): Likewise.
6124 (dw2_debug_names_iterator::next): Likewise.
6125 (dwarf2_initialize_objfile): Likewise.
6126 (add_signatured_type_cu_to_table): Likewise.
6127 (create_all_type_units): Likewise.
6128 (add_type_unit): Likewise.
6129 (struct tu_abbrev_offset): Add constructor.
6130 (build_type_psymtabs_1): Adjust to std::vector change.
6131 (print_tu_stats): Likewise.
6132 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6133 (write_debug_names): Likewise.
6135 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6137 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6138 Make an std::vector.
6139 <n_comp_units>: Remove.
6140 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6141 to std::vector change.
6142 (dwarf2_per_objfile::get_cutu): Likewise.
6143 (dwarf2_per_objfile::get_cu): Likewise.
6144 (create_cus_from_index): Likewise.
6145 (create_addrmap_from_index): Likewise.
6146 (create_addrmap_from_aranges): Likewise.
6147 (dwarf2_read_index): Likewise.
6148 (dw2_find_last_source_symtab): Likewise.
6149 (dw2_map_symtabs_matching_filename): Likewise.
6150 (dw2_symtab_iter_next): Likewise.
6151 (dw2_print_stats): Likewise.
6152 (dw2_expand_all_symtabs): Likewise.
6153 (dw2_expand_symtabs_with_fullname): Likewise.
6154 (dw2_expand_marked_cus): Likewise.
6155 (dw2_map_symbol_filenames): Likewise.
6156 (create_cus_from_debug_names): Likewise.
6157 (dwarf2_read_debug_names): Likewise.
6158 (dw2_debug_names_iterator::next): Likewise.
6159 (dwarf2_initialize_objfile): Likewise.
6160 (set_partial_user): Likewise.
6161 (dwarf2_build_psymtabs_hard): Likewise.
6162 (read_comp_units_from_section): Remove arguments, adjust to
6164 (create_all_comp_units): Adjust to std::vector and
6165 read_comp_units_from_section changes.
6166 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6168 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6169 (psyms_seen_size): Likewise.
6170 (write_gdbindex): Likewise.
6171 (write_debug_names): Likewise.
6173 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6175 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6176 with dwarf2_per_objfile.
6177 (create_cus_from_index): Likewise.
6178 (create_signatured_type_table_from_index): Likewise.
6179 (dwarf2_read_index): Likewise.
6180 (dwarf2_initialize_objfile): Likewise.
6181 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6182 per_cu rather than get_dwarf2_per_objfile.
6184 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6186 * dwarf2read.h (struct signatured_type): Forward declare.
6187 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6189 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6190 (dw2_get_cutu): ...this.
6191 (dwarf2_per_objfile::get_cu): Rename from...
6192 (dw2_get_cu): ...this.
6193 (dwarf2_per_objfile::get_tu): New.
6194 (create_addrmap_from_index): Adjust.
6195 (create_addrmap_from_aranges): Adjust.
6196 (dw2_find_last_source_symtab): Adjust.
6197 (dw2_map_symtabs_matching_filename): Adjust.
6198 (dw2_symtab_iter_next): Adjust.
6199 (dw2_print_stats): Adjust.
6200 (dw2_expand_all_symtabs): Adjust.
6201 (dw2_expand_symtabs_with_fullname): Adjust.
6202 (dw2_expand_marked_cus): Adjust.
6203 (dw_expand_symtabs_matching_file_matcher): Adjust.
6204 (dw2_map_symbol_filenames): Adjust.
6205 (dw2_debug_names_iterator::next): Adjust.
6206 (dwarf2_initialize_objfile): Adjust.
6207 (set_partial_user): Adjust.
6208 (dwarf2_build_psymtabs_hard): Adjust.
6210 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6212 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6213 Remove unused variables.
6214 (dw2_map_symtabs_matching_filename): Likewise.
6215 (dwarf2_record_block_ranges): Likewise.
6216 (dwarf2_read_addr_index): Likewise.
6217 (follow_die_offset): Likewise.
6219 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6221 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6222 to symbol_file_add_main.
6224 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6227 * mi/mi-console.c (do_fputc_async_safe): New.
6228 (mi_console_file::write_async_safe): New.
6229 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6230 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6232 * ui-file.c (ui_file::putstrn): Adjust call to
6233 fputstrn_unfiltered.
6234 * utils.c (printchar): Replace do_fputs and do_fprintf
6235 parameters by do_fputc.
6236 (fputstr_filtered): Adjust call to printchar.
6237 (fputstr_unfiltered): Likewise.
6238 (fputstrn_filtered): Likewise.
6239 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6241 * utils.h (do_fputc_ftype): New typedef.
6242 (fputstrn_unfiltered): Add do_fputc parameter.
6244 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6246 * regformats/i386/i386-avx.dat: Remove.
6248 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6251 * amd64-tdep.c (amd64_none_init_abi): New function.
6252 (amd64_x32_none_init_abi): New function.
6253 (_initialize_amd64_tdep): Register handlers for x86-64 and
6254 x64_32 with GDB_OSABI_NONE.
6255 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6256 GDB_OSABI_NONE osabi.
6258 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6261 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6263 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6264 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6266 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6268 * common/byte-vector.h (char_vector): New type.
6269 * target.h (target_read_alloc): Return
6270 gdb::optional<byte_vector>.
6271 (target_read_stralloc): Return gdb::optional<char_vector>.
6272 (target_get_osdata): Return gdb::optional<char_vector>.
6273 * target.c (target_read_alloc_1): Templatize. Replacement
6274 manual memory management with vector.
6275 (target_read_alloc): Change return type, adjust.
6276 (target_read_stralloc): Change return type, adjust.
6277 (target_get_osdata): Change return type, adjust.
6278 * auxv.c (struct auxv_info) <length>: Remove.
6279 <data>: Change type to gdb::optional<byte_vector>.
6280 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6281 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6282 (target_auxv_search): Adjust.
6283 (fprint_target_auxv): Adjust.
6284 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6285 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6286 (linux_make_corefile_notes): Adjust.
6287 * osdata.c (get_osdata): Adjust.
6288 * remote.c (remote_get_threads_with_qxfer): Adjust.
6289 (remote_memory_map): Adjust.
6290 (remote_traceframe_info): Adjust.
6291 (btrace_read_config): Adjust.
6292 (remote_read_btrace): Adjust.
6293 (remote_pid_to_exec_file): Adjust.
6294 * solib-aix.c (solib_aix_get_library_list): Adjust.
6295 * solib-dsbt.c (decode_loadmap): Don't free buf.
6296 (dsbt_get_initial_loadmaps): Adjust.
6297 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6298 * solib-target.c (solib_target_current_sos): Adjust.
6299 * tracepoint.c (sdata_make_value): Adjust.
6300 * xml-support.c (xinclude_start_include): Adjust.
6301 (xml_fetch_content_from_file): Adjust.
6302 * xml-support.h (xml_fetch_another): Change return type.
6303 (xml_fetch_content_from_file): Change return type.
6304 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6305 * xml-tdesc.c (file_read_description_xml): Adjust.
6306 (fetch_available_features_from_target): Change return type.
6307 (target_fetch_description_xml): Adjust.
6308 (target_read_description_xml): Adjust.
6310 2018-04-06 Tom Tromey <tom@tromey.com>
6312 * value.c (~value): Update.
6313 (struct value) <contents>: Now unique_xmalloc_ptr.
6314 (value_contents_bits_eq, allocate_value_contents)
6315 (value_contents_raw, value_contents_all_raw)
6316 (value_contents_for_printing, value_contents_for_printing_const)
6317 (set_value_enclosing_type): Update.
6319 2018-04-06 Tom Tromey <tom@tromey.com>
6321 * value.c (range_s): Remove typedef, VEC.
6322 (struct range): Add operator<.
6323 (range_lessthan): Remove.
6324 (ranges_contain): Change type.
6326 (struct value) <unavailable, optimized_out>: Now std::vector.
6327 (value_entirely_available)
6328 (value_entirely_covered_by_range_vector)
6329 (value_entirely_unavailable, value_entirely_optimized_out):
6331 (insert_into_bit_range_vector): Change argument type.
6332 (find_first_range_overlap): Likewise.
6333 (struct ranges_and_idx, value_contents_bits_eq)
6334 (require_not_optimized_out, require_available): Update.
6335 (ranges_copy_adjusted): Change argument types.
6336 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6338 2018-04-06 Tom Tromey <tom@tromey.com>
6340 * value.c (~value): Update.
6341 (struct value) <parent>: Now a value_ref_ptr.
6342 (value_parent, set_value_parent, value_address, value_copy):
6345 2018-04-06 Tom Tromey <tom@tromey.com>
6347 * value.c (struct value): Add constructor, destructor, and member
6349 (allocate_value_lazy, value_decref): Update.
6351 2018-04-06 Tom Tromey <tom@tromey.com>
6353 * value.c (struct value) <released, next>: Remove.
6354 (all_values): Now a std::vector.
6355 (allocate_value_lazy): Update.
6356 (value_next): Remove.
6357 (value_mark, value_free_to_mark, release_value)
6358 (value_release_to_mark): Update.
6360 2018-04-06 Tom Tromey <tom@tromey.com>
6362 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6363 (free_value_chain): Remove.
6364 * value.c (free_value_chain): Remove.
6365 (value_release_to_mark): Return a std::vector.
6366 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6368 (check_condition): Update.
6369 * eval.c (fetch_subexp_value): Change "val_chain" to a
6371 * breakpoint.c (update_watchpoint): Update.
6372 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6374 2018-04-06 Tom Tromey <tom@tromey.com>
6376 * value.h (free_all_values): Remove.
6377 * value.c (free_all_values): Remove.
6379 2018-04-06 Tom Tromey <tom@tromey.com>
6381 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6382 (value_history_chain, value_history_count): Remove.
6383 (value_history): New global.
6384 (record_latest_value, access_value_history, show_values)
6385 (preserve_values): Update.
6387 2018-04-06 Tom Tromey <tom@tromey.com>
6389 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6390 * varobj.c (varobj_set_display_format, varobj_set_value)
6391 (install_default_visualizer, construct_visualizer)
6392 (install_new_value, ~varobj, varobj_get_value_type)
6393 (my_value_of_variable, varobj_editable_p): Update.
6394 * c-varobj.c (c_describe_child, c_value_of_variable)
6395 (cplus_number_of_children, cplus_describe_child): Update.
6396 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6397 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6398 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6400 2018-04-06 Tom Tromey <tom@tromey.com>
6402 * printcmd.c (last_examine_address): Change type to
6404 (do_examine, x_command): Update.
6406 2018-04-06 Tom Tromey <tom@tromey.com>
6408 * value.c (release_value): Update.
6409 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6410 (struct bpstats) <val>: Now a value_ref_ptr.
6411 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6412 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6413 (~watchpoint, print_it_watchpoint, watch_command_1)
6414 (invalidate_bp_value_on_memory_change): Update.
6416 2018-04-06 Tom Tromey <tom@tromey.com>
6418 * varobj.c (varobj_clear_saved_item)
6419 (update_dynamic_varobj_children, install_new_value, ~varobj):
6421 * value.h (value_incref): Move declaration earlier.
6422 (value_decref): Rename from value_free.
6423 (struct value_ref_policy): New.
6424 (value_ref_ptr): New typedef.
6425 (struct value_deleter): Remove.
6426 (gdb_value_up): Remove typedef.
6427 (release_value): Change return type.
6428 (release_value_or_incref): Remove.
6429 * value.c (set_value_parent): Update.
6430 (value_incref): Change return type.
6431 (value_decref): Rename from value_free.
6432 (value_free_to_mark, free_all_values, free_value_chain): Update.
6433 (release_value): Return value_ref_ptr.
6434 (release_value_or_incref): Remove.
6435 (record_latest_value, set_internalvar, clear_internalvar):
6437 * stack.c (info_frame_command): Don't call value_free.
6438 * python/py-value.c (valpy_dealloc, valpy_new)
6439 (value_to_value_object): Update.
6440 * printcmd.c (do_examine): Update.
6441 * opencl-lang.c (lval_func_free_closure): Update.
6442 * mi/mi-main.c (register_changed_p): Don't call value_free.
6443 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6444 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6445 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6447 * guile/scm-value.c (vlscm_free_value_smob)
6448 (vlscm_scm_from_value): Update.
6449 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6450 (frame_unwind_register_unsigned, get_frame_register_bytes)
6451 (put_frame_register_bytes): Don't call value_free.
6452 * findvar.c (address_from_register): Don't call value_free.
6453 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6454 * dwarf2loc.c (entry_data_value_free_closure)
6455 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6456 (dwarf2_evaluate_loc_desc_full): Update.
6457 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6458 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6459 (~watchpoint, watch_command_1)
6460 (invalidate_bp_value_on_memory_change): Update.
6461 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6463 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6466 * warning.m4: Add -Wno-error=deprecated-register.
6467 * configure: Re-generate.
6469 2018-04-05 Tom Tromey <tom@tromey.com>
6471 * linespec.h: Remove include of "vec.h".
6473 2018-04-05 Tom Tromey <tom@tromey.com>
6475 * linespec.c (typep): Remove typedef.
6476 (find_methods, find_superclass_methods): Take a std::vector.
6477 (find_method): Use std::vector.
6479 2018-04-05 Tom Tromey <tom@tromey.com>
6481 * utils.c (compare_strings): Remove.
6482 * utils.h (compare_strings): Remove.
6483 * objc-lang.h (find_imps): Update.
6484 * objc-lang.c (find_methods): Take a std::vector.
6485 (uniquify_strings, find_imps): Likewise.
6486 * linespec.c (find_methods): Take a std::vector.
6487 (decode_objc): Use std::vector.
6488 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6490 (find_method, find_function_symbols): Use std::vector.
6492 2018-04-05 Tom Tromey <tom@tromey.com>
6494 * completer.c (completion_tracker::completion_tracker): Remove
6496 (completion_tracker::discard_completions): Likewise.
6497 * breakpoint.c (ambiguous_names_p): Remove cast.
6498 * ada-lang.c (_initialize_ada_language): Remove cast.
6499 * utils.h (streq): Update.
6500 (streq_hash): Add new declaration.
6501 * utils.c (streq): Return bool.
6502 (streq_hash): New function.
6504 2018-04-05 Tom Tromey <tom@tromey.com>
6506 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6507 Remove a string copy.
6509 2018-04-05 Tom Tromey <tom@tromey.com>
6511 * linespec.c (filter_results): Use std::vector.
6512 (decode_line_2, decode_line_full): Update.
6514 2018-04-05 Tom Tromey <tom@tromey.com>
6516 * linespec.c (canonical_to_fullform): Return std::string.
6517 (filter_results): Update.
6518 (struct decode_line_2_item): Add constructor.
6519 <fullform, displayform>: Now std::string.
6520 (decode_line_2_compare_items): Now a std::sort comparator.
6521 (decode_line_2): Update.
6523 2018-04-05 Tom Tromey <tom@tromey.com>
6525 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6526 (unexpected_linespec_error): Update.
6527 (linespec_parse_basic, parse_linespec): Update.
6529 2018-04-05 Tom Tromey <tom@tromey.com>
6531 * linespec.c (linespec_parse_basic): Reindent.
6533 2018-04-05 Tom Tromey <tom@tromey.com>
6535 * minsyms.h (iterate_over_minimal_symbols): Update.
6536 * minsyms.c (iterate_over_minimal_symbols): Take a
6538 * linespec.c (struct collect_minsyms): Remove.
6539 (compare_msyms): Now a std::sort comparator.
6540 (add_minsym): Add parameters.
6541 (search_minsyms_for_name): Update. Use std::vector.
6543 2018-04-03 Tom Tromey <tom@tromey.com>
6545 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6548 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6550 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6552 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6555 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6556 printing static type.
6558 2018-04-01 Tom Tromey <tom@tromey.com>
6560 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6561 (rs6000_xfer_shared_libraries): Update.
6563 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6565 * common/gdb_vecs.h (char_ptr): Remove.
6566 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6568 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6570 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6572 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6574 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6576 * tracepoint.h (struct uploaded_tp): Initialize fields.
6577 <actions, step_actions, cmd_strings>: Change type to
6578 std::vector<char *>.
6579 * tracepoint.c (get_uploaded_tp): Allocate with new.
6580 (free_uploaded_tps): Free with delete.
6581 (parse_tracepoint_definition): Adjust to std::vector change.
6582 * breakpoint.c (read_uploaded_action): Likewise.
6583 (create_tracepoint_from_upload): Likewise.
6584 * ctf.c (ctf_write_uploaded_tp): Likewise.
6585 (SET_ARRAY_FIELD): Likewise.
6586 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6588 2018-03-30 Tom Tromey <tom@tromey.com>
6590 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6592 (svr4_keep_data_in_core): Update.
6593 (svr4_read_so_list): Update.
6595 2018-03-30 Tom Tromey <tom@tromey.com>
6597 * windows-nat.c (handle_output_debug_string, handle_exception):
6599 * target.h (target_read_string): Update.
6600 * target.c (target_read_string): Change "string" to
6602 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6604 * solib-frv.c (frv_current_sos): Update.
6605 * solib-dsbt.c (dsbt_current_sos): Update.
6606 * solib-darwin.c (darwin_current_sos): Update.
6607 * linux-thread-db.c (inferior_has_bug): Update.
6608 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6609 Update. Remove alloca.
6610 * ada-lang.c (ada_main_name): Update.
6612 2018-03-30 Tom Tromey <tom@tromey.com>
6614 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6615 (struct dwo_file_deleter): New.
6616 (dwo_file_up): New typedef.
6617 (open_and_init_dwo_file): Use dwo_file_up.
6618 (free_dwo_file_cleanup): Remove.
6620 2018-03-30 Tom Tromey <tom@tromey.com>
6622 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6623 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6625 2018-03-30 Tom Tromey <tom@tromey.com>
6627 * dwarf2read.c (class free_cached_comp_units): New class.
6628 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6629 (free_cached_comp_units): Remove function.
6631 2018-03-30 Tom Tromey <tom@tromey.com>
6633 * utils.h (make_cleanup_unpush_target): Remove.
6634 * inf-ptrace.c (struct target_unpusher): New.
6635 (target_unpush_up) New typedef.
6636 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6638 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6640 2018-03-27 Tom Tromey <tom@tromey.com>
6642 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6644 2018-03-27 Pedro Alves <palves@redhat.com>
6645 Tom Tromey <tom@tromey.com>
6647 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6648 destructor. Now a class.
6649 (gdb_readline_wrapper_cleanup): Remove function.
6650 (gdb_readline_wrapper): Remove cleanups.
6652 2018-03-27 Tom Tromey <tom@tromey.com>
6654 * typeprint.h (struct type_print_options) <local_typedefs,
6655 global_typedefs>: Remove "struct" keyword.
6656 (class typedef_hash_table): New class.
6657 (recursively_update_typedef_hash, add_template_parameters)
6658 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6659 (find_typedef_in_hash): Don't declare.
6660 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6661 (typedef_hash_table::recursively_update): Rename from
6662 recursively_update_typedef_hash. Now a member.
6663 (typedef_hash_table::add_template_parameters): Rename from
6664 add_template_parameters. Now a member.
6665 (typedef_hash_table::typedef_hash_table): Now a constructor;
6666 rename from create_typedef_hash.
6667 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6668 rename from free_typedef_hash.
6669 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6670 (do_free_global_table): Remove.
6671 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6672 from copy_type_recursive.
6673 (create_global_typedef_table): Remove.
6674 (typedef_hash_table::find_global_typedef): Now a member of
6676 (typedef_hash_table::find_typedef): Rename from
6677 find_typedef_in_hash; now a member.
6678 (whatis_exp): Update.
6679 * extension.h (struct ext_lang_type_printers): Add constructor and
6681 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6683 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6684 Now a constructor; rename from start_ext_lang_type_printers.
6685 (ext_lang_type_printers): Now a destructor; rename from
6686 free_ext_lang_type_printers.
6687 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6689 (c_type_print_base_struct_union): Update. Remove cleanups.
6691 2018-03-27 Tom Tromey <tom@tromey.com>
6693 * dwarf-index-write.c: Include <cmath>.
6695 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6697 * NEWS: Add entry describing new "set|show varsize-limit" command.
6698 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6700 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6703 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6705 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6707 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6708 * dwarf-index-common.c: New file.
6709 * dwarf-index-common.h: New file.
6710 * dwarf-index-write.c: New file.
6711 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6712 (struct dwarf2_section_info): Move from here.
6713 (dwarf2_section_info_def): Likewise.
6714 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6715 (offset_type): Likewise.
6716 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6717 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6718 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6719 (byte_swap): Likewise.
6720 (MAYBE_SWAP): Likewise.
6721 (dwarf2_per_cu_ptr): Likewise.
6722 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6723 (struct tu_stats): Likewise.
6724 (struct dwarf2_per_objfile): Likewise.
6725 (struct dwarf2_per_cu_data): Likewise.
6726 (struct signatured_type): Likewise.
6727 (sig_type_ptr): Likewise.
6728 (DEF_VEC_P (sig_type_ptr)): Likewise.
6729 (INDEX4_SUFFIX): Likewise.
6730 (INDEX5_SUFFIX): Likewise.
6731 (DEBUG_STR_SUFFIX): Likewise.
6732 (dwarf2_read_section): Make non-static.
6733 (mapped_index_string_hash): Move from here.
6734 (dwarf5_djb_hash): Likewise.
6735 (file_write): Likewise.
6736 (class data_buf): Likewise.
6737 (struct symtab_index_entry): Likewise.
6738 (struct mapped_symtab): Likewise.
6739 (find_slot): Likewise.
6740 (hash_expand): Likewise.
6741 (add_index_entry): Likewise.
6742 (uniquify_cu_indices): Likewise.
6743 (class c_str_view): Likewise.
6744 (class c_str_view_hasher): Likewise.
6745 (class vector_hasher): Likewise.
6746 (write_hash_table): Likewise.
6747 (psym_index_map): Likewise.
6748 (struct addrmap_index_data): Likewise.
6749 (add_address_entry): Likewise.
6750 (add_address_entry_worker): Likewise.
6751 (write_address_map): Likewise.
6752 (symbol_kind): Likewise.
6753 (write_psymbols): Likewise.
6754 (struct signatured_type_index_data): Likewise.
6755 (write_one_signatured_type): Likewise.
6756 (recursively_count_psymbols): Likewise.
6757 (recursively_write_psymbols): Likewise.
6758 (class debug_names): Likewise.
6759 (check_dwarf64_offsets): Likewise.
6760 (psyms_seen_size): Likewise.
6761 (write_gdbindex): Likewise.
6762 (write_debug_names): Likewise.
6763 (assert_file_size): Likewise.
6764 (write_psymtabs_to_index): Likewise.
6765 (save_gdb_index_command): Likewise.
6766 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6768 * dwarf2read.h: New file.
6770 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6773 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6774 symbol name if the CU's language stores symbol names in linkage
6776 * language.h (struct language_defn)
6777 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6778 all instances of this struct.
6780 2018-03-26 Tom Tromey <tom@tromey.com>
6782 * stack.c (backtrace_command_1): Remove verbose code.
6784 2018-03-26 Tom Tromey <tom@tromey.com>
6786 * python/py-framefilter.c (py_print_type): Don't catch
6787 exceptions. Return void.
6788 (py_print_value): Likewise.
6789 (py_print_single_arg): Likewise.
6790 (enumerate_args): Don't catch exceptions.
6791 (py_print_args): Likewise.
6792 (py_print_frame): Likewise.
6793 (gdbpy_apply_frame_filter): Catch exceptions here.
6795 2018-03-26 Tom Tromey <tom@tromey.com>
6797 * stack.c (_initialize_stack): Remove trailing newlines from help
6798 text. Add "Usage" line to "backtrace" help.
6800 2018-03-26 Tom Tromey <tom@tromey.com>
6803 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6805 2018-03-26 Tom Tromey <tom@tromey.com>
6807 * python/py-framefilter.c (py_print_single_arg): Return
6808 EXT_LANG_BT_ERROR from catch.
6810 2018-03-26 Tom Tromey <tom@tromey.com>
6813 * stack.c (backtrace_command_1): Move some code into no-filters
6816 2018-03-26 Tom Tromey <tom@tromey.com>
6818 * python/py-framefilter.c (throw_quit_or_print_exception): New
6820 (gdbpy_apply_frame_filter): Use it.
6822 2018-03-26 Tom Tromey <tom@tromey.com>
6825 * python/py-framefilter.c (py_print_type, py_print_value)
6826 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6829 2018-03-26 Tom Tromey <tom@tromey.com>
6831 * python/py-framefilter.c (enumerate_args): Use
6832 gdb::unique_xmalloc_ptr.
6834 2018-03-26 Tom Tromey <tom@tromey.com>
6836 * python/py-framefilter.c (py_print_frame): Return
6838 (gdbpy_apply_frame_filter): Update comment.
6839 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6841 <EXT_LANG_BT_NO_FILTERS>: Change value.
6843 2018-03-26 Tom Tromey <tom@tromey.com>
6846 * stack.c (backtrace_command): Parse "hide" argument.
6847 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6848 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6851 2018-03-26 Tom Tromey <tom@tromey.com>
6853 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6855 (backtrace_command): Remove "fulltrace", add "flags".
6857 2018-03-26 Tom Tromey <tom@tromey.com>
6859 * stack.c (backtrace_command): Rewrite command line parsing.
6861 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6863 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6865 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6867 * filename-seen-cache.h: Add include guard.
6869 2018-03-26 Keith Seitz <keiths@redhat.com>
6871 * symfile.c (place_section): Remove "struct" from section_addr_info
6873 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6874 "struct" keyword from section_addr_info.
6876 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6878 * regformats/regdef.h (reg): Add constructors.
6880 2018-03-25 Pedro Alves <palves@redhat.com>
6882 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6883 if then/else bodies in var_func_name extraction.
6885 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6887 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6888 lookup_minimal_symbol() to find symbol entry.
6889 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6891 2018-03-23 Keith Seitz <keiths@redhat.com>
6894 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6895 nested type definitions for C++, too.
6897 2018-03-23 Tom Tromey <tom@tromey.com>
6899 * machoread.c (struct oso_el): Add a constructor. Don't define as
6901 (macho_register_oso): Remove.
6902 (macho_symtab_read): Take a std::vector.
6903 (oso_el_compare_name): Now a std::sort comparator.
6904 (macho_symfile_read_all_oso): Take a std::vector.
6905 (macho_symfile_read): Use std::vector. Remove cleanups.
6907 2018-03-22 Tom Tromey <tom@tromey.com>
6909 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6910 (record_full_goto_bookmark): Use std::string.
6912 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6915 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6918 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6920 * rs6000-tdep.c (store_insn_p): New function.
6921 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6922 and cr_reg to their unshifted values. Use store_insn_p to
6923 match LR saves using either R1 or fdata->alloca_reg. Use
6924 store_insn_p to match CR saves. Set alloca_reg_offset
6925 when alloca_reg and framep are set. Remove lr_reg shift
6926 when assigning to fdata->lr_register.
6928 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6930 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6931 command line args instead of emitting a warning.
6933 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6935 * tracepoint.h (struct static_tracepoint_marker): Initialize
6936 fields, define default constructor, move constructor and move
6937 assignment, disable the rest.
6938 <str_id, extra>: Make std::string.
6939 (release_static_tracepoint_marker): Remove.
6940 (free_current_marker): Remove.
6941 * tracepoint.c (free_current_marker): Remove.
6942 (parse_static_tracepoint_marker_definition): Adjust to
6943 std::string, use new hex2str overload.
6944 (release_static_tracepoint_marker): Remove.
6945 (print_one_static_tracepoint_marker): Get marker by reference
6946 and adjust to std::string.
6947 (info_static_tracepoint_markers_command): Adjust to std::vector
6949 * target.h (static_tracepoint_marker_p): Remove typedef.
6950 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6951 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6953 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6955 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6956 (target_debug_print_std_vector_static_tracepoint_marker): New.
6957 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6959 (target_debug_print_static_tracepoint_marker_p): ... this.
6960 * target-delegates.c: Re-generate.
6961 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6963 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6964 (decode_static_tracepoint_spec): Adjust to std::vector.
6965 (tracepoint_print_one_detail): Adjust to std::string.
6966 (strace_marker_decode_location): Adjust to std::string.
6967 (update_static_tracepoint): Adjust to std::string, remove call
6968 to release_static_tracepoint_marker.
6969 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6970 Adjust to std::vector.
6971 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6972 (remote_static_tracepoint_markers_by_strid): Adjust to
6974 * common/rsp-low.h (hex2str): New overload with explicit count
6976 * common/rsp-low.c (hex2str): New overload with explicit count
6978 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6979 (_initialize_rsp_low_selftests): Add test_hex2str test.
6980 * unittests/tracepoint-selftests.c
6981 (test_parse_static_tracepoint_marker_definition): Adjust to
6984 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6986 * tracepoint.c (parse_static_tracepoint_marker_definition):
6987 Consider case where the definition is followed by more
6989 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6990 tracepoint-selftests.c.
6991 * unittests/tracepoint-selftests.c: New.
6993 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6995 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6998 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7000 * symtab.c (find_pc_sect_line): fixed indentation.
7002 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7004 * symtab.c (find_pc_sect_line): now uses binary search.
7006 2018-03-19 Tom Tromey <tom@tromey.com>
7008 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7011 2018-03-19 Pedro Alves <palves@redhat.com>
7012 Tom Tromey <tom@tromey.com>
7014 * unittests/observable-selftests.c: New file.
7015 * common/observable.h: New file.
7016 * observable.h: New file.
7017 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7018 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7019 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7020 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7021 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7022 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7023 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7024 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7025 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7026 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7027 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7028 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7029 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7030 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7031 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7032 tui/tui-interp.c, valops.c: Update all users.
7033 * tui/tui-hooks.c (tui_bp_created_observer)
7034 (tui_bp_deleted_observer, tui_bp_modified_observer)
7035 (tui_inferior_exit_observer, tui_before_prompt_observer)
7036 (tui_normal_stop_observer, tui_register_changed_observer):
7038 (tui_observers_token): New global.
7039 (attach_or_detach, tui_attach_detach_observers): New functions.
7040 (tui_install_hooks, tui_remove_hooks): Use
7041 tui_attach_detach_observers.
7042 * record-btrace.c (record_btrace_thread_observer): Remove.
7043 (record_btrace_thread_observer_token): New global.
7044 * observer.sh: Remove.
7045 * observer.c: Rename to observable.c.
7046 * observable.c (namespace gdb_observers): Define new objects.
7047 (observer_debug): Move into gdb_observers namespace.
7048 (struct observer, struct observer_list, xalloc_observer_list_node)
7049 (xfree_observer_list_node, generic_observer_attach)
7050 (generic_observer_detach, generic_observer_notify): Remove.
7051 (_initialize_observer): Update.
7052 Don't include observer.inc.
7053 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7054 (clean mostlyclean): Likewise.
7055 (observer.h, observer.inc): Remove targets.
7056 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7057 (COMMON_SFILES): Use observable.c, not observer.c.
7058 * .gitignore: Remove observer.h.
7060 2018-03-18 Tom Tromey <tom@tromey.com>
7062 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7064 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7066 2018-03-17 Tom Tromey <tom@tromey.com>
7068 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7070 2018-03-17 Tom Tromey <tom@tromey.com>
7072 * target.c (class scoped_target_fd): New.
7073 (target_fileio_close_cleanup): Remove.
7074 (target_fileio_read_alloc_1): Use scoped_target_fd.
7076 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7078 * silent-rules.mk: New.
7079 * Makefile.in: Include silent-rules.mk
7080 (srcdir, VPATH, top_srcdir): Move up.
7081 (COMPILE): Add ECHO_CXX.
7082 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7083 (init.c): Add ECHO_INIT_C.
7084 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7085 (version.c): Add ECHO_GEN.
7086 (printcmd.o): Add ECHO_CXX.
7087 (target-float.o): Add ECHO_CXX.
7088 (ada-exp.o): Add ECHO_CXX.
7089 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7090 (insight$(EXEEXT)): Add ECHO_CXXLD.
7091 * gnulib/configure.ac: Add AM_SILENT_RULES.
7092 * gnulib/aclocal.m4: Re-generate.
7093 * gnulib/configure: Re-generate.
7094 * gnulib/import/Makefile.in: Re-generate.
7096 2018-03-16 Tom Tromey <tom@tromey.com>
7098 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7099 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7100 * utils.c (do_free_section_addr_info)
7101 (make_cleanup_free_section_addr_info): Remove.
7102 * symfile.h (struct other_sections): Add constructor.
7103 (struct section_addr_info): Remove.
7104 (section_addr_info): New typedef.
7105 (struct sym_fns) <sym_offsets>: Change type of parameter.
7106 (build_section_addr_info_from_objfile)
7107 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7108 (default_symfile_offsets, symbol_file_add)
7109 (symbol_file_add_from_bfd)
7110 (build_section_addr_info_from_section_table): Update.
7111 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7112 * symfile.c (alloc_section_addr_info): Remove.
7113 (build_section_addr_info_from_section_table): Change return type.
7115 (build_section_addr_info_from_bfd)
7116 (build_section_addr_info_from_objfile): Likewise.
7117 (free_section_addr_info): Remove.
7118 (relative_addr_info_to_section_offsets): Change type of "addrs".
7119 (addrs_section_compar): Now a std::sort comparator.
7120 (addrs_section_sort): Change return type.
7121 (addr_info_make_relative): Change type of "addrs". Update.
7122 (default_symfile_offsets, syms_from_objfile_1)
7123 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7124 (symbol_file_add_separate): Update.
7125 (symbol_file_add): Change type of "addrs". Update.
7126 (add_symbol_file_command): Update. Remove cleanups.
7127 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7129 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7130 * solib.c (solib_read_symbols): Update.
7131 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7132 * machoread.c (macho_symfile_offsets): Update.
7133 * jit.c (jit_bfd_try_read_symtab): Update.
7135 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7137 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7138 unittests/utils-selftests.c.
7139 * unittests/utils-selftests.c: New file.
7141 2018-03-14 Tom Tromey <tom@tromey.com>
7144 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7147 2018-03-14 Tom Tromey <tom@tromey.com>
7150 * printcmd.c (printf_pointer): Allow "-" in format.
7152 2018-03-14 Tom Tromey <tom@tromey.com>
7154 * printcmd.c (_initialize_printcmd): Add usage to printf.
7156 2018-03-14 Yao Qi <qiyao@sourceware.org>
7158 * MAINTAINERS: Update my email address.
7160 2018-03-13 Tom Tromey <tom@tromey.com>
7162 * machoread.c (macho_check_dsym): Change filenamep to a
7164 (macho_symfile_read): Update.
7165 * symfile.c (load_command): Use std::string.
7167 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7169 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7170 to error message string.
7171 (riscv_register_name): Use xsnprintf instead of sprintf.
7172 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7174 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7176 (riscv_push_dummy_call): Likewise.
7178 2018-03-12 Tom Tromey <tom@tromey.com>
7180 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7181 Use gdb::byte_vector.
7182 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7184 2018-03-12 Yao Qi <yao.qi@linaro.org>
7186 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7187 parameter type to readable_regcache.
7188 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7191 2018-03-11 Tom Tromey <tom@tromey.com>
7193 * dwarf2read.c (struct nextfield): Add initializers.
7194 (struct nextfnfield): Remove.
7195 (struct fnfieldlist): Add initializers. Remove "length" and
7196 "head", use std::vector.
7197 (struct decl_field_list): Remove.
7198 (struct field_info): Add initializers.
7199 <fields, baseclasses>: Now std::vector.
7200 <nbaseclasses, nfnfields, typedef_field_list_count,
7201 nested_types_list_count>: Remove.
7202 (dwarf2_add_field, dwarf2_add_type_defn)
7203 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7204 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7205 (process_structure_scope): Update.
7207 2018-03-11 Tom Tromey <tom@tromey.com>
7209 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7210 for use by std::sort.
7211 (build_type_psymtabs_1): Use std::vector.
7213 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7215 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7216 and LIBMPFR in the printed configuration.
7218 2018-03-08 Tom Tromey <tom@tromey.com>
7220 * source.c (get_filename_and_charpos): Use scoped_fd.
7221 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7222 (procfs_pidlist): Likewise.
7223 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7224 (iterate_over_mappings): Likewise.
7226 2018-03-08 Tom Tromey <tom@tromey.com>
7228 * infcall.c (struct call_return_meta_info)
7229 <stack_temporaries_enabled>: Remove.
7230 (get_call_return_value, call_function_by_hand_dummy): Update.
7231 * thread.c (disable_thread_stack_temporaries): Remove.
7232 (enable_thread_stack_temporaries): Remove.
7233 (thread_stack_temporaries_enabled_p): Return bool.
7234 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7235 (get_last_thread_stack_temporary): Update.
7236 * eval.c (evaluate_subexp): Update.
7237 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7238 class, not a function.
7239 (value_ptr, value_vec): Remove typedefs.
7240 (class thread_info) <stack_temporaries_enabled>: Now bool.
7241 <stack_temporaries>: Now a std::vector.
7242 (thread_stack_temporaries_enabled_p)
7243 (value_in_thread_stack_temporaries): Return bool.
7245 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7247 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7248 (getpkt_or_notif_sane_1): Likewise.
7250 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7252 * build-id.c (build_id_to_debug_bfd): Use std::string.
7254 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7256 * build-id.c (find_separate_debug_file_by_buildid): Return
7258 * build-id.h (find_separate_debug_file_by_buildid): Return
7260 * coffread.c (coff_symfile_read): Adjust to std::string.
7261 * elfread.c (elf_symfile_read): Adjust to std::string.
7262 * symfile.c (separate_debug_file_exists): Change parameter to
7264 (find_separate_debug_file): Return std::string.
7265 (find_separate_debug_file_by_debuglink): Return std::string.
7266 * symfile.h (find_separate_debug_file_by_debuglink): Return
7269 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7271 * common/xml-utils.c (xml_escape_text): Move code to...
7272 (xml_escape_text_append): ... this new function.
7273 * common/xml-utils.h (xml_escape_text_append): New declaration.
7274 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7276 (_initialize_xml_utils): register test_xml_escape_text_append as
7279 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7281 * defs.h: Remove MAX_REGISTER_SIZE.
7282 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7284 * python/py-unwind.c (pyuw_sniffer): Likewise.
7286 2018-03-07 Tom Tromey <tom@tromey.com>
7288 * linux-tdep.c (linux_info_proc): Update.
7289 * target.h (struct target_ops) <to_fileio_readlink>: Return
7291 (target_fileio_readlink): Return optional<string>.
7292 * remote.c (remote_hostio_readlink): Return optional<string>.
7293 * inf-child.c (inf_child_fileio_readlink): Return
7295 * target.c (target_fileio_readlink): Return optional<string>.
7297 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7299 * regcache.c (cooked_read_test): Add riscv to the list of
7300 architectures that have a save_reggroup.
7302 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7304 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7305 value is not a dynamic class object.
7307 2018-03-06 Tom Tromey <tom@tromey.com>
7309 * rust-exp.y: Formatting fixes.
7311 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7313 * riscv-tdep.c (riscv_register_name): Remove target description
7315 (riscv_gdbarch_init): Remove target description check.
7317 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7319 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7321 * riscv-tdep.h: Likewise.
7323 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7325 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7326 (riscv_pseudo_register_write): Delete.
7327 (riscv_gdbarch_init): Remove all use of pseudo registers.
7329 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7331 * record-btrace.c (btrace_print_lines): Replace cleanup
7332 parameter with RAII equivalents.
7333 (btrace_insn_history): Replace cleanup with RAII equivalents.
7334 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7335 make_cleanup_ui_out_tuple_begin_end): Remove.
7336 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7337 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7338 make_cleanup_ui_out_list_begin_end): Remove.
7340 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7342 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7343 parameter types to std::vector. Use bool.
7344 (record_btrace_wait): Replace VEC(tp_t) with
7345 std::vector<thread_info *>.
7346 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7348 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7350 * record-btrace.c (record_btrace_disable_callback): Remove.
7351 (struct scoped_btrace_disable): New.
7352 (record_btrace_open): Use scoped_btrace_disable.
7354 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7356 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7357 reading values from registers.
7359 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7361 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7364 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7366 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7367 change parameter type. Use GDB's print functions, and use
7368 core_addr_to_string where appropriate.
7369 (riscv_push_dummy_call): Use core_addr_to_string where
7370 appropriate, update call to riscv_print_arg_location, and reindent
7372 (riscv_return_value): Update call to riscv_print_arg_location.
7374 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7375 Tim Newsome <tim@sifive.com>
7376 Albert Ou <a0u@eecs.berkeley.edu>
7377 Darius Rad <darius@bluespec.com>
7379 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7380 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7381 (ALLDEPFILES): Add riscv-tdep.c
7382 * configure.tgt: Add riscv support.
7383 * riscv-tdep.c: New file.
7384 * riscv-tdep.h: New file.
7385 * NEWS: Mention new target.
7386 * MAINTAINERS: Add entry for riscv.
7388 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7390 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7391 fields within aggregates.
7393 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7395 * record-btrace.c (btrace_print_lines): Change type of flags to
7396 gdb_disassembly_flags.
7398 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7400 * fbsd-nat.c: Include "inf-ptrace.h".
7401 (USE_SIGTRAP_SIGINFO): Conditionally define.
7402 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7403 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7404 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7406 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7408 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7410 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7411 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7412 "supports_stopped_by_hw_breakpoint" target methods.
7414 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7416 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7417 * fbsd-nat.c (debug_fbsd_nat): New variable.
7418 (show_fbsd_nat_debug): New function.
7419 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7420 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7422 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7424 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7425 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7427 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7428 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7431 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7433 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7434 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7436 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7438 * charset.c (struct charset_vector): New.
7439 (charsets): Change type to charset_vector.
7440 (find_charset_names): Adjust.
7442 (_initialize_charset): Adjust.
7444 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7446 * progspace.h (struct program_space) <deleted_solibs>: Change
7447 type to std::vector<std::string>.
7448 * progspace.c (clear_program_space_solib_cache): Adjust.
7449 * breakpoint.c (print_solib_event): Adjust.
7450 (check_status_catch_solib): Adjust.
7451 * solib.c (update_solib_list): Adjust.
7452 * ui-out.h (class ui_out) <field_string>: New overload.
7453 * ui-out.c (ui_out::field_string): New overload.
7455 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7457 * progspace.h (struct program_space): Add constructor and
7458 destructor, initialize fields.
7459 (add_program_space): Remove.
7460 * progspace.c (add_program_space): Rename to...
7461 (program_space::program_space): ... this.
7462 (release_program_space): Rename to...
7463 (program_space::~program_space): ... this.
7464 (delete_program_space): Use delete to delete program_space.
7465 (initialize_progspace): Use new to allocate program_space.
7466 * inferior.c (add_inferior_with_spaces): Likewise.
7467 (clone_inferior_command): Likewise.
7468 * infrun.c (follow_fork_inferior): Likewise.
7469 (handle_vfork_child_exec_or_exit): Likewise.
7471 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7473 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7474 (delim_string_to_char_ptr_vec): Return std::vector of
7475 gdb::unique_xmalloc_ptr.
7476 (dirnames_to_char_ptr_vec_append): Take std::vector of
7477 gdb::unique_xmalloc_ptr.
7478 (dirnames_to_char_ptr_vec): Return std::vector of
7479 gdb::unique_xmalloc_ptr.
7480 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7481 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7482 (delim_string_to_char_ptr_vec): Return an std::vector of
7483 gdb::unique_xmalloc_ptr, adjust the code.
7484 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7485 gdb::unique_xmalloc_ptr, adjust the code.
7486 (dirnames_to_char_ptr_vec): Return an std::vector of
7487 gdb::unique_xmalloc_ptr, adjust the code.
7488 * auto-load.c (auto_load_safe_path_vec): Change type to
7489 std::vector of gdb::unique_xmalloc_ptr.
7490 (auto_load_expand_dir_vars): Return an std::vector of
7491 gdb::unique_xmalloc_ptr, adjust the code.
7492 (auto_load_safe_path_vec_update): Adjust.
7493 (filename_is_in_auto_load_safe_path_vec): Adjust.
7494 (auto_load_objfile_script_1): Adjust.
7495 * build-id.c (build_id_to_debug_bfd): Adjust.
7496 * linux-thread-db.c (thread_db_load_search): Adjust.
7497 * source.c (add_path): Adjust.
7499 * symfile.c (find_separate_debug_file): Adjust.
7500 * utils.c (do_free_char_ptr_vec): Remove.
7501 (make_cleanup_free_char_ptr_vec): Remove.
7503 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7506 * common/pathstuff.c: Conditionally include "<windows.h>".
7508 2018-03-01 Georg Sauthoff <mail@georg.so>
7511 * gcore.in: Quote variables and switch interpreter to bash.
7513 2018-03-01 Tom Tromey <tom@tromey.com>
7515 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7516 assertion. Add assertion for discriminant_index.
7517 (quirk_rust_enum): Use correct base type name in univariant case.
7519 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7521 * record.c (get_call_history_modifiers): Return a
7523 (cmd_record_call_history): Adjust.
7524 * record-btrace.c (record_btrace_call_history): Adjust.
7525 (record_btrace_call_history_range): Adjust.
7526 (record_btrace_call_history_from): Adjust.
7527 * target-debug.h (target_debug_print_record_print_flags): New.
7528 * target-delegates.c: Re-generate.
7529 * target.c (target_call_history): Change flags type.
7530 (target_call_history_from): Likewise.
7531 (target_call_history_range): Likewise.
7532 * target.h (struct target_ops) <target_call_history>: Likewise.
7533 (target_call_history_from): Likewise.
7534 (target_call_history_range): Likewise.
7536 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7537 Simon Marchi <simon.marchi@polymtl.ca>
7539 * common/common-utils.c: Include "sys/stat.h".
7540 (is_regular_file): Move here from "source.c"; change return
7542 * common/common-utils.h (is_regular_file): New prototype.
7543 * common/pathstuff.c (contains_dir_separator): New function.
7544 * common/pathstuff.h (contains_dir_separator): New prototype.
7545 * source.c: Don't include "sys/stat.h".
7546 (is_regular_file): Move to "common/common-utils.c".
7548 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7550 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7551 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7552 * auto-load.c: Include "common/pathstuff.h".
7553 * common/common-def.h (current_directory): Move here.
7554 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7556 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7558 * common/pathstuff.c: New file.
7559 * common/pathstuff.h: New file.
7560 * compile/compile.c: Include "common/pathstuff.h".
7561 * defs.h (current_directory): Move to "common/common-defs.h".
7562 * dwarf2read.c: Include "common/pathstuff.h".
7564 * guile/scm-safe-call.c: Likewise.
7565 * linux-thread-db.c: Likewise.
7567 * nto-tdep.c: Likewise.
7568 * objfiles.c: Likewise.
7569 * source.c: Likewise.
7570 * symtab.c: Likewise.
7571 * utils.c: Include "common/pathstuff.h".
7572 (gdb_realpath): Move to "common/pathstuff.c".
7573 (gdb_realpath_keepfile): Likewise.
7574 (gdb_abspath): Likewise.
7575 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7576 (gdb_realpath_keepfile): Likewise.
7577 (gdb_abspath): Likewise.
7579 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7581 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7582 wildcard process pid for super_resume for kernels with a
7585 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7587 * compile/compile.c (get_args): Add additional comments
7588 explaining function.
7590 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7591 Tom Tromey <tom@tromey.com>
7593 * target.h (memory_write_request_s): Remove typedef. Don't define
7595 (target_write_memory_blocks): Change argument to std::vector.
7596 (struct memory_write_request): Add constructor.
7597 * target-memory.c (compare_block_starting_address): Return bool.
7598 Change argument types.
7599 (claim_memory): Change arguments to use std::vector.
7600 (split_regular_and_flash_blocks, blocks_to_erase)
7601 (compute_garbled_blocks): Likewise.
7602 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7603 (target_write_memory_blocks): Change argument to std::vector.
7604 * symfile.c (struct load_section_data): Add constructor and
7605 destructor. Use std::vector for "requests".
7606 (struct load_progress_data): Add initializers.
7607 (load_section_callback): Update. Use "new".
7608 (clear_memory_write_data): Remove.
7609 (generic_load): Update.
7611 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7613 * arch/aarch64.h: Use common/tdesc.h.
7615 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7617 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7618 architecture with a 64-bit ABI.
7620 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7622 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7623 ahead of target description loading.
7625 2018-02-26 Tom Tromey <tom@tromey.com>
7627 * stack.c (backtrace_command_1): Update.
7628 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7630 * python/py-framefilter.c (py_print_frame)
7631 (gdbpy_apply_frame_filter): Change type of "flags".
7632 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7634 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7635 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7636 * extension.h (enum frame_filter_flag): Rename from
7638 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7639 (apply_ext_lang_frame_filter): Change type of "flags".
7640 * extension.c (apply_ext_lang_frame_filter): Change type of
7642 * extension-priv.h (struct extension_language_ops)
7643 <apply_frame_filter>: Change type of "flags".
7645 2018-02-26 Tom Tromey <tom@tromey.com>
7648 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7649 off-by-one in py_end computation.
7650 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7652 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7655 2018-02-26 Tom Tromey <tom@tromey.com>
7657 * dwarf2read.c (struct variant_field): New.
7658 (struct nextfield) <variant>: New field.
7659 (dwarf2_add_field): Handle DW_TAG_variant_part.
7660 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7661 discriminated union.
7662 (read_structure_type): Handle DW_TAG_variant_part.
7663 (handle_struct_member_die): New function, extracted from
7664 process_structure_scope. Handle DW_TAG_variant.
7665 (process_structure_scope): Handle discriminated unions. Call
7666 handle_struct_member_die.
7668 2018-02-26 Tom Tromey <tom@tromey.com>
7670 * rust-lang.h (rust_last_path_segment): Declare.
7671 * rust-lang.c (rust_last_path_segment): Now public. Change
7673 (struct disr_info): Remove.
7674 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7675 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7676 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7677 (rust_enum_p, rust_enum_variant): New function.
7678 (rust_underscore_fields): Remove "offset" parameter.
7679 (rust_print_enum): New function.
7680 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7681 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7682 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7684 (rust_internal_print_type): New function, from rust_print_type.
7686 (rust_print_type): Call rust_internal_print_type.
7687 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7688 Update enum handling.
7689 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7690 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7691 (rust_union_quirks): New functions.
7692 (process_full_comp_unit, process_full_type_unit): Call
7694 (process_structure_scope): Update rust_unions if necessary.
7696 2018-02-26 Tom Tromey <tom@tromey.com>
7698 * value.h (value_union_variant): Declare.
7699 * valops.c (value_union_variant): New function.
7700 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7701 (struct discriminant_info): New.
7702 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7704 (struct main_type) <flag_discriminated_union>: New field.
7706 2018-02-26 Tom Tromey <tom@tromey.com>
7708 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7709 unittests/unpack-selftests.c.
7710 * unittests/unpack-selftests.c: New file.
7711 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7713 2018-02-26 Yao Qi <yao.qi@linaro.org>
7715 * dwarf2read.c (struct partial_die_info) <read>: New method.
7716 (read_partial_die): Remove the declaration.
7717 (load_partial_dies): Update.
7718 (partial_die_info::partial_die_info):
7719 (read_partial_die): Change it to partial_die_info::read.
7721 2018-02-26 Yao Qi <yao.qi@linaro.org>
7723 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7724 (fixup_partial_die): Remove declaration.
7725 (scan_partial_symbols): Update.
7726 (partial_die_parent_scope): Likewise.
7727 (partial_die_full_name): Likewise.
7728 (fixup_partial_die): Change it to partial_die_info::fixup.
7730 2018-02-26 Yao Qi <yao.qi@linaro.org>
7732 * dwarf2read.c (read_partial_die): Update the declaration.
7733 (load_partial_dies): Caller update.
7734 (read_partial_die): Remove one argument abbrev_len.
7736 2018-02-26 Yao Qi <yao.qi@linaro.org>
7738 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7739 assignment operator.
7740 (load_partial_dies): Use ctor and copy ctor.
7741 (read_partial_die): Update.
7742 (dwarf2_cu::find_partial_die): Use ctor.
7744 2018-02-26 Yao Qi <yao.qi@linaro.org>
7746 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7747 (find_partial_die_in_comp_unit): Change it to
7748 dwarf2_cu::find_partial_die.
7749 (find_partial_die): Update.
7751 2018-02-26 Yao Qi <yao.qi@linaro.org>
7753 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7756 2018-02-26 Yao Qi <yao.qi@linaro.org>
7758 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7760 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7762 * arch/amd64.h: Use common/tdesc.h.
7763 * arch/i386.c: Likewise.
7764 * arch/i386.h: Likewise.
7765 * arch/tic6x.c: Likewise.
7766 * arch/tdesc.h: Move file from here...
7767 * common/tdesc.h: ...to here.
7768 * features/aarch64-core.c: Regenerate.
7769 * features/aarch64-fpu.c: Regenerate.
7770 * features/i386/32bit-avx.c: Regenerate.
7771 * features/i386/32bit-avx512.c: Regenerate.
7772 * features/i386/32bit-core.c: Regenerate.
7773 * features/i386/32bit-linux.c: Regenerate.
7774 * features/i386/32bit-mpx.c: Regenerate.
7775 * features/i386/32bit-pkeys.c: Regenerate.
7776 * features/i386/32bit-sse.c: Regenerate.
7777 * features/i386/64bit-avx.c: Regenerate.
7778 * features/i386/64bit-avx512.c: Regenerate.
7779 * features/i386/64bit-core.c: Regenerate.
7780 * features/i386/64bit-linux.c: Regenerate.
7781 * features/i386/64bit-mpx.c: Regenerate.
7782 * features/i386/64bit-pkeys.c: Regenerate.
7783 * features/i386/64bit-segments.c: Regenerate.
7784 * features/i386/64bit-sse.c: Regenerate.
7785 * features/i386/x32-core.c: Regenerate.
7786 * features/tic6x-c6xp.c: Regenerate.
7787 * features/tic6x-core.c: Regenerate.
7788 * features/tic6x-gp.c: Regenerate.
7789 * target-descriptions.c: Use common/tdesc.h.
7790 * target-descriptions.h: Likewise.
7792 2018-02-24 Tom Tromey <tom@tromey.com>
7794 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7795 (try_thread_db_load_from_dir, thread_db_load_search): Use
7797 (info_auto_load_libthread_db_compare): Return bool. Change
7799 (info_auto_load_libthread_db): Use std::vector, std::string.
7802 2018-02-24 Tom Tromey <tom@tromey.com>
7804 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7806 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7808 * gdbarch.c: Rebuild.
7809 * gdbarch.h: Rebuild.
7810 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7811 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7812 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7815 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7817 * gdbtypes.h (sect_offset): Change type to uint64_t.
7818 (sect_offset_str): New function.
7819 * dwarf2read.c (create_addrmap_from_aranges): Use
7821 (error_check_comp_unit_head): Likewise.
7822 (create_debug_type_hash_table): Likewise.
7823 (read_cutu_die_from_dwo): Likewise.
7824 (init_cutu_and_read_dies): Likewise.
7825 (init_cutu_and_read_dies_no_follow): Likewise.
7826 (process_psymtab_comp_unit_reader): Likewise.
7827 (partial_die_parent_scope): Likewise.
7828 (peek_die_abbrev): Likewise.
7829 (process_queue): Likewise.
7830 (dwarf2_physname): Likewise.
7831 (read_namespace_alias): Likewise.
7832 (read_import_statement): Likewise.
7833 (create_dwo_cu_reader): Likewise.
7834 (create_cus_hash_table): Likewise.
7835 (lookup_dwo_cutu): Likewise.
7836 (inherit_abstract_dies): Likewise.
7837 (read_func_scope): Likewise.
7838 (read_call_site_scope): Likewise.
7839 (dwarf2_add_member_fn): Likewise.
7840 (read_common_block): Likewise.
7841 (read_module_type): Likewise.
7842 (read_typedef): Likewise.
7843 (read_subrange_type): Likewise.
7844 (load_partial_dies): Likewise.
7845 (read_partial_die): Likewise.
7846 (find_partial_die): Likewise.
7847 (read_str_index): Likewise.
7848 (dwarf2_string_attr): Likewise.
7849 (build_error_marker_type): Likewise.
7850 (lookup_die_type): Likewise.
7851 (dump_die_shallow): Likewise.
7852 (follow_die_ref): Likewise.
7853 (dwarf2_fetch_die_loc_sect_off): Likewise.
7854 (dwarf2_fetch_constant_bytes): Likewise.
7855 (follow_die_sig): Likewise.
7856 (get_signatured_type): Likewise.
7857 (get_DW_AT_signature_type): Likewise.
7858 (dwarf2_find_containing_comp_unit): Likewise.
7859 (set_die_type): Likewise.
7861 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7863 * arch/aarch64.c: Include "common-defs.h".
7864 * arch/amd64.c: Likewise.
7865 * arch/i386.c: Likewise.
7867 2018-02-21 Tom Tromey <tom@tromey.com>
7869 * value.h: (extract_field_op): Update.
7870 * eval.c (extract_field_op): Return a const char *.
7871 * expression.h (parse_expression_for_completion): Update.
7872 * completer.c (complete_expression): Update.
7873 (add_struct_fields): Make fieldname const.
7874 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7875 (mark_completion_tag, parse_exp_in_context_1): Update.
7876 (parse_expression_for_completion): Change "name" to
7877 unique_xmalloc_ptr*.
7879 2018-02-21 Tom Tromey <tom@tromey.com>
7881 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7883 2018-02-21 Yao Qi <yao.qi@linaro.org>
7885 * avr-tdep.c (avr_read_pc): Change parameter type to
7887 * gdbarch.sh (read_pc): Likewise.
7888 * gdbarch.c: Re-generated.
7889 * gdbarch.h: Re-generated.
7890 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7892 * ia64-tdep.c (ia64_read_pc): Likewise.
7893 * mips-tdep.c (mips_read_pc): Likewise.
7894 * spu-tdep.c (spu_read_pc): Likewise.
7896 2018-02-21 Yao Qi <yao.qi@linaro.org>
7898 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7899 * regcache-dump.c: New file.
7900 * regcache.c: Move register_dump to regcache-dump.c.
7901 (maintenance_print_registers): Likewise.
7902 (maintenance_print_raw_registers): Likewise.
7903 (maintenance_print_cooked_registers): Likewise.
7904 (maintenance_print_register_groups): Likewise.
7905 (maintenance_print_remote_registers): Likewise.
7906 (_initialize_regcache): Likewise.
7907 * regcache.h (register_dump): Moved from regcache.c.
7909 2018-02-21 Yao Qi <yao.qi@linaro.org>
7911 * regcache.c (regcache::regcache): Update.
7912 (regcache::invalidate): Move it to detached_regcache::invalidate.
7913 (get_thread_arch_aspace_regcache): Update.
7914 (regcache::raw_update): Update.
7915 (regcache::cooked_read): Remove some code.
7916 (regcache::cooked_read_value): Likewise.
7917 (regcache::raw_write): Remove assert on m_readonly_p.
7918 (regcache::raw_supply_integer): Move it to
7919 detached_regcache::raw_supply_integer.
7920 (regcache::raw_supply_zeroed): Likewise.
7921 * regcache.h (detached_regcache) <raw_supply_integer>: New
7923 <raw_supply_zeroed, invalidate>: Likewise.
7924 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7925 <invalidate>: Likewise.
7926 <m_readonly_p>: Removed.
7928 2018-02-21 Yao Qi <yao.qi@linaro.org>
7930 * infcmd.c (get_return_value): Let stop_regs point to
7931 get_current_regcache.
7932 * regcache.c (regcache::regcache): Remove.
7933 (register_dump_reg_buffer): New class.
7934 (regcache_print): Adjust.
7935 * regcache.h (regcache): Remove constructors.
7937 2018-02-21 Yao Qi <yao.qi@linaro.org>
7939 * regcache.c (class register_dump): New class.
7940 (register_dump_regcache, register_dump_none): New class.
7941 (register_dump_remote, register_dump_groups): New class.
7942 (regcache_print): Update.
7943 * regcache.h (regcache_dump_what): Move it to regcache.c.
7944 (regcache) <dump>: Remove.
7946 2018-02-21 Yao Qi <yao.qi@linaro.org>
7948 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7950 (jit_unwind_reg_set_impl): Call raw_supply.
7951 (jit_frame_sniffer): Use reg_buffer_rw.
7952 * record-full.c (record_full_core_regbuf): Change its type.
7953 (record_full_core_open_1): Use reg_buffer_rw.
7954 (record_full_close): Likewise.
7955 (record_full_core_fetch_registers): Use regcache->raw_supply.
7956 (record_full_core_store_registers): Likewise.
7957 * regcache.c (regcache::get_register_status): Move it to
7959 (regcache_raw_set_cached_value): Remove.
7960 (regcache::raw_set_cached_value): Remove.
7961 (regcache::raw_write): Call raw_supply.
7962 (regcache::raw_supply): Move it to reg_buffer_rw.
7963 * regcache.h (regcache_raw_set_cached_value): Remove.
7964 (reg_buffer_rw): New class.
7966 2018-02-21 Yao Qi <yao.qi@linaro.org>
7968 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7969 readonly_detached_regcache.
7970 (dummy_frame_prev_register): Use regcache->cooked_read.
7971 * frame.c (frame_save_as_regcache): Change return type.
7972 (frame_pop): Update.
7973 * frame.h (frame_save_as_regcache): Update declaration.
7974 * inferior.h (get_infcall_suspend_state_regcache): Update
7976 * infrun.c (infcall_suspend_state) <registers>: use
7977 readonly_detached_regcache.
7978 (save_infcall_suspend_state): Don't use regcache_dup.
7979 (get_infcall_suspend_state_regcache): Change return type.
7980 * linux-fork.c (struct fork_info) <savedregs>: Change to
7981 readonly_detached_regcache.
7983 (fork_save_infrun_state): Don't use regcache_dup.
7984 (info_checkpoints_command): Adjust.
7985 * mi/mi-main.c (register_changed_p): Update declaration.
7986 (mi_cmd_data_list_changed_registers): Use
7987 readonly_detached_regcache.
7988 (register_changed_p): Change parameter type to
7989 readonly_detached_regcache.
7990 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7991 readonly_detached_regcache.
7992 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7993 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7995 (regcache::save): Move it to reg_buffer.
7996 (regcache::restore): Change parameter type.
7997 (regcache_dup): Remove.
7998 * regcache.h (reg_buffer) <save>: New method.
7999 (readonly_detached_regcache): New class.
8000 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8001 readonly_detached_regcache.
8002 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8004 2018-02-21 Yao Qi <yao.qi@linaro.org>
8006 * frame.c (frame_save_as_regcache): Use regcache method save.
8007 (frame_pop): Use regcache method restore.
8008 * infrun.c (restore_infcall_suspend_state): Likewise.
8009 * linux-fork.c (fork_load_infrun_state): Likewise.
8010 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8012 * regcache.c (regcache_save): Remove.
8013 (regcache::restore): More asserts.
8014 (regcache_cpy): Remove.
8015 * regcache.h (regcache_save): Remove the declaration.
8016 (regcache::restore): Move from private to public.
8017 Remove the friend declaration of regcache_cpy.
8018 (regcache_cpy): Remove declaration.
8020 2018-02-21 Yao Qi <yao.qi@linaro.org>
8022 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8023 parameter type to 'readable_regcache *'.
8024 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8025 * arm-tdep.c (arm_neon_quad_read): Likewise.
8026 (arm_pseudo_read): Likewise.
8027 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8028 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8029 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8030 * gdbarch.c: Re-generated.
8031 * gdbarch.h: Re-generated.
8032 * gdbarch.sh (pseudo_register_read): Change parameter type to
8033 'readable_regcache *'.
8034 (pseudo_register_read_value): Likewise.
8035 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8036 (h8300_pseudo_register_read): Likewise.
8037 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8038 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8039 (i386_pseudo_register_read_into_value): Likewise.
8040 (i386_pseudo_register_read_value): Likewise.
8041 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8043 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8044 * m32c-tdep.c (m32c_raw_read): Likewise.
8045 (m32c_read_flg): Likewise.
8046 (m32c_banked_register): Likewise.
8047 (m32c_banked_read): Likewise.
8048 (m32c_sb_read): Likewise.
8049 (m32c_part_read): Likewise.
8050 (m32c_cat_read): Likewise.
8051 (m32c_r3r2r1r0_read): Likewise.
8052 (m32c_pseudo_register_read): Likewise.
8053 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8054 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8055 (mep_pseudo_cr64_read): Likewise.
8056 (mep_pseudo_register_read): Likewise.
8057 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8058 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8059 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8060 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8061 (regcache::cooked_read): Likewise.
8062 (regcache::cooked_read_value): Likewise.
8063 (regcache_cooked_read_signed):
8064 (regcache::cooked_read): Likewise.
8065 * regcache.h (readable_regcache): New class.
8066 (regcache): Inherit readable_regcache. Move some methods to
8068 * rl78-tdep.c (rl78_pseudo_register_read): Change
8069 parameter type to 'readable_regcache *'.
8070 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8071 (e500_pseudo_register_read): Change parameter type to
8072 'readable_regcache *'.
8073 (dfp_pseudo_register_read): Likewise.
8074 (vsx_pseudo_register_read): Likewise.
8075 (efpr_pseudo_register_read): Likewise.
8076 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8077 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8078 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8079 (sh64_pseudo_register_read): Likewise.
8080 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8081 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8082 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8083 (spu_pseudo_register_read): Likewise.
8084 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8085 (xtensa_pseudo_register_read): Likewise.
8087 2018-02-21 Yao Qi <yao.qi@linaro.org>
8089 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8090 (regcache::arch): Move it to reg_buffer::arch.
8091 (regcache::register_buffer): Likewise.
8092 (regcache::assert_regnum): Likewise.
8093 (regcache::num_raw_registers): Likewise.
8094 * regcache.h (reg_buffer): New class.
8095 (regcache): Inherit reg_buffer.
8097 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8099 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8100 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8102 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8104 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8106 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8108 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8109 (SFILES): Remove common/*.c files.
8110 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8111 * common/common.host: Add common reference.
8112 * configure.ac: Likewise.
8113 * configure: Regenerate.
8115 2018-02-16 Yao Qi <yao.qi@linaro.org>
8117 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8118 (block_initialize_namespace): Use new.
8119 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8120 (dwarf2_free_objfile): Use delete.
8121 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8122 (copy_type_recursive): Use new.
8123 * gdb_obstack.h (allocate_on_obstack): New.
8125 2018-02-15 Yao Qi <yao.qi@linaro.org>
8128 * inferior.c (exit_inferior_1): Reset inf->control.
8130 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8132 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8135 2018-02-14 Pedro Alves <palves@redhat.com>
8137 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8138 frame_cleanup_after_sniffer on exception.
8140 2018-02-14 Tom Tromey <tom@tromey.com>
8142 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8144 (solib_bfd_open): Make pathname const.
8145 * solib.c (solib_bfd_open): Make pathname const.
8146 * solib-spu.c (spu_bfd_fopen): Make name const.
8147 (spu_bfd_open): Make pathname const.
8148 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8149 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8151 2018-02-14 Tom Tromey <tom@tromey.com>
8153 * symfile.c (symfile_bfd_open): Update.
8154 * source.h (openp, source_full_path_of, find_and_open_source):
8155 Change argument type to unique_xmalloc_ptr.
8156 * source.c (openp): Take a unique_xmalloc_ptr.
8157 (source_full_path_of, find_and_open_source): Likewise.
8158 (open_source_file, symtab_to_fullname): Update.
8159 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8161 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8162 (exec_file_find): Update.
8163 * psymtab.c (psymtab_to_fullname): Update.
8164 * nto-tdep.h (nto_find_and_open_solib): Update.
8165 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8167 * exec.c (exec_file_attach): Update.
8168 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8169 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8171 2018-02-14 Tom Tromey <tom@tromey.com>
8173 * solib.c: Include source.h.
8174 * nto-tdep.c: Include source.h.
8175 * mi/mi-cmd-env.c: Include source.h.
8176 * infcmd.c: Include source.h.
8177 * exec.c: Include source.h.
8178 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8179 (add_path, directory_switch, source_path, init_source_path): Move
8181 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8182 (add_path, directory_switch, source_path, init_source_path):
8185 2018-02-14 Tom Tromey <tom@tromey.com>
8187 * solist.h (exec_file_find, solib_find): Return
8189 (solib_bfd_fopen): Take a const char *.
8190 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8191 (exec_file_find, solib_find): Likewise.
8192 (solib_bfd_fopen): Do not take ownership of "pathname".
8193 (solib_bfd_open): Use unique_xmalloc_ptr.
8194 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8195 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8196 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8197 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8199 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8201 * ada-lang.c (name_match_type_from_name): Remove reference to
8202 ada_name_for_lookup in function's documentation.
8203 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8205 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8207 * defs.h (enum openp_flags): New enum.
8208 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8209 Move to enum openp_flags.
8210 (openp_flags): New enum flags.
8211 (openp): Change parameter type to openp_flags.
8212 * source.c (openp): Change parameter type to openp_flags.
8213 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8214 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8216 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8218 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8221 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8223 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8225 (class dwarf2_queue_guard): ...the destructor of this new class.
8226 (dw2_do_instantiate_symtab): Create instance of the new class
8227 dwarf2_queue_guard, remove cleanup.
8229 2018-02-09 Tom Tromey <tom@tromey.com>
8231 * source.c (find_source_lines): Don't reference past the end of
8234 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8236 * remote.c (remote_btrace_maybe_reopen): Change error message.
8237 * btrace.c (btrace_enable): Likewise.
8238 (parse_xml_btrace): Likewise.
8239 (parse_xml_btrace_conf): Likewise.
8241 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8243 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8244 (linux_enable_pt, linux_enable_bts): Call
8245 diagnose_perf_event_open_fail.
8247 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8249 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8250 Remove parameter and change return type. Update callers. Move it.
8251 (linux_enable_bts, linux_enable_pt): Improve error message.
8252 (linux_enable_pt): Remove zero buffer size check.
8253 (linux_enable_btrace): Improve error messages. Remove NULL return
8256 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8258 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8259 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8260 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8261 (linux_supports_pt, linux_supports_btrace): Remove.
8262 (linux_enable_bts): Call cpu_supports_bts.
8263 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8264 * remote.c (remote_supports_btrace): Remove.
8265 (init_remote_ops): Remove remote_supports_btrace.
8266 * target-delegates.c: Regenerated.
8267 * target.c (target_supports_btrace): Remove.
8268 * target.h (target_ops) <to_supports_btrace>: Remove
8269 (target_supports_btrace): Remove.
8270 * x86-linux-nat.c (x86_linux_create_target): Remove
8271 linux_supports_btrace.
8273 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8275 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8277 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8278 exception and use message in own exception.
8280 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8282 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8283 (perf_event_pt_event_type): Use gdb_file_up.
8284 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8285 scoped_fd, and scoped_mmap.
8287 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8289 * common/scoped_mmap.h: New.
8290 * unittests/scoped_mmap-selftest.c: New.
8291 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8292 unittests/scoped_mmap-selftest.c.
8294 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8296 * common/scoped_fd.h: New.
8297 * unittests/scoped_fd-selftest.c: New.
8298 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8299 unittests/scoped_fd-selftest.c.
8301 2018-02-09 Tom Tromey <tom@tromey.com>
8303 * auto-load.c (auto_load_section_scripts): Use
8304 gdb::unique_xmalloc_ptr.
8306 2018-02-09 Tom Tromey <tom@tromey.com>
8308 * auto-load.c (execute_script_contents): Use std::string.
8310 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8312 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8313 Python function, rather than a new command.
8315 2018-02-08 Tom Tromey <tom@tromey.com>
8317 * solib.c (solib_find_1): Use std::string.
8318 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8320 2018-02-08 Tom Tromey <tom@tromey.com>
8322 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8324 2018-02-08 Tom Tromey <tom@tromey.com>
8326 * source.c (find_source_lines): Use gdb::def_vector.
8328 2018-02-08 Tom Tromey <tom@tromey.com>
8330 * macrocmd.c (struct temporary_macro_definition): New.
8331 (macro_define_command): Use temporary_macro_definition. Remove
8333 (free_macro_definition_ptr): Remove.
8335 2018-02-08 Tom Tromey <tom@tromey.com>
8337 * macroexp.c (maybe_expand): Use std::string.
8339 2018-02-08 Tom Tromey <tom@tromey.com>
8341 * macroexp.c (struct macro_buffer): Add initializers for some
8343 (init_buffer, init_shared_buffer, free_buffer)
8344 (free_buffer_return_text): Remove.
8345 (macro_buffer): New constructors.
8346 (~macro_buffer): New destructor.
8347 (macro_buffer::set_shared): New method.
8348 (macro_buffer::resize_buffer, macro_buffer::appendc)
8349 (macro_buffer::appendmem): Now methods, not free functions.
8350 (set_token, append_tokens_without_splicing, stringify)
8351 (macro_stringify): Update.
8352 (gather_arguments): Change return type. Remove argc_p argument,
8353 add args_ptr argument. Use std::vector.
8354 (substitute_args): Remove argc argument. Accept std::vector.
8355 (expand): Update. Use std::vector.
8356 (scan, macro_expand, macro_expand_next): Update.
8358 2018-02-08 Tom Tromey <tom@tromey.com>
8360 * symtab.c (default_collect_symbol_completion_matches_break_on):
8361 Use unique_xmalloc_ptr.
8362 * macroscope.h: (sal_macro_scope, user_macro_scope)
8363 (default_macro_scope): Return unique_xmalloc_ptr.
8364 * macroscope.c (sal_macro_scope, user_macro_scope)
8365 (default_macro_scope): Return unique_xmalloc_ptr.
8366 * macroexp.h (macro_expand, macro_expand_once): Return
8368 * macroexp.c (macro_expand, macro_expand_once): Return
8370 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8371 (info_macro_command, info_macros_command): Use
8373 * compile/compile-c-support.c (write_macro_definitions): Use
8375 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8377 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8379 * value.c (value_static_field): Assign field type instead of
8380 containing type when returning an optimized out value.
8382 2018-02-06 Yao Qi <yao.qi@linaro.org>
8384 * ft32-tdep.c (ft32_read_pc): Remove.
8385 (ft32_write_pc): Remove.
8386 (ft32_gdbarch_init): Update.
8387 * m32r-tdep.c (m32r_read_pc): Remove.
8388 (m32r_gdbarch_init): Update.
8389 * mep-tdep.c (mep_read_pc): Remove.
8390 (mep_gdbarch_init): Update.
8391 * microblaze-tdep.c (microblaze_write_pc): Remove.
8392 (microblaze_gdbarch_init): Update.
8393 * mn10300-tdep.c (mn10300_read_pc): Remove.
8394 (mn10300_write_pc): Remove.
8395 (mn10300_gdbarch_init): Update.
8396 * moxie-tdep.c (moxie_read_pc): Remove.
8397 (moxie_write_pc): Remove.
8398 (moxie_gdbarch_init): Update.
8400 2018-02-06 Yao Qi <yao.qi@linaro.org>
8402 * expprint.c (print_subexp_standard): Handle
8403 OP_F77_UNDETERMINED_ARGLIST.
8404 (dump_subexp_body_standard): Likewise.
8406 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8408 * target-descriptions.c (tdesc_element_visitor) Add empty
8410 (tdesc_type): Move make_gdb_type from here.
8411 (tdesc_type_builtin): Likewise.
8412 (tdesc_type_vector): Likewise.
8413 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8414 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8415 (make_gdb_type_union): Likewise.
8416 (make_gdb_type_flags): Likewise.
8417 (make_gdb_type_enum): Likewise.
8418 (make_gdb_type): New function.
8419 (tdesc_register_type): Use static make_gdb_type.
8421 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8423 * infcmd.c (default_print_one_register_info): Align natural-format
8424 column values consistently one under another.
8425 (pad_to_column): New function.
8427 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8429 * dwarf2read.c (dwarf2_physname): Move commment.
8431 2018-02-01 Leszek Swirski <leszeks@google.com>
8433 * varobj.c (varobj_formatted_print_options): Allow recursive
8434 pretty printing if pretty printing is enabled.
8436 2018-02-01 Leszek Swirski <leszeks@google.com>
8438 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8439 names after a structop as a filename.
8441 2018-02-01 Yao Qi <yao.qi@linaro.org>
8443 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8444 (arm_record_coproc_data_proc): Likewise.
8446 2018-02-01 Yao Qi <yao.qi@linaro.org>
8448 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8450 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8452 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8453 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8455 2018-01-31 Pedro Alves <palves@redhat.com>
8457 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8458 * inflow.c (child_terminal_save_inferior): Wrap reference to
8459 tcgetpgrp in HAVE_TERMIOS_H.
8460 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8462 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8463 always iterate over all inferiors.
8464 (gdbsim_cntrl_c): Adjust.
8465 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8467 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8469 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8470 index type is objfile-owned if the element type is as well.
8472 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8476 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8478 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8479 "features/s390x-linux64.c".
8480 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8481 s390_linux32 and s390x_linux64.
8482 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8484 * s390-tdep.c: Include "features/s390-linux32.c" and
8485 "features/s390x-linux64.c".
8486 (s390_tdesc_valid): Add check for tdesc_has_registers.
8487 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8488 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8489 tdesc_s390x_linux64.
8490 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8491 tdesc_s390x_linux64 to...
8492 * s390-tdep.h: ...here.
8494 2018-01-30 Pedro Alves <palves@redhat.com>
8497 * config.in, configure: Regenerate.
8498 * configure.ac: Check for getpgid.
8499 * go32-nat.c (go32_pass_ctrlc): New.
8500 (go32_target): Install it.
8501 * inf-child.c (inf_child_target): Install
8502 child_terminal_save_inferior, child_pass_ctrlc and
8504 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8505 (inf_ptrace_target): No longer install it.
8506 * infcmd.c (interrupt_target_1): Adjust.
8507 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8508 (child_interrupt): Declare.
8509 (inferior::terminal_state): New.
8510 * inflow.c (struct terminal_info): Update comments.
8511 (inferior_process_group): Delete.
8512 (terminal_is_ours): Delete.
8513 (gdb_tty_state): New.
8514 (child_terminal_init): Adjust.
8515 (is_gdb_terminal, sharing_input_terminal_1)
8516 (sharing_input_terminal): New functions.
8517 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8518 Set the process's actual process group in the foreground if
8519 possible. Handle is_ours_for_output/is_ours distinction. Don't
8520 mark terminal as the inferior's if not sharing GDB's terminal.
8521 Don't check attach_flag.
8522 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8523 pass down a target_terminal_state.
8524 (child_terminal_save_inferior): New, factored out from ...
8525 (child_terminal_ours_1): ... this. Handle
8526 target_terminal_state::is_ours_for_output.
8527 (child_interrupt, child_pass_ctrlc): New.
8528 (inflow_inferior_exit): Clear the inferior's terminal_state.
8529 (copy_terminal_info): Copy the inferior's terminal state.
8530 (_initialize_inflow): Remove reference to terminal_is_ours.
8531 * inflow.h (inferior_process_group): Delete.
8532 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8533 * procfs.c (procfs_target): Don't install procfs_interrupt.
8534 (procfs_interrupt): Delete.
8535 * remote.c (remote_serial_quit_handler): Adjust.
8536 (remote_interrupt): Remove ptid parameter. Adjust.
8537 * target-delegates.c: Regenerate.
8538 * target.c: Include "terminal.h".
8539 (target_terminal::terminal_state): Rename to ...
8540 (target_terminal::m_terminal_state): ... this.
8541 (target_terminal::init): Adjust.
8542 (target_terminal::inferior): Adjust to per-inferior
8544 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8545 (target_terminal::ours, target_terminal::ours_for_output): Use
8546 target_terminal_is_ours_kind.
8547 (target_interrupt): Remove ptid parameter. Adjust.
8548 (default_target_pass_ctrlc): Adjust.
8549 * target.h (target_ops::to_terminal_save_inferior): New field.
8550 (target_ops::to_interrupt): Remove ptid_t parameter.
8551 (target_interrupt): Remove ptid_t parameter. Update comment.
8552 (target_pass_ctrlc): Update comment.
8553 * target/target.h (target_terminal_state): New scoped enum,
8555 (target_terminal::terminal_state): ... here.
8556 (target_terminal::inferior): Update comments.
8557 (target_terminal::restore_inferior): New.
8558 (target_terminal::is_inferior, target_terminal::is_ours)
8559 (target_terminal::is_ours_for_output): Adjust.
8560 (target_terminal::scoped_restore_terminal_state): Adjust to
8561 rename, and call restore_inferior() instead of inferior().
8562 (target_terminal::scoped_restore_terminal_state::m_state): Change
8564 (target_terminal::terminal_state): Rename to ...
8565 (target_terminal::m_terminal_state): ... this and change type.
8567 2018-01-30 Pedro Alves <palves@redhat.com>
8569 * linux-nat.c (wait_for_signal): New function.
8570 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8572 (async_terminal_is_ours)
8573 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8574 (linux_nat_add_target): Don't override
8575 to_terminal_inferior/to_terminal_ours.
8577 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8579 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8581 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8583 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8584 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8585 dwarf2_per_objfile_free here.
8586 (dwarf2_per_objfile_free): Remove.
8587 (_initialize_dwarf2_read): Don't register
8588 dwarf2_per_objfile_free as a registry cleanup.
8590 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8592 Avoid compilation errors in MinGW native builds
8594 The error is triggered by including python-internal.h, and the
8597 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8598 from build-gnulib/import/math.h:27,
8599 from d:/usr/Python26/include/pyport.h:235,
8600 from d:/usr/Python26/include/Python.h:58,
8601 from python/python-internal.h:94,
8602 from python/py-arch.c:24:
8603 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8607 This happens because Python headers define 'hypot' to expand t
8608 '_hypot' in the Windows builds.
8609 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8610 'hypoth'. This avoids a compilation error.
8612 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8614 * MAINTAINERS (Write After Approval): Fix ordering.
8616 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8618 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8620 2018-01-26 Alan Modra <amodra@gmail.com>
8622 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8623 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8624 Remove nop. Make const. Comment.
8625 (powerpc32_plt_stub_so_2): New.
8626 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8627 Correct count. Update uses.
8628 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8629 Move common code reading PLT entry word. Correct
8630 powerpc32_plt_stub PLT address calculation.
8631 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8632 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8633 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8634 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8635 (ppc64_standard_linkage8): Likewise.
8636 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8637 Correct insns description.
8638 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8640 2018-01-24 Pedro Alves <palves@redhat.com>
8642 GCC PR libstdc++/83906
8643 * gdbtypes.c (operator==(const dynamic_prop &,
8644 const dynamic_prop &)): New.
8645 (operator==(const range_bounds &, const range_bounds &)): New.
8646 (check_types_equal): Use them instead of memcmp.
8647 * gdbtypes.h (operator==(const dynamic_prop &,
8648 const dynamic_prop &)): Declare.
8649 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8650 (operator==(const range_bounds &, const range_bounds &)): Declare.
8651 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8653 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8655 * s390-linux-tdep.c (s390_record_address_mask)
8656 (s390_record_calc_disp_common, s390_record_calc_disp)
8657 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8658 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8659 (s390_process_record): Move to s390-tdep.c.
8660 (s390_linux_init_abi_any): Adjust.
8661 * s390-tdep.c (s390_record_address_mask)
8662 (s390_record_calc_disp_common, s390_record_calc_disp)
8663 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8664 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8665 (s390_process_record): Moved from s390-linux-tdep.c
8666 (s390_gdbarch_init): Adjust.
8668 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8670 * s390-linux-nat.c (s390-tdep.h): New include.
8671 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8672 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8673 (ALLDEPFILES): Add s390-tdep.c.
8674 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8675 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8676 * s390-tdep.h: ...this. New file.
8677 * s390-linux-tdep.c (s390-tdep.h): New include.
8678 (_initialize_s390_tdep): Rename to...
8679 (_initialize_s390_linux_tdep): ...this and adjust.
8680 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8681 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8683 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8684 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8685 (s390_is_partial_instruction, s390_software_single_step)
8686 (is_non_branch_ril, s390_displaced_step_copy_insn)
8687 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8688 (s390_prologue_data, s390_addr, s390_store, s390_load)
8689 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8690 (s390_register_call_saved, s390_guess_tracepoint_registers)
8691 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8692 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8693 (s390_pseudo_register_name, s390_pseudo_register_type)
8694 (s390_pseudo_register_read, s390_pseudo_register_write)
8695 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8696 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8697 (s390_addr_bits_remove, s390_address_class_type_flags)
8698 (s390_address_class_type_flags_to_name)
8699 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8700 (s390_function_arg_float, s390_function_arg_vector)
8701 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8702 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8703 (s390_frame_align, s390_register_return_value, s390_return_value)
8704 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8705 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8706 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8707 (s390_trad_frame_prev_register, s390_unwind_cache)
8708 (s390_prologue_frame_unwind_cache)
8709 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8710 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8711 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8712 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8713 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8714 (s390_frame_base_address, s390_local_base_address)
8715 (s390_frame_base, s390_gcc_target_options)
8716 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8717 (s390_validate_reg_range, s390_tdesc_valid)
8718 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8719 * s390-tdep.c: ...this. New file.
8721 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8723 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8724 (s390_process_record, s390_gdbarch_tdep_alloc)
8725 (s390_linux_init_abi_any): Use/set new hook.
8727 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8729 * s390-linux-tdep.c (osabi.h): New include.
8730 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8731 (s390_linux_init_abi_any): New functions.
8732 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8734 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8736 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8737 tdesc_has_registers check
8739 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8741 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8742 (s390_validate_reg_range): New macro.
8743 (s390_gdbarch_init): Adjust.
8745 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8747 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8748 (s390_gdbarch_tdep_alloc): Adjust.
8749 (s390_gdbarch_init): Adjust.
8751 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8753 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8754 <have_tdb>: Change type to bool.
8755 (s390_gdbarch_tdep_alloc): Adjust.
8756 (s390_gdbarch_init): Adjust.
8758 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8760 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8761 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8762 (s390_gdbarch_tdep_alloc): New function.
8763 (s390_gdbarch_init): Allocate tdep at start and use its fields
8764 instead of separate variables.
8766 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8768 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8769 when looking for cached gdbarch and add comment for remaining.
8771 2018-01-22 Pedro Alves <palves@redhat.com>
8772 Sergio Durigan Junior <sergiodj@redhat.com>
8774 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8777 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8779 * MAINTAINERS: Update my company e-mail address.
8781 2018-01-22 Yao Qi <yao.qi@linaro.org>
8783 * regcache.c (cooked_write_test): New function.
8784 (_initialize_regcache): Register the test.
8786 2018-01-22 Yao Qi <yao.qi@linaro.org>
8788 * ia64-tdep.c (ia64_pseudo_register_read): Call
8789 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8790 * m32c-tdep.c (m32c_cat_read): Likewise.
8791 (m32c_r3r2r1r0_read): Likewise.
8792 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8793 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8795 2018-01-22 Yao Qi <yao.qi@linaro.org>
8797 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8798 method raw_read instead of regcache_raw_read.
8799 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8800 * arm-tdep.c (arm_neon_quad_read): Likewise.
8801 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8802 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8803 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8804 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8805 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8806 (i386_pseudo_register_read_into_value): Likewise.
8807 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8808 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8809 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8810 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8811 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8812 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8813 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8814 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8815 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8817 2018-01-22 Yao Qi <yao.qi@linaro.org>
8819 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8820 * configure.tgt: Remove target mt.
8821 * mt-tdep.c: Remove.
8822 * regcache.c (cooked_read_test): Remove the check for mt.
8824 2018-01-22 Yao Qi <yao.qi@linaro.org>
8826 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8827 instead of gdbarch_pseudo_register_read_value.
8829 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8831 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8834 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8836 * linespec.c (create_sals_line_offset): Remove code that preserved
8837 the symtab_and_line's line number.
8839 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8841 * varobj.c (varobj_create): Don't set valid_block when creating a
8844 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8846 * varobj.c (varobj_create): Remove out of date comment.
8848 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8851 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8852 updating innermost block.
8853 * parse.c (innermost_block_tracker::update): Take extra type
8854 parameter, and check types match before updating innermost block.
8855 (write_dollar_variable): Update innermost block for registers.
8856 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8857 (innermost_block_tracker::innermost_block_tracker): Initialise
8859 (innermost_block_tracker::reset): Take type parameter.
8860 (innermost_block_tracker::update): Take type parameter, and pass
8861 type through as needed.
8862 (innermost_block_tracker::m_types): New member.
8863 * varobj.c (varobj_create): Pass type when reseting innermost
8866 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8868 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8869 * ada-lang.c (resolve_subexp): Likewise.
8870 * breakpoint.c (set_breakpoint_condition) Likewise.
8871 (watch_command_1) Likewise.
8872 * c-exp.y (variable): Likewise.
8873 * d-exp.y (PrimaryExpression): Likewise.
8874 * f-exp.y (variable): Likewise.
8875 * go-exp.y (variable): Likewise.
8876 * m2-exp.y (variable): Likewise.
8877 * objfiles.c (objfile::~objfile): Likewise.
8878 * p-exp.y (variable): Likewise.
8879 * parse.c (innermost_block): Change type.
8880 * parser-defs.h (class innermost_block_tracker): New.
8881 (innermost_block): Change to innermost_block_tracker.
8882 * printcmd.c (display_command): Switch to innermost_block API.
8883 (do_one_display): Likewise.
8884 * rust-exp.y (do_one_display): Likewise.
8885 * symfile.c (clear_symtab_users): Likewise.
8886 * varobj.c (varobj_create): Switch to innermost_block API, replace
8887 use of innermost_block with block stored on varobj object.
8889 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8891 * expression.h (innermost_block): Remove declaration.
8892 * varobj.c: Add 'parser-defs.h' include.
8894 2018-01-19 Tom Tromey <tom@tromey.com>
8896 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8897 symbols in the static and global blocks.
8899 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8901 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8902 gdb_ptrace.h, and move including gdb_wait.h ...
8903 * nat/linux-ptrace.h: ... to here.
8905 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8907 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8908 inf_ptrace_detach_success.
8909 (inf_ptrace_detach_success): Add inferior parameter, use it
8910 instead of inferior_ptid, pass it to detach_inferior.
8911 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8913 * inferior.c (detach_inferior): Add overload that takes an
8915 * inferior.h (detach_inferior): Likewise.
8916 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8917 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8918 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8920 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8922 * target.h (struct target_ops) <to_detach>: Add inferior
8924 (target_detach): Likewise.
8925 * target.c (dispose_inferior): Pass inferior down.
8926 (target_detach): Pass inferior down. Assert that it is equal to
8927 the current inferior.
8928 * aix-thread.c (aix_thread_detach): Pass inferior down.
8929 * corefile.c (core_file_command): Pass current_inferior() down.
8930 * corelow.c (core_detach): Add inferior parameter.
8931 * darwin-nat.c (darwin_detach): Likewise.
8932 * gnu-nat.c (gnu_detach): Likewise.
8933 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8934 * infcmd.c (detach_command): Pass current_inferior() down to
8936 * infrun.c (follow_fork_inferior): Pass parent_inf to
8938 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8940 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8941 * linux-thread-db.c (thread_db_detach): Likewise.
8942 * nto-procfs.c (procfs_detach): Likewise.
8943 * procfs.c (procfs_detach): Likewise.
8944 * record.c (record_detach): Likewise.
8945 * record.h (struct inferior): Forward-declare.
8946 (record_detach): Add inferior parameter.
8947 * remote-sim.c (gdbsim_detach): Likewise.
8948 * remote.c (remote_detach_1): Likewise.
8949 (remote_detach): Likewise.
8950 (extended_remote_detach): Likewise.
8951 * sol-thread.c (sol_thread_detach): Likewise.
8952 * target-debug.h (target_debug_print_inferior_p): New macro.
8953 * target-delegates.c: Re-generate.
8954 * top.c (kill_or_detach): Pass inferior down to target_detach.
8955 * windows-nat.c (windows_detach): Add inferior parameter.
8957 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8959 * target.h (struct target_ops) <to_detach>: Remove args
8961 (target_detach): Likewise.
8962 * target.c (dispose_inferior): Adjust.
8963 (target_detach): Remove args parameter, adjust.
8964 * aix-thread.c (aix_thread_detach): Adjust.
8965 * corefile.c (core_file_command): Adjust.
8966 * corelow.c (core_detach): Adjust.
8967 * darwin-nat.c (darwin_detach): Adjust.
8968 * gnu-nat.c (gnu_detach): Adjust.
8969 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8970 * infcmd.c (detach_command): Adjust
8971 * infrun.c (follow_fork_inferior): Adjust.
8972 (handle_vfork_child_exec_or_exit): Adjust.
8973 * linux-fork.c (linux_fork_detach): Remove args parameter.
8974 * linux-fork.h (linux_fork_detach): Likewise.
8975 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8976 * linux-thread-db.c (thread_db_detach): Likewise.
8977 * nto-procfs.c (procfs_detach): Likewise.
8978 * procfs.c (procfs_detach): Likewise.
8979 (do_detach): Remove signo parameter.
8980 * record.c (record_detach): Remove args parameter.
8981 * record.h (record_detach): Likewise.
8982 * remote-sim.c (gdbsim_detach): Likewise.
8983 * remote.c (remote_detach_1): Likewise.
8984 (remote_detach): Likewise.
8985 (extended_remote_detach): Likewise.
8986 * sol-thread.c (sol_thread_detach): Likewise.
8987 * target-delegates.c: Re-generate.
8988 * top.c (struct qt_args) <args>: Remove field.
8989 (kill_or_detach): Don't pass args.
8990 (quit_force): Don't set args.
8991 * windows-nat.c (windows_detach): Remove args parameter.
8993 2018-01-19 Yao Qi <yao.qi@linaro.org>
8995 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8996 (arm_linux_init_abi): Install it.
8998 2018-01-19 Yao Qi <yao.qi@linaro.org>
9000 * osabi.c (gdb_osabi_names): Extend the regexp for
9001 arm-linux-gnueabihf.
9003 2018-01-18 Yao Qi <yao.qi@linaro.org>
9005 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9007 (abbrev_table::add_abbrev): Update.
9008 (abbrev_table::lookup_abbrev): Update.
9010 2018-01-18 Yao Qi <yao.qi@linaro.org>
9012 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9014 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9016 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9019 2018-01-17 Tom Tromey <tom@tromey.com>
9021 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9023 2018-01-17 Tom Tromey <tom@tromey.com>
9025 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9026 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9027 (create_array_type_with_stride): Update.
9028 * dwarf2read.c (set_die_type): Update.
9030 2018-01-17 Tom Tromey <tom@tromey.com>
9032 * dwarf2read.c (delayed_method_info): Remove typedef.
9033 (dwarf2_cu::method_info): Now a std::vector.
9034 (add_to_method_list): Update.
9035 (free_delayed_list): Remove.
9036 (compute_delayed_physnames): Update.
9037 (process_full_comp_unit, process_full_type_unit): Clear the method
9038 list. Remove cleanups.
9039 (psymtab_include_file_name): Add name_holder parameter. Use
9041 (dwarf_decode_lines): Update.
9043 2018-01-17 Tom Tromey <tom@tromey.com>
9044 Simon Marchi <simon.marchi@ericsson.com>
9046 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9047 (dwarf2_per_objfile::free_cached_comp_units)
9048 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9049 (init_cutu_and_read_dies_no_follow): Update.
9050 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9051 (dwarf2_cu::~dwarf2_cu): New.
9052 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9053 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9055 2018-01-17 Tom Tromey <tom@tromey.com>
9056 Simon Marchi <simon.marchi@ericsson.com>
9058 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9059 (struct die_reader_specs) <abbrev_table>: New member.
9060 (struct abbrev_table): Add constructor.
9061 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9062 <abbrev_obstack>: Now an auto_obstack.
9063 (abbrev_table_up): New typedef.
9064 (init_cu_die_reader): Add abbrev_table parameter.
9065 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9066 Add result_dwo_abbrev_table.
9067 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9068 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9070 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9072 (skip_children): Update.
9073 (abbrev_table::alloc_abbrev): Rename from
9074 abbrev_table_alloc_abbrev.
9075 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9076 (abbrev_table::lookup_abbrev): Rename from
9077 abbrev_table_lookup_abbrev.
9078 (abbrev_table_read_table): Return abbrev_table_up.
9079 (abbrev_table_free, abbrev_table_free_cleanup)
9080 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9081 (load_partial_dies): Update.
9083 2018-01-17 Tom Tromey <tom@tromey.com>
9085 * dwarf2read.c (dwarf2_compute_name): Update comment.
9086 (read_func_scope, read_variable): Update.
9087 (new_symbol): Remove.
9088 (new_symbol_full): Rename to new_symbol.
9090 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9093 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9094 a warning instead of throwing an error, set section size to 0 and return
9096 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9098 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9100 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9102 (linux_ptrace_attach_fail_reason_string): Likewise.
9103 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9105 (linux_ptrace_attach_fail_reason_string): Likewise.
9106 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9108 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9110 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9112 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9115 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9116 checking for fs_base/gs_base fields in struct user_regs_struct.
9117 * configure: Regenerate.
9119 2018-01-17 Yao Qi <yao.qi@linaro.org>
9121 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9123 (aarch64_linux_init_abi): Install it to gdbarch hook
9126 2018-01-15 Pedro Alves <palves@redhat.com>
9128 * common/signals-state-save-restore.c
9129 (save_original_signals_state): Fix typos.
9131 2017-01-12 Tom Tromey <tom@tromey.com>
9132 Sergio Durigan Junior <sergiodj@redhat.com>
9134 * Makefile.in (install-only): Install gdb-add-index.
9136 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9138 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9140 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9142 * infrun.c (keep_going_pass_signal): Clear step-over info when
9143 insert_breakpoints fails.
9145 2018-01-11 Pedro Alves <palves@redhat.com>
9148 * infrun.c (resume): Rename to ...
9149 (resume_1): ... this.
9150 (resume): Reimplement as wrapper around resume_1.
9152 2018-01-11 Pedro Alves <palves@redhat.com>
9155 * remote.c (remote_parse_stop_reply): Default to the last-set
9156 general thread instead of to 'magic_null_ptid'.
9158 2018-01-10 Pedro Alves <palves@redhat.com>
9160 * language.h (language_get_symbol_name_matcher): Rename ...
9161 (get_symbol_name_matcher): ... this.
9162 * language.c (language_get_symbol_name_matcher): Ditto.
9163 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9166 2018-01-10 Pedro Alves <palves@redhat.com>
9170 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9171 Adjust to use language_get_symbol_name_matcher instead of
9172 language_defn::la_get_symbol_name_matcher.
9173 * language.c (language_get_symbol_name_matcher): If in Ada mode
9174 and the lookup name is a verbatim match, return Ada's matcher.
9175 * language.h (language_get_symbol_name_matcher): Adjust comment.
9176 (ada_lookup_name_info::verbatim_p):: New method.
9178 2018-01-10 Pedro Alves <palves@redhat.com>
9181 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9182 minsym's language is language_auto or language_cplus, pass down
9183 language_ada instead.
9184 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9186 2018-01-10 Pedro Alves <palves@redhat.com>
9189 * minsyms.c (linkage_name_str): New function.
9190 (iterate_over_minimal_symbols): Use it.
9192 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9194 * NEWS: Document that 'info proc' now works on FreeBSD.
9196 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9198 * configure.ac: Check for kinfo_getfile in libutil.
9199 * configure: Regenerate.
9200 * config.in: Regenerate.
9201 * fbsd-nat.c: Include "fbsd-tdep.h".
9202 (fbsd_fetch_cmdline): New.
9203 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9204 rather than calling error.
9205 (fbsd_info_proc): New.
9206 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9207 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9208 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9210 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9212 * fbsd-nat.c (struct free_deleter): Remove.
9213 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9215 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9217 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9218 NULL for an empty pathname.
9220 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9222 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9223 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9224 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9225 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9226 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9227 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9228 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9229 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9230 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9231 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9232 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9233 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9234 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9235 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9236 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9238 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9240 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9241 (gnu_xfer_auxv): New function.
9242 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9245 2018-01-08 Yao Qi <yao.qi@linaro.org>
9246 Simon Marchi <simon.marchi@ericsson.com>
9248 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9250 (COMMON_OBS): Remove selftest.o.
9251 * configure.ac: Append selftest-arch.c and common/selftest.c to
9252 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9253 * configure: Re-generated.
9254 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9256 (maintenance_info_selftests): Likewise.
9258 2018-01-08 Xavier Roirand <roirand@adacore.com>
9260 * ada-valprint.c (val_print_packed_array_elements): Use
9261 proper number of elements when printing an array indexed
9262 by an enumeration type.
9264 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9266 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9267 (dw2_get_file_names_reader): Adjust.
9268 (lookup_dwo_signatured_type): Adjust.
9269 (lookup_dwp_signatured_type): Adjust.
9270 (lookup_signatured_type): Adjust.
9271 (create_type_unit_group): Adjust.
9272 (get_type_unit_group): Adjust.
9273 (process_psymtab_comp_unit_reader): Adjust.
9274 (build_type_psymtabs_reader): Adjust.
9275 (scan_partial_symbols): Adjust.
9276 (add_partial_symbol): Adjust.
9277 (add_partial_subprogram): Adjust.
9278 (peek_die_abbrev): Adjust.
9279 (fixup_go_packaging): Adjust.
9280 (process_imported_unit_die): Adjust.
9281 (dwarf2_compute_name): Adjust.
9282 (dwarf2_physname): Adjust.
9283 (read_import_statement): Adjust.
9284 (handle_DW_AT_stmt_list): Adjust.
9285 (read_file_scope): Adjust.
9286 (read_func_scope): Adjust.
9287 (read_lexical_block_scope): Adjust.
9288 (read_call_site_scope): Adjust.
9289 (read_variable): Adjust.
9290 (dwarf2_rnglists_process): Adjust.
9291 (dwarf2_ranges_process): Adjust.
9292 (dwarf2_ranges_read): Adjust.
9293 (dwarf2_get_pc_bounds): Adjust.
9294 (dwarf2_record_block_ranges): Adjust.
9295 (dwarf2_add_field): Adjust.
9296 (dwarf2_add_member_fn): Adjust.
9297 (read_structure_type): Adjust.
9298 (process_structure_scope): Adjust.
9299 (read_enumeration_type): Adjust.
9300 (read_array_type): Adjust.
9301 (mark_common_block_symbol_computed): Adjust.
9302 (read_common_block): Adjust.
9303 (read_namespace_type): Adjust.
9304 (read_namespace): Adjust.
9305 (read_module_type): Adjust.
9306 (read_tag_pointer_type): Adjust.
9307 (read_tag_ptr_to_member_type): Adjust.
9308 (read_tag_string_type): Adjust.
9309 (read_subroutine_type): Adjust.
9310 (read_typedef): Adjust.
9311 (read_base_type): Adjust.
9312 (attr_to_dynamic_prop): Adjust.
9313 (read_subrange_type): Adjust.
9314 (read_unspecified_type): Adjust.
9315 (dwarf2_read_abbrevs): Adjust.
9316 (load_partial_dies): Adjust.
9317 (read_partial_die): Adjust.
9318 (find_partial_die): Adjust.
9319 (guess_partial_die_structure_name): Adjust.
9320 (fixup_partial_die): Adjust.
9321 (read_attribute_value): Adjust.
9322 (read_addr_index): Adjust.
9323 (read_addr_index_from_leb128): Adjust.
9324 (read_str_index): Adjust.
9325 (dwarf2_string_attr): Adjust.
9326 (get_debug_line_section): Adjust.
9327 (dwarf_decode_line_header): Adjust.
9328 (lnp_state_machine::check_line_address): Adjust.
9329 (dwarf_decode_lines_1): Adjust.
9330 (dwarf_decode_lines): Adjust.
9331 (dwarf2_start_symtab): Adjust.
9332 (var_decode_location): Adjust.
9333 (new_symbol_full): Adjust.
9334 (dwarf2_const_value_data): Adjust.
9335 (dwarf2_const_value_attr): Adjust.
9336 (dwarf2_const_value): Adjust.
9338 (die_containing_type): Adjust.
9339 (build_error_marker_type): Adjust.
9340 (lookup_die_type): Adjust.
9341 (guess_full_die_structure_name): Adjust.
9342 (anonymous_struct_prefix): Adjust.
9343 (determine_prefix): Adjust.
9344 (dwarf2_name): Adjust.
9345 (follow_die_ref_or_sig): Adjust.
9346 (follow_die_offset): Adjust.
9347 (follow_die_ref): Adjust.
9348 (follow_die_sig_1): Adjust.
9349 (follow_die_sig): Adjust.
9350 (get_signatured_type): Adjust.
9351 (get_DW_AT_signature_type): Adjust.
9352 (decode_locdesc): Adjust.
9353 (dwarf_decode_macros): Adjust.
9354 (cu_debug_loc_section): Adjust.
9355 (fill_in_loclist_baton): Adjust.
9356 (dwarf2_symbol_mark_computed): Adjust.
9357 (init_one_comp_unit): Don't assign
9358 dwarf2_cu::dwarf2_per_objfile.
9359 (set_die_type): Adjust.
9361 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9363 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9364 <dwarf2_per_objfile>: New field.
9365 (dwarf2_per_objfile): Remove global.
9366 (get_dwarf2_per_objfile): New function.
9367 (set_dwarf2_per_objfile): New function.
9368 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9370 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9371 (read_abbrev_offset): Likewise.
9372 (read_indirect_string): Likewise.
9373 (read_indirect_line_string): Likewise.
9374 (read_indirect_string_at_offset): Likewise.
9375 (read_indirect_string_from_dwz): Likewise.
9376 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9378 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9379 (create_all_comp_units): Change objfile parameter to
9381 (create_all_type_units): Likewise.
9382 (process_queue): Add dwarf2_per_objfile parameter.
9383 (read_and_check_comp_unit_head): Likewise.
9384 (lookup_dwo_unit_in_dwp): Likewise.
9385 (get_dwp_file): Likewise.
9386 (process_cu_includes): Likewise.
9387 (struct free_dwo_file_cleanup_data): New struct.
9388 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9389 set_dwarf2_per_objfile.
9390 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9391 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9392 context, adjust calls.
9393 (dw2_instantiate_symtab): Likewise.
9394 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9395 (dw2_get_cu): Likewise.
9396 (create_cu_from_index_list): Change objfile parameter to
9398 (create_cus_from_index_list): Get dwarf2_per_objfile from
9399 context, adjust calls.
9400 (create_cus_from_index): Likewise.
9401 (create_signatured_type_table_from_index): Change objfile
9402 parameter to dwarf2_per_objfile.
9403 (create_signatured_type_table_from_debug_names): Change objfile
9404 parameter to dwarf2_per_objfile.
9405 (create_addrmap_from_index): Likewise.
9406 (create_addrmap_from_aranges): Likewise.
9407 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9408 (dw2_setup): Remove.
9409 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9411 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9412 get_dwarf2_per_objfile.
9413 (dw2_forget_cached_source_info): Likewise.
9414 (dw2_map_symtabs_matching_filename): Likewise.
9415 (struct dw2_symtab_iterator) <index>: Remove.
9416 <dwarf2_per_objfile>: New field.
9417 (dw2_symtab_iter_init): Replace index parameter with
9419 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9420 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9421 (dw2_print_stats): Likewise.
9422 (dw2_dump): Likewise.
9423 (dw2_expand_symtabs_for_function): Likewise.
9424 (dw2_expand_all_symtabs): Likewise.
9425 (dw2_expand_symtabs_with_fullname): Likewise.
9426 (dw2_expand_marked_cus): Replace index and objfile parameters
9427 with dwarf2_per_objfile.
9428 (dw_expand_symtabs_matching_file_matcher): Add
9429 dwarf2_per_objfile parameter and adjust calls.
9430 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9432 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9433 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9435 (create_cus_from_debug_names_list): Replace objfile parameter
9436 with dwarf2_per_objfile and adjust calls.
9437 (create_cus_from_debug_names): Likewise.
9438 (dwarf2_read_debug_names): Likewise.
9439 (mapped_debug_names::namei_to_name): Adjust call.
9440 (dw2_debug_names_iterator::next): Likewise.
9441 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9442 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9443 (dw2_debug_names_dump): Likewise.
9444 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9445 (dw2_debug_names_expand_symtabs_matching): Likewise.
9446 (dwarf2_initialize_objfile): Likewise.
9447 (dwarf2_build_psymtabs): Likewise.
9448 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9450 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9451 (read_and_check_comp_unit_head): Likewise.
9452 (read_abbrev_offset): Likewise.
9453 (create_debug_type_hash_table): Likewise.
9454 (create_debug_types_hash_table): Likewise.
9455 (create_all_type_units): Replace objfile parameter with
9457 (add_type_unit): Add dwarf2_per_objfile parameter.
9458 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9459 with dwarf2_per_objfile.
9460 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9461 (lookup_dwp_signatured_type): Likewise.
9462 (lookup_signatured_type): Likewise.
9463 (read_cutu_die_from_dwo): Likewise.
9464 (init_tu_and_read_dwo_dies): Likewise.
9465 (init_cutu_and_read_dies): Likewise.
9466 (init_cutu_and_read_dies_no_follow): Likewise.
9467 (allocate_type_unit_groups_table): Add objfile parameter.
9468 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9469 (get_type_unit_group): Likewise.
9470 (process_psymtab_comp_unit): Update call.
9471 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9472 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9473 (print_tu_stats): Likewise.
9474 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9476 (build_type_psymtabs): Change objfile parameter to
9478 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9479 passed in void* parameter.
9480 (process_skeletonless_type_units): Change objfile parameter to
9482 (set_partial_user): Likewise.
9483 (dwarf2_build_psymtabs_hard): Likewise.
9484 (read_comp_units_from_section): Likewise.
9485 (create_all_comp_units): Likewise.
9486 (scan_partial_symbols): Update calls.
9487 (add_partial_symbol): Likewise.
9488 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9489 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9490 (process_queue): Add dwarf2_per_objfile parameter.
9491 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9492 (compute_compunit_symtab_includes): Likewise.
9493 (process_cu_includes): Add dwarf2_per_objfile parameter.
9494 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9495 (process_full_type_unit): Likewise.
9496 (process_imported_unit_die): Update call.
9497 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9498 (read_file_scope): Likewise.
9499 (allocate_dwo_file_hash_table): Add objfile parameter.
9500 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9501 (create_cus_hash_table): Likewise.
9502 (create_dwp_hash_table): Likewise.
9503 (create_dwo_unit_in_dwp_v1): Likewise.
9504 (create_dwp_v2_section): Likewise.
9505 (create_dwo_unit_in_dwp_v2): Likewise.
9506 (lookup_dwo_unit_in_dwp): Likewise.
9507 (try_open_dwop_file): Likewise.
9508 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9509 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9510 cleanup to include a reference to dwarf2_per_objfile.
9511 (open_dwp_file): Add dwarf2_per_objfile parameter.
9512 (open_and_init_dwp_file): Likewise.
9513 (get_dwp_file): Likewise.
9514 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9515 (queue_and_load_all_dwo_tus): Update call.
9516 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9518 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9519 (dwarf2_ranges_process): Likewise.
9520 (dwarf2_get_pc_bounds): Likewise.
9521 (mark_common_block_symbol_computed): Likewise.
9522 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9523 (dwarf2_read_abbrevs): Update call.
9524 (read_partial_die): Use dwarf2_per_objfile from cu.
9525 (find_partial_die): Likewise.
9526 (fixup_partial_die): Likewise.
9527 (read_attribute_value): Likewise.
9528 (read_indirect_string_at_offset_from): Add objfile parameter.
9529 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9531 (read_indirect_string_from_dwz): Add objfile parameter.
9532 (read_indirect_string): Add objfile parameter.
9533 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9534 (read_addr_index): Use dwarf2_per_objfile from cu.
9535 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9537 (read_str_index): Use dwarf2_per_objfile from cu.
9538 (get_debug_line_section): Likewise.
9539 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9540 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9541 (new_symbol_full): Use dwarf2_per_objfile from cu.
9542 (build_error_marker_type): Likewise.
9543 (lookup_die_type): Likewise.
9544 (determine_prefix): Likewise.
9545 (follow_die_offset): Likewise.
9546 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9547 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9548 (dwarf2_fetch_die_type_sect_off): Likewise.
9549 (dwarf2_get_die_type): Likewise.
9550 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9551 (get_signatured_type): Likewise.
9552 (get_DW_AT_signature_type): Likewise.
9553 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9554 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9555 (cu_debug_loc_section): Likewise.
9556 (fill_in_loclist_baton): Likewise.
9557 (dwarf2_symbol_mark_computed): Likewise.
9558 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9560 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9562 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9563 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9564 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9565 (set_die_type): Use dwarf2_free_objfile from cu.
9566 (get_die_type_at_offset): Likewise.
9567 (dwarf2_per_objfile_free): Don't assign global variable.
9568 (debug_names) <constructor>: Add dwarf2_per_objfile
9569 parameter, update m_debugstrlookup construction.
9570 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9572 <m_dwarf2_per_objfile>: New field.
9573 <lookup>: Use m_dwarf2_per_objfile.
9574 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9575 (psyms_seen_size): Likewise.
9576 (write_gdbindex): Replace objfile parameter with
9578 (write_debug_names): Likewise.
9579 (write_psymtabs_to_index): Likewise.
9580 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9583 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9585 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9586 <dwarf2_per_objfile>: New field.
9587 (struct dwarf2_per_cu_data) <objfile>: Remove.
9588 <dwarf2_per_objfile>: New field.
9589 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9591 (create_signatured_type_table_from_index): Likewise.
9592 (create_debug_type_hash_table): Likewise.
9593 (fill_in_sig_entry_from_dwo_entry): Likewise.
9594 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9595 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9597 (create_partial_symtab): Access objfile through
9599 (process_psymtab_comp_unit_reader): Likewise.
9600 (read_comp_units_from_section): Likewise.
9601 (scan_partial_symbols): Likewise.
9602 (add_partial_symbol): Likewise.
9603 (add_partial_subprogram): Likewise.
9604 (peek_die_abbrev): Likewise.
9605 (fixup_go_packaging): Likewise.
9606 (process_full_comp_unit): Likewise.
9607 (process_full_type_unit): Likewise.
9608 (process_imported_unit_die): Likewise.
9609 (dwarf2_compute_name): Likewise.
9610 (dwarf2_physname): Likewise.
9611 (read_import_statement): Likewise.
9612 (create_cus_hash_table): Assign dwarf2_physname instead of
9614 (read_func_scope): Access objfile through dwarf2_per_objfile.
9615 (read_lexical_block_scope): Likewise.
9616 (read_call_site_scope): Likewise.
9617 (read_variable): Likewise.
9618 (dwarf2_rnglists_process): Likewise.
9619 (dwarf2_ranges_process): Likewise.
9620 (dwarf2_ranges_read): Likewise.
9621 (dwarf2_record_block_ranges): Likewise.
9622 (dwarf2_add_field): Likewise.
9623 (dwarf2_add_member_fn): Likewise.
9624 (read_structure_type): Likewise.
9625 (process_structure_scope): Likewise.
9626 (read_enumeration_type): Likewise.
9627 (read_array_type): Likewise.
9628 (read_common_block): Likewise.
9629 (read_namespace_type): Likewise.
9630 (read_namespace): Likewise.
9631 (read_module_type): Likewise.
9632 (read_tag_pointer_type): Likewise.
9633 (read_tag_ptr_to_member_type): Likewise.
9634 (read_tag_string_type): Likewise.
9635 (read_subroutine_type): Likewise.
9636 (read_typedef): Likewise.
9637 (read_base_type): Likewise.
9638 (attr_to_dynamic_prop): Likewise.
9639 (read_subrange_type): Likewise.
9640 (read_unspecified_type): Likewise.
9641 (load_partial_dies): Likewise.
9642 (read_partial_die): Likewise.
9643 (find_partial_die): Likewise.
9644 (guess_partial_die_structure_name): Likewise.
9645 (fixup_partial_die): Likewise.
9646 (read_attribute_value): Likewise.
9647 (read_addr_index_from_leb128): Likewise.
9648 (dwarf2_read_addr_index): Likewise.
9649 (dwarf2_string_attr): Likewise.
9650 (lnp_state_machine::check_line_address): Likewise.
9651 (dwarf_decode_lines_1): Likewise.
9652 (dwarf_decode_lines): Likewise.
9653 (dwarf2_start_symtab): Likewise.
9654 (var_decode_location): Likewise.
9655 (new_symbol_full): Likewise.
9656 (dwarf2_const_value_data): Likewise.
9657 (dwarf2_const_value_attr): Likewise.
9658 (dwarf2_const_value): Likewise.
9659 (die_type): Likewise.
9660 (die_containing_type): Likewise.
9661 (lookup_die_type): Likewise.
9662 (guess_full_die_structure_name): Likewise.
9663 (anonymous_struct_prefix): Likewise.
9664 (dwarf2_name): Likewise.
9665 (follow_die_ref_or_sig): Likewise.
9666 (follow_die_offset): Likewise.
9667 (follow_die_ref): Likewise.
9668 (dwarf2_fetch_die_loc_sect_off): Likewise.
9669 (dwarf2_fetch_constant_bytes): Likewise.
9670 (dwarf2_fetch_die_type_sect_off): Likewise.
9671 (dwarf2_get_die_type): Likewise.
9672 (follow_die_sig): Likewise.
9673 (decode_locdesc): Likewise.
9674 (dwarf2_per_cu_objfile): Likewise.
9675 (dwarf2_per_cu_text_offset): Likewise.
9676 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9678 (set_die_type): Access objfile through
9681 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9683 * valprint.c (converted_character_d): Remove typedef.
9684 (DEF_VEC_O (converted_character_d)): Remove.
9685 (count_next_character): Use std::vector.
9686 (print_converted_chars_to_obstack): Likewise.
9687 (generic_printstr): Likewise.
9689 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9691 * xml-support.h (struct gdb_xml_value): Add constructor.
9692 <value>: Change type to unique_xmalloc_ptr.
9693 (gdb_xml_value_s): Remove typedef.
9694 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9695 (gdb_xml_element_start_handler): Change parameter type to
9697 (xml_find_attribute): Likewise.
9698 * xml-support.c (xml_find_attribute): Change parameter type to
9699 std::vector and adjust.
9700 (gdb_xml_values_cleanup): Remove.
9701 (gdb_xml_parser::start_element): Adjust to std::vector.
9702 (xinclude_start_include): Change paraeter type to std::vector
9704 * btrace.c (check_xml_btrace_version): Likewise.
9705 (parse_xml_btrace_block): Likewise.
9706 (parse_xml_btrace_pt_config_cpu): Likewise.
9707 (parse_xml_btrace_pt): Likewise.
9708 (parse_xml_btrace_conf_bts): Likewise.
9709 (parse_xml_btrace_conf_pt): Likewise.
9710 * memory-map.c (memory_map_start_memory): Likewise.
9711 (memory_map_start_property): Likewise.
9712 * osdata.c (osdata_start_osdata): Likewise.
9713 (osdata_start_item): Likewise.
9714 (osdata_start_column): Likewise.
9715 * remote.c (start_thread): Likewise.
9716 * solib-aix.c (library_list_start_library): Likewise.
9717 (library_list_start_list): Likewise.
9718 * solib-svr4.c (library_list_start_library): Likewise.
9719 (svr4_library_list_start_list): Likewise.
9720 * solib-target.c (library_list_start_segment): Likewise.
9721 (library_list_start_section): Likewise.
9722 (library_list_start_library): Likewise.
9723 (library_list_start_list): Likewise.
9724 * tracepoint.c (traceframe_info_start_memory): Likewise.
9725 (traceframe_info_start_tvar): Likewise.
9726 * xml-syscall.c (syscall_start_syscall): Likewise.
9727 * xml-tdesc.c (tdesc_start_target): Likewise.
9728 (tdesc_start_feature): Likewise.
9729 (tdesc_start_reg): Likewise.
9730 (tdesc_start_union): Likewise.
9731 (tdesc_start_struct): Likewise.
9732 (tdesc_start_flags): Likewise.
9733 (tdesc_start_enum): Likewise.
9734 (tdesc_start_field): Likewise.
9735 (tdesc_start_enum_value): Likewise.
9736 (tdesc_start_vector): Likewise.
9738 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9740 * extension.h (struct xmethod_worker) <clone>: Remove.
9741 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9743 (python_xmethod_worker::clone): Remove.
9744 * valops.c (find_overload_match): Use std::move instead of
9747 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9749 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9750 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9751 <free_xmethod_worker_data>: Remove.
9752 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9753 <get_xmethod_arg_types>: Remove.
9754 <get_xmethod_result_type>: Remove.
9755 <invoke_xmethod>: Remove.
9756 * extension.c (new_xmethod_worker): Remove.
9757 (clone_xmethod_worker): Remove.
9758 (get_matching_xmethod_workers): Return void, pass std::vector by
9760 (get_xmethod_arg_types): Rename to...
9761 (xmethod_worker::get_arg_types): ... this, and adjust.
9762 (get_xmethod_result_type): Rename to...
9763 (xmethod_worker::get_result_type): ... this, and adjust.
9764 (invoke_xmethod): Remove.
9765 (free_xmethod_worker): Remove.
9766 (free_xmethod_worker_vec): Remove.
9767 * extension.h (enum ext_lang_rc): Move here from
9769 (struct xmethod_worker): Add constructor and destructor.
9772 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9773 virtual pure methods.
9774 <get_arg_types, get_result_type>: New methods.
9775 (xmethod_worker_ptr): Remove typedef.
9776 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9777 (xmethod_worker_vec): Remove typedef.
9778 (xmethod_worker_up): New typedef.
9779 (invoke_xmethod): Remove.
9780 (clone_xmethod_worker): Remove.
9781 (free_xmethod_worker): Remove.
9782 (free_xmethod_worker_vec): Remove.
9783 (get_xmethod_arg_types): Remove.
9784 (get_xmethod_result_type): Remove.
9785 * valops.c (find_method_list): Use std::vector, don't use
9786 intermediate vector.
9787 (value_find_oload_method_list): Use std::vector.
9788 (find_overload_match): Use std::vector.
9789 (find_oload_champ): Use std::vector.
9790 * value.c (value_free): Use operator delete.
9791 (value_of_xmethod): Rename to...
9792 (value_from_xmethod): ... this. Don't assign
9793 xmethod_worker::value, take rvalue-reference.
9794 (result_type_of_xmethod): Adjust.
9795 (call_xmethod): Adjust.
9796 * value.h: Include extension.h.
9797 (struct xmethod_worker): Don't forward-declare.
9798 (value_of_xmethod): Rename to...
9799 (value_from_xmethod): ... this, take rvalue-reference.
9800 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9801 (struct python_xmethod_worker): ... this, add constructor and
9803 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9804 (gdbpy_free_xmethod_worker_data): Rename to...
9805 (python_xmethod_worker::~python_xmethod_worker): ... this and
9807 (gdbpy_clone_xmethod_worker_data): Rename to...
9808 (python_xmethod_worker::clone): ... this and adjust.
9809 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9811 (gdbpy_get_xmethod_arg_types): Rename to...
9812 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9813 (gdbpy_get_xmethod_result_type): Rename to...
9814 (python_xmethod_worker::do_get_result_type): ... this and
9816 (gdbpy_invoke_xmethod): Rename to...
9817 (python_xmethod_worker::invoke): ... this and adjust.
9818 (new_python_xmethod_worker): Rename to...
9819 (python_xmethod_worker::python_xmethod_worker): ... this and
9821 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9823 (gdbpy_free_xmethod_worker_data): Remove.
9824 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9825 (gdbpy_get_xmethod_arg_types): Remove.
9826 (gdbpy_get_xmethod_result_type): Remove.
9827 (gdbpy_invoke_xmethod): Remove.
9828 * python/python.c (python_extension_ops): Remove obsolete
9831 2018-01-05 Pedro Alves <palves@redhat.com>
9834 * common/signals-state-save-restore.c
9835 (save_original_signals_state): New parameter 'quiet'. Warn if we
9836 find a custom handler preinstalled, instead of internal erroring.
9837 But only warn if !quiet.
9838 * common/signals-state-save-restore.h
9839 (save_original_signals_state): New parameter 'quiet'.
9840 * main.c (captured_main_1): Move save_original_signals_state call
9841 after option handling, and pass QUIET.
9843 2018-01-05 Pedro Alves <palves@redhat.com>
9845 * spu-tdep.c (spu_catch_start): Pass
9846 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9848 2018-01-05 Pedro Alves <palves@redhat.com>
9851 * ada-lang.c (literal_symbol_name_matcher): New function.
9852 (ada_get_symbol_name_matcher): Use it for
9853 symbol_name_match_type::SEARCH_NAME.
9854 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9855 it down instead of assuming symbol_name_match_type::FULL.
9856 * block.h (block_lookup_symbol): New parameter 'match_type'.
9857 * c-valprint.c (print_unpacked_pointer): Use
9858 lookup_symbol_search_name instead of lookup_symbol.
9859 * compile/compile-object-load.c (get_out_value_type): Pass down
9860 symbol_name_match_type::SEARCH_NAME.
9861 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9862 symbol_name_match_type::FULL.
9863 * cp-support.c (cp_get_symbol_name_matcher): Handle
9864 symbol_name_match_type::SEARCH_NAME.
9865 * infrun.c (insert_exception_resume_breakpoint): Use
9866 lookup_symbol_search_name.
9867 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9868 * psymtab.c (maintenance_check_psymtabs): Use
9869 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9870 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9872 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9873 if symbol_name_match_type::SEARCH_NAME.
9874 (lookup_symbol_in_language): Pass down
9875 symbol_name_match_type::FULL.
9876 (lookup_symbol_search_name): New.
9877 (lookup_language_this): Pass down
9878 symbol_name_match_type::SEARCH_NAME.
9879 (lookup_symbol_aux, lookup_local_symbol): New parameter
9880 'match_type'. Pass it down.
9881 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9882 (lookup_symbol_search_name): New declaration.
9883 (lookup_symbol_in_block): New 'match_type' parameter.
9885 2018-01-05 Pedro Alves <palves@redhat.com>
9888 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9890 (ada_lookup_symbol): Reimplement in terms of
9891 ada_lookup_symbol_list, bits factored out from
9892 ada_lookup_encoded_symbol.
9894 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9896 * ada-exp.y (write_object_renaming): When subscripting an array
9897 using a symbol as the index, pass the block in call to
9898 ada_lookup_encoded_symbol when looking that symbol up.
9900 2018-01-05 Jerome Guitton <guitton@adacore.com>
9902 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9905 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9907 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9908 the case where VALUE_LVAL (val0) is not lval_memory.
9910 2018-01-05 Xavier Roirand <roirand@adacore.com>
9912 * ada-valprint.c (print_optional_low_bound): Handle
9913 character-indexed array printing like boolean-indexed array
9916 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9918 * NEWS: Create a new section for the next release branch.
9919 Rename the section of the current branch, now that it has
9922 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9924 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9925 * version.in: Bump version to 8.1.50.DATE-git.
9927 2018-01-03 Xavier Roirand <roirand@adacore.com>
9929 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9931 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9933 (default_exception_support_info) <catch_handlers_sym>: Add field.
9934 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9935 (ada_exception_name_addr_1): Add "catch handlers" handling.
9936 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9938 (create_excep_cond_exprs) <ex>: Add parameter.
9939 (re_set_exception): Update create_excep_cond_exprs call.
9940 (print_it_exception, print_one_exception, print_mention_exception)
9941 (print_recreate_exception): Add "catch handler" handling.
9942 (allocate_location_catch_handlers, re_set_catch_handlers)
9943 (check_status_catch_handlers, print_it_catch_handlers)
9944 (print_one_catch_handlers, print_mention_catch_handlers)
9945 (print_recreate_catch_handlers): New function.
9946 (catch_handlers_breakpoint_ops): New variable.
9947 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9948 Add parameter. Add "catch handler" handling.
9949 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9950 Add "catch handler" handling.
9951 (ada_exception_catchpoint_cond_string): Add "catch handler"
9953 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9955 (catch_ada_handlers_command): New function.
9956 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9957 operations structure.
9958 (_initialize_ada_language): Add "catch handlers" command entry.
9959 * NEWS: Document "catch handlers" feature.
9961 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9963 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9964 account when creating the array type of the slice.
9965 (ada_value_slice): Likewise.
9967 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9969 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9971 (create_array_type_with_stride): Add byte_stride_prop parameter.
9972 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9973 New parameter. Update all callers in this file.
9974 (array_type_has_dynamic_stride): New function.
9975 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9976 of arrays with dynamic byte strides.
9977 * dwarf2read.c (read_array_type): Add support for dynamic
9978 DW_AT_byte_stride attributes.
9980 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9982 * dwarf2read.c (read_unspecified_type): Treat
9983 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9985 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9987 Update copyright year range in all GDB files.
9989 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9991 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9992 and gdb/testsuite/gdb.base/step-line.c.
9994 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9996 * copyright.py (main): Dump the contents of
9997 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9998 even if BY_HAND is empty.
10000 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10002 * top.c (print_gdb_version): Update Copyright year in version
10005 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10007 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10009 For older changes see ChangeLog-2017.
10015 version-control: never