1 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
7 Jan Kratochvil <jan.kratochvil@redhat.com>
8 Paul Fertser <fercerpav@gmail.com>
9 Tsutomu Seki <sekiriki@gmail.com>
10 Pedro Alves <palves@redhat.com>
12 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13 'unittests/parse-connection-spec-selftests.c'.
14 (COMMON_SFILES): Add 'common/netstuff.c'.
15 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
16 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
17 * common/netstuff.c: New file.
18 * common/netstuff.h: New file.
19 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
20 (wait_for_connect): Update comment. New parameter
21 'gdb::optional<int> sock' instead of 'struct serial *scb'.
22 Use 'sock' directly instead of 'scb->fd'.
23 (try_connect): New function, with code from 'net_open'.
24 (net_open): Rewrite main loop to deal with multiple
25 sockets/addresses. Handle IPv6-style hostnames; implement
26 support for IPv6 connections.
27 * unittests/parse-connection-spec-selftests.c: New file.
29 2018-07-11 Pedro Alves <palves@redhat.com>
32 * remote.c (remote_target::remote_detach_pid): Call
35 2018-07-11 Pedro Alves <palves@redhat.com>
37 * h8300-tdep.c (h8300_gdbarch_init): Remove
38 set_gdbarch_ecoff_reg_to_regnum calls.
40 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
43 * c-typeprint.c (c_type_print_base_struct_union): Don't print
44 offsets/sizes for static members of a class/struct.
46 2018-07-11 Alan Hayward <alan.hayward@arm.com>
48 * target-descriptions.c (tdesc_register_bitsize): Rename.
49 * target-descriptions.h (tdesc_register_bitsize): Likewise.
50 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
51 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
53 2018-07-10 Tom Tromey <tom@tromey.com>
55 * breakpoint.c (moribund_locations): Now static and a
57 (breakpoint_init_inferior, moribund_breakpoint_here_p)
58 (build_bpstat_chain, update_global_location_list)
59 (breakpoint_retire_moribund): Update.
60 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
63 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
65 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
66 (riscv_register_reggroup_p): Use new function, remove unneeded
68 (riscv_push_dummy_call): Extend assert to compare against xlen or
69 flen based on register type.
71 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
73 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
75 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
77 * remote.c (show_hardware_watchpoint_limit): New function.
78 (show_hardware_watchpoint_length_limit): New function.
79 (show_hardware_breakpoint_limit): New function.
80 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
81 where appropriate, update help text.
83 2018-07-09 Tom Tromey <tom@tromey.com>
85 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
86 (CLIBS): Don't mention NAT_CLIBS.
88 2018-07-09 Tom Tromey <tom@tromey.com>
90 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
91 (LIBGDB_OBS, clean mostlyclean): Update.
92 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
94 2018-07-09 Tom Tromey <tom@tromey.com>
96 * Makefile.in (%.c: %.y): Use ECHO_YACC.
97 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
98 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
100 2018-07-09 Tom Tromey <tom@tromey.com>
102 * Makefile.in (ALLDEPFILES): Remove exec.c.
103 (COMMON_OBS): Remove exec.o.
104 (COMMON_SFILES): Add exec.c.
106 2018-07-09 Tom Tromey <tom@tromey.com>
108 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
110 2018-07-09 Tom Tromey <tom@tromey.com>
112 * Makefile.in (clean mostlyclean): Remove stamp-version.
113 (version.c): Depend on stamp-version.
114 (stamp-version): New rule, from version.c rule.
116 2018-07-09 Tom Tromey <tom@tromey.com>
118 * Makefile.in (init.c): Depend on stamp-init.
119 (stamp-init): New rule, from init.c rule.
120 (clean mostlyclean): Remove stamp-init.
122 2018-07-09 Tom Tromey <tom@tromey.com>
124 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
125 SUBDIR_GCC_COMPILE_SRCS.
127 2018-07-09 Tom Tromey <tom@tromey.com>
129 * Makefile.in (init.c): Remove some unused sed rules.
131 2018-07-09 Tom Tromey <tom@tromey.com>
133 * Makefile.in (TSOBS): Remove.
134 (INIT_FILES): Update.
135 (LIBGDB_OBS): Update.
136 (COMMON_SFILES): Add inflow.c.
137 (SFILES): Remove inflow.c.
139 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
141 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
143 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
145 * ia64-tdep.c (get_reg_name, get_fpreg_name, get_saveloc_name,
146 is_signal_frame_name, step_name, init_remote_name,
147 create_addr_space_name, destroy_addr_space_name,
148 search_unwind_table_name, find_dyn_list_name): Constify.
150 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
152 * darwin-nat.c (darwin_pthread_kill): New function.
153 (darwin_resume_thread): Use darwin_pthread_kill.
155 2018-07-05 Tom de Vries <tdevries@suse.de>
157 * macroexp.c (macro_buffer) <operator=>: New member function.
159 2018-07-04 Tom Tromey <tom@tromey.com>
161 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
163 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
165 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
166 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
170 2018-07-04 Joel Brobecker <brobecker@adacore.com>
172 * NEWS: Create a new section for the next release branch.
173 Rename the section of the current branch, now that it has
176 2018-07-04 Joel Brobecker <brobecker@adacore.com>
178 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
179 * version.in: Bump version to 8.2.50.DATE-git.
181 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
182 Pedro Alves <palves@redhat.com>
184 * linux-nat.c (linux_init_ptrace): Rename to ...
185 (linux_init_ptrace_procfs): ... this. Call
186 linux_proc_init_warnings.
187 (linux_nat_target::post_attach)
188 (linux_nat_target::post_startup_inferior): Adjust.
189 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
190 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
192 2018-07-04 Tom de Vries <tdevries@suse.de>
194 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
196 (read_comp_unit_head): ... here.
198 2018-07-03 Tom Tromey <tom@tromey.com>
200 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
201 (stop_tracing, tstatus_command)
202 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
203 (print_one_static_tracepoint_marker): Update.
204 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
206 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
208 (all_tracepoints, static_tracepoints_here): Return std::vector.
210 2018-07-03 Tom Tromey <tom@tromey.com>
212 * common/ptid.c (ptid_equal): Remove.
213 * common/ptid.h (ptid_equal): Don't declare.
214 * ada-tasks.c: Update.
215 * breakpoint.c: Update.
216 * common/agent.c: Update.
218 * darwin-nat-info.c: Update.
219 * darwin-nat.c: Update.
221 * dtrace-probe.c: Update.
222 * dummy-frame.c: Update.
223 * fbsd-nat.c: Update.
225 * gdbthread.h: Update.
227 * go32-nat.c: Update.
228 * inf-loop.c: Update.
229 * inf-ptrace.c: Update.
234 * linux-fork.c: Update.
235 * linux-nat.c: Update.
236 * linux-thread-db.c: Update.
237 * mi/mi-cmd-var.c: Update.
238 * mi/mi-interp.c: Update.
239 * mi/mi-main.c: Update.
240 * nto-procfs.c: Update.
241 * ppc-linux-tdep.c: Update.
243 * python/py-inferior.c: Update.
244 * python/py-record-btrace.c: Update.
245 * python/py-record.c: Update.
246 * ravenscar-thread.c: Update.
247 * regcache.c: Update.
248 * remote-sim.c: Update.
250 * sol-thread.c: Update.
253 * tui/tui-stack.c: Update.
255 * windows-nat.c: Update.
256 * windows-tdep.c: Update.
258 2018-07-03 Tom Tromey <tom@tromey.com>
260 * common/ptid.c (ptid_match): Remove.
261 * common/ptid.h (ptid_match): Don't declare.
262 * fbsd-nat.c: Update.
265 * linux-nat.c: Update.
266 * record-btrace.c: Update.
267 * regcache.c: Update.
270 2018-07-03 Tom Tromey <tom@tromey.com>
272 * common/ptid.c (ptid_tid_p): Remove.
273 * common/ptid.h (ptid_tid_p): Don't declare.
274 * sol-thread.c: Update.
276 2018-07-03 Tom Tromey <tom@tromey.com>
278 * common/ptid.c (ptid_lwp_p): Remove.
279 * common/ptid.h (ptid_lwp_p): Don't declare.
280 * fbsd-nat.c: Update.
281 * linux-nat.c: Update.
282 * nat/linux-procfs.c: Update.
283 * nat/x86-linux-dregs.c: Update.
284 * sol-thread.c: Update.
286 2018-07-03 Tom Tromey <tom@tromey.com>
288 * common/ptid.c (ptid_is_pid): Remove.
289 * common/ptid.h (ptid_is_pid): Don't declare.
291 * linux-nat.c: Update.
292 * mi/mi-interp.c: Update.
296 2018-07-03 Tom Tromey <tom@tromey.com>
298 * common/ptid.c (ptid_get_tid): Remove.
299 * common/ptid.h (ptid_get_tid): Don't declare.
300 * ada-tasks.c: Update.
301 * aix-thread.c: Update.
302 * bsd-uthread.c: Update.
303 * darwin-nat.c: Update.
304 * fbsd-nat.c: Update.
305 * i386-darwin-nat.c: Update.
307 * linux-tdep.c: Update.
308 * nto-procfs.c: Update.
309 * ppc-ravenscar-thread.c: Update.
310 * python/py-infthread.c: Update.
311 * ravenscar-thread.c: Update.
312 * sol-thread.c: Update.
313 * sparc-ravenscar-thread.c: Update.
314 * windows-nat.c: Update.
316 2018-07-03 Tom Tromey <tom@tromey.com>
318 * common/ptid.c (ptid_get_lwp): Remove.
319 * common/ptid.h (ptid_get_lwp): Don't declare.
320 * aarch64-linux-nat.c: Update.
321 * ada-tasks.c: Update.
322 * aix-thread.c: Update.
323 * amd64-linux-nat.c: Update.
324 * arm-linux-nat.c: Update.
326 * fbsd-nat.c: Update.
327 * fbsd-tdep.c: Update.
329 * i386-cygwin-tdep.c: Update.
330 * i386-gnu-nat.c: Update.
331 * i386-linux-nat.c: Update.
332 * ia64-linux-nat.c: Update.
333 * inf-ptrace.c: Update.
335 * linux-fork.c: Update.
336 * linux-nat.c: Update.
337 * linux-tdep.c: Update.
338 * linux-thread-db.c: Update.
339 * mips-linux-nat.c: Update.
340 * nat/aarch64-linux-hw-point.c: Update.
341 * nat/aarch64-linux.c: Update.
342 * nat/linux-btrace.c: Update.
343 * nat/linux-osdata.c: Update.
344 * nat/linux-procfs.c: Update.
345 * nat/x86-linux-dregs.c: Update.
346 * obsd-nat.c: Update.
347 * ppc-fbsd-nat.c: Update.
348 * ppc-linux-nat.c: Update.
350 * python/py-infthread.c: Update.
351 * ravenscar-thread.c: Update.
353 * s390-linux-nat.c: Update.
354 * sol-thread.c: Update.
355 * sol2-tdep.c: Update.
356 * spu-linux-nat.c: Update.
357 * x86-linux-nat.c: Update.
358 * xtensa-linux-nat.c: Update.
360 2018-07-03 Tom Tromey <tom@tromey.com>
362 * common/ptid.c (ptid_get_pid): Remove.
363 * common/ptid.h (ptid_get_pid): Don't declare.
364 * aarch64-linux-nat.c: Update.
365 * ada-lang.c: Update.
366 * aix-thread.c: Update.
367 * alpha-bsd-nat.c: Update.
368 * amd64-fbsd-nat.c: Update.
369 * amd64-linux-nat.c: Update.
370 * arm-linux-nat.c: Update.
371 * arm-nbsd-nat.c: Update.
373 * break-catch-syscall.c: Update.
374 * breakpoint.c: Update.
375 * bsd-uthread.c: Update.
378 * darwin-nat.c: Update.
379 * fbsd-nat.c: Update.
380 * fbsd-tdep.c: Update.
383 * hppa-nbsd-nat.c: Update.
384 * hppa-obsd-nat.c: Update.
385 * i386-fbsd-nat.c: Update.
386 * ia64-linux-nat.c: Update.
387 * inf-ptrace.c: Update.
389 * inferior.c: Update.
390 * inferior.h: Update.
393 * linux-fork.c: Update.
394 * linux-nat.c: Update.
395 * linux-tdep.c: Update.
396 * linux-thread-db.c: Update.
397 * m68k-bsd-nat.c: Update.
398 * mi/mi-interp.c: Update.
399 * mi/mi-main.c: Update.
400 * mips-linux-nat.c: Update.
401 * mips-nbsd-nat.c: Update.
402 * mips64-obsd-nat.c: Update.
403 * nat/aarch64-linux-hw-point.c: Update.
404 * nat/aarch64-linux.c: Update.
405 * nat/linux-btrace.c: Update.
406 * nat/linux-osdata.c: Update.
407 * nat/linux-procfs.c: Update.
408 * nat/x86-linux-dregs.c: Update.
409 * nto-procfs.c: Update.
410 * obsd-nat.c: Update.
411 * ppc-linux-nat.c: Update.
412 * ppc-nbsd-nat.c: Update.
413 * ppc-obsd-nat.c: Update.
414 * proc-service.c: Update.
416 * python/py-inferior.c: Update.
417 * python/py-infthread.c: Update.
418 * ravenscar-thread.c: Update.
420 * remote-sim.c: Update.
422 * rs6000-nat.c: Update.
423 * s390-linux-nat.c: Update.
424 * sh-nbsd-nat.c: Update.
425 * sol-thread.c: Update.
426 * sparc-nat.c: Update.
427 * sparc64-tdep.c: Update.
428 * spu-linux-nat.c: Update.
429 * spu-tdep.c: Update.
430 * target-debug.h: Update.
433 * tid-parse.c: Update.
434 * tracefile-tfile.c: Update.
435 * vax-bsd-nat.c: Update.
436 * windows-nat.c: Update.
437 * x86-linux-nat.c: Update.
440 2018-07-03 Tom Tromey <tom@tromey.com>
442 * common/ptid.c (pid_to_ptid): Remove.
443 * common/ptid.h (pid_to_ptid): Don't declare.
444 * aix-thread.c: Update.
445 * arm-linux-nat.c: Update.
446 * common/ptid.c: Update.
447 * common/ptid.h: Update.
450 * darwin-nat.c: Update.
451 * fbsd-nat.c: Update.
452 * fork-child.c: Update.
454 * go32-nat.c: Update.
455 * inf-ptrace.c: Update.
457 * inferior.c: Update.
459 * linux-fork.c: Update.
460 * linux-nat.c: Update.
461 * nat/aarch64-linux-hw-point.c: Update.
462 * nat/fork-inferior.c: Update.
463 * nat/x86-linux-dregs.c: Update.
464 * nto-procfs.c: Update.
465 * obsd-nat.c: Update.
467 * progspace.c: Update.
469 * rs6000-nat.c: Update.
470 * s390-linux-nat.c: Update.
471 * sol-thread.c: Update.
472 * spu-linux-nat.c: Update.
475 * tracefile-tfile.c: Update.
476 * windows-nat.c: Update.
478 2018-07-03 Tom Tromey <tom@tromey.com>
480 * common/ptid.h (ptid_build): Don't declare.
481 * common/ptid.c (ptid_build): Remove.
482 * aix-thread.c: Update.
484 * bsd-uthread.c: Update.
485 * common/agent.c: Update.
486 * common/ptid.c: Update.
487 * common/ptid.h: Update.
489 * darwin-nat.c: Update.
490 * fbsd-nat.c: Update.
492 * linux-fork.c: Update.
493 * linux-nat.c: Update.
494 * linux-thread-db.c: Update.
495 * nat/linux-osdata.c: Update.
496 * nat/linux-procfs.c: Update.
497 * nto-procfs.c: Update.
498 * obsd-nat.c: Update.
499 * proc-service.c: Update.
501 * ravenscar-thread.c: Update.
502 * remote-sim.c: Update.
504 * sol-thread.c: Update.
506 * windows-nat.c: Update.
508 2018-07-03 Tom Tromey <tom@tromey.com>
510 * infrun.c (follow_exec): Use exit_inferior_silent.
511 * inferior.c (exit_inferior_num_silent): Remove.
512 * inferior.h (exit_inferior_num_silent): Don't declare.
514 2018-07-03 Tom Tromey <tom@tromey.com>
517 * darwin-nat.c (darwin_attach_pid): Reset inferior and
518 inferior_ptid on error.
520 2018-07-02 Maciej W. Rozycki <macro@mips.com>
521 Simon Marchi <simon.marchi@polymtl.ca>
524 * disasm.h (gdb_disassembler): Add
525 `m_disassembler_options_holder'. member
526 * disasm.c (get_all_disassembler_options): New function.
527 (gdb_disassembler::gdb_disassembler): Use it.
528 (gdb_buffered_insn_length_init_dis): Likewise.
529 (gdb_buffered_insn_length): Adjust accordingly.
530 (set_disassembler_options): Handle options with arguments.
531 (show_disassembler_options_sfunc): Likewise. Add a leading new
532 line if showing options with descriptions.
533 (disassembler_options_completer): Adapt to using the
534 `disasm_options_and_args_t' structure.
535 * mips-tdep.c (mips_disassembler_options): New variable.
536 (mips_disassembler_options_o32): Likewise.
537 (mips_disassembler_options_n32): Likewise.
538 (mips_disassembler_options_n64): Likewise.
539 (gdb_print_insn_mips): Don't set `disassembler_options'.
540 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
542 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
543 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
544 `gdbarch_disassembler_options_implicit' and
545 `gdbarch_valid_disassembler_options'.
546 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
547 `disasm_options_and_args_t' structure.
548 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
550 (valid_disassembler_options): Switch from `disasm_options_t' to
551 the `disasm_options_and_args_t' structure.
552 * NEWS: Document `set disassembler-options' support for the MIPS
554 * gdbarch.h: Regenerate.
555 * gdbarch.c: Regenerate.
557 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
559 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
561 2018-06-29 Joel Brobecker <brobecker@adacore.com>
563 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
564 parameter in call to amd64_target_description.
565 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
566 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
567 (amd64fbsd_init_abi): Likewise.
568 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
569 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
570 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
571 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
573 2018-06-29 Pedro Alves <palves@redhat.com>
575 * gdb/amd64-tdep.h (amd64_create_target_description): Add
576 "segments" parameter.
577 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
578 (_initialize_amd64_tdep): Update call to
579 amd64_create_target_description.
580 (amd64_target_description): Add "segments" parameter. Adjust
581 the implementation to use it.
582 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
583 call to amd64_create_target_description.
584 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
585 * gdb/arch/amd64.h (amd64_create_target_description): Add
587 * gdb/arch/amd64.c (amd64_create_target_description): Add
588 "segments" parameter. Call create_feature_i386_64bit_segments
589 only if SEGMENTS is true.
590 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
591 call to amd64_create_target_description.
593 2018-06-29 Pedro Alves <palves@redhat.com>
595 * thread.c (thread_target_id_str): New, factored out from ...
596 (print_thread_info_1): ... here. Use it to compute the max
597 "Target Id" column width.
599 2018-06-29 Pedro Alves <palves@redhat.com>
601 * remote.c (remote_target::extra_thread_info): Delete
602 'display_buf' and 'n' locals. from the cache, regardless of
603 packet mechanims is in use. Use cache for qThreadExtra and qP
606 2018-06-29 Pedro Alves <palves@redhat.com>
608 * blockframe.c (find_pc_sect_containing_function): New function.
609 * breakpoint.c (print_breakpoint_location): Don't call
610 find_pc_sect_function.
611 * linespec.c (create_sals_line_offset): Record the location's
613 * linespec.c (convert_address_location_to_sals): Fill in sal's
614 symbol with find_pc_sect_containing_function.
615 * symtab.c (find_function_start_sal): Rename to ...
616 (find_function_start_sal_1): ... this.
617 (find_function_start_sal): Reimplement as wrapper around
618 find_function_start_sal_1, and use
619 find_pc_sect_containing_function to fill in the sal's symbol.
620 (find_function_start_sal(symbol*, bool)): Adjust.
621 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
623 (find_pc_sect_containing_function): Declare.
625 2018-06-29 Pedro Alves <palves@redhat.com>
627 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
628 true if the the location has no symbol.
630 2018-06-28 Tom Tromey <tom@tromey.com>
632 * NEWS: Mention --enable-codesign.
633 * silent-rules.mk (ECHO_SIGN): New variable.
634 * configure.ac: Add --enable-codesign.
635 * configure: Rebuild.
636 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
637 (gdb$(EXEEXT)): Optionally invoke codesign.
639 2018-06-28 Pedro Alves <palves@redhat.com>
641 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
643 (switch_to_thread_no_regs): Adjust comment.
644 * infcmd.c (stop_pc): Delete.
645 (post_create_inferior, info_program_command): Replace references
646 to stop_pc with references to thread_info->suspend.stop_pc.
647 * inferior.h (stop_pc): Delete declaration.
648 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
649 (handle_inferior_event_1, handle_signal_stop)
650 (process_event_stop_test, keep_going_stepped_thread)
651 (handle_step_into_function, handle_step_into_function_backward)
652 (print_stop_location): Replace references to stop_pc with
653 references to thread_info->suspend.stop_pc.
654 (struct infcall_suspend_state) <stop_pc>: Delete field.
655 (save_infcall_suspend_state, restore_infcall_suspend_state):
656 Remove references to inf_stat->stop_pc.
657 * linux-fork.c (fork_load_infrun_state): Likewise.
658 * record-btrace.c (record_btrace_set_replay): Likewise.
659 * record-full.c (record_full_goto_entry): Likewise.
660 * remote.c (print_one_stopped_thread): Likewise.
661 * target.c (target_resume): Extend comment.
662 * thread.c (set_executing_thread): New.
663 (set_executing): Use it.
664 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
665 Remove references to stop_pc.
667 2018-06-28 Pedro Alves <palves@redhat.com>
669 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
670 Moving fetching stop_pc until after ecs->event_thread is refreshed.
672 2018-06-28 Tom Tromey <tom@tromey.com>
674 * coffread.c (coff_symfile_finish): Update.
675 * xcoffread.c (xcoff_symfile_finish): Update.
676 * elfread.c (elf_symfile_finish): Update.
677 * symfile.h (dwarf2_free_objfile): Don't declare.
678 * dwarf2read.c (_initialize_dwarf2_read): Use
679 register_objfile_data_with_cleanup.
680 (dwarf2_free_objfile): Now static. Change signature.
682 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
684 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
685 option "-o" to add-symbol-file-load to add an offset to each
686 section's load address.
687 * symfile.c (set_objfile_default_section_offset): New function.
689 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
691 * symfile.c (add_symbol_file_command): Make sure that sections
692 with the same name are sorted in the same order.
694 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
696 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
697 require the second argument. If omitted, load sections at the
698 addresses specified in the file.
700 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
702 * symfile.c (symbol_file_command, symbol_file_add_main_1)
703 (_initialize_symfile): Add option "-o" to symbol-file to add an
704 offset to each section of the symbol file.
706 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
708 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
710 2018-06-27 Tom Tromey <tom@tromey.com>
712 * stack.c (_initialize_stack): Update "func" help text.
714 2018-06-27 Tom Tromey <tom@tromey.com>
716 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
718 (unwind_infopy_str, pyuw_create_unwind_info)
719 (unwind_infopy_add_saved_register, pyuw_sniffer)
720 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
722 (struct saved_reg): Add constructor.
723 <value>: Now a gdbpy_ref<>.
725 2018-06-27 Tom Tromey <tom@tromey.com>
727 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
729 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
731 * gdb-gdb.py.in: Format using autopep8.
733 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
735 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
736 (type_lookup_function): Recognize CORE_ADDR values.
738 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
740 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
743 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
745 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
748 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
750 * gdb-gdb.py: Move to...
751 * gdb-gdb.py.in: ... here.
752 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
753 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
755 (distclean): Remove gdb-gdb.py when cleaning.
756 (gdb-gdb.py, gdb-gdb.gdb): New rules.
757 * configure: Re-generate.
759 2018-06-27 Pedro Alves <palves@redhat.com>
761 * proc-service.c (get_ps_regcache): New.
762 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
763 (ps_lsetfpregs): Use it.
765 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
768 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
769 (dwarf_decode_lines_1): Adjust.
771 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
773 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
775 <info_proc>: Likewise.
777 2018-06-26 Joel Brobecker <brobecker@adacore.com>
779 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
780 to windows_fetch_one_register, and only handle the case of
781 fetching one register. Move the code that reloads the context
782 and iterates over all registers if R is negative to...
783 (windows_nat_target::fetch_registers): ... here.
784 (do_windows_store_inferior_registers): Rename to
785 windows_store_one_register, and only handle the case of storing
786 one register. Move the code that handles the case where r is
788 (windows_nat_target::store_registers) ... here.
790 2018-06-26 Tom Tromey <tom@tromey.com>
793 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
794 * rust-lang.c (rust_print_struct_def): Add podata parameter.
796 (rust_internal_print_type): Add podata parameter.
797 (rust_print_type): Update.
799 2018-06-26 Tom Tromey <tom@tromey.com>
801 * typeprint.h (struct print_offset_data) <update, finish,
802 maybe_print_hole>: New methods.
803 <indentation>: New constant.
804 * typeprint.c (print_offset_data::indentation): Define.
805 (print_offset_data::maybe_print_hole, print_offset_data::update)
806 (print_offset_data::finish): Move from c-typeprint.c and rename.
807 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
808 (print_spaces_filtered_with_print_options): Update.
809 (c_print_type_union_field_offset, maybe_print_hole)
810 (c_print_type_struct_field_offset): Move to typeprint.c and
812 (c_type_print_base_struct_union): Update.
814 2018-06-25 Pedro Alves <palves@redhat.com>
816 * gdbthread.h (thread_info_ref, delete_thread)
817 (delete_thread_silent, first_thread_of_inferior)
818 (any_thread_of_inferior, switch_to_thread)
819 (enable_thread_stack_temporaries)
820 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
821 (get_last_thread_stack_temporary)
822 (value_in_thread_stack_temporaries, can_access_registers_thread):
823 Spell out "struct thread_info" instead of just "thread_info".
824 * inferior.h (notice_new_inferior): Likewise.
826 2018-06-25 Pedro Alves <palves@redhat.com>
828 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
829 pass thread_info pointer to delete_thread.
830 (windows_nat_target::detach): Pass inferior pointer to
832 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
834 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
835 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
836 and pass a thread_info pointer to delete_thread.
837 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
838 pass thread_info pointer to delete_thread.
839 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
840 delete_thread_silent call.
841 * procfs.c (procfs_target::detach): Pass inferior pointer to
843 (procfs_target::wait): Pass thread_info pointer to delete_thread.
844 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
845 delete_thread_silent call.
846 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
847 pass thread_info pointer to delete_thread.
848 (windows_nat_target::detach): Pass inferior pointer to
851 2018-06-22 Alan Hayward <alan.hayward@arm.com>
853 * regcache.c (readable_regcache::read_part): Fix asserts.
854 (reg_buffer::raw_collect_part): New function.
855 (regcache::write_part): Fix asserts.
856 (reg_buffer::raw_supply_part): New function.
857 (regcache::transfer_regset_register): New helper function.
858 (regcache::transfer_regset): Call new functions.
859 (regcache_supply_regset): Use gdb_byte*.
860 (regcache::supply_regset): Likewise.
861 (regcache_collect_regset): Likewise.
862 (regcache::collect_regset): Likewise.
863 * regcache.h (reg_buffer::raw_collect_part): New declaration.
864 (reg_buffer::raw_supply_part): Likewise.
865 (regcache::transfer_regset_register): Likewise.
866 (regcache::transfer_regset): Use gdb_byte*.
868 2018-06-22 Alan Hayward <alan.hayward@arm.com>
870 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
872 2018-06-21 Pedro Alves <palves@redhat.com>
874 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
875 instead of a ptid_t. All callers adjusted.
876 * ada-tasks.c (ada_get_task_number): Likewise. All callers
878 (print_ada_task_info, display_current_task_id, task_command_1):
880 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
882 (breakpoint_kind): Adjust.
883 (remove_breakpoints_pid): Rename to ...
884 (remove_breakpoints_inf): ... this. Adjust to take an inferior
885 pointer. All callers adjusted.
886 (bpstat_clear_actions): Use inferior_thread.
887 (get_bpstat_thread): New.
888 (bpstat_do_actions): Use it.
889 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
890 to take a thread_info pointer. All callers adjusted.
891 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
892 (breakpoint_re_set_thread): Use inferior_thread.
893 * breakpoint.h (struct inferior): Forward declare.
894 (bpstat_stop_status): Update.
895 (remove_breakpoints_pid): Delete.
896 (remove_breakpoints_inf): New.
897 * bsd-uthread.c (bsd_uthread_target::wait)
898 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
899 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
900 (maint_btrace_packet_history_cmd)
901 (maint_btrace_clear_packet_history_cmd): Adjust.
902 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
904 * cli/cli-interp.c: Include "inferior.h".
905 * common/refcounted-object.h (struct
906 refcounted_object_ref_policy): New.
907 * compile/compile-object-load.c: Include gdbthread.h.
908 (store_regs): Use inferior_thread.
909 * corelow.c (core_target::close): Use current_inferior.
910 (core_target_open): Adjust to use first_thread_of_inferior and use
911 the current inferior.
912 * ctf.c (ctf_target::close): Adjust to use current_inferior.
913 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
914 <thread>: ... this new field. All references adjusted.
915 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
916 Take a thread_info pointer instead of a ptid_t.
917 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
918 (dummy_frame_discard, register_dummy_frame_dtor): Take a
919 thread_info pointer instead of a ptid_t.
920 * elfread.c: Include "inferior.h".
921 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
923 * eval.c (evaluate_subexp): Likewise.
924 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
926 * gdb_proc_service.h (struct thread_info): Forward declare.
927 (struct ps_prochandle) <ptid>: Delete, replaced by ...
928 <thread>: ... this new field. All references adjusted.
929 * gdbarch.h, gdbarch.c: Regenerate.
930 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
931 'thread' parameter. All implementations and callers adjusted.
932 * gdbthread.h (thread_info) <set_running>: New method.
933 (delete_thread, delete_thread_silent): Take a thread_info pointer
935 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
936 (first_thread_of_process): Delete, replaced by ...
937 (first_thread_of_inferior): ... this new function. All callers
939 (any_live_thread_of_process): Delete, replaced by ...
940 (any_live_thread_of_inferior): ... this new function. All callers
942 (switch_to_thread, switch_to_no_thread): Declare.
943 (is_executing): Delete.
944 (enable_thread_stack_temporaries): Update comment.
945 <enable_thread_stack_temporaries>: Take a thread_info pointer
946 instead of a ptid_t. Incref the thread.
947 <~enable_thread_stack_temporaries>: Decref the thread.
950 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
951 (get_last_thread_stack_temporary)
952 (value_in_thread_stack_temporaries, can_access_registers_thread):
953 Take a thread_info pointer instead of a ptid_t. All callers
955 * infcall.c (get_call_return_value): Use inferior_thread.
956 (run_inferior_call): Work with thread pointers instead of ptid_t.
957 (call_function_by_hand_dummy): Work with thread pointers instead
958 of ptid_t. Use thread_info_ref.
959 * infcmd.c (proceed_thread_callback): Access thread's state
961 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
962 access thread's state directly.
963 (continue_command): Use inferior_thread.
964 (info_program_command): Use find_thread_ptid and access thread
966 (proceed_after_attach_callback): Use thread state directly.
967 (notice_new_inferior): Take a thread_info pointer instead of a
968 ptid_t. All callers adjusted.
969 (exit_inferior): Take an inferior pointer instead of a pid. All
971 (exit_inferior_silent): New.
972 (detach_inferior): Delete.
973 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
974 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
975 (detach_inferior_command, kill_inferior_command): Use
976 find_inferior_id instead of valid_gdb_inferior_id and
977 gdb_inferior_id_to_pid.
978 (inferior_command): Use inferior and thread pointers.
979 * inferior.h (struct thread_info): Forward declare.
980 (notice_new_inferior): Take a thread_info pointer instead of a
981 ptid_t. All callers adjusted.
982 (detach_inferior): Delete declaration.
983 (exit_inferior, exit_inferior_silent): Take an inferior pointer
984 instead of a pid. All callers adjusted.
985 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
986 (valid_gdb_inferior_id): Delete.
987 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
988 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
989 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
991 <inf>: ... this new field.
992 <step_ptid>: Delete, replaced by ...
993 <step_thread>: ... this new field.
994 (get_displaced_stepping_state): Take an inferior pointer instead
995 of a pid. All callers adjusted.
996 (displaced_step_in_progress_any_inferior): Adjust.
997 (displaced_step_in_progress_thread): Take a thread pointer instead
998 of a ptid_t. All callers adjusted.
999 (displaced_step_in_progress, add_displaced_stepping_state): Take
1000 an inferior pointer instead of a pid. All callers adjusted.
1001 (get_displaced_step_closure_by_addr): Adjust.
1002 (remove_displaced_stepping_state): Take an inferior pointer
1003 instead of a pid. All callers adjusted.
1004 (displaced_step_prepare_throw, displaced_step_prepare)
1005 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1006 All callers adjusted.
1007 (start_step_over): Adjust.
1008 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1009 displaced step queue.
1010 (do_target_resume): Adjust.
1011 (fetch_inferior_event): Use inferior_thread.
1012 (context_switch, get_inferior_stop_soon): Take an
1013 execution_control_state pointer instead of a ptid_t. All callers
1015 (switch_to_thread_cleanup): Delete.
1016 (stop_all_threads): Use scoped_restore_current_thread.
1017 * inline-frame.c: Include "gdbthread.h".
1018 (inline_state) <inline_state>: Take a thread pointer instead of a
1019 ptid_t. All callers adjusted.
1020 <ptid>: Delete, replaced by ...
1021 <thread>: ... this new field.
1022 (find_inline_frame_state): Take a thread pointer instead of a
1023 ptid_t. All callers adjusted.
1024 (skip_inline_frames, step_into_inline_frame)
1025 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1026 pointer instead of a ptid_t. All callers adjusted.
1027 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1028 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1029 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1031 * linux-nat.c (get_detach_signal): Likewise.
1032 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1033 (thread_db_notice_clone): Adjust.
1034 (thread_db_find_new_threads_silently)
1035 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1036 a thread pointer instead of a ptid_t. All callers adjusted.
1037 * mi/mi-cmd-var.c: Include "inferior.h".
1038 (mi_cmd_var_update_iter): Update to use thread pointers.
1039 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1041 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1043 (mi_output_running): ... this new function.
1044 (mi_on_resume_1): Adjust to use it.
1045 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1046 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1048 (interrupt_thread_callback): : Adjust to use thread and inferior
1050 * proc-service.c: Include "gdbthread.h".
1051 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1052 * progspace-and-thread.c: Include "inferior.h".
1053 * progspace.c: Include "inferior.h".
1054 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1055 hold a reference to an inferior_object.
1056 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1058 * python/py-inferior.c (struct inferior_object): Give the type a
1059 tag name instead of a typedef.
1060 (python_on_normal_stop): No need to check if the current thread is
1062 (inferior_to_inferior_object): Change return type to
1063 inferior_object. All callers adjusted.
1064 (find_thread_object): Delete, bits factored out to ...
1065 (thread_to_thread_object): ... this new function.
1066 * python/py-infthread.c (create_thread_object): Use
1067 inferior_to_inferior_object.
1068 (thpy_is_stopped): Use thread pointer directly.
1069 (gdbpy_selected_thread): Use inferior_thread.
1070 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1071 field, replaced with ...
1072 <thread>: ... this new field. All users adjusted.
1073 (btpy_insn_or_gap_new): Drop const.
1074 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1076 * python/py-record.c: Include "gdbthread.h".
1077 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1078 a ptid_t. All callers adjusted.
1079 (gdbpy_current_recording): Use inferior_thread.
1080 * python/py-record.h (recpy_record_object) <ptid>: Delete
1081 field, replaced with ...
1082 <thread>: ... this new field. All users adjusted.
1083 (recpy_element_object) <ptid>: Delete
1084 field, replaced with ...
1085 <thread>: ... this new field. All users adjusted.
1086 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1087 a ptid_t. All callers adjusted.
1088 * python/py-threadevent.c: Include "gdbthread.h".
1089 (get_event_thread): Use thread_to_thread_object.
1090 * python/python-internal.h (struct inferior_object): Forward
1092 (find_thread_object, find_inferior_object): Delete declarations.
1093 (thread_to_thread_object, inferior_to_inferior_object): New
1095 * record-btrace.c: Include "inferior.h".
1096 (require_btrace_thread): Use inferior_thread.
1097 (record_btrace_frame_sniffer)
1098 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1099 (get_thread_current_frame): Use scoped_restore_current_thread and
1101 (get_thread_current_frame): Use thread pointer directly.
1102 (record_btrace_replay_at_breakpoint): Use thread's inferior
1104 * record-full.c: Include "inferior.h".
1105 * regcache.c: Include "gdbthread.h".
1106 (get_thread_arch_regcache): Use the inferior's address space
1108 (get_thread_regcache, registers_changed_thread): New.
1109 * regcache.h (get_thread_regcache(thread_info *thread)): New
1111 (registers_changed_thread): New.
1112 (remote_target) <remote_detach_1>: Swap order of parameters.
1113 (remote_add_thread): <remote_add_thread>: Return the new thread.
1114 (get_remote_thread_info(ptid_t)): New overload.
1115 (remote_target::remote_notice_new_inferior): Use thread pointers
1117 (remote_target::process_initial_stop_replies): Use
1118 thread_info::set_running.
1119 (remote_target::remote_detach_1, remote_target::detach)
1120 (extended_remote_target::detach): Adjust.
1121 * stack.c (frame_show_address): Use inferior_thread.
1122 * target-debug.h (target_debug_print_thread_info_pp): New.
1123 * target-delegates.c: Regenerate.
1124 * target.c (default_thread_address_space): Delete.
1125 (memory_xfer_partial_1): Use current_inferior.
1126 (target_detach): Use current_inferior.
1127 (target_thread_address_space): Delete.
1128 (generic_mourn_inferior): Use current_inferior.
1129 * target.h (struct target_ops) <thread_address_space>: Delete.
1130 (target_thread_address_space): Delete.
1131 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1133 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1134 thread pointer instead of a ptid_t. Adjust all callers.
1135 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1136 (first_thread_of_process): Delete, replaced by ...
1137 (first_thread_of_inferior): ... this new function. All callers
1139 (any_thread_of_process): Rename to ...
1140 (any_thread_of_inferior): ... this, and take an inferior pointer.
1141 (any_live_thread_of_process): Rename to ...
1142 (any_live_thread_of_inferior): ... this, and take an inferior
1144 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1145 (value_in_thread_stack_temporaries)
1146 (get_last_thread_stack_temporary): Take a thread pointer instead
1147 of a ptid_t. Adjust all callers.
1148 (thread_info::set_running): New.
1149 (validate_registers_access): Use inferior_thread.
1150 (can_access_registers_ptid): Rename to ...
1151 (can_access_registers_thread): ... this, and take a thread
1153 (print_thread_info_1): Adjust to compare thread pointers instead
1155 (switch_to_no_thread, switch_to_thread): Make extern.
1156 (scoped_restore_current_thread::~scoped_restore_current_thread):
1157 Use m_thread pointer directly.
1158 (scoped_restore_current_thread::scoped_restore_current_thread):
1159 Use inferior_thread.
1160 (thread_command): Use thread pointer directly.
1161 (thread_num_make_value_helper): Use inferior_thread.
1162 * top.c (execute_command): Use inferior_thread.
1163 * tui/tui-interp.c: Include "inferior.h".
1164 * varobj.c (varobj_create): Use inferior_thread.
1165 (value_of_root_1): Use find_thread_global_id instead of
1166 global_thread_id_to_ptid.
1168 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1170 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1172 (regcache::write_part): Likewise.
1173 (readable_regcache::cooked_read_part): Update comment.
1174 (readable_regcache::cooked_write_part): Likewise.
1175 * regcache.h: (readable_regcache::read_part): Likewise.
1176 (regcache::write_part): Likewise.
1178 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1179 Dirk Schubert <dirk.schubert@arm.com>
1181 * aarch64-linux-nat.c (post_attach): New.
1182 (aarch64_linux_nat_target::post_attach): Override post_attach to
1183 record the number of hardware debug registers.
1185 2018-06-20 Tom Tromey <tom@tromey.com>
1187 * python/py-param.c (add_setshow_generic): Make parameters const.
1188 (parmpy_init): Update.
1190 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1192 * regcache.h (regcache_cooked_read_ftype): Rename to...
1193 (register_read_ftype): ...this, change type to function_view.
1194 (class reg_buffer) <save>: Remove src parameter.
1195 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1196 parameter non-const in first overload. Remove src parameter in
1198 * regcache.c (do_cooked_read): Remove.
1199 (readonly_detached_regcache::readonly_detached_regcache): Make
1200 parameter non-const, adjust call to other constructor.
1201 (reg_buffer::save): Remove src parameter.
1202 * frame.c (do_frame_register_read): Remove.
1203 (frame_save_as_regcache): Use lambda function.
1204 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1205 parameter to ppu2spu_data *.
1206 (ppu2spu_sniffer): Use lambda function.
1208 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1210 * record-full.c (record_full_target::insert_breakpoint): Remove
1211 "struct" keyword, add const.
1213 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1215 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1216 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1217 * configure.ac: Remove AC_PREREQ, add missing quoting.
1218 * gnulib/configure.ac: Modernize usage of
1219 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1220 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1221 (AUTOMAKE_VERSION): Bump to 1.15.1.
1222 * configure: Re-generate.
1223 * config.in: Re-generate.
1224 * aclocal.m4: Re-generate.
1225 * gnulib/aclocal.m4: Re-generate.
1226 * gnulib/config.in: Re-generate.
1227 * gnulib/configure: Re-generate.
1228 * gnulib/import/Makefile.in: Re-generate.
1230 2018-06-19 Pedro Alves <palves@redhat.com>
1232 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1233 (lookup_minimal_symbol_by_pc_section): ... here with
1234 gdb_assert_not_reached added.
1236 2018-06-19 Pedro Alves <palves@redhat.com>
1238 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1239 parameter with a block parameter. Compare location's block symbol
1240 with the frame's block instead of addresses.
1241 (skip_inline_frames): Pass the current block instead of the
1242 frame's address. Break out as soon as we determine the frame
1243 should not be skipped.
1245 2018-06-18 Tom Tromey <tom@tromey.com>
1247 * solib-aix.c (solib_aix_get_section_offsets): Return
1249 (solib_aix_solib_create_inferior_hook): Update.
1251 2018-06-18 Tom Tromey <tom@tromey.com>
1253 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1255 2018-06-18 Tom Tromey <tom@tromey.com>
1257 * solib-frv.c (frv_relocate_main_executable): Use
1259 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1262 2018-06-18 Tom Tromey <tom@tromey.com>
1264 * objfiles.h (inhibit_section_map_updates): Update.
1265 (resume_section_map_updates, resume_section_map_updates_cleanup):
1267 * solib-svr4.c (svr4_handle_solib_event): Update.
1268 * objfiles.c (inhibit_section_map_updates): Return
1269 scoped_restore_tmpl<int>.
1270 (resume_section_map_updates, resume_section_map_updates_cleanup):
1273 2018-06-18 Tom Tromey <tom@tromey.com>
1275 * valprint.h (read_string): Update.
1276 * valprint.c (read_string): Change type of "buffer".
1277 (val_print_string): Update.
1278 * python/py-value.c (valpy_string): Update.
1279 * language.h (struct language_defn) <la_get_string>: Change
1281 (default_get_string, c_get_string): Update.
1282 * language.c (default_get_string): Change type of "buffer".
1283 * guile/scm-value.c (gdbscm_value_to_string): Update.
1284 * c-lang.c (c_get_string): Change type of "buffer".
1286 2018-06-18 Tom Tromey <tom@tromey.com>
1288 * ser-mingw.c (struct pipe_state_destroyer): New.
1289 (pipe_state_up): New typedef.
1290 (cleanup_pipe_state): Remove.
1291 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1293 2018-06-18 Tom Tromey <tom@tromey.com>
1295 * rust-lang.h (rust_yyerror): Don't declare.
1296 * rust-lang.c (rust_language_defn): Update.
1297 * rust-exp.y (yyerror): Now static.
1298 * parse.c (parse_exp_in_context_1): Update.
1299 * p-lang.h (p_yyerror): Don't declare.
1300 * p-lang.c (p_language_defn): Update.
1301 * p-exp.y (yyerror): Now static.
1302 * opencl-lang.c (opencl_language_defn): Update.
1303 * objc-lang.c (objc_language_defn): Update.
1304 * m2-lang.h (m2_yyerror): Don't declare.
1305 * m2-lang.c (m2_language_defn): Update.
1306 * m2-exp.y (yyerror): Now static.
1307 * language.h (struct language_defn) <la_error>: Remove.
1308 * language.c (unk_lang_error): Remove.
1309 (unknown_language_defn, auto_language_defn): Remove.
1310 * go-lang.h (go_yyerror): Don't declare.
1311 * go-lang.c (go_language_defn): Update.
1312 * go-exp.y (yyerror): Now static.
1313 * f-lang.h (f_yyerror): Don't declare.
1314 * f-lang.c (f_language_defn): Update.
1315 * f-exp.y (yyerror): Now static.
1316 * d-lang.h (d_yyerror): Don't declare.
1317 * d-lang.c (d_language_defn): Update.
1318 * d-exp.y (yyerror): Now static.
1319 * c-lang.h (c_yyerror): Don't declare.
1320 * c-lang.c (c_language_defn, cplus_language_defn)
1321 (asm_language_defn, minimal_language_defn): Update.
1322 * c-exp.y (yyerror): Now static.
1323 * ada-lang.h (ada_yyerror): Don't declare.
1324 * ada-lang.c (ada_language_defn): Update.
1325 * ada-exp.y (yyerror): Now static.
1327 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1329 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1330 (store_sveregs_to_thread): Likewise.
1331 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1332 (aarch64_linux_store_inferior_registers): Likewise.
1333 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1335 (aarch64_sve_regs_copy_to_regcache): Likewise.
1336 (aarch64_sve_regs_copy_from_regcache): Likewise.
1337 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1339 (aarch64_sve_regs_copy_to_regcache): Likewise.
1340 (aarch64_sve_regs_copy_from_regcache): Likewise.
1341 (sve_context): Structure from Linux headers.
1342 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1343 (SVE_SIG_ZREG_SIZE): Likewise.
1344 (SVE_SIG_PREG_SIZE): Likewise.
1345 (SVE_SIG_FFR_SIZE): Likewise.
1346 (SVE_SIG_REGS_OFFSET): Likewise.
1347 (SVE_SIG_ZREGS_OFFSET): Likewise.
1348 (SVE_SIG_ZREG_OFFSET): Likewise.
1349 (SVE_SIG_ZREGS_SIZE): Likewise.
1350 (SVE_SIG_PREGS_OFFSET): Likewise.
1351 (SVE_SIG_PREG_OFFSET): Likewise.
1352 (SVE_SIG_PREGS_SIZE): Likewise.
1353 (SVE_SIG_FFR_OFFSET): Likewise.
1354 (SVE_SIG_REGS_SIZE): Likewise.
1355 (SVE_SIG_CONTEXT_SIZE): Likewise.
1356 (SVE_PT_REGS_MASK): Likewise.
1357 (SVE_PT_REGS_FPSIMD): Likewise.
1358 (SVE_PT_REGS_SVE): Likewise.
1359 (SVE_PT_VL_INHERIT): Likewise.
1360 (SVE_PT_VL_ONEXEC): Likewise.
1361 (SVE_PT_REGS_OFFSET): Likewise.
1362 (SVE_PT_FPSIMD_OFFSET): Likewise.
1363 (SVE_PT_FPSIMD_SIZE): Likewise.
1364 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1365 (SVE_PT_SVE_PREG_SIZE): Likewise.
1366 (SVE_PT_SVE_FFR_SIZE): Likewise.
1367 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1368 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1369 (__SVE_SIG_TO_PT): Likewise.
1370 (SVE_PT_SVE_OFFSET): Likewise.
1371 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1372 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1373 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1374 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1375 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1376 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1377 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1378 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1379 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1380 (SVE_PT_SVE_SIZE): Likewise.
1381 (SVE_PT_SIZE): Likewise.
1382 (HAS_SVE_STATE): New define.
1384 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1386 * nat/aarch64-sve-linux-sigcontext.h: New file.
1387 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1389 (SVE_VQ_MIN): Likewise.
1390 (SVE_VQ_MAX): Likewise.
1391 (SVE_VL_MIN): Likewise.
1392 (SVE_VL_MAX): Likewise.
1393 (SVE_NUM_ZREGS): Likewise.
1394 (SVE_NUM_PREGS): Likewise.
1395 (sve_vl_valid): Likewise.
1396 (struct user_sve_header): Likewise.
1398 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1399 Richard Bunt <Richard.Bunt@arm.com>
1401 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1402 was requested by GDB.
1404 2018-06-15 Tom de Vries <tdevries@suse.de>
1406 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1408 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1410 * gnulib/update-gnulib.sh: Print expected versions of
1413 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1415 * arch-utils.c (default_type_align): Use type_length_units.
1416 * gdbtypes.c (type_align): Use type_length_units.
1418 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1420 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1421 of 'define' command.
1423 2018-06-14 Tom de Vries <tdevries@suse.de>
1426 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1427 get_no_prettyformat_print_options.
1429 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1431 * sparc-nat.h: Include target.h.
1432 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1433 <fetch_registers>: Remove this argument in function call.
1434 <store_registers>: Remove this argument in function call, remove
1436 <low_forget_process>: Call sparc64_forget_process instead of
1437 sparc_forget_process.
1439 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1441 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1442 (procfs_target::make_corefile_notes): Adjust to new
1443 target_read_alloc return type.
1445 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1446 Stephen Roberts <stephen.roberts@arm.com>
1449 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1450 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1451 Move should_notify_stop local into more inner scope.
1453 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1454 Stephen Roberts <stephen.roberts@arm.com>
1457 * infrun.c (resume_1): Add call to mark_async_event_handler.
1459 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1461 * infrun.c (do_target_wait): Change old version of $pc printed.
1463 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1465 * dwarf2read.c (read_index_from_section): Rename to...
1466 (read_gdb_index_from_section): ... this, update all callers.
1467 (dwarf2_read_index): Rename to...
1468 (dwarf2_read_gdb_index): ... this, update all callers.
1470 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1472 * gdb/hppa-linux-nat.c
1473 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1474 hppa_linux_nat_target::fetch_registers.
1476 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1478 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1479 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1480 (AARCH64_DWARF_SVE_FFR): Likewise.
1481 (AARCH64_DWARF_SVE_P0): Likewise.
1482 (AARCH64_DWARF_SVE_Z0): Likewise.
1484 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1486 * common/common-regcache.h (raw_compare): New function.
1487 * regcache.c (regcache::raw_compare): Likewise.
1488 * regcache.h (regcache::raw_compare): New declaration.
1490 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1492 * common/common-regcache.h (reg_buffer_common): New structure.
1493 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1494 (reg_buffer::raw_supply): Likewise.
1495 (reg_buffer::raw_supply_integer): Likewise.
1496 (reg_buffer::raw_supply_zeroed): Likewise.
1497 (reg_buffer::raw_collect): Likewise.
1498 (reg_buffer::raw_collect_integer): Likewise.
1499 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1500 (reg_buffer::raw_supply): Likewise.
1501 (reg_buffer::raw_supply_integer): Likewise.
1502 (reg_buffer::raw_supply_zeroed): Likewise.
1503 (reg_buffer::raw_collect): Likewise.
1504 (reg_buffer::raw_collect_integer): Likewise.
1506 2018-06-10 Tom Tromey <tom@tromey.com>
1508 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1509 (class remote_state) <stop_reply_queue>: Now std::vector.
1510 (remote_state::~remote_state)
1511 (remote_target::stop_reply_queue_length): Update.
1512 (struct queue_iter_param, remove_child_of_pending_fork)
1513 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1514 (check_pending_event_prevents_wildcard_vcont_callback)
1515 (remove_stop_reply_for_inferior)
1516 (remove_stop_reply_of_remote_state)
1517 (remote_notif_remove_once_on_match)
1518 (stop_reply_match_ptid_and_ws)
1519 (remote_kill_child_of_pending_fork): Remove.
1520 (remote_target::remove_new_fork_children)
1521 (remote_target::check_pending_events_prevent_wildcard_vcont)
1522 (remote_target::discard_pending_stop_replies)
1523 (remote_target::discard_pending_stop_replies_in_queue)
1524 (remote_target::remote_notif_remove_queued_reply)
1525 (remote_target::queued_stop_reply)
1526 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1527 (remote_target::wait, remote_target::kill_new_fork_children)
1528 (remote_target::async): Update.
1530 2018-06-10 Tom Tromey <tom@tromey.com>
1532 * record-full.c (record_full_arch_list_cleanups): Remove.
1533 (record_full_message): Use try/catch.
1534 (record_full_wait_cleanups): Remove.
1535 (record_full_wait_1): Use try/catch.
1536 (record_full_restore): Likewise.
1538 2018-06-10 Tom Tromey <tom@tromey.com>
1540 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1541 declare VEC. Add constructor.
1542 <in_target_beneath>: Now bool.
1543 (record_full_breakpoints): Now a std::vector, static.
1544 (record_full_sync_record_breakpoints)
1545 (record_full_init_record_breakpoints)
1546 (record_full_target::insert_breakpoint)
1547 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1549 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1551 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1552 * serial.c (serial_interface_lookup): Remove struct keyword.
1554 2018-06-10 Tom Tromey <tom@tromey.com>
1556 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1558 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1560 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1562 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1563 "beneath" as a method.
1564 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1565 Use "beneath" as a method.
1567 2018-06-10 Tom Tromey <tom@tromey.com>
1569 * tracefile.c (struct trace_file_writer_deleter): New.
1570 <operator()>: Rename from trace_file_writer_xfree.
1571 (trace_file_writer_up): New typedef.
1572 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1574 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1576 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1577 <m_registers, m_register_status>: Change type to
1579 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1582 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1584 * common/common-regcache.h (enum register_status): Add
1585 underlying type "signed char".
1586 * regcache.h (reg_buffer) <m_register_status>: Change type to
1588 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1589 register_status instead of signed char.
1590 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1591 (reg_buffer::get_register_status): Remove cast.
1592 (readable_regcache::raw_read): Remove cast.
1593 (readable_regcache::cooked_read): Remove cast.
1595 2018-06-09 Tom Tromey <tom@tromey.com>
1597 * source.c (reverse_search_command, forward_search_command): Use
1600 2018-06-09 Tom Tromey <tom@tromey.com>
1602 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1603 (serial_ops_list): Now static, std::vector.
1604 (serial_interface_lookup, serial_add_interface): Update.
1606 2018-06-09 Tom Tromey <tom@tromey.com>
1608 * dwarf2read.c (process_cu_includes): Update.
1609 (process_full_comp_unit): Update.
1610 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1613 2018-06-08 Paul Koning <paul_koning@dell.com>
1617 * python/python.c (do_start_initialization):
1618 Avoid call to internal Python API.
1619 (init__gdb_module): New function.
1621 2018-06-08 Gary Benson <gbenson@redhat.com>
1623 * linux-thread-db.c (valprint.h): New include.
1624 (struct check_thread_db_info): New structure.
1625 (check_thread_db_on_load, tdb_testinfo): New static globals.
1626 (check_thread_db, check_thread_db_callback): New functions.
1627 (try_thread_db_load_1): Run integrity checks if requested.
1628 (maintenance_check_libthread_db): New function.
1629 (_initialize_thread_db): Register "maint check libthread-db"
1630 and "maint set/show check-libthread-db".
1631 * NEWS: Mention the above new commands.
1633 2018-06-08 Tom Tromey <tom@tromey.com>
1635 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1638 2018-06-08 Tom Tromey <tom@tromey.com>
1640 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1642 2018-06-08 Tom Tromey <tom@tromey.com>
1644 * common/btrace-common.h (struct btrace_data): Add constructor,
1645 destructor, move assignment operator.
1646 <empty, clear, fini>: New methods.
1647 <format>: Initialize.
1648 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1649 (btrace_data_empty): Don't declare.
1650 * common/btrace-common.c (btrace_data_init): Remove.
1651 (btrace_data::fini): Rename from btrace_data_fini.
1652 (btrace_data::empty): Rename from btrace_data_empty.
1653 (btrace_data::clear): Rename from btrace_data_clear. Return
1655 * btrace.h (make_cleanup_btrace_data): Don't declare.
1656 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1657 (parse_xml_btrace): Update.
1658 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1659 (maint_btrace_clear_packet_history_cmd): Update.
1661 2018-06-07 Pedro Alves <palves@redhat.com>
1663 * target.h (target_ops) <beneath>: Now a method. All references
1665 (class target_stack): New.
1666 * target.c (g_target_stack): New.
1667 (g_current_top_target): Delete.
1668 (current_top_target): Get the top target out of g_target_stack.
1669 (target_stack::push, target_stack::unpush): New.
1670 (push_target, unpush_target): Reimplement.
1671 (target_is_pushed): Reimplement in terms of g_target_stack.
1672 (target_ops::beneath, target_stack::find_beneath): New.
1674 2018-06-07 Pedro Alves <palves@redhat.com>
1676 * target.h (find_target_beneath): Delete declaration.
1677 * target.c (find_target_beneath): Delete definition.
1678 * aix-thread.c: All callers of find_target_beneath adjusted to
1679 call target_ops::beneath instead.
1680 * bsd-uthread.c: Likewise.
1681 * linux-thread-db.c: Likewise.
1682 * ravenscar-thread.c: Likewise.
1683 * sol-thread.c: Likewise.
1684 * spu-multiarch.c: Likewise.
1686 2018-06-07 Pedro Alves <palves@redhat.com>
1688 * target.h (target_ops) <beneath>: Now a method. All references
1690 (target_ops) <m_beneath>: New.
1691 * target.c (target_ops::beneath): New.
1692 * corelow.c: Adjust all references to target_ops::beneath.
1693 * linux-thread-db.c: Likewise.
1694 * make-target-delegates: Likewise.
1695 * record-btrace.c: Likewise.
1696 * record-full.c: Likewise.
1697 * remote.c: Likewise.
1698 * target.c: Likewise.
1699 * target-delegates.c: Regenerate.
1701 2018-06-07 Pedro Alves <palves@redhat.com>
1703 * target.h (target_stack): Delete.
1704 (current_top_target): Declare function.
1705 * target.c (target_stack): Delete.
1706 (g_current_top_target): New.
1707 (current_top_target): New function.
1708 * auxv.c: Use current_top_target instead of target_stack
1710 * avr-tdep.c: Likewise.
1711 * breakpoint.c: Likewise.
1712 * corefile.c: Likewise.
1713 * elfread.c: Likewise.
1715 * exceptions.c: Likewise.
1716 * frame.c: Likewise.
1717 * gdbarch-selftests.c: Likewise.
1718 * gnu-v3-abi.c: Likewise.
1719 * ia64-tdep.c: Likewise.
1720 * ia64-vms-tdep.c: Likewise.
1721 * infcall.c: Likewise.
1722 * infcmd.c: Likewise.
1723 * infrun.c: Likewise.
1724 * linespec.c: Likewise.
1725 * linux-tdep.c: Likewise.
1726 * minsyms.c: Likewise.
1727 * ppc-linux-nat.c: Likewise.
1728 * ppc-linux-tdep.c: Likewise.
1729 * procfs.c: Likewise.
1730 * regcache.c: Likewise.
1731 * remote.c: Likewise.
1732 * rs6000-tdep.c: Likewise.
1733 * s390-linux-nat.c: Likewise.
1734 * s390-tdep.c: Likewise.
1735 * solib-aix.c: Likewise.
1736 * solib-darwin.c: Likewise.
1737 * solib-dsbt.c: Likewise.
1738 * solib-spu.c: Likewise.
1739 * solib-svr4.c: Likewise.
1740 * solib-target.c: Likewise.
1741 * sparc-tdep.c: Likewise.
1742 * sparc64-tdep.c: Likewise.
1743 * spu-tdep.c: Likewise.
1744 * symfile.c: Likewise.
1745 * symtab.c: Likewise.
1746 * target-descriptions.c: Likewise.
1747 * target-memory.c: Likewise.
1748 * target.c: Likewise.
1749 * target.h: Likewise.
1750 * tracefile-tfile.c: Likewise.
1751 * tracepoint.c: Likewise.
1752 * valops.c: Likewise.
1753 * valprint.c: Likewise.
1754 * value.c: Likewise.
1755 * windows-tdep.c: Likewise.
1756 * mi/mi-main.c: Likewise.
1758 2018-06-07 Tom Tromey <tom@tromey.com>
1760 * valprint.h (build_address_symbolic): Declare.
1761 * printcmd.c (print_address_symbolic): Update.
1762 (build_address_symbolic): Change "name" and "filename" to
1764 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1766 * defs.h (build_address_symbolic): Remove declaration.
1768 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1770 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1771 (aarch64_vnv_type): Add function.
1772 (aarch64_pseudo_register_name): Add V regs for SVE.
1773 (aarch64_pseudo_register_type): Likewise.
1774 (aarch64_pseudo_register_reggroup_p): Likewise.
1775 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1776 (aarch64_pseudo_read_value): Add V regs for SVE.
1777 (aarch64_pseudo_write_2): Use V0 offset for SVE
1778 (aarch64_pseudo_write): Add V regs for SVE.
1779 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1781 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1783 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1784 (sve_vl_from_vq): Likewise.
1786 2018-06-05 Tom Tromey <tom@tromey.com>
1788 * cli/cli-cmds.c (show_version): Update.
1789 * top.c (print_gdb_version): Add "interactive" parameter.
1791 * main.c (captured_main_1): Update.
1792 * top.h (print_gdb_version): Add "interactive" parameter and a
1795 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1797 * common/enum-flags.h: Add trailing semicolon to example in
1800 2018-06-05 Tom Tromey <tom@tromey.com>
1803 * NEWS: Add entry about pager.
1804 * utils.c (pagination_disabled_for_command): New global.
1805 (prompt_for_continue): Allow "c" response to prompt.
1806 (reinitialize_more_filter): Clear
1807 pagination_disabled_for_command.
1808 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1810 2018-06-04 Tom Tromey <tom@tromey.com>
1812 * ada-lang.h (ada_lookup_symbol_list): Update.
1813 * ada-lang.c (resolve_subexp): Update.
1814 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1816 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1817 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1818 results parameter to std::vector.
1819 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1821 * ada-exp.y (block_lookup): Update.
1822 (select_possible_type_sym): Change type of syms. Remove nsyms
1824 (write_var_or_type, write_name_assoc): Update.
1826 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1828 * windows-nat.c (windows_nat_target::xfer_partial): Return
1829 TARGET_XFER_E_IO if we need to delegate to the target beneath
1830 but BENEATH is NULL.
1832 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1834 * Makefile.in (config.status): Add configure.nat as a
1837 2018-06-04 Tom Tromey <tom@tromey.com>
1839 * cp-name-parser.y (cpname_state): Add method declarations.
1840 (HANDLE_QUAL): Update.
1841 (cpname_state::d_grab, cpname_state::fill_comp)
1842 (cpname_state::make_operator, cpname_state::make_dtor)
1843 (cpname_state::make_builtin_type, cpname_state::make_name)
1844 (cpname_state::d_qualify, cpname_state::d_int_type)
1845 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1846 (%union): Move earlier.
1848 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1850 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1852 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1854 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1855 (aarch64_pseudo_write_1): Likewise.
1856 (aarch64_pseudo_read_value): Use helper.
1857 (aarch64_pseudo_write): Likewise.
1859 2018-06-04 Pedro Alves <palves@redhat.com>
1861 * darwin-nat.c (darwin_ops): Delete.
1862 (darwin_attach_pid): Use get_native_target.
1864 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1866 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1867 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1869 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1871 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1872 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1873 (aarch64_gdbarch_init): Check for SVE.
1874 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1876 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1878 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1879 * aarch64-tdep.h (aarch64_read_description): Likewise.
1880 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1881 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1882 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1883 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1884 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1886 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1888 * value.c (value_fetch_lazy_bitfield): New.
1889 (value_fetch_lazy_memory): New.
1890 (value_fetch_lazy_register): New.
1891 (value_fetch_lazy): Factor out to smaller functions.
1893 2018-06-01 Tom Tromey <tom@tromey.com>
1895 * cp-name-parser.y (backslashable, represented): Now const.
1897 2018-06-01 Tom Tromey <tom@tromey.com>
1899 * cp-name-parser.y: Include parser-defs.h.
1900 (parser_fprintf): Remove declaration.
1902 2018-06-01 Tom Tromey <tom@tromey.com>
1904 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1906 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1907 (global_result): Remove globals.
1908 (struct cpname_state): New.
1909 (yyparse): Don't declare.
1910 (yylex, yyerror): Move declarations after %union.
1911 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1912 (make_name): Add state parameter.
1914 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1916 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1918 (yylex): Add lvalp, state parameters.
1919 (yyerror): Add state parameter.
1920 (cp_demangled_name_to_comp): Update.
1922 2018-06-01 Tom Tromey <tom@tromey.com>
1924 * cp-name-parser.y (parser_fprintf): Declare.
1925 (GDB_YY_REMAP_PREFIX): Define.
1926 Include yy-remap.h. Don't redefine yy* identifiers.
1928 2018-06-01 Tom Tromey <tom@tromey.com>
1930 * python/py-type.c (typy_legacy_template_argument): Update.
1931 * cp-support.h (cp_demangled_name_to_comp): Update.
1932 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1933 parameter to be a "std::string *".
1936 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1938 * ada-lex.l: Include "diagnostics.h" instead of
1939 "common/diagnostics.h".
1940 * unittests/environ-selftests.c: Likewise.
1941 * common/diagnostics.h: Moved to ../include.
1943 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1945 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1946 to language_mode_manual while calling breakpoint_re_set_one.
1948 2018-06-01 Tom Tromey <tom@tromey.com>
1950 * valops.c (value_cast_structs, destructor_name_p): Update.
1951 * symtab.c (gdb_mangle_name): Update.
1952 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1954 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1955 (pascal_object_print_value_fields, pascal_object_print_value):
1957 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1958 * linespec.c (find_methods): Update.
1959 * gdbtypes.h (type_name_no_tag): Remove.
1960 (type_name_or_error): Rename from type_name_no_tag_or_error.
1961 * gdbtypes.c (type_name_no_tag): Remove.
1962 (type_name_or_error): Rename from type_name_no_tag_or_error.
1963 (lookup_struct_elt_type, check_typedef): Update.
1964 * expprint.c (print_subexp_standard): Update.
1965 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1966 * d-namespace.c (d_lookup_nested_symbol): Update.
1967 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1968 (cp_print_class_member): Update.
1969 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1970 * completer.c (add_struct_fields): Update.
1971 * c-typeprint.c (cp_type_print_derivation_info)
1972 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1974 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1975 (ada_prefer_type, ada_is_exception_sym): Update.
1977 2018-06-01 Tom Tromey <tom@tromey.com>
1979 * valops.c (enum_constant_from_type, value_namespace_elt)
1980 (value_maybe_namespace_elt): Update.
1981 * valarith.c (find_size_for_pointer_math): Update.
1982 * target-descriptions.c (make_gdb_type): Update.
1983 * symmisc.c (print_symbol): Update.
1984 * stabsread.c (define_symbol, read_type)
1985 (complain_about_struct_wipeout, add_undefined_type)
1986 (cleanup_undefined_types_1): Update.
1987 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1988 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1989 (rust_internal_print_type, rust_composite_type)
1990 (rust_evaluate_funcall, rust_evaluate_subexp)
1991 (rust_inclusive_range_type_p): Update.
1992 * python/py-type.c (typy_get_tag): Update.
1993 * p-typeprint.c (pascal_type_print_base): Update.
1994 * mdebugread.c (parse_symbol, parse_type): Update.
1995 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1997 * guile/scm-type.c (gdbscm_type_tag): Update.
1998 * go-lang.c (sixg_string_p): Update.
1999 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2001 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2002 (TYPE_TAG_NAME): Remove.
2003 * gdbtypes.c (type_name_no_tag): Simplify.
2004 (check_typedef, check_types_equal, recursive_dump_type)
2005 (copy_type_recursive, arch_composite_type): Update.
2006 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2007 in summary mode when needed.
2008 * eval.c (evaluate_funcall): Update.
2009 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2010 (process_structure_scope, read_enumeration_type)
2011 (read_namespace_type, read_module_type, determine_prefix): Update.
2012 * cp-support.c (inspect_type): Update.
2013 * coffread.c (process_coff_symbol, decode_base_type): Update.
2014 * c-varobj.c (c_is_path_expr_parent): Update.
2015 * c-typeprint.c (c_type_print_base_struct_union): Update.
2016 (c_type_print_base_1): Update. Print struct/class/union/enum in
2017 summary when using C language.
2018 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2019 (gen_maybe_namespace_elt): Update.
2020 * ada-lang.c (ada_type_name): Simplify.
2021 (empty_record, ada_template_to_fixed_record_type_1)
2022 (template_to_static_fixed_type)
2023 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2025 2018-06-01 Tom Tromey <tom@tromey.com>
2027 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2029 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2030 (c_print_type): Update.
2031 (c_print_type): New overload.
2032 (c_type_print_varspec_prefix, c_type_print_args)
2033 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2034 (c_type_print_base_struct_union, c_type_print_base_1)
2035 (cp_type_print_method_args): Add "language" parameter.
2036 (c_type_print_base): Update.
2037 * c-lang.h (c_print_type): Add new overload.
2039 2018-06-01 Tom Tromey <tom@tromey.com>
2041 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2042 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2044 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2046 * aarch64-tdep.c (aarch64_sve_register_names): New const
2048 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2049 (AARCH64_SVE_Z_REGS_NUM): New define.
2050 (AARCH64_SVE_P_REGS_NUM): Likewise.
2051 (AARCH64_SVE_NUM_REGS): Likewise.
2053 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2055 * nat/linux-ptrace.h [__alpha__]
2056 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2059 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2061 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2062 the endianness selected.
2063 * NEWS: Document `set endian auto' mode operation update.
2065 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2067 * Makefile.in: Add new header.
2068 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2069 (sve_vl_from_vg): Likewise.
2070 (sve_vq_from_vl): Likewise.
2071 (sve_vl_from_vq): Likewise.
2072 (sve_vq_from_vg): Likewise.
2073 (sve_vg_from_vq): Likewise.
2074 * configure.nat: Add new c file.
2075 * nat/aarch64-sve-linux-ptrace.c: New file.
2076 * nat/aarch64-sve-linux-ptrace.h: New file.
2078 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2080 * aarch64-linux-nat.c (aarch64_linux_read_description):
2082 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2084 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2085 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2086 (aarch64_gdbarch_init): Add parmeter zero.
2087 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2088 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2089 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2091 * doc/gdb.texinfo: Describe SVE feature
2092 * features/aarch64-sve.c: New file.
2094 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2097 * gdbarch.sh (significant_addr_bit): Default to zero when
2098 not set by target architecture.
2099 * gdbarch.c: Re-generated.
2100 * utils.c (address_significant): Update.
2102 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2104 * stack.c (func_command): Remove trailing newline in call to error.
2106 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2108 * regcache.h (regcache_raw_collect): Remove, update callers to
2109 use regcache::raw_collect.
2110 * regcache.c (regcache_raw_collect): Remove.
2112 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2114 * regcache.h (regcache_raw_supply): Remove, update callers to
2115 use detached_regcache::raw_supply.
2116 * regcache.c (regcache_raw_supply): Remove.
2118 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2120 * regcache.h (regcache_cooked_write_part): Remove, update
2121 callers to use regcache::cooked_write_part.
2122 * regcache.c (regcache_cooked_write_part): Remove.
2124 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2126 * regcache.h (regcache_cooked_read_part): Remove, update callers
2127 to use readable_regcache::cooked_read_part.
2128 * regcache.c (regcache_cooked_read_part): Remove.
2130 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2132 * regcache.h (regcache_cooked_read_value): Remove, update
2133 callers to use readable_regcache::cooked_read_value.
2134 * regcache.c (regcache_cooked_read_value): Remove.
2136 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2138 * regcache.h (regcache_cooked_write): Remove, update callers to
2139 use regcache::cooked_write.
2140 * regcache.c (regcache_cooked_write): Remove.
2142 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2144 * regcache.h (regcache_invalidate): Remove, update callers to
2145 use detached_regcache::invalidate instead.
2146 * regcache.c (regcache_invalidate): Remove.
2148 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2150 * regcache.h (regcache_raw_write_part): Remove, update callers
2151 to use regcache::raw_write_part instead.
2152 * regcache.c (regcache_raw_write_part): Remove.
2154 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2156 * regcache.h (regcache_raw_read_part): Remove, update callers to
2157 use readable_regcache::raw_read_part instead.
2158 * regcache.c (regcache_raw_read_part): Remove.
2160 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2162 * regcache.h (regcache_cooked_read): Remove, update callers to
2163 use readable_regcache::cooked_read instead.
2164 * regcache.c (regcache_cooked_read): Remove.
2166 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2168 * regcache.h (regcache_raw_write): Remove, update callers to use
2169 regcache::raw_write instead.
2170 * regcache.c (regcache_raw_write): Remove.
2172 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2174 * regcache.h (regcache_raw_read): Remove, update callers to use
2175 readable_regcache::raw_read instead.
2176 * regcache.c (regcache_raw_read): Remove.
2178 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2180 * regcache.h (regcache_raw_update): Remove, update callers to
2181 use readable_regcache::raw_update instead.
2182 * regcache.c (regcache_raw_update): Remove.
2184 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2186 * regcache.h (regcache_register_status): Remove, update callers
2187 to use reg_buffer::get_register_status directly instead.
2188 * regcache.c (regcache_register_status): Remove.
2190 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2192 * regcache.h (regcache_get_ptid): Remove, update all callers to
2193 call regcache::ptid instead.
2194 * regcache.c (regcache_get_ptid): Remove.
2196 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2198 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2200 2018-05-30 Pedro Alves <palves@redhat.com>
2202 * common/common-exceptions.h (exception_rethrow): Use
2205 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2207 * breakpoint.c (print_solib_event, check_status_catch_solib):
2208 Remove struct keyword in range-based for loops.
2209 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2210 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2212 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2214 * symfile.c (addr_info_make_relative): Likewise.
2215 * thread.c (value_in_thread_stack_temporaries): Likewise.
2217 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2220 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2221 aggregate type to get its real type before accessing it.
2223 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2225 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2226 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2227 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2228 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2229 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2230 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2231 * printcmd.c (info_address_command): Likewise.
2233 2018-05-29 Tom Tromey <tom@tromey.com>
2235 * windows-nat.c (handle_exception): Update fall-through comment.
2237 2018-05-29 Tom Tromey <tom@tromey.com>
2239 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2240 (struct program_space) <added_solibs>: Now a std::vector.
2241 * breakpoint.c (print_solib_event): Update.
2242 (check_status_catch_solib): Update.
2243 * progspace.c (clear_program_space_solib_cache): Update.
2244 * solib.c (update_solib_list): Update.
2246 2018-05-29 Tom Tromey <tom@tromey.com>
2248 * python/py-type.c (typy_richcompare): Update.
2249 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2250 * gdbtypes.h (types_deeply_equal): Return bool.
2251 (types_equal): Likewise.
2252 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2254 (check_types_equal): Change worklist to std::vector. Return
2256 (struct type_equality_entry): Add constructor.
2257 (compare_maybe_null_strings): Return bool.
2258 (check_types_worklist): Return bool. Change worklist to
2260 (types_deeply_equal): Use std::vector.
2261 (types_equal): Return bool.
2262 (compare_maybe_null_strings): Simplify.
2264 2018-05-29 Tom Tromey <tom@tromey.com>
2266 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2268 2018-05-29 Tom Tromey <tom@tromey.com>
2270 * objc-lang.h: Don't include cp-support.h.
2271 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2274 2018-05-27 Tom Tromey <tom@tromey.com>
2276 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2278 2018-05-25 Tom Tromey <tom@tromey.com>
2280 * value.c (value::location): Initialize.
2282 2018-05-25 Tom Tromey <tom@tromey.com>
2284 * dbxread.c (init_bincl_list): Remove.
2285 (bincl_list): Now a std::vector.
2286 (bincls_allocated, next_bincl): Remove.
2287 (free_bincl_list, do_free_bincl_list_cleanup)
2288 (make_cleanup_free_bincl_list): Remove.
2289 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2291 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2292 (struct header_file_location): Add constructor.
2293 (add_bincl_to_list): Remove.
2295 2018-05-25 Tom Tromey <tom@tromey.com>
2297 * tui/tui.c (tui_enable): Update.
2298 * mi/mi-interp.c (mi_interp::init): Update.
2299 * interps.h (class interp) <name>: New method.
2300 <m_name>: Rename from name.
2301 (~scoped_restore_interp): Update.
2302 * interps.c (interp::interp): Update.
2303 (interp_add, interp_set, interp_lookup_existing)
2304 (current_interp_named_p): Update.
2306 2018-05-25 Tom Tromey <tom@tromey.com>
2308 * interps.c (interp_name): Remove.
2309 * mi/mi-interp.c (mi_interp::init): Update.
2310 * interps.h (interp_name): Remove.
2311 (~scoped_restore_interp): Update.
2312 * tui/tui.c (tui_enable): Update.
2314 2018-05-25 Tom Tromey <tom@tromey.com>
2316 * utils.c (fputs_maybe_filtered): Update.
2317 * linespec.c (decode_line_full): Update.
2318 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2319 (mi_print_breakpoint_for_event, mi_solib_loaded)
2320 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2321 (mi_user_selected_context_changed): Update.
2322 * mi/mi-main.c (mi_execute_command): Update.
2323 * cli/cli-script.c (execute_control_command): Update.
2324 * python/python.c (execute_gdb_command): Update.
2325 * solib.c (info_sharedlibrary_command): Update.
2326 * interps.c (interp_ui_out): Remove.
2327 * interps.h (interp_ui_out): Remove.
2329 2018-05-25 Tom Tromey <tom@tromey.com>
2331 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2332 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2333 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2335 2018-05-25 Tom Tromey <tom@tromey.com>
2337 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2338 * interps.c (interp_exec): Use scoped_restore.
2340 2018-05-25 Tom Tromey <tom@tromey.com>
2342 * remote.c (remote_target::remote_file_get): Use
2344 (remote_target::remote_file_put): Likewise.
2346 2018-05-25 Tom Tromey <tom@tromey.com>
2348 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2350 (get_pe_section_index, add_pe_exported_sym): Update.
2351 (read_pe_exported_syms): Use gdb::def_vector.
2353 2018-05-25 Tom Tromey <tom@tromey.com>
2355 * frame.c (remove_prev_frame): Remove.
2356 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2358 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2360 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2362 * mips-linux-nat.c (supply_fpregset): Always call
2363 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2364 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2365 `mips_fill_fpregset'.
2366 * mips-linux-tdep.c (mips_supply_fpregset)
2367 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2368 (mips_fill_fpregset_wrapper): Remove functions.
2369 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2370 (mips_linux_fpregset): Remove variable.
2371 (mips_linux_iterate_over_regset_sections): Use
2372 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2373 (mips_linux_o32_sigframe_init): Remove comment.
2375 2018-05-25 Pedro Alves <palves@redhat.com>
2377 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2378 (struct readahead_cache, struct packet_reg, struct
2379 remote_arch_state, class remote_state): Move higher up in the
2381 (remote_target::m_remote_state): Now an object instead of a pointer.
2382 (remote_target::get_remote_state): Adjust.
2384 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2386 * stack.c (select_and_print_frame): Delete.
2387 (struct function_bounds): Move struct within function.
2388 (func_command): Most content moved into new function
2389 find_frame_for_function, use new function, print result, add
2391 (find_frame_for_function): New function, now returns a result.
2393 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2395 * stack.c (iterate_over_block_arg_vars): Fix comment.
2396 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2398 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2402 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2404 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2406 * frame.h (class scoped_restore_selected_frame): New class.
2407 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2408 of any exception, use scoped_restore_selected_frame to restore the
2411 2018-05-24 Pedro Alves <palves@redhat.com>
2413 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2416 2018-05-23 Tom Tromey <tom@tromey.com>
2418 * complaints.c (struct complaints): Remove.
2419 (symfile_complaint_book): Remove.
2420 (series): New global.
2421 (complaint_internal): Update.
2422 (clear_complaints): Update.
2424 2018-05-23 Tom Tromey <tom@tromey.com>
2426 * complaints.c (counters): New global.
2427 (struct complain): Remove.
2428 (struct complaints) <root>: Remove.
2429 (complaint_sentinel): Remove.
2430 (symfile_complaint_book): Update.
2431 (find_complaint) Remove.
2432 (complaint_internal, clear_complaints): Update.
2434 2018-05-23 Tom Tromey <tom@tromey.com>
2436 * complaints.c (struct complain) <file, line>: Remove.
2437 (find_complaint): Remove file, line parameters.
2438 (complaint_internal): Update.
2440 2018-05-23 Tom Tromey <tom@tromey.com>
2442 * complaints.c (vcomplaint): Remove.
2443 (complaint_internal) Merge in contents of vcomplaint.
2445 2018-05-23 Tom Tromey <tom@tromey.com>
2447 * complaints.c (struct complaints) <explanation>: Remove.
2448 (symfile_explanations): Remove.
2449 (symfile_complaint_book): Update.
2450 (vcomplaint): Update.
2451 (struct explanation): Remove.
2453 2018-05-23 Tom Tromey <tom@tromey.com>
2455 * complaints.c (symfile_complaints): Remove.
2456 (complaint_internal): Remove "complaints" parameter.
2457 (clear_complaints, vcomplaint): Remove "c" parameter.
2458 (get_complaints): Remove.
2459 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2460 (dwarf2_debug_line_missing_file_complaint)
2461 (dwarf2_debug_line_missing_end_sequence_complaint)
2462 (dwarf2_complex_location_expr_complaint)
2463 (dwarf2_const_value_length_mismatch_complaint)
2464 (dwarf2_section_buffer_overflow_complaint)
2465 (dwarf2_macro_malformed_definition_complaint)
2466 (dwarf2_invalid_attrib_class_complaint)
2467 (create_addrmap_from_index, dw2_symtab_iter_next)
2468 (dw2_expand_marked_cus)
2469 (dw2_debug_names_iterator::find_vec_in_debug_names)
2470 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2471 (create_debug_type_hash_table, init_cutu_and_read_dies)
2472 (partial_die_parent_scope, add_partial_enumeration)
2473 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2474 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2475 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2476 (create_cus_hash_table, create_dwp_hash_table)
2477 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2478 (dwarf2_rnglists_process, dwarf2_ranges_process)
2479 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2480 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2481 (handle_struct_member_die, process_structure_scope)
2482 (read_array_type, read_common_block, read_module_type)
2483 (read_tag_pointer_type, read_typedef, read_base_type)
2484 (read_subrange_type, load_partial_dies, partial_die_info::read)
2485 (partial_die_info::read, partial_die_info::read)
2486 (partial_die_info::read, read_checked_initial_length_and_offset)
2487 (dwarf2_string_attr, read_formatted_entries)
2488 (dwarf_decode_line_header)
2489 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2490 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2491 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2492 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2493 (get_signatured_type, get_DW_AT_signature_type)
2494 (decode_locdesc, file_file_name, consume_improper_spaces)
2495 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2496 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2497 (dwarf2_symbol_mark_computed, set_die_type)
2498 (read_attribute_value): Update.
2499 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2501 * dbxread.c (unknown_symtype_complaint)
2502 (lbrac_mismatch_complaint, repeated_header_complaint)
2503 (set_namestring, function_outside_compilation_unit_complaint)
2504 (read_dbx_symtab, process_one_symbol): Update.
2505 * gdbtypes.c (stub_noname_complaint): Update.
2506 * windows-nat.c (handle_unload_dll): Update.
2507 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2508 (decode_base_type): Update.
2509 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2510 (eb_complaint, record_include_begin, record_include_end)
2511 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2512 (process_xcoff_symbol, read_symbol)
2513 (function_outside_compilation_unit_complaint)
2514 (scan_xcoff_symtab): Update.
2515 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2516 * buildsym.c (finish_block_internal, make_blockvector)
2517 (end_symtab_get_static_block, augment_type_symtab): Update.
2518 * dtrace-probe.c (dtrace_process_dof)
2519 (dtrace_static_probe_ops::get_probes): Update.
2520 * complaints.h (struct complaint): Don't declare.
2521 (symfile_complaints): Remove.
2522 (complaint_internal): Remove "complaints" parameter.
2523 (complaint): Likewise.
2524 (clear_complaints): Likewise.
2525 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2526 (reread_symbols): Update.
2527 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2528 (dwarf2_frame_cache, decode_frame_entry): Update.
2529 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2530 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2531 (info_selectors_command): Update.
2532 * macrotab.c (macro_include, check_for_redefinition)
2533 (macro_undef): Update.
2534 * objfiles.c (filter_overlapping_sections): Update.
2535 * stabsread.c (invalid_cpp_abbrev_complaint)
2536 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2537 (define_symbol, error_type, read_type, rs6000_builtin_type)
2538 (stabs_method_name_from_physname, read_member_functions)
2539 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2540 (attach_fields_to_type, complain_about_struct_wipeout)
2541 (read_range_type, read_args, common_block_start)
2542 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2544 * mdebugread.c (index_complaint, unknown_ext_complaint)
2545 (basic_type_complaint, bad_tag_guess_complaint)
2546 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2547 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2548 (parse_procedure, parse_lines)
2549 (function_outside_compilation_unit_complaint)
2550 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2551 (bad_tag_guess_complaint, reg_value_complaint): Update.
2552 * cp-support.c (demangled_name_complaint): Update.
2553 * macroscope.c (sal_macro_scope): Update.
2554 * dwarf-index-write.c (class debug_names): Update.
2556 2018-05-23 Tom Tromey <tom@tromey.com>
2558 * complaints.c (clear_complaints): Remove "noisy" parameter.
2559 * complaints.h (clear_complaints): Update.
2560 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2561 (reread_symbols): Update.
2563 2018-05-23 Tom Tromey <tom@tromey.com>
2565 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2567 (vcomplaint, clear_complaints): Update.
2568 (symfile_explanations): Remove some messages.
2570 2018-05-23 Tom Tromey <tom@tromey.com>
2572 * complaints.c (internal_complaint): Remove.
2573 * complaints.h (internal_complaint): Remove.
2575 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2577 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2579 2018-05-22 Pedro Alves <palves@redhat.com>
2581 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2582 (remote_fileio_badfd, remote_fileio_return_errno)
2583 (remote_fileio_return_success, remote_fileio_func_open)
2584 (remote_fileio_func_open, remote_fileio_func_close)
2585 (remote_fileio_func_read, remote_fileio_func_write)
2586 (remote_fileio_func_lseek, remote_fileio_func_rename)
2587 (remote_fileio_func_unlink, remote_fileio_func_stat)
2588 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2589 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2590 remote_target parameter.
2591 (remote_fio_func_map) <func>: Add remote_target parameter.
2592 (do_remote_fileio_request, remote_fileio_request):
2593 * remote-fileio.h (remote_fileio_request):
2594 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2595 remote_target parameter.
2596 (remote_notif_process, handle_notification): Adjust to pass down
2598 (remote_notif_state_allocate): Add remote_target parameter. Save
2600 * remote-notif.h (struct remote_target): Forward declare.
2601 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2602 remote_target parameter.
2603 (struct remote_notif_state) <remote>: New field.
2604 (remote_notif_ack, remote_notif_parse): Add remote_target
2606 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2607 remote_target parameter.
2608 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2609 (threads_listing_context, rmt_thread_action, protocol_feature)
2610 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2611 (packet_result, struct threads_listing_context, remote_state):
2612 Move definitions and declarations higher up.
2613 (remote_target) <~remote_target>: Declare.
2614 (remote_download_command_source, remote_file_put, remote_file_get)
2615 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2616 (remote_hostio_pread_vFile, remote_hostio_send_command)
2617 (remote_hostio_set_filesystem, remote_hostio_open)
2618 (remote_hostio_close, remote_hostio_unlink, remote_state)
2619 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2620 (get_memory_write_packet_size, get_memory_read_packet_size)
2621 (append_pending_thread_resumptions, remote_detach_1)
2622 (append_resumption, remote_resume_with_vcont)
2623 (add_current_inferior_and_thread, wait_ns, wait_as)
2624 (process_stop_reply, remote_notice_new_inferior)
2625 (process_initial_stop_replies, remote_add_thread)
2626 (btrace_sync_conf, remote_btrace_maybe_reopen)
2627 (remove_new_fork_children, kill_new_fork_children)
2628 (discard_pending_stop_replies, stop_reply_queue_length)
2629 (check_pending_events_prevent_wildcard_vcont)
2630 (discard_pending_stop_replies_in_queue, stop_reply)
2631 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2632 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2633 (remote_interrupt_as, remote_interrupt_ns)
2634 (remote_get_noisy_reply, remote_query_attached)
2635 (remote_add_inferior, remote_current_thread, get_current_thread)
2636 (set_thread, set_general_thread, set_continue_thread)
2637 (set_general_process, write_ptid)
2638 (remote_unpack_thread_info_response, remote_get_threadinfo)
2639 (parse_threadlist_response, remote_get_threadlist)
2640 (remote_threadlist_iterator, remote_get_threads_with_ql)
2641 (remote_get_threads_with_qxfer)
2642 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2643 (get_offsets, remote_check_symbols, remote_supported_packet)
2644 (remote_query_supported, remote_packet_size)
2645 (remote_serial_quit_handler, remote_detach_pid)
2646 (remote_vcont_probe, remote_resume_with_hc)
2647 (send_interrupt_sequence, interrupt_query)
2648 (remote_notif_get_pending_events, fetch_register_using_p)
2649 (send_g_packet, process_g_packet, fetch_registers_using_g)
2650 (store_register_using_P, store_registers_using_G)
2651 (set_remote_traceframe, check_binary_download)
2652 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2653 (remote_xfer_live_readonly_partial, remote_read_bytes)
2654 (remote_send_printf, remote_flash_write, readchar)
2655 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2656 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2657 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2658 (extended_remote_disable_randomization, extended_remote_run)
2659 (send_environment_packet, extended_remote_environment_support)
2660 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2661 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2662 (packet_command): Now methods of ...
2663 (remote_target): ... this class.
2664 (m_remote_state) <remote_target>: New field.
2665 (struct remote_state) <stop_reply_queue,
2666 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2668 (remote_state::remote_state): Allocate stop_reply_queue.
2669 (remote_state): Delete global.
2670 (get_remote_state_raw): Delete.
2671 (remote_target::get_remote_state): Allocate m_remote_state on
2673 (get_current_remote_target): New.
2674 (remote_ops, extended_remote_ops): Delete.
2675 (wait_forever_enabled_p, remote_async_inferior_event_token):
2676 Delete, moved to struct remote_state.
2677 (remote_target::close): Delete self. Destruction bits split to
2679 (remote_target::~remote_target): ... this.
2680 (show_memory_packet_size): Adjust to use
2681 get_current_remote_target.
2682 (struct protocol_feature) <func>: Add remote_target parameter.
2683 All callers adjusted.
2684 (curr_quit_handler_target): New.
2685 (remote_serial_quit_handler): Reimplement.
2686 (remote_target::open_1): Adjust to use get_current_remote_target.
2687 Heap-allocate remote_target/extended_remote_target instances.
2688 (vcont_builder::vcont_builder): Add remote_target parameter, and
2689 save it in m_remote. All callers adjusted.
2690 (vcont_builder::m_remote): New field.
2691 (vcont_builder::restart, vcont_builder::flush)
2692 (vcont_builder::push_action): Use it.
2693 (remote_target::commit_resume): Use it.
2694 (struct queue_iter_param) <remote>: New field.
2695 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2696 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2697 (check_pending_event_prevents_wildcard_vcont_callback)
2698 (remote_target::check_pending_events_prevent_wildcard_vcont)
2699 (remote_target::discard_pending_stop_replies)
2700 (remote_target::discard_pending_stop_replies_in_queue)
2701 (remote_target::remote_notif_remove_queued_reply): Fill in
2703 (remote_notif_get_pending_events): New.
2704 (remote_target::readchar, remote_target::remote_serial_write):
2705 Save/restore curr_quit_handler_target.
2707 (kill_new_fork_children): Fill in 'remote' field.
2708 (packet_command): Use get_current_remote_target, defer to
2709 remote_target method of same name.
2710 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2711 parameter, and save it in m_remote. All callers adjusted.
2712 (scoped_remote_fd::release): Use m_remote.
2713 (scoped_remote_fd::m_remote): New field.
2714 (remote_file_put, remote_file_get, remote_file_delete): Use
2715 get_current_remote_target, defer to remote_target method of same
2717 (remote_btrace_reset): Add remote_state paremeter. Update all
2719 (remote_async_inferior_event_handler). Pass down 'data'.
2720 (remote_new_objfile): Use get_current_remote_target.
2721 (remote_target::vcont_r_supported): New.
2722 (set_range_stepping): Use get_current_remote_target and
2723 remote_target::vcont_r_supported.
2724 (_initialize_remote): Don't allocate 'remote_state' and
2725 'stop_reply_queue' globals.
2726 * remote.h (struct remote_target): Forward declare.
2727 (getpkt, putpkt, remote_notif_get_pending_events): Add
2728 'remote_target' parameter.
2730 2018-05-22 Pedro Alves <palves@redhat.com>
2732 * remote.c (vcont_builder): Now a class. Make all data members
2734 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2736 (vcont_builder_restart): Rename to ...
2737 (vcont_builder::restart): ... this.
2738 (vcont_builder_flush): Rename to ...
2739 (vcont_builder::flush): ... this.
2740 (vcont_builder_push_action): Rename to ...
2741 (vcont_builder::push_action): ... this.
2742 (remote_target::commit_resume): Adjust.
2744 2018-05-22 Pedro Alves <palves@redhat.com>
2746 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2747 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2748 (get_fixed_memory_packet_size): New.
2749 (get_memory_packet_size): Use it.
2750 (set_memory_packet_size): Don't override the config size with
2751 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2752 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2753 Don't refer to get_memory_packet_size if not connected to a remote
2754 target. Show "(default)" if configured size is 0.
2756 2018-05-22 Pedro Alves <palves@redhat.com>
2758 * remote.c (remote_target::mourn_inferior): Move
2759 discard_pending_stop_replies call here from ...
2760 (_initialize_remote): ... here.
2762 2018-05-22 Pedro Alves <palves@redhat.com>
2764 * remote.c (compare_section_command): Remove set_general_process
2767 2018-05-22 Pedro Alves <palves@redhat.com>
2769 * remote.c (struct packet_reg, struct remote_arch_state):
2770 Move higher up in the file.
2771 (remote_state) <m_arch_states>: Store remote_arch_state values
2772 instead of remote_arch_state pointers.
2773 (remote_state::get_remote_arch_state): Adjust.
2775 2018-05-22 Pedro Alves <palves@redhat.com>
2777 * remote.c: Include <unordered_map>.
2778 (remote_state): Now a class.
2779 (remote_state) <get_remote_arch_state>: Declare method.
2780 <get_remote_arch_state>: New field.
2781 (remote_arch_state) <remote_arch_state>: Declare ctor.
2782 <regs>: Now a unique_ptr.
2783 (remote_gdbarch_data_handle): Delete.
2784 (get_remote_arch_state): Delete.
2785 (remote_state::get_remote_arch_state): New.
2786 (get_remote_state): Adjust to call remote_state's
2787 get_remote_arch_state method.
2788 (init_remote_state): Delete, bits factored out to ...
2789 (remote_arch_state::remote_arch_state): ... this new method.
2790 (get_remote_packet_size, get_memory_packet_size)
2791 (process_g_packet, remote_target::fetch_registers)
2792 (remote_target::prepare_to_store, store_registers_using_G)
2793 (remote_target::store_registers, remote_target::get_trace_status):
2794 Adjust to call remote_state's method.
2795 (_initialize_remote): Remove reference to
2796 remote_gdbarch_data_handle.
2798 2018-05-22 Pedro Alves <palves@redhat.com>
2800 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2801 pread>: New method declarations.
2802 (remote_target::open_1): Adjust.
2803 (readahead_cache_invalidate): Rename to ...
2804 (readahead_cache::invalidate): ... this, and adjust to be a class
2806 (readahead_cache_invalidate_fd): Rename to ...
2807 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2809 (remote_hostio_pwrite): Adjust.
2810 (remote_hostio_pread_from_cache): Rename to ...
2811 (readahead_cache::pread): ... this, and adjust to be a class
2813 (remote_hostio_close): Adjust.
2815 2018-05-22 Pedro Alves <palves@redhat.com>
2817 * remote.c (remote_hostio_close_cleanup): Delete.
2818 (class scoped_remote_fd): New.
2819 (remote_file_put, remote_file_get): Use it.
2821 2018-05-22 Pedro Alves <palves@redhat.com>
2823 (struct vCont_action_support): Use bool and initialize all fields.
2824 (struct readahead_cache): Initialize all fields.
2825 (remote_state): Use bool and initialize all fields.
2826 (remote_state::remote_state, remote_state::~remote_state): New.
2827 (new_remote_state): Delete.
2828 (_initialize_remote): Use new to allocate remote_state.
2830 2018-05-22 Pedro Alves <palves@redhat.com>
2834 * c-exp.y: Include "c-support.h".
2835 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2836 of tolower. Use c_ident_is_alpha to scan names.
2837 * c-lang.c: Include "c-support.h".
2838 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2839 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2840 * c-support.h: New file, with bits factored out from ...
2841 * cp-name-parser.y: ... this file.
2842 Include "c-support.h".
2843 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2844 c-support.h and renamed.
2845 (symbol_end, yylex): Adjust.
2847 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2849 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2850 parameter type to CORE_ADDR.
2851 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2852 parameter type in declaration to CORE_ADDR.
2853 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2854 target_auxv_search to get AT_HWCAP and use the result to get the
2856 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2857 to CORE_ADDR. Remove the cast of the return value to unsigned
2858 long. Fix error predicate of target_auxv_search.
2859 (ppc_linux_nat_target::read_description): Change the type of the
2860 hwcap variable to CORE_ADDR.
2862 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2864 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2865 if the size of fpscr is larger than 32 bits.
2867 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2869 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2870 (ppc32_linux_vsxregmap): New global.
2871 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2872 regcache_supply_regset, and regcache_collect_regset.
2873 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2874 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2875 (fetch_vsx_register, store_vsx_register): Remove.
2876 (fetch_vsx_registers): Add regno parameter. Get regset using
2877 ppc_linux_vsxregset. Use regset to supply registers.
2878 (store_vsx_registers): Add regno parameter. Get regset using
2879 ppc_linux_vsxregset. Use regset to collect registers.
2880 (fetch_register): Call fetch_vsx_registers instead of
2882 (store_register): Call store_vsx_registers instead of
2884 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2885 new regno parameter.
2886 (store_ppc_registers): Call store_vsx_registers with -1 for the
2887 new regno parameter.
2888 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2889 (ppc_collect_vsxregset): Remove.
2891 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2893 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2895 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2896 for vector register offset fields.
2897 (ppc64_fbsd_reg_offsets): Likewise.
2898 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2899 to vector register offset fields.
2900 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2901 to vector register offset fields.
2902 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2903 vector register offset fields.
2904 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2905 initializers for vector register offset fields.
2906 (rs6000_aix64_reg_offsets): Likewise.
2907 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2908 (ppc_supply_vrregset): Remove.
2909 (ppc_collect_vrregset): Remove.
2910 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2911 (ppc_linux_vrregset) : New function.
2912 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2913 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2914 (ppc32_linux_vrregset): Remove.
2915 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2916 and use result instead of ppc32_linux_vrregset.
2917 (ppc32_linux_reg_offsets): Remove initializers for vector register
2919 (ppc64_linux_reg_offsets): Likewise.
2920 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2921 * ppc-linux-nat.c: Include regset.h.
2922 (gdb_vrregset_t): Adjust comment to account for little-endian
2924 (supply_vrregset, fill_vrregset): Remove.
2925 (fetch_altivec_register, store_altivec_register): Remove.
2926 (fetch_altivec_registers): Add regno parameter. Get regset using
2927 ppc_linux_vrregset. Use regset to supply registers.
2928 (store_altivec_registers): Add regno parameter. Get regset using
2929 ppc_linux_vrregset. Use regset to collect registers.
2930 (fetch_register): Call fetch_altivec_registers instead of
2931 fetch_altivec_register.
2932 (store_register): Call store_altivec_registers instead of
2933 store_altivec_register.
2934 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2935 the new regno parameter.
2936 (store_ppc_registers): Call store_altivec_registers with -1 for
2937 the new regno parameter.
2939 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2941 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2942 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2943 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2944 (gdb_vrregset_t): Change array type size to
2945 PPC_LINUX_SIZEOF_VRREGSET.
2946 (gdb_vsxregset_t): Change array type size to
2947 PPC_LINUX_SIZEOF_VSXREGSET.
2948 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2949 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2950 PPC_LINUX_SIZEOF_VSXREGSET.
2952 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2954 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2955 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2957 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2958 ppc_linux_target_wordsize with tid.
2959 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2961 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2962 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2963 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2964 tid parameter. Remove static specifier.
2965 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2966 (ppc_linux_target_wordsize): New declaration.
2968 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2970 * arch/ppc-linux-common.c: New file.
2971 * arch/ppc-linux-common.h: New file.
2972 * arch/ppc-linux-tdesc.h: New file.
2973 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2974 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2975 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2976 arch/ppc-linux-tdesc.h.
2977 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2978 arch/ppc-linux-tdesc.h.
2979 (ppc_linux_nat_target::read_description): Remove target
2980 description matching code. Fill a ppc_linux_features struct and
2981 call ppc_linux_match_description with it. Move comment about ISA
2982 2.05 to ppc-linux-common.c.
2983 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2984 arch/ppc-linux-tdesc.h.
2985 (ppc_linux_core_read_description): Remove target description
2986 matching code. Fill a ppc_linux_features struct and call
2987 ppc_linux_match_description with it.
2988 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2989 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2990 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2991 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2992 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2993 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2994 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2995 (tdesc_powerpc_e500l): Remove.
2997 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2999 * ada-lang.c (catch_assert_command): Pass empty string instead
3000 of NULL for excep_string argument.
3002 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3004 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3005 the width of the requested register exceeds the width of the
3008 2018-05-21 Tom Tromey <tom@tromey.com>
3010 * printcmd.c (output_command): Remove.
3011 (output_command_const): Rename to output_command.
3012 * valprint.h (output_command): Rename from output_command_const.
3013 * tracepoint.c (trace_dump_actions): Call output_command.
3015 2018-05-21 Tom Tromey <tom@tromey.com>
3017 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3018 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3019 * ada-lang.h (create_ada_exception_catchpoint): Update.
3020 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3022 (create_excep_cond_exprs, ~ada_catchpoint)
3023 (should_stop_exception, print_one_exception)
3024 (print_mention_exception, print_recreate_exception): Update.
3025 (ada_get_next_arg): Remove.
3026 (catch_ada_exception_command_split): Use std::string. Change type
3027 of "excep_string", "cond_string".
3028 (catch_ada_exception_command): Update.
3029 (create_ada_exception_catchpoint): Change type of excep_string.
3030 (ada_exception_sal): Remove excep_string parameter.
3031 (~ada_catchpoint): Remove.
3033 2018-05-21 Tom Tromey <tom@tromey.com>
3035 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3038 2018-05-21 Tom Tromey <tom@tromey.com>
3040 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3041 Return unique_xmalloc_ptr.
3042 (print_it_exception): Update.
3044 2018-05-21 Tom Tromey <tom@tromey.com>
3046 * tracepoint.c (trace_dump_actions): Use std::string.
3048 2018-05-21 Tom Tromey <tom@tromey.com>
3050 * symfile.c (reread_symbols): Use std::string for original_name.
3052 2018-05-21 Tom Tromey <tom@tromey.com>
3054 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3055 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3058 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3060 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3062 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3063 * objfiles.c (get_objfile_bfd_data): Allocate
3064 objfile_per_bfd_storage with obstack_new when allocating on
3067 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3069 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3071 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3072 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3073 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3074 (add_pending): Likewise.
3075 (parse_symbol): Likewise.
3076 (parse_partial_symbols): Likewise.
3077 (psymtab_to_symtab_1): Likewise.
3078 (new_psymtab): Likewise.
3079 (elfmdebug_build_psymtabs): Likewise.
3080 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3081 * objfiles.c (get_objfile_bfd_data): Likewise.
3082 (objfile_register_static_link): Likewise.
3083 * psymtab.c (allocate_psymtab): Likewise.
3084 * stabsread.c (read_member_functions): Likewise.
3085 * xcoffread.c (xcoff_end_psymtab): Likewise.
3087 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3089 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3090 compiler supports std::is_trivially_constructible.
3091 * common/poison.h: Include obstack.h.
3092 (IsMallocable): Define to is_trivially_constructible if the
3093 compiler supports it, define to true_type otherwise.
3097 (XOBNEWVEC): Redefine.
3098 * gdb_obstack.h (obstack_zalloc): New.
3099 (OBSTACK_ZALLOC): Redefine.
3100 (obstack_calloc): New.
3101 (OBSTACK_CALLOC): Redefine.
3103 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3104 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3106 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3107 obstack_calloc/obstack_zalloc.
3108 (gdbarch_obstack_zalloc): Remove.
3109 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3111 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3113 * stack.c (backtrace_command_1): Remove useless variable int i.
3115 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3117 * stack.c (print_frame_info): Fix comment.
3119 2018-05-18 Tom Tromey <tom@tromey.com>
3121 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3122 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3123 (~dwarf2_per_objfile): Update
3124 (dwarf2_get_dwz_file): Use new.
3125 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3128 2018-05-18 Tom Tromey <tom@tromey.com>
3130 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3132 * dwarf2read.c (struct dwp_file): Add constructor and
3134 (open_and_init_dwp_file): Return a unique_ptr.
3135 (dwarf2_per_objfile, create_dwp_hash_table)
3136 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3137 (lookup_dwo_unit_in_dwp): Update.
3138 (open_and_init_dwp_file, get_dwp_file): Update.
3140 2018-05-18 Tom Tromey <tom@tromey.com>
3142 * dwarf2read.c (dwarf2_per_objfile): Update.
3143 (struct mapped_index): Add initializers.
3144 (dwarf2_read_index): Use new.
3145 (dw2_symtab_iter_init): Update.
3146 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3149 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3151 * dwarf2read.c (mapped_index) <total_size>: Remove.
3153 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3155 * unittests/format_pieces-selftests.c (test_format_specifier):
3158 2018-05-18 Tom Tromey <tom@tromey.com>
3160 * c-typeprint.c (maybe_print_hole): New function.
3161 (c_print_type_struct_field_offset): Update.
3162 (c_type_print_base_struct_union): Call maybe_print_hole.
3164 2018-05-17 Keith Seitz <keiths@redhat.com>
3166 * breakpoint.c (build_bpstat_chain): New function, moved from
3168 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3169 If no stop chain is passed, call build_bpstat_chain to build it.
3170 * breakpoint.h (build_bpstat_chain): Declare.
3171 (bpstat_stop_status): Move documentation here from breakpoint.c.
3172 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3173 build the stop chain and pass it to skip_inline_frames.
3174 Pass this stop chain to bpstat_stop_status.
3175 * inline-frame.c: Include breakpoint.h.
3176 (stopped_by_user_bp_inline_frame): New function.
3177 (skip_inline_frames): Add parameter `stop_chain'.
3178 Move documention to inline-frame.h.
3179 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3180 whether the frame should be elided.
3181 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3182 Add moved documentation and update for new parameter.
3184 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3187 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3188 unittests/format_pieces-selftests.c.
3189 * common/format.h (format_piece) <operator==>: New.
3190 (format_pieces) <operator[]>: Remove.
3191 * common/format.c (format_pieces::format_pieces): Handle \e.
3192 * unittests/format_pieces-selftests.c: New.
3194 2018-05-17 Tom Tromey <tom@tromey.com>
3197 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3198 (dw2_instantiate_symtab): Add skip_partial parameter.
3199 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3200 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3201 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3202 (dw2_expand_symtabs_matching_one)
3203 (dw2_find_pc_sect_compunit_symtab)
3204 (dw2_debug_names_lookup_symbol)
3205 (dw2_debug_names_expand_symtabs_for_function): Update.
3206 (init_cutu_and_read_dies): Add skip_partial parameter.
3207 (process_psymtab_comp_unit, build_type_psymtabs_1)
3208 (process_skeletonless_type_unit, load_partial_comp_unit)
3209 (psymtab_to_symtab_1): Update.
3210 (load_full_comp_unit): Add skip_partial parameter.
3211 (process_imported_unit_die, dwarf2_read_addr_index)
3212 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3213 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3214 (read_signatured_type): Update.
3216 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3218 * value.c (release_value): Remove unused variable.
3219 (record_latest_value): Likewise.
3220 (access_value_history): Likewise.
3221 (preserve_values): Likewise.
3223 2018-05-17 Tom Tromey <tom@tromey.com>
3225 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3228 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3231 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3232 Also handle registers whose width is not a multiple of
3234 (linux_nat_trad_target::store_register): Likewise.
3236 2018-05-16 Tom Tromey <tom@tromey.com>
3238 * gdbcore.h (core_bfd): Redefine.
3239 * corelow.c (core_target::close): Update.
3240 (core_target_open): Update.
3241 * progspace.h (struct program_space) <cbfd>: Now a
3244 2018-05-16 Tom Tromey <tom@tromey.com>
3247 * symfile-add-flags.h (enum symfile_add_flags)
3248 <SYMFILE_NOT_FILENAME>: New constant.
3249 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3250 objfile name from BFD.
3251 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3252 * minidebug.c (find_separate_debug_file_in_section): Put
3253 ".gnu_debugdata" into BFD's file name.
3255 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3257 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3260 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3263 * aarch64-tdep.c (aarch64_analyze_prologue,
3264 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3265 Indicate not interested in errors.
3267 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3269 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3270 Supply the MIPS_ZERO_REGNUM register.
3272 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3274 * mips-tdep.c (mask_address_var): Make variable static.
3276 2018-05-14 Tom Tromey <tom@tromey.com>
3278 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3280 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3282 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3283 FXSAVE_ADDR for the mxcsr register.
3285 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3287 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3289 2018-05-11 Pedro Alves <palves@redhat.com>
3291 * corelow.c (core_target) <core_target>: No longer inline.
3292 Initialize m_core_gdbarch, m_core_vec and build the section table
3294 <~core_target>: New.
3295 <core_gdbarch, get_core_register_section>: New methods.
3296 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3297 factored out from ...
3298 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3300 (sniff_core_bfd): Add gdbarch parameter.
3301 (core_close): Delete, merged into ...
3302 (core_target::close): ... here. Delete self.
3303 (core_close_cleanup): Delete.
3304 (core_target_open): Allocate a core_target on the heap. Use a
3305 unique_ptr instead of a cleanup. Bits moved into the core_target
3306 ctor. Adjust to use core_target methods instead of globals.
3307 (get_core_register_section): Rename to ...
3308 (core_target::get_core_register_section): ... this and adjust.
3309 (struct get_core_registers_cb_data): New.
3310 (get_core_registers_cb): Use it. Use bool.
3311 (core_target::fetch_registers, core_target::files_info)
3312 (core_target::xfer_partial, core_target::read_description)
3313 (core_target::pid_to, core_target::thread_name): Adjust to
3314 reference class fields instead of globals.
3315 * target.h (struct target_ops_deleter, target_ops_up): New.
3317 2018-05-11 Pedro Alves <palves@redhat.com>
3319 * corefile.c (core_file_command): Move to corelow.c.
3320 * corelow.c (the_core_target): Delete.
3321 (core_file_command): Moved from corefile.c. Check exec_bfd
3322 instead of the_core_target. Use target_detach instead of calling
3323 into the_core_target directly.
3324 (maybe_say_no_core_file_now): New.
3325 (core_target::detach): Use it.
3326 (_initialize_corelow): Remove references to the_core_target.
3327 * gdbcore.h (the_core_target): Delete.
3329 2018-05-11 Tom Tromey <tromey@redhat.com>
3330 Pedro Alves <palves@redhat.com>
3332 * corefile.c (core_bfd): Remove.
3333 * gdbcore.h (core_bfd): Now a macro.
3334 * progspace.h (struct program_space) <cbfd>: New field.
3336 2018-05-11 Tom Tromey <tom@tromey.com>
3338 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3341 2018-05-10 Tom Tromey <tom@tromey.com>
3343 * configure: Rebuild.
3344 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3346 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3349 * regformats/regdat.sh: Adjust script, following the addition
3350 of the new expedite_regs parameter to init_target_desc.
3352 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3355 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3356 set_gdbarch_significant_addr_bit.
3357 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3358 set_gdbarch_significant_addr_bit.
3359 * utils.c (address_significant): Update to sign extend addr.
3361 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3363 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3364 (xtensa_linux_init_abi): Limit tdep->num_regs by
3365 tdep->num_nopriv_regs.
3366 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3367 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3370 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3372 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3374 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3376 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3377 (I387_MXCSR_INIT_VAL): New constant.
3378 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3379 buffer if it was supplied by the inferior.
3380 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3381 (i387_xsave_get_clear_bv): New function.
3382 (i387_supply_xsave): Only read x87 control registers from the
3383 xsave buffer if the feature is enabled, and the state will have
3384 been written, otherwise, provide a suitable default.
3385 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3386 including x87 control registers. Update control registers if they
3387 have changed from the default value, and mark features as enabled
3389 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3391 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3393 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3395 2018-05-07 Tom Tromey <tom@tromey.com>
3397 * configure: Rebuild.
3398 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3400 2018-05-07 Tom Tromey <tom@tromey.com>
3403 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3404 bit. Use correct value for VDIV.
3406 2018-05-04 Tom Tromey <tom@tromey.com>
3408 * configure: Rebuild.
3409 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3411 2018-05-04 Tom Tromey <tom@tromey.com>
3413 * linux-record.c (record_linux_system_call) <case
3414 RECORD_SYS_RECVFROM>: Add "break".
3416 2018-05-04 Tom Tromey <tom@tromey.com>
3418 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3419 Add missing "break".
3420 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3421 Add missing "break".
3423 2018-05-04 Tom Tromey <tom@tromey.com>
3425 * rs6000-tdep.c (ppc_process_record_op4)
3426 (ppc_process_record_op63): Add fall-through comment.
3428 2018-05-04 Tom Tromey <tom@tromey.com>
3430 * i386-tdep.c (i386_process_record): Add fall-through comment.
3432 2018-05-04 Tom Tromey <tom@tromey.com>
3434 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3437 2018-05-04 Tom Tromey <tom@tromey.com>
3439 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3440 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3441 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3443 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3445 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3448 2018-05-04 Tom Tromey <tom@tromey.com>
3450 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3452 2018-05-04 Tom Tromey <tom@tromey.com>
3454 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3455 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3456 * symfile.c (section_is_mapped): Fix fall-through comment.
3457 * stabsread.c (define_symbol, read_member_functions): Fix
3458 fall-through comment.
3459 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3461 * remote.c (remote_wait_as): Fix fall-through comment.
3462 * p-exp.y (yylex): Fix fall-through comment.
3463 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3465 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3466 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3467 * jv-exp.y (yylex): Fix fall-through comment.
3468 * go-exp.y (lex_one_token): Fix fall-through comment.
3469 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3470 fall-through comment.
3471 * f-exp.y (yylex): Fix fall-through comment.
3472 * dwarf2read.c (process_die): Fix fall-through comments.
3473 * dbxread.c (process_one_symbol): Fix fall-through comment.
3474 * d-exp.y (lex_one_token): Fix fall-through comment.
3475 * cp-name-parser.y (yylex): Fix fall-through comment.
3476 * coffread.c (coff_symtab_read): Fix fall-through comment.
3477 * c-exp.y (lex_one_token): Fix fall-through comment.
3478 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3480 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3483 2018-05-04 Tom Tromey <tom@tromey.com>
3486 * NEWS: Mention gdb.execute change.
3487 * gdbcmd.h (execute_control_command): Don't declare.
3488 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3489 execute_control_commands, execute_control_commands_to_string.
3490 * cli/cli-script.h (execute_control_commands)
3491 (execute_control_commands_to_string): Declare.
3492 (execute_control_command): Add from_tty parameter.
3493 * cli/cli-script.c (execute_control_commands)
3494 (execute_control_commands_to_string): New functions.
3495 (execute_user_command): Use execute_control_commands.
3496 (execute_control_command_1): Add "from_tty" parameter. Update.
3497 (execute_control_command): Likewise.
3499 2018-05-04 Tom Tromey <tom@tromey.com>
3502 * NEWS: Mention that breakpoint commands are writable.
3503 * python/py-breakpoint.c (bppy_set_commands): New function.
3504 (breakpoint_object_getset) <"commands">: Use it.
3506 2018-05-04 Tom Tromey <tom@tromey.com>
3508 * tracepoint.c (actions_command): Update.
3509 * mi/mi-cmd-break.c (mi_command_line_array)
3510 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3511 (mi_read_next_line): Remove.
3512 (mi_cmd_break_commands): Update.
3513 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3515 * cli/cli-script.c (get_command_line): Update.
3516 (process_next_line): Use function_view. Constify.
3517 (recurse_read_control_structure, read_command_lines)
3518 (read_command_lines_1): Change argument types to function_view.
3519 (do_define_command, document_command): Update.
3520 * breakpoint.h (check_tracepoint_command): Don't declare.
3521 * breakpoint.c (check_tracepoint_command): Remove.
3522 (commands_command_1, create_tracepoint_from_upload): Update.
3524 2018-05-04 Tom Tromey <tom@tromey.com>
3527 * cli/cli-script.h (enum command_control_type) <define_control>:
3529 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3530 (build_command_line, execute_control_command_1)
3531 (process_next_line): Likewise.
3532 (do_define_command): New function, extracted from define_command.
3533 (define_command): Use it.
3535 2018-05-04 Tom Tromey <tom@tromey.com>
3537 * tracepoint.c (actions_command): Update.
3538 * cli/cli-script.h (read_command_lines): Update.
3539 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3540 (MAX_TMPBUF): Remove define.
3541 (define_command): Use string_printf.
3542 (document_command): Likewise.
3543 * breakpoint.c (commands_command_1): Update.
3545 2018-05-04 Tom Tromey <tom@tromey.com>
3547 * top.c (execute_command): Update.
3548 * cli/cli-script.h (print_command_lines): Now varargs.
3549 * cli/cli-script.c (print_command_lines): Now varargs.
3550 (execute_control_command_1) <case while_control, case if_control>:
3553 2018-05-04 Tom Tromey <tom@tromey.com>
3555 * tracepoint.c (all_tracepoint_actions): Rename from
3556 all_tracepoint_actions_and_cleanup. Change return type.
3557 (actions_command, encode_actions_1, encode_actions)
3558 (trace_dump_actions, tdump_command): Update.
3559 * remote.c (remote_download_command_source): Update.
3560 * python/python.c (gdbpy_eval_from_control_command)
3561 (python_command, python_interactive_command): Update.
3562 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3563 * guile/guile.c (guile_command)
3564 (gdbscm_eval_from_control_command, guile_command): Update.
3565 * compile/compile.c (compile_code_command)
3566 (compile_print_command, compile_to_object): Update.
3567 * cli/cli-script.h (struct command_lines_deleter): New.
3568 (counted_command_line): New typedef.
3569 (struct command_line): Add constructor, destructor.
3570 <body_list>: Remove.
3571 <body_list_0, body_list_1>: New members.
3572 (command_line_up): Remove typedef.
3573 (read_command_lines, read_command_lines_1, get_command_line):
3575 (copy_command_lines): Don't declare.
3576 * cli/cli-script.c (build_command_line): Use "new".
3577 (get_command_line): Return counted_command_line.
3578 (print_command_lines, execute_user_command)
3579 (execute_control_command_1, while_command, if_command): Update.
3580 (realloc_body_list): Remove.
3581 (process_next_line, recurse_read_control_structure): Update.
3582 (read_command_lines, read_command_lines_1): Return counted_command_line.
3583 (free_command_lines): Use "delete".
3584 (copy_command_lines): Remove.
3585 (define_command, document_command, show_user_1): Update.
3586 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3587 a counted_command_line.
3588 * breakpoint.h (counted_command_line): Remove typedef.
3589 (breakpoint_set_commands): Update.
3590 * breakpoint.c (check_no_tracepoint_commands)
3591 (validate_commands_for_breakpoint): Update.
3592 (breakpoint_set_commands): Change commands to be a
3593 counted_command_line.
3594 (commands_command_1, update_dprintf_command_list)
3595 (create_tracepoint_from_upload): Update.
3597 2018-05-04 Tom Tromey <tom@tromey.com>
3599 * cli/cli-decode.h (cmd_list_element): New constructor.
3600 (~cmd_list_element): New destructor.
3601 (struct cmd_list_element): Add initializers.
3602 * cli/cli-decode.c (do_add_cmd): Use "new".
3603 (delete_cmd): Use "delete".
3605 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3606 Pedro Alves <palves@redhat.com>
3608 PR breakpoints/19806 and support for PR external/20207.
3609 * NEWS: Mention Aarch64 watchpoint improvements.
3610 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3611 watchpoints and PR external/20207 watchpoints.
3612 * nat/aarch64-linux-hw-point.c
3613 (kernel_supports_any_contiguous_range): New.
3614 (aarch64_watchpoint_offset): New.
3615 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3616 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3617 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3618 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3619 next_addr_orig_p. Support PR external/20207 watchpoints.
3620 (aarch64_downgrade_regs): New.
3621 (aarch64_dr_state_insert_one_point): New parameters offset and
3623 (aarch64_dr_state_remove_one_point): Likewise.
3624 (aarch64_handle_breakpoint): Update caller.
3625 (aarch64_handle_aligned_watchpoint): Likewise.
3626 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3628 (aarch64_linux_set_debug_regs): Remove const from state. Call
3629 aarch64_downgrade_regs.
3630 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3631 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3632 (DR_CONTROL_MASK): ... this.
3633 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3634 (unsigned int aarch64_watchpoint_offset): New prototype.
3635 (aarch64_linux_set_debug_regs): Remove const from state.
3636 * utils.c (align_up, align_down): Move to ...
3637 * common/common-utils.c (align_up, align_down): ... here.
3638 * utils.h (align_up, align_down): Move to ...
3639 * common/common-utils.h (align_up, align_down): ... here.
3641 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3643 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3644 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3645 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3646 Re-implement to match the ABI as summarized in GCC's
3647 gcc/config/sparc/sparc.c. All callers updated.
3648 (sparc32_store_arguments): Remove assertion.
3650 2018-05-04 Tom Tromey <tom@tromey.com>
3652 * printcmd.c: Don't include tui.h.
3653 (decode_format): Use skip_spaces.
3655 2018-05-04 Tom Tromey <tom@tromey.com>
3658 * printcmd.c (last_count): New global.
3659 (x_command): Use saved count when repeating.
3661 2018-05-04 Tom Tromey <tom@tromey.com>
3663 * nto-procfs.c (do_closedir_cleanup): Remove.
3664 (procfs_pidlist): Use gdb_dir_up.
3665 * procfs.c (do_closedir_cleanup): Remove.
3666 (proc_update_threads): Use gdb_dir_up.
3667 * common/filestuff.h (struct gdb_dir_deleter): New.
3668 (gdb_dir_up): New typedef.
3670 2018-05-04 Tom Tromey <tom@tromey.com>
3672 * ada-lang.c (print_mention_exception): Use std::string.
3674 2018-05-04 Tom Tromey <tom@tromey.com>
3676 * ada-lang.c (create_excep_cond_exprs): Update.
3677 (ada_exception_catchpoint_cond_string): Use std::string.
3679 2018-05-04 Tom Tromey <tom@tromey.com>
3681 * ada-lang.c (xget_renaming_scope): Return std::string.
3682 (old_renaming_is_invisible): Update.
3684 2018-05-04 Tom Tromey <tom@tromey.com>
3686 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3687 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3689 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3691 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3693 2018-05-04 Tom Tromey <tom@tromey.com>
3695 * remote.c (remote_query_supported_append): Change type.
3696 (remote_check_symbols): Update.
3698 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3701 * configure.ac: Prepend libpython.
3702 * python/python-config.py: Likewise.
3703 * configure: Regenerate.
3705 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3707 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3709 2018-05-03 Pedro Alves <palves@redhat.com>
3712 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3713 override. Write 'true' instead of '1'.
3714 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3717 2018-05-02 Pedro Alves <palves@redhat.com>
3719 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3720 add_inf_child_target.
3721 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3722 add_inf_child_target.
3723 * aix-thread.c (aix_thread_target_info): New.
3724 (aix_thread_target) <shortname, longname, doc>: Delete.
3726 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3727 add_inf_child_target.
3728 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3729 add_inf_child_target.
3730 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3731 add_inf_child_target.
3732 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3733 add_inf_child_target.
3734 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3735 add_inf_child_target.
3736 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3737 add_inf_child_target.
3738 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3739 add_inf_child_target.
3740 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3741 add_inf_child_target.
3742 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3743 add_inf_child_target.
3744 * bfd-target.c (target_bfd_target_info): New.
3745 (target_bfd) <shortname, longname, doc>: Delete.
3747 * bsd-kvm.c (bsd_kvm_target_info): New.
3748 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3750 (bsd_kvm_target::open): Rename to ...
3751 (bsd_kvm_target_open): ... this. Adjust.
3752 * bsd-uthread.c (bsd_uthread_target_info): New.
3753 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3755 * corefile.c (core_file_command): Adjust.
3756 * corelow.c (core_target_info): New.
3757 (core_target) <shortname, longname, doc>: Delete.
3759 (core_target::open): Rename to ...
3760 (core_target_open): ... this. Adjust.
3761 * ctf.c (ctf_target_info): New.
3762 (ctf_target) <shortname, longname, doc>: Delete.
3764 (ctf_target::open): Rename to ...
3765 (ctf_target_open): ... this.
3766 (_initialize_ctf): Adjust.
3767 * exec.c (exec_target_info): New.
3768 (exec_target) <shortname, longname, doc>: Delete.
3770 (exec_target::open): Rename to ...
3771 (exec_target_open): ... this.
3772 * gdbcore.h (core_target_open): Declare.
3773 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3774 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3775 add_inf_child_target.
3776 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3777 add_inf_child_target.
3778 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3779 add_inf_child_target.
3780 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3781 add_inf_child_target.
3782 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3783 add_inf_child_target.
3784 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3785 add_inf_child_target.
3786 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3787 add_inf_child_target.
3788 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3789 add_inf_child_target.
3790 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3791 add_inf_child_target.
3792 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3793 add_inf_child_target.
3794 * inf-child.c (inf_child_target_info): New.
3795 (inf_child_target::info): New.
3796 (inf_child_open_target): Remove 'target' parameter. Use
3797 get_native_target instead.
3798 (inf_child_target::open): Delete.
3799 (add_inf_child_target): New.
3800 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3803 (add_inf_child_target): Declare.
3804 (inf_child_open_target): Declare.
3805 * linux-thread-db.c (thread_db_target_info): New.
3806 (thread_db_target) <shortname, longname, doc>: Delete.
3808 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3809 add_inf_child_target.
3810 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3811 add_inf_child_target.
3812 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3813 add_inf_child_target.
3814 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3815 add_inf_child_target.
3816 * make-target-delegates (print_class): Adjust.
3817 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3818 add_inf_child_target.
3819 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3820 add_inf_child_target.
3821 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3822 add_inf_child_target.
3823 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3824 add_inf_child_target.
3825 * nto-procfs.c (nto_native_target_info): New.
3826 (nto_procfs_target_native) <shortname, longname, doc>:
3829 (nto_procfs_target_info): New.
3830 (nto_procfs_target_procfs) <shortname, longname, doc>:
3833 (init_procfs_targets): Adjust.
3834 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3835 add_inf_child_target.
3836 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3837 add_inf_child_target.
3838 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3839 add_inf_child_target.
3840 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3841 add_inf_child_target.
3842 * ravenscar-thread.c (ravenscar_target_info): New.
3843 (ravenscar_thread_target) <shortname, longname, doc>:
3846 * record-btrace.c (record_btrace_target_info):
3847 (record_btrace_target) <shortname, longname, doc>: Delete.
3849 (record_btrace_target::open): Rename to ...
3850 (record_btrace_target_open): ... this. Adjust.
3851 * record-full.c (record_longname, record_doc): New.
3852 (record_full_base_target) <shortname, longname, doc>: Delete.
3854 (record_full_target_info): New.
3855 (record_full_target): <shortname>: Delete.
3857 (record_full_core_open_1, record_full_open_1): Update comments.
3858 (record_full_base_target::open): Rename to ...
3859 (record_full_open): ... this.
3860 (cmd_record_full_restore): Update.
3861 (_initialize_record_full): Update.
3862 * remote-sim.c (remote_sim_target_info): New.
3863 (gdbsim_target) <shortname, longname, doc>: Delete.
3865 (gdbsim_target::open): Rename to ...
3866 (gdbsim_target_open): ... this.
3867 (_initialize_remote_sim): Adjust.
3868 * remote.c (remote_doc): New.
3869 (remote_target_info): New.
3870 (remote_target) <shortname, longname, doc>: Delete.
3872 (extended_remote_target_info): New.
3873 (extended_remote_target) <shortname, longname, doc>: Delete.
3875 (remote_target::open_1): Make static. Adjust.
3876 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3877 * s390-linux-nat.c (_initialize_s390_nat): Use
3878 add_inf_child_target.
3879 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3880 add_inf_child_target.
3881 * sol-thread.c (thread_db_target_info): New.
3882 (sol_thread_target) <shortname, longname, doc>: Delete.
3884 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3885 add_inf_child_target.
3886 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3887 add_inf_child_target.
3888 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3889 add_inf_child_target.
3890 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3891 add_inf_child_target.
3892 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3893 add_inf_child_target.
3894 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3895 add_inf_child_target.
3896 * spu-linux-nat.c (_initialize_spu_nat): Use
3897 add_inf_child_target.
3898 * spu-multiarch.c (spu_multiarch_target_info): New.
3899 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3901 * target-delegates.c: Regenerate.
3902 * target.c: Include <unordered_map>.
3903 (target_ops_p): Delete.
3904 (DEF_VEC_P(target_ops_p)): Delete.
3905 (target_factories): New.
3906 (test_target_info): New.
3907 (test_target_ops::info): New.
3908 (open_target): Adjust to use target_factories.
3909 (add_target_with_completer): Rename to ...
3910 (add_target): ... this. Change prototype. Register target_info
3911 and open callback in target_factories. Register target_info in
3912 command context instead of target_ops.
3913 (add_target): Delete old implementation.
3914 (add_deprecated_target_alias): Change prototype. Adjust.
3915 (the_native_target): New.
3916 (set_native_target, get_native_target): New.
3917 (find_default_run_target): Use the_native_target.
3918 (find_attach_target, find_run_target): Simplify.
3919 (target_ops::open): Delete.
3920 (dummy_target_info): New.
3921 (dummy_target::shortname, dummy_target::longname)
3922 (dummy_target::doc): Delete.
3923 (dummy_target::info): New.
3924 (debug_target::shortname, debug_target::longname)
3925 (debug_target::doc): Delete.
3926 (debug_target::info): New.
3927 * target.h (struct target_info): New.
3928 (target_ops::~target_ops): Add comment.
3929 (target_ops::info): New.
3930 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3931 longer virtual. Implement in terms of target_info.
3932 (set_native_target, get_native_target): Declare.
3933 (target_open_ftype): New.
3934 (add_target, add_target_with_completer)
3935 (add_deprecated_target_alias): Change prototype.
3936 (test_target) <shortname, longname, doc>: Delete.
3938 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3939 add_inf_child_target.
3940 * tracefile-tfile.c (tfile_target_info): New.
3941 (tfile_target) <shortname, longname, doc>: Delete.
3943 (tfile_target::open): Rename to ...
3944 (tfile_target_open): ... this.
3945 (_initialize_tracefile_tfile): Adjust.
3946 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3947 add_inf_child_target.
3948 * windows-nat.c (_initialize_windows_nat): Use
3949 add_inf_child_target.
3950 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3951 add_inf_child_target.
3953 2018-05-02 Pedro Alves <palves@redhat.com>
3955 * linux-nat.h (linux_nat_target) <low_new_thread,
3956 low_delete_thread, low_new_fork, low_forget_process,
3957 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3958 New virtual methods.
3959 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3960 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3961 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3962 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3963 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3965 * linux-fork.c (delete_fork): Adjust to call low method.
3966 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3967 (linux_nat_new_fork, linux_nat_forget_process_hook)
3968 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3969 (linux_nat_status_is_event):
3970 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3971 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3973 (sigtrap_is_event): Rename to ...
3974 (linux_nat_target::low_status_is_event): ... this.
3975 (linux_nat_set_status_is_event): Delete.
3976 (save_stop_reason, linux_nat_wait_1)
3977 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3979 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3980 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3981 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3982 (linux_nat_set_prepare_to_resume): Delete.
3983 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3984 low virtual methods.
3985 * amd64-linux-nat.c: Likewise.
3986 * arm-linux-nat.c: Likewise.
3987 * i386-linux-nat.c: Likewise.
3988 * ia64-linux-nat.c: Likewise.
3989 * mips-linux-nat.c: Likewise.
3990 * ppc-linux-nat.c: Likewise.
3991 * s390-linux-nat.c: Likewise.
3992 * sparc64-linux-nat.c: Likewise.
3993 * x86-linux-nat.c: Likewise.
3994 * x86-linux-nat.h: Include "nat/x86-linux.h".
3995 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3996 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3999 2018-05-02 Pedro Alves <palves@redhat.com>
4001 * target.h (target_ops)
4002 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4003 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4004 stopped_by_watchpoint, have_continuable_watchpoint,
4005 stopped_data_address, watchpoint_addr_within_range,
4006 can_accel_watchpoint_condition, can_run, thread_alive,
4007 has_all_memory, has_memory, has_stack, has_registers,
4008 has_execution, can_async_p, is_async_p, supports_non_stop,
4009 always_non_stop_p, can_execute_reverse, supports_multi_process,
4010 supports_enable_disable_tracepoint,
4011 supports_disable_randomization, supports_string_tracing,
4012 supports_evaluation_of_breakpoint_conditions,
4013 can_run_breakpoint_commands, filesystem_is_local,
4014 can_download_tracepoint, get_trace_state_variable_value,
4015 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4016 record_is_replaying, record_will_replay,
4017 augmented_libraries_svr4_read>: Adjust to return bool.
4018 * aarch64-linux-nat.c: All implementations adjusted.
4019 * aix-thread.c: All implementations adjusted.
4020 * arm-linux-nat.c: All implementations adjusted.
4021 * breakpoint.c: All implementations adjusted.
4022 * bsd-kvm.c: All implementations adjusted.
4023 * bsd-uthread.c: All implementations adjusted.
4024 * corelow.c: All implementations adjusted.
4025 * ctf.c: All implementations adjusted.
4026 * darwin-nat.c: All implementations adjusted.
4027 * darwin-nat.h: All implementations adjusted.
4028 * exec.c: All implementations adjusted.
4029 * fbsd-nat.c: All implementations adjusted.
4030 * fbsd-nat.h: All implementations adjusted.
4031 * gnu-nat.c: All implementations adjusted.
4032 * gnu-nat.h: All implementations adjusted.
4033 * go32-nat.c: All implementations adjusted.
4034 * ia64-linux-nat.c: All implementations adjusted.
4035 * inf-child.c: All implementations adjusted.
4036 * inf-child.h: All implementations adjusted.
4037 * inf-ptrace.c: All implementations adjusted.
4038 * inf-ptrace.h: All implementations adjusted.
4039 * linux-nat.c: All implementations adjusted.
4040 * linux-nat.h: All implementations adjusted.
4041 * mips-linux-nat.c: All implementations adjusted.
4042 * nto-procfs.c: All implementations adjusted.
4043 * ppc-linux-nat.c: All implementations adjusted.
4044 * procfs.c: All implementations adjusted.
4045 * ravenscar-thread.c: All implementations adjusted.
4046 * record-btrace.c: All implementations adjusted.
4047 * record-full.c: All implementations adjusted.
4048 * remote-sim.c: All implementations adjusted.
4049 * remote.c: All implementations adjusted.
4050 * s390-linux-nat.c: All implementations adjusted.
4051 * sol-thread.c: All implementations adjusted.
4052 * spu-multiarch.c: All implementations adjusted.
4053 * target-delegates.c: All implementations adjusted.
4054 * target.c: All implementations adjusted.
4055 * target.h: All implementations adjusted.
4056 * tracefile-tfile.c: All implementations adjusted.
4057 * tracefile.c: All implementations adjusted.
4058 * tracefile.h: All implementations adjusted.
4059 * windows-nat.c: All implementations adjusted.
4060 * x86-linux-nat.h: All implementations adjusted.
4061 * x86-nat.h: All implementations adjusted.
4063 2018-05-02 Pedro Alves <palves@redhat.com>
4065 * make-target-delegates (scan_target_h): Don't trim lines here.
4066 Replace sequences of tabs and/or whitespace with a single
4068 (top level, parsing methods): Trim each line before processing it
4071 2018-05-02 Pedro Alves <palves@redhat.com>
4072 John Baldwin <jhb@freebsd.org>
4074 * target.h (enum strata) <debug_stratum>: New.
4075 (struct target_ops) <all delegation methods>: Replace by C++
4076 virtual methods, and drop "to_" prefix. All references updated
4078 <to_shortname, to_longname, to_doc, to_data,
4079 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4080 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4081 virtual methods. All references updated throughout.
4082 <can_attach, supports_terminal_ours, can_create_inferior,
4083 get_thread_control_capabilities, attach_no_wait>: New
4085 <insert_breakpoint, remove_breakpoint>: Now
4086 TARGET_DEFAULT_NORETURN methods.
4087 <info_proc>: Now returns bool.
4089 (OPS_MAGIC): Delete.
4090 (current_target): Delete. All references replaced by references
4092 (target_stack): ... this. New.
4093 (target_shortname, target_longname): Adjust.
4094 (target_can_run): Now a function declaration.
4095 (default_child_has_all_memory, default_child_has_memory)
4096 (default_child_has_stack, default_child_has_registers)
4097 (default_child_has_execution): Remove target_ops parameter.
4098 (complete_target_initialization): Delete.
4099 (memory_breakpoint_target): New template class.
4100 (test_target_ops): Refactor as a C++ class with virtual methods.
4101 * make-target-delegates (NAME_PART): Tighten.
4102 (POINTER_PART, CP_SYMBOL): New.
4103 (SIMPLE_RETURN_PART): Reimplement.
4104 (VEC_RETURN_PART): Expect less.
4105 (RETURN_PART, VIRTUAL_PART): New.
4106 (METHOD): Adjust to C++ virtual methods.
4107 (scan_target_h): Remove reference to C99.
4108 (dname): Output "target_ops::" prefix.
4109 (write_function_header): Adjust to output a C++ class method.
4110 (write_declaration): New.
4111 (write_delegator): Adjust to output a C++ class method.
4112 (tdname): Output "dummy_target::" prefix.
4113 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4115 (tdefault_names, debug_names): Delete.
4116 (return_types, tdefaults, styles, argtypes_array): New.
4117 (top level): All methods are delegators.
4119 (top level): Print dummy_target and debug_target classes.
4120 * target-delegates.c: Regenerate.
4121 * target-debug.h (target_debug_print_enum_info_proc_what)
4122 (target_debug_print_thread_control_capabilities)
4123 (target_debug_print_thread_info_p): New.
4124 * target.c (dummy_target): Delete.
4125 (the_dummy_target, the_debug_target): New.
4126 (target_stack): Now extern.
4127 (set_targetdebug): Push/unpush debug target.
4128 (default_child_has_all_memory, default_child_has_memory)
4129 (default_child_has_stack, default_child_has_registers)
4130 (default_child_has_execution): Remove target_ops parameter.
4131 (complete_target_initialization): Delete.
4132 (add_target_with_completer): No longer call
4133 complete_target_initialization.
4134 (target_supports_terminal_ours): Use regular delegation.
4135 (update_current_target): Delete.
4136 (push_target): No longer check magic number. Don't call
4137 update_current_target.
4138 (unpush_target): Don't call update_current_target.
4139 (target_is_pushed): No longer check magic number.
4140 (target_require_runnable): Skip for all stratums over
4142 (target_ops::info_proc): New.
4143 (target_info_proc): Use find_target_at and
4144 find_default_run_target.
4145 (target_supports_disable_randomization): Use regular delegation.
4146 (target_get_osdata): Use find_target_at.
4147 (target_ops::open, target_ops::close, target_ops::can_attach)
4148 (target_ops::attach, target_ops::can_create_inferior)
4149 (target_ops::create_inferior, target_ops::can_run)
4150 (target_can_run): New.
4151 (default_fileio_target): Use regular delegation.
4152 (target_ops::fileio_open, target_ops::fileio_pwrite)
4153 (target_ops::fileio_pread, target_ops::fileio_fstat)
4154 (target_ops::fileio_close, target_ops::fileio_unlink)
4155 (target_ops::fileio_readlink): New.
4156 (target_fileio_open_1, target_fileio_unlink)
4157 (target_fileio_readlink): Always call the target method. Handle
4159 (return_zero, return_zero_has_execution): Delete.
4160 (init_dummy_target): Delete.
4161 (dummy_target::dummy_target, dummy_target::shortname)
4162 (dummy_target::longname, dummy_target::doc)
4163 (debug_target::debug_target, debug_target::shortname)
4164 (debug_target::longname, debug_target::doc): New.
4165 (target_supports_delete_record): Use regular delegation.
4166 (setup_target_debug): Delete.
4167 (maintenance_print_target_stack): Skip debug_stratum.
4168 (initialize_targets): Instantiate the_dummy_target and
4170 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4172 (target_auxv_search, fprint_target_auxv): Adjust.
4173 (info_auxv_command): Adjust to use target_stack.
4174 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4175 * exceptions.c (print_flush): Handle a NULL target_stack.
4176 * regcache.c (target_ops_no_register): Refactor as class with
4179 * exec.c (exec_target): New class.
4180 (exec_ops): Now an exec_target.
4181 (exec_open, exec_close_1, exec_get_section_table)
4182 (exec_xfer_partial, exec_files_info, exec_has_memory)
4183 (exec_make_note_section): Refactor as exec_target methods.
4184 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4186 (exec_target::find_memory_regions): New.
4187 (_initialize_exec): Don't call init_exec_ops.
4188 * gdbcore.h (exec_file_clear): Delete.
4190 * corefile.c (core_target): Delete.
4191 (core_file_command): Adjust.
4192 * corelow.c (core_target): New class.
4193 (the_core_target): New.
4194 (core_close): Remove target_ops parameter.
4195 (core_close_cleanup): Adjust.
4196 (core_target::close): New.
4197 (core_open, core_detach, get_core_registers, core_files_info)
4198 (core_xfer_partial, core_thread_alive, core_read_description)
4199 (core_pid_to_str, core_thread_name, core_has_memory)
4200 (core_has_stack, core_has_registers, core_info_proc): Rework as
4201 core_target methods.
4202 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4203 (_initialize_corelow): Initialize the_core_target.
4204 * gdbcore.h (core_target): Delete.
4205 (the_core_target): New.
4207 * ctf.c: (ctf_target): New class.
4208 (ctf_ops): Now a ctf_target.
4209 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4210 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4211 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4213 (init_ctf_ops): Delete.
4214 (_initialize_ctf): Don't call it.
4215 * tracefile-tfile.c (tfile_target): New class.
4216 (tfile_ops): Now a tfile_target.
4217 (tfile_open, tfile_close, tfile_files_info)
4218 (tfile_get_tracepoint_status, tfile_trace_find)
4219 (tfile_fetch_registers, tfile_xfer_partial)
4220 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4221 Refactor as tfile_target methods.
4222 (tfile_xfer_partial_features): Remove target_ops parameter.
4223 (init_tfile_ops): Delete.
4224 (_initialize_tracefile_tfile): Don't call it.
4225 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4226 (tracefile_has_stack, tracefile_has_registers)
4227 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4228 tracefile_target methods.
4229 (init_tracefile_ops): Delete.
4230 (tracefile_target::tracefile_target): New.
4231 * tracefile.h: Include "target.h".
4232 (tracefile_target): New class.
4233 (init_tracefile_ops): Delete.
4235 * spu-multiarch.c (spu_multiarch_target): New class.
4236 (spu_ops): Now a spu_multiarch_target.
4237 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4238 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4239 (spu_search_memory, spu_mourn_inferior): Refactor as
4240 spu_multiarch_target methods.
4241 (init_spu_ops): Delete.
4242 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4243 complete_target_initialization.
4245 * ravenscar-thread.c (ravenscar_thread_target): New class.
4246 (ravenscar_ops): Now a ravenscar_thread_target.
4247 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4248 (ravenscar_thread_alive, ravenscar_pid_to_str)
4249 (ravenscar_fetch_registers, ravenscar_store_registers)
4250 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4251 (ravenscar_stopped_by_hw_breakpoint)
4252 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4253 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4254 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4256 (init_ravenscar_thread_ops): Delete.
4257 (_initialize_ravenscar): Remove references to
4258 init_ravenscar_thread_ops and complete_target_initialization.
4260 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4261 (bsd_uthread_target): New class.
4262 (bsd_uthread_ops): Now a bsd_uthread_target.
4263 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4264 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4265 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4266 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4267 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4268 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4269 (bsd_uthread_target): Delete function.
4270 (_initialize_bsd_uthread): Remove reference to
4271 complete_target_initialization.
4273 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4274 (target_bfd): ... this new class.
4275 (target_bfd_xfer_partial, target_bfd_get_section_table)
4276 (target_bfd_close): Refactor as target_bfd methods.
4277 (target_bfd::~target_bfd): New.
4278 (target_bfd_reopen): Adjust.
4279 (target_bfd::close): New.
4281 * record-btrace.c (record_btrace_target): New class.
4282 (record_btrace_ops): Now a record_btrace_target.
4283 (record_btrace_open, record_btrace_stop_recording)
4284 (record_btrace_disconnect, record_btrace_close)
4285 (record_btrace_async, record_btrace_info)
4286 (record_btrace_insn_history, record_btrace_insn_history_range)
4287 (record_btrace_insn_history_from, record_btrace_call_history)
4288 (record_btrace_call_history_range)
4289 (record_btrace_call_history_from, record_btrace_record_method)
4290 (record_btrace_is_replaying, record_btrace_will_replay)
4291 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4292 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4293 (record_btrace_store_registers, record_btrace_prepare_to_store)
4294 (record_btrace_to_get_unwinder)
4295 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4296 (record_btrace_commit_resume, record_btrace_wait)
4297 (record_btrace_stop, record_btrace_can_execute_reverse)
4298 (record_btrace_stopped_by_sw_breakpoint)
4299 (record_btrace_supports_stopped_by_sw_breakpoint)
4300 (record_btrace_stopped_by_hw_breakpoint)
4301 (record_btrace_supports_stopped_by_hw_breakpoint)
4302 (record_btrace_update_thread_list, record_btrace_thread_alive)
4303 (record_btrace_goto_begin, record_btrace_goto_end)
4304 (record_btrace_goto, record_btrace_stop_replaying_all)
4305 (record_btrace_execution_direction)
4306 (record_btrace_prepare_to_generate_core)
4307 (record_btrace_done_generating_core): Refactor as
4308 record_btrace_target methods.
4309 (init_record_btrace_ops): Delete.
4310 (_initialize_record_btrace): Remove reference to
4311 init_record_btrace_ops.
4312 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4313 the execution_direction global.
4314 (record_full_base_target, record_full_target)
4315 (record_full_core_target): New classes.
4316 (record_full_ops): Now a record_full_target.
4317 (record_full_core_ops): Now a record_full_core_target.
4318 (record_full_target::detach, record_full_target::disconnect)
4319 (record_full_core_target::disconnect)
4320 (record_full_target::mourn_inferior, record_full_target::kill):
4322 (record_full_open, record_full_close, record_full_async): Refactor
4323 as methods of the record_full_base_target class.
4324 (record_full_resume, record_full_commit_resume): Refactor
4325 as methods of the record_full_target class.
4326 (record_full_wait, record_full_stopped_by_watchpoint)
4327 (record_full_stopped_data_address)
4328 (record_full_stopped_by_sw_breakpoint)
4329 (record_full_supports_stopped_by_sw_breakpoint)
4330 (record_full_stopped_by_hw_breakpoint)
4331 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4332 methods of the record_full_base_target class.
4333 (record_full_store_registers, record_full_xfer_partial)
4334 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4335 Refactor as methods of the record_full_target class.
4336 (record_full_can_execute_reverse, record_full_get_bookmark)
4337 (record_full_goto_bookmark, record_full_execution_direction)
4338 (record_full_record_method, record_full_info, record_full_delete)
4339 (record_full_is_replaying, record_full_will_replay)
4340 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4341 (record_full_stop_replaying): Refactor as methods of the
4342 record_full_base_target class.
4343 (record_full_core_resume, record_full_core_kill)
4344 (record_full_core_fetch_registers)
4345 (record_full_core_prepare_to_store)
4346 (record_full_core_store_registers, record_full_core_xfer_partial)
4347 (record_full_core_insert_breakpoint)
4348 (record_full_core_remove_breakpoint)
4349 (record_full_core_has_execution): Refactor
4350 as methods of the record_full_core_target class.
4351 (record_full_base_target::supports_delete_record): New.
4352 (init_record_full_ops): Delete.
4353 (init_record_full_core_ops): Delete.
4354 (record_full_save): Refactor as method of the
4355 record_full_base_target class.
4356 (_initialize_record_full): Remove references to
4357 init_record_full_ops and init_record_full_core_ops.
4359 * remote.c (remote_target, extended_remote_target): New classes.
4360 (remote_ops): Now a remote_target.
4361 (extended_remote_ops): Now an extended_remote_target.
4362 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4363 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4364 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4365 (remote_pass_signals, remote_set_syscall_catchpoint)
4366 (remote_program_signals, )
4367 (remote_thread_always_alive): Remove target_ops parameter.
4368 (remote_thread_alive, remote_thread_name)
4369 (remote_update_thread_list, remote_threads_extra_info)
4370 (remote_static_tracepoint_marker_at)
4371 (remote_static_tracepoint_markers_by_strid)
4372 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4373 (remote_open): Refactor as methods of remote_target.
4374 (extended_remote_open, extended_remote_detach)
4375 (extended_remote_attach, extended_remote_post_attach):
4376 (extended_remote_supports_disable_randomization)
4377 (extended_remote_create_inferior): : Refactor as method of
4378 extended_remote_target.
4379 (remote_set_permissions, remote_open_1, remote_detach)
4380 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4381 (remote_resume, remote_commit_resume, remote_stop)
4382 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4383 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4384 (remote_prepare_to_store, remote_store_registers)
4385 (remote_flash_erase, remote_flash_done, remote_files_info)
4386 (remote_kill, remote_mourn, remote_insert_breakpoint)
4387 (remote_remove_breakpoint, remote_insert_watchpoint)
4388 (remote_watchpoint_addr_within_range)
4389 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4390 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4391 (remote_supports_stopped_by_sw_breakpoint)
4392 (remote_stopped_by_hw_breakpoint)
4393 (remote_supports_stopped_by_hw_breakpoint)
4394 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4395 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4396 (remote_verify_memory): Refactor as methods of remote_target.
4397 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4399 (remote_xfer_partial, remote_get_memory_xfer_limit)
4400 (remote_search_memory, remote_rcmd, remote_memory_map)
4401 (remote_pid_to_str, remote_get_thread_local_address)
4402 (remote_get_tib_address, remote_read_description): Refactor as
4403 methods of remote_target.
4404 (remote_target::fileio_open, remote_target::fileio_pwrite)
4405 (remote_target::fileio_pread, remote_target::fileio_close): New.
4406 (remote_hostio_readlink, remote_hostio_fstat)
4407 (remote_filesystem_is_local, remote_can_execute_reverse)
4408 (remote_supports_non_stop, remote_supports_disable_randomization)
4409 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4410 (remote_supports_enable_disable_tracepoint)
4411 (remote_supports_string_tracing)
4412 (remote_can_run_breakpoint_commands, remote_trace_init)
4413 (remote_download_tracepoint, remote_can_download_tracepoint)
4414 (remote_download_trace_state_variable, remote_enable_tracepoint)
4415 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4416 (remote_trace_start, remote_get_trace_status)
4417 (remote_get_tracepoint_status, remote_trace_stop)
4418 (remote_trace_find, remote_get_trace_state_variable_value)
4419 (remote_save_trace_data, remote_get_raw_trace_data)
4420 (remote_set_disconnected_tracing, remote_core_of_thread)
4421 (remote_set_circular_trace_buffer, remote_traceframe_info)
4422 (remote_get_min_fast_tracepoint_insn_len)
4423 (remote_set_trace_buffer_size, remote_set_trace_notes)
4424 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4425 (remote_disable_btrace, remote_teardown_btrace)
4426 (remote_read_btrace, remote_btrace_conf)
4427 (remote_augmented_libraries_svr4_read, remote_load)
4428 (remote_pid_to_exec_file, remote_can_do_single_step)
4429 (remote_execution_direction, remote_thread_handle_to_thread_info):
4430 Refactor as methods of remote_target.
4431 (init_remote_ops, init_extended_remote_ops): Delete.
4432 (remote_can_async_p, remote_is_async_p, remote_async)
4433 (remote_thread_events, remote_upload_tracepoints)
4434 (remote_upload_trace_state_variables): Refactor as methods of
4436 (_initialize_remote): Remove references to init_remote_ops and
4437 init_extended_remote_ops.
4439 * remote-sim.c (gdbsim_target): New class.
4440 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4441 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4442 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4443 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4444 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4445 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4446 Refactor as methods of gdbsim_target.
4447 (gdbsim_ops): Now a gdbsim_target.
4448 (init_gdbsim_ops): Delete.
4449 (gdbsim_cntrl_c): Adjust.
4450 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4452 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4453 (the_amd64_linux_nat_target): New.
4454 (amd64_linux_fetch_inferior_registers)
4455 (amd64_linux_store_inferior_registers): Refactor as methods of
4456 amd64_linux_nat_target.
4457 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4458 * i386-linux-nat.c: Don't include "linux-nat.h".
4459 (i386_linux_nat_target): New class.
4460 (the_i386_linux_nat_target): New.
4461 (i386_linux_fetch_inferior_registers)
4462 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4463 as methods of i386_linux_nat_target.
4464 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4465 * inf-child.c (inf_child_ops): Delete.
4466 (inf_child_fetch_inferior_registers)
4467 (inf_child_store_inferior_registers): Delete.
4468 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4469 methods of inf_child_target.
4470 (inf_child_target::supports_terminal_ours)
4471 (inf_child_target::terminal_init)
4472 (inf_child_target::terminal_inferior)
4473 (inf_child_target::terminal_ours_for_output)
4474 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4475 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4477 (inf_child_open, inf_child_disconnect, inf_child_close)
4478 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4479 (inf_child_post_startup_inferior, inf_child_can_run)
4480 (inf_child_pid_to_exec_file): Refactor as methods of
4482 (inf_child_follow_fork): Delete.
4483 (inf_child_target::can_create_inferior)
4484 (inf_child_target::can_attach): New.
4485 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4486 (inf_child_target::has_stack, inf_child_target::has_registers)
4487 (inf_child_target::has_execution): New.
4488 (inf_child_fileio_open, inf_child_fileio_pwrite)
4489 (inf_child_fileio_pread, inf_child_fileio_fstat)
4490 (inf_child_fileio_close, inf_child_fileio_unlink)
4491 (inf_child_fileio_readlink, inf_child_use_agent)
4492 (inf_child_can_use_agent): Refactor as methods of
4494 (return_zero, inf_child_target): Delete.
4495 (inf_child_target::inf_child_target): New.
4496 * inf-child.h: Include "target.h".
4497 (inf_child_target): Delete function prototype.
4498 (inf_child_target): New class.
4499 (inf_child_open_target, inf_child_mourn_inferior)
4500 (inf_child_maybe_unpush_target): Delete.
4501 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4502 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4503 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4504 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4505 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4506 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4507 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4508 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4509 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4510 methods of inf_ptrace_target.
4511 (inf_ptrace_target): Delete function.
4512 * inf-ptrace.h: Include "inf-child.h".
4513 (inf_ptrace_target): Delete function declaration.
4514 (inf_ptrace_target): New class.
4515 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4516 * linux-nat.c (linux_target): New.
4517 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4518 (linux_nat_target::~linux_nat_target): New.
4519 (linux_child_post_attach, linux_child_post_startup_inferior)
4520 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4521 (linux_child_remove_fork_catchpoint)
4522 (linux_child_insert_vfork_catchpoint)
4523 (linux_child_remove_vfork_catchpoint)
4524 (linux_child_insert_exec_catchpoint)
4525 (linux_child_remove_exec_catchpoint)
4526 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4527 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4528 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4529 (linux_nat_stopped_data_address)
4530 (linux_nat_stopped_by_sw_breakpoint)
4531 (linux_nat_supports_stopped_by_sw_breakpoint)
4532 (linux_nat_stopped_by_hw_breakpoint)
4533 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4534 (linux_nat_kill, linux_nat_mourn_inferior)
4535 (linux_nat_xfer_partial, linux_nat_thread_alive)
4536 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4537 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4538 (linux_child_static_tracepoint_markers_by_strid)
4539 (linux_nat_is_async_p, linux_nat_can_async_p)
4540 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4541 (linux_nat_supports_multi_process)
4542 (linux_nat_supports_disable_randomization, linux_nat_async)
4543 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4544 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4545 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4546 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4547 methods of linux_nat_target.
4548 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4549 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4551 (check_stopped_by_watchpoint): Adjust.
4552 (linux_xfer_partial): Delete.
4553 (linux_target_install_ops, linux_target, linux_nat_add_target):
4555 (linux_nat_target::linux_nat_target): New.
4556 * linux-nat.h: Include "inf-ptrace.h".
4557 (linux_nat_target): New.
4558 (linux_target, linux_target_install_ops, linux_nat_add_target):
4559 Delete function declarations.
4560 (linux_target): Declare global.
4561 * linux-thread-db.c (thread_db_target): New.
4562 (thread_db_target::thread_db_target): New.
4563 (thread_db_ops): Delete.
4564 (the_thread_db_target): New.
4565 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4566 (thread_db_update_thread_list, thread_db_pid_to_str)
4567 (thread_db_extra_thread_info)
4568 (thread_db_thread_handle_to_thread_info)
4569 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4570 (thread_db_resume): Refactor as methods of thread_db_target.
4571 (init_thread_db_ops): Delete.
4572 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4573 * x86-linux-nat.c: Don't include "linux-nat.h".
4574 (super_post_startup_inferior): Delete.
4575 (x86_linux_nat_target::~x86_linux_nat_target): New.
4576 (x86_linux_child_post_startup_inferior)
4577 (x86_linux_read_description, x86_linux_enable_btrace)
4578 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4579 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4580 methods of x86_linux_nat_target.
4581 (x86_linux_create_target): Delete. Bits folded ...
4582 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4584 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4585 (x86_linux_nat_target): New class.
4586 (x86_linux_create_target): Delete.
4587 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4588 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4589 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4590 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4591 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4592 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4594 (x86_use_watchpoints): Delete.
4595 * x86-nat.h: Include "breakpoint.h" and "target.h".
4596 (x86_use_watchpoints): Delete.
4597 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4598 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4599 (x86_insert_watchpoint, x86_remove_watchpoint)
4600 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4601 (x86_stopped_by_hw_breakpoint): New declarations.
4602 (x86_nat_target): New template class.
4604 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4605 (the_ppc_linux_nat_target): New.
4606 (ppc_linux_fetch_inferior_registers)
4607 (ppc_linux_can_use_hw_breakpoint)
4608 (ppc_linux_region_ok_for_hw_watchpoint)
4609 (ppc_linux_ranged_break_num_registers)
4610 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4611 (ppc_linux_insert_mask_watchpoint)
4612 (ppc_linux_remove_mask_watchpoint)
4613 (ppc_linux_can_accel_watchpoint_condition)
4614 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4615 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4616 (ppc_linux_watchpoint_addr_within_range)
4617 (ppc_linux_masked_watch_num_registers)
4618 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4619 (ppc_linux_read_description): Refactor as methods of
4620 ppc_linux_nat_target.
4621 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4623 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4624 (procfs_target): New class.
4625 (the_procfs_target): New.
4626 (procfs_target): Delete function.
4627 (procfs_auxv_parse, procfs_attach, procfs_detach)
4628 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4629 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4630 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4631 (procfs_create_inferior, procfs_update_thread_list)
4632 (procfs_thread_alive, procfs_pid_to_str)
4633 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4634 (procfs_stopped_data_address, procfs_insert_watchpoint)
4635 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4636 (proc_find_memory_regions, procfs_info_proc)
4637 (procfs_make_note_section): Refactor as methods of procfs_target.
4638 (_initialize_procfs): Adjust.
4639 * sol-thread.c (sol_thread_target): New class.
4640 (sol_thread_ops): Now a sol_thread_target.
4641 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4642 (sol_thread_fetch_registers, sol_thread_store_registers)
4643 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4644 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4645 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4646 (init_sol_thread_ops): Delete.
4647 (_initialize_sol_thread): Adjust. Remove references to
4648 init_sol_thread_ops and complete_target_initialization.
4650 * windows-nat.c (windows_nat_target): New class.
4651 (windows_fetch_inferior_registers)
4652 (windows_store_inferior_registers, windows_resume, windows_wait)
4653 (windows_attach, windows_detach, windows_pid_to_exec_file)
4654 (windows_files_info, windows_create_inferior)
4655 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4656 (windows_close, windows_pid_to_str, windows_xfer_partial)
4657 (windows_get_tib_address, windows_get_ada_task_ptid)
4658 (windows_thread_name, windows_thread_alive): Refactor as
4659 windows_nat_target methods.
4660 (do_initial_windows_stuff): Adjust.
4661 (windows_target): Delete function.
4662 (_initialize_windows_nat): Adjust.
4664 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4665 (darwin_mourn_inferior, darwin_kill_inferior)
4666 (darwin_create_inferior, darwin_attach, darwin_detach)
4667 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4668 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4669 (darwin_supports_multi_process): Refactor as darwin_nat_target
4671 (darwin_resume_to, darwin_files_info): Delete.
4672 (_initialize_darwin_inferior): Rename to ...
4673 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4674 * darwin-nat.h: Include "inf-child.h".
4675 (darwin_nat_target): New class.
4676 (darwin_complete_target): Delete.
4677 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4678 (darwin_target): New.
4679 (i386_darwin_fetch_inferior_registers)
4680 (i386_darwin_store_inferior_registers): Refactor as methods of
4682 (darwin_complete_target): Delete, with ...
4683 (_initialize_i386_darwin_nat): ... bits factored out here.
4685 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4686 (the_alpha_linux_nat_target): New.
4687 (alpha_linux_register_u_offset): Refactor as
4688 alpha_linux_nat_target method.
4689 (_initialize_alpha_linux_nat): Adjust.
4690 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4691 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4692 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4693 methods of linux_nat_trad_target.
4694 (linux_trad_target): Delete.
4695 * linux-nat-trad.h (linux_trad_target): Delete function.
4696 (linux_nat_trad_target): New class.
4697 * mips-linux-nat.c (mips_linux_nat_target): New class.
4698 (super_fetch_registers, super_store_registers, super_close):
4700 (the_mips_linux_nat_target): New.
4701 (mips64_linux_regsets_fetch_registers)
4702 (mips64_linux_regsets_store_registers)
4703 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4704 (mips_linux_register_u_offset, mips_linux_read_description)
4705 (mips_linux_can_use_hw_breakpoint)
4706 (mips_linux_stopped_by_watchpoint)
4707 (mips_linux_stopped_data_address)
4708 (mips_linux_region_ok_for_hw_watchpoint)
4709 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4710 (mips_linux_close): Refactor as methods of mips_linux_nat.
4711 (_initialize_mips_linux_nat): Adjust to C++ification.
4713 * aix-thread.c (aix_thread_target): New class.
4714 (aix_thread_ops): Now an aix_thread_target.
4715 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4716 (aix_thread_fetch_registers, aix_thread_store_registers)
4717 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4718 (aix_thread_thread_alive, aix_thread_pid_to_str)
4719 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4720 Refactor as methods of aix_thread_target.
4721 (init_aix_thread_ops): Delete.
4722 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4723 and complete_target_initialization.
4724 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4725 (rs6000_nat_target): New class.
4726 (the_rs6000_nat_target): New.
4727 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4728 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4729 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4730 (super_create_inferior): Delete.
4731 (_initialize_rs6000_nat): Adjust to C++ification.
4733 * arm-linux-nat.c (arm_linux_nat_target): New class.
4734 (the_arm_linux_nat_target): New.
4735 (arm_linux_fetch_inferior_registers)
4736 (arm_linux_store_inferior_registers, arm_linux_read_description)
4737 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4738 (arm_linux_remove_hw_breakpoint)
4739 (arm_linux_region_ok_for_hw_watchpoint)
4740 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4741 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4742 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4743 arm_linux_nat_target.
4744 (_initialize_arm_linux_nat): Adjust to C++ification.
4746 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4747 (the_aarch64_linux_nat_target): New.
4748 (aarch64_linux_fetch_inferior_registers)
4749 (aarch64_linux_store_inferior_registers)
4750 (aarch64_linux_child_post_startup_inferior)
4751 (aarch64_linux_read_description)
4752 (aarch64_linux_can_use_hw_breakpoint)
4753 (aarch64_linux_insert_hw_breakpoint)
4754 (aarch64_linux_remove_hw_breakpoint)
4755 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4756 (aarch64_linux_region_ok_for_hw_watchpoint)
4757 (aarch64_linux_stopped_data_address)
4758 (aarch64_linux_stopped_by_watchpoint)
4759 (aarch64_linux_watchpoint_addr_within_range)
4760 (aarch64_linux_can_do_single_step): Refactor as methods of
4761 aarch64_linux_nat_target.
4762 (super_post_startup_inferior): Delete.
4763 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4765 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4766 (the_hppa_linux_nat_target): New.
4767 (hppa_linux_fetch_inferior_registers)
4768 (hppa_linux_store_inferior_registers): Refactor as methods of
4769 hppa_linux_nat_target.
4770 (_initialize_hppa_linux_nat): Adjust to C++ification.
4772 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4773 (the_ia64_linux_nat_target): New.
4774 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4775 (ia64_linux_stopped_data_address)
4776 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4777 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4778 ia64_linux_nat_target methods.
4779 (super_xfer_partial): Delete.
4780 (_initialize_ia64_linux_nat): Adjust to C++ification.
4782 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4783 (the_m32r_linux_nat_target): New.
4784 (m32r_linux_fetch_inferior_registers)
4785 (m32r_linux_store_inferior_registers): Refactor as
4786 m32r_linux_nat_target methods.
4787 (_initialize_m32r_linux_nat): Adjust to C++ification.
4789 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4790 (the_m68k_linux_nat_target): New.
4791 (m68k_linux_fetch_inferior_registers)
4792 (m68k_linux_store_inferior_registers): Refactor as
4793 m68k_linux_nat_target methods.
4794 (_initialize_m68k_linux_nat): Adjust to C++ification.
4796 * s390-linux-nat.c (s390_linux_nat_target): New class.
4797 (the_s390_linux_nat_target): New.
4798 (s390_linux_fetch_inferior_registers)
4799 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4800 (s390_insert_watchpoint, s390_remove_watchpoint)
4801 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4802 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4803 (s390_auxv_parse, s390_read_description): Refactor as methods of
4804 s390_linux_nat_target.
4805 (_initialize_s390_nat): Adjust to C++ification.
4807 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4808 (the_sparc_linux_nat_target): New.
4809 (_initialize_sparc_linux_nat): Adjust to C++ification.
4810 * sparc-nat.c (sparc_fetch_inferior_registers)
4811 (sparc_store_inferior_registers): Remove target_ops parameter.
4812 * sparc-nat.h (sparc_fetch_inferior_registers)
4813 (sparc_store_inferior_registers): Remove target_ops parameter.
4814 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4815 (the_sparc64_linux_nat_target): New.
4816 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4818 * spu-linux-nat.c (spu_linux_nat_target): New class.
4819 (the_spu_linux_nat_target): New.
4820 (spu_child_post_startup_inferior, spu_child_post_attach)
4821 (spu_child_wait, spu_fetch_inferior_registers)
4822 (spu_store_inferior_registers, spu_xfer_partial)
4823 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4825 (_initialize_spu_nat): Adjust to C++ification.
4827 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4828 (the_tilegx_linux_nat_target): New.
4829 (fetch_inferior_registers, store_inferior_registers):
4830 Refactor as methods.
4831 (_initialize_tile_linux_nat): Adjust to C++ification.
4833 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4834 (the_xtensa_linux_nat_target): New.
4835 (xtensa_linux_fetch_inferior_registers)
4836 (xtensa_linux_store_inferior_registers): Refactor as
4837 xtensa_linux_nat_target methods.
4838 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4840 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4841 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4842 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4843 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4844 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4845 (fbsd_stopped_by_sw_breakpoint)
4846 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4847 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4848 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4849 (fbsd_post_startup_inferior, fbsd_post_attach)
4850 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4851 (fbsd_set_syscall_catchpoint)
4852 (super_xfer_partial, super_resume, super_wait)
4853 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4854 (fbsd_handle_debug_trap): Remove target_ops parameter.
4855 (fbsd_nat_add_target): Delete.
4856 * fbsd-nat.h: Include "inf-ptrace.h".
4857 (fbsd_nat_add_target): Delete.
4858 (USE_SIGTRAP_SIGINFO): Define.
4859 (fbsd_nat_target): New class.
4861 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4862 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4863 (amd64bsd_target): Delete.
4864 * amd64-bsd-nat.h: New file.
4865 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4867 (amd64_fbsd_nat_target): New class.
4868 (the_amd64_fbsd_nat_target): New.
4869 (amd64fbsd_read_description): Refactor as method of
4870 amd64_fbsd_nat_target.
4871 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4872 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4873 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4874 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4875 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4876 (i386bsd_target): Delete.
4877 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4878 (i386bsd_fetch_inferior_registers)
4879 (i386bsd_store_inferior_registers): Declare.
4880 (i386_bsd_nat_target): New class.
4881 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4882 (the_i386_fbsd_nat_target): New.
4883 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4884 i386_fbsd_nat_target methods.
4885 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4886 (_initialize_i386fbsd_nat): Adjust to C++ification.
4887 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4888 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4889 (_initialize_x86_bsd_nat): Adjust to C++ification.
4890 * x86-bsd-nat.h: Include "x86-nat.h".
4891 (x86bsd_target): Delete declaration.
4892 (x86bsd_nat_target): New class.
4894 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4895 (the_aarch64_fbsd_nat_target): New.
4896 (aarch64_fbsd_fetch_inferior_registers)
4897 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4898 aarch64_fbsd_nat_target.
4899 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4900 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4901 (the_alpha_bsd_nat_target): New.
4902 (alphabsd_fetch_inferior_registers)
4903 (alphabsd_store_inferior_registers): Refactor as
4904 alpha_bsd_nat_target methods.
4905 (_initialize_alphabsd_nat): Refactor as methods of
4906 alpha_bsd_nat_target.
4907 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4908 (the_amd64_nbsd_nat_target): New.
4909 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4910 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4911 (the_amd64_obsd_nat_target): New.
4912 (_initialize_amd64obsd_nat): Adjust to C++ification.
4913 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4914 (the_arm_fbsd_nat_target): New.
4915 (arm_fbsd_fetch_inferior_registers)
4916 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4917 (_initialize_arm_fbsd_nat): Refactor as methods of
4918 arm_fbsd_nat_target.
4919 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4920 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4921 (the_arm_netbsd_nat_target): New.
4922 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4923 arm_netbsd_nat_target.
4924 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4925 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4926 (the_hppa_nbsd_nat_target): New.
4927 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4928 hppa_nbsd_nat_target methods.
4929 (_initialize_hppanbsd_nat): Adjust to C++ification.
4930 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4931 (the_hppa_obsd_nat_target): New.
4932 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4933 methods of hppa_obsd_nat_target.
4934 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4936 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4937 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4939 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4940 (_initialize_i386obsd_nat): Use add_target.
4941 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4942 (the_m68k_bsd_nat_target): New.
4943 (m68kbsd_fetch_inferior_registers)
4944 (m68kbsd_store_inferior_registers): Refactor as methods of
4945 m68k_bsd_nat_target.
4946 (_initialize_m68kbsd_nat): Adjust to C++ification.
4947 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4948 (the_mips_fbsd_nat_target): New.
4949 (mips_fbsd_fetch_inferior_registers)
4950 (mips_fbsd_store_inferior_registers): Refactor as methods of
4951 mips_fbsd_nat_target.
4952 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4954 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4955 (the_mips_nbsd_nat_target): New.
4956 (mipsnbsd_fetch_inferior_registers)
4957 (mipsnbsd_store_inferior_registers): Refactor as methods of
4958 mips_nbsd_nat_target.
4959 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4960 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4961 (the_mips64_obsd_nat_target): New.
4962 (mips64obsd_fetch_inferior_registers)
4963 (mips64obsd_store_inferior_registers): Refactor as methods of
4964 mips64_obsd_nat_target.
4965 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4967 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4969 * nbsd-nat.h: Include "inf-ptrace.h".
4970 (nbsd_nat_target): New class.
4971 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4972 (obsd_wait): Refactor as methods of obsd_nat_target.
4973 (obsd_add_target): Delete.
4974 * obsd-nat.h: Include "inf-ptrace.h".
4975 (obsd_nat_target): New class.
4976 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4977 (the_ppc_fbsd_nat_target): New.
4978 (ppcfbsd_fetch_inferior_registers)
4979 (ppcfbsd_store_inferior_registers): Refactor as methods of
4980 ppc_fbsd_nat_target.
4981 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4983 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4984 (the_ppc_nbsd_nat_target): New.
4985 (ppcnbsd_fetch_inferior_registers)
4986 (ppcnbsd_store_inferior_registers): Refactor as methods of
4987 ppc_nbsd_nat_target.
4988 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4989 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4990 (the_ppc_obsd_nat_target): New.
4991 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4992 methods of ppc_obsd_nat_target.
4993 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4995 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4996 (the_sh_nbsd_nat_target): New.
4997 (shnbsd_fetch_inferior_registers)
4998 (shnbsd_store_inferior_registers): Refactor as methods of
5000 (_initialize_shnbsd_nat): Adjust to C++ification.
5001 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5002 (inf_ptrace_xfer_partial): Delete.
5003 (sparc_xfer_partial, sparc_target): Delete.
5004 * sparc-nat.h (sparc_fetch_inferior_registers)
5005 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5006 (sparc_target): Delete function declaration.
5007 (sparc_target): New template class.
5008 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5009 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5010 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5011 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5013 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5014 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5015 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5016 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5018 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5019 (the_vax_bsd_nat_target): New.
5020 (vaxbsd_fetch_inferior_registers)
5021 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5023 (_initialize_vaxbsd_nat): Adjust to C++ification.
5025 * bsd-kvm.c (bsd_kvm_target): New class.
5026 (bsd_kvm_ops): Now a bsd_kvm_target.
5027 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5028 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5029 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5031 (bsd_kvm_return_one): Delete.
5032 (bsd_kvm_add_target): Adjust to C++ification.
5034 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5035 (nto_procfs_target_procfs): New classes.
5036 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5037 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5038 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5039 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5040 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5041 (procfs_remove_hw_breakpoint, procfs_resume)
5042 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5043 (procfs_kill_inferior, procfs_store_registers)
5044 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5045 as methods of nto_procfs_target.
5046 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5047 (nto_native_ops): Delete.
5048 (procfs_open, procfs_native_open): Delete.
5049 (nto_native_ops): Now an nto_procfs_target_native.
5050 (init_procfs_targets): Adjust to C++ification.
5051 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5052 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5053 Refactor as methods of nto_procfs_target.
5055 * go32-nat.c (go32_nat_target): New class.
5056 (the_go32_nat_target): New.
5057 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5058 (go32_store_registers, go32_xfer_partial, go32_files_info)
5059 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5060 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5061 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5062 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5063 (go32_target): Delete.
5064 (_initialize_go32_nat): Adjust to C++ification.
5066 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5067 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5068 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5069 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5071 (gnu_target): Delete.
5072 * gnu-nat.h (gnu_target): Delete.
5073 (gnu_nat_target): New class.
5074 * i386-gnu-nat.c (gnu_base_target): New.
5075 (i386_gnu_nat_target): New class.
5076 (the_i386_gnu_nat_target): New.
5077 (_initialize_i386gnu_nat): Adjust to C++ification.
5079 2018-05-02 Pedro Alves <palves@redhat.com>
5081 * bfd-target.c (target_bfd_xclose): Rename to ...
5082 (target_bfd_close): ... this.
5083 (target_bfd_reopen): Adjust.
5084 * target.c (target_close): Remove references to to_xclose.
5085 * target.h (target_ops::to_xclose): Delete.
5086 (target_ops::to_close): Update comments.
5088 2018-05-02 Pedro Alves <palves@redhat.com>
5090 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5092 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5093 * inf-ptrace.c (inf_ptrace_register_u_offset)
5094 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5095 (inf_ptrace_store_register, inf_ptrace_store_registers)
5096 (inf_ptrace_trad_target): Move to ...
5097 * linux-nat-trad.c: ... this new file.
5098 * linux-nat-trad.h: New file.
5099 * linux-nat.c (linux_target_install_ops): Make extern.
5100 (linux_trad_target): Delete.
5101 * linux-nat.h (linux_trad_target): Delete declaration.
5102 (linux_target_install_ops): Declare.
5103 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5106 2018-05-02 Pedro Alves <palves@redhat.com>
5108 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5109 procfs_target/add_target here.
5110 * procfs.c (procfs_target): Make static.
5111 (_initialize_procfs): Call add_target here.
5112 * procfs.h (struct target_ops): Remove forward declaration.
5113 (procfs_target): Remove declaration.
5114 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5116 2018-05-02 Pedro Alves <palves@redhat.com>
5118 * procfs.c (procfs_stopped_by_watchpoint)
5119 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5120 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5122 (procfs_use_watchpoints): Delete, move contents...
5123 (procfs_target): ... here.
5124 * procfs.h (procfs_use_watchpoints): Delete declaration.
5125 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5126 procfs_use_watchpoints.
5127 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5128 procfs_use_watchpoints.
5130 2018-05-02 Tom Tromey <tom@tromey.com>
5133 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5134 and var_zuinteger_unlimited.
5135 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5136 and PARAM_ZUINTEGER_UNLIMITED.
5137 (set_parameter_value): Handle var_zuinteger and
5138 var_zuinteger_unlimited.
5139 (add_setshow_generic): Likewise.
5140 (parmpy_init): Likewise.
5142 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5145 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5146 pointer is not null before dereferencing it.
5148 2018-04-30 Tom Tromey <tom@tromey.com>
5150 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5153 2018-04-30 Tom Tromey <tom@tromey.com>
5155 * breakpoint.c (mention): Remove use of is_mi_like_p.
5156 (print_mention_ranged_breakpoint): Likewise.
5157 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5160 2018-04-30 Tom Tromey <tom@tromey.com>
5162 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5164 2018-04-30 Tom Tromey <tom@tromey.com>
5166 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5167 (info_spu_event_command): Remove some uses of is_mi_like_p.
5169 2018-04-30 Tom Tromey <tom@tromey.com>
5171 * python/py-framefilter.c (py_print_single_arg)
5172 (enumerate_locals, py_print_args, py_print_frame): Remove some
5173 uses of is_mi_like_p.
5175 2018-04-30 Tom Tromey <tom@tromey.com>
5178 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5179 * ui-out.h (ui_out::is_mi_like_p): Now const.
5180 (ui_out::do_is_mi_like_p): Now const.
5181 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5183 2018-04-30 Tom Tromey <tom@tromey.com>
5185 * varobj.c (varobj_set_visualizer): Use new_reference.
5186 * python/python.c (gdbpy_decode_line): Use new_reference.
5187 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5190 2018-04-30 Tom Tromey <tom@tromey.com>
5192 * varobj.c (install_new_value): Use new_reference.
5193 * value.h (value_incref): Return void. Swap intro comment with
5195 * value.c (set_value_parent): Use new_reference.
5196 (value_incref): Return void. Update intro comment.
5197 (release_value): Use new_reference.
5198 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5200 2018-04-30 Tom Tromey <tom@tromey.com>
5202 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5203 * gdb_bfd.h (new_bfd_ref): Remove.
5204 (gdb_bfd_open): Update comment.
5205 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5206 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5207 (gdb_bfd_fdopenr): Use new_reference.
5208 * exec.c (exec_file_attach): Use new_reference.
5210 2018-04-30 Tom Tromey <tom@tromey.com>
5212 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5215 2018-04-30 Tom Tromey <tom@tromey.com>
5217 * jit.c (jit_read_code_entry): Use type_align.
5218 * i386-tdep.c (i386_gdbarch_init): Don't call
5219 set_gdbarch_long_long_align_bit.
5220 * gdbarch.sh: Remove long_long_align_bit.
5221 * gdbarch.c, gdbarch.h: Rebuild.
5222 * arc-tdep.c (arc_type_align): New function.
5223 (arc_gdbarch_init): Use arc_type_align. Don't call
5224 set_gdbarch_long_long_align_bit.
5226 2018-04-30 Tom Tromey <tom@tromey.com>
5228 * rust-lang.c (rust_type_alignment): Remove.
5229 (rust_composite_type): Use type_align.
5231 2018-04-30 Tom Tromey <tom@tromey.com>
5233 * NEWS: Mention Type.align.
5234 * python/py-type.c (typy_get_alignof): New function.
5235 (type_object_getset): Add "alignof".
5237 2018-04-30 Tom Tromey <tom@tromey.com>
5241 * std-operator.def (UNOP_ALIGNOF): New operator.
5242 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5244 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5245 * c-lang.c (c_op_print_tab): Add alignof.
5246 * c-exp.y (ALIGNOF): New token.
5247 (exp): Add "ALIGNOF" production.
5248 (ident_tokens): Add _Alignof and alignof.
5250 2018-04-30 Tom Tromey <tom@tromey.com>
5252 * i386-tdep.c (i386_type_align): New function.
5253 (i386_gdbarch_init): Update.
5254 * gdbarch.sh (type_align): New method.
5255 * gdbarch.c, gdbarch.h: Rebuild.
5256 * arch-utils.h (default_type_align): Declare.
5257 * arch-utils.c (default_type_align): New function.
5258 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5259 (struct type) <align_log2>: New field.
5260 <instance_flags>: Now a bitfield.
5261 (TYPE_RAW_ALIGN): New macro.
5262 (type_align, type_raw_align, set_type_align): Declare.
5263 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5265 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5266 (get_alignment, maybe_set_alignment): New functions.
5267 (read_structure_type, read_enumeration_type, read_array_type)
5268 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5269 (read_subrange_type, read_base_type): Set type alignment.
5271 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5273 * dwarf2read.c (read_index_from_section): Use bool.
5275 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5278 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5281 2018-04-29 John Reiser <jreiser@BitWagon.com>
5284 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5285 last step, and do it atomically.
5287 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5289 * compile/compile-c-types.c (convert_int, convert_float):
5292 2018-04-27 Tom Tromey <tom@tromey.com>
5295 * rust-lang.c (rust_inclusive_range_type_p): New function.
5296 (rust_range): Handle inclusive ranges.
5297 (rust_compute_range): Likewise.
5298 * rust-exp.y (struct rust_op) <inclusive>: New field.
5299 (DOTDOTEQ): New constant.
5300 (range_expr): Add "..=" productions.
5301 (operator_tokens): Add "..=" token.
5302 (ast_range): Add "inclusive" parameter.
5303 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5305 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5307 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5308 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5310 * expprint.c (print_subexp_standard): Handle new bounds values.
5311 (dump_subexp_body_standard): Likewise.
5313 2018-04-27 Tom Tromey <tom@tromey.com>
5315 * configure: Rebuild.
5316 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5317 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5319 (class symbol_needs_eval_context): Likewise.
5320 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5321 (mock_mapped_index::symbol_name_at): Use "override". Remove
5323 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5325 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5326 * aarch64-tdep.c (instruction_reader::read): Use "override".
5327 (instruction_reader_test::read): Likewise.
5328 * arm-tdep.c (instruction_reader::read): Use "override".
5329 (instruction_reader_thumb::read): Likewise.
5331 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5334 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5335 instead of remote_send.
5336 (remote_send): Remove.
5338 2018-04-26 Pedro Alves <palves@redhat.com>
5340 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5341 find_function_start_sal instead of find_pc_line.
5343 2018-04-26 Pedro Alves <palves@redhat.com>
5345 * breakpoint.c (set_breakpoint_location_function): Handle
5347 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5348 * elfread.c (elf_symtab_read): Give data symbols with
5349 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5350 (elf_rel_plt_read): Update comment.
5351 * linespec.c (convert_linespec_to_sals): Handle
5353 (minsym_found): Handle mst_data_gnu_ifunc.
5354 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5355 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5356 * parse.c (find_minsym_type_and_address): Handle
5358 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5359 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5360 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5362 <mst_data_gnu_ifunc>: New enumerator.
5364 2018-04-26 Pedro Alves <palves@redhat.com>
5366 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5367 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5368 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5370 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5371 (lookup_minimal_symbol_by_pc): Adjust.
5372 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5373 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5374 * minsyms.h (lookup_msym_prefer): New enum.
5375 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5376 parameter by a lookup_msym_prefer parameter.
5378 2018-04-26 Pedro Alves <palves@redhat.com>
5380 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5381 ends in "@plt" instead of looking at the symbol's section.
5383 2018-04-26 Pedro Alves <palves@redhat.com>
5385 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5387 (find_pc_partial_function_gnu_ifunc): Rename to ...
5388 (find_pc_partial_function): ... this, and remove references to
5390 (find_pc_partial_function): Delete old implementation.
5391 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5393 2018-04-26 Pedro Alves <palves@redhat.com>
5395 * linespec.c (struct bound_minimal_symbol_search_key): New.
5396 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5397 skip first line if we found a GNU ifunc minimal symbol by name.
5398 (compare_msymbols): Change parameters to work with a destructured
5400 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5403 2018-04-26 Pedro Alves <palves@redhat.com>
5405 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5406 ifunc targets here. Instead, if we have an ifunc minsym, use its
5408 (add_location_to_breakpoint): Store the minsym and the objfile in
5409 the breakpoint location.
5410 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5411 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5412 Record the minsym in the sal.
5413 * symtab.h (symtab_and_line) <msymbol>: New field.
5415 2018-04-26 Pedro Alves <palves@redhat.com>
5417 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5418 unless we actually resolved the ifunc.
5420 2018-04-26 Pedro Alves <palves@redhat.com>
5422 * c-exp.y (variable production): Prefer ifunc minsyms over
5423 regular function symbols.
5424 * symtab.c (find_gnu_ifunc): New function.
5425 * minsyms.h (lookup_msym_prefer): New enum.
5426 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5427 parameter by a lookup_msym_prefer parameter.
5428 * symtab.h (find_gnu_ifunc): New declaration.
5430 2018-04-26 Pedro Alves <palves@redhat.com>
5432 * blockframe.c (find_gnu_ifunc_target_type): New function.
5433 (find_function_type): New.
5434 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5435 return a value with a memory address.
5436 (eval_call): For calls to GNU ifunc functions, try to find the
5437 type of the target function from the type that the resolver
5439 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5441 * infcall.c (find_function_return_type): Delete.
5442 (find_function_addr): Add 'function_type' parameter. For calls to
5443 GNU ifunc functions, try to find the type of the target function
5444 from the type that the resolver returns, and return it via
5446 (call_function_by_hand_dummy): Adjust to use the function type
5447 returned by find_function_addr.
5448 (find_function_addr): Add 'function_type' parameter and move
5450 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5453 2018-04-26 Pedro Alves <palves@redhat.com>
5455 * c-exp.y (variable production): Skip finding an alias for ifunc
5458 2018-04-26 Pedro Alves <palves@redhat.com>
5460 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5462 2018-04-25 Pedro Alves <palves@redhat.com>
5464 * infcmd.c (kill_command): Print the pid as string, not the whole
5465 thread's ptid. Add comment. s/has been killed/killed/ in output
5467 * remote.c (remote_detach_1): Print the pid as string, not the
5468 whole thread's ptid.
5470 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5471 Sergio Durigan Junior <sergiodj@redhat.com>
5472 Pedro Alves <palves@redhat.com>
5474 * infcmd.c (kill_command): Print message when inferior has
5476 * inferior.c (print_inferior_events): Remove 'static'. Set as
5478 (add_inferior): Improve message printed when
5479 'print_inferior_events' is on.
5480 (exit_inferior): Remove message printed when
5481 'print_inferior_events' is on.
5482 (detach_inferior): Improve message printed when
5483 'print_inferior_events' is on.
5484 (initialize_inferiors): Use 'add_inferior_silent' to set
5485 'current_inferior_'.
5486 * inferior.h (print_inferior_events): Declare here as
5488 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5489 '[Detaching...]' messages when 'print_inferior_events' is on.
5490 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5491 as prefix/suffix for messages. Remove periods. Fix erroneous
5492 'Detaching after fork from child...', replace it by '... from
5494 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5495 prefix/suffix when printing 'Detaching...' messages. Print
5496 them when 'print_inferior_events' is on.
5497 * remote.c (remote_detach_1): Print message when detaching
5498 from inferior and '!is_fork_parent'.
5500 2018-04-24 Tom Tromey <tom@tromey.com>
5502 * cli-out.h: Reindent.
5504 2018-04-24 Tom Tromey <tom@tromey.com>
5506 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5507 (cli_ui_out::do_field_string): Use fputs_filtered.
5508 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5510 2018-04-23 Tom Tromey <tom@tromey.com>
5512 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5513 gdb::unique_xmalloc_ptr.
5515 2018-04-23 Tom Tromey <tom@tromey.com>
5517 * configure: Rebuild.
5519 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5522 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5523 prepare_for_testing. Set normal_bp to r_debug_state if target
5526 2018-04-21 Pedro Alves <palves@redhat.com>
5527 Rajendra SY <rajendra.sy@gmail.com>
5529 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5530 * remote.c (extended_remote_attach): In all-stop mode, mark the
5531 thread as executing.
5533 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5535 * thread.c (thread_apply_all_command): Fix comment.
5536 (thread_command): Fix comment.
5538 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5540 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5542 * features/aarch64-core.c (create_feature_aarch64_core):
5544 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5546 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5548 * features/i386/32bit-avx512.c
5549 (create_feature_i386_32bit_avx512): Likewise.
5550 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5552 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5554 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5556 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5558 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5560 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5562 * features/i386/64bit-avx512.c
5563 (create_feature_i386_64bit_avx512): Likewise.
5564 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5566 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5568 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5570 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5572 * features/i386/64bit-segments.c
5573 (create_feature_i386_64bit_segments): Likewise.
5574 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5576 * features/i386/x32-core.c
5577 (create_feature_i386_x32_core): Likewise.
5578 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5579 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5580 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5581 * target-descriptions.c: In generated code, don't pass xml
5584 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5586 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5587 (print_xml_feature::visit_post): Likewise.
5588 (print_xml_feature::visit): Likewise.
5589 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5590 (print_xml_feature): Add new class.
5591 * regformats/regdat.sh: Null xmltarget on feature targets.
5592 * target-descriptions.c (struct target_desc): Add xmltarget.
5593 (maintenance_check_tdesc_xml_convert): Add unittest function.
5594 (tdesc_get_features_xml): Add function to get xml.
5595 (maintenance_check_xml_descriptions): Test xml generation.
5596 * xml-tdesc.c (string_read_description_xml): Add function.
5597 * xml-tdesc.h (string_read_description_xml): Add declaration.
5599 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5601 * features/Makefile: Add feature marker to targets with new style
5602 target descriptions.
5603 * regformats/aarch64.dat: Regenerate.
5604 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5605 * regformats/i386/amd64-avx-linux.dat: Likewise.
5606 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5607 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5608 * regformats/i386/amd64-linux.dat: Likewise.
5609 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5610 * regformats/i386/amd64.dat: Likewise.
5611 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5612 * regformats/i386/i386-avx-linux.dat: Likewise.
5613 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5614 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5615 * regformats/i386/i386-linux.dat: Likewise.
5616 * regformats/i386/i386-mmx-linux.dat: Likewise.
5617 * regformats/i386/i386-mpx-linux.dat: Likewise.
5618 * regformats/i386/i386.dat: Likewise.
5619 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5620 * regformats/i386/x32-avx-linux.dat: Likewise.
5621 * regformats/i386/x32-linux.dat: Likewise.
5622 * regformats/tic6x-c62x-linux.dat: Likewise.
5623 * regformats/tic6x-c64x-linux.dat: Likewise.
5624 * regformats/tic6x-c64xp-linux.dat: Likewise.
5625 * regformats/regdat.sh: Parse feature marker.
5627 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5629 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5630 (tdesc_osabi_name): Likewise.
5631 * target-descriptions.c (tdesc_architecture_name): Add new
5633 (tdesc_osabi_name): Likewise.
5635 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5637 * common/tdesc.c (tdesc_predefined_type): Move to here.
5638 (tdesc_named_type): Likewise.
5639 (tdesc_create_vector): Likewise.
5640 (tdesc_create_struct): Likewise.
5641 (tdesc_set_struct_size): Likewise.
5642 (tdesc_create_union): Likewise.
5643 (tdesc_create_flags): Likewise.
5644 (tdesc_create_enum): Likewise.
5645 (tdesc_add_field): Likewise.
5646 (tdesc_add_typed_bitfield): Likewise.
5647 (tdesc_add_bitfield): Likewise.
5648 (tdesc_add_flag): Likewise.
5649 (tdesc_add_enum_value): Likewise.
5650 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5651 (struct tdesc_type_vector): Likewise.
5652 (struct tdesc_type_field): Likewise.
5653 (struct tdesc_type_with_fields): Likewise.
5654 (tdesc_create_enum): Add declaration.
5655 (tdesc_add_typed_bitfield): Likewise.
5656 (tdesc_add_enum_value): Likewise.
5657 * target-descriptions.c (tdesc_type_field): Move from here.
5658 (tdesc_type_builtin): Likewise.
5659 (tdesc_type_vector): Likewise.
5660 (tdesc_type_with_fields): Likewise.
5661 (tdesc_predefined_types): Likewise.
5662 (tdesc_named_type): Likewise.
5663 (tdesc_create_vector): Likewise.
5664 (tdesc_create_struct): Likewise.
5665 (tdesc_set_struct_size): Likewise.
5666 (tdesc_create_union): Likewise.
5667 (tdesc_create_flags): Likewise.
5668 (tdesc_create_enum): Likewise.
5669 (tdesc_add_field): Likewise.
5670 (tdesc_add_typed_bitfield): Likewise.
5671 (tdesc_add_bitfield): Likewise.
5672 (tdesc_add_flag): Likewise.
5673 (tdesc_add_enum_value): Likewise.
5674 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5675 (tdesc_add_typed_bitfield): Likewise.
5676 (tdesc_add_enum_value): Likewise.
5678 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5680 * common/tdesc.c (tdesc_feature::accept): Move to here.
5681 (tdesc_feature::operator==): Likewise.
5682 (tdesc_create_reg): Likewise.
5683 * common/tdesc.h (tdesc_type_kind): Likewise.
5684 (struct tdesc_type): Likewise.
5685 (struct tdesc_feature): Likewise.
5686 * regformats/regdat.sh: Create a feature.
5687 * target-descriptions.c (tdesc_type_kind): Move from here.
5688 (tdesc_type): Likewise.
5689 (tdesc_type_up): Likewise.
5690 (tdesc_feature): Likewise.
5691 (tdesc_create_reg): Likewise.
5693 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5695 * Makefile.in: Add arch/tdesc.c
5696 * common/tdesc.c: New file.
5697 * common/tdesc.h (tdesc_element_visitor): Move to here.
5698 (tdesc_element): Likewise.
5699 (tdesc_reg): Likewise.
5700 (tdesc_reg_up): Likewise.
5701 * regformats/regdef.h (reg): Add offset to constructors.
5702 * target-descriptions.c (tdesc_element_visitor): Move from here.
5703 (tdesc_element): Likewise.
5704 (tdesc_reg): Likewise.
5705 (tdesc_reg_up): Likewise.
5707 2018-04-17 Tom Tromey <tom@tromey.com>
5709 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5712 2018-04-17 Tom Tromey <tom@tromey.com>
5714 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5716 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5718 * symtab.c (print_symbol_info): Skip printing filename and line
5719 number when `last' is NULL.
5720 (symtab_symbol_info): Use empty string instead of NULL for first
5721 invocation of print_symbol_info.
5722 (rbreak_command): Pass NULL to `last' parameter of
5725 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5727 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5730 2018-04-16 Pedro Alves <palves@redhat.com>
5732 * MAINTAINERS (sh): Remove.
5733 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5734 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5735 (ALLDEPFILES): Remove sh64-tdep.c.
5736 * NEWS: Mentions that support for SH-5/SH64 is removed.
5737 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5738 (sh*-*-openbsd*): Ditto.
5739 (sh64-*-elf*): Remove.
5741 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5742 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5743 * sh-tdep.c: No longer include "sh64-tdep.h".
5744 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5745 * sh64-tdep.c, sh64-tdep.h: Remove files.
5747 2018-04-16 Pedro Alves <palves@redhat.com>
5749 * MAINTAINERS: Remove m88k.
5750 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5751 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5752 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5753 * NEWS: Mention that support for m88k was removed.
5754 * configure.host (m88*-*-*): Remove support.
5755 * configure.nat (m88k-*-*): Remove support.
5756 * configure.tgt (m88*-*-openbsd*): Remove.
5757 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5759 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5761 * configure.tgt (x86_tobjs): New variable.
5762 (amd64_tobjs, i386_tobjs): Use it.
5764 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5766 * symtab.c (print_symbol_info): Precede the symbol definition by
5767 the line number when available.
5768 * NEWS: Advertise this enhancement.
5770 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5772 * NEWS (New options): announce set/show record btrace cpu.
5773 * btrace.c: Include record-btrace.h.
5774 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5775 the vendor is unknown.
5776 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5777 Maybe overwrite the btrace configuration's cpu.
5778 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5779 (btrace_fetch): Add cpu parameter. Update callers.
5780 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5781 Maybe overwrite the btrace configuration's cpu. Skip enabling
5782 errata workarounds if the vendor is unknown.
5783 * python/py-record-btrace.c: Include record-btrace.h.
5784 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5785 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5786 * record-btrace.c (record_btrace_cpu_state_kind): New.
5787 (record_btrace_cpu): New.
5788 (set_record_btrace_cpu_cmdlist): New.
5789 (record_btrace_get_cpu): New.
5790 (require_btrace_thread, record_btrace_info)
5791 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5792 (cmd_set_record_btrace_cpu_none): New.
5793 (cmd_set_record_btrace_cpu_auto): New.
5794 (cmd_set_record_btrace_cpu): New.
5795 (cmd_show_record_btrace_cpu): New.
5796 (_initialize_record_btrace): Initialize set/show record btrace cpu
5798 * record-btrace.h (record_btrace_get_cpu): New.
5800 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5802 * record.c (set_record_command): Fix typo in message.
5804 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5806 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5808 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5810 * infrun.c (process_event_stop_test): Call
5811 gdbarch_in_indirect_branch_thunk.
5812 * gdbarch.sh (in_indirect_branch_thunk): New.
5813 * gdbarch.c: Regenerated.
5814 * gdbarch.h: Regenerated.
5817 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5818 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5819 (ALLDEPFILES): Add x86-tdep.c.
5820 * arch-utils.h (default_in_indirect_branch_thunk): New.
5821 * arch-utils.c (default_in_indirect_branch_thunk): New.
5822 * i386-tdep: Include x86-tdep.h.
5823 (i386_in_indirect_branch_thunk): New.
5824 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5826 * amd64-tdep: Include x86-tdep.h.
5827 (amd64_in_indirect_branch_thunk): New.
5828 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5830 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5833 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5834 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5835 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5838 2018-04-12 Tom Tromey <tom@tromey.com>
5840 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5841 (rust_evaluate_subexp): Likewise.
5843 2018-04-12 Pedro Alves <palves@redhat.com>
5845 * procfs.c (procfs_detach): Make forward declaration's prototype
5846 match definition's protototype.
5847 (proc_get_LDT_entry): Remove stale do_cleanups call.
5849 2018-04-12 Pedro Alves <palves@redhat.com>
5851 * target.h (target_ops::to_has_exited): Delete.
5852 (target_has_exited): Delete.
5853 * target-delegates.c: Regenerate.
5855 2018-04-11 Pedro Alves <palves@redhat.com>
5857 * target.c (fileio_fh_t::t): Add comment.
5858 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5859 (target_fileio_close): Handle a NULL target.
5860 (invalidate_fileio_fh): New.
5861 (target_close): Call it.
5862 * remote.c (remote_hostio_send_command): No longer check whether
5863 remote_desc is open.
5865 2018-04-11 Pedro Alves <palves@redhat.com>
5867 * target.c (fileio_fh_t): Make it a named struct instead of a
5869 (fileio_fh_t::is_closed): New method.
5870 (DEF_VEC_O (fileio_fh_t)): Remove.
5871 (fileio_fhandles): Now a std::vector.
5872 (is_closed_fileio_fh): Delete.
5873 (acquire_fileio_fd): Adjust. Rename parameters.
5874 (release_fileio_fd): Adjust.
5875 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5876 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5877 (target_fileio_close): Adjust.
5879 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5881 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5884 2018-04-10 Pedro Alves <palves@redhat.com>
5886 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5887 (scoped_finish_thread_state): New class.
5888 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5890 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5891 (fetch_inferior_event, normal_stop): Likewise.
5892 * thread.c (finish_thread_state_cleanup): Delete.
5894 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5895 Pedro Alves <palves@redhat.com>
5897 * value.c: Include "selftest.h" and "common/array-view.h".
5898 (struct range) <operator ==>: New.
5899 (test_ranges_contain): New.
5900 (check_ranges_vector): New.
5901 (test_insert_into_bit_range_vector): New.
5902 (_initialize_values): Register selftests.
5903 * common/array-view.h (operator==, operator!=): New.
5905 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5907 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5909 * inline-frame.c: Include <algorithm>.
5910 (struct inline_state): Add constructor.
5911 (inline_state_s): Remove.
5912 (DEF_VEC_O(inline_state_s)): Remove.
5913 (inline_states): Change type to std::vector.
5914 (find_inline_frame_state): Adjust to std::vector.
5915 (allocate_inline_frame_state): Remove.
5916 (clear_inline_frame_state): Adjust to std::vector.
5917 (skip_inline_frames): Adjust to std::vector.
5919 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5921 * tracepoint.h (struct trace_state_variable): Add constructor.
5922 <name>: Change type to std::string.
5923 * tracepoint.c (tsv_s): Remove.
5924 (DEF_VEC_O(tsv_s)): Remove.
5925 (tvariables): Change to std::vector.
5926 (create_trace_state_variable): Adjust to std::vector.
5927 (find_trace_state_variable): Likewise.
5928 (find_trace_state_variable_by_number): Likewise.
5929 (delete_trace_state_variable): Likewise.
5930 (trace_variable_command): Adjust to std::string.
5931 (delete_trace_variable_command): Likewise.
5932 (tvariables_info_1): Adjust to std::vector.
5933 (save_trace_state_variables): Likewise.
5934 (start_tracing): Likewise.
5935 (merge_uploaded_trace_state_variables): Adjust to std::vector
5937 * target.h (struct target_ops)
5938 <to_download_trace_state_variable>: Pass reference to
5939 trace_state_variable.
5940 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5941 * target-delegates.c: Re-generate.
5942 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5943 (mi_tsv_deleted): Likewise.
5944 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5945 * remote.c (remote_download_trace_state_variable): Change
5946 pointer to reference and adjust.
5947 * make-target-delegates (parse_argtypes): Handle references.
5948 (write_function_header): Likewise.
5949 (munge_type): Likewise.
5951 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5953 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5954 string_view-selftests.c.
5955 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5957 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5958 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5959 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5960 * unittests/basic_string_view/element_access/char/1.cc:
5962 * unittests/basic_string_view/element_access/char/empty.cc:
5964 * unittests/basic_string_view/element_access/char/front_back.cc:
5966 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5967 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5969 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5971 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5973 * unittests/basic_string_view/operations/compare/char/1.cc:
5975 * unittests/basic_string_view/operations/compare/char/13650.cc:
5977 * unittests/basic_string_view/operations/copy/char/1.cc:
5979 * unittests/basic_string_view/operations/data/char/1.cc:
5981 * unittests/basic_string_view/operations/find/char/1.cc:
5983 * unittests/basic_string_view/operations/find/char/2.cc:
5985 * unittests/basic_string_view/operations/find/char/3.cc:
5987 * unittests/basic_string_view/operations/find/char/4.cc:
5989 * unittests/basic_string_view/operations/rfind/char/1.cc:
5991 * unittests/basic_string_view/operations/rfind/char/2.cc:
5993 * unittests/basic_string_view/operations/rfind/char/3.cc:
5995 * unittests/basic_string_view/operations/substr/char/1.cc:
5997 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5998 * unittests/string_view-selftests.c: New file.
6000 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6002 * unittests/basic_string_view/capacity/1.cc: New file.
6003 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6004 * unittests/basic_string_view/cons/char/1.cc: New file.
6005 * unittests/basic_string_view/cons/char/2.cc: New file.
6006 * unittests/basic_string_view/cons/char/3.cc: New file.
6007 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6008 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6009 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6010 * unittests/basic_string_view/element_access/char/1.cc: New file.
6011 * unittests/basic_string_view/element_access/char/2.cc: New file.
6012 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6013 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6014 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6015 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6016 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6017 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6018 * unittests/basic_string_view/include.cc: New file.
6019 * unittests/basic_string_view/inserters/char/1.cc: New file.
6020 * unittests/basic_string_view/inserters/char/2.cc: New file.
6021 * unittests/basic_string_view/inserters/char/3.cc: New file.
6022 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6023 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6024 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6025 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6026 * unittests/basic_string_view/literals/types.cc: New file.
6027 * unittests/basic_string_view/literals/values.cc: New file.
6028 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6029 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6030 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6031 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6032 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6033 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6034 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6035 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6036 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6037 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6038 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6039 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6040 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6041 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6042 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6043 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6044 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6045 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6046 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6047 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6048 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6049 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6050 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6051 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6052 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6053 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6054 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6055 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6056 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6057 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6058 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6059 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6060 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6061 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6062 * unittests/basic_string_view/operators/char/2.cc: New file.
6063 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6064 * unittests/basic_string_view/range_access/char/1.cc: New file.
6065 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6066 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6067 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6068 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6069 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6070 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6071 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6072 * unittests/basic_string_view/typedefs.cc: New file.
6073 * unittests/basic_string_view/types/1.cc: New file.
6075 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6077 * common/gdb_string_view.h: Remove libstdc++ implementation
6078 details, adjust to gdb reality.
6079 * common/gdb_string_view.tcc: Likewise.
6080 * cli/cli-script.c (struct string_view): Remove.
6081 (user_args) <m_args>: Change element type to gdb::string_view.
6082 (user_args::insert_args): Adjust.
6084 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6086 * common/gdb_string_view.h: New file.
6087 * common/gdb_string_view.tcc: New file.
6089 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6091 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6092 * configure: Re-generate.
6094 2018-04-09 Pedro Alves <palves@redhat.com>
6096 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6097 (set_target_gdbarch): Call
6098 gdb::observers::architecture_changed.notify instead of
6099 observer_notify_architecture_changed.
6101 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6103 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6104 (do_restore_current_traceframe_cleanup): Remove.
6105 (restore_current_traceframe_cleanup_dtor): Remove.
6106 (make_cleanup_restore_current_traceframe): Remove.
6107 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6109 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6110 * infrun.c (fetch_inferior_event): Use
6111 scoped_restore_current_traceframe.
6113 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6115 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6117 <n_allocated_type_units>: Remove.
6118 <all_type_units>: Change to std::vector.
6119 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6120 to std::vector change.
6121 (dwarf2_per_objfile::get_cutu): Likewise.
6122 (dwarf2_per_objfile::get_tu): Likewise.
6123 (create_signatured_type_table_from_index): Likewise.
6124 (create_signatured_type_table_from_debug_names): Likewise.
6125 (dw2_symtab_iter_next): Likewise.
6126 (dw2_print_stats): Likewise.
6127 (dw2_expand_all_symtabs): Likewise.
6128 (dw2_expand_marked_cus): Likewise.
6129 (dw2_debug_names_iterator::next): Likewise.
6130 (dwarf2_initialize_objfile): Likewise.
6131 (add_signatured_type_cu_to_table): Likewise.
6132 (create_all_type_units): Likewise.
6133 (add_type_unit): Likewise.
6134 (struct tu_abbrev_offset): Add constructor.
6135 (build_type_psymtabs_1): Adjust to std::vector change.
6136 (print_tu_stats): Likewise.
6137 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6138 (write_debug_names): Likewise.
6140 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6142 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6143 Make an std::vector.
6144 <n_comp_units>: Remove.
6145 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6146 to std::vector change.
6147 (dwarf2_per_objfile::get_cutu): Likewise.
6148 (dwarf2_per_objfile::get_cu): Likewise.
6149 (create_cus_from_index): Likewise.
6150 (create_addrmap_from_index): Likewise.
6151 (create_addrmap_from_aranges): Likewise.
6152 (dwarf2_read_index): Likewise.
6153 (dw2_find_last_source_symtab): Likewise.
6154 (dw2_map_symtabs_matching_filename): Likewise.
6155 (dw2_symtab_iter_next): Likewise.
6156 (dw2_print_stats): Likewise.
6157 (dw2_expand_all_symtabs): Likewise.
6158 (dw2_expand_symtabs_with_fullname): Likewise.
6159 (dw2_expand_marked_cus): Likewise.
6160 (dw2_map_symbol_filenames): Likewise.
6161 (create_cus_from_debug_names): Likewise.
6162 (dwarf2_read_debug_names): Likewise.
6163 (dw2_debug_names_iterator::next): Likewise.
6164 (dwarf2_initialize_objfile): Likewise.
6165 (set_partial_user): Likewise.
6166 (dwarf2_build_psymtabs_hard): Likewise.
6167 (read_comp_units_from_section): Remove arguments, adjust to
6169 (create_all_comp_units): Adjust to std::vector and
6170 read_comp_units_from_section changes.
6171 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6173 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6174 (psyms_seen_size): Likewise.
6175 (write_gdbindex): Likewise.
6176 (write_debug_names): Likewise.
6178 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6180 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6181 with dwarf2_per_objfile.
6182 (create_cus_from_index): Likewise.
6183 (create_signatured_type_table_from_index): Likewise.
6184 (dwarf2_read_index): Likewise.
6185 (dwarf2_initialize_objfile): Likewise.
6186 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6187 per_cu rather than get_dwarf2_per_objfile.
6189 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6191 * dwarf2read.h (struct signatured_type): Forward declare.
6192 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6194 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6195 (dw2_get_cutu): ...this.
6196 (dwarf2_per_objfile::get_cu): Rename from...
6197 (dw2_get_cu): ...this.
6198 (dwarf2_per_objfile::get_tu): New.
6199 (create_addrmap_from_index): Adjust.
6200 (create_addrmap_from_aranges): Adjust.
6201 (dw2_find_last_source_symtab): Adjust.
6202 (dw2_map_symtabs_matching_filename): Adjust.
6203 (dw2_symtab_iter_next): Adjust.
6204 (dw2_print_stats): Adjust.
6205 (dw2_expand_all_symtabs): Adjust.
6206 (dw2_expand_symtabs_with_fullname): Adjust.
6207 (dw2_expand_marked_cus): Adjust.
6208 (dw_expand_symtabs_matching_file_matcher): Adjust.
6209 (dw2_map_symbol_filenames): Adjust.
6210 (dw2_debug_names_iterator::next): Adjust.
6211 (dwarf2_initialize_objfile): Adjust.
6212 (set_partial_user): Adjust.
6213 (dwarf2_build_psymtabs_hard): Adjust.
6215 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6217 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6218 Remove unused variables.
6219 (dw2_map_symtabs_matching_filename): Likewise.
6220 (dwarf2_record_block_ranges): Likewise.
6221 (dwarf2_read_addr_index): Likewise.
6222 (follow_die_offset): Likewise.
6224 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6226 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6227 to symbol_file_add_main.
6229 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6232 * mi/mi-console.c (do_fputc_async_safe): New.
6233 (mi_console_file::write_async_safe): New.
6234 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6235 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6237 * ui-file.c (ui_file::putstrn): Adjust call to
6238 fputstrn_unfiltered.
6239 * utils.c (printchar): Replace do_fputs and do_fprintf
6240 parameters by do_fputc.
6241 (fputstr_filtered): Adjust call to printchar.
6242 (fputstr_unfiltered): Likewise.
6243 (fputstrn_filtered): Likewise.
6244 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6246 * utils.h (do_fputc_ftype): New typedef.
6247 (fputstrn_unfiltered): Add do_fputc parameter.
6249 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6251 * regformats/i386/i386-avx.dat: Remove.
6253 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6256 * amd64-tdep.c (amd64_none_init_abi): New function.
6257 (amd64_x32_none_init_abi): New function.
6258 (_initialize_amd64_tdep): Register handlers for x86-64 and
6259 x64_32 with GDB_OSABI_NONE.
6260 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6261 GDB_OSABI_NONE osabi.
6263 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6266 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6268 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6269 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6271 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6273 * common/byte-vector.h (char_vector): New type.
6274 * target.h (target_read_alloc): Return
6275 gdb::optional<byte_vector>.
6276 (target_read_stralloc): Return gdb::optional<char_vector>.
6277 (target_get_osdata): Return gdb::optional<char_vector>.
6278 * target.c (target_read_alloc_1): Templatize. Replacement
6279 manual memory management with vector.
6280 (target_read_alloc): Change return type, adjust.
6281 (target_read_stralloc): Change return type, adjust.
6282 (target_get_osdata): Change return type, adjust.
6283 * auxv.c (struct auxv_info) <length>: Remove.
6284 <data>: Change type to gdb::optional<byte_vector>.
6285 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6286 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6287 (target_auxv_search): Adjust.
6288 (fprint_target_auxv): Adjust.
6289 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6290 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6291 (linux_make_corefile_notes): Adjust.
6292 * osdata.c (get_osdata): Adjust.
6293 * remote.c (remote_get_threads_with_qxfer): Adjust.
6294 (remote_memory_map): Adjust.
6295 (remote_traceframe_info): Adjust.
6296 (btrace_read_config): Adjust.
6297 (remote_read_btrace): Adjust.
6298 (remote_pid_to_exec_file): Adjust.
6299 * solib-aix.c (solib_aix_get_library_list): Adjust.
6300 * solib-dsbt.c (decode_loadmap): Don't free buf.
6301 (dsbt_get_initial_loadmaps): Adjust.
6302 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6303 * solib-target.c (solib_target_current_sos): Adjust.
6304 * tracepoint.c (sdata_make_value): Adjust.
6305 * xml-support.c (xinclude_start_include): Adjust.
6306 (xml_fetch_content_from_file): Adjust.
6307 * xml-support.h (xml_fetch_another): Change return type.
6308 (xml_fetch_content_from_file): Change return type.
6309 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6310 * xml-tdesc.c (file_read_description_xml): Adjust.
6311 (fetch_available_features_from_target): Change return type.
6312 (target_fetch_description_xml): Adjust.
6313 (target_read_description_xml): Adjust.
6315 2018-04-06 Tom Tromey <tom@tromey.com>
6317 * value.c (~value): Update.
6318 (struct value) <contents>: Now unique_xmalloc_ptr.
6319 (value_contents_bits_eq, allocate_value_contents)
6320 (value_contents_raw, value_contents_all_raw)
6321 (value_contents_for_printing, value_contents_for_printing_const)
6322 (set_value_enclosing_type): Update.
6324 2018-04-06 Tom Tromey <tom@tromey.com>
6326 * value.c (range_s): Remove typedef, VEC.
6327 (struct range): Add operator<.
6328 (range_lessthan): Remove.
6329 (ranges_contain): Change type.
6331 (struct value) <unavailable, optimized_out>: Now std::vector.
6332 (value_entirely_available)
6333 (value_entirely_covered_by_range_vector)
6334 (value_entirely_unavailable, value_entirely_optimized_out):
6336 (insert_into_bit_range_vector): Change argument type.
6337 (find_first_range_overlap): Likewise.
6338 (struct ranges_and_idx, value_contents_bits_eq)
6339 (require_not_optimized_out, require_available): Update.
6340 (ranges_copy_adjusted): Change argument types.
6341 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6343 2018-04-06 Tom Tromey <tom@tromey.com>
6345 * value.c (~value): Update.
6346 (struct value) <parent>: Now a value_ref_ptr.
6347 (value_parent, set_value_parent, value_address, value_copy):
6350 2018-04-06 Tom Tromey <tom@tromey.com>
6352 * value.c (struct value): Add constructor, destructor, and member
6354 (allocate_value_lazy, value_decref): Update.
6356 2018-04-06 Tom Tromey <tom@tromey.com>
6358 * value.c (struct value) <released, next>: Remove.
6359 (all_values): Now a std::vector.
6360 (allocate_value_lazy): Update.
6361 (value_next): Remove.
6362 (value_mark, value_free_to_mark, release_value)
6363 (value_release_to_mark): Update.
6365 2018-04-06 Tom Tromey <tom@tromey.com>
6367 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6368 (free_value_chain): Remove.
6369 * value.c (free_value_chain): Remove.
6370 (value_release_to_mark): Return a std::vector.
6371 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6373 (check_condition): Update.
6374 * eval.c (fetch_subexp_value): Change "val_chain" to a
6376 * breakpoint.c (update_watchpoint): Update.
6377 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6379 2018-04-06 Tom Tromey <tom@tromey.com>
6381 * value.h (free_all_values): Remove.
6382 * value.c (free_all_values): Remove.
6384 2018-04-06 Tom Tromey <tom@tromey.com>
6386 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6387 (value_history_chain, value_history_count): Remove.
6388 (value_history): New global.
6389 (record_latest_value, access_value_history, show_values)
6390 (preserve_values): Update.
6392 2018-04-06 Tom Tromey <tom@tromey.com>
6394 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6395 * varobj.c (varobj_set_display_format, varobj_set_value)
6396 (install_default_visualizer, construct_visualizer)
6397 (install_new_value, ~varobj, varobj_get_value_type)
6398 (my_value_of_variable, varobj_editable_p): Update.
6399 * c-varobj.c (c_describe_child, c_value_of_variable)
6400 (cplus_number_of_children, cplus_describe_child): Update.
6401 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6402 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6403 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6405 2018-04-06 Tom Tromey <tom@tromey.com>
6407 * printcmd.c (last_examine_address): Change type to
6409 (do_examine, x_command): Update.
6411 2018-04-06 Tom Tromey <tom@tromey.com>
6413 * value.c (release_value): Update.
6414 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6415 (struct bpstats) <val>: Now a value_ref_ptr.
6416 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6417 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6418 (~watchpoint, print_it_watchpoint, watch_command_1)
6419 (invalidate_bp_value_on_memory_change): Update.
6421 2018-04-06 Tom Tromey <tom@tromey.com>
6423 * varobj.c (varobj_clear_saved_item)
6424 (update_dynamic_varobj_children, install_new_value, ~varobj):
6426 * value.h (value_incref): Move declaration earlier.
6427 (value_decref): Rename from value_free.
6428 (struct value_ref_policy): New.
6429 (value_ref_ptr): New typedef.
6430 (struct value_deleter): Remove.
6431 (gdb_value_up): Remove typedef.
6432 (release_value): Change return type.
6433 (release_value_or_incref): Remove.
6434 * value.c (set_value_parent): Update.
6435 (value_incref): Change return type.
6436 (value_decref): Rename from value_free.
6437 (value_free_to_mark, free_all_values, free_value_chain): Update.
6438 (release_value): Return value_ref_ptr.
6439 (release_value_or_incref): Remove.
6440 (record_latest_value, set_internalvar, clear_internalvar):
6442 * stack.c (info_frame_command): Don't call value_free.
6443 * python/py-value.c (valpy_dealloc, valpy_new)
6444 (value_to_value_object): Update.
6445 * printcmd.c (do_examine): Update.
6446 * opencl-lang.c (lval_func_free_closure): Update.
6447 * mi/mi-main.c (register_changed_p): Don't call value_free.
6448 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6449 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6450 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6452 * guile/scm-value.c (vlscm_free_value_smob)
6453 (vlscm_scm_from_value): Update.
6454 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6455 (frame_unwind_register_unsigned, get_frame_register_bytes)
6456 (put_frame_register_bytes): Don't call value_free.
6457 * findvar.c (address_from_register): Don't call value_free.
6458 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6459 * dwarf2loc.c (entry_data_value_free_closure)
6460 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6461 (dwarf2_evaluate_loc_desc_full): Update.
6462 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6463 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6464 (~watchpoint, watch_command_1)
6465 (invalidate_bp_value_on_memory_change): Update.
6466 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6468 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6471 * warning.m4: Add -Wno-error=deprecated-register.
6472 * configure: Re-generate.
6474 2018-04-05 Tom Tromey <tom@tromey.com>
6476 * linespec.h: Remove include of "vec.h".
6478 2018-04-05 Tom Tromey <tom@tromey.com>
6480 * linespec.c (typep): Remove typedef.
6481 (find_methods, find_superclass_methods): Take a std::vector.
6482 (find_method): Use std::vector.
6484 2018-04-05 Tom Tromey <tom@tromey.com>
6486 * utils.c (compare_strings): Remove.
6487 * utils.h (compare_strings): Remove.
6488 * objc-lang.h (find_imps): Update.
6489 * objc-lang.c (find_methods): Take a std::vector.
6490 (uniquify_strings, find_imps): Likewise.
6491 * linespec.c (find_methods): Take a std::vector.
6492 (decode_objc): Use std::vector.
6493 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6495 (find_method, find_function_symbols): Use std::vector.
6497 2018-04-05 Tom Tromey <tom@tromey.com>
6499 * completer.c (completion_tracker::completion_tracker): Remove
6501 (completion_tracker::discard_completions): Likewise.
6502 * breakpoint.c (ambiguous_names_p): Remove cast.
6503 * ada-lang.c (_initialize_ada_language): Remove cast.
6504 * utils.h (streq): Update.
6505 (streq_hash): Add new declaration.
6506 * utils.c (streq): Return bool.
6507 (streq_hash): New function.
6509 2018-04-05 Tom Tromey <tom@tromey.com>
6511 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6512 Remove a string copy.
6514 2018-04-05 Tom Tromey <tom@tromey.com>
6516 * linespec.c (filter_results): Use std::vector.
6517 (decode_line_2, decode_line_full): Update.
6519 2018-04-05 Tom Tromey <tom@tromey.com>
6521 * linespec.c (canonical_to_fullform): Return std::string.
6522 (filter_results): Update.
6523 (struct decode_line_2_item): Add constructor.
6524 <fullform, displayform>: Now std::string.
6525 (decode_line_2_compare_items): Now a std::sort comparator.
6526 (decode_line_2): Update.
6528 2018-04-05 Tom Tromey <tom@tromey.com>
6530 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6531 (unexpected_linespec_error): Update.
6532 (linespec_parse_basic, parse_linespec): Update.
6534 2018-04-05 Tom Tromey <tom@tromey.com>
6536 * linespec.c (linespec_parse_basic): Reindent.
6538 2018-04-05 Tom Tromey <tom@tromey.com>
6540 * minsyms.h (iterate_over_minimal_symbols): Update.
6541 * minsyms.c (iterate_over_minimal_symbols): Take a
6543 * linespec.c (struct collect_minsyms): Remove.
6544 (compare_msyms): Now a std::sort comparator.
6545 (add_minsym): Add parameters.
6546 (search_minsyms_for_name): Update. Use std::vector.
6548 2018-04-03 Tom Tromey <tom@tromey.com>
6550 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6553 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6555 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6557 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6560 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6561 printing static type.
6563 2018-04-01 Tom Tromey <tom@tromey.com>
6565 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6566 (rs6000_xfer_shared_libraries): Update.
6568 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6570 * common/gdb_vecs.h (char_ptr): Remove.
6571 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6573 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6575 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6577 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6579 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6581 * tracepoint.h (struct uploaded_tp): Initialize fields.
6582 <actions, step_actions, cmd_strings>: Change type to
6583 std::vector<char *>.
6584 * tracepoint.c (get_uploaded_tp): Allocate with new.
6585 (free_uploaded_tps): Free with delete.
6586 (parse_tracepoint_definition): Adjust to std::vector change.
6587 * breakpoint.c (read_uploaded_action): Likewise.
6588 (create_tracepoint_from_upload): Likewise.
6589 * ctf.c (ctf_write_uploaded_tp): Likewise.
6590 (SET_ARRAY_FIELD): Likewise.
6591 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6593 2018-03-30 Tom Tromey <tom@tromey.com>
6595 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6597 (svr4_keep_data_in_core): Update.
6598 (svr4_read_so_list): Update.
6600 2018-03-30 Tom Tromey <tom@tromey.com>
6602 * windows-nat.c (handle_output_debug_string, handle_exception):
6604 * target.h (target_read_string): Update.
6605 * target.c (target_read_string): Change "string" to
6607 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6609 * solib-frv.c (frv_current_sos): Update.
6610 * solib-dsbt.c (dsbt_current_sos): Update.
6611 * solib-darwin.c (darwin_current_sos): Update.
6612 * linux-thread-db.c (inferior_has_bug): Update.
6613 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6614 Update. Remove alloca.
6615 * ada-lang.c (ada_main_name): Update.
6617 2018-03-30 Tom Tromey <tom@tromey.com>
6619 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6620 (struct dwo_file_deleter): New.
6621 (dwo_file_up): New typedef.
6622 (open_and_init_dwo_file): Use dwo_file_up.
6623 (free_dwo_file_cleanup): Remove.
6625 2018-03-30 Tom Tromey <tom@tromey.com>
6627 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6628 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6630 2018-03-30 Tom Tromey <tom@tromey.com>
6632 * dwarf2read.c (class free_cached_comp_units): New class.
6633 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6634 (free_cached_comp_units): Remove function.
6636 2018-03-30 Tom Tromey <tom@tromey.com>
6638 * utils.h (make_cleanup_unpush_target): Remove.
6639 * inf-ptrace.c (struct target_unpusher): New.
6640 (target_unpush_up) New typedef.
6641 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6643 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6645 2018-03-27 Tom Tromey <tom@tromey.com>
6647 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6649 2018-03-27 Pedro Alves <palves@redhat.com>
6650 Tom Tromey <tom@tromey.com>
6652 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6653 destructor. Now a class.
6654 (gdb_readline_wrapper_cleanup): Remove function.
6655 (gdb_readline_wrapper): Remove cleanups.
6657 2018-03-27 Tom Tromey <tom@tromey.com>
6659 * typeprint.h (struct type_print_options) <local_typedefs,
6660 global_typedefs>: Remove "struct" keyword.
6661 (class typedef_hash_table): New class.
6662 (recursively_update_typedef_hash, add_template_parameters)
6663 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6664 (find_typedef_in_hash): Don't declare.
6665 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6666 (typedef_hash_table::recursively_update): Rename from
6667 recursively_update_typedef_hash. Now a member.
6668 (typedef_hash_table::add_template_parameters): Rename from
6669 add_template_parameters. Now a member.
6670 (typedef_hash_table::typedef_hash_table): Now a constructor;
6671 rename from create_typedef_hash.
6672 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6673 rename from free_typedef_hash.
6674 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6675 (do_free_global_table): Remove.
6676 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6677 from copy_type_recursive.
6678 (create_global_typedef_table): Remove.
6679 (typedef_hash_table::find_global_typedef): Now a member of
6681 (typedef_hash_table::find_typedef): Rename from
6682 find_typedef_in_hash; now a member.
6683 (whatis_exp): Update.
6684 * extension.h (struct ext_lang_type_printers): Add constructor and
6686 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6688 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6689 Now a constructor; rename from start_ext_lang_type_printers.
6690 (ext_lang_type_printers): Now a destructor; rename from
6691 free_ext_lang_type_printers.
6692 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6694 (c_type_print_base_struct_union): Update. Remove cleanups.
6696 2018-03-27 Tom Tromey <tom@tromey.com>
6698 * dwarf-index-write.c: Include <cmath>.
6700 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6702 * NEWS: Add entry describing new "set|show varsize-limit" command.
6703 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6705 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6708 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6710 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6712 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6713 * dwarf-index-common.c: New file.
6714 * dwarf-index-common.h: New file.
6715 * dwarf-index-write.c: New file.
6716 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6717 (struct dwarf2_section_info): Move from here.
6718 (dwarf2_section_info_def): Likewise.
6719 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6720 (offset_type): Likewise.
6721 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6722 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6723 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6724 (byte_swap): Likewise.
6725 (MAYBE_SWAP): Likewise.
6726 (dwarf2_per_cu_ptr): Likewise.
6727 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6728 (struct tu_stats): Likewise.
6729 (struct dwarf2_per_objfile): Likewise.
6730 (struct dwarf2_per_cu_data): Likewise.
6731 (struct signatured_type): Likewise.
6732 (sig_type_ptr): Likewise.
6733 (DEF_VEC_P (sig_type_ptr)): Likewise.
6734 (INDEX4_SUFFIX): Likewise.
6735 (INDEX5_SUFFIX): Likewise.
6736 (DEBUG_STR_SUFFIX): Likewise.
6737 (dwarf2_read_section): Make non-static.
6738 (mapped_index_string_hash): Move from here.
6739 (dwarf5_djb_hash): Likewise.
6740 (file_write): Likewise.
6741 (class data_buf): Likewise.
6742 (struct symtab_index_entry): Likewise.
6743 (struct mapped_symtab): Likewise.
6744 (find_slot): Likewise.
6745 (hash_expand): Likewise.
6746 (add_index_entry): Likewise.
6747 (uniquify_cu_indices): Likewise.
6748 (class c_str_view): Likewise.
6749 (class c_str_view_hasher): Likewise.
6750 (class vector_hasher): Likewise.
6751 (write_hash_table): Likewise.
6752 (psym_index_map): Likewise.
6753 (struct addrmap_index_data): Likewise.
6754 (add_address_entry): Likewise.
6755 (add_address_entry_worker): Likewise.
6756 (write_address_map): Likewise.
6757 (symbol_kind): Likewise.
6758 (write_psymbols): Likewise.
6759 (struct signatured_type_index_data): Likewise.
6760 (write_one_signatured_type): Likewise.
6761 (recursively_count_psymbols): Likewise.
6762 (recursively_write_psymbols): Likewise.
6763 (class debug_names): Likewise.
6764 (check_dwarf64_offsets): Likewise.
6765 (psyms_seen_size): Likewise.
6766 (write_gdbindex): Likewise.
6767 (write_debug_names): Likewise.
6768 (assert_file_size): Likewise.
6769 (write_psymtabs_to_index): Likewise.
6770 (save_gdb_index_command): Likewise.
6771 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6773 * dwarf2read.h: New file.
6775 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6778 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6779 symbol name if the CU's language stores symbol names in linkage
6781 * language.h (struct language_defn)
6782 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6783 all instances of this struct.
6785 2018-03-26 Tom Tromey <tom@tromey.com>
6787 * stack.c (backtrace_command_1): Remove verbose code.
6789 2018-03-26 Tom Tromey <tom@tromey.com>
6791 * python/py-framefilter.c (py_print_type): Don't catch
6792 exceptions. Return void.
6793 (py_print_value): Likewise.
6794 (py_print_single_arg): Likewise.
6795 (enumerate_args): Don't catch exceptions.
6796 (py_print_args): Likewise.
6797 (py_print_frame): Likewise.
6798 (gdbpy_apply_frame_filter): Catch exceptions here.
6800 2018-03-26 Tom Tromey <tom@tromey.com>
6802 * stack.c (_initialize_stack): Remove trailing newlines from help
6803 text. Add "Usage" line to "backtrace" help.
6805 2018-03-26 Tom Tromey <tom@tromey.com>
6808 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6810 2018-03-26 Tom Tromey <tom@tromey.com>
6812 * python/py-framefilter.c (py_print_single_arg): Return
6813 EXT_LANG_BT_ERROR from catch.
6815 2018-03-26 Tom Tromey <tom@tromey.com>
6818 * stack.c (backtrace_command_1): Move some code into no-filters
6821 2018-03-26 Tom Tromey <tom@tromey.com>
6823 * python/py-framefilter.c (throw_quit_or_print_exception): New
6825 (gdbpy_apply_frame_filter): Use it.
6827 2018-03-26 Tom Tromey <tom@tromey.com>
6830 * python/py-framefilter.c (py_print_type, py_print_value)
6831 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6834 2018-03-26 Tom Tromey <tom@tromey.com>
6836 * python/py-framefilter.c (enumerate_args): Use
6837 gdb::unique_xmalloc_ptr.
6839 2018-03-26 Tom Tromey <tom@tromey.com>
6841 * python/py-framefilter.c (py_print_frame): Return
6843 (gdbpy_apply_frame_filter): Update comment.
6844 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6846 <EXT_LANG_BT_NO_FILTERS>: Change value.
6848 2018-03-26 Tom Tromey <tom@tromey.com>
6851 * stack.c (backtrace_command): Parse "hide" argument.
6852 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6853 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6856 2018-03-26 Tom Tromey <tom@tromey.com>
6858 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6860 (backtrace_command): Remove "fulltrace", add "flags".
6862 2018-03-26 Tom Tromey <tom@tromey.com>
6864 * stack.c (backtrace_command): Rewrite command line parsing.
6866 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6868 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6870 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6872 * filename-seen-cache.h: Add include guard.
6874 2018-03-26 Keith Seitz <keiths@redhat.com>
6876 * symfile.c (place_section): Remove "struct" from section_addr_info
6878 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6879 "struct" keyword from section_addr_info.
6881 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6883 * regformats/regdef.h (reg): Add constructors.
6885 2018-03-25 Pedro Alves <palves@redhat.com>
6887 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6888 if then/else bodies in var_func_name extraction.
6890 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6892 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6893 lookup_minimal_symbol() to find symbol entry.
6894 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6896 2018-03-23 Keith Seitz <keiths@redhat.com>
6899 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6900 nested type definitions for C++, too.
6902 2018-03-23 Tom Tromey <tom@tromey.com>
6904 * machoread.c (struct oso_el): Add a constructor. Don't define as
6906 (macho_register_oso): Remove.
6907 (macho_symtab_read): Take a std::vector.
6908 (oso_el_compare_name): Now a std::sort comparator.
6909 (macho_symfile_read_all_oso): Take a std::vector.
6910 (macho_symfile_read): Use std::vector. Remove cleanups.
6912 2018-03-22 Tom Tromey <tom@tromey.com>
6914 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6915 (record_full_goto_bookmark): Use std::string.
6917 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6920 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6923 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6925 * rs6000-tdep.c (store_insn_p): New function.
6926 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6927 and cr_reg to their unshifted values. Use store_insn_p to
6928 match LR saves using either R1 or fdata->alloca_reg. Use
6929 store_insn_p to match CR saves. Set alloca_reg_offset
6930 when alloca_reg and framep are set. Remove lr_reg shift
6931 when assigning to fdata->lr_register.
6933 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6935 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6936 command line args instead of emitting a warning.
6938 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6940 * tracepoint.h (struct static_tracepoint_marker): Initialize
6941 fields, define default constructor, move constructor and move
6942 assignment, disable the rest.
6943 <str_id, extra>: Make std::string.
6944 (release_static_tracepoint_marker): Remove.
6945 (free_current_marker): Remove.
6946 * tracepoint.c (free_current_marker): Remove.
6947 (parse_static_tracepoint_marker_definition): Adjust to
6948 std::string, use new hex2str overload.
6949 (release_static_tracepoint_marker): Remove.
6950 (print_one_static_tracepoint_marker): Get marker by reference
6951 and adjust to std::string.
6952 (info_static_tracepoint_markers_command): Adjust to std::vector
6954 * target.h (static_tracepoint_marker_p): Remove typedef.
6955 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6956 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6958 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6960 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6961 (target_debug_print_std_vector_static_tracepoint_marker): New.
6962 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6964 (target_debug_print_static_tracepoint_marker_p): ... this.
6965 * target-delegates.c: Re-generate.
6966 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6968 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6969 (decode_static_tracepoint_spec): Adjust to std::vector.
6970 (tracepoint_print_one_detail): Adjust to std::string.
6971 (strace_marker_decode_location): Adjust to std::string.
6972 (update_static_tracepoint): Adjust to std::string, remove call
6973 to release_static_tracepoint_marker.
6974 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6975 Adjust to std::vector.
6976 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6977 (remote_static_tracepoint_markers_by_strid): Adjust to
6979 * common/rsp-low.h (hex2str): New overload with explicit count
6981 * common/rsp-low.c (hex2str): New overload with explicit count
6983 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6984 (_initialize_rsp_low_selftests): Add test_hex2str test.
6985 * unittests/tracepoint-selftests.c
6986 (test_parse_static_tracepoint_marker_definition): Adjust to
6989 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6991 * tracepoint.c (parse_static_tracepoint_marker_definition):
6992 Consider case where the definition is followed by more
6994 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6995 tracepoint-selftests.c.
6996 * unittests/tracepoint-selftests.c: New.
6998 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7000 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7003 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7005 * symtab.c (find_pc_sect_line): fixed indentation.
7007 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7009 * symtab.c (find_pc_sect_line): now uses binary search.
7011 2018-03-19 Tom Tromey <tom@tromey.com>
7013 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7016 2018-03-19 Pedro Alves <palves@redhat.com>
7017 Tom Tromey <tom@tromey.com>
7019 * unittests/observable-selftests.c: New file.
7020 * common/observable.h: New file.
7021 * observable.h: New file.
7022 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7023 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7024 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7025 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7026 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7027 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7028 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7029 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7030 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7031 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7032 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7033 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7034 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7035 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7036 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7037 tui/tui-interp.c, valops.c: Update all users.
7038 * tui/tui-hooks.c (tui_bp_created_observer)
7039 (tui_bp_deleted_observer, tui_bp_modified_observer)
7040 (tui_inferior_exit_observer, tui_before_prompt_observer)
7041 (tui_normal_stop_observer, tui_register_changed_observer):
7043 (tui_observers_token): New global.
7044 (attach_or_detach, tui_attach_detach_observers): New functions.
7045 (tui_install_hooks, tui_remove_hooks): Use
7046 tui_attach_detach_observers.
7047 * record-btrace.c (record_btrace_thread_observer): Remove.
7048 (record_btrace_thread_observer_token): New global.
7049 * observer.sh: Remove.
7050 * observer.c: Rename to observable.c.
7051 * observable.c (namespace gdb_observers): Define new objects.
7052 (observer_debug): Move into gdb_observers namespace.
7053 (struct observer, struct observer_list, xalloc_observer_list_node)
7054 (xfree_observer_list_node, generic_observer_attach)
7055 (generic_observer_detach, generic_observer_notify): Remove.
7056 (_initialize_observer): Update.
7057 Don't include observer.inc.
7058 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7059 (clean mostlyclean): Likewise.
7060 (observer.h, observer.inc): Remove targets.
7061 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7062 (COMMON_SFILES): Use observable.c, not observer.c.
7063 * .gitignore: Remove observer.h.
7065 2018-03-18 Tom Tromey <tom@tromey.com>
7067 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7069 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7071 2018-03-17 Tom Tromey <tom@tromey.com>
7073 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7075 2018-03-17 Tom Tromey <tom@tromey.com>
7077 * target.c (class scoped_target_fd): New.
7078 (target_fileio_close_cleanup): Remove.
7079 (target_fileio_read_alloc_1): Use scoped_target_fd.
7081 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7083 * silent-rules.mk: New.
7084 * Makefile.in: Include silent-rules.mk
7085 (srcdir, VPATH, top_srcdir): Move up.
7086 (COMPILE): Add ECHO_CXX.
7087 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7088 (init.c): Add ECHO_INIT_C.
7089 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7090 (version.c): Add ECHO_GEN.
7091 (printcmd.o): Add ECHO_CXX.
7092 (target-float.o): Add ECHO_CXX.
7093 (ada-exp.o): Add ECHO_CXX.
7094 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7095 (insight$(EXEEXT)): Add ECHO_CXXLD.
7096 * gnulib/configure.ac: Add AM_SILENT_RULES.
7097 * gnulib/aclocal.m4: Re-generate.
7098 * gnulib/configure: Re-generate.
7099 * gnulib/import/Makefile.in: Re-generate.
7101 2018-03-16 Tom Tromey <tom@tromey.com>
7103 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7104 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7105 * utils.c (do_free_section_addr_info)
7106 (make_cleanup_free_section_addr_info): Remove.
7107 * symfile.h (struct other_sections): Add constructor.
7108 (struct section_addr_info): Remove.
7109 (section_addr_info): New typedef.
7110 (struct sym_fns) <sym_offsets>: Change type of parameter.
7111 (build_section_addr_info_from_objfile)
7112 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7113 (default_symfile_offsets, symbol_file_add)
7114 (symbol_file_add_from_bfd)
7115 (build_section_addr_info_from_section_table): Update.
7116 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7117 * symfile.c (alloc_section_addr_info): Remove.
7118 (build_section_addr_info_from_section_table): Change return type.
7120 (build_section_addr_info_from_bfd)
7121 (build_section_addr_info_from_objfile): Likewise.
7122 (free_section_addr_info): Remove.
7123 (relative_addr_info_to_section_offsets): Change type of "addrs".
7124 (addrs_section_compar): Now a std::sort comparator.
7125 (addrs_section_sort): Change return type.
7126 (addr_info_make_relative): Change type of "addrs". Update.
7127 (default_symfile_offsets, syms_from_objfile_1)
7128 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7129 (symbol_file_add_separate): Update.
7130 (symbol_file_add): Change type of "addrs". Update.
7131 (add_symbol_file_command): Update. Remove cleanups.
7132 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7134 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7135 * solib.c (solib_read_symbols): Update.
7136 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7137 * machoread.c (macho_symfile_offsets): Update.
7138 * jit.c (jit_bfd_try_read_symtab): Update.
7140 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7142 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7143 unittests/utils-selftests.c.
7144 * unittests/utils-selftests.c: New file.
7146 2018-03-14 Tom Tromey <tom@tromey.com>
7149 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7152 2018-03-14 Tom Tromey <tom@tromey.com>
7155 * printcmd.c (printf_pointer): Allow "-" in format.
7157 2018-03-14 Tom Tromey <tom@tromey.com>
7159 * printcmd.c (_initialize_printcmd): Add usage to printf.
7161 2018-03-14 Yao Qi <qiyao@sourceware.org>
7163 * MAINTAINERS: Update my email address.
7165 2018-03-13 Tom Tromey <tom@tromey.com>
7167 * machoread.c (macho_check_dsym): Change filenamep to a
7169 (macho_symfile_read): Update.
7170 * symfile.c (load_command): Use std::string.
7172 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7174 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7175 to error message string.
7176 (riscv_register_name): Use xsnprintf instead of sprintf.
7177 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7179 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7181 (riscv_push_dummy_call): Likewise.
7183 2018-03-12 Tom Tromey <tom@tromey.com>
7185 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7186 Use gdb::byte_vector.
7187 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7189 2018-03-12 Yao Qi <yao.qi@linaro.org>
7191 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7192 parameter type to readable_regcache.
7193 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7196 2018-03-11 Tom Tromey <tom@tromey.com>
7198 * dwarf2read.c (struct nextfield): Add initializers.
7199 (struct nextfnfield): Remove.
7200 (struct fnfieldlist): Add initializers. Remove "length" and
7201 "head", use std::vector.
7202 (struct decl_field_list): Remove.
7203 (struct field_info): Add initializers.
7204 <fields, baseclasses>: Now std::vector.
7205 <nbaseclasses, nfnfields, typedef_field_list_count,
7206 nested_types_list_count>: Remove.
7207 (dwarf2_add_field, dwarf2_add_type_defn)
7208 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7209 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7210 (process_structure_scope): Update.
7212 2018-03-11 Tom Tromey <tom@tromey.com>
7214 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7215 for use by std::sort.
7216 (build_type_psymtabs_1): Use std::vector.
7218 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7220 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7221 and LIBMPFR in the printed configuration.
7223 2018-03-08 Tom Tromey <tom@tromey.com>
7225 * source.c (get_filename_and_charpos): Use scoped_fd.
7226 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7227 (procfs_pidlist): Likewise.
7228 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7229 (iterate_over_mappings): Likewise.
7231 2018-03-08 Tom Tromey <tom@tromey.com>
7233 * infcall.c (struct call_return_meta_info)
7234 <stack_temporaries_enabled>: Remove.
7235 (get_call_return_value, call_function_by_hand_dummy): Update.
7236 * thread.c (disable_thread_stack_temporaries): Remove.
7237 (enable_thread_stack_temporaries): Remove.
7238 (thread_stack_temporaries_enabled_p): Return bool.
7239 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7240 (get_last_thread_stack_temporary): Update.
7241 * eval.c (evaluate_subexp): Update.
7242 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7243 class, not a function.
7244 (value_ptr, value_vec): Remove typedefs.
7245 (class thread_info) <stack_temporaries_enabled>: Now bool.
7246 <stack_temporaries>: Now a std::vector.
7247 (thread_stack_temporaries_enabled_p)
7248 (value_in_thread_stack_temporaries): Return bool.
7250 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7252 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7253 (getpkt_or_notif_sane_1): Likewise.
7255 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7257 * build-id.c (build_id_to_debug_bfd): Use std::string.
7259 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7261 * build-id.c (find_separate_debug_file_by_buildid): Return
7263 * build-id.h (find_separate_debug_file_by_buildid): Return
7265 * coffread.c (coff_symfile_read): Adjust to std::string.
7266 * elfread.c (elf_symfile_read): Adjust to std::string.
7267 * symfile.c (separate_debug_file_exists): Change parameter to
7269 (find_separate_debug_file): Return std::string.
7270 (find_separate_debug_file_by_debuglink): Return std::string.
7271 * symfile.h (find_separate_debug_file_by_debuglink): Return
7274 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7276 * common/xml-utils.c (xml_escape_text): Move code to...
7277 (xml_escape_text_append): ... this new function.
7278 * common/xml-utils.h (xml_escape_text_append): New declaration.
7279 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7281 (_initialize_xml_utils): register test_xml_escape_text_append as
7284 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7286 * defs.h: Remove MAX_REGISTER_SIZE.
7287 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7289 * python/py-unwind.c (pyuw_sniffer): Likewise.
7291 2018-03-07 Tom Tromey <tom@tromey.com>
7293 * linux-tdep.c (linux_info_proc): Update.
7294 * target.h (struct target_ops) <to_fileio_readlink>: Return
7296 (target_fileio_readlink): Return optional<string>.
7297 * remote.c (remote_hostio_readlink): Return optional<string>.
7298 * inf-child.c (inf_child_fileio_readlink): Return
7300 * target.c (target_fileio_readlink): Return optional<string>.
7302 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7304 * regcache.c (cooked_read_test): Add riscv to the list of
7305 architectures that have a save_reggroup.
7307 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7309 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7310 value is not a dynamic class object.
7312 2018-03-06 Tom Tromey <tom@tromey.com>
7314 * rust-exp.y: Formatting fixes.
7316 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7318 * riscv-tdep.c (riscv_register_name): Remove target description
7320 (riscv_gdbarch_init): Remove target description check.
7322 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7324 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7326 * riscv-tdep.h: Likewise.
7328 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7330 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7331 (riscv_pseudo_register_write): Delete.
7332 (riscv_gdbarch_init): Remove all use of pseudo registers.
7334 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7336 * record-btrace.c (btrace_print_lines): Replace cleanup
7337 parameter with RAII equivalents.
7338 (btrace_insn_history): Replace cleanup with RAII equivalents.
7339 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7340 make_cleanup_ui_out_tuple_begin_end): Remove.
7341 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7342 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7343 make_cleanup_ui_out_list_begin_end): Remove.
7345 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7347 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7348 parameter types to std::vector. Use bool.
7349 (record_btrace_wait): Replace VEC(tp_t) with
7350 std::vector<thread_info *>.
7351 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7353 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7355 * record-btrace.c (record_btrace_disable_callback): Remove.
7356 (struct scoped_btrace_disable): New.
7357 (record_btrace_open): Use scoped_btrace_disable.
7359 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7361 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7362 reading values from registers.
7364 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7366 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7369 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7371 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7372 change parameter type. Use GDB's print functions, and use
7373 core_addr_to_string where appropriate.
7374 (riscv_push_dummy_call): Use core_addr_to_string where
7375 appropriate, update call to riscv_print_arg_location, and reindent
7377 (riscv_return_value): Update call to riscv_print_arg_location.
7379 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7380 Tim Newsome <tim@sifive.com>
7381 Albert Ou <a0u@eecs.berkeley.edu>
7382 Darius Rad <darius@bluespec.com>
7384 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7385 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7386 (ALLDEPFILES): Add riscv-tdep.c
7387 * configure.tgt: Add riscv support.
7388 * riscv-tdep.c: New file.
7389 * riscv-tdep.h: New file.
7390 * NEWS: Mention new target.
7391 * MAINTAINERS: Add entry for riscv.
7393 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7395 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7396 fields within aggregates.
7398 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7400 * record-btrace.c (btrace_print_lines): Change type of flags to
7401 gdb_disassembly_flags.
7403 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7405 * fbsd-nat.c: Include "inf-ptrace.h".
7406 (USE_SIGTRAP_SIGINFO): Conditionally define.
7407 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7408 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7409 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7411 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7413 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7415 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7416 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7417 "supports_stopped_by_hw_breakpoint" target methods.
7419 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7421 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7422 * fbsd-nat.c (debug_fbsd_nat): New variable.
7423 (show_fbsd_nat_debug): New function.
7424 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7425 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7427 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7429 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7430 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7432 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7433 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7436 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7438 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7439 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7441 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7443 * charset.c (struct charset_vector): New.
7444 (charsets): Change type to charset_vector.
7445 (find_charset_names): Adjust.
7447 (_initialize_charset): Adjust.
7449 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7451 * progspace.h (struct program_space) <deleted_solibs>: Change
7452 type to std::vector<std::string>.
7453 * progspace.c (clear_program_space_solib_cache): Adjust.
7454 * breakpoint.c (print_solib_event): Adjust.
7455 (check_status_catch_solib): Adjust.
7456 * solib.c (update_solib_list): Adjust.
7457 * ui-out.h (class ui_out) <field_string>: New overload.
7458 * ui-out.c (ui_out::field_string): New overload.
7460 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7462 * progspace.h (struct program_space): Add constructor and
7463 destructor, initialize fields.
7464 (add_program_space): Remove.
7465 * progspace.c (add_program_space): Rename to...
7466 (program_space::program_space): ... this.
7467 (release_program_space): Rename to...
7468 (program_space::~program_space): ... this.
7469 (delete_program_space): Use delete to delete program_space.
7470 (initialize_progspace): Use new to allocate program_space.
7471 * inferior.c (add_inferior_with_spaces): Likewise.
7472 (clone_inferior_command): Likewise.
7473 * infrun.c (follow_fork_inferior): Likewise.
7474 (handle_vfork_child_exec_or_exit): Likewise.
7476 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7478 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7479 (delim_string_to_char_ptr_vec): Return std::vector of
7480 gdb::unique_xmalloc_ptr.
7481 (dirnames_to_char_ptr_vec_append): Take std::vector of
7482 gdb::unique_xmalloc_ptr.
7483 (dirnames_to_char_ptr_vec): Return std::vector of
7484 gdb::unique_xmalloc_ptr.
7485 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7486 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7487 (delim_string_to_char_ptr_vec): Return an std::vector of
7488 gdb::unique_xmalloc_ptr, adjust the code.
7489 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7490 gdb::unique_xmalloc_ptr, adjust the code.
7491 (dirnames_to_char_ptr_vec): Return an std::vector of
7492 gdb::unique_xmalloc_ptr, adjust the code.
7493 * auto-load.c (auto_load_safe_path_vec): Change type to
7494 std::vector of gdb::unique_xmalloc_ptr.
7495 (auto_load_expand_dir_vars): Return an std::vector of
7496 gdb::unique_xmalloc_ptr, adjust the code.
7497 (auto_load_safe_path_vec_update): Adjust.
7498 (filename_is_in_auto_load_safe_path_vec): Adjust.
7499 (auto_load_objfile_script_1): Adjust.
7500 * build-id.c (build_id_to_debug_bfd): Adjust.
7501 * linux-thread-db.c (thread_db_load_search): Adjust.
7502 * source.c (add_path): Adjust.
7504 * symfile.c (find_separate_debug_file): Adjust.
7505 * utils.c (do_free_char_ptr_vec): Remove.
7506 (make_cleanup_free_char_ptr_vec): Remove.
7508 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7511 * common/pathstuff.c: Conditionally include "<windows.h>".
7513 2018-03-01 Georg Sauthoff <mail@georg.so>
7516 * gcore.in: Quote variables and switch interpreter to bash.
7518 2018-03-01 Tom Tromey <tom@tromey.com>
7520 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7521 assertion. Add assertion for discriminant_index.
7522 (quirk_rust_enum): Use correct base type name in univariant case.
7524 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7526 * record.c (get_call_history_modifiers): Return a
7528 (cmd_record_call_history): Adjust.
7529 * record-btrace.c (record_btrace_call_history): Adjust.
7530 (record_btrace_call_history_range): Adjust.
7531 (record_btrace_call_history_from): Adjust.
7532 * target-debug.h (target_debug_print_record_print_flags): New.
7533 * target-delegates.c: Re-generate.
7534 * target.c (target_call_history): Change flags type.
7535 (target_call_history_from): Likewise.
7536 (target_call_history_range): Likewise.
7537 * target.h (struct target_ops) <target_call_history>: Likewise.
7538 (target_call_history_from): Likewise.
7539 (target_call_history_range): Likewise.
7541 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7542 Simon Marchi <simon.marchi@polymtl.ca>
7544 * common/common-utils.c: Include "sys/stat.h".
7545 (is_regular_file): Move here from "source.c"; change return
7547 * common/common-utils.h (is_regular_file): New prototype.
7548 * common/pathstuff.c (contains_dir_separator): New function.
7549 * common/pathstuff.h (contains_dir_separator): New prototype.
7550 * source.c: Don't include "sys/stat.h".
7551 (is_regular_file): Move to "common/common-utils.c".
7553 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7555 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7556 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7557 * auto-load.c: Include "common/pathstuff.h".
7558 * common/common-def.h (current_directory): Move here.
7559 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7561 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7563 * common/pathstuff.c: New file.
7564 * common/pathstuff.h: New file.
7565 * compile/compile.c: Include "common/pathstuff.h".
7566 * defs.h (current_directory): Move to "common/common-defs.h".
7567 * dwarf2read.c: Include "common/pathstuff.h".
7569 * guile/scm-safe-call.c: Likewise.
7570 * linux-thread-db.c: Likewise.
7572 * nto-tdep.c: Likewise.
7573 * objfiles.c: Likewise.
7574 * source.c: Likewise.
7575 * symtab.c: Likewise.
7576 * utils.c: Include "common/pathstuff.h".
7577 (gdb_realpath): Move to "common/pathstuff.c".
7578 (gdb_realpath_keepfile): Likewise.
7579 (gdb_abspath): Likewise.
7580 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7581 (gdb_realpath_keepfile): Likewise.
7582 (gdb_abspath): Likewise.
7584 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7586 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7587 wildcard process pid for super_resume for kernels with a
7590 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7592 * compile/compile.c (get_args): Add additional comments
7593 explaining function.
7595 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7596 Tom Tromey <tom@tromey.com>
7598 * target.h (memory_write_request_s): Remove typedef. Don't define
7600 (target_write_memory_blocks): Change argument to std::vector.
7601 (struct memory_write_request): Add constructor.
7602 * target-memory.c (compare_block_starting_address): Return bool.
7603 Change argument types.
7604 (claim_memory): Change arguments to use std::vector.
7605 (split_regular_and_flash_blocks, blocks_to_erase)
7606 (compute_garbled_blocks): Likewise.
7607 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7608 (target_write_memory_blocks): Change argument to std::vector.
7609 * symfile.c (struct load_section_data): Add constructor and
7610 destructor. Use std::vector for "requests".
7611 (struct load_progress_data): Add initializers.
7612 (load_section_callback): Update. Use "new".
7613 (clear_memory_write_data): Remove.
7614 (generic_load): Update.
7616 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7618 * arch/aarch64.h: Use common/tdesc.h.
7620 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7622 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7623 architecture with a 64-bit ABI.
7625 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7627 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7628 ahead of target description loading.
7630 2018-02-26 Tom Tromey <tom@tromey.com>
7632 * stack.c (backtrace_command_1): Update.
7633 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7635 * python/py-framefilter.c (py_print_frame)
7636 (gdbpy_apply_frame_filter): Change type of "flags".
7637 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7639 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7640 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7641 * extension.h (enum frame_filter_flag): Rename from
7643 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7644 (apply_ext_lang_frame_filter): Change type of "flags".
7645 * extension.c (apply_ext_lang_frame_filter): Change type of
7647 * extension-priv.h (struct extension_language_ops)
7648 <apply_frame_filter>: Change type of "flags".
7650 2018-02-26 Tom Tromey <tom@tromey.com>
7653 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7654 off-by-one in py_end computation.
7655 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7657 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7660 2018-02-26 Tom Tromey <tom@tromey.com>
7662 * dwarf2read.c (struct variant_field): New.
7663 (struct nextfield) <variant>: New field.
7664 (dwarf2_add_field): Handle DW_TAG_variant_part.
7665 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7666 discriminated union.
7667 (read_structure_type): Handle DW_TAG_variant_part.
7668 (handle_struct_member_die): New function, extracted from
7669 process_structure_scope. Handle DW_TAG_variant.
7670 (process_structure_scope): Handle discriminated unions. Call
7671 handle_struct_member_die.
7673 2018-02-26 Tom Tromey <tom@tromey.com>
7675 * rust-lang.h (rust_last_path_segment): Declare.
7676 * rust-lang.c (rust_last_path_segment): Now public. Change
7678 (struct disr_info): Remove.
7679 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7680 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7681 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7682 (rust_enum_p, rust_enum_variant): New function.
7683 (rust_underscore_fields): Remove "offset" parameter.
7684 (rust_print_enum): New function.
7685 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7686 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7687 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7689 (rust_internal_print_type): New function, from rust_print_type.
7691 (rust_print_type): Call rust_internal_print_type.
7692 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7693 Update enum handling.
7694 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7695 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7696 (rust_union_quirks): New functions.
7697 (process_full_comp_unit, process_full_type_unit): Call
7699 (process_structure_scope): Update rust_unions if necessary.
7701 2018-02-26 Tom Tromey <tom@tromey.com>
7703 * value.h (value_union_variant): Declare.
7704 * valops.c (value_union_variant): New function.
7705 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7706 (struct discriminant_info): New.
7707 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7709 (struct main_type) <flag_discriminated_union>: New field.
7711 2018-02-26 Tom Tromey <tom@tromey.com>
7713 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7714 unittests/unpack-selftests.c.
7715 * unittests/unpack-selftests.c: New file.
7716 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7718 2018-02-26 Yao Qi <yao.qi@linaro.org>
7720 * dwarf2read.c (struct partial_die_info) <read>: New method.
7721 (read_partial_die): Remove the declaration.
7722 (load_partial_dies): Update.
7723 (partial_die_info::partial_die_info):
7724 (read_partial_die): Change it to partial_die_info::read.
7726 2018-02-26 Yao Qi <yao.qi@linaro.org>
7728 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7729 (fixup_partial_die): Remove declaration.
7730 (scan_partial_symbols): Update.
7731 (partial_die_parent_scope): Likewise.
7732 (partial_die_full_name): Likewise.
7733 (fixup_partial_die): Change it to partial_die_info::fixup.
7735 2018-02-26 Yao Qi <yao.qi@linaro.org>
7737 * dwarf2read.c (read_partial_die): Update the declaration.
7738 (load_partial_dies): Caller update.
7739 (read_partial_die): Remove one argument abbrev_len.
7741 2018-02-26 Yao Qi <yao.qi@linaro.org>
7743 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7744 assignment operator.
7745 (load_partial_dies): Use ctor and copy ctor.
7746 (read_partial_die): Update.
7747 (dwarf2_cu::find_partial_die): Use ctor.
7749 2018-02-26 Yao Qi <yao.qi@linaro.org>
7751 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7752 (find_partial_die_in_comp_unit): Change it to
7753 dwarf2_cu::find_partial_die.
7754 (find_partial_die): Update.
7756 2018-02-26 Yao Qi <yao.qi@linaro.org>
7758 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7761 2018-02-26 Yao Qi <yao.qi@linaro.org>
7763 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7765 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7767 * arch/amd64.h: Use common/tdesc.h.
7768 * arch/i386.c: Likewise.
7769 * arch/i386.h: Likewise.
7770 * arch/tic6x.c: Likewise.
7771 * arch/tdesc.h: Move file from here...
7772 * common/tdesc.h: ...to here.
7773 * features/aarch64-core.c: Regenerate.
7774 * features/aarch64-fpu.c: Regenerate.
7775 * features/i386/32bit-avx.c: Regenerate.
7776 * features/i386/32bit-avx512.c: Regenerate.
7777 * features/i386/32bit-core.c: Regenerate.
7778 * features/i386/32bit-linux.c: Regenerate.
7779 * features/i386/32bit-mpx.c: Regenerate.
7780 * features/i386/32bit-pkeys.c: Regenerate.
7781 * features/i386/32bit-sse.c: Regenerate.
7782 * features/i386/64bit-avx.c: Regenerate.
7783 * features/i386/64bit-avx512.c: Regenerate.
7784 * features/i386/64bit-core.c: Regenerate.
7785 * features/i386/64bit-linux.c: Regenerate.
7786 * features/i386/64bit-mpx.c: Regenerate.
7787 * features/i386/64bit-pkeys.c: Regenerate.
7788 * features/i386/64bit-segments.c: Regenerate.
7789 * features/i386/64bit-sse.c: Regenerate.
7790 * features/i386/x32-core.c: Regenerate.
7791 * features/tic6x-c6xp.c: Regenerate.
7792 * features/tic6x-core.c: Regenerate.
7793 * features/tic6x-gp.c: Regenerate.
7794 * target-descriptions.c: Use common/tdesc.h.
7795 * target-descriptions.h: Likewise.
7797 2018-02-24 Tom Tromey <tom@tromey.com>
7799 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7800 (try_thread_db_load_from_dir, thread_db_load_search): Use
7802 (info_auto_load_libthread_db_compare): Return bool. Change
7804 (info_auto_load_libthread_db): Use std::vector, std::string.
7807 2018-02-24 Tom Tromey <tom@tromey.com>
7809 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7811 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7813 * gdbarch.c: Rebuild.
7814 * gdbarch.h: Rebuild.
7815 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7816 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7817 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7820 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7822 * gdbtypes.h (sect_offset): Change type to uint64_t.
7823 (sect_offset_str): New function.
7824 * dwarf2read.c (create_addrmap_from_aranges): Use
7826 (error_check_comp_unit_head): Likewise.
7827 (create_debug_type_hash_table): Likewise.
7828 (read_cutu_die_from_dwo): Likewise.
7829 (init_cutu_and_read_dies): Likewise.
7830 (init_cutu_and_read_dies_no_follow): Likewise.
7831 (process_psymtab_comp_unit_reader): Likewise.
7832 (partial_die_parent_scope): Likewise.
7833 (peek_die_abbrev): Likewise.
7834 (process_queue): Likewise.
7835 (dwarf2_physname): Likewise.
7836 (read_namespace_alias): Likewise.
7837 (read_import_statement): Likewise.
7838 (create_dwo_cu_reader): Likewise.
7839 (create_cus_hash_table): Likewise.
7840 (lookup_dwo_cutu): Likewise.
7841 (inherit_abstract_dies): Likewise.
7842 (read_func_scope): Likewise.
7843 (read_call_site_scope): Likewise.
7844 (dwarf2_add_member_fn): Likewise.
7845 (read_common_block): Likewise.
7846 (read_module_type): Likewise.
7847 (read_typedef): Likewise.
7848 (read_subrange_type): Likewise.
7849 (load_partial_dies): Likewise.
7850 (read_partial_die): Likewise.
7851 (find_partial_die): Likewise.
7852 (read_str_index): Likewise.
7853 (dwarf2_string_attr): Likewise.
7854 (build_error_marker_type): Likewise.
7855 (lookup_die_type): Likewise.
7856 (dump_die_shallow): Likewise.
7857 (follow_die_ref): Likewise.
7858 (dwarf2_fetch_die_loc_sect_off): Likewise.
7859 (dwarf2_fetch_constant_bytes): Likewise.
7860 (follow_die_sig): Likewise.
7861 (get_signatured_type): Likewise.
7862 (get_DW_AT_signature_type): Likewise.
7863 (dwarf2_find_containing_comp_unit): Likewise.
7864 (set_die_type): Likewise.
7866 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7868 * arch/aarch64.c: Include "common-defs.h".
7869 * arch/amd64.c: Likewise.
7870 * arch/i386.c: Likewise.
7872 2018-02-21 Tom Tromey <tom@tromey.com>
7874 * value.h: (extract_field_op): Update.
7875 * eval.c (extract_field_op): Return a const char *.
7876 * expression.h (parse_expression_for_completion): Update.
7877 * completer.c (complete_expression): Update.
7878 (add_struct_fields): Make fieldname const.
7879 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7880 (mark_completion_tag, parse_exp_in_context_1): Update.
7881 (parse_expression_for_completion): Change "name" to
7882 unique_xmalloc_ptr*.
7884 2018-02-21 Tom Tromey <tom@tromey.com>
7886 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7888 2018-02-21 Yao Qi <yao.qi@linaro.org>
7890 * avr-tdep.c (avr_read_pc): Change parameter type to
7892 * gdbarch.sh (read_pc): Likewise.
7893 * gdbarch.c: Re-generated.
7894 * gdbarch.h: Re-generated.
7895 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7897 * ia64-tdep.c (ia64_read_pc): Likewise.
7898 * mips-tdep.c (mips_read_pc): Likewise.
7899 * spu-tdep.c (spu_read_pc): Likewise.
7901 2018-02-21 Yao Qi <yao.qi@linaro.org>
7903 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7904 * regcache-dump.c: New file.
7905 * regcache.c: Move register_dump to regcache-dump.c.
7906 (maintenance_print_registers): Likewise.
7907 (maintenance_print_raw_registers): Likewise.
7908 (maintenance_print_cooked_registers): Likewise.
7909 (maintenance_print_register_groups): Likewise.
7910 (maintenance_print_remote_registers): Likewise.
7911 (_initialize_regcache): Likewise.
7912 * regcache.h (register_dump): Moved from regcache.c.
7914 2018-02-21 Yao Qi <yao.qi@linaro.org>
7916 * regcache.c (regcache::regcache): Update.
7917 (regcache::invalidate): Move it to detached_regcache::invalidate.
7918 (get_thread_arch_aspace_regcache): Update.
7919 (regcache::raw_update): Update.
7920 (regcache::cooked_read): Remove some code.
7921 (regcache::cooked_read_value): Likewise.
7922 (regcache::raw_write): Remove assert on m_readonly_p.
7923 (regcache::raw_supply_integer): Move it to
7924 detached_regcache::raw_supply_integer.
7925 (regcache::raw_supply_zeroed): Likewise.
7926 * regcache.h (detached_regcache) <raw_supply_integer>: New
7928 <raw_supply_zeroed, invalidate>: Likewise.
7929 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7930 <invalidate>: Likewise.
7931 <m_readonly_p>: Removed.
7933 2018-02-21 Yao Qi <yao.qi@linaro.org>
7935 * infcmd.c (get_return_value): Let stop_regs point to
7936 get_current_regcache.
7937 * regcache.c (regcache::regcache): Remove.
7938 (register_dump_reg_buffer): New class.
7939 (regcache_print): Adjust.
7940 * regcache.h (regcache): Remove constructors.
7942 2018-02-21 Yao Qi <yao.qi@linaro.org>
7944 * regcache.c (class register_dump): New class.
7945 (register_dump_regcache, register_dump_none): New class.
7946 (register_dump_remote, register_dump_groups): New class.
7947 (regcache_print): Update.
7948 * regcache.h (regcache_dump_what): Move it to regcache.c.
7949 (regcache) <dump>: Remove.
7951 2018-02-21 Yao Qi <yao.qi@linaro.org>
7953 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7955 (jit_unwind_reg_set_impl): Call raw_supply.
7956 (jit_frame_sniffer): Use reg_buffer_rw.
7957 * record-full.c (record_full_core_regbuf): Change its type.
7958 (record_full_core_open_1): Use reg_buffer_rw.
7959 (record_full_close): Likewise.
7960 (record_full_core_fetch_registers): Use regcache->raw_supply.
7961 (record_full_core_store_registers): Likewise.
7962 * regcache.c (regcache::get_register_status): Move it to
7964 (regcache_raw_set_cached_value): Remove.
7965 (regcache::raw_set_cached_value): Remove.
7966 (regcache::raw_write): Call raw_supply.
7967 (regcache::raw_supply): Move it to reg_buffer_rw.
7968 * regcache.h (regcache_raw_set_cached_value): Remove.
7969 (reg_buffer_rw): New class.
7971 2018-02-21 Yao Qi <yao.qi@linaro.org>
7973 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7974 readonly_detached_regcache.
7975 (dummy_frame_prev_register): Use regcache->cooked_read.
7976 * frame.c (frame_save_as_regcache): Change return type.
7977 (frame_pop): Update.
7978 * frame.h (frame_save_as_regcache): Update declaration.
7979 * inferior.h (get_infcall_suspend_state_regcache): Update
7981 * infrun.c (infcall_suspend_state) <registers>: use
7982 readonly_detached_regcache.
7983 (save_infcall_suspend_state): Don't use regcache_dup.
7984 (get_infcall_suspend_state_regcache): Change return type.
7985 * linux-fork.c (struct fork_info) <savedregs>: Change to
7986 readonly_detached_regcache.
7988 (fork_save_infrun_state): Don't use regcache_dup.
7989 (info_checkpoints_command): Adjust.
7990 * mi/mi-main.c (register_changed_p): Update declaration.
7991 (mi_cmd_data_list_changed_registers): Use
7992 readonly_detached_regcache.
7993 (register_changed_p): Change parameter type to
7994 readonly_detached_regcache.
7995 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7996 readonly_detached_regcache.
7997 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7998 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8000 (regcache::save): Move it to reg_buffer.
8001 (regcache::restore): Change parameter type.
8002 (regcache_dup): Remove.
8003 * regcache.h (reg_buffer) <save>: New method.
8004 (readonly_detached_regcache): New class.
8005 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8006 readonly_detached_regcache.
8007 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8009 2018-02-21 Yao Qi <yao.qi@linaro.org>
8011 * frame.c (frame_save_as_regcache): Use regcache method save.
8012 (frame_pop): Use regcache method restore.
8013 * infrun.c (restore_infcall_suspend_state): Likewise.
8014 * linux-fork.c (fork_load_infrun_state): Likewise.
8015 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8017 * regcache.c (regcache_save): Remove.
8018 (regcache::restore): More asserts.
8019 (regcache_cpy): Remove.
8020 * regcache.h (regcache_save): Remove the declaration.
8021 (regcache::restore): Move from private to public.
8022 Remove the friend declaration of regcache_cpy.
8023 (regcache_cpy): Remove declaration.
8025 2018-02-21 Yao Qi <yao.qi@linaro.org>
8027 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8028 parameter type to 'readable_regcache *'.
8029 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8030 * arm-tdep.c (arm_neon_quad_read): Likewise.
8031 (arm_pseudo_read): Likewise.
8032 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8033 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8034 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8035 * gdbarch.c: Re-generated.
8036 * gdbarch.h: Re-generated.
8037 * gdbarch.sh (pseudo_register_read): Change parameter type to
8038 'readable_regcache *'.
8039 (pseudo_register_read_value): Likewise.
8040 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8041 (h8300_pseudo_register_read): Likewise.
8042 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8043 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8044 (i386_pseudo_register_read_into_value): Likewise.
8045 (i386_pseudo_register_read_value): Likewise.
8046 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8048 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8049 * m32c-tdep.c (m32c_raw_read): Likewise.
8050 (m32c_read_flg): Likewise.
8051 (m32c_banked_register): Likewise.
8052 (m32c_banked_read): Likewise.
8053 (m32c_sb_read): Likewise.
8054 (m32c_part_read): Likewise.
8055 (m32c_cat_read): Likewise.
8056 (m32c_r3r2r1r0_read): Likewise.
8057 (m32c_pseudo_register_read): Likewise.
8058 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8059 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8060 (mep_pseudo_cr64_read): Likewise.
8061 (mep_pseudo_register_read): Likewise.
8062 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8063 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8064 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8065 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8066 (regcache::cooked_read): Likewise.
8067 (regcache::cooked_read_value): Likewise.
8068 (regcache_cooked_read_signed):
8069 (regcache::cooked_read): Likewise.
8070 * regcache.h (readable_regcache): New class.
8071 (regcache): Inherit readable_regcache. Move some methods to
8073 * rl78-tdep.c (rl78_pseudo_register_read): Change
8074 parameter type to 'readable_regcache *'.
8075 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8076 (e500_pseudo_register_read): Change parameter type to
8077 'readable_regcache *'.
8078 (dfp_pseudo_register_read): Likewise.
8079 (vsx_pseudo_register_read): Likewise.
8080 (efpr_pseudo_register_read): Likewise.
8081 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8082 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8083 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8084 (sh64_pseudo_register_read): Likewise.
8085 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8086 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8087 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8088 (spu_pseudo_register_read): Likewise.
8089 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8090 (xtensa_pseudo_register_read): Likewise.
8092 2018-02-21 Yao Qi <yao.qi@linaro.org>
8094 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8095 (regcache::arch): Move it to reg_buffer::arch.
8096 (regcache::register_buffer): Likewise.
8097 (regcache::assert_regnum): Likewise.
8098 (regcache::num_raw_registers): Likewise.
8099 * regcache.h (reg_buffer): New class.
8100 (regcache): Inherit reg_buffer.
8102 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8104 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8105 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8107 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8109 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8111 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8113 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8114 (SFILES): Remove common/*.c files.
8115 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8116 * common/common.host: Add common reference.
8117 * configure.ac: Likewise.
8118 * configure: Regenerate.
8120 2018-02-16 Yao Qi <yao.qi@linaro.org>
8122 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8123 (block_initialize_namespace): Use new.
8124 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8125 (dwarf2_free_objfile): Use delete.
8126 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8127 (copy_type_recursive): Use new.
8128 * gdb_obstack.h (allocate_on_obstack): New.
8130 2018-02-15 Yao Qi <yao.qi@linaro.org>
8133 * inferior.c (exit_inferior_1): Reset inf->control.
8135 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8137 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8140 2018-02-14 Pedro Alves <palves@redhat.com>
8142 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8143 frame_cleanup_after_sniffer on exception.
8145 2018-02-14 Tom Tromey <tom@tromey.com>
8147 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8149 (solib_bfd_open): Make pathname const.
8150 * solib.c (solib_bfd_open): Make pathname const.
8151 * solib-spu.c (spu_bfd_fopen): Make name const.
8152 (spu_bfd_open): Make pathname const.
8153 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8154 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8156 2018-02-14 Tom Tromey <tom@tromey.com>
8158 * symfile.c (symfile_bfd_open): Update.
8159 * source.h (openp, source_full_path_of, find_and_open_source):
8160 Change argument type to unique_xmalloc_ptr.
8161 * source.c (openp): Take a unique_xmalloc_ptr.
8162 (source_full_path_of, find_and_open_source): Likewise.
8163 (open_source_file, symtab_to_fullname): Update.
8164 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8166 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8167 (exec_file_find): Update.
8168 * psymtab.c (psymtab_to_fullname): Update.
8169 * nto-tdep.h (nto_find_and_open_solib): Update.
8170 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8172 * exec.c (exec_file_attach): Update.
8173 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8174 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8176 2018-02-14 Tom Tromey <tom@tromey.com>
8178 * solib.c: Include source.h.
8179 * nto-tdep.c: Include source.h.
8180 * mi/mi-cmd-env.c: Include source.h.
8181 * infcmd.c: Include source.h.
8182 * exec.c: Include source.h.
8183 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8184 (add_path, directory_switch, source_path, init_source_path): Move
8186 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8187 (add_path, directory_switch, source_path, init_source_path):
8190 2018-02-14 Tom Tromey <tom@tromey.com>
8192 * solist.h (exec_file_find, solib_find): Return
8194 (solib_bfd_fopen): Take a const char *.
8195 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8196 (exec_file_find, solib_find): Likewise.
8197 (solib_bfd_fopen): Do not take ownership of "pathname".
8198 (solib_bfd_open): Use unique_xmalloc_ptr.
8199 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8200 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8201 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8202 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8204 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8206 * ada-lang.c (name_match_type_from_name): Remove reference to
8207 ada_name_for_lookup in function's documentation.
8208 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8210 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8212 * defs.h (enum openp_flags): New enum.
8213 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8214 Move to enum openp_flags.
8215 (openp_flags): New enum flags.
8216 (openp): Change parameter type to openp_flags.
8217 * source.c (openp): Change parameter type to openp_flags.
8218 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8219 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8221 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8223 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8226 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8228 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8230 (class dwarf2_queue_guard): ...the destructor of this new class.
8231 (dw2_do_instantiate_symtab): Create instance of the new class
8232 dwarf2_queue_guard, remove cleanup.
8234 2018-02-09 Tom Tromey <tom@tromey.com>
8236 * source.c (find_source_lines): Don't reference past the end of
8239 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8241 * remote.c (remote_btrace_maybe_reopen): Change error message.
8242 * btrace.c (btrace_enable): Likewise.
8243 (parse_xml_btrace): Likewise.
8244 (parse_xml_btrace_conf): Likewise.
8246 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8248 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8249 (linux_enable_pt, linux_enable_bts): Call
8250 diagnose_perf_event_open_fail.
8252 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8254 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8255 Remove parameter and change return type. Update callers. Move it.
8256 (linux_enable_bts, linux_enable_pt): Improve error message.
8257 (linux_enable_pt): Remove zero buffer size check.
8258 (linux_enable_btrace): Improve error messages. Remove NULL return
8261 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8263 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8264 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8265 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8266 (linux_supports_pt, linux_supports_btrace): Remove.
8267 (linux_enable_bts): Call cpu_supports_bts.
8268 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8269 * remote.c (remote_supports_btrace): Remove.
8270 (init_remote_ops): Remove remote_supports_btrace.
8271 * target-delegates.c: Regenerated.
8272 * target.c (target_supports_btrace): Remove.
8273 * target.h (target_ops) <to_supports_btrace>: Remove
8274 (target_supports_btrace): Remove.
8275 * x86-linux-nat.c (x86_linux_create_target): Remove
8276 linux_supports_btrace.
8278 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8280 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8282 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8283 exception and use message in own exception.
8285 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8287 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8288 (perf_event_pt_event_type): Use gdb_file_up.
8289 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8290 scoped_fd, and scoped_mmap.
8292 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8294 * common/scoped_mmap.h: New.
8295 * unittests/scoped_mmap-selftest.c: New.
8296 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8297 unittests/scoped_mmap-selftest.c.
8299 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8301 * common/scoped_fd.h: New.
8302 * unittests/scoped_fd-selftest.c: New.
8303 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8304 unittests/scoped_fd-selftest.c.
8306 2018-02-09 Tom Tromey <tom@tromey.com>
8308 * auto-load.c (auto_load_section_scripts): Use
8309 gdb::unique_xmalloc_ptr.
8311 2018-02-09 Tom Tromey <tom@tromey.com>
8313 * auto-load.c (execute_script_contents): Use std::string.
8315 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8317 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8318 Python function, rather than a new command.
8320 2018-02-08 Tom Tromey <tom@tromey.com>
8322 * solib.c (solib_find_1): Use std::string.
8323 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8325 2018-02-08 Tom Tromey <tom@tromey.com>
8327 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8329 2018-02-08 Tom Tromey <tom@tromey.com>
8331 * source.c (find_source_lines): Use gdb::def_vector.
8333 2018-02-08 Tom Tromey <tom@tromey.com>
8335 * macrocmd.c (struct temporary_macro_definition): New.
8336 (macro_define_command): Use temporary_macro_definition. Remove
8338 (free_macro_definition_ptr): Remove.
8340 2018-02-08 Tom Tromey <tom@tromey.com>
8342 * macroexp.c (maybe_expand): Use std::string.
8344 2018-02-08 Tom Tromey <tom@tromey.com>
8346 * macroexp.c (struct macro_buffer): Add initializers for some
8348 (init_buffer, init_shared_buffer, free_buffer)
8349 (free_buffer_return_text): Remove.
8350 (macro_buffer): New constructors.
8351 (~macro_buffer): New destructor.
8352 (macro_buffer::set_shared): New method.
8353 (macro_buffer::resize_buffer, macro_buffer::appendc)
8354 (macro_buffer::appendmem): Now methods, not free functions.
8355 (set_token, append_tokens_without_splicing, stringify)
8356 (macro_stringify): Update.
8357 (gather_arguments): Change return type. Remove argc_p argument,
8358 add args_ptr argument. Use std::vector.
8359 (substitute_args): Remove argc argument. Accept std::vector.
8360 (expand): Update. Use std::vector.
8361 (scan, macro_expand, macro_expand_next): Update.
8363 2018-02-08 Tom Tromey <tom@tromey.com>
8365 * symtab.c (default_collect_symbol_completion_matches_break_on):
8366 Use unique_xmalloc_ptr.
8367 * macroscope.h: (sal_macro_scope, user_macro_scope)
8368 (default_macro_scope): Return unique_xmalloc_ptr.
8369 * macroscope.c (sal_macro_scope, user_macro_scope)
8370 (default_macro_scope): Return unique_xmalloc_ptr.
8371 * macroexp.h (macro_expand, macro_expand_once): Return
8373 * macroexp.c (macro_expand, macro_expand_once): Return
8375 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8376 (info_macro_command, info_macros_command): Use
8378 * compile/compile-c-support.c (write_macro_definitions): Use
8380 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8382 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8384 * value.c (value_static_field): Assign field type instead of
8385 containing type when returning an optimized out value.
8387 2018-02-06 Yao Qi <yao.qi@linaro.org>
8389 * ft32-tdep.c (ft32_read_pc): Remove.
8390 (ft32_write_pc): Remove.
8391 (ft32_gdbarch_init): Update.
8392 * m32r-tdep.c (m32r_read_pc): Remove.
8393 (m32r_gdbarch_init): Update.
8394 * mep-tdep.c (mep_read_pc): Remove.
8395 (mep_gdbarch_init): Update.
8396 * microblaze-tdep.c (microblaze_write_pc): Remove.
8397 (microblaze_gdbarch_init): Update.
8398 * mn10300-tdep.c (mn10300_read_pc): Remove.
8399 (mn10300_write_pc): Remove.
8400 (mn10300_gdbarch_init): Update.
8401 * moxie-tdep.c (moxie_read_pc): Remove.
8402 (moxie_write_pc): Remove.
8403 (moxie_gdbarch_init): Update.
8405 2018-02-06 Yao Qi <yao.qi@linaro.org>
8407 * expprint.c (print_subexp_standard): Handle
8408 OP_F77_UNDETERMINED_ARGLIST.
8409 (dump_subexp_body_standard): Likewise.
8411 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8413 * target-descriptions.c (tdesc_element_visitor) Add empty
8415 (tdesc_type): Move make_gdb_type from here.
8416 (tdesc_type_builtin): Likewise.
8417 (tdesc_type_vector): Likewise.
8418 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8419 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8420 (make_gdb_type_union): Likewise.
8421 (make_gdb_type_flags): Likewise.
8422 (make_gdb_type_enum): Likewise.
8423 (make_gdb_type): New function.
8424 (tdesc_register_type): Use static make_gdb_type.
8426 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8428 * infcmd.c (default_print_one_register_info): Align natural-format
8429 column values consistently one under another.
8430 (pad_to_column): New function.
8432 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8434 * dwarf2read.c (dwarf2_physname): Move commment.
8436 2018-02-01 Leszek Swirski <leszeks@google.com>
8438 * varobj.c (varobj_formatted_print_options): Allow recursive
8439 pretty printing if pretty printing is enabled.
8441 2018-02-01 Leszek Swirski <leszeks@google.com>
8443 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8444 names after a structop as a filename.
8446 2018-02-01 Yao Qi <yao.qi@linaro.org>
8448 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8449 (arm_record_coproc_data_proc): Likewise.
8451 2018-02-01 Yao Qi <yao.qi@linaro.org>
8453 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8455 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8457 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8458 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8460 2018-01-31 Pedro Alves <palves@redhat.com>
8462 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8463 * inflow.c (child_terminal_save_inferior): Wrap reference to
8464 tcgetpgrp in HAVE_TERMIOS_H.
8465 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8467 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8468 always iterate over all inferiors.
8469 (gdbsim_cntrl_c): Adjust.
8470 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8472 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8474 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8475 index type is objfile-owned if the element type is as well.
8477 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8481 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8483 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8484 "features/s390x-linux64.c".
8485 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8486 s390_linux32 and s390x_linux64.
8487 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8489 * s390-tdep.c: Include "features/s390-linux32.c" and
8490 "features/s390x-linux64.c".
8491 (s390_tdesc_valid): Add check for tdesc_has_registers.
8492 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8493 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8494 tdesc_s390x_linux64.
8495 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8496 tdesc_s390x_linux64 to...
8497 * s390-tdep.h: ...here.
8499 2018-01-30 Pedro Alves <palves@redhat.com>
8502 * config.in, configure: Regenerate.
8503 * configure.ac: Check for getpgid.
8504 * go32-nat.c (go32_pass_ctrlc): New.
8505 (go32_target): Install it.
8506 * inf-child.c (inf_child_target): Install
8507 child_terminal_save_inferior, child_pass_ctrlc and
8509 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8510 (inf_ptrace_target): No longer install it.
8511 * infcmd.c (interrupt_target_1): Adjust.
8512 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8513 (child_interrupt): Declare.
8514 (inferior::terminal_state): New.
8515 * inflow.c (struct terminal_info): Update comments.
8516 (inferior_process_group): Delete.
8517 (terminal_is_ours): Delete.
8518 (gdb_tty_state): New.
8519 (child_terminal_init): Adjust.
8520 (is_gdb_terminal, sharing_input_terminal_1)
8521 (sharing_input_terminal): New functions.
8522 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8523 Set the process's actual process group in the foreground if
8524 possible. Handle is_ours_for_output/is_ours distinction. Don't
8525 mark terminal as the inferior's if not sharing GDB's terminal.
8526 Don't check attach_flag.
8527 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8528 pass down a target_terminal_state.
8529 (child_terminal_save_inferior): New, factored out from ...
8530 (child_terminal_ours_1): ... this. Handle
8531 target_terminal_state::is_ours_for_output.
8532 (child_interrupt, child_pass_ctrlc): New.
8533 (inflow_inferior_exit): Clear the inferior's terminal_state.
8534 (copy_terminal_info): Copy the inferior's terminal state.
8535 (_initialize_inflow): Remove reference to terminal_is_ours.
8536 * inflow.h (inferior_process_group): Delete.
8537 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8538 * procfs.c (procfs_target): Don't install procfs_interrupt.
8539 (procfs_interrupt): Delete.
8540 * remote.c (remote_serial_quit_handler): Adjust.
8541 (remote_interrupt): Remove ptid parameter. Adjust.
8542 * target-delegates.c: Regenerate.
8543 * target.c: Include "terminal.h".
8544 (target_terminal::terminal_state): Rename to ...
8545 (target_terminal::m_terminal_state): ... this.
8546 (target_terminal::init): Adjust.
8547 (target_terminal::inferior): Adjust to per-inferior
8549 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8550 (target_terminal::ours, target_terminal::ours_for_output): Use
8551 target_terminal_is_ours_kind.
8552 (target_interrupt): Remove ptid parameter. Adjust.
8553 (default_target_pass_ctrlc): Adjust.
8554 * target.h (target_ops::to_terminal_save_inferior): New field.
8555 (target_ops::to_interrupt): Remove ptid_t parameter.
8556 (target_interrupt): Remove ptid_t parameter. Update comment.
8557 (target_pass_ctrlc): Update comment.
8558 * target/target.h (target_terminal_state): New scoped enum,
8560 (target_terminal::terminal_state): ... here.
8561 (target_terminal::inferior): Update comments.
8562 (target_terminal::restore_inferior): New.
8563 (target_terminal::is_inferior, target_terminal::is_ours)
8564 (target_terminal::is_ours_for_output): Adjust.
8565 (target_terminal::scoped_restore_terminal_state): Adjust to
8566 rename, and call restore_inferior() instead of inferior().
8567 (target_terminal::scoped_restore_terminal_state::m_state): Change
8569 (target_terminal::terminal_state): Rename to ...
8570 (target_terminal::m_terminal_state): ... this and change type.
8572 2018-01-30 Pedro Alves <palves@redhat.com>
8574 * linux-nat.c (wait_for_signal): New function.
8575 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8577 (async_terminal_is_ours)
8578 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8579 (linux_nat_add_target): Don't override
8580 to_terminal_inferior/to_terminal_ours.
8582 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8584 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8586 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8588 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8589 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8590 dwarf2_per_objfile_free here.
8591 (dwarf2_per_objfile_free): Remove.
8592 (_initialize_dwarf2_read): Don't register
8593 dwarf2_per_objfile_free as a registry cleanup.
8595 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8597 Avoid compilation errors in MinGW native builds
8599 The error is triggered by including python-internal.h, and the
8602 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8603 from build-gnulib/import/math.h:27,
8604 from d:/usr/Python26/include/pyport.h:235,
8605 from d:/usr/Python26/include/Python.h:58,
8606 from python/python-internal.h:94,
8607 from python/py-arch.c:24:
8608 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8612 This happens because Python headers define 'hypot' to expand t
8613 '_hypot' in the Windows builds.
8614 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8615 'hypoth'. This avoids a compilation error.
8617 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8619 * MAINTAINERS (Write After Approval): Fix ordering.
8621 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8623 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8625 2018-01-26 Alan Modra <amodra@gmail.com>
8627 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8628 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8629 Remove nop. Make const. Comment.
8630 (powerpc32_plt_stub_so_2): New.
8631 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8632 Correct count. Update uses.
8633 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8634 Move common code reading PLT entry word. Correct
8635 powerpc32_plt_stub PLT address calculation.
8636 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8637 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8638 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8639 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8640 (ppc64_standard_linkage8): Likewise.
8641 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8642 Correct insns description.
8643 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8645 2018-01-24 Pedro Alves <palves@redhat.com>
8647 GCC PR libstdc++/83906
8648 * gdbtypes.c (operator==(const dynamic_prop &,
8649 const dynamic_prop &)): New.
8650 (operator==(const range_bounds &, const range_bounds &)): New.
8651 (check_types_equal): Use them instead of memcmp.
8652 * gdbtypes.h (operator==(const dynamic_prop &,
8653 const dynamic_prop &)): Declare.
8654 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8655 (operator==(const range_bounds &, const range_bounds &)): Declare.
8656 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8658 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8660 * s390-linux-tdep.c (s390_record_address_mask)
8661 (s390_record_calc_disp_common, s390_record_calc_disp)
8662 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8663 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8664 (s390_process_record): Move to s390-tdep.c.
8665 (s390_linux_init_abi_any): Adjust.
8666 * s390-tdep.c (s390_record_address_mask)
8667 (s390_record_calc_disp_common, s390_record_calc_disp)
8668 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8669 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8670 (s390_process_record): Moved from s390-linux-tdep.c
8671 (s390_gdbarch_init): Adjust.
8673 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8675 * s390-linux-nat.c (s390-tdep.h): New include.
8676 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8677 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8678 (ALLDEPFILES): Add s390-tdep.c.
8679 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8680 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8681 * s390-tdep.h: ...this. New file.
8682 * s390-linux-tdep.c (s390-tdep.h): New include.
8683 (_initialize_s390_tdep): Rename to...
8684 (_initialize_s390_linux_tdep): ...this and adjust.
8685 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8686 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8688 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8689 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8690 (s390_is_partial_instruction, s390_software_single_step)
8691 (is_non_branch_ril, s390_displaced_step_copy_insn)
8692 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8693 (s390_prologue_data, s390_addr, s390_store, s390_load)
8694 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8695 (s390_register_call_saved, s390_guess_tracepoint_registers)
8696 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8697 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8698 (s390_pseudo_register_name, s390_pseudo_register_type)
8699 (s390_pseudo_register_read, s390_pseudo_register_write)
8700 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8701 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8702 (s390_addr_bits_remove, s390_address_class_type_flags)
8703 (s390_address_class_type_flags_to_name)
8704 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8705 (s390_function_arg_float, s390_function_arg_vector)
8706 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8707 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8708 (s390_frame_align, s390_register_return_value, s390_return_value)
8709 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8710 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8711 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8712 (s390_trad_frame_prev_register, s390_unwind_cache)
8713 (s390_prologue_frame_unwind_cache)
8714 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8715 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8716 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8717 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8718 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8719 (s390_frame_base_address, s390_local_base_address)
8720 (s390_frame_base, s390_gcc_target_options)
8721 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8722 (s390_validate_reg_range, s390_tdesc_valid)
8723 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8724 * s390-tdep.c: ...this. New file.
8726 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8728 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8729 (s390_process_record, s390_gdbarch_tdep_alloc)
8730 (s390_linux_init_abi_any): Use/set new hook.
8732 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8734 * s390-linux-tdep.c (osabi.h): New include.
8735 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8736 (s390_linux_init_abi_any): New functions.
8737 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8739 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8741 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8742 tdesc_has_registers check
8744 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8746 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8747 (s390_validate_reg_range): New macro.
8748 (s390_gdbarch_init): Adjust.
8750 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8752 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8753 (s390_gdbarch_tdep_alloc): Adjust.
8754 (s390_gdbarch_init): Adjust.
8756 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8758 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8759 <have_tdb>: Change type to bool.
8760 (s390_gdbarch_tdep_alloc): Adjust.
8761 (s390_gdbarch_init): Adjust.
8763 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8765 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8766 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8767 (s390_gdbarch_tdep_alloc): New function.
8768 (s390_gdbarch_init): Allocate tdep at start and use its fields
8769 instead of separate variables.
8771 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8773 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8774 when looking for cached gdbarch and add comment for remaining.
8776 2018-01-22 Pedro Alves <palves@redhat.com>
8777 Sergio Durigan Junior <sergiodj@redhat.com>
8779 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8782 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8784 * MAINTAINERS: Update my company e-mail address.
8786 2018-01-22 Yao Qi <yao.qi@linaro.org>
8788 * regcache.c (cooked_write_test): New function.
8789 (_initialize_regcache): Register the test.
8791 2018-01-22 Yao Qi <yao.qi@linaro.org>
8793 * ia64-tdep.c (ia64_pseudo_register_read): Call
8794 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8795 * m32c-tdep.c (m32c_cat_read): Likewise.
8796 (m32c_r3r2r1r0_read): Likewise.
8797 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8798 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8800 2018-01-22 Yao Qi <yao.qi@linaro.org>
8802 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8803 method raw_read instead of regcache_raw_read.
8804 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8805 * arm-tdep.c (arm_neon_quad_read): Likewise.
8806 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8807 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8808 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8809 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8810 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8811 (i386_pseudo_register_read_into_value): Likewise.
8812 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8813 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8814 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8815 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8816 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8817 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8818 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8819 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8820 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8822 2018-01-22 Yao Qi <yao.qi@linaro.org>
8824 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8825 * configure.tgt: Remove target mt.
8826 * mt-tdep.c: Remove.
8827 * regcache.c (cooked_read_test): Remove the check for mt.
8829 2018-01-22 Yao Qi <yao.qi@linaro.org>
8831 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8832 instead of gdbarch_pseudo_register_read_value.
8834 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8836 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8839 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8841 * linespec.c (create_sals_line_offset): Remove code that preserved
8842 the symtab_and_line's line number.
8844 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8846 * varobj.c (varobj_create): Don't set valid_block when creating a
8849 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8851 * varobj.c (varobj_create): Remove out of date comment.
8853 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8856 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8857 updating innermost block.
8858 * parse.c (innermost_block_tracker::update): Take extra type
8859 parameter, and check types match before updating innermost block.
8860 (write_dollar_variable): Update innermost block for registers.
8861 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8862 (innermost_block_tracker::innermost_block_tracker): Initialise
8864 (innermost_block_tracker::reset): Take type parameter.
8865 (innermost_block_tracker::update): Take type parameter, and pass
8866 type through as needed.
8867 (innermost_block_tracker::m_types): New member.
8868 * varobj.c (varobj_create): Pass type when reseting innermost
8871 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8873 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8874 * ada-lang.c (resolve_subexp): Likewise.
8875 * breakpoint.c (set_breakpoint_condition) Likewise.
8876 (watch_command_1) Likewise.
8877 * c-exp.y (variable): Likewise.
8878 * d-exp.y (PrimaryExpression): Likewise.
8879 * f-exp.y (variable): Likewise.
8880 * go-exp.y (variable): Likewise.
8881 * m2-exp.y (variable): Likewise.
8882 * objfiles.c (objfile::~objfile): Likewise.
8883 * p-exp.y (variable): Likewise.
8884 * parse.c (innermost_block): Change type.
8885 * parser-defs.h (class innermost_block_tracker): New.
8886 (innermost_block): Change to innermost_block_tracker.
8887 * printcmd.c (display_command): Switch to innermost_block API.
8888 (do_one_display): Likewise.
8889 * rust-exp.y (do_one_display): Likewise.
8890 * symfile.c (clear_symtab_users): Likewise.
8891 * varobj.c (varobj_create): Switch to innermost_block API, replace
8892 use of innermost_block with block stored on varobj object.
8894 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8896 * expression.h (innermost_block): Remove declaration.
8897 * varobj.c: Add 'parser-defs.h' include.
8899 2018-01-19 Tom Tromey <tom@tromey.com>
8901 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8902 symbols in the static and global blocks.
8904 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8906 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8907 gdb_ptrace.h, and move including gdb_wait.h ...
8908 * nat/linux-ptrace.h: ... to here.
8910 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8912 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8913 inf_ptrace_detach_success.
8914 (inf_ptrace_detach_success): Add inferior parameter, use it
8915 instead of inferior_ptid, pass it to detach_inferior.
8916 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8918 * inferior.c (detach_inferior): Add overload that takes an
8920 * inferior.h (detach_inferior): Likewise.
8921 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8922 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8923 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8925 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8927 * target.h (struct target_ops) <to_detach>: Add inferior
8929 (target_detach): Likewise.
8930 * target.c (dispose_inferior): Pass inferior down.
8931 (target_detach): Pass inferior down. Assert that it is equal to
8932 the current inferior.
8933 * aix-thread.c (aix_thread_detach): Pass inferior down.
8934 * corefile.c (core_file_command): Pass current_inferior() down.
8935 * corelow.c (core_detach): Add inferior parameter.
8936 * darwin-nat.c (darwin_detach): Likewise.
8937 * gnu-nat.c (gnu_detach): Likewise.
8938 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8939 * infcmd.c (detach_command): Pass current_inferior() down to
8941 * infrun.c (follow_fork_inferior): Pass parent_inf to
8943 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8945 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8946 * linux-thread-db.c (thread_db_detach): Likewise.
8947 * nto-procfs.c (procfs_detach): Likewise.
8948 * procfs.c (procfs_detach): Likewise.
8949 * record.c (record_detach): Likewise.
8950 * record.h (struct inferior): Forward-declare.
8951 (record_detach): Add inferior parameter.
8952 * remote-sim.c (gdbsim_detach): Likewise.
8953 * remote.c (remote_detach_1): Likewise.
8954 (remote_detach): Likewise.
8955 (extended_remote_detach): Likewise.
8956 * sol-thread.c (sol_thread_detach): Likewise.
8957 * target-debug.h (target_debug_print_inferior_p): New macro.
8958 * target-delegates.c: Re-generate.
8959 * top.c (kill_or_detach): Pass inferior down to target_detach.
8960 * windows-nat.c (windows_detach): Add inferior parameter.
8962 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8964 * target.h (struct target_ops) <to_detach>: Remove args
8966 (target_detach): Likewise.
8967 * target.c (dispose_inferior): Adjust.
8968 (target_detach): Remove args parameter, adjust.
8969 * aix-thread.c (aix_thread_detach): Adjust.
8970 * corefile.c (core_file_command): Adjust.
8971 * corelow.c (core_detach): Adjust.
8972 * darwin-nat.c (darwin_detach): Adjust.
8973 * gnu-nat.c (gnu_detach): Adjust.
8974 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8975 * infcmd.c (detach_command): Adjust
8976 * infrun.c (follow_fork_inferior): Adjust.
8977 (handle_vfork_child_exec_or_exit): Adjust.
8978 * linux-fork.c (linux_fork_detach): Remove args parameter.
8979 * linux-fork.h (linux_fork_detach): Likewise.
8980 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8981 * linux-thread-db.c (thread_db_detach): Likewise.
8982 * nto-procfs.c (procfs_detach): Likewise.
8983 * procfs.c (procfs_detach): Likewise.
8984 (do_detach): Remove signo parameter.
8985 * record.c (record_detach): Remove args parameter.
8986 * record.h (record_detach): Likewise.
8987 * remote-sim.c (gdbsim_detach): Likewise.
8988 * remote.c (remote_detach_1): Likewise.
8989 (remote_detach): Likewise.
8990 (extended_remote_detach): Likewise.
8991 * sol-thread.c (sol_thread_detach): Likewise.
8992 * target-delegates.c: Re-generate.
8993 * top.c (struct qt_args) <args>: Remove field.
8994 (kill_or_detach): Don't pass args.
8995 (quit_force): Don't set args.
8996 * windows-nat.c (windows_detach): Remove args parameter.
8998 2018-01-19 Yao Qi <yao.qi@linaro.org>
9000 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9001 (arm_linux_init_abi): Install it.
9003 2018-01-19 Yao Qi <yao.qi@linaro.org>
9005 * osabi.c (gdb_osabi_names): Extend the regexp for
9006 arm-linux-gnueabihf.
9008 2018-01-18 Yao Qi <yao.qi@linaro.org>
9010 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9012 (abbrev_table::add_abbrev): Update.
9013 (abbrev_table::lookup_abbrev): Update.
9015 2018-01-18 Yao Qi <yao.qi@linaro.org>
9017 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9019 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9021 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9024 2018-01-17 Tom Tromey <tom@tromey.com>
9026 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9028 2018-01-17 Tom Tromey <tom@tromey.com>
9030 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9031 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9032 (create_array_type_with_stride): Update.
9033 * dwarf2read.c (set_die_type): Update.
9035 2018-01-17 Tom Tromey <tom@tromey.com>
9037 * dwarf2read.c (delayed_method_info): Remove typedef.
9038 (dwarf2_cu::method_info): Now a std::vector.
9039 (add_to_method_list): Update.
9040 (free_delayed_list): Remove.
9041 (compute_delayed_physnames): Update.
9042 (process_full_comp_unit, process_full_type_unit): Clear the method
9043 list. Remove cleanups.
9044 (psymtab_include_file_name): Add name_holder parameter. Use
9046 (dwarf_decode_lines): Update.
9048 2018-01-17 Tom Tromey <tom@tromey.com>
9049 Simon Marchi <simon.marchi@ericsson.com>
9051 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9052 (dwarf2_per_objfile::free_cached_comp_units)
9053 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9054 (init_cutu_and_read_dies_no_follow): Update.
9055 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9056 (dwarf2_cu::~dwarf2_cu): New.
9057 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9058 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9060 2018-01-17 Tom Tromey <tom@tromey.com>
9061 Simon Marchi <simon.marchi@ericsson.com>
9063 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9064 (struct die_reader_specs) <abbrev_table>: New member.
9065 (struct abbrev_table): Add constructor.
9066 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9067 <abbrev_obstack>: Now an auto_obstack.
9068 (abbrev_table_up): New typedef.
9069 (init_cu_die_reader): Add abbrev_table parameter.
9070 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9071 Add result_dwo_abbrev_table.
9072 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9073 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9075 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9077 (skip_children): Update.
9078 (abbrev_table::alloc_abbrev): Rename from
9079 abbrev_table_alloc_abbrev.
9080 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9081 (abbrev_table::lookup_abbrev): Rename from
9082 abbrev_table_lookup_abbrev.
9083 (abbrev_table_read_table): Return abbrev_table_up.
9084 (abbrev_table_free, abbrev_table_free_cleanup)
9085 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9086 (load_partial_dies): Update.
9088 2018-01-17 Tom Tromey <tom@tromey.com>
9090 * dwarf2read.c (dwarf2_compute_name): Update comment.
9091 (read_func_scope, read_variable): Update.
9092 (new_symbol): Remove.
9093 (new_symbol_full): Rename to new_symbol.
9095 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9098 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9099 a warning instead of throwing an error, set section size to 0 and return
9101 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9103 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9105 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9107 (linux_ptrace_attach_fail_reason_string): Likewise.
9108 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9110 (linux_ptrace_attach_fail_reason_string): Likewise.
9111 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9113 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9115 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9117 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9120 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9121 checking for fs_base/gs_base fields in struct user_regs_struct.
9122 * configure: Regenerate.
9124 2018-01-17 Yao Qi <yao.qi@linaro.org>
9126 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9128 (aarch64_linux_init_abi): Install it to gdbarch hook
9131 2018-01-15 Pedro Alves <palves@redhat.com>
9133 * common/signals-state-save-restore.c
9134 (save_original_signals_state): Fix typos.
9136 2017-01-12 Tom Tromey <tom@tromey.com>
9137 Sergio Durigan Junior <sergiodj@redhat.com>
9139 * Makefile.in (install-only): Install gdb-add-index.
9141 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9143 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9145 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9147 * infrun.c (keep_going_pass_signal): Clear step-over info when
9148 insert_breakpoints fails.
9150 2018-01-11 Pedro Alves <palves@redhat.com>
9153 * infrun.c (resume): Rename to ...
9154 (resume_1): ... this.
9155 (resume): Reimplement as wrapper around resume_1.
9157 2018-01-11 Pedro Alves <palves@redhat.com>
9160 * remote.c (remote_parse_stop_reply): Default to the last-set
9161 general thread instead of to 'magic_null_ptid'.
9163 2018-01-10 Pedro Alves <palves@redhat.com>
9165 * language.h (language_get_symbol_name_matcher): Rename ...
9166 (get_symbol_name_matcher): ... this.
9167 * language.c (language_get_symbol_name_matcher): Ditto.
9168 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9171 2018-01-10 Pedro Alves <palves@redhat.com>
9175 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9176 Adjust to use language_get_symbol_name_matcher instead of
9177 language_defn::la_get_symbol_name_matcher.
9178 * language.c (language_get_symbol_name_matcher): If in Ada mode
9179 and the lookup name is a verbatim match, return Ada's matcher.
9180 * language.h (language_get_symbol_name_matcher): Adjust comment.
9181 (ada_lookup_name_info::verbatim_p):: New method.
9183 2018-01-10 Pedro Alves <palves@redhat.com>
9186 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9187 minsym's language is language_auto or language_cplus, pass down
9188 language_ada instead.
9189 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9191 2018-01-10 Pedro Alves <palves@redhat.com>
9194 * minsyms.c (linkage_name_str): New function.
9195 (iterate_over_minimal_symbols): Use it.
9197 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9199 * NEWS: Document that 'info proc' now works on FreeBSD.
9201 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9203 * configure.ac: Check for kinfo_getfile in libutil.
9204 * configure: Regenerate.
9205 * config.in: Regenerate.
9206 * fbsd-nat.c: Include "fbsd-tdep.h".
9207 (fbsd_fetch_cmdline): New.
9208 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9209 rather than calling error.
9210 (fbsd_info_proc): New.
9211 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9212 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9213 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9215 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9217 * fbsd-nat.c (struct free_deleter): Remove.
9218 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9220 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9222 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9223 NULL for an empty pathname.
9225 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9227 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9228 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9229 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9230 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9231 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9232 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9233 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9234 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9235 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9236 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9237 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9238 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9239 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9240 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9241 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9243 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9245 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9246 (gnu_xfer_auxv): New function.
9247 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9250 2018-01-08 Yao Qi <yao.qi@linaro.org>
9251 Simon Marchi <simon.marchi@ericsson.com>
9253 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9255 (COMMON_OBS): Remove selftest.o.
9256 * configure.ac: Append selftest-arch.c and common/selftest.c to
9257 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9258 * configure: Re-generated.
9259 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9261 (maintenance_info_selftests): Likewise.
9263 2018-01-08 Xavier Roirand <roirand@adacore.com>
9265 * ada-valprint.c (val_print_packed_array_elements): Use
9266 proper number of elements when printing an array indexed
9267 by an enumeration type.
9269 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9271 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9272 (dw2_get_file_names_reader): Adjust.
9273 (lookup_dwo_signatured_type): Adjust.
9274 (lookup_dwp_signatured_type): Adjust.
9275 (lookup_signatured_type): Adjust.
9276 (create_type_unit_group): Adjust.
9277 (get_type_unit_group): Adjust.
9278 (process_psymtab_comp_unit_reader): Adjust.
9279 (build_type_psymtabs_reader): Adjust.
9280 (scan_partial_symbols): Adjust.
9281 (add_partial_symbol): Adjust.
9282 (add_partial_subprogram): Adjust.
9283 (peek_die_abbrev): Adjust.
9284 (fixup_go_packaging): Adjust.
9285 (process_imported_unit_die): Adjust.
9286 (dwarf2_compute_name): Adjust.
9287 (dwarf2_physname): Adjust.
9288 (read_import_statement): Adjust.
9289 (handle_DW_AT_stmt_list): Adjust.
9290 (read_file_scope): Adjust.
9291 (read_func_scope): Adjust.
9292 (read_lexical_block_scope): Adjust.
9293 (read_call_site_scope): Adjust.
9294 (read_variable): Adjust.
9295 (dwarf2_rnglists_process): Adjust.
9296 (dwarf2_ranges_process): Adjust.
9297 (dwarf2_ranges_read): Adjust.
9298 (dwarf2_get_pc_bounds): Adjust.
9299 (dwarf2_record_block_ranges): Adjust.
9300 (dwarf2_add_field): Adjust.
9301 (dwarf2_add_member_fn): Adjust.
9302 (read_structure_type): Adjust.
9303 (process_structure_scope): Adjust.
9304 (read_enumeration_type): Adjust.
9305 (read_array_type): Adjust.
9306 (mark_common_block_symbol_computed): Adjust.
9307 (read_common_block): Adjust.
9308 (read_namespace_type): Adjust.
9309 (read_namespace): Adjust.
9310 (read_module_type): Adjust.
9311 (read_tag_pointer_type): Adjust.
9312 (read_tag_ptr_to_member_type): Adjust.
9313 (read_tag_string_type): Adjust.
9314 (read_subroutine_type): Adjust.
9315 (read_typedef): Adjust.
9316 (read_base_type): Adjust.
9317 (attr_to_dynamic_prop): Adjust.
9318 (read_subrange_type): Adjust.
9319 (read_unspecified_type): Adjust.
9320 (dwarf2_read_abbrevs): Adjust.
9321 (load_partial_dies): Adjust.
9322 (read_partial_die): Adjust.
9323 (find_partial_die): Adjust.
9324 (guess_partial_die_structure_name): Adjust.
9325 (fixup_partial_die): Adjust.
9326 (read_attribute_value): Adjust.
9327 (read_addr_index): Adjust.
9328 (read_addr_index_from_leb128): Adjust.
9329 (read_str_index): Adjust.
9330 (dwarf2_string_attr): Adjust.
9331 (get_debug_line_section): Adjust.
9332 (dwarf_decode_line_header): Adjust.
9333 (lnp_state_machine::check_line_address): Adjust.
9334 (dwarf_decode_lines_1): Adjust.
9335 (dwarf_decode_lines): Adjust.
9336 (dwarf2_start_symtab): Adjust.
9337 (var_decode_location): Adjust.
9338 (new_symbol_full): Adjust.
9339 (dwarf2_const_value_data): Adjust.
9340 (dwarf2_const_value_attr): Adjust.
9341 (dwarf2_const_value): Adjust.
9343 (die_containing_type): Adjust.
9344 (build_error_marker_type): Adjust.
9345 (lookup_die_type): Adjust.
9346 (guess_full_die_structure_name): Adjust.
9347 (anonymous_struct_prefix): Adjust.
9348 (determine_prefix): Adjust.
9349 (dwarf2_name): Adjust.
9350 (follow_die_ref_or_sig): Adjust.
9351 (follow_die_offset): Adjust.
9352 (follow_die_ref): Adjust.
9353 (follow_die_sig_1): Adjust.
9354 (follow_die_sig): Adjust.
9355 (get_signatured_type): Adjust.
9356 (get_DW_AT_signature_type): Adjust.
9357 (decode_locdesc): Adjust.
9358 (dwarf_decode_macros): Adjust.
9359 (cu_debug_loc_section): Adjust.
9360 (fill_in_loclist_baton): Adjust.
9361 (dwarf2_symbol_mark_computed): Adjust.
9362 (init_one_comp_unit): Don't assign
9363 dwarf2_cu::dwarf2_per_objfile.
9364 (set_die_type): Adjust.
9366 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9368 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9369 <dwarf2_per_objfile>: New field.
9370 (dwarf2_per_objfile): Remove global.
9371 (get_dwarf2_per_objfile): New function.
9372 (set_dwarf2_per_objfile): New function.
9373 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9375 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9376 (read_abbrev_offset): Likewise.
9377 (read_indirect_string): Likewise.
9378 (read_indirect_line_string): Likewise.
9379 (read_indirect_string_at_offset): Likewise.
9380 (read_indirect_string_from_dwz): Likewise.
9381 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9383 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9384 (create_all_comp_units): Change objfile parameter to
9386 (create_all_type_units): Likewise.
9387 (process_queue): Add dwarf2_per_objfile parameter.
9388 (read_and_check_comp_unit_head): Likewise.
9389 (lookup_dwo_unit_in_dwp): Likewise.
9390 (get_dwp_file): Likewise.
9391 (process_cu_includes): Likewise.
9392 (struct free_dwo_file_cleanup_data): New struct.
9393 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9394 set_dwarf2_per_objfile.
9395 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9396 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9397 context, adjust calls.
9398 (dw2_instantiate_symtab): Likewise.
9399 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9400 (dw2_get_cu): Likewise.
9401 (create_cu_from_index_list): Change objfile parameter to
9403 (create_cus_from_index_list): Get dwarf2_per_objfile from
9404 context, adjust calls.
9405 (create_cus_from_index): Likewise.
9406 (create_signatured_type_table_from_index): Change objfile
9407 parameter to dwarf2_per_objfile.
9408 (create_signatured_type_table_from_debug_names): Change objfile
9409 parameter to dwarf2_per_objfile.
9410 (create_addrmap_from_index): Likewise.
9411 (create_addrmap_from_aranges): Likewise.
9412 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9413 (dw2_setup): Remove.
9414 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9416 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9417 get_dwarf2_per_objfile.
9418 (dw2_forget_cached_source_info): Likewise.
9419 (dw2_map_symtabs_matching_filename): Likewise.
9420 (struct dw2_symtab_iterator) <index>: Remove.
9421 <dwarf2_per_objfile>: New field.
9422 (dw2_symtab_iter_init): Replace index parameter with
9424 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9425 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9426 (dw2_print_stats): Likewise.
9427 (dw2_dump): Likewise.
9428 (dw2_expand_symtabs_for_function): Likewise.
9429 (dw2_expand_all_symtabs): Likewise.
9430 (dw2_expand_symtabs_with_fullname): Likewise.
9431 (dw2_expand_marked_cus): Replace index and objfile parameters
9432 with dwarf2_per_objfile.
9433 (dw_expand_symtabs_matching_file_matcher): Add
9434 dwarf2_per_objfile parameter and adjust calls.
9435 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9437 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9438 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9440 (create_cus_from_debug_names_list): Replace objfile parameter
9441 with dwarf2_per_objfile and adjust calls.
9442 (create_cus_from_debug_names): Likewise.
9443 (dwarf2_read_debug_names): Likewise.
9444 (mapped_debug_names::namei_to_name): Adjust call.
9445 (dw2_debug_names_iterator::next): Likewise.
9446 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9447 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9448 (dw2_debug_names_dump): Likewise.
9449 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9450 (dw2_debug_names_expand_symtabs_matching): Likewise.
9451 (dwarf2_initialize_objfile): Likewise.
9452 (dwarf2_build_psymtabs): Likewise.
9453 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9455 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9456 (read_and_check_comp_unit_head): Likewise.
9457 (read_abbrev_offset): Likewise.
9458 (create_debug_type_hash_table): Likewise.
9459 (create_debug_types_hash_table): Likewise.
9460 (create_all_type_units): Replace objfile parameter with
9462 (add_type_unit): Add dwarf2_per_objfile parameter.
9463 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9464 with dwarf2_per_objfile.
9465 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9466 (lookup_dwp_signatured_type): Likewise.
9467 (lookup_signatured_type): Likewise.
9468 (read_cutu_die_from_dwo): Likewise.
9469 (init_tu_and_read_dwo_dies): Likewise.
9470 (init_cutu_and_read_dies): Likewise.
9471 (init_cutu_and_read_dies_no_follow): Likewise.
9472 (allocate_type_unit_groups_table): Add objfile parameter.
9473 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9474 (get_type_unit_group): Likewise.
9475 (process_psymtab_comp_unit): Update call.
9476 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9477 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9478 (print_tu_stats): Likewise.
9479 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9481 (build_type_psymtabs): Change objfile parameter to
9483 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9484 passed in void* parameter.
9485 (process_skeletonless_type_units): Change objfile parameter to
9487 (set_partial_user): Likewise.
9488 (dwarf2_build_psymtabs_hard): Likewise.
9489 (read_comp_units_from_section): Likewise.
9490 (create_all_comp_units): Likewise.
9491 (scan_partial_symbols): Update calls.
9492 (add_partial_symbol): Likewise.
9493 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9494 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9495 (process_queue): Add dwarf2_per_objfile parameter.
9496 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9497 (compute_compunit_symtab_includes): Likewise.
9498 (process_cu_includes): Add dwarf2_per_objfile parameter.
9499 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9500 (process_full_type_unit): Likewise.
9501 (process_imported_unit_die): Update call.
9502 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9503 (read_file_scope): Likewise.
9504 (allocate_dwo_file_hash_table): Add objfile parameter.
9505 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9506 (create_cus_hash_table): Likewise.
9507 (create_dwp_hash_table): Likewise.
9508 (create_dwo_unit_in_dwp_v1): Likewise.
9509 (create_dwp_v2_section): Likewise.
9510 (create_dwo_unit_in_dwp_v2): Likewise.
9511 (lookup_dwo_unit_in_dwp): Likewise.
9512 (try_open_dwop_file): Likewise.
9513 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9514 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9515 cleanup to include a reference to dwarf2_per_objfile.
9516 (open_dwp_file): Add dwarf2_per_objfile parameter.
9517 (open_and_init_dwp_file): Likewise.
9518 (get_dwp_file): Likewise.
9519 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9520 (queue_and_load_all_dwo_tus): Update call.
9521 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9523 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9524 (dwarf2_ranges_process): Likewise.
9525 (dwarf2_get_pc_bounds): Likewise.
9526 (mark_common_block_symbol_computed): Likewise.
9527 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9528 (dwarf2_read_abbrevs): Update call.
9529 (read_partial_die): Use dwarf2_per_objfile from cu.
9530 (find_partial_die): Likewise.
9531 (fixup_partial_die): Likewise.
9532 (read_attribute_value): Likewise.
9533 (read_indirect_string_at_offset_from): Add objfile parameter.
9534 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9536 (read_indirect_string_from_dwz): Add objfile parameter.
9537 (read_indirect_string): Add objfile parameter.
9538 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9539 (read_addr_index): Use dwarf2_per_objfile from cu.
9540 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9542 (read_str_index): Use dwarf2_per_objfile from cu.
9543 (get_debug_line_section): Likewise.
9544 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9545 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9546 (new_symbol_full): Use dwarf2_per_objfile from cu.
9547 (build_error_marker_type): Likewise.
9548 (lookup_die_type): Likewise.
9549 (determine_prefix): Likewise.
9550 (follow_die_offset): Likewise.
9551 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9552 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9553 (dwarf2_fetch_die_type_sect_off): Likewise.
9554 (dwarf2_get_die_type): Likewise.
9555 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9556 (get_signatured_type): Likewise.
9557 (get_DW_AT_signature_type): Likewise.
9558 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9559 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9560 (cu_debug_loc_section): Likewise.
9561 (fill_in_loclist_baton): Likewise.
9562 (dwarf2_symbol_mark_computed): Likewise.
9563 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9565 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9567 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9568 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9569 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9570 (set_die_type): Use dwarf2_free_objfile from cu.
9571 (get_die_type_at_offset): Likewise.
9572 (dwarf2_per_objfile_free): Don't assign global variable.
9573 (debug_names) <constructor>: Add dwarf2_per_objfile
9574 parameter, update m_debugstrlookup construction.
9575 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9577 <m_dwarf2_per_objfile>: New field.
9578 <lookup>: Use m_dwarf2_per_objfile.
9579 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9580 (psyms_seen_size): Likewise.
9581 (write_gdbindex): Replace objfile parameter with
9583 (write_debug_names): Likewise.
9584 (write_psymtabs_to_index): Likewise.
9585 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9588 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9590 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9591 <dwarf2_per_objfile>: New field.
9592 (struct dwarf2_per_cu_data) <objfile>: Remove.
9593 <dwarf2_per_objfile>: New field.
9594 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9596 (create_signatured_type_table_from_index): Likewise.
9597 (create_debug_type_hash_table): Likewise.
9598 (fill_in_sig_entry_from_dwo_entry): Likewise.
9599 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9600 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9602 (create_partial_symtab): Access objfile through
9604 (process_psymtab_comp_unit_reader): Likewise.
9605 (read_comp_units_from_section): Likewise.
9606 (scan_partial_symbols): Likewise.
9607 (add_partial_symbol): Likewise.
9608 (add_partial_subprogram): Likewise.
9609 (peek_die_abbrev): Likewise.
9610 (fixup_go_packaging): Likewise.
9611 (process_full_comp_unit): Likewise.
9612 (process_full_type_unit): Likewise.
9613 (process_imported_unit_die): Likewise.
9614 (dwarf2_compute_name): Likewise.
9615 (dwarf2_physname): Likewise.
9616 (read_import_statement): Likewise.
9617 (create_cus_hash_table): Assign dwarf2_physname instead of
9619 (read_func_scope): Access objfile through dwarf2_per_objfile.
9620 (read_lexical_block_scope): Likewise.
9621 (read_call_site_scope): Likewise.
9622 (read_variable): Likewise.
9623 (dwarf2_rnglists_process): Likewise.
9624 (dwarf2_ranges_process): Likewise.
9625 (dwarf2_ranges_read): Likewise.
9626 (dwarf2_record_block_ranges): Likewise.
9627 (dwarf2_add_field): Likewise.
9628 (dwarf2_add_member_fn): Likewise.
9629 (read_structure_type): Likewise.
9630 (process_structure_scope): Likewise.
9631 (read_enumeration_type): Likewise.
9632 (read_array_type): Likewise.
9633 (read_common_block): Likewise.
9634 (read_namespace_type): Likewise.
9635 (read_namespace): Likewise.
9636 (read_module_type): Likewise.
9637 (read_tag_pointer_type): Likewise.
9638 (read_tag_ptr_to_member_type): Likewise.
9639 (read_tag_string_type): Likewise.
9640 (read_subroutine_type): Likewise.
9641 (read_typedef): Likewise.
9642 (read_base_type): Likewise.
9643 (attr_to_dynamic_prop): Likewise.
9644 (read_subrange_type): Likewise.
9645 (read_unspecified_type): Likewise.
9646 (load_partial_dies): Likewise.
9647 (read_partial_die): Likewise.
9648 (find_partial_die): Likewise.
9649 (guess_partial_die_structure_name): Likewise.
9650 (fixup_partial_die): Likewise.
9651 (read_attribute_value): Likewise.
9652 (read_addr_index_from_leb128): Likewise.
9653 (dwarf2_read_addr_index): Likewise.
9654 (dwarf2_string_attr): Likewise.
9655 (lnp_state_machine::check_line_address): Likewise.
9656 (dwarf_decode_lines_1): Likewise.
9657 (dwarf_decode_lines): Likewise.
9658 (dwarf2_start_symtab): Likewise.
9659 (var_decode_location): Likewise.
9660 (new_symbol_full): Likewise.
9661 (dwarf2_const_value_data): Likewise.
9662 (dwarf2_const_value_attr): Likewise.
9663 (dwarf2_const_value): Likewise.
9664 (die_type): Likewise.
9665 (die_containing_type): Likewise.
9666 (lookup_die_type): Likewise.
9667 (guess_full_die_structure_name): Likewise.
9668 (anonymous_struct_prefix): Likewise.
9669 (dwarf2_name): Likewise.
9670 (follow_die_ref_or_sig): Likewise.
9671 (follow_die_offset): Likewise.
9672 (follow_die_ref): Likewise.
9673 (dwarf2_fetch_die_loc_sect_off): Likewise.
9674 (dwarf2_fetch_constant_bytes): Likewise.
9675 (dwarf2_fetch_die_type_sect_off): Likewise.
9676 (dwarf2_get_die_type): Likewise.
9677 (follow_die_sig): Likewise.
9678 (decode_locdesc): Likewise.
9679 (dwarf2_per_cu_objfile): Likewise.
9680 (dwarf2_per_cu_text_offset): Likewise.
9681 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9683 (set_die_type): Access objfile through
9686 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9688 * valprint.c (converted_character_d): Remove typedef.
9689 (DEF_VEC_O (converted_character_d)): Remove.
9690 (count_next_character): Use std::vector.
9691 (print_converted_chars_to_obstack): Likewise.
9692 (generic_printstr): Likewise.
9694 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9696 * xml-support.h (struct gdb_xml_value): Add constructor.
9697 <value>: Change type to unique_xmalloc_ptr.
9698 (gdb_xml_value_s): Remove typedef.
9699 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9700 (gdb_xml_element_start_handler): Change parameter type to
9702 (xml_find_attribute): Likewise.
9703 * xml-support.c (xml_find_attribute): Change parameter type to
9704 std::vector and adjust.
9705 (gdb_xml_values_cleanup): Remove.
9706 (gdb_xml_parser::start_element): Adjust to std::vector.
9707 (xinclude_start_include): Change paraeter type to std::vector
9709 * btrace.c (check_xml_btrace_version): Likewise.
9710 (parse_xml_btrace_block): Likewise.
9711 (parse_xml_btrace_pt_config_cpu): Likewise.
9712 (parse_xml_btrace_pt): Likewise.
9713 (parse_xml_btrace_conf_bts): Likewise.
9714 (parse_xml_btrace_conf_pt): Likewise.
9715 * memory-map.c (memory_map_start_memory): Likewise.
9716 (memory_map_start_property): Likewise.
9717 * osdata.c (osdata_start_osdata): Likewise.
9718 (osdata_start_item): Likewise.
9719 (osdata_start_column): Likewise.
9720 * remote.c (start_thread): Likewise.
9721 * solib-aix.c (library_list_start_library): Likewise.
9722 (library_list_start_list): Likewise.
9723 * solib-svr4.c (library_list_start_library): Likewise.
9724 (svr4_library_list_start_list): Likewise.
9725 * solib-target.c (library_list_start_segment): Likewise.
9726 (library_list_start_section): Likewise.
9727 (library_list_start_library): Likewise.
9728 (library_list_start_list): Likewise.
9729 * tracepoint.c (traceframe_info_start_memory): Likewise.
9730 (traceframe_info_start_tvar): Likewise.
9731 * xml-syscall.c (syscall_start_syscall): Likewise.
9732 * xml-tdesc.c (tdesc_start_target): Likewise.
9733 (tdesc_start_feature): Likewise.
9734 (tdesc_start_reg): Likewise.
9735 (tdesc_start_union): Likewise.
9736 (tdesc_start_struct): Likewise.
9737 (tdesc_start_flags): Likewise.
9738 (tdesc_start_enum): Likewise.
9739 (tdesc_start_field): Likewise.
9740 (tdesc_start_enum_value): Likewise.
9741 (tdesc_start_vector): Likewise.
9743 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9745 * extension.h (struct xmethod_worker) <clone>: Remove.
9746 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9748 (python_xmethod_worker::clone): Remove.
9749 * valops.c (find_overload_match): Use std::move instead of
9752 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9754 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9755 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9756 <free_xmethod_worker_data>: Remove.
9757 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9758 <get_xmethod_arg_types>: Remove.
9759 <get_xmethod_result_type>: Remove.
9760 <invoke_xmethod>: Remove.
9761 * extension.c (new_xmethod_worker): Remove.
9762 (clone_xmethod_worker): Remove.
9763 (get_matching_xmethod_workers): Return void, pass std::vector by
9765 (get_xmethod_arg_types): Rename to...
9766 (xmethod_worker::get_arg_types): ... this, and adjust.
9767 (get_xmethod_result_type): Rename to...
9768 (xmethod_worker::get_result_type): ... this, and adjust.
9769 (invoke_xmethod): Remove.
9770 (free_xmethod_worker): Remove.
9771 (free_xmethod_worker_vec): Remove.
9772 * extension.h (enum ext_lang_rc): Move here from
9774 (struct xmethod_worker): Add constructor and destructor.
9777 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9778 virtual pure methods.
9779 <get_arg_types, get_result_type>: New methods.
9780 (xmethod_worker_ptr): Remove typedef.
9781 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9782 (xmethod_worker_vec): Remove typedef.
9783 (xmethod_worker_up): New typedef.
9784 (invoke_xmethod): Remove.
9785 (clone_xmethod_worker): Remove.
9786 (free_xmethod_worker): Remove.
9787 (free_xmethod_worker_vec): Remove.
9788 (get_xmethod_arg_types): Remove.
9789 (get_xmethod_result_type): Remove.
9790 * valops.c (find_method_list): Use std::vector, don't use
9791 intermediate vector.
9792 (value_find_oload_method_list): Use std::vector.
9793 (find_overload_match): Use std::vector.
9794 (find_oload_champ): Use std::vector.
9795 * value.c (value_free): Use operator delete.
9796 (value_of_xmethod): Rename to...
9797 (value_from_xmethod): ... this. Don't assign
9798 xmethod_worker::value, take rvalue-reference.
9799 (result_type_of_xmethod): Adjust.
9800 (call_xmethod): Adjust.
9801 * value.h: Include extension.h.
9802 (struct xmethod_worker): Don't forward-declare.
9803 (value_of_xmethod): Rename to...
9804 (value_from_xmethod): ... this, take rvalue-reference.
9805 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9806 (struct python_xmethod_worker): ... this, add constructor and
9808 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9809 (gdbpy_free_xmethod_worker_data): Rename to...
9810 (python_xmethod_worker::~python_xmethod_worker): ... this and
9812 (gdbpy_clone_xmethod_worker_data): Rename to...
9813 (python_xmethod_worker::clone): ... this and adjust.
9814 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9816 (gdbpy_get_xmethod_arg_types): Rename to...
9817 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9818 (gdbpy_get_xmethod_result_type): Rename to...
9819 (python_xmethod_worker::do_get_result_type): ... this and
9821 (gdbpy_invoke_xmethod): Rename to...
9822 (python_xmethod_worker::invoke): ... this and adjust.
9823 (new_python_xmethod_worker): Rename to...
9824 (python_xmethod_worker::python_xmethod_worker): ... this and
9826 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9828 (gdbpy_free_xmethod_worker_data): Remove.
9829 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9830 (gdbpy_get_xmethod_arg_types): Remove.
9831 (gdbpy_get_xmethod_result_type): Remove.
9832 (gdbpy_invoke_xmethod): Remove.
9833 * python/python.c (python_extension_ops): Remove obsolete
9836 2018-01-05 Pedro Alves <palves@redhat.com>
9839 * common/signals-state-save-restore.c
9840 (save_original_signals_state): New parameter 'quiet'. Warn if we
9841 find a custom handler preinstalled, instead of internal erroring.
9842 But only warn if !quiet.
9843 * common/signals-state-save-restore.h
9844 (save_original_signals_state): New parameter 'quiet'.
9845 * main.c (captured_main_1): Move save_original_signals_state call
9846 after option handling, and pass QUIET.
9848 2018-01-05 Pedro Alves <palves@redhat.com>
9850 * spu-tdep.c (spu_catch_start): Pass
9851 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9853 2018-01-05 Pedro Alves <palves@redhat.com>
9856 * ada-lang.c (literal_symbol_name_matcher): New function.
9857 (ada_get_symbol_name_matcher): Use it for
9858 symbol_name_match_type::SEARCH_NAME.
9859 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9860 it down instead of assuming symbol_name_match_type::FULL.
9861 * block.h (block_lookup_symbol): New parameter 'match_type'.
9862 * c-valprint.c (print_unpacked_pointer): Use
9863 lookup_symbol_search_name instead of lookup_symbol.
9864 * compile/compile-object-load.c (get_out_value_type): Pass down
9865 symbol_name_match_type::SEARCH_NAME.
9866 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9867 symbol_name_match_type::FULL.
9868 * cp-support.c (cp_get_symbol_name_matcher): Handle
9869 symbol_name_match_type::SEARCH_NAME.
9870 * infrun.c (insert_exception_resume_breakpoint): Use
9871 lookup_symbol_search_name.
9872 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9873 * psymtab.c (maintenance_check_psymtabs): Use
9874 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9875 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9877 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9878 if symbol_name_match_type::SEARCH_NAME.
9879 (lookup_symbol_in_language): Pass down
9880 symbol_name_match_type::FULL.
9881 (lookup_symbol_search_name): New.
9882 (lookup_language_this): Pass down
9883 symbol_name_match_type::SEARCH_NAME.
9884 (lookup_symbol_aux, lookup_local_symbol): New parameter
9885 'match_type'. Pass it down.
9886 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9887 (lookup_symbol_search_name): New declaration.
9888 (lookup_symbol_in_block): New 'match_type' parameter.
9890 2018-01-05 Pedro Alves <palves@redhat.com>
9893 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9895 (ada_lookup_symbol): Reimplement in terms of
9896 ada_lookup_symbol_list, bits factored out from
9897 ada_lookup_encoded_symbol.
9899 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9901 * ada-exp.y (write_object_renaming): When subscripting an array
9902 using a symbol as the index, pass the block in call to
9903 ada_lookup_encoded_symbol when looking that symbol up.
9905 2018-01-05 Jerome Guitton <guitton@adacore.com>
9907 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9910 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9912 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9913 the case where VALUE_LVAL (val0) is not lval_memory.
9915 2018-01-05 Xavier Roirand <roirand@adacore.com>
9917 * ada-valprint.c (print_optional_low_bound): Handle
9918 character-indexed array printing like boolean-indexed array
9921 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9923 * NEWS: Create a new section for the next release branch.
9924 Rename the section of the current branch, now that it has
9927 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9929 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9930 * version.in: Bump version to 8.1.50.DATE-git.
9932 2018-01-03 Xavier Roirand <roirand@adacore.com>
9934 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9936 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9938 (default_exception_support_info) <catch_handlers_sym>: Add field.
9939 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9940 (ada_exception_name_addr_1): Add "catch handlers" handling.
9941 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9943 (create_excep_cond_exprs) <ex>: Add parameter.
9944 (re_set_exception): Update create_excep_cond_exprs call.
9945 (print_it_exception, print_one_exception, print_mention_exception)
9946 (print_recreate_exception): Add "catch handler" handling.
9947 (allocate_location_catch_handlers, re_set_catch_handlers)
9948 (check_status_catch_handlers, print_it_catch_handlers)
9949 (print_one_catch_handlers, print_mention_catch_handlers)
9950 (print_recreate_catch_handlers): New function.
9951 (catch_handlers_breakpoint_ops): New variable.
9952 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9953 Add parameter. Add "catch handler" handling.
9954 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9955 Add "catch handler" handling.
9956 (ada_exception_catchpoint_cond_string): Add "catch handler"
9958 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9960 (catch_ada_handlers_command): New function.
9961 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9962 operations structure.
9963 (_initialize_ada_language): Add "catch handlers" command entry.
9964 * NEWS: Document "catch handlers" feature.
9966 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9968 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9969 account when creating the array type of the slice.
9970 (ada_value_slice): Likewise.
9972 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9974 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9976 (create_array_type_with_stride): Add byte_stride_prop parameter.
9977 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9978 New parameter. Update all callers in this file.
9979 (array_type_has_dynamic_stride): New function.
9980 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9981 of arrays with dynamic byte strides.
9982 * dwarf2read.c (read_array_type): Add support for dynamic
9983 DW_AT_byte_stride attributes.
9985 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9987 * dwarf2read.c (read_unspecified_type): Treat
9988 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9990 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9992 Update copyright year range in all GDB files.
9994 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9996 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9997 and gdb/testsuite/gdb.base/step-line.c.
9999 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10001 * copyright.py (main): Dump the contents of
10002 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10003 even if BY_HAND is empty.
10005 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10007 * top.c (print_gdb_version): Update Copyright year in version
10010 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10012 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10014 For older changes see ChangeLog-2017.
10020 version-control: never