1 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5 offsets/sizes for static members of a class/struct.
7 2018-07-11 Alan Hayward <alan.hayward@arm.com>
9 * target-descriptions.c (tdesc_register_bitsize): Rename.
10 * target-descriptions.h (tdesc_register_bitsize): Likewise.
11 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
12 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
14 2018-07-10 Tom Tromey <tom@tromey.com>
16 * breakpoint.c (moribund_locations): Now static and a
18 (breakpoint_init_inferior, moribund_breakpoint_here_p)
19 (build_bpstat_chain, update_global_location_list)
20 (breakpoint_retire_moribund): Update.
21 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
24 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
26 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
27 (riscv_register_reggroup_p): Use new function, remove unneeded
29 (riscv_push_dummy_call): Extend assert to compare against xlen or
30 flen based on register type.
32 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
34 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
36 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
38 * remote.c (show_hardware_watchpoint_limit): New function.
39 (show_hardware_watchpoint_length_limit): New function.
40 (show_hardware_breakpoint_limit): New function.
41 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
42 where appropriate, update help text.
44 2018-07-09 Tom Tromey <tom@tromey.com>
46 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
47 (CLIBS): Don't mention NAT_CLIBS.
49 2018-07-09 Tom Tromey <tom@tromey.com>
51 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
52 (LIBGDB_OBS, clean mostlyclean): Update.
53 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
55 2018-07-09 Tom Tromey <tom@tromey.com>
57 * Makefile.in (%.c: %.y): Use ECHO_YACC.
58 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
59 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
61 2018-07-09 Tom Tromey <tom@tromey.com>
63 * Makefile.in (ALLDEPFILES): Remove exec.c.
64 (COMMON_OBS): Remove exec.o.
65 (COMMON_SFILES): Add exec.c.
67 2018-07-09 Tom Tromey <tom@tromey.com>
69 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
71 2018-07-09 Tom Tromey <tom@tromey.com>
73 * Makefile.in (clean mostlyclean): Remove stamp-version.
74 (version.c): Depend on stamp-version.
75 (stamp-version): New rule, from version.c rule.
77 2018-07-09 Tom Tromey <tom@tromey.com>
79 * Makefile.in (init.c): Depend on stamp-init.
80 (stamp-init): New rule, from init.c rule.
81 (clean mostlyclean): Remove stamp-init.
83 2018-07-09 Tom Tromey <tom@tromey.com>
85 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
86 SUBDIR_GCC_COMPILE_SRCS.
88 2018-07-09 Tom Tromey <tom@tromey.com>
90 * Makefile.in (init.c): Remove some unused sed rules.
92 2018-07-09 Tom Tromey <tom@tromey.com>
94 * Makefile.in (TSOBS): Remove.
97 (COMMON_SFILES): Add inflow.c.
98 (SFILES): Remove inflow.c.
100 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
102 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
104 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
106 * ia64-tdep.c (get_reg_name, get_fpreg_name, get_saveloc_name,
107 is_signal_frame_name, step_name, init_remote_name,
108 create_addr_space_name, destroy_addr_space_name,
109 search_unwind_table_name, find_dyn_list_name): Constify.
111 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
113 * darwin-nat.c (darwin_pthread_kill): New function.
114 (darwin_resume_thread): Use darwin_pthread_kill.
116 2018-07-05 Tom de Vries <tdevries@suse.de>
118 * macroexp.c (macro_buffer) <operator=>: New member function.
120 2018-07-04 Tom Tromey <tom@tromey.com>
122 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
124 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
126 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
127 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
131 2018-07-04 Joel Brobecker <brobecker@adacore.com>
133 * NEWS: Create a new section for the next release branch.
134 Rename the section of the current branch, now that it has
137 2018-07-04 Joel Brobecker <brobecker@adacore.com>
139 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
140 * version.in: Bump version to 8.2.50.DATE-git.
142 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
143 Pedro Alves <palves@redhat.com>
145 * linux-nat.c (linux_init_ptrace): Rename to ...
146 (linux_init_ptrace_procfs): ... this. Call
147 linux_proc_init_warnings.
148 (linux_nat_target::post_attach)
149 (linux_nat_target::post_startup_inferior): Adjust.
150 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
151 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
153 2018-07-04 Tom de Vries <tdevries@suse.de>
155 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
157 (read_comp_unit_head): ... here.
159 2018-07-03 Tom Tromey <tom@tromey.com>
161 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
162 (stop_tracing, tstatus_command)
163 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
164 (print_one_static_tracepoint_marker): Update.
165 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
167 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
169 (all_tracepoints, static_tracepoints_here): Return std::vector.
171 2018-07-03 Tom Tromey <tom@tromey.com>
173 * common/ptid.c (ptid_equal): Remove.
174 * common/ptid.h (ptid_equal): Don't declare.
175 * ada-tasks.c: Update.
176 * breakpoint.c: Update.
177 * common/agent.c: Update.
179 * darwin-nat-info.c: Update.
180 * darwin-nat.c: Update.
182 * dtrace-probe.c: Update.
183 * dummy-frame.c: Update.
184 * fbsd-nat.c: Update.
186 * gdbthread.h: Update.
188 * go32-nat.c: Update.
189 * inf-loop.c: Update.
190 * inf-ptrace.c: Update.
195 * linux-fork.c: Update.
196 * linux-nat.c: Update.
197 * linux-thread-db.c: Update.
198 * mi/mi-cmd-var.c: Update.
199 * mi/mi-interp.c: Update.
200 * mi/mi-main.c: Update.
201 * nto-procfs.c: Update.
202 * ppc-linux-tdep.c: Update.
204 * python/py-inferior.c: Update.
205 * python/py-record-btrace.c: Update.
206 * python/py-record.c: Update.
207 * ravenscar-thread.c: Update.
208 * regcache.c: Update.
209 * remote-sim.c: Update.
211 * sol-thread.c: Update.
214 * tui/tui-stack.c: Update.
216 * windows-nat.c: Update.
217 * windows-tdep.c: Update.
219 2018-07-03 Tom Tromey <tom@tromey.com>
221 * common/ptid.c (ptid_match): Remove.
222 * common/ptid.h (ptid_match): Don't declare.
223 * fbsd-nat.c: Update.
226 * linux-nat.c: Update.
227 * record-btrace.c: Update.
228 * regcache.c: Update.
231 2018-07-03 Tom Tromey <tom@tromey.com>
233 * common/ptid.c (ptid_tid_p): Remove.
234 * common/ptid.h (ptid_tid_p): Don't declare.
235 * sol-thread.c: Update.
237 2018-07-03 Tom Tromey <tom@tromey.com>
239 * common/ptid.c (ptid_lwp_p): Remove.
240 * common/ptid.h (ptid_lwp_p): Don't declare.
241 * fbsd-nat.c: Update.
242 * linux-nat.c: Update.
243 * nat/linux-procfs.c: Update.
244 * nat/x86-linux-dregs.c: Update.
245 * sol-thread.c: Update.
247 2018-07-03 Tom Tromey <tom@tromey.com>
249 * common/ptid.c (ptid_is_pid): Remove.
250 * common/ptid.h (ptid_is_pid): Don't declare.
252 * linux-nat.c: Update.
253 * mi/mi-interp.c: Update.
257 2018-07-03 Tom Tromey <tom@tromey.com>
259 * common/ptid.c (ptid_get_tid): Remove.
260 * common/ptid.h (ptid_get_tid): Don't declare.
261 * ada-tasks.c: Update.
262 * aix-thread.c: Update.
263 * bsd-uthread.c: Update.
264 * darwin-nat.c: Update.
265 * fbsd-nat.c: Update.
266 * i386-darwin-nat.c: Update.
268 * linux-tdep.c: Update.
269 * nto-procfs.c: Update.
270 * ppc-ravenscar-thread.c: Update.
271 * python/py-infthread.c: Update.
272 * ravenscar-thread.c: Update.
273 * sol-thread.c: Update.
274 * sparc-ravenscar-thread.c: Update.
275 * windows-nat.c: Update.
277 2018-07-03 Tom Tromey <tom@tromey.com>
279 * common/ptid.c (ptid_get_lwp): Remove.
280 * common/ptid.h (ptid_get_lwp): Don't declare.
281 * aarch64-linux-nat.c: Update.
282 * ada-tasks.c: Update.
283 * aix-thread.c: Update.
284 * amd64-linux-nat.c: Update.
285 * arm-linux-nat.c: Update.
287 * fbsd-nat.c: Update.
288 * fbsd-tdep.c: Update.
290 * i386-cygwin-tdep.c: Update.
291 * i386-gnu-nat.c: Update.
292 * i386-linux-nat.c: Update.
293 * ia64-linux-nat.c: Update.
294 * inf-ptrace.c: Update.
296 * linux-fork.c: Update.
297 * linux-nat.c: Update.
298 * linux-tdep.c: Update.
299 * linux-thread-db.c: Update.
300 * mips-linux-nat.c: Update.
301 * nat/aarch64-linux-hw-point.c: Update.
302 * nat/aarch64-linux.c: Update.
303 * nat/linux-btrace.c: Update.
304 * nat/linux-osdata.c: Update.
305 * nat/linux-procfs.c: Update.
306 * nat/x86-linux-dregs.c: Update.
307 * obsd-nat.c: Update.
308 * ppc-fbsd-nat.c: Update.
309 * ppc-linux-nat.c: Update.
311 * python/py-infthread.c: Update.
312 * ravenscar-thread.c: Update.
314 * s390-linux-nat.c: Update.
315 * sol-thread.c: Update.
316 * sol2-tdep.c: Update.
317 * spu-linux-nat.c: Update.
318 * x86-linux-nat.c: Update.
319 * xtensa-linux-nat.c: Update.
321 2018-07-03 Tom Tromey <tom@tromey.com>
323 * common/ptid.c (ptid_get_pid): Remove.
324 * common/ptid.h (ptid_get_pid): Don't declare.
325 * aarch64-linux-nat.c: Update.
326 * ada-lang.c: Update.
327 * aix-thread.c: Update.
328 * alpha-bsd-nat.c: Update.
329 * amd64-fbsd-nat.c: Update.
330 * amd64-linux-nat.c: Update.
331 * arm-linux-nat.c: Update.
332 * arm-nbsd-nat.c: Update.
334 * break-catch-syscall.c: Update.
335 * breakpoint.c: Update.
336 * bsd-uthread.c: Update.
339 * darwin-nat.c: Update.
340 * fbsd-nat.c: Update.
341 * fbsd-tdep.c: Update.
344 * hppa-nbsd-nat.c: Update.
345 * hppa-obsd-nat.c: Update.
346 * i386-fbsd-nat.c: Update.
347 * ia64-linux-nat.c: Update.
348 * inf-ptrace.c: Update.
350 * inferior.c: Update.
351 * inferior.h: Update.
354 * linux-fork.c: Update.
355 * linux-nat.c: Update.
356 * linux-tdep.c: Update.
357 * linux-thread-db.c: Update.
358 * m68k-bsd-nat.c: Update.
359 * mi/mi-interp.c: Update.
360 * mi/mi-main.c: Update.
361 * mips-linux-nat.c: Update.
362 * mips-nbsd-nat.c: Update.
363 * mips64-obsd-nat.c: Update.
364 * nat/aarch64-linux-hw-point.c: Update.
365 * nat/aarch64-linux.c: Update.
366 * nat/linux-btrace.c: Update.
367 * nat/linux-osdata.c: Update.
368 * nat/linux-procfs.c: Update.
369 * nat/x86-linux-dregs.c: Update.
370 * nto-procfs.c: Update.
371 * obsd-nat.c: Update.
372 * ppc-linux-nat.c: Update.
373 * ppc-nbsd-nat.c: Update.
374 * ppc-obsd-nat.c: Update.
375 * proc-service.c: Update.
377 * python/py-inferior.c: Update.
378 * python/py-infthread.c: Update.
379 * ravenscar-thread.c: Update.
381 * remote-sim.c: Update.
383 * rs6000-nat.c: Update.
384 * s390-linux-nat.c: Update.
385 * sh-nbsd-nat.c: Update.
386 * sol-thread.c: Update.
387 * sparc-nat.c: Update.
388 * sparc64-tdep.c: Update.
389 * spu-linux-nat.c: Update.
390 * spu-tdep.c: Update.
391 * target-debug.h: Update.
394 * tid-parse.c: Update.
395 * tracefile-tfile.c: Update.
396 * vax-bsd-nat.c: Update.
397 * windows-nat.c: Update.
398 * x86-linux-nat.c: Update.
401 2018-07-03 Tom Tromey <tom@tromey.com>
403 * common/ptid.c (pid_to_ptid): Remove.
404 * common/ptid.h (pid_to_ptid): Don't declare.
405 * aix-thread.c: Update.
406 * arm-linux-nat.c: Update.
407 * common/ptid.c: Update.
408 * common/ptid.h: Update.
411 * darwin-nat.c: Update.
412 * fbsd-nat.c: Update.
413 * fork-child.c: Update.
415 * go32-nat.c: Update.
416 * inf-ptrace.c: Update.
418 * inferior.c: Update.
420 * linux-fork.c: Update.
421 * linux-nat.c: Update.
422 * nat/aarch64-linux-hw-point.c: Update.
423 * nat/fork-inferior.c: Update.
424 * nat/x86-linux-dregs.c: Update.
425 * nto-procfs.c: Update.
426 * obsd-nat.c: Update.
428 * progspace.c: Update.
430 * rs6000-nat.c: Update.
431 * s390-linux-nat.c: Update.
432 * sol-thread.c: Update.
433 * spu-linux-nat.c: Update.
436 * tracefile-tfile.c: Update.
437 * windows-nat.c: Update.
439 2018-07-03 Tom Tromey <tom@tromey.com>
441 * common/ptid.h (ptid_build): Don't declare.
442 * common/ptid.c (ptid_build): Remove.
443 * aix-thread.c: Update.
445 * bsd-uthread.c: Update.
446 * common/agent.c: Update.
447 * common/ptid.c: Update.
448 * common/ptid.h: Update.
450 * darwin-nat.c: Update.
451 * fbsd-nat.c: Update.
453 * linux-fork.c: Update.
454 * linux-nat.c: Update.
455 * linux-thread-db.c: Update.
456 * nat/linux-osdata.c: Update.
457 * nat/linux-procfs.c: Update.
458 * nto-procfs.c: Update.
459 * obsd-nat.c: Update.
460 * proc-service.c: Update.
462 * ravenscar-thread.c: Update.
463 * remote-sim.c: Update.
465 * sol-thread.c: Update.
467 * windows-nat.c: Update.
469 2018-07-03 Tom Tromey <tom@tromey.com>
471 * infrun.c (follow_exec): Use exit_inferior_silent.
472 * inferior.c (exit_inferior_num_silent): Remove.
473 * inferior.h (exit_inferior_num_silent): Don't declare.
475 2018-07-03 Tom Tromey <tom@tromey.com>
478 * darwin-nat.c (darwin_attach_pid): Reset inferior and
479 inferior_ptid on error.
481 2018-07-02 Maciej W. Rozycki <macro@mips.com>
482 Simon Marchi <simon.marchi@polymtl.ca>
485 * disasm.h (gdb_disassembler): Add
486 `m_disassembler_options_holder'. member
487 * disasm.c (get_all_disassembler_options): New function.
488 (gdb_disassembler::gdb_disassembler): Use it.
489 (gdb_buffered_insn_length_init_dis): Likewise.
490 (gdb_buffered_insn_length): Adjust accordingly.
491 (set_disassembler_options): Handle options with arguments.
492 (show_disassembler_options_sfunc): Likewise. Add a leading new
493 line if showing options with descriptions.
494 (disassembler_options_completer): Adapt to using the
495 `disasm_options_and_args_t' structure.
496 * mips-tdep.c (mips_disassembler_options): New variable.
497 (mips_disassembler_options_o32): Likewise.
498 (mips_disassembler_options_n32): Likewise.
499 (mips_disassembler_options_n64): Likewise.
500 (gdb_print_insn_mips): Don't set `disassembler_options'.
501 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
503 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
504 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
505 `gdbarch_disassembler_options_implicit' and
506 `gdbarch_valid_disassembler_options'.
507 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
508 `disasm_options_and_args_t' structure.
509 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
511 (valid_disassembler_options): Switch from `disasm_options_t' to
512 the `disasm_options_and_args_t' structure.
513 * NEWS: Document `set disassembler-options' support for the MIPS
515 * gdbarch.h: Regenerate.
516 * gdbarch.c: Regenerate.
518 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
520 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
522 2018-06-29 Joel Brobecker <brobecker@adacore.com>
524 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
525 parameter in call to amd64_target_description.
526 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
527 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
528 (amd64fbsd_init_abi): Likewise.
529 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
530 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
531 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
532 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
534 2018-06-29 Pedro Alves <palves@redhat.com>
536 * gdb/amd64-tdep.h (amd64_create_target_description): Add
537 "segments" parameter.
538 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
539 (_initialize_amd64_tdep): Update call to
540 amd64_create_target_description.
541 (amd64_target_description): Add "segments" parameter. Adjust
542 the implementation to use it.
543 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
544 call to amd64_create_target_description.
545 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
546 * gdb/arch/amd64.h (amd64_create_target_description): Add
548 * gdb/arch/amd64.c (amd64_create_target_description): Add
549 "segments" parameter. Call create_feature_i386_64bit_segments
550 only if SEGMENTS is true.
551 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
552 call to amd64_create_target_description.
554 2018-06-29 Pedro Alves <palves@redhat.com>
556 * thread.c (thread_target_id_str): New, factored out from ...
557 (print_thread_info_1): ... here. Use it to compute the max
558 "Target Id" column width.
560 2018-06-29 Pedro Alves <palves@redhat.com>
562 * remote.c (remote_target::extra_thread_info): Delete
563 'display_buf' and 'n' locals. from the cache, regardless of
564 packet mechanims is in use. Use cache for qThreadExtra and qP
567 2018-06-29 Pedro Alves <palves@redhat.com>
569 * blockframe.c (find_pc_sect_containing_function): New function.
570 * breakpoint.c (print_breakpoint_location): Don't call
571 find_pc_sect_function.
572 * linespec.c (create_sals_line_offset): Record the location's
574 * linespec.c (convert_address_location_to_sals): Fill in sal's
575 symbol with find_pc_sect_containing_function.
576 * symtab.c (find_function_start_sal): Rename to ...
577 (find_function_start_sal_1): ... this.
578 (find_function_start_sal): Reimplement as wrapper around
579 find_function_start_sal_1, and use
580 find_pc_sect_containing_function to fill in the sal's symbol.
581 (find_function_start_sal(symbol*, bool)): Adjust.
582 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
584 (find_pc_sect_containing_function): Declare.
586 2018-06-29 Pedro Alves <palves@redhat.com>
588 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
589 true if the the location has no symbol.
591 2018-06-28 Tom Tromey <tom@tromey.com>
593 * NEWS: Mention --enable-codesign.
594 * silent-rules.mk (ECHO_SIGN): New variable.
595 * configure.ac: Add --enable-codesign.
596 * configure: Rebuild.
597 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
598 (gdb$(EXEEXT)): Optionally invoke codesign.
600 2018-06-28 Pedro Alves <palves@redhat.com>
602 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
604 (switch_to_thread_no_regs): Adjust comment.
605 * infcmd.c (stop_pc): Delete.
606 (post_create_inferior, info_program_command): Replace references
607 to stop_pc with references to thread_info->suspend.stop_pc.
608 * inferior.h (stop_pc): Delete declaration.
609 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
610 (handle_inferior_event_1, handle_signal_stop)
611 (process_event_stop_test, keep_going_stepped_thread)
612 (handle_step_into_function, handle_step_into_function_backward)
613 (print_stop_location): Replace references to stop_pc with
614 references to thread_info->suspend.stop_pc.
615 (struct infcall_suspend_state) <stop_pc>: Delete field.
616 (save_infcall_suspend_state, restore_infcall_suspend_state):
617 Remove references to inf_stat->stop_pc.
618 * linux-fork.c (fork_load_infrun_state): Likewise.
619 * record-btrace.c (record_btrace_set_replay): Likewise.
620 * record-full.c (record_full_goto_entry): Likewise.
621 * remote.c (print_one_stopped_thread): Likewise.
622 * target.c (target_resume): Extend comment.
623 * thread.c (set_executing_thread): New.
624 (set_executing): Use it.
625 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
626 Remove references to stop_pc.
628 2018-06-28 Pedro Alves <palves@redhat.com>
630 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
631 Moving fetching stop_pc until after ecs->event_thread is refreshed.
633 2018-06-28 Tom Tromey <tom@tromey.com>
635 * coffread.c (coff_symfile_finish): Update.
636 * xcoffread.c (xcoff_symfile_finish): Update.
637 * elfread.c (elf_symfile_finish): Update.
638 * symfile.h (dwarf2_free_objfile): Don't declare.
639 * dwarf2read.c (_initialize_dwarf2_read): Use
640 register_objfile_data_with_cleanup.
641 (dwarf2_free_objfile): Now static. Change signature.
643 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
645 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
646 option "-o" to add-symbol-file-load to add an offset to each
647 section's load address.
648 * symfile.c (set_objfile_default_section_offset): New function.
650 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
652 * symfile.c (add_symbol_file_command): Make sure that sections
653 with the same name are sorted in the same order.
655 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
657 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
658 require the second argument. If omitted, load sections at the
659 addresses specified in the file.
661 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
663 * symfile.c (symbol_file_command, symbol_file_add_main_1)
664 (_initialize_symfile): Add option "-o" to symbol-file to add an
665 offset to each section of the symbol file.
667 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
669 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
671 2018-06-27 Tom Tromey <tom@tromey.com>
673 * stack.c (_initialize_stack): Update "func" help text.
675 2018-06-27 Tom Tromey <tom@tromey.com>
677 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
679 (unwind_infopy_str, pyuw_create_unwind_info)
680 (unwind_infopy_add_saved_register, pyuw_sniffer)
681 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
683 (struct saved_reg): Add constructor.
684 <value>: Now a gdbpy_ref<>.
686 2018-06-27 Tom Tromey <tom@tromey.com>
688 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
690 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
692 * gdb-gdb.py.in: Format using autopep8.
694 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
696 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
697 (type_lookup_function): Recognize CORE_ADDR values.
699 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
701 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
704 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
706 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
709 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
711 * gdb-gdb.py: Move to...
712 * gdb-gdb.py.in: ... here.
713 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
714 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
716 (distclean): Remove gdb-gdb.py when cleaning.
717 (gdb-gdb.py, gdb-gdb.gdb): New rules.
718 * configure: Re-generate.
720 2018-06-27 Pedro Alves <palves@redhat.com>
722 * proc-service.c (get_ps_regcache): New.
723 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
724 (ps_lsetfpregs): Use it.
726 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
729 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
730 (dwarf_decode_lines_1): Adjust.
732 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
734 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
736 <info_proc>: Likewise.
738 2018-06-26 Joel Brobecker <brobecker@adacore.com>
740 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
741 to windows_fetch_one_register, and only handle the case of
742 fetching one register. Move the code that reloads the context
743 and iterates over all registers if R is negative to...
744 (windows_nat_target::fetch_registers): ... here.
745 (do_windows_store_inferior_registers): Rename to
746 windows_store_one_register, and only handle the case of storing
747 one register. Move the code that handles the case where r is
749 (windows_nat_target::store_registers) ... here.
751 2018-06-26 Tom Tromey <tom@tromey.com>
754 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
755 * rust-lang.c (rust_print_struct_def): Add podata parameter.
757 (rust_internal_print_type): Add podata parameter.
758 (rust_print_type): Update.
760 2018-06-26 Tom Tromey <tom@tromey.com>
762 * typeprint.h (struct print_offset_data) <update, finish,
763 maybe_print_hole>: New methods.
764 <indentation>: New constant.
765 * typeprint.c (print_offset_data::indentation): Define.
766 (print_offset_data::maybe_print_hole, print_offset_data::update)
767 (print_offset_data::finish): Move from c-typeprint.c and rename.
768 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
769 (print_spaces_filtered_with_print_options): Update.
770 (c_print_type_union_field_offset, maybe_print_hole)
771 (c_print_type_struct_field_offset): Move to typeprint.c and
773 (c_type_print_base_struct_union): Update.
775 2018-06-25 Pedro Alves <palves@redhat.com>
777 * gdbthread.h (thread_info_ref, delete_thread)
778 (delete_thread_silent, first_thread_of_inferior)
779 (any_thread_of_inferior, switch_to_thread)
780 (enable_thread_stack_temporaries)
781 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
782 (get_last_thread_stack_temporary)
783 (value_in_thread_stack_temporaries, can_access_registers_thread):
784 Spell out "struct thread_info" instead of just "thread_info".
785 * inferior.h (notice_new_inferior): Likewise.
787 2018-06-25 Pedro Alves <palves@redhat.com>
789 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
790 pass thread_info pointer to delete_thread.
791 (windows_nat_target::detach): Pass inferior pointer to
793 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
795 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
796 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
797 and pass a thread_info pointer to delete_thread.
798 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
799 pass thread_info pointer to delete_thread.
800 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
801 delete_thread_silent call.
802 * procfs.c (procfs_target::detach): Pass inferior pointer to
804 (procfs_target::wait): Pass thread_info pointer to delete_thread.
805 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
806 delete_thread_silent call.
807 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
808 pass thread_info pointer to delete_thread.
809 (windows_nat_target::detach): Pass inferior pointer to
812 2018-06-22 Alan Hayward <alan.hayward@arm.com>
814 * regcache.c (readable_regcache::read_part): Fix asserts.
815 (reg_buffer::raw_collect_part): New function.
816 (regcache::write_part): Fix asserts.
817 (reg_buffer::raw_supply_part): New function.
818 (regcache::transfer_regset_register): New helper function.
819 (regcache::transfer_regset): Call new functions.
820 (regcache_supply_regset): Use gdb_byte*.
821 (regcache::supply_regset): Likewise.
822 (regcache_collect_regset): Likewise.
823 (regcache::collect_regset): Likewise.
824 * regcache.h (reg_buffer::raw_collect_part): New declaration.
825 (reg_buffer::raw_supply_part): Likewise.
826 (regcache::transfer_regset_register): Likewise.
827 (regcache::transfer_regset): Use gdb_byte*.
829 2018-06-22 Alan Hayward <alan.hayward@arm.com>
831 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
833 2018-06-21 Pedro Alves <palves@redhat.com>
835 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
836 instead of a ptid_t. All callers adjusted.
837 * ada-tasks.c (ada_get_task_number): Likewise. All callers
839 (print_ada_task_info, display_current_task_id, task_command_1):
841 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
843 (breakpoint_kind): Adjust.
844 (remove_breakpoints_pid): Rename to ...
845 (remove_breakpoints_inf): ... this. Adjust to take an inferior
846 pointer. All callers adjusted.
847 (bpstat_clear_actions): Use inferior_thread.
848 (get_bpstat_thread): New.
849 (bpstat_do_actions): Use it.
850 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
851 to take a thread_info pointer. All callers adjusted.
852 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
853 (breakpoint_re_set_thread): Use inferior_thread.
854 * breakpoint.h (struct inferior): Forward declare.
855 (bpstat_stop_status): Update.
856 (remove_breakpoints_pid): Delete.
857 (remove_breakpoints_inf): New.
858 * bsd-uthread.c (bsd_uthread_target::wait)
859 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
860 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
861 (maint_btrace_packet_history_cmd)
862 (maint_btrace_clear_packet_history_cmd): Adjust.
863 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
865 * cli/cli-interp.c: Include "inferior.h".
866 * common/refcounted-object.h (struct
867 refcounted_object_ref_policy): New.
868 * compile/compile-object-load.c: Include gdbthread.h.
869 (store_regs): Use inferior_thread.
870 * corelow.c (core_target::close): Use current_inferior.
871 (core_target_open): Adjust to use first_thread_of_inferior and use
872 the current inferior.
873 * ctf.c (ctf_target::close): Adjust to use current_inferior.
874 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
875 <thread>: ... this new field. All references adjusted.
876 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
877 Take a thread_info pointer instead of a ptid_t.
878 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
879 (dummy_frame_discard, register_dummy_frame_dtor): Take a
880 thread_info pointer instead of a ptid_t.
881 * elfread.c: Include "inferior.h".
882 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
884 * eval.c (evaluate_subexp): Likewise.
885 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
887 * gdb_proc_service.h (struct thread_info): Forward declare.
888 (struct ps_prochandle) <ptid>: Delete, replaced by ...
889 <thread>: ... this new field. All references adjusted.
890 * gdbarch.h, gdbarch.c: Regenerate.
891 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
892 'thread' parameter. All implementations and callers adjusted.
893 * gdbthread.h (thread_info) <set_running>: New method.
894 (delete_thread, delete_thread_silent): Take a thread_info pointer
896 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
897 (first_thread_of_process): Delete, replaced by ...
898 (first_thread_of_inferior): ... this new function. All callers
900 (any_live_thread_of_process): Delete, replaced by ...
901 (any_live_thread_of_inferior): ... this new function. All callers
903 (switch_to_thread, switch_to_no_thread): Declare.
904 (is_executing): Delete.
905 (enable_thread_stack_temporaries): Update comment.
906 <enable_thread_stack_temporaries>: Take a thread_info pointer
907 instead of a ptid_t. Incref the thread.
908 <~enable_thread_stack_temporaries>: Decref the thread.
911 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
912 (get_last_thread_stack_temporary)
913 (value_in_thread_stack_temporaries, can_access_registers_thread):
914 Take a thread_info pointer instead of a ptid_t. All callers
916 * infcall.c (get_call_return_value): Use inferior_thread.
917 (run_inferior_call): Work with thread pointers instead of ptid_t.
918 (call_function_by_hand_dummy): Work with thread pointers instead
919 of ptid_t. Use thread_info_ref.
920 * infcmd.c (proceed_thread_callback): Access thread's state
922 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
923 access thread's state directly.
924 (continue_command): Use inferior_thread.
925 (info_program_command): Use find_thread_ptid and access thread
927 (proceed_after_attach_callback): Use thread state directly.
928 (notice_new_inferior): Take a thread_info pointer instead of a
929 ptid_t. All callers adjusted.
930 (exit_inferior): Take an inferior pointer instead of a pid. All
932 (exit_inferior_silent): New.
933 (detach_inferior): Delete.
934 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
935 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
936 (detach_inferior_command, kill_inferior_command): Use
937 find_inferior_id instead of valid_gdb_inferior_id and
938 gdb_inferior_id_to_pid.
939 (inferior_command): Use inferior and thread pointers.
940 * inferior.h (struct thread_info): Forward declare.
941 (notice_new_inferior): Take a thread_info pointer instead of a
942 ptid_t. All callers adjusted.
943 (detach_inferior): Delete declaration.
944 (exit_inferior, exit_inferior_silent): Take an inferior pointer
945 instead of a pid. All callers adjusted.
946 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
947 (valid_gdb_inferior_id): Delete.
948 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
949 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
950 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
952 <inf>: ... this new field.
953 <step_ptid>: Delete, replaced by ...
954 <step_thread>: ... this new field.
955 (get_displaced_stepping_state): Take an inferior pointer instead
956 of a pid. All callers adjusted.
957 (displaced_step_in_progress_any_inferior): Adjust.
958 (displaced_step_in_progress_thread): Take a thread pointer instead
959 of a ptid_t. All callers adjusted.
960 (displaced_step_in_progress, add_displaced_stepping_state): Take
961 an inferior pointer instead of a pid. All callers adjusted.
962 (get_displaced_step_closure_by_addr): Adjust.
963 (remove_displaced_stepping_state): Take an inferior pointer
964 instead of a pid. All callers adjusted.
965 (displaced_step_prepare_throw, displaced_step_prepare)
966 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
967 All callers adjusted.
968 (start_step_over): Adjust.
969 (infrun_thread_ptid_changed): Remove bit updating ptids in the
970 displaced step queue.
971 (do_target_resume): Adjust.
972 (fetch_inferior_event): Use inferior_thread.
973 (context_switch, get_inferior_stop_soon): Take an
974 execution_control_state pointer instead of a ptid_t. All callers
976 (switch_to_thread_cleanup): Delete.
977 (stop_all_threads): Use scoped_restore_current_thread.
978 * inline-frame.c: Include "gdbthread.h".
979 (inline_state) <inline_state>: Take a thread pointer instead of a
980 ptid_t. All callers adjusted.
981 <ptid>: Delete, replaced by ...
982 <thread>: ... this new field.
983 (find_inline_frame_state): Take a thread pointer instead of a
984 ptid_t. All callers adjusted.
985 (skip_inline_frames, step_into_inline_frame)
986 (inline_skipped_frames, inline_skipped_symbol): Take a thread
987 pointer instead of a ptid_t. All callers adjusted.
988 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
989 (inline_skipped_frames, inline_skipped_symbol): Likewise.
990 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
992 * linux-nat.c (get_detach_signal): Likewise.
993 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
994 (thread_db_notice_clone): Adjust.
995 (thread_db_find_new_threads_silently)
996 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
997 a thread pointer instead of a ptid_t. All callers adjusted.
998 * mi/mi-cmd-var.c: Include "inferior.h".
999 (mi_cmd_var_update_iter): Update to use thread pointers.
1000 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1002 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1004 (mi_output_running): ... this new function.
1005 (mi_on_resume_1): Adjust to use it.
1006 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1007 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1009 (interrupt_thread_callback): : Adjust to use thread and inferior
1011 * proc-service.c: Include "gdbthread.h".
1012 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1013 * progspace-and-thread.c: Include "inferior.h".
1014 * progspace.c: Include "inferior.h".
1015 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1016 hold a reference to an inferior_object.
1017 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1019 * python/py-inferior.c (struct inferior_object): Give the type a
1020 tag name instead of a typedef.
1021 (python_on_normal_stop): No need to check if the current thread is
1023 (inferior_to_inferior_object): Change return type to
1024 inferior_object. All callers adjusted.
1025 (find_thread_object): Delete, bits factored out to ...
1026 (thread_to_thread_object): ... this new function.
1027 * python/py-infthread.c (create_thread_object): Use
1028 inferior_to_inferior_object.
1029 (thpy_is_stopped): Use thread pointer directly.
1030 (gdbpy_selected_thread): Use inferior_thread.
1031 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1032 field, replaced with ...
1033 <thread>: ... this new field. All users adjusted.
1034 (btpy_insn_or_gap_new): Drop const.
1035 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1037 * python/py-record.c: Include "gdbthread.h".
1038 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1039 a ptid_t. All callers adjusted.
1040 (gdbpy_current_recording): Use inferior_thread.
1041 * python/py-record.h (recpy_record_object) <ptid>: Delete
1042 field, replaced with ...
1043 <thread>: ... this new field. All users adjusted.
1044 (recpy_element_object) <ptid>: Delete
1045 field, replaced with ...
1046 <thread>: ... this new field. All users adjusted.
1047 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1048 a ptid_t. All callers adjusted.
1049 * python/py-threadevent.c: Include "gdbthread.h".
1050 (get_event_thread): Use thread_to_thread_object.
1051 * python/python-internal.h (struct inferior_object): Forward
1053 (find_thread_object, find_inferior_object): Delete declarations.
1054 (thread_to_thread_object, inferior_to_inferior_object): New
1056 * record-btrace.c: Include "inferior.h".
1057 (require_btrace_thread): Use inferior_thread.
1058 (record_btrace_frame_sniffer)
1059 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1060 (get_thread_current_frame): Use scoped_restore_current_thread and
1062 (get_thread_current_frame): Use thread pointer directly.
1063 (record_btrace_replay_at_breakpoint): Use thread's inferior
1065 * record-full.c: Include "inferior.h".
1066 * regcache.c: Include "gdbthread.h".
1067 (get_thread_arch_regcache): Use the inferior's address space
1069 (get_thread_regcache, registers_changed_thread): New.
1070 * regcache.h (get_thread_regcache(thread_info *thread)): New
1072 (registers_changed_thread): New.
1073 (remote_target) <remote_detach_1>: Swap order of parameters.
1074 (remote_add_thread): <remote_add_thread>: Return the new thread.
1075 (get_remote_thread_info(ptid_t)): New overload.
1076 (remote_target::remote_notice_new_inferior): Use thread pointers
1078 (remote_target::process_initial_stop_replies): Use
1079 thread_info::set_running.
1080 (remote_target::remote_detach_1, remote_target::detach)
1081 (extended_remote_target::detach): Adjust.
1082 * stack.c (frame_show_address): Use inferior_thread.
1083 * target-debug.h (target_debug_print_thread_info_pp): New.
1084 * target-delegates.c: Regenerate.
1085 * target.c (default_thread_address_space): Delete.
1086 (memory_xfer_partial_1): Use current_inferior.
1087 (target_detach): Use current_inferior.
1088 (target_thread_address_space): Delete.
1089 (generic_mourn_inferior): Use current_inferior.
1090 * target.h (struct target_ops) <thread_address_space>: Delete.
1091 (target_thread_address_space): Delete.
1092 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1094 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1095 thread pointer instead of a ptid_t. Adjust all callers.
1096 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1097 (first_thread_of_process): Delete, replaced by ...
1098 (first_thread_of_inferior): ... this new function. All callers
1100 (any_thread_of_process): Rename to ...
1101 (any_thread_of_inferior): ... this, and take an inferior pointer.
1102 (any_live_thread_of_process): Rename to ...
1103 (any_live_thread_of_inferior): ... this, and take an inferior
1105 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1106 (value_in_thread_stack_temporaries)
1107 (get_last_thread_stack_temporary): Take a thread pointer instead
1108 of a ptid_t. Adjust all callers.
1109 (thread_info::set_running): New.
1110 (validate_registers_access): Use inferior_thread.
1111 (can_access_registers_ptid): Rename to ...
1112 (can_access_registers_thread): ... this, and take a thread
1114 (print_thread_info_1): Adjust to compare thread pointers instead
1116 (switch_to_no_thread, switch_to_thread): Make extern.
1117 (scoped_restore_current_thread::~scoped_restore_current_thread):
1118 Use m_thread pointer directly.
1119 (scoped_restore_current_thread::scoped_restore_current_thread):
1120 Use inferior_thread.
1121 (thread_command): Use thread pointer directly.
1122 (thread_num_make_value_helper): Use inferior_thread.
1123 * top.c (execute_command): Use inferior_thread.
1124 * tui/tui-interp.c: Include "inferior.h".
1125 * varobj.c (varobj_create): Use inferior_thread.
1126 (value_of_root_1): Use find_thread_global_id instead of
1127 global_thread_id_to_ptid.
1129 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1131 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1133 (regcache::write_part): Likewise.
1134 (readable_regcache::cooked_read_part): Update comment.
1135 (readable_regcache::cooked_write_part): Likewise.
1136 * regcache.h: (readable_regcache::read_part): Likewise.
1137 (regcache::write_part): Likewise.
1139 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1140 Dirk Schubert <dirk.schubert@arm.com>
1142 * aarch64-linux-nat.c (post_attach): New.
1143 (aarch64_linux_nat_target::post_attach): Override post_attach to
1144 record the number of hardware debug registers.
1146 2018-06-20 Tom Tromey <tom@tromey.com>
1148 * python/py-param.c (add_setshow_generic): Make parameters const.
1149 (parmpy_init): Update.
1151 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1153 * regcache.h (regcache_cooked_read_ftype): Rename to...
1154 (register_read_ftype): ...this, change type to function_view.
1155 (class reg_buffer) <save>: Remove src parameter.
1156 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1157 parameter non-const in first overload. Remove src parameter in
1159 * regcache.c (do_cooked_read): Remove.
1160 (readonly_detached_regcache::readonly_detached_regcache): Make
1161 parameter non-const, adjust call to other constructor.
1162 (reg_buffer::save): Remove src parameter.
1163 * frame.c (do_frame_register_read): Remove.
1164 (frame_save_as_regcache): Use lambda function.
1165 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1166 parameter to ppu2spu_data *.
1167 (ppu2spu_sniffer): Use lambda function.
1169 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1171 * record-full.c (record_full_target::insert_breakpoint): Remove
1172 "struct" keyword, add const.
1174 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1176 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1177 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1178 * configure.ac: Remove AC_PREREQ, add missing quoting.
1179 * gnulib/configure.ac: Modernize usage of
1180 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1181 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1182 (AUTOMAKE_VERSION): Bump to 1.15.1.
1183 * configure: Re-generate.
1184 * config.in: Re-generate.
1185 * aclocal.m4: Re-generate.
1186 * gnulib/aclocal.m4: Re-generate.
1187 * gnulib/config.in: Re-generate.
1188 * gnulib/configure: Re-generate.
1189 * gnulib/import/Makefile.in: Re-generate.
1191 2018-06-19 Pedro Alves <palves@redhat.com>
1193 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1194 (lookup_minimal_symbol_by_pc_section): ... here with
1195 gdb_assert_not_reached added.
1197 2018-06-19 Pedro Alves <palves@redhat.com>
1199 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1200 parameter with a block parameter. Compare location's block symbol
1201 with the frame's block instead of addresses.
1202 (skip_inline_frames): Pass the current block instead of the
1203 frame's address. Break out as soon as we determine the frame
1204 should not be skipped.
1206 2018-06-18 Tom Tromey <tom@tromey.com>
1208 * solib-aix.c (solib_aix_get_section_offsets): Return
1210 (solib_aix_solib_create_inferior_hook): Update.
1212 2018-06-18 Tom Tromey <tom@tromey.com>
1214 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1216 2018-06-18 Tom Tromey <tom@tromey.com>
1218 * solib-frv.c (frv_relocate_main_executable): Use
1220 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1223 2018-06-18 Tom Tromey <tom@tromey.com>
1225 * objfiles.h (inhibit_section_map_updates): Update.
1226 (resume_section_map_updates, resume_section_map_updates_cleanup):
1228 * solib-svr4.c (svr4_handle_solib_event): Update.
1229 * objfiles.c (inhibit_section_map_updates): Return
1230 scoped_restore_tmpl<int>.
1231 (resume_section_map_updates, resume_section_map_updates_cleanup):
1234 2018-06-18 Tom Tromey <tom@tromey.com>
1236 * valprint.h (read_string): Update.
1237 * valprint.c (read_string): Change type of "buffer".
1238 (val_print_string): Update.
1239 * python/py-value.c (valpy_string): Update.
1240 * language.h (struct language_defn) <la_get_string>: Change
1242 (default_get_string, c_get_string): Update.
1243 * language.c (default_get_string): Change type of "buffer".
1244 * guile/scm-value.c (gdbscm_value_to_string): Update.
1245 * c-lang.c (c_get_string): Change type of "buffer".
1247 2018-06-18 Tom Tromey <tom@tromey.com>
1249 * ser-mingw.c (struct pipe_state_destroyer): New.
1250 (pipe_state_up): New typedef.
1251 (cleanup_pipe_state): Remove.
1252 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1254 2018-06-18 Tom Tromey <tom@tromey.com>
1256 * rust-lang.h (rust_yyerror): Don't declare.
1257 * rust-lang.c (rust_language_defn): Update.
1258 * rust-exp.y (yyerror): Now static.
1259 * parse.c (parse_exp_in_context_1): Update.
1260 * p-lang.h (p_yyerror): Don't declare.
1261 * p-lang.c (p_language_defn): Update.
1262 * p-exp.y (yyerror): Now static.
1263 * opencl-lang.c (opencl_language_defn): Update.
1264 * objc-lang.c (objc_language_defn): Update.
1265 * m2-lang.h (m2_yyerror): Don't declare.
1266 * m2-lang.c (m2_language_defn): Update.
1267 * m2-exp.y (yyerror): Now static.
1268 * language.h (struct language_defn) <la_error>: Remove.
1269 * language.c (unk_lang_error): Remove.
1270 (unknown_language_defn, auto_language_defn): Remove.
1271 * go-lang.h (go_yyerror): Don't declare.
1272 * go-lang.c (go_language_defn): Update.
1273 * go-exp.y (yyerror): Now static.
1274 * f-lang.h (f_yyerror): Don't declare.
1275 * f-lang.c (f_language_defn): Update.
1276 * f-exp.y (yyerror): Now static.
1277 * d-lang.h (d_yyerror): Don't declare.
1278 * d-lang.c (d_language_defn): Update.
1279 * d-exp.y (yyerror): Now static.
1280 * c-lang.h (c_yyerror): Don't declare.
1281 * c-lang.c (c_language_defn, cplus_language_defn)
1282 (asm_language_defn, minimal_language_defn): Update.
1283 * c-exp.y (yyerror): Now static.
1284 * ada-lang.h (ada_yyerror): Don't declare.
1285 * ada-lang.c (ada_language_defn): Update.
1286 * ada-exp.y (yyerror): Now static.
1288 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1290 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1291 (store_sveregs_to_thread): Likewise.
1292 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1293 (aarch64_linux_store_inferior_registers): Likewise.
1294 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1296 (aarch64_sve_regs_copy_to_regcache): Likewise.
1297 (aarch64_sve_regs_copy_from_regcache): Likewise.
1298 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1300 (aarch64_sve_regs_copy_to_regcache): Likewise.
1301 (aarch64_sve_regs_copy_from_regcache): Likewise.
1302 (sve_context): Structure from Linux headers.
1303 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1304 (SVE_SIG_ZREG_SIZE): Likewise.
1305 (SVE_SIG_PREG_SIZE): Likewise.
1306 (SVE_SIG_FFR_SIZE): Likewise.
1307 (SVE_SIG_REGS_OFFSET): Likewise.
1308 (SVE_SIG_ZREGS_OFFSET): Likewise.
1309 (SVE_SIG_ZREG_OFFSET): Likewise.
1310 (SVE_SIG_ZREGS_SIZE): Likewise.
1311 (SVE_SIG_PREGS_OFFSET): Likewise.
1312 (SVE_SIG_PREG_OFFSET): Likewise.
1313 (SVE_SIG_PREGS_SIZE): Likewise.
1314 (SVE_SIG_FFR_OFFSET): Likewise.
1315 (SVE_SIG_REGS_SIZE): Likewise.
1316 (SVE_SIG_CONTEXT_SIZE): Likewise.
1317 (SVE_PT_REGS_MASK): Likewise.
1318 (SVE_PT_REGS_FPSIMD): Likewise.
1319 (SVE_PT_REGS_SVE): Likewise.
1320 (SVE_PT_VL_INHERIT): Likewise.
1321 (SVE_PT_VL_ONEXEC): Likewise.
1322 (SVE_PT_REGS_OFFSET): Likewise.
1323 (SVE_PT_FPSIMD_OFFSET): Likewise.
1324 (SVE_PT_FPSIMD_SIZE): Likewise.
1325 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1326 (SVE_PT_SVE_PREG_SIZE): Likewise.
1327 (SVE_PT_SVE_FFR_SIZE): Likewise.
1328 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1329 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1330 (__SVE_SIG_TO_PT): Likewise.
1331 (SVE_PT_SVE_OFFSET): Likewise.
1332 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1333 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1334 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1335 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1336 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1337 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1338 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1339 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1340 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1341 (SVE_PT_SVE_SIZE): Likewise.
1342 (SVE_PT_SIZE): Likewise.
1343 (HAS_SVE_STATE): New define.
1345 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1347 * nat/aarch64-sve-linux-sigcontext.h: New file.
1348 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1350 (SVE_VQ_MIN): Likewise.
1351 (SVE_VQ_MAX): Likewise.
1352 (SVE_VL_MIN): Likewise.
1353 (SVE_VL_MAX): Likewise.
1354 (SVE_NUM_ZREGS): Likewise.
1355 (SVE_NUM_PREGS): Likewise.
1356 (sve_vl_valid): Likewise.
1357 (struct user_sve_header): Likewise.
1359 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1360 Richard Bunt <Richard.Bunt@arm.com>
1362 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1363 was requested by GDB.
1365 2018-06-15 Tom de Vries <tdevries@suse.de>
1367 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1369 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1371 * gnulib/update-gnulib.sh: Print expected versions of
1374 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1376 * arch-utils.c (default_type_align): Use type_length_units.
1377 * gdbtypes.c (type_align): Use type_length_units.
1379 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1381 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1382 of 'define' command.
1384 2018-06-14 Tom de Vries <tdevries@suse.de>
1387 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1388 get_no_prettyformat_print_options.
1390 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1392 * sparc-nat.h: Include target.h.
1393 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1394 <fetch_registers>: Remove this argument in function call.
1395 <store_registers>: Remove this argument in function call, remove
1397 <low_forget_process>: Call sparc64_forget_process instead of
1398 sparc_forget_process.
1400 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1402 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1403 (procfs_target::make_corefile_notes): Adjust to new
1404 target_read_alloc return type.
1406 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1407 Stephen Roberts <stephen.roberts@arm.com>
1410 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1411 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1412 Move should_notify_stop local into more inner scope.
1414 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1415 Stephen Roberts <stephen.roberts@arm.com>
1418 * infrun.c (resume_1): Add call to mark_async_event_handler.
1420 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1422 * infrun.c (do_target_wait): Change old version of $pc printed.
1424 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1426 * dwarf2read.c (read_index_from_section): Rename to...
1427 (read_gdb_index_from_section): ... this, update all callers.
1428 (dwarf2_read_index): Rename to...
1429 (dwarf2_read_gdb_index): ... this, update all callers.
1431 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1433 * gdb/hppa-linux-nat.c
1434 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1435 hppa_linux_nat_target::fetch_registers.
1437 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1439 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1440 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1441 (AARCH64_DWARF_SVE_FFR): Likewise.
1442 (AARCH64_DWARF_SVE_P0): Likewise.
1443 (AARCH64_DWARF_SVE_Z0): Likewise.
1445 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1447 * common/common-regcache.h (raw_compare): New function.
1448 * regcache.c (regcache::raw_compare): Likewise.
1449 * regcache.h (regcache::raw_compare): New declaration.
1451 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1453 * common/common-regcache.h (reg_buffer_common): New structure.
1454 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1455 (reg_buffer::raw_supply): Likewise.
1456 (reg_buffer::raw_supply_integer): Likewise.
1457 (reg_buffer::raw_supply_zeroed): Likewise.
1458 (reg_buffer::raw_collect): Likewise.
1459 (reg_buffer::raw_collect_integer): Likewise.
1460 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1461 (reg_buffer::raw_supply): Likewise.
1462 (reg_buffer::raw_supply_integer): Likewise.
1463 (reg_buffer::raw_supply_zeroed): Likewise.
1464 (reg_buffer::raw_collect): Likewise.
1465 (reg_buffer::raw_collect_integer): Likewise.
1467 2018-06-10 Tom Tromey <tom@tromey.com>
1469 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1470 (class remote_state) <stop_reply_queue>: Now std::vector.
1471 (remote_state::~remote_state)
1472 (remote_target::stop_reply_queue_length): Update.
1473 (struct queue_iter_param, remove_child_of_pending_fork)
1474 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1475 (check_pending_event_prevents_wildcard_vcont_callback)
1476 (remove_stop_reply_for_inferior)
1477 (remove_stop_reply_of_remote_state)
1478 (remote_notif_remove_once_on_match)
1479 (stop_reply_match_ptid_and_ws)
1480 (remote_kill_child_of_pending_fork): Remove.
1481 (remote_target::remove_new_fork_children)
1482 (remote_target::check_pending_events_prevent_wildcard_vcont)
1483 (remote_target::discard_pending_stop_replies)
1484 (remote_target::discard_pending_stop_replies_in_queue)
1485 (remote_target::remote_notif_remove_queued_reply)
1486 (remote_target::queued_stop_reply)
1487 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1488 (remote_target::wait, remote_target::kill_new_fork_children)
1489 (remote_target::async): Update.
1491 2018-06-10 Tom Tromey <tom@tromey.com>
1493 * record-full.c (record_full_arch_list_cleanups): Remove.
1494 (record_full_message): Use try/catch.
1495 (record_full_wait_cleanups): Remove.
1496 (record_full_wait_1): Use try/catch.
1497 (record_full_restore): Likewise.
1499 2018-06-10 Tom Tromey <tom@tromey.com>
1501 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1502 declare VEC. Add constructor.
1503 <in_target_beneath>: Now bool.
1504 (record_full_breakpoints): Now a std::vector, static.
1505 (record_full_sync_record_breakpoints)
1506 (record_full_init_record_breakpoints)
1507 (record_full_target::insert_breakpoint)
1508 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1510 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1512 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1513 * serial.c (serial_interface_lookup): Remove struct keyword.
1515 2018-06-10 Tom Tromey <tom@tromey.com>
1517 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1519 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1521 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1523 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1524 "beneath" as a method.
1525 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1526 Use "beneath" as a method.
1528 2018-06-10 Tom Tromey <tom@tromey.com>
1530 * tracefile.c (struct trace_file_writer_deleter): New.
1531 <operator()>: Rename from trace_file_writer_xfree.
1532 (trace_file_writer_up): New typedef.
1533 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1535 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1537 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1538 <m_registers, m_register_status>: Change type to
1540 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1543 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1545 * common/common-regcache.h (enum register_status): Add
1546 underlying type "signed char".
1547 * regcache.h (reg_buffer) <m_register_status>: Change type to
1549 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1550 register_status instead of signed char.
1551 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1552 (reg_buffer::get_register_status): Remove cast.
1553 (readable_regcache::raw_read): Remove cast.
1554 (readable_regcache::cooked_read): Remove cast.
1556 2018-06-09 Tom Tromey <tom@tromey.com>
1558 * source.c (reverse_search_command, forward_search_command): Use
1561 2018-06-09 Tom Tromey <tom@tromey.com>
1563 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1564 (serial_ops_list): Now static, std::vector.
1565 (serial_interface_lookup, serial_add_interface): Update.
1567 2018-06-09 Tom Tromey <tom@tromey.com>
1569 * dwarf2read.c (process_cu_includes): Update.
1570 (process_full_comp_unit): Update.
1571 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1574 2018-06-08 Paul Koning <paul_koning@dell.com>
1578 * python/python.c (do_start_initialization):
1579 Avoid call to internal Python API.
1580 (init__gdb_module): New function.
1582 2018-06-08 Gary Benson <gbenson@redhat.com>
1584 * linux-thread-db.c (valprint.h): New include.
1585 (struct check_thread_db_info): New structure.
1586 (check_thread_db_on_load, tdb_testinfo): New static globals.
1587 (check_thread_db, check_thread_db_callback): New functions.
1588 (try_thread_db_load_1): Run integrity checks if requested.
1589 (maintenance_check_libthread_db): New function.
1590 (_initialize_thread_db): Register "maint check libthread-db"
1591 and "maint set/show check-libthread-db".
1592 * NEWS: Mention the above new commands.
1594 2018-06-08 Tom Tromey <tom@tromey.com>
1596 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1599 2018-06-08 Tom Tromey <tom@tromey.com>
1601 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1603 2018-06-08 Tom Tromey <tom@tromey.com>
1605 * common/btrace-common.h (struct btrace_data): Add constructor,
1606 destructor, move assignment operator.
1607 <empty, clear, fini>: New methods.
1608 <format>: Initialize.
1609 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1610 (btrace_data_empty): Don't declare.
1611 * common/btrace-common.c (btrace_data_init): Remove.
1612 (btrace_data::fini): Rename from btrace_data_fini.
1613 (btrace_data::empty): Rename from btrace_data_empty.
1614 (btrace_data::clear): Rename from btrace_data_clear. Return
1616 * btrace.h (make_cleanup_btrace_data): Don't declare.
1617 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1618 (parse_xml_btrace): Update.
1619 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1620 (maint_btrace_clear_packet_history_cmd): Update.
1622 2018-06-07 Pedro Alves <palves@redhat.com>
1624 * target.h (target_ops) <beneath>: Now a method. All references
1626 (class target_stack): New.
1627 * target.c (g_target_stack): New.
1628 (g_current_top_target): Delete.
1629 (current_top_target): Get the top target out of g_target_stack.
1630 (target_stack::push, target_stack::unpush): New.
1631 (push_target, unpush_target): Reimplement.
1632 (target_is_pushed): Reimplement in terms of g_target_stack.
1633 (target_ops::beneath, target_stack::find_beneath): New.
1635 2018-06-07 Pedro Alves <palves@redhat.com>
1637 * target.h (find_target_beneath): Delete declaration.
1638 * target.c (find_target_beneath): Delete definition.
1639 * aix-thread.c: All callers of find_target_beneath adjusted to
1640 call target_ops::beneath instead.
1641 * bsd-uthread.c: Likewise.
1642 * linux-thread-db.c: Likewise.
1643 * ravenscar-thread.c: Likewise.
1644 * sol-thread.c: Likewise.
1645 * spu-multiarch.c: Likewise.
1647 2018-06-07 Pedro Alves <palves@redhat.com>
1649 * target.h (target_ops) <beneath>: Now a method. All references
1651 (target_ops) <m_beneath>: New.
1652 * target.c (target_ops::beneath): New.
1653 * corelow.c: Adjust all references to target_ops::beneath.
1654 * linux-thread-db.c: Likewise.
1655 * make-target-delegates: Likewise.
1656 * record-btrace.c: Likewise.
1657 * record-full.c: Likewise.
1658 * remote.c: Likewise.
1659 * target.c: Likewise.
1660 * target-delegates.c: Regenerate.
1662 2018-06-07 Pedro Alves <palves@redhat.com>
1664 * target.h (target_stack): Delete.
1665 (current_top_target): Declare function.
1666 * target.c (target_stack): Delete.
1667 (g_current_top_target): New.
1668 (current_top_target): New function.
1669 * auxv.c: Use current_top_target instead of target_stack
1671 * avr-tdep.c: Likewise.
1672 * breakpoint.c: Likewise.
1673 * corefile.c: Likewise.
1674 * elfread.c: Likewise.
1676 * exceptions.c: Likewise.
1677 * frame.c: Likewise.
1678 * gdbarch-selftests.c: Likewise.
1679 * gnu-v3-abi.c: Likewise.
1680 * ia64-tdep.c: Likewise.
1681 * ia64-vms-tdep.c: Likewise.
1682 * infcall.c: Likewise.
1683 * infcmd.c: Likewise.
1684 * infrun.c: Likewise.
1685 * linespec.c: Likewise.
1686 * linux-tdep.c: Likewise.
1687 * minsyms.c: Likewise.
1688 * ppc-linux-nat.c: Likewise.
1689 * ppc-linux-tdep.c: Likewise.
1690 * procfs.c: Likewise.
1691 * regcache.c: Likewise.
1692 * remote.c: Likewise.
1693 * rs6000-tdep.c: Likewise.
1694 * s390-linux-nat.c: Likewise.
1695 * s390-tdep.c: Likewise.
1696 * solib-aix.c: Likewise.
1697 * solib-darwin.c: Likewise.
1698 * solib-dsbt.c: Likewise.
1699 * solib-spu.c: Likewise.
1700 * solib-svr4.c: Likewise.
1701 * solib-target.c: Likewise.
1702 * sparc-tdep.c: Likewise.
1703 * sparc64-tdep.c: Likewise.
1704 * spu-tdep.c: Likewise.
1705 * symfile.c: Likewise.
1706 * symtab.c: Likewise.
1707 * target-descriptions.c: Likewise.
1708 * target-memory.c: Likewise.
1709 * target.c: Likewise.
1710 * target.h: Likewise.
1711 * tracefile-tfile.c: Likewise.
1712 * tracepoint.c: Likewise.
1713 * valops.c: Likewise.
1714 * valprint.c: Likewise.
1715 * value.c: Likewise.
1716 * windows-tdep.c: Likewise.
1717 * mi/mi-main.c: Likewise.
1719 2018-06-07 Tom Tromey <tom@tromey.com>
1721 * valprint.h (build_address_symbolic): Declare.
1722 * printcmd.c (print_address_symbolic): Update.
1723 (build_address_symbolic): Change "name" and "filename" to
1725 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1727 * defs.h (build_address_symbolic): Remove declaration.
1729 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1731 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1732 (aarch64_vnv_type): Add function.
1733 (aarch64_pseudo_register_name): Add V regs for SVE.
1734 (aarch64_pseudo_register_type): Likewise.
1735 (aarch64_pseudo_register_reggroup_p): Likewise.
1736 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1737 (aarch64_pseudo_read_value): Add V regs for SVE.
1738 (aarch64_pseudo_write_2): Use V0 offset for SVE
1739 (aarch64_pseudo_write): Add V regs for SVE.
1740 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1742 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1744 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1745 (sve_vl_from_vq): Likewise.
1747 2018-06-05 Tom Tromey <tom@tromey.com>
1749 * cli/cli-cmds.c (show_version): Update.
1750 * top.c (print_gdb_version): Add "interactive" parameter.
1752 * main.c (captured_main_1): Update.
1753 * top.h (print_gdb_version): Add "interactive" parameter and a
1756 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1758 * common/enum-flags.h: Add trailing semicolon to example in
1761 2018-06-05 Tom Tromey <tom@tromey.com>
1764 * NEWS: Add entry about pager.
1765 * utils.c (pagination_disabled_for_command): New global.
1766 (prompt_for_continue): Allow "c" response to prompt.
1767 (reinitialize_more_filter): Clear
1768 pagination_disabled_for_command.
1769 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1771 2018-06-04 Tom Tromey <tom@tromey.com>
1773 * ada-lang.h (ada_lookup_symbol_list): Update.
1774 * ada-lang.c (resolve_subexp): Update.
1775 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1777 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1778 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1779 results parameter to std::vector.
1780 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1782 * ada-exp.y (block_lookup): Update.
1783 (select_possible_type_sym): Change type of syms. Remove nsyms
1785 (write_var_or_type, write_name_assoc): Update.
1787 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1789 * windows-nat.c (windows_nat_target::xfer_partial): Return
1790 TARGET_XFER_E_IO if we need to delegate to the target beneath
1791 but BENEATH is NULL.
1793 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1795 * Makefile.in (config.status): Add configure.nat as a
1798 2018-06-04 Tom Tromey <tom@tromey.com>
1800 * cp-name-parser.y (cpname_state): Add method declarations.
1801 (HANDLE_QUAL): Update.
1802 (cpname_state::d_grab, cpname_state::fill_comp)
1803 (cpname_state::make_operator, cpname_state::make_dtor)
1804 (cpname_state::make_builtin_type, cpname_state::make_name)
1805 (cpname_state::d_qualify, cpname_state::d_int_type)
1806 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1807 (%union): Move earlier.
1809 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1811 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1813 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1815 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1816 (aarch64_pseudo_write_1): Likewise.
1817 (aarch64_pseudo_read_value): Use helper.
1818 (aarch64_pseudo_write): Likewise.
1820 2018-06-04 Pedro Alves <palves@redhat.com>
1822 * darwin-nat.c (darwin_ops): Delete.
1823 (darwin_attach_pid): Use get_native_target.
1825 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1827 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1828 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1830 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1832 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1833 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1834 (aarch64_gdbarch_init): Check for SVE.
1835 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1837 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1839 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1840 * aarch64-tdep.h (aarch64_read_description): Likewise.
1841 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1842 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1843 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1844 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1845 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1847 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1849 * value.c (value_fetch_lazy_bitfield): New.
1850 (value_fetch_lazy_memory): New.
1851 (value_fetch_lazy_register): New.
1852 (value_fetch_lazy): Factor out to smaller functions.
1854 2018-06-01 Tom Tromey <tom@tromey.com>
1856 * cp-name-parser.y (backslashable, represented): Now const.
1858 2018-06-01 Tom Tromey <tom@tromey.com>
1860 * cp-name-parser.y: Include parser-defs.h.
1861 (parser_fprintf): Remove declaration.
1863 2018-06-01 Tom Tromey <tom@tromey.com>
1865 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1867 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1868 (global_result): Remove globals.
1869 (struct cpname_state): New.
1870 (yyparse): Don't declare.
1871 (yylex, yyerror): Move declarations after %union.
1872 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1873 (make_name): Add state parameter.
1875 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1877 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1879 (yylex): Add lvalp, state parameters.
1880 (yyerror): Add state parameter.
1881 (cp_demangled_name_to_comp): Update.
1883 2018-06-01 Tom Tromey <tom@tromey.com>
1885 * cp-name-parser.y (parser_fprintf): Declare.
1886 (GDB_YY_REMAP_PREFIX): Define.
1887 Include yy-remap.h. Don't redefine yy* identifiers.
1889 2018-06-01 Tom Tromey <tom@tromey.com>
1891 * python/py-type.c (typy_legacy_template_argument): Update.
1892 * cp-support.h (cp_demangled_name_to_comp): Update.
1893 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1894 parameter to be a "std::string *".
1897 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1899 * ada-lex.l: Include "diagnostics.h" instead of
1900 "common/diagnostics.h".
1901 * unittests/environ-selftests.c: Likewise.
1902 * common/diagnostics.h: Moved to ../include.
1904 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1906 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1907 to language_mode_manual while calling breakpoint_re_set_one.
1909 2018-06-01 Tom Tromey <tom@tromey.com>
1911 * valops.c (value_cast_structs, destructor_name_p): Update.
1912 * symtab.c (gdb_mangle_name): Update.
1913 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1915 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1916 (pascal_object_print_value_fields, pascal_object_print_value):
1918 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1919 * linespec.c (find_methods): Update.
1920 * gdbtypes.h (type_name_no_tag): Remove.
1921 (type_name_or_error): Rename from type_name_no_tag_or_error.
1922 * gdbtypes.c (type_name_no_tag): Remove.
1923 (type_name_or_error): Rename from type_name_no_tag_or_error.
1924 (lookup_struct_elt_type, check_typedef): Update.
1925 * expprint.c (print_subexp_standard): Update.
1926 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1927 * d-namespace.c (d_lookup_nested_symbol): Update.
1928 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1929 (cp_print_class_member): Update.
1930 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1931 * completer.c (add_struct_fields): Update.
1932 * c-typeprint.c (cp_type_print_derivation_info)
1933 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1935 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1936 (ada_prefer_type, ada_is_exception_sym): Update.
1938 2018-06-01 Tom Tromey <tom@tromey.com>
1940 * valops.c (enum_constant_from_type, value_namespace_elt)
1941 (value_maybe_namespace_elt): Update.
1942 * valarith.c (find_size_for_pointer_math): Update.
1943 * target-descriptions.c (make_gdb_type): Update.
1944 * symmisc.c (print_symbol): Update.
1945 * stabsread.c (define_symbol, read_type)
1946 (complain_about_struct_wipeout, add_undefined_type)
1947 (cleanup_undefined_types_1): Update.
1948 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1949 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1950 (rust_internal_print_type, rust_composite_type)
1951 (rust_evaluate_funcall, rust_evaluate_subexp)
1952 (rust_inclusive_range_type_p): Update.
1953 * python/py-type.c (typy_get_tag): Update.
1954 * p-typeprint.c (pascal_type_print_base): Update.
1955 * mdebugread.c (parse_symbol, parse_type): Update.
1956 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1958 * guile/scm-type.c (gdbscm_type_tag): Update.
1959 * go-lang.c (sixg_string_p): Update.
1960 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1962 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1963 (TYPE_TAG_NAME): Remove.
1964 * gdbtypes.c (type_name_no_tag): Simplify.
1965 (check_typedef, check_types_equal, recursive_dump_type)
1966 (copy_type_recursive, arch_composite_type): Update.
1967 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1968 in summary mode when needed.
1969 * eval.c (evaluate_funcall): Update.
1970 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1971 (process_structure_scope, read_enumeration_type)
1972 (read_namespace_type, read_module_type, determine_prefix): Update.
1973 * cp-support.c (inspect_type): Update.
1974 * coffread.c (process_coff_symbol, decode_base_type): Update.
1975 * c-varobj.c (c_is_path_expr_parent): Update.
1976 * c-typeprint.c (c_type_print_base_struct_union): Update.
1977 (c_type_print_base_1): Update. Print struct/class/union/enum in
1978 summary when using C language.
1979 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1980 (gen_maybe_namespace_elt): Update.
1981 * ada-lang.c (ada_type_name): Simplify.
1982 (empty_record, ada_template_to_fixed_record_type_1)
1983 (template_to_static_fixed_type)
1984 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1986 2018-06-01 Tom Tromey <tom@tromey.com>
1988 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1990 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1991 (c_print_type): Update.
1992 (c_print_type): New overload.
1993 (c_type_print_varspec_prefix, c_type_print_args)
1994 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1995 (c_type_print_base_struct_union, c_type_print_base_1)
1996 (cp_type_print_method_args): Add "language" parameter.
1997 (c_type_print_base): Update.
1998 * c-lang.h (c_print_type): Add new overload.
2000 2018-06-01 Tom Tromey <tom@tromey.com>
2002 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2003 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2005 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2007 * aarch64-tdep.c (aarch64_sve_register_names): New const
2009 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2010 (AARCH64_SVE_Z_REGS_NUM): New define.
2011 (AARCH64_SVE_P_REGS_NUM): Likewise.
2012 (AARCH64_SVE_NUM_REGS): Likewise.
2014 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2016 * nat/linux-ptrace.h [__alpha__]
2017 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2020 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2022 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2023 the endianness selected.
2024 * NEWS: Document `set endian auto' mode operation update.
2026 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2028 * Makefile.in: Add new header.
2029 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2030 (sve_vl_from_vg): Likewise.
2031 (sve_vq_from_vl): Likewise.
2032 (sve_vl_from_vq): Likewise.
2033 (sve_vq_from_vg): Likewise.
2034 (sve_vg_from_vq): Likewise.
2035 * configure.nat: Add new c file.
2036 * nat/aarch64-sve-linux-ptrace.c: New file.
2037 * nat/aarch64-sve-linux-ptrace.h: New file.
2039 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2041 * aarch64-linux-nat.c (aarch64_linux_read_description):
2043 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2045 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2046 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2047 (aarch64_gdbarch_init): Add parmeter zero.
2048 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2049 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2050 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2052 * doc/gdb.texinfo: Describe SVE feature
2053 * features/aarch64-sve.c: New file.
2055 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2058 * gdbarch.sh (significant_addr_bit): Default to zero when
2059 not set by target architecture.
2060 * gdbarch.c: Re-generated.
2061 * utils.c (address_significant): Update.
2063 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2065 * stack.c (func_command): Remove trailing newline in call to error.
2067 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2069 * regcache.h (regcache_raw_collect): Remove, update callers to
2070 use regcache::raw_collect.
2071 * regcache.c (regcache_raw_collect): Remove.
2073 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2075 * regcache.h (regcache_raw_supply): Remove, update callers to
2076 use detached_regcache::raw_supply.
2077 * regcache.c (regcache_raw_supply): Remove.
2079 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2081 * regcache.h (regcache_cooked_write_part): Remove, update
2082 callers to use regcache::cooked_write_part.
2083 * regcache.c (regcache_cooked_write_part): Remove.
2085 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2087 * regcache.h (regcache_cooked_read_part): Remove, update callers
2088 to use readable_regcache::cooked_read_part.
2089 * regcache.c (regcache_cooked_read_part): Remove.
2091 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2093 * regcache.h (regcache_cooked_read_value): Remove, update
2094 callers to use readable_regcache::cooked_read_value.
2095 * regcache.c (regcache_cooked_read_value): Remove.
2097 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2099 * regcache.h (regcache_cooked_write): Remove, update callers to
2100 use regcache::cooked_write.
2101 * regcache.c (regcache_cooked_write): Remove.
2103 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2105 * regcache.h (regcache_invalidate): Remove, update callers to
2106 use detached_regcache::invalidate instead.
2107 * regcache.c (regcache_invalidate): Remove.
2109 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2111 * regcache.h (regcache_raw_write_part): Remove, update callers
2112 to use regcache::raw_write_part instead.
2113 * regcache.c (regcache_raw_write_part): Remove.
2115 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2117 * regcache.h (regcache_raw_read_part): Remove, update callers to
2118 use readable_regcache::raw_read_part instead.
2119 * regcache.c (regcache_raw_read_part): Remove.
2121 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2123 * regcache.h (regcache_cooked_read): Remove, update callers to
2124 use readable_regcache::cooked_read instead.
2125 * regcache.c (regcache_cooked_read): Remove.
2127 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2129 * regcache.h (regcache_raw_write): Remove, update callers to use
2130 regcache::raw_write instead.
2131 * regcache.c (regcache_raw_write): Remove.
2133 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2135 * regcache.h (regcache_raw_read): Remove, update callers to use
2136 readable_regcache::raw_read instead.
2137 * regcache.c (regcache_raw_read): Remove.
2139 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2141 * regcache.h (regcache_raw_update): Remove, update callers to
2142 use readable_regcache::raw_update instead.
2143 * regcache.c (regcache_raw_update): Remove.
2145 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2147 * regcache.h (regcache_register_status): Remove, update callers
2148 to use reg_buffer::get_register_status directly instead.
2149 * regcache.c (regcache_register_status): Remove.
2151 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2153 * regcache.h (regcache_get_ptid): Remove, update all callers to
2154 call regcache::ptid instead.
2155 * regcache.c (regcache_get_ptid): Remove.
2157 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2159 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2161 2018-05-30 Pedro Alves <palves@redhat.com>
2163 * common/common-exceptions.h (exception_rethrow): Use
2166 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2168 * breakpoint.c (print_solib_event, check_status_catch_solib):
2169 Remove struct keyword in range-based for loops.
2170 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2171 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2173 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2175 * symfile.c (addr_info_make_relative): Likewise.
2176 * thread.c (value_in_thread_stack_temporaries): Likewise.
2178 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2181 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2182 aggregate type to get its real type before accessing it.
2184 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2186 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2187 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2188 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2189 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2190 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2191 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2192 * printcmd.c (info_address_command): Likewise.
2194 2018-05-29 Tom Tromey <tom@tromey.com>
2196 * windows-nat.c (handle_exception): Update fall-through comment.
2198 2018-05-29 Tom Tromey <tom@tromey.com>
2200 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2201 (struct program_space) <added_solibs>: Now a std::vector.
2202 * breakpoint.c (print_solib_event): Update.
2203 (check_status_catch_solib): Update.
2204 * progspace.c (clear_program_space_solib_cache): Update.
2205 * solib.c (update_solib_list): Update.
2207 2018-05-29 Tom Tromey <tom@tromey.com>
2209 * python/py-type.c (typy_richcompare): Update.
2210 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2211 * gdbtypes.h (types_deeply_equal): Return bool.
2212 (types_equal): Likewise.
2213 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2215 (check_types_equal): Change worklist to std::vector. Return
2217 (struct type_equality_entry): Add constructor.
2218 (compare_maybe_null_strings): Return bool.
2219 (check_types_worklist): Return bool. Change worklist to
2221 (types_deeply_equal): Use std::vector.
2222 (types_equal): Return bool.
2223 (compare_maybe_null_strings): Simplify.
2225 2018-05-29 Tom Tromey <tom@tromey.com>
2227 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2229 2018-05-29 Tom Tromey <tom@tromey.com>
2231 * objc-lang.h: Don't include cp-support.h.
2232 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2235 2018-05-27 Tom Tromey <tom@tromey.com>
2237 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2239 2018-05-25 Tom Tromey <tom@tromey.com>
2241 * value.c (value::location): Initialize.
2243 2018-05-25 Tom Tromey <tom@tromey.com>
2245 * dbxread.c (init_bincl_list): Remove.
2246 (bincl_list): Now a std::vector.
2247 (bincls_allocated, next_bincl): Remove.
2248 (free_bincl_list, do_free_bincl_list_cleanup)
2249 (make_cleanup_free_bincl_list): Remove.
2250 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2252 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2253 (struct header_file_location): Add constructor.
2254 (add_bincl_to_list): Remove.
2256 2018-05-25 Tom Tromey <tom@tromey.com>
2258 * tui/tui.c (tui_enable): Update.
2259 * mi/mi-interp.c (mi_interp::init): Update.
2260 * interps.h (class interp) <name>: New method.
2261 <m_name>: Rename from name.
2262 (~scoped_restore_interp): Update.
2263 * interps.c (interp::interp): Update.
2264 (interp_add, interp_set, interp_lookup_existing)
2265 (current_interp_named_p): Update.
2267 2018-05-25 Tom Tromey <tom@tromey.com>
2269 * interps.c (interp_name): Remove.
2270 * mi/mi-interp.c (mi_interp::init): Update.
2271 * interps.h (interp_name): Remove.
2272 (~scoped_restore_interp): Update.
2273 * tui/tui.c (tui_enable): Update.
2275 2018-05-25 Tom Tromey <tom@tromey.com>
2277 * utils.c (fputs_maybe_filtered): Update.
2278 * linespec.c (decode_line_full): Update.
2279 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2280 (mi_print_breakpoint_for_event, mi_solib_loaded)
2281 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2282 (mi_user_selected_context_changed): Update.
2283 * mi/mi-main.c (mi_execute_command): Update.
2284 * cli/cli-script.c (execute_control_command): Update.
2285 * python/python.c (execute_gdb_command): Update.
2286 * solib.c (info_sharedlibrary_command): Update.
2287 * interps.c (interp_ui_out): Remove.
2288 * interps.h (interp_ui_out): Remove.
2290 2018-05-25 Tom Tromey <tom@tromey.com>
2292 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2293 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2294 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2296 2018-05-25 Tom Tromey <tom@tromey.com>
2298 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2299 * interps.c (interp_exec): Use scoped_restore.
2301 2018-05-25 Tom Tromey <tom@tromey.com>
2303 * remote.c (remote_target::remote_file_get): Use
2305 (remote_target::remote_file_put): Likewise.
2307 2018-05-25 Tom Tromey <tom@tromey.com>
2309 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2311 (get_pe_section_index, add_pe_exported_sym): Update.
2312 (read_pe_exported_syms): Use gdb::def_vector.
2314 2018-05-25 Tom Tromey <tom@tromey.com>
2316 * frame.c (remove_prev_frame): Remove.
2317 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2319 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2321 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2323 * mips-linux-nat.c (supply_fpregset): Always call
2324 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2325 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2326 `mips_fill_fpregset'.
2327 * mips-linux-tdep.c (mips_supply_fpregset)
2328 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2329 (mips_fill_fpregset_wrapper): Remove functions.
2330 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2331 (mips_linux_fpregset): Remove variable.
2332 (mips_linux_iterate_over_regset_sections): Use
2333 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2334 (mips_linux_o32_sigframe_init): Remove comment.
2336 2018-05-25 Pedro Alves <palves@redhat.com>
2338 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2339 (struct readahead_cache, struct packet_reg, struct
2340 remote_arch_state, class remote_state): Move higher up in the
2342 (remote_target::m_remote_state): Now an object instead of a pointer.
2343 (remote_target::get_remote_state): Adjust.
2345 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2347 * stack.c (select_and_print_frame): Delete.
2348 (struct function_bounds): Move struct within function.
2349 (func_command): Most content moved into new function
2350 find_frame_for_function, use new function, print result, add
2352 (find_frame_for_function): New function, now returns a result.
2354 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2356 * stack.c (iterate_over_block_arg_vars): Fix comment.
2357 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2359 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2363 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2365 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2367 * frame.h (class scoped_restore_selected_frame): New class.
2368 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2369 of any exception, use scoped_restore_selected_frame to restore the
2372 2018-05-24 Pedro Alves <palves@redhat.com>
2374 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2377 2018-05-23 Tom Tromey <tom@tromey.com>
2379 * complaints.c (struct complaints): Remove.
2380 (symfile_complaint_book): Remove.
2381 (series): New global.
2382 (complaint_internal): Update.
2383 (clear_complaints): Update.
2385 2018-05-23 Tom Tromey <tom@tromey.com>
2387 * complaints.c (counters): New global.
2388 (struct complain): Remove.
2389 (struct complaints) <root>: Remove.
2390 (complaint_sentinel): Remove.
2391 (symfile_complaint_book): Update.
2392 (find_complaint) Remove.
2393 (complaint_internal, clear_complaints): Update.
2395 2018-05-23 Tom Tromey <tom@tromey.com>
2397 * complaints.c (struct complain) <file, line>: Remove.
2398 (find_complaint): Remove file, line parameters.
2399 (complaint_internal): Update.
2401 2018-05-23 Tom Tromey <tom@tromey.com>
2403 * complaints.c (vcomplaint): Remove.
2404 (complaint_internal) Merge in contents of vcomplaint.
2406 2018-05-23 Tom Tromey <tom@tromey.com>
2408 * complaints.c (struct complaints) <explanation>: Remove.
2409 (symfile_explanations): Remove.
2410 (symfile_complaint_book): Update.
2411 (vcomplaint): Update.
2412 (struct explanation): Remove.
2414 2018-05-23 Tom Tromey <tom@tromey.com>
2416 * complaints.c (symfile_complaints): Remove.
2417 (complaint_internal): Remove "complaints" parameter.
2418 (clear_complaints, vcomplaint): Remove "c" parameter.
2419 (get_complaints): Remove.
2420 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2421 (dwarf2_debug_line_missing_file_complaint)
2422 (dwarf2_debug_line_missing_end_sequence_complaint)
2423 (dwarf2_complex_location_expr_complaint)
2424 (dwarf2_const_value_length_mismatch_complaint)
2425 (dwarf2_section_buffer_overflow_complaint)
2426 (dwarf2_macro_malformed_definition_complaint)
2427 (dwarf2_invalid_attrib_class_complaint)
2428 (create_addrmap_from_index, dw2_symtab_iter_next)
2429 (dw2_expand_marked_cus)
2430 (dw2_debug_names_iterator::find_vec_in_debug_names)
2431 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2432 (create_debug_type_hash_table, init_cutu_and_read_dies)
2433 (partial_die_parent_scope, add_partial_enumeration)
2434 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2435 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2436 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2437 (create_cus_hash_table, create_dwp_hash_table)
2438 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2439 (dwarf2_rnglists_process, dwarf2_ranges_process)
2440 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2441 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2442 (handle_struct_member_die, process_structure_scope)
2443 (read_array_type, read_common_block, read_module_type)
2444 (read_tag_pointer_type, read_typedef, read_base_type)
2445 (read_subrange_type, load_partial_dies, partial_die_info::read)
2446 (partial_die_info::read, partial_die_info::read)
2447 (partial_die_info::read, read_checked_initial_length_and_offset)
2448 (dwarf2_string_attr, read_formatted_entries)
2449 (dwarf_decode_line_header)
2450 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2451 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2452 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2453 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2454 (get_signatured_type, get_DW_AT_signature_type)
2455 (decode_locdesc, file_file_name, consume_improper_spaces)
2456 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2457 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2458 (dwarf2_symbol_mark_computed, set_die_type)
2459 (read_attribute_value): Update.
2460 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2462 * dbxread.c (unknown_symtype_complaint)
2463 (lbrac_mismatch_complaint, repeated_header_complaint)
2464 (set_namestring, function_outside_compilation_unit_complaint)
2465 (read_dbx_symtab, process_one_symbol): Update.
2466 * gdbtypes.c (stub_noname_complaint): Update.
2467 * windows-nat.c (handle_unload_dll): Update.
2468 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2469 (decode_base_type): Update.
2470 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2471 (eb_complaint, record_include_begin, record_include_end)
2472 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2473 (process_xcoff_symbol, read_symbol)
2474 (function_outside_compilation_unit_complaint)
2475 (scan_xcoff_symtab): Update.
2476 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2477 * buildsym.c (finish_block_internal, make_blockvector)
2478 (end_symtab_get_static_block, augment_type_symtab): Update.
2479 * dtrace-probe.c (dtrace_process_dof)
2480 (dtrace_static_probe_ops::get_probes): Update.
2481 * complaints.h (struct complaint): Don't declare.
2482 (symfile_complaints): Remove.
2483 (complaint_internal): Remove "complaints" parameter.
2484 (complaint): Likewise.
2485 (clear_complaints): Likewise.
2486 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2487 (reread_symbols): Update.
2488 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2489 (dwarf2_frame_cache, decode_frame_entry): Update.
2490 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2491 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2492 (info_selectors_command): Update.
2493 * macrotab.c (macro_include, check_for_redefinition)
2494 (macro_undef): Update.
2495 * objfiles.c (filter_overlapping_sections): Update.
2496 * stabsread.c (invalid_cpp_abbrev_complaint)
2497 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2498 (define_symbol, error_type, read_type, rs6000_builtin_type)
2499 (stabs_method_name_from_physname, read_member_functions)
2500 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2501 (attach_fields_to_type, complain_about_struct_wipeout)
2502 (read_range_type, read_args, common_block_start)
2503 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2505 * mdebugread.c (index_complaint, unknown_ext_complaint)
2506 (basic_type_complaint, bad_tag_guess_complaint)
2507 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2508 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2509 (parse_procedure, parse_lines)
2510 (function_outside_compilation_unit_complaint)
2511 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2512 (bad_tag_guess_complaint, reg_value_complaint): Update.
2513 * cp-support.c (demangled_name_complaint): Update.
2514 * macroscope.c (sal_macro_scope): Update.
2515 * dwarf-index-write.c (class debug_names): Update.
2517 2018-05-23 Tom Tromey <tom@tromey.com>
2519 * complaints.c (clear_complaints): Remove "noisy" parameter.
2520 * complaints.h (clear_complaints): Update.
2521 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2522 (reread_symbols): Update.
2524 2018-05-23 Tom Tromey <tom@tromey.com>
2526 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2528 (vcomplaint, clear_complaints): Update.
2529 (symfile_explanations): Remove some messages.
2531 2018-05-23 Tom Tromey <tom@tromey.com>
2533 * complaints.c (internal_complaint): Remove.
2534 * complaints.h (internal_complaint): Remove.
2536 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2538 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2540 2018-05-22 Pedro Alves <palves@redhat.com>
2542 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2543 (remote_fileio_badfd, remote_fileio_return_errno)
2544 (remote_fileio_return_success, remote_fileio_func_open)
2545 (remote_fileio_func_open, remote_fileio_func_close)
2546 (remote_fileio_func_read, remote_fileio_func_write)
2547 (remote_fileio_func_lseek, remote_fileio_func_rename)
2548 (remote_fileio_func_unlink, remote_fileio_func_stat)
2549 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2550 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2551 remote_target parameter.
2552 (remote_fio_func_map) <func>: Add remote_target parameter.
2553 (do_remote_fileio_request, remote_fileio_request):
2554 * remote-fileio.h (remote_fileio_request):
2555 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2556 remote_target parameter.
2557 (remote_notif_process, handle_notification): Adjust to pass down
2559 (remote_notif_state_allocate): Add remote_target parameter. Save
2561 * remote-notif.h (struct remote_target): Forward declare.
2562 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2563 remote_target parameter.
2564 (struct remote_notif_state) <remote>: New field.
2565 (remote_notif_ack, remote_notif_parse): Add remote_target
2567 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2568 remote_target parameter.
2569 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2570 (threads_listing_context, rmt_thread_action, protocol_feature)
2571 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2572 (packet_result, struct threads_listing_context, remote_state):
2573 Move definitions and declarations higher up.
2574 (remote_target) <~remote_target>: Declare.
2575 (remote_download_command_source, remote_file_put, remote_file_get)
2576 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2577 (remote_hostio_pread_vFile, remote_hostio_send_command)
2578 (remote_hostio_set_filesystem, remote_hostio_open)
2579 (remote_hostio_close, remote_hostio_unlink, remote_state)
2580 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2581 (get_memory_write_packet_size, get_memory_read_packet_size)
2582 (append_pending_thread_resumptions, remote_detach_1)
2583 (append_resumption, remote_resume_with_vcont)
2584 (add_current_inferior_and_thread, wait_ns, wait_as)
2585 (process_stop_reply, remote_notice_new_inferior)
2586 (process_initial_stop_replies, remote_add_thread)
2587 (btrace_sync_conf, remote_btrace_maybe_reopen)
2588 (remove_new_fork_children, kill_new_fork_children)
2589 (discard_pending_stop_replies, stop_reply_queue_length)
2590 (check_pending_events_prevent_wildcard_vcont)
2591 (discard_pending_stop_replies_in_queue, stop_reply)
2592 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2593 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2594 (remote_interrupt_as, remote_interrupt_ns)
2595 (remote_get_noisy_reply, remote_query_attached)
2596 (remote_add_inferior, remote_current_thread, get_current_thread)
2597 (set_thread, set_general_thread, set_continue_thread)
2598 (set_general_process, write_ptid)
2599 (remote_unpack_thread_info_response, remote_get_threadinfo)
2600 (parse_threadlist_response, remote_get_threadlist)
2601 (remote_threadlist_iterator, remote_get_threads_with_ql)
2602 (remote_get_threads_with_qxfer)
2603 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2604 (get_offsets, remote_check_symbols, remote_supported_packet)
2605 (remote_query_supported, remote_packet_size)
2606 (remote_serial_quit_handler, remote_detach_pid)
2607 (remote_vcont_probe, remote_resume_with_hc)
2608 (send_interrupt_sequence, interrupt_query)
2609 (remote_notif_get_pending_events, fetch_register_using_p)
2610 (send_g_packet, process_g_packet, fetch_registers_using_g)
2611 (store_register_using_P, store_registers_using_G)
2612 (set_remote_traceframe, check_binary_download)
2613 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2614 (remote_xfer_live_readonly_partial, remote_read_bytes)
2615 (remote_send_printf, remote_flash_write, readchar)
2616 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2617 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2618 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2619 (extended_remote_disable_randomization, extended_remote_run)
2620 (send_environment_packet, extended_remote_environment_support)
2621 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2622 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2623 (packet_command): Now methods of ...
2624 (remote_target): ... this class.
2625 (m_remote_state) <remote_target>: New field.
2626 (struct remote_state) <stop_reply_queue,
2627 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2629 (remote_state::remote_state): Allocate stop_reply_queue.
2630 (remote_state): Delete global.
2631 (get_remote_state_raw): Delete.
2632 (remote_target::get_remote_state): Allocate m_remote_state on
2634 (get_current_remote_target): New.
2635 (remote_ops, extended_remote_ops): Delete.
2636 (wait_forever_enabled_p, remote_async_inferior_event_token):
2637 Delete, moved to struct remote_state.
2638 (remote_target::close): Delete self. Destruction bits split to
2640 (remote_target::~remote_target): ... this.
2641 (show_memory_packet_size): Adjust to use
2642 get_current_remote_target.
2643 (struct protocol_feature) <func>: Add remote_target parameter.
2644 All callers adjusted.
2645 (curr_quit_handler_target): New.
2646 (remote_serial_quit_handler): Reimplement.
2647 (remote_target::open_1): Adjust to use get_current_remote_target.
2648 Heap-allocate remote_target/extended_remote_target instances.
2649 (vcont_builder::vcont_builder): Add remote_target parameter, and
2650 save it in m_remote. All callers adjusted.
2651 (vcont_builder::m_remote): New field.
2652 (vcont_builder::restart, vcont_builder::flush)
2653 (vcont_builder::push_action): Use it.
2654 (remote_target::commit_resume): Use it.
2655 (struct queue_iter_param) <remote>: New field.
2656 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2657 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2658 (check_pending_event_prevents_wildcard_vcont_callback)
2659 (remote_target::check_pending_events_prevent_wildcard_vcont)
2660 (remote_target::discard_pending_stop_replies)
2661 (remote_target::discard_pending_stop_replies_in_queue)
2662 (remote_target::remote_notif_remove_queued_reply): Fill in
2664 (remote_notif_get_pending_events): New.
2665 (remote_target::readchar, remote_target::remote_serial_write):
2666 Save/restore curr_quit_handler_target.
2668 (kill_new_fork_children): Fill in 'remote' field.
2669 (packet_command): Use get_current_remote_target, defer to
2670 remote_target method of same name.
2671 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2672 parameter, and save it in m_remote. All callers adjusted.
2673 (scoped_remote_fd::release): Use m_remote.
2674 (scoped_remote_fd::m_remote): New field.
2675 (remote_file_put, remote_file_get, remote_file_delete): Use
2676 get_current_remote_target, defer to remote_target method of same
2678 (remote_btrace_reset): Add remote_state paremeter. Update all
2680 (remote_async_inferior_event_handler). Pass down 'data'.
2681 (remote_new_objfile): Use get_current_remote_target.
2682 (remote_target::vcont_r_supported): New.
2683 (set_range_stepping): Use get_current_remote_target and
2684 remote_target::vcont_r_supported.
2685 (_initialize_remote): Don't allocate 'remote_state' and
2686 'stop_reply_queue' globals.
2687 * remote.h (struct remote_target): Forward declare.
2688 (getpkt, putpkt, remote_notif_get_pending_events): Add
2689 'remote_target' parameter.
2691 2018-05-22 Pedro Alves <palves@redhat.com>
2693 * remote.c (vcont_builder): Now a class. Make all data members
2695 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2697 (vcont_builder_restart): Rename to ...
2698 (vcont_builder::restart): ... this.
2699 (vcont_builder_flush): Rename to ...
2700 (vcont_builder::flush): ... this.
2701 (vcont_builder_push_action): Rename to ...
2702 (vcont_builder::push_action): ... this.
2703 (remote_target::commit_resume): Adjust.
2705 2018-05-22 Pedro Alves <palves@redhat.com>
2707 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2708 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2709 (get_fixed_memory_packet_size): New.
2710 (get_memory_packet_size): Use it.
2711 (set_memory_packet_size): Don't override the config size with
2712 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2713 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2714 Don't refer to get_memory_packet_size if not connected to a remote
2715 target. Show "(default)" if configured size is 0.
2717 2018-05-22 Pedro Alves <palves@redhat.com>
2719 * remote.c (remote_target::mourn_inferior): Move
2720 discard_pending_stop_replies call here from ...
2721 (_initialize_remote): ... here.
2723 2018-05-22 Pedro Alves <palves@redhat.com>
2725 * remote.c (compare_section_command): Remove set_general_process
2728 2018-05-22 Pedro Alves <palves@redhat.com>
2730 * remote.c (struct packet_reg, struct remote_arch_state):
2731 Move higher up in the file.
2732 (remote_state) <m_arch_states>: Store remote_arch_state values
2733 instead of remote_arch_state pointers.
2734 (remote_state::get_remote_arch_state): Adjust.
2736 2018-05-22 Pedro Alves <palves@redhat.com>
2738 * remote.c: Include <unordered_map>.
2739 (remote_state): Now a class.
2740 (remote_state) <get_remote_arch_state>: Declare method.
2741 <get_remote_arch_state>: New field.
2742 (remote_arch_state) <remote_arch_state>: Declare ctor.
2743 <regs>: Now a unique_ptr.
2744 (remote_gdbarch_data_handle): Delete.
2745 (get_remote_arch_state): Delete.
2746 (remote_state::get_remote_arch_state): New.
2747 (get_remote_state): Adjust to call remote_state's
2748 get_remote_arch_state method.
2749 (init_remote_state): Delete, bits factored out to ...
2750 (remote_arch_state::remote_arch_state): ... this new method.
2751 (get_remote_packet_size, get_memory_packet_size)
2752 (process_g_packet, remote_target::fetch_registers)
2753 (remote_target::prepare_to_store, store_registers_using_G)
2754 (remote_target::store_registers, remote_target::get_trace_status):
2755 Adjust to call remote_state's method.
2756 (_initialize_remote): Remove reference to
2757 remote_gdbarch_data_handle.
2759 2018-05-22 Pedro Alves <palves@redhat.com>
2761 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2762 pread>: New method declarations.
2763 (remote_target::open_1): Adjust.
2764 (readahead_cache_invalidate): Rename to ...
2765 (readahead_cache::invalidate): ... this, and adjust to be a class
2767 (readahead_cache_invalidate_fd): Rename to ...
2768 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2770 (remote_hostio_pwrite): Adjust.
2771 (remote_hostio_pread_from_cache): Rename to ...
2772 (readahead_cache::pread): ... this, and adjust to be a class
2774 (remote_hostio_close): Adjust.
2776 2018-05-22 Pedro Alves <palves@redhat.com>
2778 * remote.c (remote_hostio_close_cleanup): Delete.
2779 (class scoped_remote_fd): New.
2780 (remote_file_put, remote_file_get): Use it.
2782 2018-05-22 Pedro Alves <palves@redhat.com>
2784 (struct vCont_action_support): Use bool and initialize all fields.
2785 (struct readahead_cache): Initialize all fields.
2786 (remote_state): Use bool and initialize all fields.
2787 (remote_state::remote_state, remote_state::~remote_state): New.
2788 (new_remote_state): Delete.
2789 (_initialize_remote): Use new to allocate remote_state.
2791 2018-05-22 Pedro Alves <palves@redhat.com>
2795 * c-exp.y: Include "c-support.h".
2796 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2797 of tolower. Use c_ident_is_alpha to scan names.
2798 * c-lang.c: Include "c-support.h".
2799 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2800 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2801 * c-support.h: New file, with bits factored out from ...
2802 * cp-name-parser.y: ... this file.
2803 Include "c-support.h".
2804 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2805 c-support.h and renamed.
2806 (symbol_end, yylex): Adjust.
2808 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2810 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2811 parameter type to CORE_ADDR.
2812 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2813 parameter type in declaration to CORE_ADDR.
2814 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2815 target_auxv_search to get AT_HWCAP and use the result to get the
2817 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2818 to CORE_ADDR. Remove the cast of the return value to unsigned
2819 long. Fix error predicate of target_auxv_search.
2820 (ppc_linux_nat_target::read_description): Change the type of the
2821 hwcap variable to CORE_ADDR.
2823 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2825 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2826 if the size of fpscr is larger than 32 bits.
2828 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2830 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2831 (ppc32_linux_vsxregmap): New global.
2832 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2833 regcache_supply_regset, and regcache_collect_regset.
2834 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2835 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2836 (fetch_vsx_register, store_vsx_register): Remove.
2837 (fetch_vsx_registers): Add regno parameter. Get regset using
2838 ppc_linux_vsxregset. Use regset to supply registers.
2839 (store_vsx_registers): Add regno parameter. Get regset using
2840 ppc_linux_vsxregset. Use regset to collect registers.
2841 (fetch_register): Call fetch_vsx_registers instead of
2843 (store_register): Call store_vsx_registers instead of
2845 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2846 new regno parameter.
2847 (store_ppc_registers): Call store_vsx_registers with -1 for the
2848 new regno parameter.
2849 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2850 (ppc_collect_vsxregset): Remove.
2852 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2854 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2856 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2857 for vector register offset fields.
2858 (ppc64_fbsd_reg_offsets): Likewise.
2859 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2860 to vector register offset fields.
2861 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2862 to vector register offset fields.
2863 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2864 vector register offset fields.
2865 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2866 initializers for vector register offset fields.
2867 (rs6000_aix64_reg_offsets): Likewise.
2868 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2869 (ppc_supply_vrregset): Remove.
2870 (ppc_collect_vrregset): Remove.
2871 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2872 (ppc_linux_vrregset) : New function.
2873 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2874 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2875 (ppc32_linux_vrregset): Remove.
2876 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2877 and use result instead of ppc32_linux_vrregset.
2878 (ppc32_linux_reg_offsets): Remove initializers for vector register
2880 (ppc64_linux_reg_offsets): Likewise.
2881 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2882 * ppc-linux-nat.c: Include regset.h.
2883 (gdb_vrregset_t): Adjust comment to account for little-endian
2885 (supply_vrregset, fill_vrregset): Remove.
2886 (fetch_altivec_register, store_altivec_register): Remove.
2887 (fetch_altivec_registers): Add regno parameter. Get regset using
2888 ppc_linux_vrregset. Use regset to supply registers.
2889 (store_altivec_registers): Add regno parameter. Get regset using
2890 ppc_linux_vrregset. Use regset to collect registers.
2891 (fetch_register): Call fetch_altivec_registers instead of
2892 fetch_altivec_register.
2893 (store_register): Call store_altivec_registers instead of
2894 store_altivec_register.
2895 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2896 the new regno parameter.
2897 (store_ppc_registers): Call store_altivec_registers with -1 for
2898 the new regno parameter.
2900 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2902 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2903 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2904 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2905 (gdb_vrregset_t): Change array type size to
2906 PPC_LINUX_SIZEOF_VRREGSET.
2907 (gdb_vsxregset_t): Change array type size to
2908 PPC_LINUX_SIZEOF_VSXREGSET.
2909 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2910 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2911 PPC_LINUX_SIZEOF_VSXREGSET.
2913 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2915 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2916 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2918 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2919 ppc_linux_target_wordsize with tid.
2920 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2922 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2923 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2924 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2925 tid parameter. Remove static specifier.
2926 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2927 (ppc_linux_target_wordsize): New declaration.
2929 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2931 * arch/ppc-linux-common.c: New file.
2932 * arch/ppc-linux-common.h: New file.
2933 * arch/ppc-linux-tdesc.h: New file.
2934 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2935 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2936 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2937 arch/ppc-linux-tdesc.h.
2938 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2939 arch/ppc-linux-tdesc.h.
2940 (ppc_linux_nat_target::read_description): Remove target
2941 description matching code. Fill a ppc_linux_features struct and
2942 call ppc_linux_match_description with it. Move comment about ISA
2943 2.05 to ppc-linux-common.c.
2944 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2945 arch/ppc-linux-tdesc.h.
2946 (ppc_linux_core_read_description): Remove target description
2947 matching code. Fill a ppc_linux_features struct and call
2948 ppc_linux_match_description with it.
2949 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2950 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2951 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2952 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2953 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2954 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2955 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2956 (tdesc_powerpc_e500l): Remove.
2958 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2960 * ada-lang.c (catch_assert_command): Pass empty string instead
2961 of NULL for excep_string argument.
2963 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2965 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2966 the width of the requested register exceeds the width of the
2969 2018-05-21 Tom Tromey <tom@tromey.com>
2971 * printcmd.c (output_command): Remove.
2972 (output_command_const): Rename to output_command.
2973 * valprint.h (output_command): Rename from output_command_const.
2974 * tracepoint.c (trace_dump_actions): Call output_command.
2976 2018-05-21 Tom Tromey <tom@tromey.com>
2978 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2979 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2980 * ada-lang.h (create_ada_exception_catchpoint): Update.
2981 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2983 (create_excep_cond_exprs, ~ada_catchpoint)
2984 (should_stop_exception, print_one_exception)
2985 (print_mention_exception, print_recreate_exception): Update.
2986 (ada_get_next_arg): Remove.
2987 (catch_ada_exception_command_split): Use std::string. Change type
2988 of "excep_string", "cond_string".
2989 (catch_ada_exception_command): Update.
2990 (create_ada_exception_catchpoint): Change type of excep_string.
2991 (ada_exception_sal): Remove excep_string parameter.
2992 (~ada_catchpoint): Remove.
2994 2018-05-21 Tom Tromey <tom@tromey.com>
2996 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2999 2018-05-21 Tom Tromey <tom@tromey.com>
3001 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3002 Return unique_xmalloc_ptr.
3003 (print_it_exception): Update.
3005 2018-05-21 Tom Tromey <tom@tromey.com>
3007 * tracepoint.c (trace_dump_actions): Use std::string.
3009 2018-05-21 Tom Tromey <tom@tromey.com>
3011 * symfile.c (reread_symbols): Use std::string for original_name.
3013 2018-05-21 Tom Tromey <tom@tromey.com>
3015 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3016 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3019 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3021 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3023 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3024 * objfiles.c (get_objfile_bfd_data): Allocate
3025 objfile_per_bfd_storage with obstack_new when allocating on
3028 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3030 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3032 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3033 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3034 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3035 (add_pending): Likewise.
3036 (parse_symbol): Likewise.
3037 (parse_partial_symbols): Likewise.
3038 (psymtab_to_symtab_1): Likewise.
3039 (new_psymtab): Likewise.
3040 (elfmdebug_build_psymtabs): Likewise.
3041 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3042 * objfiles.c (get_objfile_bfd_data): Likewise.
3043 (objfile_register_static_link): Likewise.
3044 * psymtab.c (allocate_psymtab): Likewise.
3045 * stabsread.c (read_member_functions): Likewise.
3046 * xcoffread.c (xcoff_end_psymtab): Likewise.
3048 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3050 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3051 compiler supports std::is_trivially_constructible.
3052 * common/poison.h: Include obstack.h.
3053 (IsMallocable): Define to is_trivially_constructible if the
3054 compiler supports it, define to true_type otherwise.
3058 (XOBNEWVEC): Redefine.
3059 * gdb_obstack.h (obstack_zalloc): New.
3060 (OBSTACK_ZALLOC): Redefine.
3061 (obstack_calloc): New.
3062 (OBSTACK_CALLOC): Redefine.
3064 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3065 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3067 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3068 obstack_calloc/obstack_zalloc.
3069 (gdbarch_obstack_zalloc): Remove.
3070 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3072 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3074 * stack.c (backtrace_command_1): Remove useless variable int i.
3076 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3078 * stack.c (print_frame_info): Fix comment.
3080 2018-05-18 Tom Tromey <tom@tromey.com>
3082 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3083 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3084 (~dwarf2_per_objfile): Update
3085 (dwarf2_get_dwz_file): Use new.
3086 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3089 2018-05-18 Tom Tromey <tom@tromey.com>
3091 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3093 * dwarf2read.c (struct dwp_file): Add constructor and
3095 (open_and_init_dwp_file): Return a unique_ptr.
3096 (dwarf2_per_objfile, create_dwp_hash_table)
3097 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3098 (lookup_dwo_unit_in_dwp): Update.
3099 (open_and_init_dwp_file, get_dwp_file): Update.
3101 2018-05-18 Tom Tromey <tom@tromey.com>
3103 * dwarf2read.c (dwarf2_per_objfile): Update.
3104 (struct mapped_index): Add initializers.
3105 (dwarf2_read_index): Use new.
3106 (dw2_symtab_iter_init): Update.
3107 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3110 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3112 * dwarf2read.c (mapped_index) <total_size>: Remove.
3114 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3116 * unittests/format_pieces-selftests.c (test_format_specifier):
3119 2018-05-18 Tom Tromey <tom@tromey.com>
3121 * c-typeprint.c (maybe_print_hole): New function.
3122 (c_print_type_struct_field_offset): Update.
3123 (c_type_print_base_struct_union): Call maybe_print_hole.
3125 2018-05-17 Keith Seitz <keiths@redhat.com>
3127 * breakpoint.c (build_bpstat_chain): New function, moved from
3129 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3130 If no stop chain is passed, call build_bpstat_chain to build it.
3131 * breakpoint.h (build_bpstat_chain): Declare.
3132 (bpstat_stop_status): Move documentation here from breakpoint.c.
3133 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3134 build the stop chain and pass it to skip_inline_frames.
3135 Pass this stop chain to bpstat_stop_status.
3136 * inline-frame.c: Include breakpoint.h.
3137 (stopped_by_user_bp_inline_frame): New function.
3138 (skip_inline_frames): Add parameter `stop_chain'.
3139 Move documention to inline-frame.h.
3140 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3141 whether the frame should be elided.
3142 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3143 Add moved documentation and update for new parameter.
3145 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3148 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3149 unittests/format_pieces-selftests.c.
3150 * common/format.h (format_piece) <operator==>: New.
3151 (format_pieces) <operator[]>: Remove.
3152 * common/format.c (format_pieces::format_pieces): Handle \e.
3153 * unittests/format_pieces-selftests.c: New.
3155 2018-05-17 Tom Tromey <tom@tromey.com>
3158 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3159 (dw2_instantiate_symtab): Add skip_partial parameter.
3160 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3161 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3162 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3163 (dw2_expand_symtabs_matching_one)
3164 (dw2_find_pc_sect_compunit_symtab)
3165 (dw2_debug_names_lookup_symbol)
3166 (dw2_debug_names_expand_symtabs_for_function): Update.
3167 (init_cutu_and_read_dies): Add skip_partial parameter.
3168 (process_psymtab_comp_unit, build_type_psymtabs_1)
3169 (process_skeletonless_type_unit, load_partial_comp_unit)
3170 (psymtab_to_symtab_1): Update.
3171 (load_full_comp_unit): Add skip_partial parameter.
3172 (process_imported_unit_die, dwarf2_read_addr_index)
3173 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3174 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3175 (read_signatured_type): Update.
3177 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3179 * value.c (release_value): Remove unused variable.
3180 (record_latest_value): Likewise.
3181 (access_value_history): Likewise.
3182 (preserve_values): Likewise.
3184 2018-05-17 Tom Tromey <tom@tromey.com>
3186 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3189 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3192 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3193 Also handle registers whose width is not a multiple of
3195 (linux_nat_trad_target::store_register): Likewise.
3197 2018-05-16 Tom Tromey <tom@tromey.com>
3199 * gdbcore.h (core_bfd): Redefine.
3200 * corelow.c (core_target::close): Update.
3201 (core_target_open): Update.
3202 * progspace.h (struct program_space) <cbfd>: Now a
3205 2018-05-16 Tom Tromey <tom@tromey.com>
3208 * symfile-add-flags.h (enum symfile_add_flags)
3209 <SYMFILE_NOT_FILENAME>: New constant.
3210 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3211 objfile name from BFD.
3212 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3213 * minidebug.c (find_separate_debug_file_in_section): Put
3214 ".gnu_debugdata" into BFD's file name.
3216 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3218 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3221 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3224 * aarch64-tdep.c (aarch64_analyze_prologue,
3225 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3226 Indicate not interested in errors.
3228 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3230 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3231 Supply the MIPS_ZERO_REGNUM register.
3233 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3235 * mips-tdep.c (mask_address_var): Make variable static.
3237 2018-05-14 Tom Tromey <tom@tromey.com>
3239 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3241 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3243 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3244 FXSAVE_ADDR for the mxcsr register.
3246 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3248 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3250 2018-05-11 Pedro Alves <palves@redhat.com>
3252 * corelow.c (core_target) <core_target>: No longer inline.
3253 Initialize m_core_gdbarch, m_core_vec and build the section table
3255 <~core_target>: New.
3256 <core_gdbarch, get_core_register_section>: New methods.
3257 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3258 factored out from ...
3259 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3261 (sniff_core_bfd): Add gdbarch parameter.
3262 (core_close): Delete, merged into ...
3263 (core_target::close): ... here. Delete self.
3264 (core_close_cleanup): Delete.
3265 (core_target_open): Allocate a core_target on the heap. Use a
3266 unique_ptr instead of a cleanup. Bits moved into the core_target
3267 ctor. Adjust to use core_target methods instead of globals.
3268 (get_core_register_section): Rename to ...
3269 (core_target::get_core_register_section): ... this and adjust.
3270 (struct get_core_registers_cb_data): New.
3271 (get_core_registers_cb): Use it. Use bool.
3272 (core_target::fetch_registers, core_target::files_info)
3273 (core_target::xfer_partial, core_target::read_description)
3274 (core_target::pid_to, core_target::thread_name): Adjust to
3275 reference class fields instead of globals.
3276 * target.h (struct target_ops_deleter, target_ops_up): New.
3278 2018-05-11 Pedro Alves <palves@redhat.com>
3280 * corefile.c (core_file_command): Move to corelow.c.
3281 * corelow.c (the_core_target): Delete.
3282 (core_file_command): Moved from corefile.c. Check exec_bfd
3283 instead of the_core_target. Use target_detach instead of calling
3284 into the_core_target directly.
3285 (maybe_say_no_core_file_now): New.
3286 (core_target::detach): Use it.
3287 (_initialize_corelow): Remove references to the_core_target.
3288 * gdbcore.h (the_core_target): Delete.
3290 2018-05-11 Tom Tromey <tromey@redhat.com>
3291 Pedro Alves <palves@redhat.com>
3293 * corefile.c (core_bfd): Remove.
3294 * gdbcore.h (core_bfd): Now a macro.
3295 * progspace.h (struct program_space) <cbfd>: New field.
3297 2018-05-11 Tom Tromey <tom@tromey.com>
3299 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3302 2018-05-10 Tom Tromey <tom@tromey.com>
3304 * configure: Rebuild.
3305 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3307 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3310 * regformats/regdat.sh: Adjust script, following the addition
3311 of the new expedite_regs parameter to init_target_desc.
3313 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3316 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3317 set_gdbarch_significant_addr_bit.
3318 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3319 set_gdbarch_significant_addr_bit.
3320 * utils.c (address_significant): Update to sign extend addr.
3322 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3324 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3325 (xtensa_linux_init_abi): Limit tdep->num_regs by
3326 tdep->num_nopriv_regs.
3327 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3328 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3331 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3333 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3335 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3337 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3338 (I387_MXCSR_INIT_VAL): New constant.
3339 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3340 buffer if it was supplied by the inferior.
3341 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3342 (i387_xsave_get_clear_bv): New function.
3343 (i387_supply_xsave): Only read x87 control registers from the
3344 xsave buffer if the feature is enabled, and the state will have
3345 been written, otherwise, provide a suitable default.
3346 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3347 including x87 control registers. Update control registers if they
3348 have changed from the default value, and mark features as enabled
3350 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3352 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3354 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3356 2018-05-07 Tom Tromey <tom@tromey.com>
3358 * configure: Rebuild.
3359 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3361 2018-05-07 Tom Tromey <tom@tromey.com>
3364 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3365 bit. Use correct value for VDIV.
3367 2018-05-04 Tom Tromey <tom@tromey.com>
3369 * configure: Rebuild.
3370 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3372 2018-05-04 Tom Tromey <tom@tromey.com>
3374 * linux-record.c (record_linux_system_call) <case
3375 RECORD_SYS_RECVFROM>: Add "break".
3377 2018-05-04 Tom Tromey <tom@tromey.com>
3379 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3380 Add missing "break".
3381 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3382 Add missing "break".
3384 2018-05-04 Tom Tromey <tom@tromey.com>
3386 * rs6000-tdep.c (ppc_process_record_op4)
3387 (ppc_process_record_op63): Add fall-through comment.
3389 2018-05-04 Tom Tromey <tom@tromey.com>
3391 * i386-tdep.c (i386_process_record): Add fall-through comment.
3393 2018-05-04 Tom Tromey <tom@tromey.com>
3395 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3398 2018-05-04 Tom Tromey <tom@tromey.com>
3400 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3401 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3402 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3404 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3406 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3409 2018-05-04 Tom Tromey <tom@tromey.com>
3411 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3413 2018-05-04 Tom Tromey <tom@tromey.com>
3415 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3416 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3417 * symfile.c (section_is_mapped): Fix fall-through comment.
3418 * stabsread.c (define_symbol, read_member_functions): Fix
3419 fall-through comment.
3420 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3422 * remote.c (remote_wait_as): Fix fall-through comment.
3423 * p-exp.y (yylex): Fix fall-through comment.
3424 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3426 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3427 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3428 * jv-exp.y (yylex): Fix fall-through comment.
3429 * go-exp.y (lex_one_token): Fix fall-through comment.
3430 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3431 fall-through comment.
3432 * f-exp.y (yylex): Fix fall-through comment.
3433 * dwarf2read.c (process_die): Fix fall-through comments.
3434 * dbxread.c (process_one_symbol): Fix fall-through comment.
3435 * d-exp.y (lex_one_token): Fix fall-through comment.
3436 * cp-name-parser.y (yylex): Fix fall-through comment.
3437 * coffread.c (coff_symtab_read): Fix fall-through comment.
3438 * c-exp.y (lex_one_token): Fix fall-through comment.
3439 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3441 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3444 2018-05-04 Tom Tromey <tom@tromey.com>
3447 * NEWS: Mention gdb.execute change.
3448 * gdbcmd.h (execute_control_command): Don't declare.
3449 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3450 execute_control_commands, execute_control_commands_to_string.
3451 * cli/cli-script.h (execute_control_commands)
3452 (execute_control_commands_to_string): Declare.
3453 (execute_control_command): Add from_tty parameter.
3454 * cli/cli-script.c (execute_control_commands)
3455 (execute_control_commands_to_string): New functions.
3456 (execute_user_command): Use execute_control_commands.
3457 (execute_control_command_1): Add "from_tty" parameter. Update.
3458 (execute_control_command): Likewise.
3460 2018-05-04 Tom Tromey <tom@tromey.com>
3463 * NEWS: Mention that breakpoint commands are writable.
3464 * python/py-breakpoint.c (bppy_set_commands): New function.
3465 (breakpoint_object_getset) <"commands">: Use it.
3467 2018-05-04 Tom Tromey <tom@tromey.com>
3469 * tracepoint.c (actions_command): Update.
3470 * mi/mi-cmd-break.c (mi_command_line_array)
3471 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3472 (mi_read_next_line): Remove.
3473 (mi_cmd_break_commands): Update.
3474 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3476 * cli/cli-script.c (get_command_line): Update.
3477 (process_next_line): Use function_view. Constify.
3478 (recurse_read_control_structure, read_command_lines)
3479 (read_command_lines_1): Change argument types to function_view.
3480 (do_define_command, document_command): Update.
3481 * breakpoint.h (check_tracepoint_command): Don't declare.
3482 * breakpoint.c (check_tracepoint_command): Remove.
3483 (commands_command_1, create_tracepoint_from_upload): Update.
3485 2018-05-04 Tom Tromey <tom@tromey.com>
3488 * cli/cli-script.h (enum command_control_type) <define_control>:
3490 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3491 (build_command_line, execute_control_command_1)
3492 (process_next_line): Likewise.
3493 (do_define_command): New function, extracted from define_command.
3494 (define_command): Use it.
3496 2018-05-04 Tom Tromey <tom@tromey.com>
3498 * tracepoint.c (actions_command): Update.
3499 * cli/cli-script.h (read_command_lines): Update.
3500 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3501 (MAX_TMPBUF): Remove define.
3502 (define_command): Use string_printf.
3503 (document_command): Likewise.
3504 * breakpoint.c (commands_command_1): Update.
3506 2018-05-04 Tom Tromey <tom@tromey.com>
3508 * top.c (execute_command): Update.
3509 * cli/cli-script.h (print_command_lines): Now varargs.
3510 * cli/cli-script.c (print_command_lines): Now varargs.
3511 (execute_control_command_1) <case while_control, case if_control>:
3514 2018-05-04 Tom Tromey <tom@tromey.com>
3516 * tracepoint.c (all_tracepoint_actions): Rename from
3517 all_tracepoint_actions_and_cleanup. Change return type.
3518 (actions_command, encode_actions_1, encode_actions)
3519 (trace_dump_actions, tdump_command): Update.
3520 * remote.c (remote_download_command_source): Update.
3521 * python/python.c (gdbpy_eval_from_control_command)
3522 (python_command, python_interactive_command): Update.
3523 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3524 * guile/guile.c (guile_command)
3525 (gdbscm_eval_from_control_command, guile_command): Update.
3526 * compile/compile.c (compile_code_command)
3527 (compile_print_command, compile_to_object): Update.
3528 * cli/cli-script.h (struct command_lines_deleter): New.
3529 (counted_command_line): New typedef.
3530 (struct command_line): Add constructor, destructor.
3531 <body_list>: Remove.
3532 <body_list_0, body_list_1>: New members.
3533 (command_line_up): Remove typedef.
3534 (read_command_lines, read_command_lines_1, get_command_line):
3536 (copy_command_lines): Don't declare.
3537 * cli/cli-script.c (build_command_line): Use "new".
3538 (get_command_line): Return counted_command_line.
3539 (print_command_lines, execute_user_command)
3540 (execute_control_command_1, while_command, if_command): Update.
3541 (realloc_body_list): Remove.
3542 (process_next_line, recurse_read_control_structure): Update.
3543 (read_command_lines, read_command_lines_1): Return counted_command_line.
3544 (free_command_lines): Use "delete".
3545 (copy_command_lines): Remove.
3546 (define_command, document_command, show_user_1): Update.
3547 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3548 a counted_command_line.
3549 * breakpoint.h (counted_command_line): Remove typedef.
3550 (breakpoint_set_commands): Update.
3551 * breakpoint.c (check_no_tracepoint_commands)
3552 (validate_commands_for_breakpoint): Update.
3553 (breakpoint_set_commands): Change commands to be a
3554 counted_command_line.
3555 (commands_command_1, update_dprintf_command_list)
3556 (create_tracepoint_from_upload): Update.
3558 2018-05-04 Tom Tromey <tom@tromey.com>
3560 * cli/cli-decode.h (cmd_list_element): New constructor.
3561 (~cmd_list_element): New destructor.
3562 (struct cmd_list_element): Add initializers.
3563 * cli/cli-decode.c (do_add_cmd): Use "new".
3564 (delete_cmd): Use "delete".
3566 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3567 Pedro Alves <palves@redhat.com>
3569 PR breakpoints/19806 and support for PR external/20207.
3570 * NEWS: Mention Aarch64 watchpoint improvements.
3571 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3572 watchpoints and PR external/20207 watchpoints.
3573 * nat/aarch64-linux-hw-point.c
3574 (kernel_supports_any_contiguous_range): New.
3575 (aarch64_watchpoint_offset): New.
3576 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3577 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3578 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3579 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3580 next_addr_orig_p. Support PR external/20207 watchpoints.
3581 (aarch64_downgrade_regs): New.
3582 (aarch64_dr_state_insert_one_point): New parameters offset and
3584 (aarch64_dr_state_remove_one_point): Likewise.
3585 (aarch64_handle_breakpoint): Update caller.
3586 (aarch64_handle_aligned_watchpoint): Likewise.
3587 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3589 (aarch64_linux_set_debug_regs): Remove const from state. Call
3590 aarch64_downgrade_regs.
3591 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3592 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3593 (DR_CONTROL_MASK): ... this.
3594 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3595 (unsigned int aarch64_watchpoint_offset): New prototype.
3596 (aarch64_linux_set_debug_regs): Remove const from state.
3597 * utils.c (align_up, align_down): Move to ...
3598 * common/common-utils.c (align_up, align_down): ... here.
3599 * utils.h (align_up, align_down): Move to ...
3600 * common/common-utils.h (align_up, align_down): ... here.
3602 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3604 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3605 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3606 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3607 Re-implement to match the ABI as summarized in GCC's
3608 gcc/config/sparc/sparc.c. All callers updated.
3609 (sparc32_store_arguments): Remove assertion.
3611 2018-05-04 Tom Tromey <tom@tromey.com>
3613 * printcmd.c: Don't include tui.h.
3614 (decode_format): Use skip_spaces.
3616 2018-05-04 Tom Tromey <tom@tromey.com>
3619 * printcmd.c (last_count): New global.
3620 (x_command): Use saved count when repeating.
3622 2018-05-04 Tom Tromey <tom@tromey.com>
3624 * nto-procfs.c (do_closedir_cleanup): Remove.
3625 (procfs_pidlist): Use gdb_dir_up.
3626 * procfs.c (do_closedir_cleanup): Remove.
3627 (proc_update_threads): Use gdb_dir_up.
3628 * common/filestuff.h (struct gdb_dir_deleter): New.
3629 (gdb_dir_up): New typedef.
3631 2018-05-04 Tom Tromey <tom@tromey.com>
3633 * ada-lang.c (print_mention_exception): Use std::string.
3635 2018-05-04 Tom Tromey <tom@tromey.com>
3637 * ada-lang.c (create_excep_cond_exprs): Update.
3638 (ada_exception_catchpoint_cond_string): Use std::string.
3640 2018-05-04 Tom Tromey <tom@tromey.com>
3642 * ada-lang.c (xget_renaming_scope): Return std::string.
3643 (old_renaming_is_invisible): Update.
3645 2018-05-04 Tom Tromey <tom@tromey.com>
3647 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3648 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3650 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3652 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3654 2018-05-04 Tom Tromey <tom@tromey.com>
3656 * remote.c (remote_query_supported_append): Change type.
3657 (remote_check_symbols): Update.
3659 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3662 * configure.ac: Prepend libpython.
3663 * python/python-config.py: Likewise.
3664 * configure: Regenerate.
3666 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3668 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3670 2018-05-03 Pedro Alves <palves@redhat.com>
3673 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3674 override. Write 'true' instead of '1'.
3675 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3678 2018-05-02 Pedro Alves <palves@redhat.com>
3680 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3681 add_inf_child_target.
3682 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3683 add_inf_child_target.
3684 * aix-thread.c (aix_thread_target_info): New.
3685 (aix_thread_target) <shortname, longname, doc>: Delete.
3687 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3688 add_inf_child_target.
3689 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3690 add_inf_child_target.
3691 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3692 add_inf_child_target.
3693 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3694 add_inf_child_target.
3695 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3696 add_inf_child_target.
3697 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3698 add_inf_child_target.
3699 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3700 add_inf_child_target.
3701 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3702 add_inf_child_target.
3703 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3704 add_inf_child_target.
3705 * bfd-target.c (target_bfd_target_info): New.
3706 (target_bfd) <shortname, longname, doc>: Delete.
3708 * bsd-kvm.c (bsd_kvm_target_info): New.
3709 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3711 (bsd_kvm_target::open): Rename to ...
3712 (bsd_kvm_target_open): ... this. Adjust.
3713 * bsd-uthread.c (bsd_uthread_target_info): New.
3714 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3716 * corefile.c (core_file_command): Adjust.
3717 * corelow.c (core_target_info): New.
3718 (core_target) <shortname, longname, doc>: Delete.
3720 (core_target::open): Rename to ...
3721 (core_target_open): ... this. Adjust.
3722 * ctf.c (ctf_target_info): New.
3723 (ctf_target) <shortname, longname, doc>: Delete.
3725 (ctf_target::open): Rename to ...
3726 (ctf_target_open): ... this.
3727 (_initialize_ctf): Adjust.
3728 * exec.c (exec_target_info): New.
3729 (exec_target) <shortname, longname, doc>: Delete.
3731 (exec_target::open): Rename to ...
3732 (exec_target_open): ... this.
3733 * gdbcore.h (core_target_open): Declare.
3734 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3735 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3736 add_inf_child_target.
3737 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3738 add_inf_child_target.
3739 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3740 add_inf_child_target.
3741 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3742 add_inf_child_target.
3743 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3744 add_inf_child_target.
3745 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3746 add_inf_child_target.
3747 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3748 add_inf_child_target.
3749 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3750 add_inf_child_target.
3751 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3752 add_inf_child_target.
3753 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3754 add_inf_child_target.
3755 * inf-child.c (inf_child_target_info): New.
3756 (inf_child_target::info): New.
3757 (inf_child_open_target): Remove 'target' parameter. Use
3758 get_native_target instead.
3759 (inf_child_target::open): Delete.
3760 (add_inf_child_target): New.
3761 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3764 (add_inf_child_target): Declare.
3765 (inf_child_open_target): Declare.
3766 * linux-thread-db.c (thread_db_target_info): New.
3767 (thread_db_target) <shortname, longname, doc>: Delete.
3769 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3770 add_inf_child_target.
3771 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3772 add_inf_child_target.
3773 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3774 add_inf_child_target.
3775 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3776 add_inf_child_target.
3777 * make-target-delegates (print_class): Adjust.
3778 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3779 add_inf_child_target.
3780 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3781 add_inf_child_target.
3782 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3783 add_inf_child_target.
3784 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3785 add_inf_child_target.
3786 * nto-procfs.c (nto_native_target_info): New.
3787 (nto_procfs_target_native) <shortname, longname, doc>:
3790 (nto_procfs_target_info): New.
3791 (nto_procfs_target_procfs) <shortname, longname, doc>:
3794 (init_procfs_targets): Adjust.
3795 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3796 add_inf_child_target.
3797 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3798 add_inf_child_target.
3799 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3800 add_inf_child_target.
3801 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3802 add_inf_child_target.
3803 * ravenscar-thread.c (ravenscar_target_info): New.
3804 (ravenscar_thread_target) <shortname, longname, doc>:
3807 * record-btrace.c (record_btrace_target_info):
3808 (record_btrace_target) <shortname, longname, doc>: Delete.
3810 (record_btrace_target::open): Rename to ...
3811 (record_btrace_target_open): ... this. Adjust.
3812 * record-full.c (record_longname, record_doc): New.
3813 (record_full_base_target) <shortname, longname, doc>: Delete.
3815 (record_full_target_info): New.
3816 (record_full_target): <shortname>: Delete.
3818 (record_full_core_open_1, record_full_open_1): Update comments.
3819 (record_full_base_target::open): Rename to ...
3820 (record_full_open): ... this.
3821 (cmd_record_full_restore): Update.
3822 (_initialize_record_full): Update.
3823 * remote-sim.c (remote_sim_target_info): New.
3824 (gdbsim_target) <shortname, longname, doc>: Delete.
3826 (gdbsim_target::open): Rename to ...
3827 (gdbsim_target_open): ... this.
3828 (_initialize_remote_sim): Adjust.
3829 * remote.c (remote_doc): New.
3830 (remote_target_info): New.
3831 (remote_target) <shortname, longname, doc>: Delete.
3833 (extended_remote_target_info): New.
3834 (extended_remote_target) <shortname, longname, doc>: Delete.
3836 (remote_target::open_1): Make static. Adjust.
3837 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3838 * s390-linux-nat.c (_initialize_s390_nat): Use
3839 add_inf_child_target.
3840 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3841 add_inf_child_target.
3842 * sol-thread.c (thread_db_target_info): New.
3843 (sol_thread_target) <shortname, longname, doc>: Delete.
3845 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3846 add_inf_child_target.
3847 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3848 add_inf_child_target.
3849 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3850 add_inf_child_target.
3851 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3852 add_inf_child_target.
3853 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3854 add_inf_child_target.
3855 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3856 add_inf_child_target.
3857 * spu-linux-nat.c (_initialize_spu_nat): Use
3858 add_inf_child_target.
3859 * spu-multiarch.c (spu_multiarch_target_info): New.
3860 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3862 * target-delegates.c: Regenerate.
3863 * target.c: Include <unordered_map>.
3864 (target_ops_p): Delete.
3865 (DEF_VEC_P(target_ops_p)): Delete.
3866 (target_factories): New.
3867 (test_target_info): New.
3868 (test_target_ops::info): New.
3869 (open_target): Adjust to use target_factories.
3870 (add_target_with_completer): Rename to ...
3871 (add_target): ... this. Change prototype. Register target_info
3872 and open callback in target_factories. Register target_info in
3873 command context instead of target_ops.
3874 (add_target): Delete old implementation.
3875 (add_deprecated_target_alias): Change prototype. Adjust.
3876 (the_native_target): New.
3877 (set_native_target, get_native_target): New.
3878 (find_default_run_target): Use the_native_target.
3879 (find_attach_target, find_run_target): Simplify.
3880 (target_ops::open): Delete.
3881 (dummy_target_info): New.
3882 (dummy_target::shortname, dummy_target::longname)
3883 (dummy_target::doc): Delete.
3884 (dummy_target::info): New.
3885 (debug_target::shortname, debug_target::longname)
3886 (debug_target::doc): Delete.
3887 (debug_target::info): New.
3888 * target.h (struct target_info): New.
3889 (target_ops::~target_ops): Add comment.
3890 (target_ops::info): New.
3891 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3892 longer virtual. Implement in terms of target_info.
3893 (set_native_target, get_native_target): Declare.
3894 (target_open_ftype): New.
3895 (add_target, add_target_with_completer)
3896 (add_deprecated_target_alias): Change prototype.
3897 (test_target) <shortname, longname, doc>: Delete.
3899 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3900 add_inf_child_target.
3901 * tracefile-tfile.c (tfile_target_info): New.
3902 (tfile_target) <shortname, longname, doc>: Delete.
3904 (tfile_target::open): Rename to ...
3905 (tfile_target_open): ... this.
3906 (_initialize_tracefile_tfile): Adjust.
3907 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3908 add_inf_child_target.
3909 * windows-nat.c (_initialize_windows_nat): Use
3910 add_inf_child_target.
3911 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3912 add_inf_child_target.
3914 2018-05-02 Pedro Alves <palves@redhat.com>
3916 * linux-nat.h (linux_nat_target) <low_new_thread,
3917 low_delete_thread, low_new_fork, low_forget_process,
3918 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3919 New virtual methods.
3920 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3921 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3922 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3923 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3924 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3926 * linux-fork.c (delete_fork): Adjust to call low method.
3927 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3928 (linux_nat_new_fork, linux_nat_forget_process_hook)
3929 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3930 (linux_nat_status_is_event):
3931 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3932 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3934 (sigtrap_is_event): Rename to ...
3935 (linux_nat_target::low_status_is_event): ... this.
3936 (linux_nat_set_status_is_event): Delete.
3937 (save_stop_reason, linux_nat_wait_1)
3938 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3940 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3941 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3942 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3943 (linux_nat_set_prepare_to_resume): Delete.
3944 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3945 low virtual methods.
3946 * amd64-linux-nat.c: Likewise.
3947 * arm-linux-nat.c: Likewise.
3948 * i386-linux-nat.c: Likewise.
3949 * ia64-linux-nat.c: Likewise.
3950 * mips-linux-nat.c: Likewise.
3951 * ppc-linux-nat.c: Likewise.
3952 * s390-linux-nat.c: Likewise.
3953 * sparc64-linux-nat.c: Likewise.
3954 * x86-linux-nat.c: Likewise.
3955 * x86-linux-nat.h: Include "nat/x86-linux.h".
3956 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3957 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3960 2018-05-02 Pedro Alves <palves@redhat.com>
3962 * target.h (target_ops)
3963 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3964 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3965 stopped_by_watchpoint, have_continuable_watchpoint,
3966 stopped_data_address, watchpoint_addr_within_range,
3967 can_accel_watchpoint_condition, can_run, thread_alive,
3968 has_all_memory, has_memory, has_stack, has_registers,
3969 has_execution, can_async_p, is_async_p, supports_non_stop,
3970 always_non_stop_p, can_execute_reverse, supports_multi_process,
3971 supports_enable_disable_tracepoint,
3972 supports_disable_randomization, supports_string_tracing,
3973 supports_evaluation_of_breakpoint_conditions,
3974 can_run_breakpoint_commands, filesystem_is_local,
3975 can_download_tracepoint, get_trace_state_variable_value,
3976 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3977 record_is_replaying, record_will_replay,
3978 augmented_libraries_svr4_read>: Adjust to return bool.
3979 * aarch64-linux-nat.c: All implementations adjusted.
3980 * aix-thread.c: All implementations adjusted.
3981 * arm-linux-nat.c: All implementations adjusted.
3982 * breakpoint.c: All implementations adjusted.
3983 * bsd-kvm.c: All implementations adjusted.
3984 * bsd-uthread.c: All implementations adjusted.
3985 * corelow.c: All implementations adjusted.
3986 * ctf.c: All implementations adjusted.
3987 * darwin-nat.c: All implementations adjusted.
3988 * darwin-nat.h: All implementations adjusted.
3989 * exec.c: All implementations adjusted.
3990 * fbsd-nat.c: All implementations adjusted.
3991 * fbsd-nat.h: All implementations adjusted.
3992 * gnu-nat.c: All implementations adjusted.
3993 * gnu-nat.h: All implementations adjusted.
3994 * go32-nat.c: All implementations adjusted.
3995 * ia64-linux-nat.c: All implementations adjusted.
3996 * inf-child.c: All implementations adjusted.
3997 * inf-child.h: All implementations adjusted.
3998 * inf-ptrace.c: All implementations adjusted.
3999 * inf-ptrace.h: All implementations adjusted.
4000 * linux-nat.c: All implementations adjusted.
4001 * linux-nat.h: All implementations adjusted.
4002 * mips-linux-nat.c: All implementations adjusted.
4003 * nto-procfs.c: All implementations adjusted.
4004 * ppc-linux-nat.c: All implementations adjusted.
4005 * procfs.c: All implementations adjusted.
4006 * ravenscar-thread.c: All implementations adjusted.
4007 * record-btrace.c: All implementations adjusted.
4008 * record-full.c: All implementations adjusted.
4009 * remote-sim.c: All implementations adjusted.
4010 * remote.c: All implementations adjusted.
4011 * s390-linux-nat.c: All implementations adjusted.
4012 * sol-thread.c: All implementations adjusted.
4013 * spu-multiarch.c: All implementations adjusted.
4014 * target-delegates.c: All implementations adjusted.
4015 * target.c: All implementations adjusted.
4016 * target.h: All implementations adjusted.
4017 * tracefile-tfile.c: All implementations adjusted.
4018 * tracefile.c: All implementations adjusted.
4019 * tracefile.h: All implementations adjusted.
4020 * windows-nat.c: All implementations adjusted.
4021 * x86-linux-nat.h: All implementations adjusted.
4022 * x86-nat.h: All implementations adjusted.
4024 2018-05-02 Pedro Alves <palves@redhat.com>
4026 * make-target-delegates (scan_target_h): Don't trim lines here.
4027 Replace sequences of tabs and/or whitespace with a single
4029 (top level, parsing methods): Trim each line before processing it
4032 2018-05-02 Pedro Alves <palves@redhat.com>
4033 John Baldwin <jhb@freebsd.org>
4035 * target.h (enum strata) <debug_stratum>: New.
4036 (struct target_ops) <all delegation methods>: Replace by C++
4037 virtual methods, and drop "to_" prefix. All references updated
4039 <to_shortname, to_longname, to_doc, to_data,
4040 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4041 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4042 virtual methods. All references updated throughout.
4043 <can_attach, supports_terminal_ours, can_create_inferior,
4044 get_thread_control_capabilities, attach_no_wait>: New
4046 <insert_breakpoint, remove_breakpoint>: Now
4047 TARGET_DEFAULT_NORETURN methods.
4048 <info_proc>: Now returns bool.
4050 (OPS_MAGIC): Delete.
4051 (current_target): Delete. All references replaced by references
4053 (target_stack): ... this. New.
4054 (target_shortname, target_longname): Adjust.
4055 (target_can_run): Now a function declaration.
4056 (default_child_has_all_memory, default_child_has_memory)
4057 (default_child_has_stack, default_child_has_registers)
4058 (default_child_has_execution): Remove target_ops parameter.
4059 (complete_target_initialization): Delete.
4060 (memory_breakpoint_target): New template class.
4061 (test_target_ops): Refactor as a C++ class with virtual methods.
4062 * make-target-delegates (NAME_PART): Tighten.
4063 (POINTER_PART, CP_SYMBOL): New.
4064 (SIMPLE_RETURN_PART): Reimplement.
4065 (VEC_RETURN_PART): Expect less.
4066 (RETURN_PART, VIRTUAL_PART): New.
4067 (METHOD): Adjust to C++ virtual methods.
4068 (scan_target_h): Remove reference to C99.
4069 (dname): Output "target_ops::" prefix.
4070 (write_function_header): Adjust to output a C++ class method.
4071 (write_declaration): New.
4072 (write_delegator): Adjust to output a C++ class method.
4073 (tdname): Output "dummy_target::" prefix.
4074 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4076 (tdefault_names, debug_names): Delete.
4077 (return_types, tdefaults, styles, argtypes_array): New.
4078 (top level): All methods are delegators.
4080 (top level): Print dummy_target and debug_target classes.
4081 * target-delegates.c: Regenerate.
4082 * target-debug.h (target_debug_print_enum_info_proc_what)
4083 (target_debug_print_thread_control_capabilities)
4084 (target_debug_print_thread_info_p): New.
4085 * target.c (dummy_target): Delete.
4086 (the_dummy_target, the_debug_target): New.
4087 (target_stack): Now extern.
4088 (set_targetdebug): Push/unpush debug target.
4089 (default_child_has_all_memory, default_child_has_memory)
4090 (default_child_has_stack, default_child_has_registers)
4091 (default_child_has_execution): Remove target_ops parameter.
4092 (complete_target_initialization): Delete.
4093 (add_target_with_completer): No longer call
4094 complete_target_initialization.
4095 (target_supports_terminal_ours): Use regular delegation.
4096 (update_current_target): Delete.
4097 (push_target): No longer check magic number. Don't call
4098 update_current_target.
4099 (unpush_target): Don't call update_current_target.
4100 (target_is_pushed): No longer check magic number.
4101 (target_require_runnable): Skip for all stratums over
4103 (target_ops::info_proc): New.
4104 (target_info_proc): Use find_target_at and
4105 find_default_run_target.
4106 (target_supports_disable_randomization): Use regular delegation.
4107 (target_get_osdata): Use find_target_at.
4108 (target_ops::open, target_ops::close, target_ops::can_attach)
4109 (target_ops::attach, target_ops::can_create_inferior)
4110 (target_ops::create_inferior, target_ops::can_run)
4111 (target_can_run): New.
4112 (default_fileio_target): Use regular delegation.
4113 (target_ops::fileio_open, target_ops::fileio_pwrite)
4114 (target_ops::fileio_pread, target_ops::fileio_fstat)
4115 (target_ops::fileio_close, target_ops::fileio_unlink)
4116 (target_ops::fileio_readlink): New.
4117 (target_fileio_open_1, target_fileio_unlink)
4118 (target_fileio_readlink): Always call the target method. Handle
4120 (return_zero, return_zero_has_execution): Delete.
4121 (init_dummy_target): Delete.
4122 (dummy_target::dummy_target, dummy_target::shortname)
4123 (dummy_target::longname, dummy_target::doc)
4124 (debug_target::debug_target, debug_target::shortname)
4125 (debug_target::longname, debug_target::doc): New.
4126 (target_supports_delete_record): Use regular delegation.
4127 (setup_target_debug): Delete.
4128 (maintenance_print_target_stack): Skip debug_stratum.
4129 (initialize_targets): Instantiate the_dummy_target and
4131 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4133 (target_auxv_search, fprint_target_auxv): Adjust.
4134 (info_auxv_command): Adjust to use target_stack.
4135 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4136 * exceptions.c (print_flush): Handle a NULL target_stack.
4137 * regcache.c (target_ops_no_register): Refactor as class with
4140 * exec.c (exec_target): New class.
4141 (exec_ops): Now an exec_target.
4142 (exec_open, exec_close_1, exec_get_section_table)
4143 (exec_xfer_partial, exec_files_info, exec_has_memory)
4144 (exec_make_note_section): Refactor as exec_target methods.
4145 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4147 (exec_target::find_memory_regions): New.
4148 (_initialize_exec): Don't call init_exec_ops.
4149 * gdbcore.h (exec_file_clear): Delete.
4151 * corefile.c (core_target): Delete.
4152 (core_file_command): Adjust.
4153 * corelow.c (core_target): New class.
4154 (the_core_target): New.
4155 (core_close): Remove target_ops parameter.
4156 (core_close_cleanup): Adjust.
4157 (core_target::close): New.
4158 (core_open, core_detach, get_core_registers, core_files_info)
4159 (core_xfer_partial, core_thread_alive, core_read_description)
4160 (core_pid_to_str, core_thread_name, core_has_memory)
4161 (core_has_stack, core_has_registers, core_info_proc): Rework as
4162 core_target methods.
4163 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4164 (_initialize_corelow): Initialize the_core_target.
4165 * gdbcore.h (core_target): Delete.
4166 (the_core_target): New.
4168 * ctf.c: (ctf_target): New class.
4169 (ctf_ops): Now a ctf_target.
4170 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4171 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4172 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4174 (init_ctf_ops): Delete.
4175 (_initialize_ctf): Don't call it.
4176 * tracefile-tfile.c (tfile_target): New class.
4177 (tfile_ops): Now a tfile_target.
4178 (tfile_open, tfile_close, tfile_files_info)
4179 (tfile_get_tracepoint_status, tfile_trace_find)
4180 (tfile_fetch_registers, tfile_xfer_partial)
4181 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4182 Refactor as tfile_target methods.
4183 (tfile_xfer_partial_features): Remove target_ops parameter.
4184 (init_tfile_ops): Delete.
4185 (_initialize_tracefile_tfile): Don't call it.
4186 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4187 (tracefile_has_stack, tracefile_has_registers)
4188 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4189 tracefile_target methods.
4190 (init_tracefile_ops): Delete.
4191 (tracefile_target::tracefile_target): New.
4192 * tracefile.h: Include "target.h".
4193 (tracefile_target): New class.
4194 (init_tracefile_ops): Delete.
4196 * spu-multiarch.c (spu_multiarch_target): New class.
4197 (spu_ops): Now a spu_multiarch_target.
4198 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4199 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4200 (spu_search_memory, spu_mourn_inferior): Refactor as
4201 spu_multiarch_target methods.
4202 (init_spu_ops): Delete.
4203 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4204 complete_target_initialization.
4206 * ravenscar-thread.c (ravenscar_thread_target): New class.
4207 (ravenscar_ops): Now a ravenscar_thread_target.
4208 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4209 (ravenscar_thread_alive, ravenscar_pid_to_str)
4210 (ravenscar_fetch_registers, ravenscar_store_registers)
4211 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4212 (ravenscar_stopped_by_hw_breakpoint)
4213 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4214 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4215 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4217 (init_ravenscar_thread_ops): Delete.
4218 (_initialize_ravenscar): Remove references to
4219 init_ravenscar_thread_ops and complete_target_initialization.
4221 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4222 (bsd_uthread_target): New class.
4223 (bsd_uthread_ops): Now a bsd_uthread_target.
4224 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4225 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4226 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4227 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4228 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4229 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4230 (bsd_uthread_target): Delete function.
4231 (_initialize_bsd_uthread): Remove reference to
4232 complete_target_initialization.
4234 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4235 (target_bfd): ... this new class.
4236 (target_bfd_xfer_partial, target_bfd_get_section_table)
4237 (target_bfd_close): Refactor as target_bfd methods.
4238 (target_bfd::~target_bfd): New.
4239 (target_bfd_reopen): Adjust.
4240 (target_bfd::close): New.
4242 * record-btrace.c (record_btrace_target): New class.
4243 (record_btrace_ops): Now a record_btrace_target.
4244 (record_btrace_open, record_btrace_stop_recording)
4245 (record_btrace_disconnect, record_btrace_close)
4246 (record_btrace_async, record_btrace_info)
4247 (record_btrace_insn_history, record_btrace_insn_history_range)
4248 (record_btrace_insn_history_from, record_btrace_call_history)
4249 (record_btrace_call_history_range)
4250 (record_btrace_call_history_from, record_btrace_record_method)
4251 (record_btrace_is_replaying, record_btrace_will_replay)
4252 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4253 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4254 (record_btrace_store_registers, record_btrace_prepare_to_store)
4255 (record_btrace_to_get_unwinder)
4256 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4257 (record_btrace_commit_resume, record_btrace_wait)
4258 (record_btrace_stop, record_btrace_can_execute_reverse)
4259 (record_btrace_stopped_by_sw_breakpoint)
4260 (record_btrace_supports_stopped_by_sw_breakpoint)
4261 (record_btrace_stopped_by_hw_breakpoint)
4262 (record_btrace_supports_stopped_by_hw_breakpoint)
4263 (record_btrace_update_thread_list, record_btrace_thread_alive)
4264 (record_btrace_goto_begin, record_btrace_goto_end)
4265 (record_btrace_goto, record_btrace_stop_replaying_all)
4266 (record_btrace_execution_direction)
4267 (record_btrace_prepare_to_generate_core)
4268 (record_btrace_done_generating_core): Refactor as
4269 record_btrace_target methods.
4270 (init_record_btrace_ops): Delete.
4271 (_initialize_record_btrace): Remove reference to
4272 init_record_btrace_ops.
4273 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4274 the execution_direction global.
4275 (record_full_base_target, record_full_target)
4276 (record_full_core_target): New classes.
4277 (record_full_ops): Now a record_full_target.
4278 (record_full_core_ops): Now a record_full_core_target.
4279 (record_full_target::detach, record_full_target::disconnect)
4280 (record_full_core_target::disconnect)
4281 (record_full_target::mourn_inferior, record_full_target::kill):
4283 (record_full_open, record_full_close, record_full_async): Refactor
4284 as methods of the record_full_base_target class.
4285 (record_full_resume, record_full_commit_resume): Refactor
4286 as methods of the record_full_target class.
4287 (record_full_wait, record_full_stopped_by_watchpoint)
4288 (record_full_stopped_data_address)
4289 (record_full_stopped_by_sw_breakpoint)
4290 (record_full_supports_stopped_by_sw_breakpoint)
4291 (record_full_stopped_by_hw_breakpoint)
4292 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4293 methods of the record_full_base_target class.
4294 (record_full_store_registers, record_full_xfer_partial)
4295 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4296 Refactor as methods of the record_full_target class.
4297 (record_full_can_execute_reverse, record_full_get_bookmark)
4298 (record_full_goto_bookmark, record_full_execution_direction)
4299 (record_full_record_method, record_full_info, record_full_delete)
4300 (record_full_is_replaying, record_full_will_replay)
4301 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4302 (record_full_stop_replaying): Refactor as methods of the
4303 record_full_base_target class.
4304 (record_full_core_resume, record_full_core_kill)
4305 (record_full_core_fetch_registers)
4306 (record_full_core_prepare_to_store)
4307 (record_full_core_store_registers, record_full_core_xfer_partial)
4308 (record_full_core_insert_breakpoint)
4309 (record_full_core_remove_breakpoint)
4310 (record_full_core_has_execution): Refactor
4311 as methods of the record_full_core_target class.
4312 (record_full_base_target::supports_delete_record): New.
4313 (init_record_full_ops): Delete.
4314 (init_record_full_core_ops): Delete.
4315 (record_full_save): Refactor as method of the
4316 record_full_base_target class.
4317 (_initialize_record_full): Remove references to
4318 init_record_full_ops and init_record_full_core_ops.
4320 * remote.c (remote_target, extended_remote_target): New classes.
4321 (remote_ops): Now a remote_target.
4322 (extended_remote_ops): Now an extended_remote_target.
4323 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4324 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4325 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4326 (remote_pass_signals, remote_set_syscall_catchpoint)
4327 (remote_program_signals, )
4328 (remote_thread_always_alive): Remove target_ops parameter.
4329 (remote_thread_alive, remote_thread_name)
4330 (remote_update_thread_list, remote_threads_extra_info)
4331 (remote_static_tracepoint_marker_at)
4332 (remote_static_tracepoint_markers_by_strid)
4333 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4334 (remote_open): Refactor as methods of remote_target.
4335 (extended_remote_open, extended_remote_detach)
4336 (extended_remote_attach, extended_remote_post_attach):
4337 (extended_remote_supports_disable_randomization)
4338 (extended_remote_create_inferior): : Refactor as method of
4339 extended_remote_target.
4340 (remote_set_permissions, remote_open_1, remote_detach)
4341 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4342 (remote_resume, remote_commit_resume, remote_stop)
4343 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4344 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4345 (remote_prepare_to_store, remote_store_registers)
4346 (remote_flash_erase, remote_flash_done, remote_files_info)
4347 (remote_kill, remote_mourn, remote_insert_breakpoint)
4348 (remote_remove_breakpoint, remote_insert_watchpoint)
4349 (remote_watchpoint_addr_within_range)
4350 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4351 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4352 (remote_supports_stopped_by_sw_breakpoint)
4353 (remote_stopped_by_hw_breakpoint)
4354 (remote_supports_stopped_by_hw_breakpoint)
4355 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4356 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4357 (remote_verify_memory): Refactor as methods of remote_target.
4358 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4360 (remote_xfer_partial, remote_get_memory_xfer_limit)
4361 (remote_search_memory, remote_rcmd, remote_memory_map)
4362 (remote_pid_to_str, remote_get_thread_local_address)
4363 (remote_get_tib_address, remote_read_description): Refactor as
4364 methods of remote_target.
4365 (remote_target::fileio_open, remote_target::fileio_pwrite)
4366 (remote_target::fileio_pread, remote_target::fileio_close): New.
4367 (remote_hostio_readlink, remote_hostio_fstat)
4368 (remote_filesystem_is_local, remote_can_execute_reverse)
4369 (remote_supports_non_stop, remote_supports_disable_randomization)
4370 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4371 (remote_supports_enable_disable_tracepoint)
4372 (remote_supports_string_tracing)
4373 (remote_can_run_breakpoint_commands, remote_trace_init)
4374 (remote_download_tracepoint, remote_can_download_tracepoint)
4375 (remote_download_trace_state_variable, remote_enable_tracepoint)
4376 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4377 (remote_trace_start, remote_get_trace_status)
4378 (remote_get_tracepoint_status, remote_trace_stop)
4379 (remote_trace_find, remote_get_trace_state_variable_value)
4380 (remote_save_trace_data, remote_get_raw_trace_data)
4381 (remote_set_disconnected_tracing, remote_core_of_thread)
4382 (remote_set_circular_trace_buffer, remote_traceframe_info)
4383 (remote_get_min_fast_tracepoint_insn_len)
4384 (remote_set_trace_buffer_size, remote_set_trace_notes)
4385 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4386 (remote_disable_btrace, remote_teardown_btrace)
4387 (remote_read_btrace, remote_btrace_conf)
4388 (remote_augmented_libraries_svr4_read, remote_load)
4389 (remote_pid_to_exec_file, remote_can_do_single_step)
4390 (remote_execution_direction, remote_thread_handle_to_thread_info):
4391 Refactor as methods of remote_target.
4392 (init_remote_ops, init_extended_remote_ops): Delete.
4393 (remote_can_async_p, remote_is_async_p, remote_async)
4394 (remote_thread_events, remote_upload_tracepoints)
4395 (remote_upload_trace_state_variables): Refactor as methods of
4397 (_initialize_remote): Remove references to init_remote_ops and
4398 init_extended_remote_ops.
4400 * remote-sim.c (gdbsim_target): New class.
4401 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4402 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4403 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4404 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4405 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4406 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4407 Refactor as methods of gdbsim_target.
4408 (gdbsim_ops): Now a gdbsim_target.
4409 (init_gdbsim_ops): Delete.
4410 (gdbsim_cntrl_c): Adjust.
4411 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4413 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4414 (the_amd64_linux_nat_target): New.
4415 (amd64_linux_fetch_inferior_registers)
4416 (amd64_linux_store_inferior_registers): Refactor as methods of
4417 amd64_linux_nat_target.
4418 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4419 * i386-linux-nat.c: Don't include "linux-nat.h".
4420 (i386_linux_nat_target): New class.
4421 (the_i386_linux_nat_target): New.
4422 (i386_linux_fetch_inferior_registers)
4423 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4424 as methods of i386_linux_nat_target.
4425 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4426 * inf-child.c (inf_child_ops): Delete.
4427 (inf_child_fetch_inferior_registers)
4428 (inf_child_store_inferior_registers): Delete.
4429 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4430 methods of inf_child_target.
4431 (inf_child_target::supports_terminal_ours)
4432 (inf_child_target::terminal_init)
4433 (inf_child_target::terminal_inferior)
4434 (inf_child_target::terminal_ours_for_output)
4435 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4436 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4438 (inf_child_open, inf_child_disconnect, inf_child_close)
4439 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4440 (inf_child_post_startup_inferior, inf_child_can_run)
4441 (inf_child_pid_to_exec_file): Refactor as methods of
4443 (inf_child_follow_fork): Delete.
4444 (inf_child_target::can_create_inferior)
4445 (inf_child_target::can_attach): New.
4446 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4447 (inf_child_target::has_stack, inf_child_target::has_registers)
4448 (inf_child_target::has_execution): New.
4449 (inf_child_fileio_open, inf_child_fileio_pwrite)
4450 (inf_child_fileio_pread, inf_child_fileio_fstat)
4451 (inf_child_fileio_close, inf_child_fileio_unlink)
4452 (inf_child_fileio_readlink, inf_child_use_agent)
4453 (inf_child_can_use_agent): Refactor as methods of
4455 (return_zero, inf_child_target): Delete.
4456 (inf_child_target::inf_child_target): New.
4457 * inf-child.h: Include "target.h".
4458 (inf_child_target): Delete function prototype.
4459 (inf_child_target): New class.
4460 (inf_child_open_target, inf_child_mourn_inferior)
4461 (inf_child_maybe_unpush_target): Delete.
4462 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4463 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4464 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4465 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4466 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4467 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4468 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4469 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4470 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4471 methods of inf_ptrace_target.
4472 (inf_ptrace_target): Delete function.
4473 * inf-ptrace.h: Include "inf-child.h".
4474 (inf_ptrace_target): Delete function declaration.
4475 (inf_ptrace_target): New class.
4476 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4477 * linux-nat.c (linux_target): New.
4478 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4479 (linux_nat_target::~linux_nat_target): New.
4480 (linux_child_post_attach, linux_child_post_startup_inferior)
4481 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4482 (linux_child_remove_fork_catchpoint)
4483 (linux_child_insert_vfork_catchpoint)
4484 (linux_child_remove_vfork_catchpoint)
4485 (linux_child_insert_exec_catchpoint)
4486 (linux_child_remove_exec_catchpoint)
4487 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4488 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4489 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4490 (linux_nat_stopped_data_address)
4491 (linux_nat_stopped_by_sw_breakpoint)
4492 (linux_nat_supports_stopped_by_sw_breakpoint)
4493 (linux_nat_stopped_by_hw_breakpoint)
4494 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4495 (linux_nat_kill, linux_nat_mourn_inferior)
4496 (linux_nat_xfer_partial, linux_nat_thread_alive)
4497 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4498 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4499 (linux_child_static_tracepoint_markers_by_strid)
4500 (linux_nat_is_async_p, linux_nat_can_async_p)
4501 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4502 (linux_nat_supports_multi_process)
4503 (linux_nat_supports_disable_randomization, linux_nat_async)
4504 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4505 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4506 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4507 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4508 methods of linux_nat_target.
4509 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4510 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4512 (check_stopped_by_watchpoint): Adjust.
4513 (linux_xfer_partial): Delete.
4514 (linux_target_install_ops, linux_target, linux_nat_add_target):
4516 (linux_nat_target::linux_nat_target): New.
4517 * linux-nat.h: Include "inf-ptrace.h".
4518 (linux_nat_target): New.
4519 (linux_target, linux_target_install_ops, linux_nat_add_target):
4520 Delete function declarations.
4521 (linux_target): Declare global.
4522 * linux-thread-db.c (thread_db_target): New.
4523 (thread_db_target::thread_db_target): New.
4524 (thread_db_ops): Delete.
4525 (the_thread_db_target): New.
4526 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4527 (thread_db_update_thread_list, thread_db_pid_to_str)
4528 (thread_db_extra_thread_info)
4529 (thread_db_thread_handle_to_thread_info)
4530 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4531 (thread_db_resume): Refactor as methods of thread_db_target.
4532 (init_thread_db_ops): Delete.
4533 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4534 * x86-linux-nat.c: Don't include "linux-nat.h".
4535 (super_post_startup_inferior): Delete.
4536 (x86_linux_nat_target::~x86_linux_nat_target): New.
4537 (x86_linux_child_post_startup_inferior)
4538 (x86_linux_read_description, x86_linux_enable_btrace)
4539 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4540 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4541 methods of x86_linux_nat_target.
4542 (x86_linux_create_target): Delete. Bits folded ...
4543 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4545 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4546 (x86_linux_nat_target): New class.
4547 (x86_linux_create_target): Delete.
4548 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4549 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4550 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4551 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4552 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4553 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4555 (x86_use_watchpoints): Delete.
4556 * x86-nat.h: Include "breakpoint.h" and "target.h".
4557 (x86_use_watchpoints): Delete.
4558 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4559 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4560 (x86_insert_watchpoint, x86_remove_watchpoint)
4561 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4562 (x86_stopped_by_hw_breakpoint): New declarations.
4563 (x86_nat_target): New template class.
4565 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4566 (the_ppc_linux_nat_target): New.
4567 (ppc_linux_fetch_inferior_registers)
4568 (ppc_linux_can_use_hw_breakpoint)
4569 (ppc_linux_region_ok_for_hw_watchpoint)
4570 (ppc_linux_ranged_break_num_registers)
4571 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4572 (ppc_linux_insert_mask_watchpoint)
4573 (ppc_linux_remove_mask_watchpoint)
4574 (ppc_linux_can_accel_watchpoint_condition)
4575 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4576 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4577 (ppc_linux_watchpoint_addr_within_range)
4578 (ppc_linux_masked_watch_num_registers)
4579 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4580 (ppc_linux_read_description): Refactor as methods of
4581 ppc_linux_nat_target.
4582 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4584 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4585 (procfs_target): New class.
4586 (the_procfs_target): New.
4587 (procfs_target): Delete function.
4588 (procfs_auxv_parse, procfs_attach, procfs_detach)
4589 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4590 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4591 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4592 (procfs_create_inferior, procfs_update_thread_list)
4593 (procfs_thread_alive, procfs_pid_to_str)
4594 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4595 (procfs_stopped_data_address, procfs_insert_watchpoint)
4596 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4597 (proc_find_memory_regions, procfs_info_proc)
4598 (procfs_make_note_section): Refactor as methods of procfs_target.
4599 (_initialize_procfs): Adjust.
4600 * sol-thread.c (sol_thread_target): New class.
4601 (sol_thread_ops): Now a sol_thread_target.
4602 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4603 (sol_thread_fetch_registers, sol_thread_store_registers)
4604 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4605 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4606 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4607 (init_sol_thread_ops): Delete.
4608 (_initialize_sol_thread): Adjust. Remove references to
4609 init_sol_thread_ops and complete_target_initialization.
4611 * windows-nat.c (windows_nat_target): New class.
4612 (windows_fetch_inferior_registers)
4613 (windows_store_inferior_registers, windows_resume, windows_wait)
4614 (windows_attach, windows_detach, windows_pid_to_exec_file)
4615 (windows_files_info, windows_create_inferior)
4616 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4617 (windows_close, windows_pid_to_str, windows_xfer_partial)
4618 (windows_get_tib_address, windows_get_ada_task_ptid)
4619 (windows_thread_name, windows_thread_alive): Refactor as
4620 windows_nat_target methods.
4621 (do_initial_windows_stuff): Adjust.
4622 (windows_target): Delete function.
4623 (_initialize_windows_nat): Adjust.
4625 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4626 (darwin_mourn_inferior, darwin_kill_inferior)
4627 (darwin_create_inferior, darwin_attach, darwin_detach)
4628 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4629 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4630 (darwin_supports_multi_process): Refactor as darwin_nat_target
4632 (darwin_resume_to, darwin_files_info): Delete.
4633 (_initialize_darwin_inferior): Rename to ...
4634 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4635 * darwin-nat.h: Include "inf-child.h".
4636 (darwin_nat_target): New class.
4637 (darwin_complete_target): Delete.
4638 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4639 (darwin_target): New.
4640 (i386_darwin_fetch_inferior_registers)
4641 (i386_darwin_store_inferior_registers): Refactor as methods of
4643 (darwin_complete_target): Delete, with ...
4644 (_initialize_i386_darwin_nat): ... bits factored out here.
4646 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4647 (the_alpha_linux_nat_target): New.
4648 (alpha_linux_register_u_offset): Refactor as
4649 alpha_linux_nat_target method.
4650 (_initialize_alpha_linux_nat): Adjust.
4651 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4652 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4653 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4654 methods of linux_nat_trad_target.
4655 (linux_trad_target): Delete.
4656 * linux-nat-trad.h (linux_trad_target): Delete function.
4657 (linux_nat_trad_target): New class.
4658 * mips-linux-nat.c (mips_linux_nat_target): New class.
4659 (super_fetch_registers, super_store_registers, super_close):
4661 (the_mips_linux_nat_target): New.
4662 (mips64_linux_regsets_fetch_registers)
4663 (mips64_linux_regsets_store_registers)
4664 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4665 (mips_linux_register_u_offset, mips_linux_read_description)
4666 (mips_linux_can_use_hw_breakpoint)
4667 (mips_linux_stopped_by_watchpoint)
4668 (mips_linux_stopped_data_address)
4669 (mips_linux_region_ok_for_hw_watchpoint)
4670 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4671 (mips_linux_close): Refactor as methods of mips_linux_nat.
4672 (_initialize_mips_linux_nat): Adjust to C++ification.
4674 * aix-thread.c (aix_thread_target): New class.
4675 (aix_thread_ops): Now an aix_thread_target.
4676 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4677 (aix_thread_fetch_registers, aix_thread_store_registers)
4678 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4679 (aix_thread_thread_alive, aix_thread_pid_to_str)
4680 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4681 Refactor as methods of aix_thread_target.
4682 (init_aix_thread_ops): Delete.
4683 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4684 and complete_target_initialization.
4685 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4686 (rs6000_nat_target): New class.
4687 (the_rs6000_nat_target): New.
4688 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4689 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4690 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4691 (super_create_inferior): Delete.
4692 (_initialize_rs6000_nat): Adjust to C++ification.
4694 * arm-linux-nat.c (arm_linux_nat_target): New class.
4695 (the_arm_linux_nat_target): New.
4696 (arm_linux_fetch_inferior_registers)
4697 (arm_linux_store_inferior_registers, arm_linux_read_description)
4698 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4699 (arm_linux_remove_hw_breakpoint)
4700 (arm_linux_region_ok_for_hw_watchpoint)
4701 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4702 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4703 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4704 arm_linux_nat_target.
4705 (_initialize_arm_linux_nat): Adjust to C++ification.
4707 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4708 (the_aarch64_linux_nat_target): New.
4709 (aarch64_linux_fetch_inferior_registers)
4710 (aarch64_linux_store_inferior_registers)
4711 (aarch64_linux_child_post_startup_inferior)
4712 (aarch64_linux_read_description)
4713 (aarch64_linux_can_use_hw_breakpoint)
4714 (aarch64_linux_insert_hw_breakpoint)
4715 (aarch64_linux_remove_hw_breakpoint)
4716 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4717 (aarch64_linux_region_ok_for_hw_watchpoint)
4718 (aarch64_linux_stopped_data_address)
4719 (aarch64_linux_stopped_by_watchpoint)
4720 (aarch64_linux_watchpoint_addr_within_range)
4721 (aarch64_linux_can_do_single_step): Refactor as methods of
4722 aarch64_linux_nat_target.
4723 (super_post_startup_inferior): Delete.
4724 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4726 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4727 (the_hppa_linux_nat_target): New.
4728 (hppa_linux_fetch_inferior_registers)
4729 (hppa_linux_store_inferior_registers): Refactor as methods of
4730 hppa_linux_nat_target.
4731 (_initialize_hppa_linux_nat): Adjust to C++ification.
4733 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4734 (the_ia64_linux_nat_target): New.
4735 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4736 (ia64_linux_stopped_data_address)
4737 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4738 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4739 ia64_linux_nat_target methods.
4740 (super_xfer_partial): Delete.
4741 (_initialize_ia64_linux_nat): Adjust to C++ification.
4743 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4744 (the_m32r_linux_nat_target): New.
4745 (m32r_linux_fetch_inferior_registers)
4746 (m32r_linux_store_inferior_registers): Refactor as
4747 m32r_linux_nat_target methods.
4748 (_initialize_m32r_linux_nat): Adjust to C++ification.
4750 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4751 (the_m68k_linux_nat_target): New.
4752 (m68k_linux_fetch_inferior_registers)
4753 (m68k_linux_store_inferior_registers): Refactor as
4754 m68k_linux_nat_target methods.
4755 (_initialize_m68k_linux_nat): Adjust to C++ification.
4757 * s390-linux-nat.c (s390_linux_nat_target): New class.
4758 (the_s390_linux_nat_target): New.
4759 (s390_linux_fetch_inferior_registers)
4760 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4761 (s390_insert_watchpoint, s390_remove_watchpoint)
4762 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4763 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4764 (s390_auxv_parse, s390_read_description): Refactor as methods of
4765 s390_linux_nat_target.
4766 (_initialize_s390_nat): Adjust to C++ification.
4768 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4769 (the_sparc_linux_nat_target): New.
4770 (_initialize_sparc_linux_nat): Adjust to C++ification.
4771 * sparc-nat.c (sparc_fetch_inferior_registers)
4772 (sparc_store_inferior_registers): Remove target_ops parameter.
4773 * sparc-nat.h (sparc_fetch_inferior_registers)
4774 (sparc_store_inferior_registers): Remove target_ops parameter.
4775 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4776 (the_sparc64_linux_nat_target): New.
4777 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4779 * spu-linux-nat.c (spu_linux_nat_target): New class.
4780 (the_spu_linux_nat_target): New.
4781 (spu_child_post_startup_inferior, spu_child_post_attach)
4782 (spu_child_wait, spu_fetch_inferior_registers)
4783 (spu_store_inferior_registers, spu_xfer_partial)
4784 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4786 (_initialize_spu_nat): Adjust to C++ification.
4788 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4789 (the_tilegx_linux_nat_target): New.
4790 (fetch_inferior_registers, store_inferior_registers):
4791 Refactor as methods.
4792 (_initialize_tile_linux_nat): Adjust to C++ification.
4794 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4795 (the_xtensa_linux_nat_target): New.
4796 (xtensa_linux_fetch_inferior_registers)
4797 (xtensa_linux_store_inferior_registers): Refactor as
4798 xtensa_linux_nat_target methods.
4799 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4801 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4802 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4803 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4804 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4805 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4806 (fbsd_stopped_by_sw_breakpoint)
4807 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4808 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4809 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4810 (fbsd_post_startup_inferior, fbsd_post_attach)
4811 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4812 (fbsd_set_syscall_catchpoint)
4813 (super_xfer_partial, super_resume, super_wait)
4814 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4815 (fbsd_handle_debug_trap): Remove target_ops parameter.
4816 (fbsd_nat_add_target): Delete.
4817 * fbsd-nat.h: Include "inf-ptrace.h".
4818 (fbsd_nat_add_target): Delete.
4819 (USE_SIGTRAP_SIGINFO): Define.
4820 (fbsd_nat_target): New class.
4822 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4823 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4824 (amd64bsd_target): Delete.
4825 * amd64-bsd-nat.h: New file.
4826 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4828 (amd64_fbsd_nat_target): New class.
4829 (the_amd64_fbsd_nat_target): New.
4830 (amd64fbsd_read_description): Refactor as method of
4831 amd64_fbsd_nat_target.
4832 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4833 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4834 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4835 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4836 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4837 (i386bsd_target): Delete.
4838 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4839 (i386bsd_fetch_inferior_registers)
4840 (i386bsd_store_inferior_registers): Declare.
4841 (i386_bsd_nat_target): New class.
4842 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4843 (the_i386_fbsd_nat_target): New.
4844 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4845 i386_fbsd_nat_target methods.
4846 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4847 (_initialize_i386fbsd_nat): Adjust to C++ification.
4848 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4849 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4850 (_initialize_x86_bsd_nat): Adjust to C++ification.
4851 * x86-bsd-nat.h: Include "x86-nat.h".
4852 (x86bsd_target): Delete declaration.
4853 (x86bsd_nat_target): New class.
4855 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4856 (the_aarch64_fbsd_nat_target): New.
4857 (aarch64_fbsd_fetch_inferior_registers)
4858 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4859 aarch64_fbsd_nat_target.
4860 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4861 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4862 (the_alpha_bsd_nat_target): New.
4863 (alphabsd_fetch_inferior_registers)
4864 (alphabsd_store_inferior_registers): Refactor as
4865 alpha_bsd_nat_target methods.
4866 (_initialize_alphabsd_nat): Refactor as methods of
4867 alpha_bsd_nat_target.
4868 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4869 (the_amd64_nbsd_nat_target): New.
4870 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4871 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4872 (the_amd64_obsd_nat_target): New.
4873 (_initialize_amd64obsd_nat): Adjust to C++ification.
4874 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4875 (the_arm_fbsd_nat_target): New.
4876 (arm_fbsd_fetch_inferior_registers)
4877 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4878 (_initialize_arm_fbsd_nat): Refactor as methods of
4879 arm_fbsd_nat_target.
4880 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4881 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4882 (the_arm_netbsd_nat_target): New.
4883 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4884 arm_netbsd_nat_target.
4885 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4886 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4887 (the_hppa_nbsd_nat_target): New.
4888 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4889 hppa_nbsd_nat_target methods.
4890 (_initialize_hppanbsd_nat): Adjust to C++ification.
4891 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4892 (the_hppa_obsd_nat_target): New.
4893 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4894 methods of hppa_obsd_nat_target.
4895 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4897 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4898 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4900 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4901 (_initialize_i386obsd_nat): Use add_target.
4902 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4903 (the_m68k_bsd_nat_target): New.
4904 (m68kbsd_fetch_inferior_registers)
4905 (m68kbsd_store_inferior_registers): Refactor as methods of
4906 m68k_bsd_nat_target.
4907 (_initialize_m68kbsd_nat): Adjust to C++ification.
4908 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4909 (the_mips_fbsd_nat_target): New.
4910 (mips_fbsd_fetch_inferior_registers)
4911 (mips_fbsd_store_inferior_registers): Refactor as methods of
4912 mips_fbsd_nat_target.
4913 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4915 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4916 (the_mips_nbsd_nat_target): New.
4917 (mipsnbsd_fetch_inferior_registers)
4918 (mipsnbsd_store_inferior_registers): Refactor as methods of
4919 mips_nbsd_nat_target.
4920 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4921 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4922 (the_mips64_obsd_nat_target): New.
4923 (mips64obsd_fetch_inferior_registers)
4924 (mips64obsd_store_inferior_registers): Refactor as methods of
4925 mips64_obsd_nat_target.
4926 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4928 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4930 * nbsd-nat.h: Include "inf-ptrace.h".
4931 (nbsd_nat_target): New class.
4932 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4933 (obsd_wait): Refactor as methods of obsd_nat_target.
4934 (obsd_add_target): Delete.
4935 * obsd-nat.h: Include "inf-ptrace.h".
4936 (obsd_nat_target): New class.
4937 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4938 (the_ppc_fbsd_nat_target): New.
4939 (ppcfbsd_fetch_inferior_registers)
4940 (ppcfbsd_store_inferior_registers): Refactor as methods of
4941 ppc_fbsd_nat_target.
4942 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4944 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4945 (the_ppc_nbsd_nat_target): New.
4946 (ppcnbsd_fetch_inferior_registers)
4947 (ppcnbsd_store_inferior_registers): Refactor as methods of
4948 ppc_nbsd_nat_target.
4949 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4950 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4951 (the_ppc_obsd_nat_target): New.
4952 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4953 methods of ppc_obsd_nat_target.
4954 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4956 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4957 (the_sh_nbsd_nat_target): New.
4958 (shnbsd_fetch_inferior_registers)
4959 (shnbsd_store_inferior_registers): Refactor as methods of
4961 (_initialize_shnbsd_nat): Adjust to C++ification.
4962 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4963 (inf_ptrace_xfer_partial): Delete.
4964 (sparc_xfer_partial, sparc_target): Delete.
4965 * sparc-nat.h (sparc_fetch_inferior_registers)
4966 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4967 (sparc_target): Delete function declaration.
4968 (sparc_target): New template class.
4969 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4970 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4971 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4972 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4974 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4975 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4976 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4977 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4979 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4980 (the_vax_bsd_nat_target): New.
4981 (vaxbsd_fetch_inferior_registers)
4982 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4984 (_initialize_vaxbsd_nat): Adjust to C++ification.
4986 * bsd-kvm.c (bsd_kvm_target): New class.
4987 (bsd_kvm_ops): Now a bsd_kvm_target.
4988 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4989 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4990 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4992 (bsd_kvm_return_one): Delete.
4993 (bsd_kvm_add_target): Adjust to C++ification.
4995 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4996 (nto_procfs_target_procfs): New classes.
4997 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4998 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4999 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5000 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5001 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5002 (procfs_remove_hw_breakpoint, procfs_resume)
5003 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5004 (procfs_kill_inferior, procfs_store_registers)
5005 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5006 as methods of nto_procfs_target.
5007 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5008 (nto_native_ops): Delete.
5009 (procfs_open, procfs_native_open): Delete.
5010 (nto_native_ops): Now an nto_procfs_target_native.
5011 (init_procfs_targets): Adjust to C++ification.
5012 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5013 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5014 Refactor as methods of nto_procfs_target.
5016 * go32-nat.c (go32_nat_target): New class.
5017 (the_go32_nat_target): New.
5018 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5019 (go32_store_registers, go32_xfer_partial, go32_files_info)
5020 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5021 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5022 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5023 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5024 (go32_target): Delete.
5025 (_initialize_go32_nat): Adjust to C++ification.
5027 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5028 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5029 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5030 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5032 (gnu_target): Delete.
5033 * gnu-nat.h (gnu_target): Delete.
5034 (gnu_nat_target): New class.
5035 * i386-gnu-nat.c (gnu_base_target): New.
5036 (i386_gnu_nat_target): New class.
5037 (the_i386_gnu_nat_target): New.
5038 (_initialize_i386gnu_nat): Adjust to C++ification.
5040 2018-05-02 Pedro Alves <palves@redhat.com>
5042 * bfd-target.c (target_bfd_xclose): Rename to ...
5043 (target_bfd_close): ... this.
5044 (target_bfd_reopen): Adjust.
5045 * target.c (target_close): Remove references to to_xclose.
5046 * target.h (target_ops::to_xclose): Delete.
5047 (target_ops::to_close): Update comments.
5049 2018-05-02 Pedro Alves <palves@redhat.com>
5051 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5053 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5054 * inf-ptrace.c (inf_ptrace_register_u_offset)
5055 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5056 (inf_ptrace_store_register, inf_ptrace_store_registers)
5057 (inf_ptrace_trad_target): Move to ...
5058 * linux-nat-trad.c: ... this new file.
5059 * linux-nat-trad.h: New file.
5060 * linux-nat.c (linux_target_install_ops): Make extern.
5061 (linux_trad_target): Delete.
5062 * linux-nat.h (linux_trad_target): Delete declaration.
5063 (linux_target_install_ops): Declare.
5064 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5067 2018-05-02 Pedro Alves <palves@redhat.com>
5069 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5070 procfs_target/add_target here.
5071 * procfs.c (procfs_target): Make static.
5072 (_initialize_procfs): Call add_target here.
5073 * procfs.h (struct target_ops): Remove forward declaration.
5074 (procfs_target): Remove declaration.
5075 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5077 2018-05-02 Pedro Alves <palves@redhat.com>
5079 * procfs.c (procfs_stopped_by_watchpoint)
5080 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5081 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5083 (procfs_use_watchpoints): Delete, move contents...
5084 (procfs_target): ... here.
5085 * procfs.h (procfs_use_watchpoints): Delete declaration.
5086 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5087 procfs_use_watchpoints.
5088 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5089 procfs_use_watchpoints.
5091 2018-05-02 Tom Tromey <tom@tromey.com>
5094 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5095 and var_zuinteger_unlimited.
5096 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5097 and PARAM_ZUINTEGER_UNLIMITED.
5098 (set_parameter_value): Handle var_zuinteger and
5099 var_zuinteger_unlimited.
5100 (add_setshow_generic): Likewise.
5101 (parmpy_init): Likewise.
5103 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5106 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5107 pointer is not null before dereferencing it.
5109 2018-04-30 Tom Tromey <tom@tromey.com>
5111 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5114 2018-04-30 Tom Tromey <tom@tromey.com>
5116 * breakpoint.c (mention): Remove use of is_mi_like_p.
5117 (print_mention_ranged_breakpoint): Likewise.
5118 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5121 2018-04-30 Tom Tromey <tom@tromey.com>
5123 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5125 2018-04-30 Tom Tromey <tom@tromey.com>
5127 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5128 (info_spu_event_command): Remove some uses of is_mi_like_p.
5130 2018-04-30 Tom Tromey <tom@tromey.com>
5132 * python/py-framefilter.c (py_print_single_arg)
5133 (enumerate_locals, py_print_args, py_print_frame): Remove some
5134 uses of is_mi_like_p.
5136 2018-04-30 Tom Tromey <tom@tromey.com>
5139 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5140 * ui-out.h (ui_out::is_mi_like_p): Now const.
5141 (ui_out::do_is_mi_like_p): Now const.
5142 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5144 2018-04-30 Tom Tromey <tom@tromey.com>
5146 * varobj.c (varobj_set_visualizer): Use new_reference.
5147 * python/python.c (gdbpy_decode_line): Use new_reference.
5148 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5151 2018-04-30 Tom Tromey <tom@tromey.com>
5153 * varobj.c (install_new_value): Use new_reference.
5154 * value.h (value_incref): Return void. Swap intro comment with
5156 * value.c (set_value_parent): Use new_reference.
5157 (value_incref): Return void. Update intro comment.
5158 (release_value): Use new_reference.
5159 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5161 2018-04-30 Tom Tromey <tom@tromey.com>
5163 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5164 * gdb_bfd.h (new_bfd_ref): Remove.
5165 (gdb_bfd_open): Update comment.
5166 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5167 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5168 (gdb_bfd_fdopenr): Use new_reference.
5169 * exec.c (exec_file_attach): Use new_reference.
5171 2018-04-30 Tom Tromey <tom@tromey.com>
5173 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5176 2018-04-30 Tom Tromey <tom@tromey.com>
5178 * jit.c (jit_read_code_entry): Use type_align.
5179 * i386-tdep.c (i386_gdbarch_init): Don't call
5180 set_gdbarch_long_long_align_bit.
5181 * gdbarch.sh: Remove long_long_align_bit.
5182 * gdbarch.c, gdbarch.h: Rebuild.
5183 * arc-tdep.c (arc_type_align): New function.
5184 (arc_gdbarch_init): Use arc_type_align. Don't call
5185 set_gdbarch_long_long_align_bit.
5187 2018-04-30 Tom Tromey <tom@tromey.com>
5189 * rust-lang.c (rust_type_alignment): Remove.
5190 (rust_composite_type): Use type_align.
5192 2018-04-30 Tom Tromey <tom@tromey.com>
5194 * NEWS: Mention Type.align.
5195 * python/py-type.c (typy_get_alignof): New function.
5196 (type_object_getset): Add "alignof".
5198 2018-04-30 Tom Tromey <tom@tromey.com>
5202 * std-operator.def (UNOP_ALIGNOF): New operator.
5203 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5205 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5206 * c-lang.c (c_op_print_tab): Add alignof.
5207 * c-exp.y (ALIGNOF): New token.
5208 (exp): Add "ALIGNOF" production.
5209 (ident_tokens): Add _Alignof and alignof.
5211 2018-04-30 Tom Tromey <tom@tromey.com>
5213 * i386-tdep.c (i386_type_align): New function.
5214 (i386_gdbarch_init): Update.
5215 * gdbarch.sh (type_align): New method.
5216 * gdbarch.c, gdbarch.h: Rebuild.
5217 * arch-utils.h (default_type_align): Declare.
5218 * arch-utils.c (default_type_align): New function.
5219 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5220 (struct type) <align_log2>: New field.
5221 <instance_flags>: Now a bitfield.
5222 (TYPE_RAW_ALIGN): New macro.
5223 (type_align, type_raw_align, set_type_align): Declare.
5224 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5226 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5227 (get_alignment, maybe_set_alignment): New functions.
5228 (read_structure_type, read_enumeration_type, read_array_type)
5229 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5230 (read_subrange_type, read_base_type): Set type alignment.
5232 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5234 * dwarf2read.c (read_index_from_section): Use bool.
5236 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5239 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5242 2018-04-29 John Reiser <jreiser@BitWagon.com>
5245 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5246 last step, and do it atomically.
5248 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5250 * compile/compile-c-types.c (convert_int, convert_float):
5253 2018-04-27 Tom Tromey <tom@tromey.com>
5256 * rust-lang.c (rust_inclusive_range_type_p): New function.
5257 (rust_range): Handle inclusive ranges.
5258 (rust_compute_range): Likewise.
5259 * rust-exp.y (struct rust_op) <inclusive>: New field.
5260 (DOTDOTEQ): New constant.
5261 (range_expr): Add "..=" productions.
5262 (operator_tokens): Add "..=" token.
5263 (ast_range): Add "inclusive" parameter.
5264 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5266 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5268 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5269 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5271 * expprint.c (print_subexp_standard): Handle new bounds values.
5272 (dump_subexp_body_standard): Likewise.
5274 2018-04-27 Tom Tromey <tom@tromey.com>
5276 * configure: Rebuild.
5277 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5278 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5280 (class symbol_needs_eval_context): Likewise.
5281 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5282 (mock_mapped_index::symbol_name_at): Use "override". Remove
5284 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5286 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5287 * aarch64-tdep.c (instruction_reader::read): Use "override".
5288 (instruction_reader_test::read): Likewise.
5289 * arm-tdep.c (instruction_reader::read): Use "override".
5290 (instruction_reader_thumb::read): Likewise.
5292 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5295 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5296 instead of remote_send.
5297 (remote_send): Remove.
5299 2018-04-26 Pedro Alves <palves@redhat.com>
5301 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5302 find_function_start_sal instead of find_pc_line.
5304 2018-04-26 Pedro Alves <palves@redhat.com>
5306 * breakpoint.c (set_breakpoint_location_function): Handle
5308 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5309 * elfread.c (elf_symtab_read): Give data symbols with
5310 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5311 (elf_rel_plt_read): Update comment.
5312 * linespec.c (convert_linespec_to_sals): Handle
5314 (minsym_found): Handle mst_data_gnu_ifunc.
5315 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5316 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5317 * parse.c (find_minsym_type_and_address): Handle
5319 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5320 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5321 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5323 <mst_data_gnu_ifunc>: New enumerator.
5325 2018-04-26 Pedro Alves <palves@redhat.com>
5327 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5328 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5329 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5331 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5332 (lookup_minimal_symbol_by_pc): Adjust.
5333 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5334 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5335 * minsyms.h (lookup_msym_prefer): New enum.
5336 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5337 parameter by a lookup_msym_prefer parameter.
5339 2018-04-26 Pedro Alves <palves@redhat.com>
5341 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5342 ends in "@plt" instead of looking at the symbol's section.
5344 2018-04-26 Pedro Alves <palves@redhat.com>
5346 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5348 (find_pc_partial_function_gnu_ifunc): Rename to ...
5349 (find_pc_partial_function): ... this, and remove references to
5351 (find_pc_partial_function): Delete old implementation.
5352 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5354 2018-04-26 Pedro Alves <palves@redhat.com>
5356 * linespec.c (struct bound_minimal_symbol_search_key): New.
5357 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5358 skip first line if we found a GNU ifunc minimal symbol by name.
5359 (compare_msymbols): Change parameters to work with a destructured
5361 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5364 2018-04-26 Pedro Alves <palves@redhat.com>
5366 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5367 ifunc targets here. Instead, if we have an ifunc minsym, use its
5369 (add_location_to_breakpoint): Store the minsym and the objfile in
5370 the breakpoint location.
5371 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5372 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5373 Record the minsym in the sal.
5374 * symtab.h (symtab_and_line) <msymbol>: New field.
5376 2018-04-26 Pedro Alves <palves@redhat.com>
5378 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5379 unless we actually resolved the ifunc.
5381 2018-04-26 Pedro Alves <palves@redhat.com>
5383 * c-exp.y (variable production): Prefer ifunc minsyms over
5384 regular function symbols.
5385 * symtab.c (find_gnu_ifunc): New function.
5386 * minsyms.h (lookup_msym_prefer): New enum.
5387 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5388 parameter by a lookup_msym_prefer parameter.
5389 * symtab.h (find_gnu_ifunc): New declaration.
5391 2018-04-26 Pedro Alves <palves@redhat.com>
5393 * blockframe.c (find_gnu_ifunc_target_type): New function.
5394 (find_function_type): New.
5395 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5396 return a value with a memory address.
5397 (eval_call): For calls to GNU ifunc functions, try to find the
5398 type of the target function from the type that the resolver
5400 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5402 * infcall.c (find_function_return_type): Delete.
5403 (find_function_addr): Add 'function_type' parameter. For calls to
5404 GNU ifunc functions, try to find the type of the target function
5405 from the type that the resolver returns, and return it via
5407 (call_function_by_hand_dummy): Adjust to use the function type
5408 returned by find_function_addr.
5409 (find_function_addr): Add 'function_type' parameter and move
5411 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5414 2018-04-26 Pedro Alves <palves@redhat.com>
5416 * c-exp.y (variable production): Skip finding an alias for ifunc
5419 2018-04-26 Pedro Alves <palves@redhat.com>
5421 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5423 2018-04-25 Pedro Alves <palves@redhat.com>
5425 * infcmd.c (kill_command): Print the pid as string, not the whole
5426 thread's ptid. Add comment. s/has been killed/killed/ in output
5428 * remote.c (remote_detach_1): Print the pid as string, not the
5429 whole thread's ptid.
5431 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5432 Sergio Durigan Junior <sergiodj@redhat.com>
5433 Pedro Alves <palves@redhat.com>
5435 * infcmd.c (kill_command): Print message when inferior has
5437 * inferior.c (print_inferior_events): Remove 'static'. Set as
5439 (add_inferior): Improve message printed when
5440 'print_inferior_events' is on.
5441 (exit_inferior): Remove message printed when
5442 'print_inferior_events' is on.
5443 (detach_inferior): Improve message printed when
5444 'print_inferior_events' is on.
5445 (initialize_inferiors): Use 'add_inferior_silent' to set
5446 'current_inferior_'.
5447 * inferior.h (print_inferior_events): Declare here as
5449 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5450 '[Detaching...]' messages when 'print_inferior_events' is on.
5451 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5452 as prefix/suffix for messages. Remove periods. Fix erroneous
5453 'Detaching after fork from child...', replace it by '... from
5455 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5456 prefix/suffix when printing 'Detaching...' messages. Print
5457 them when 'print_inferior_events' is on.
5458 * remote.c (remote_detach_1): Print message when detaching
5459 from inferior and '!is_fork_parent'.
5461 2018-04-24 Tom Tromey <tom@tromey.com>
5463 * cli-out.h: Reindent.
5465 2018-04-24 Tom Tromey <tom@tromey.com>
5467 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5468 (cli_ui_out::do_field_string): Use fputs_filtered.
5469 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5471 2018-04-23 Tom Tromey <tom@tromey.com>
5473 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5474 gdb::unique_xmalloc_ptr.
5476 2018-04-23 Tom Tromey <tom@tromey.com>
5478 * configure: Rebuild.
5480 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5483 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5484 prepare_for_testing. Set normal_bp to r_debug_state if target
5487 2018-04-21 Pedro Alves <palves@redhat.com>
5488 Rajendra SY <rajendra.sy@gmail.com>
5490 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5491 * remote.c (extended_remote_attach): In all-stop mode, mark the
5492 thread as executing.
5494 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5496 * thread.c (thread_apply_all_command): Fix comment.
5497 (thread_command): Fix comment.
5499 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5501 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5503 * features/aarch64-core.c (create_feature_aarch64_core):
5505 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5507 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5509 * features/i386/32bit-avx512.c
5510 (create_feature_i386_32bit_avx512): Likewise.
5511 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5513 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5515 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5517 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5519 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5521 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5523 * features/i386/64bit-avx512.c
5524 (create_feature_i386_64bit_avx512): Likewise.
5525 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5527 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5529 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5531 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5533 * features/i386/64bit-segments.c
5534 (create_feature_i386_64bit_segments): Likewise.
5535 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5537 * features/i386/x32-core.c
5538 (create_feature_i386_x32_core): Likewise.
5539 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5540 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5541 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5542 * target-descriptions.c: In generated code, don't pass xml
5545 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5547 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5548 (print_xml_feature::visit_post): Likewise.
5549 (print_xml_feature::visit): Likewise.
5550 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5551 (print_xml_feature): Add new class.
5552 * regformats/regdat.sh: Null xmltarget on feature targets.
5553 * target-descriptions.c (struct target_desc): Add xmltarget.
5554 (maintenance_check_tdesc_xml_convert): Add unittest function.
5555 (tdesc_get_features_xml): Add function to get xml.
5556 (maintenance_check_xml_descriptions): Test xml generation.
5557 * xml-tdesc.c (string_read_description_xml): Add function.
5558 * xml-tdesc.h (string_read_description_xml): Add declaration.
5560 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5562 * features/Makefile: Add feature marker to targets with new style
5563 target descriptions.
5564 * regformats/aarch64.dat: Regenerate.
5565 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5566 * regformats/i386/amd64-avx-linux.dat: Likewise.
5567 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5568 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5569 * regformats/i386/amd64-linux.dat: Likewise.
5570 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5571 * regformats/i386/amd64.dat: Likewise.
5572 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5573 * regformats/i386/i386-avx-linux.dat: Likewise.
5574 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5575 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5576 * regformats/i386/i386-linux.dat: Likewise.
5577 * regformats/i386/i386-mmx-linux.dat: Likewise.
5578 * regformats/i386/i386-mpx-linux.dat: Likewise.
5579 * regformats/i386/i386.dat: Likewise.
5580 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5581 * regformats/i386/x32-avx-linux.dat: Likewise.
5582 * regformats/i386/x32-linux.dat: Likewise.
5583 * regformats/tic6x-c62x-linux.dat: Likewise.
5584 * regformats/tic6x-c64x-linux.dat: Likewise.
5585 * regformats/tic6x-c64xp-linux.dat: Likewise.
5586 * regformats/regdat.sh: Parse feature marker.
5588 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5590 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5591 (tdesc_osabi_name): Likewise.
5592 * target-descriptions.c (tdesc_architecture_name): Add new
5594 (tdesc_osabi_name): Likewise.
5596 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5598 * common/tdesc.c (tdesc_predefined_type): Move to here.
5599 (tdesc_named_type): Likewise.
5600 (tdesc_create_vector): Likewise.
5601 (tdesc_create_struct): Likewise.
5602 (tdesc_set_struct_size): Likewise.
5603 (tdesc_create_union): Likewise.
5604 (tdesc_create_flags): Likewise.
5605 (tdesc_create_enum): Likewise.
5606 (tdesc_add_field): Likewise.
5607 (tdesc_add_typed_bitfield): Likewise.
5608 (tdesc_add_bitfield): Likewise.
5609 (tdesc_add_flag): Likewise.
5610 (tdesc_add_enum_value): Likewise.
5611 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5612 (struct tdesc_type_vector): Likewise.
5613 (struct tdesc_type_field): Likewise.
5614 (struct tdesc_type_with_fields): Likewise.
5615 (tdesc_create_enum): Add declaration.
5616 (tdesc_add_typed_bitfield): Likewise.
5617 (tdesc_add_enum_value): Likewise.
5618 * target-descriptions.c (tdesc_type_field): Move from here.
5619 (tdesc_type_builtin): Likewise.
5620 (tdesc_type_vector): Likewise.
5621 (tdesc_type_with_fields): Likewise.
5622 (tdesc_predefined_types): Likewise.
5623 (tdesc_named_type): Likewise.
5624 (tdesc_create_vector): Likewise.
5625 (tdesc_create_struct): Likewise.
5626 (tdesc_set_struct_size): Likewise.
5627 (tdesc_create_union): Likewise.
5628 (tdesc_create_flags): Likewise.
5629 (tdesc_create_enum): Likewise.
5630 (tdesc_add_field): Likewise.
5631 (tdesc_add_typed_bitfield): Likewise.
5632 (tdesc_add_bitfield): Likewise.
5633 (tdesc_add_flag): Likewise.
5634 (tdesc_add_enum_value): Likewise.
5635 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5636 (tdesc_add_typed_bitfield): Likewise.
5637 (tdesc_add_enum_value): Likewise.
5639 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5641 * common/tdesc.c (tdesc_feature::accept): Move to here.
5642 (tdesc_feature::operator==): Likewise.
5643 (tdesc_create_reg): Likewise.
5644 * common/tdesc.h (tdesc_type_kind): Likewise.
5645 (struct tdesc_type): Likewise.
5646 (struct tdesc_feature): Likewise.
5647 * regformats/regdat.sh: Create a feature.
5648 * target-descriptions.c (tdesc_type_kind): Move from here.
5649 (tdesc_type): Likewise.
5650 (tdesc_type_up): Likewise.
5651 (tdesc_feature): Likewise.
5652 (tdesc_create_reg): Likewise.
5654 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5656 * Makefile.in: Add arch/tdesc.c
5657 * common/tdesc.c: New file.
5658 * common/tdesc.h (tdesc_element_visitor): Move to here.
5659 (tdesc_element): Likewise.
5660 (tdesc_reg): Likewise.
5661 (tdesc_reg_up): Likewise.
5662 * regformats/regdef.h (reg): Add offset to constructors.
5663 * target-descriptions.c (tdesc_element_visitor): Move from here.
5664 (tdesc_element): Likewise.
5665 (tdesc_reg): Likewise.
5666 (tdesc_reg_up): Likewise.
5668 2018-04-17 Tom Tromey <tom@tromey.com>
5670 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5673 2018-04-17 Tom Tromey <tom@tromey.com>
5675 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5677 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5679 * symtab.c (print_symbol_info): Skip printing filename and line
5680 number when `last' is NULL.
5681 (symtab_symbol_info): Use empty string instead of NULL for first
5682 invocation of print_symbol_info.
5683 (rbreak_command): Pass NULL to `last' parameter of
5686 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5688 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5691 2018-04-16 Pedro Alves <palves@redhat.com>
5693 * MAINTAINERS (sh): Remove.
5694 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5695 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5696 (ALLDEPFILES): Remove sh64-tdep.c.
5697 * NEWS: Mentions that support for SH-5/SH64 is removed.
5698 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5699 (sh*-*-openbsd*): Ditto.
5700 (sh64-*-elf*): Remove.
5702 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5703 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5704 * sh-tdep.c: No longer include "sh64-tdep.h".
5705 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5706 * sh64-tdep.c, sh64-tdep.h: Remove files.
5708 2018-04-16 Pedro Alves <palves@redhat.com>
5710 * MAINTAINERS: Remove m88k.
5711 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5712 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5713 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5714 * NEWS: Mention that support for m88k was removed.
5715 * configure.host (m88*-*-*): Remove support.
5716 * configure.nat (m88k-*-*): Remove support.
5717 * configure.tgt (m88*-*-openbsd*): Remove.
5718 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5720 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5722 * configure.tgt (x86_tobjs): New variable.
5723 (amd64_tobjs, i386_tobjs): Use it.
5725 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5727 * symtab.c (print_symbol_info): Precede the symbol definition by
5728 the line number when available.
5729 * NEWS: Advertise this enhancement.
5731 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5733 * NEWS (New options): announce set/show record btrace cpu.
5734 * btrace.c: Include record-btrace.h.
5735 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5736 the vendor is unknown.
5737 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5738 Maybe overwrite the btrace configuration's cpu.
5739 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5740 (btrace_fetch): Add cpu parameter. Update callers.
5741 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5742 Maybe overwrite the btrace configuration's cpu. Skip enabling
5743 errata workarounds if the vendor is unknown.
5744 * python/py-record-btrace.c: Include record-btrace.h.
5745 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5746 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5747 * record-btrace.c (record_btrace_cpu_state_kind): New.
5748 (record_btrace_cpu): New.
5749 (set_record_btrace_cpu_cmdlist): New.
5750 (record_btrace_get_cpu): New.
5751 (require_btrace_thread, record_btrace_info)
5752 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5753 (cmd_set_record_btrace_cpu_none): New.
5754 (cmd_set_record_btrace_cpu_auto): New.
5755 (cmd_set_record_btrace_cpu): New.
5756 (cmd_show_record_btrace_cpu): New.
5757 (_initialize_record_btrace): Initialize set/show record btrace cpu
5759 * record-btrace.h (record_btrace_get_cpu): New.
5761 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5763 * record.c (set_record_command): Fix typo in message.
5765 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5767 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5769 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5771 * infrun.c (process_event_stop_test): Call
5772 gdbarch_in_indirect_branch_thunk.
5773 * gdbarch.sh (in_indirect_branch_thunk): New.
5774 * gdbarch.c: Regenerated.
5775 * gdbarch.h: Regenerated.
5778 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5779 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5780 (ALLDEPFILES): Add x86-tdep.c.
5781 * arch-utils.h (default_in_indirect_branch_thunk): New.
5782 * arch-utils.c (default_in_indirect_branch_thunk): New.
5783 * i386-tdep: Include x86-tdep.h.
5784 (i386_in_indirect_branch_thunk): New.
5785 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5787 * amd64-tdep: Include x86-tdep.h.
5788 (amd64_in_indirect_branch_thunk): New.
5789 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5791 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5794 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5795 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5796 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5799 2018-04-12 Tom Tromey <tom@tromey.com>
5801 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5802 (rust_evaluate_subexp): Likewise.
5804 2018-04-12 Pedro Alves <palves@redhat.com>
5806 * procfs.c (procfs_detach): Make forward declaration's prototype
5807 match definition's protototype.
5808 (proc_get_LDT_entry): Remove stale do_cleanups call.
5810 2018-04-12 Pedro Alves <palves@redhat.com>
5812 * target.h (target_ops::to_has_exited): Delete.
5813 (target_has_exited): Delete.
5814 * target-delegates.c: Regenerate.
5816 2018-04-11 Pedro Alves <palves@redhat.com>
5818 * target.c (fileio_fh_t::t): Add comment.
5819 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5820 (target_fileio_close): Handle a NULL target.
5821 (invalidate_fileio_fh): New.
5822 (target_close): Call it.
5823 * remote.c (remote_hostio_send_command): No longer check whether
5824 remote_desc is open.
5826 2018-04-11 Pedro Alves <palves@redhat.com>
5828 * target.c (fileio_fh_t): Make it a named struct instead of a
5830 (fileio_fh_t::is_closed): New method.
5831 (DEF_VEC_O (fileio_fh_t)): Remove.
5832 (fileio_fhandles): Now a std::vector.
5833 (is_closed_fileio_fh): Delete.
5834 (acquire_fileio_fd): Adjust. Rename parameters.
5835 (release_fileio_fd): Adjust.
5836 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5837 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5838 (target_fileio_close): Adjust.
5840 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5842 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5845 2018-04-10 Pedro Alves <palves@redhat.com>
5847 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5848 (scoped_finish_thread_state): New class.
5849 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5851 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5852 (fetch_inferior_event, normal_stop): Likewise.
5853 * thread.c (finish_thread_state_cleanup): Delete.
5855 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5856 Pedro Alves <palves@redhat.com>
5858 * value.c: Include "selftest.h" and "common/array-view.h".
5859 (struct range) <operator ==>: New.
5860 (test_ranges_contain): New.
5861 (check_ranges_vector): New.
5862 (test_insert_into_bit_range_vector): New.
5863 (_initialize_values): Register selftests.
5864 * common/array-view.h (operator==, operator!=): New.
5866 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5868 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5870 * inline-frame.c: Include <algorithm>.
5871 (struct inline_state): Add constructor.
5872 (inline_state_s): Remove.
5873 (DEF_VEC_O(inline_state_s)): Remove.
5874 (inline_states): Change type to std::vector.
5875 (find_inline_frame_state): Adjust to std::vector.
5876 (allocate_inline_frame_state): Remove.
5877 (clear_inline_frame_state): Adjust to std::vector.
5878 (skip_inline_frames): Adjust to std::vector.
5880 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5882 * tracepoint.h (struct trace_state_variable): Add constructor.
5883 <name>: Change type to std::string.
5884 * tracepoint.c (tsv_s): Remove.
5885 (DEF_VEC_O(tsv_s)): Remove.
5886 (tvariables): Change to std::vector.
5887 (create_trace_state_variable): Adjust to std::vector.
5888 (find_trace_state_variable): Likewise.
5889 (find_trace_state_variable_by_number): Likewise.
5890 (delete_trace_state_variable): Likewise.
5891 (trace_variable_command): Adjust to std::string.
5892 (delete_trace_variable_command): Likewise.
5893 (tvariables_info_1): Adjust to std::vector.
5894 (save_trace_state_variables): Likewise.
5895 (start_tracing): Likewise.
5896 (merge_uploaded_trace_state_variables): Adjust to std::vector
5898 * target.h (struct target_ops)
5899 <to_download_trace_state_variable>: Pass reference to
5900 trace_state_variable.
5901 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5902 * target-delegates.c: Re-generate.
5903 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5904 (mi_tsv_deleted): Likewise.
5905 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5906 * remote.c (remote_download_trace_state_variable): Change
5907 pointer to reference and adjust.
5908 * make-target-delegates (parse_argtypes): Handle references.
5909 (write_function_header): Likewise.
5910 (munge_type): Likewise.
5912 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5914 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5915 string_view-selftests.c.
5916 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5918 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5919 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5920 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5921 * unittests/basic_string_view/element_access/char/1.cc:
5923 * unittests/basic_string_view/element_access/char/empty.cc:
5925 * unittests/basic_string_view/element_access/char/front_back.cc:
5927 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5928 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5930 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5932 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5934 * unittests/basic_string_view/operations/compare/char/1.cc:
5936 * unittests/basic_string_view/operations/compare/char/13650.cc:
5938 * unittests/basic_string_view/operations/copy/char/1.cc:
5940 * unittests/basic_string_view/operations/data/char/1.cc:
5942 * unittests/basic_string_view/operations/find/char/1.cc:
5944 * unittests/basic_string_view/operations/find/char/2.cc:
5946 * unittests/basic_string_view/operations/find/char/3.cc:
5948 * unittests/basic_string_view/operations/find/char/4.cc:
5950 * unittests/basic_string_view/operations/rfind/char/1.cc:
5952 * unittests/basic_string_view/operations/rfind/char/2.cc:
5954 * unittests/basic_string_view/operations/rfind/char/3.cc:
5956 * unittests/basic_string_view/operations/substr/char/1.cc:
5958 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5959 * unittests/string_view-selftests.c: New file.
5961 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5963 * unittests/basic_string_view/capacity/1.cc: New file.
5964 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5965 * unittests/basic_string_view/cons/char/1.cc: New file.
5966 * unittests/basic_string_view/cons/char/2.cc: New file.
5967 * unittests/basic_string_view/cons/char/3.cc: New file.
5968 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5969 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5970 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5971 * unittests/basic_string_view/element_access/char/1.cc: New file.
5972 * unittests/basic_string_view/element_access/char/2.cc: New file.
5973 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5974 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5975 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5976 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5977 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5978 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5979 * unittests/basic_string_view/include.cc: New file.
5980 * unittests/basic_string_view/inserters/char/1.cc: New file.
5981 * unittests/basic_string_view/inserters/char/2.cc: New file.
5982 * unittests/basic_string_view/inserters/char/3.cc: New file.
5983 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5984 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5985 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5986 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5987 * unittests/basic_string_view/literals/types.cc: New file.
5988 * unittests/basic_string_view/literals/values.cc: New file.
5989 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5990 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5991 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5992 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5993 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5994 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5995 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5996 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5997 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5998 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5999 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6000 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6001 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6002 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6003 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6004 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6005 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6006 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6007 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6008 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6009 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6010 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6011 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6012 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6013 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6014 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6015 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6016 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6017 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6018 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6019 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6020 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6021 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6022 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6023 * unittests/basic_string_view/operators/char/2.cc: New file.
6024 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6025 * unittests/basic_string_view/range_access/char/1.cc: New file.
6026 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6027 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6028 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6029 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6030 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6031 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6032 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6033 * unittests/basic_string_view/typedefs.cc: New file.
6034 * unittests/basic_string_view/types/1.cc: New file.
6036 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6038 * common/gdb_string_view.h: Remove libstdc++ implementation
6039 details, adjust to gdb reality.
6040 * common/gdb_string_view.tcc: Likewise.
6041 * cli/cli-script.c (struct string_view): Remove.
6042 (user_args) <m_args>: Change element type to gdb::string_view.
6043 (user_args::insert_args): Adjust.
6045 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6047 * common/gdb_string_view.h: New file.
6048 * common/gdb_string_view.tcc: New file.
6050 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6052 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6053 * configure: Re-generate.
6055 2018-04-09 Pedro Alves <palves@redhat.com>
6057 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6058 (set_target_gdbarch): Call
6059 gdb::observers::architecture_changed.notify instead of
6060 observer_notify_architecture_changed.
6062 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6064 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6065 (do_restore_current_traceframe_cleanup): Remove.
6066 (restore_current_traceframe_cleanup_dtor): Remove.
6067 (make_cleanup_restore_current_traceframe): Remove.
6068 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6070 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6071 * infrun.c (fetch_inferior_event): Use
6072 scoped_restore_current_traceframe.
6074 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6076 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6078 <n_allocated_type_units>: Remove.
6079 <all_type_units>: Change to std::vector.
6080 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6081 to std::vector change.
6082 (dwarf2_per_objfile::get_cutu): Likewise.
6083 (dwarf2_per_objfile::get_tu): Likewise.
6084 (create_signatured_type_table_from_index): Likewise.
6085 (create_signatured_type_table_from_debug_names): Likewise.
6086 (dw2_symtab_iter_next): Likewise.
6087 (dw2_print_stats): Likewise.
6088 (dw2_expand_all_symtabs): Likewise.
6089 (dw2_expand_marked_cus): Likewise.
6090 (dw2_debug_names_iterator::next): Likewise.
6091 (dwarf2_initialize_objfile): Likewise.
6092 (add_signatured_type_cu_to_table): Likewise.
6093 (create_all_type_units): Likewise.
6094 (add_type_unit): Likewise.
6095 (struct tu_abbrev_offset): Add constructor.
6096 (build_type_psymtabs_1): Adjust to std::vector change.
6097 (print_tu_stats): Likewise.
6098 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6099 (write_debug_names): Likewise.
6101 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6103 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6104 Make an std::vector.
6105 <n_comp_units>: Remove.
6106 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6107 to std::vector change.
6108 (dwarf2_per_objfile::get_cutu): Likewise.
6109 (dwarf2_per_objfile::get_cu): Likewise.
6110 (create_cus_from_index): Likewise.
6111 (create_addrmap_from_index): Likewise.
6112 (create_addrmap_from_aranges): Likewise.
6113 (dwarf2_read_index): Likewise.
6114 (dw2_find_last_source_symtab): Likewise.
6115 (dw2_map_symtabs_matching_filename): Likewise.
6116 (dw2_symtab_iter_next): Likewise.
6117 (dw2_print_stats): Likewise.
6118 (dw2_expand_all_symtabs): Likewise.
6119 (dw2_expand_symtabs_with_fullname): Likewise.
6120 (dw2_expand_marked_cus): Likewise.
6121 (dw2_map_symbol_filenames): Likewise.
6122 (create_cus_from_debug_names): Likewise.
6123 (dwarf2_read_debug_names): Likewise.
6124 (dw2_debug_names_iterator::next): Likewise.
6125 (dwarf2_initialize_objfile): Likewise.
6126 (set_partial_user): Likewise.
6127 (dwarf2_build_psymtabs_hard): Likewise.
6128 (read_comp_units_from_section): Remove arguments, adjust to
6130 (create_all_comp_units): Adjust to std::vector and
6131 read_comp_units_from_section changes.
6132 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6134 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6135 (psyms_seen_size): Likewise.
6136 (write_gdbindex): Likewise.
6137 (write_debug_names): Likewise.
6139 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6141 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6142 with dwarf2_per_objfile.
6143 (create_cus_from_index): Likewise.
6144 (create_signatured_type_table_from_index): Likewise.
6145 (dwarf2_read_index): Likewise.
6146 (dwarf2_initialize_objfile): Likewise.
6147 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6148 per_cu rather than get_dwarf2_per_objfile.
6150 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6152 * dwarf2read.h (struct signatured_type): Forward declare.
6153 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6155 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6156 (dw2_get_cutu): ...this.
6157 (dwarf2_per_objfile::get_cu): Rename from...
6158 (dw2_get_cu): ...this.
6159 (dwarf2_per_objfile::get_tu): New.
6160 (create_addrmap_from_index): Adjust.
6161 (create_addrmap_from_aranges): Adjust.
6162 (dw2_find_last_source_symtab): Adjust.
6163 (dw2_map_symtabs_matching_filename): Adjust.
6164 (dw2_symtab_iter_next): Adjust.
6165 (dw2_print_stats): Adjust.
6166 (dw2_expand_all_symtabs): Adjust.
6167 (dw2_expand_symtabs_with_fullname): Adjust.
6168 (dw2_expand_marked_cus): Adjust.
6169 (dw_expand_symtabs_matching_file_matcher): Adjust.
6170 (dw2_map_symbol_filenames): Adjust.
6171 (dw2_debug_names_iterator::next): Adjust.
6172 (dwarf2_initialize_objfile): Adjust.
6173 (set_partial_user): Adjust.
6174 (dwarf2_build_psymtabs_hard): Adjust.
6176 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6178 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6179 Remove unused variables.
6180 (dw2_map_symtabs_matching_filename): Likewise.
6181 (dwarf2_record_block_ranges): Likewise.
6182 (dwarf2_read_addr_index): Likewise.
6183 (follow_die_offset): Likewise.
6185 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6187 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6188 to symbol_file_add_main.
6190 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6193 * mi/mi-console.c (do_fputc_async_safe): New.
6194 (mi_console_file::write_async_safe): New.
6195 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6196 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6198 * ui-file.c (ui_file::putstrn): Adjust call to
6199 fputstrn_unfiltered.
6200 * utils.c (printchar): Replace do_fputs and do_fprintf
6201 parameters by do_fputc.
6202 (fputstr_filtered): Adjust call to printchar.
6203 (fputstr_unfiltered): Likewise.
6204 (fputstrn_filtered): Likewise.
6205 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6207 * utils.h (do_fputc_ftype): New typedef.
6208 (fputstrn_unfiltered): Add do_fputc parameter.
6210 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6212 * regformats/i386/i386-avx.dat: Remove.
6214 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6217 * amd64-tdep.c (amd64_none_init_abi): New function.
6218 (amd64_x32_none_init_abi): New function.
6219 (_initialize_amd64_tdep): Register handlers for x86-64 and
6220 x64_32 with GDB_OSABI_NONE.
6221 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6222 GDB_OSABI_NONE osabi.
6224 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6227 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6229 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6230 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6232 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6234 * common/byte-vector.h (char_vector): New type.
6235 * target.h (target_read_alloc): Return
6236 gdb::optional<byte_vector>.
6237 (target_read_stralloc): Return gdb::optional<char_vector>.
6238 (target_get_osdata): Return gdb::optional<char_vector>.
6239 * target.c (target_read_alloc_1): Templatize. Replacement
6240 manual memory management with vector.
6241 (target_read_alloc): Change return type, adjust.
6242 (target_read_stralloc): Change return type, adjust.
6243 (target_get_osdata): Change return type, adjust.
6244 * auxv.c (struct auxv_info) <length>: Remove.
6245 <data>: Change type to gdb::optional<byte_vector>.
6246 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6247 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6248 (target_auxv_search): Adjust.
6249 (fprint_target_auxv): Adjust.
6250 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6251 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6252 (linux_make_corefile_notes): Adjust.
6253 * osdata.c (get_osdata): Adjust.
6254 * remote.c (remote_get_threads_with_qxfer): Adjust.
6255 (remote_memory_map): Adjust.
6256 (remote_traceframe_info): Adjust.
6257 (btrace_read_config): Adjust.
6258 (remote_read_btrace): Adjust.
6259 (remote_pid_to_exec_file): Adjust.
6260 * solib-aix.c (solib_aix_get_library_list): Adjust.
6261 * solib-dsbt.c (decode_loadmap): Don't free buf.
6262 (dsbt_get_initial_loadmaps): Adjust.
6263 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6264 * solib-target.c (solib_target_current_sos): Adjust.
6265 * tracepoint.c (sdata_make_value): Adjust.
6266 * xml-support.c (xinclude_start_include): Adjust.
6267 (xml_fetch_content_from_file): Adjust.
6268 * xml-support.h (xml_fetch_another): Change return type.
6269 (xml_fetch_content_from_file): Change return type.
6270 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6271 * xml-tdesc.c (file_read_description_xml): Adjust.
6272 (fetch_available_features_from_target): Change return type.
6273 (target_fetch_description_xml): Adjust.
6274 (target_read_description_xml): Adjust.
6276 2018-04-06 Tom Tromey <tom@tromey.com>
6278 * value.c (~value): Update.
6279 (struct value) <contents>: Now unique_xmalloc_ptr.
6280 (value_contents_bits_eq, allocate_value_contents)
6281 (value_contents_raw, value_contents_all_raw)
6282 (value_contents_for_printing, value_contents_for_printing_const)
6283 (set_value_enclosing_type): Update.
6285 2018-04-06 Tom Tromey <tom@tromey.com>
6287 * value.c (range_s): Remove typedef, VEC.
6288 (struct range): Add operator<.
6289 (range_lessthan): Remove.
6290 (ranges_contain): Change type.
6292 (struct value) <unavailable, optimized_out>: Now std::vector.
6293 (value_entirely_available)
6294 (value_entirely_covered_by_range_vector)
6295 (value_entirely_unavailable, value_entirely_optimized_out):
6297 (insert_into_bit_range_vector): Change argument type.
6298 (find_first_range_overlap): Likewise.
6299 (struct ranges_and_idx, value_contents_bits_eq)
6300 (require_not_optimized_out, require_available): Update.
6301 (ranges_copy_adjusted): Change argument types.
6302 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6304 2018-04-06 Tom Tromey <tom@tromey.com>
6306 * value.c (~value): Update.
6307 (struct value) <parent>: Now a value_ref_ptr.
6308 (value_parent, set_value_parent, value_address, value_copy):
6311 2018-04-06 Tom Tromey <tom@tromey.com>
6313 * value.c (struct value): Add constructor, destructor, and member
6315 (allocate_value_lazy, value_decref): Update.
6317 2018-04-06 Tom Tromey <tom@tromey.com>
6319 * value.c (struct value) <released, next>: Remove.
6320 (all_values): Now a std::vector.
6321 (allocate_value_lazy): Update.
6322 (value_next): Remove.
6323 (value_mark, value_free_to_mark, release_value)
6324 (value_release_to_mark): Update.
6326 2018-04-06 Tom Tromey <tom@tromey.com>
6328 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6329 (free_value_chain): Remove.
6330 * value.c (free_value_chain): Remove.
6331 (value_release_to_mark): Return a std::vector.
6332 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6334 (check_condition): Update.
6335 * eval.c (fetch_subexp_value): Change "val_chain" to a
6337 * breakpoint.c (update_watchpoint): Update.
6338 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6340 2018-04-06 Tom Tromey <tom@tromey.com>
6342 * value.h (free_all_values): Remove.
6343 * value.c (free_all_values): Remove.
6345 2018-04-06 Tom Tromey <tom@tromey.com>
6347 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6348 (value_history_chain, value_history_count): Remove.
6349 (value_history): New global.
6350 (record_latest_value, access_value_history, show_values)
6351 (preserve_values): Update.
6353 2018-04-06 Tom Tromey <tom@tromey.com>
6355 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6356 * varobj.c (varobj_set_display_format, varobj_set_value)
6357 (install_default_visualizer, construct_visualizer)
6358 (install_new_value, ~varobj, varobj_get_value_type)
6359 (my_value_of_variable, varobj_editable_p): Update.
6360 * c-varobj.c (c_describe_child, c_value_of_variable)
6361 (cplus_number_of_children, cplus_describe_child): Update.
6362 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6363 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6364 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6366 2018-04-06 Tom Tromey <tom@tromey.com>
6368 * printcmd.c (last_examine_address): Change type to
6370 (do_examine, x_command): Update.
6372 2018-04-06 Tom Tromey <tom@tromey.com>
6374 * value.c (release_value): Update.
6375 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6376 (struct bpstats) <val>: Now a value_ref_ptr.
6377 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6378 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6379 (~watchpoint, print_it_watchpoint, watch_command_1)
6380 (invalidate_bp_value_on_memory_change): Update.
6382 2018-04-06 Tom Tromey <tom@tromey.com>
6384 * varobj.c (varobj_clear_saved_item)
6385 (update_dynamic_varobj_children, install_new_value, ~varobj):
6387 * value.h (value_incref): Move declaration earlier.
6388 (value_decref): Rename from value_free.
6389 (struct value_ref_policy): New.
6390 (value_ref_ptr): New typedef.
6391 (struct value_deleter): Remove.
6392 (gdb_value_up): Remove typedef.
6393 (release_value): Change return type.
6394 (release_value_or_incref): Remove.
6395 * value.c (set_value_parent): Update.
6396 (value_incref): Change return type.
6397 (value_decref): Rename from value_free.
6398 (value_free_to_mark, free_all_values, free_value_chain): Update.
6399 (release_value): Return value_ref_ptr.
6400 (release_value_or_incref): Remove.
6401 (record_latest_value, set_internalvar, clear_internalvar):
6403 * stack.c (info_frame_command): Don't call value_free.
6404 * python/py-value.c (valpy_dealloc, valpy_new)
6405 (value_to_value_object): Update.
6406 * printcmd.c (do_examine): Update.
6407 * opencl-lang.c (lval_func_free_closure): Update.
6408 * mi/mi-main.c (register_changed_p): Don't call value_free.
6409 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6410 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6411 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6413 * guile/scm-value.c (vlscm_free_value_smob)
6414 (vlscm_scm_from_value): Update.
6415 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6416 (frame_unwind_register_unsigned, get_frame_register_bytes)
6417 (put_frame_register_bytes): Don't call value_free.
6418 * findvar.c (address_from_register): Don't call value_free.
6419 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6420 * dwarf2loc.c (entry_data_value_free_closure)
6421 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6422 (dwarf2_evaluate_loc_desc_full): Update.
6423 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6424 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6425 (~watchpoint, watch_command_1)
6426 (invalidate_bp_value_on_memory_change): Update.
6427 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6429 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6432 * warning.m4: Add -Wno-error=deprecated-register.
6433 * configure: Re-generate.
6435 2018-04-05 Tom Tromey <tom@tromey.com>
6437 * linespec.h: Remove include of "vec.h".
6439 2018-04-05 Tom Tromey <tom@tromey.com>
6441 * linespec.c (typep): Remove typedef.
6442 (find_methods, find_superclass_methods): Take a std::vector.
6443 (find_method): Use std::vector.
6445 2018-04-05 Tom Tromey <tom@tromey.com>
6447 * utils.c (compare_strings): Remove.
6448 * utils.h (compare_strings): Remove.
6449 * objc-lang.h (find_imps): Update.
6450 * objc-lang.c (find_methods): Take a std::vector.
6451 (uniquify_strings, find_imps): Likewise.
6452 * linespec.c (find_methods): Take a std::vector.
6453 (decode_objc): Use std::vector.
6454 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6456 (find_method, find_function_symbols): Use std::vector.
6458 2018-04-05 Tom Tromey <tom@tromey.com>
6460 * completer.c (completion_tracker::completion_tracker): Remove
6462 (completion_tracker::discard_completions): Likewise.
6463 * breakpoint.c (ambiguous_names_p): Remove cast.
6464 * ada-lang.c (_initialize_ada_language): Remove cast.
6465 * utils.h (streq): Update.
6466 (streq_hash): Add new declaration.
6467 * utils.c (streq): Return bool.
6468 (streq_hash): New function.
6470 2018-04-05 Tom Tromey <tom@tromey.com>
6472 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6473 Remove a string copy.
6475 2018-04-05 Tom Tromey <tom@tromey.com>
6477 * linespec.c (filter_results): Use std::vector.
6478 (decode_line_2, decode_line_full): Update.
6480 2018-04-05 Tom Tromey <tom@tromey.com>
6482 * linespec.c (canonical_to_fullform): Return std::string.
6483 (filter_results): Update.
6484 (struct decode_line_2_item): Add constructor.
6485 <fullform, displayform>: Now std::string.
6486 (decode_line_2_compare_items): Now a std::sort comparator.
6487 (decode_line_2): Update.
6489 2018-04-05 Tom Tromey <tom@tromey.com>
6491 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6492 (unexpected_linespec_error): Update.
6493 (linespec_parse_basic, parse_linespec): Update.
6495 2018-04-05 Tom Tromey <tom@tromey.com>
6497 * linespec.c (linespec_parse_basic): Reindent.
6499 2018-04-05 Tom Tromey <tom@tromey.com>
6501 * minsyms.h (iterate_over_minimal_symbols): Update.
6502 * minsyms.c (iterate_over_minimal_symbols): Take a
6504 * linespec.c (struct collect_minsyms): Remove.
6505 (compare_msyms): Now a std::sort comparator.
6506 (add_minsym): Add parameters.
6507 (search_minsyms_for_name): Update. Use std::vector.
6509 2018-04-03 Tom Tromey <tom@tromey.com>
6511 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6514 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6516 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6518 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6521 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6522 printing static type.
6524 2018-04-01 Tom Tromey <tom@tromey.com>
6526 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6527 (rs6000_xfer_shared_libraries): Update.
6529 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6531 * common/gdb_vecs.h (char_ptr): Remove.
6532 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6534 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6536 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6538 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6540 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6542 * tracepoint.h (struct uploaded_tp): Initialize fields.
6543 <actions, step_actions, cmd_strings>: Change type to
6544 std::vector<char *>.
6545 * tracepoint.c (get_uploaded_tp): Allocate with new.
6546 (free_uploaded_tps): Free with delete.
6547 (parse_tracepoint_definition): Adjust to std::vector change.
6548 * breakpoint.c (read_uploaded_action): Likewise.
6549 (create_tracepoint_from_upload): Likewise.
6550 * ctf.c (ctf_write_uploaded_tp): Likewise.
6551 (SET_ARRAY_FIELD): Likewise.
6552 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6554 2018-03-30 Tom Tromey <tom@tromey.com>
6556 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6558 (svr4_keep_data_in_core): Update.
6559 (svr4_read_so_list): Update.
6561 2018-03-30 Tom Tromey <tom@tromey.com>
6563 * windows-nat.c (handle_output_debug_string, handle_exception):
6565 * target.h (target_read_string): Update.
6566 * target.c (target_read_string): Change "string" to
6568 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6570 * solib-frv.c (frv_current_sos): Update.
6571 * solib-dsbt.c (dsbt_current_sos): Update.
6572 * solib-darwin.c (darwin_current_sos): Update.
6573 * linux-thread-db.c (inferior_has_bug): Update.
6574 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6575 Update. Remove alloca.
6576 * ada-lang.c (ada_main_name): Update.
6578 2018-03-30 Tom Tromey <tom@tromey.com>
6580 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6581 (struct dwo_file_deleter): New.
6582 (dwo_file_up): New typedef.
6583 (open_and_init_dwo_file): Use dwo_file_up.
6584 (free_dwo_file_cleanup): Remove.
6586 2018-03-30 Tom Tromey <tom@tromey.com>
6588 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6589 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6591 2018-03-30 Tom Tromey <tom@tromey.com>
6593 * dwarf2read.c (class free_cached_comp_units): New class.
6594 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6595 (free_cached_comp_units): Remove function.
6597 2018-03-30 Tom Tromey <tom@tromey.com>
6599 * utils.h (make_cleanup_unpush_target): Remove.
6600 * inf-ptrace.c (struct target_unpusher): New.
6601 (target_unpush_up) New typedef.
6602 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6604 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6606 2018-03-27 Tom Tromey <tom@tromey.com>
6608 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6610 2018-03-27 Pedro Alves <palves@redhat.com>
6611 Tom Tromey <tom@tromey.com>
6613 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6614 destructor. Now a class.
6615 (gdb_readline_wrapper_cleanup): Remove function.
6616 (gdb_readline_wrapper): Remove cleanups.
6618 2018-03-27 Tom Tromey <tom@tromey.com>
6620 * typeprint.h (struct type_print_options) <local_typedefs,
6621 global_typedefs>: Remove "struct" keyword.
6622 (class typedef_hash_table): New class.
6623 (recursively_update_typedef_hash, add_template_parameters)
6624 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6625 (find_typedef_in_hash): Don't declare.
6626 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6627 (typedef_hash_table::recursively_update): Rename from
6628 recursively_update_typedef_hash. Now a member.
6629 (typedef_hash_table::add_template_parameters): Rename from
6630 add_template_parameters. Now a member.
6631 (typedef_hash_table::typedef_hash_table): Now a constructor;
6632 rename from create_typedef_hash.
6633 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6634 rename from free_typedef_hash.
6635 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6636 (do_free_global_table): Remove.
6637 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6638 from copy_type_recursive.
6639 (create_global_typedef_table): Remove.
6640 (typedef_hash_table::find_global_typedef): Now a member of
6642 (typedef_hash_table::find_typedef): Rename from
6643 find_typedef_in_hash; now a member.
6644 (whatis_exp): Update.
6645 * extension.h (struct ext_lang_type_printers): Add constructor and
6647 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6649 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6650 Now a constructor; rename from start_ext_lang_type_printers.
6651 (ext_lang_type_printers): Now a destructor; rename from
6652 free_ext_lang_type_printers.
6653 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6655 (c_type_print_base_struct_union): Update. Remove cleanups.
6657 2018-03-27 Tom Tromey <tom@tromey.com>
6659 * dwarf-index-write.c: Include <cmath>.
6661 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6663 * NEWS: Add entry describing new "set|show varsize-limit" command.
6664 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6666 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6669 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6671 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6673 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6674 * dwarf-index-common.c: New file.
6675 * dwarf-index-common.h: New file.
6676 * dwarf-index-write.c: New file.
6677 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6678 (struct dwarf2_section_info): Move from here.
6679 (dwarf2_section_info_def): Likewise.
6680 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6681 (offset_type): Likewise.
6682 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6683 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6684 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6685 (byte_swap): Likewise.
6686 (MAYBE_SWAP): Likewise.
6687 (dwarf2_per_cu_ptr): Likewise.
6688 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6689 (struct tu_stats): Likewise.
6690 (struct dwarf2_per_objfile): Likewise.
6691 (struct dwarf2_per_cu_data): Likewise.
6692 (struct signatured_type): Likewise.
6693 (sig_type_ptr): Likewise.
6694 (DEF_VEC_P (sig_type_ptr)): Likewise.
6695 (INDEX4_SUFFIX): Likewise.
6696 (INDEX5_SUFFIX): Likewise.
6697 (DEBUG_STR_SUFFIX): Likewise.
6698 (dwarf2_read_section): Make non-static.
6699 (mapped_index_string_hash): Move from here.
6700 (dwarf5_djb_hash): Likewise.
6701 (file_write): Likewise.
6702 (class data_buf): Likewise.
6703 (struct symtab_index_entry): Likewise.
6704 (struct mapped_symtab): Likewise.
6705 (find_slot): Likewise.
6706 (hash_expand): Likewise.
6707 (add_index_entry): Likewise.
6708 (uniquify_cu_indices): Likewise.
6709 (class c_str_view): Likewise.
6710 (class c_str_view_hasher): Likewise.
6711 (class vector_hasher): Likewise.
6712 (write_hash_table): Likewise.
6713 (psym_index_map): Likewise.
6714 (struct addrmap_index_data): Likewise.
6715 (add_address_entry): Likewise.
6716 (add_address_entry_worker): Likewise.
6717 (write_address_map): Likewise.
6718 (symbol_kind): Likewise.
6719 (write_psymbols): Likewise.
6720 (struct signatured_type_index_data): Likewise.
6721 (write_one_signatured_type): Likewise.
6722 (recursively_count_psymbols): Likewise.
6723 (recursively_write_psymbols): Likewise.
6724 (class debug_names): Likewise.
6725 (check_dwarf64_offsets): Likewise.
6726 (psyms_seen_size): Likewise.
6727 (write_gdbindex): Likewise.
6728 (write_debug_names): Likewise.
6729 (assert_file_size): Likewise.
6730 (write_psymtabs_to_index): Likewise.
6731 (save_gdb_index_command): Likewise.
6732 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6734 * dwarf2read.h: New file.
6736 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6739 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6740 symbol name if the CU's language stores symbol names in linkage
6742 * language.h (struct language_defn)
6743 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6744 all instances of this struct.
6746 2018-03-26 Tom Tromey <tom@tromey.com>
6748 * stack.c (backtrace_command_1): Remove verbose code.
6750 2018-03-26 Tom Tromey <tom@tromey.com>
6752 * python/py-framefilter.c (py_print_type): Don't catch
6753 exceptions. Return void.
6754 (py_print_value): Likewise.
6755 (py_print_single_arg): Likewise.
6756 (enumerate_args): Don't catch exceptions.
6757 (py_print_args): Likewise.
6758 (py_print_frame): Likewise.
6759 (gdbpy_apply_frame_filter): Catch exceptions here.
6761 2018-03-26 Tom Tromey <tom@tromey.com>
6763 * stack.c (_initialize_stack): Remove trailing newlines from help
6764 text. Add "Usage" line to "backtrace" help.
6766 2018-03-26 Tom Tromey <tom@tromey.com>
6769 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6771 2018-03-26 Tom Tromey <tom@tromey.com>
6773 * python/py-framefilter.c (py_print_single_arg): Return
6774 EXT_LANG_BT_ERROR from catch.
6776 2018-03-26 Tom Tromey <tom@tromey.com>
6779 * stack.c (backtrace_command_1): Move some code into no-filters
6782 2018-03-26 Tom Tromey <tom@tromey.com>
6784 * python/py-framefilter.c (throw_quit_or_print_exception): New
6786 (gdbpy_apply_frame_filter): Use it.
6788 2018-03-26 Tom Tromey <tom@tromey.com>
6791 * python/py-framefilter.c (py_print_type, py_print_value)
6792 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6795 2018-03-26 Tom Tromey <tom@tromey.com>
6797 * python/py-framefilter.c (enumerate_args): Use
6798 gdb::unique_xmalloc_ptr.
6800 2018-03-26 Tom Tromey <tom@tromey.com>
6802 * python/py-framefilter.c (py_print_frame): Return
6804 (gdbpy_apply_frame_filter): Update comment.
6805 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6807 <EXT_LANG_BT_NO_FILTERS>: Change value.
6809 2018-03-26 Tom Tromey <tom@tromey.com>
6812 * stack.c (backtrace_command): Parse "hide" argument.
6813 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6814 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6817 2018-03-26 Tom Tromey <tom@tromey.com>
6819 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6821 (backtrace_command): Remove "fulltrace", add "flags".
6823 2018-03-26 Tom Tromey <tom@tromey.com>
6825 * stack.c (backtrace_command): Rewrite command line parsing.
6827 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6829 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6831 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6833 * filename-seen-cache.h: Add include guard.
6835 2018-03-26 Keith Seitz <keiths@redhat.com>
6837 * symfile.c (place_section): Remove "struct" from section_addr_info
6839 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6840 "struct" keyword from section_addr_info.
6842 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6844 * regformats/regdef.h (reg): Add constructors.
6846 2018-03-25 Pedro Alves <palves@redhat.com>
6848 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6849 if then/else bodies in var_func_name extraction.
6851 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6853 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6854 lookup_minimal_symbol() to find symbol entry.
6855 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6857 2018-03-23 Keith Seitz <keiths@redhat.com>
6860 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6861 nested type definitions for C++, too.
6863 2018-03-23 Tom Tromey <tom@tromey.com>
6865 * machoread.c (struct oso_el): Add a constructor. Don't define as
6867 (macho_register_oso): Remove.
6868 (macho_symtab_read): Take a std::vector.
6869 (oso_el_compare_name): Now a std::sort comparator.
6870 (macho_symfile_read_all_oso): Take a std::vector.
6871 (macho_symfile_read): Use std::vector. Remove cleanups.
6873 2018-03-22 Tom Tromey <tom@tromey.com>
6875 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6876 (record_full_goto_bookmark): Use std::string.
6878 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6881 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6884 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6886 * rs6000-tdep.c (store_insn_p): New function.
6887 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6888 and cr_reg to their unshifted values. Use store_insn_p to
6889 match LR saves using either R1 or fdata->alloca_reg. Use
6890 store_insn_p to match CR saves. Set alloca_reg_offset
6891 when alloca_reg and framep are set. Remove lr_reg shift
6892 when assigning to fdata->lr_register.
6894 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6896 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6897 command line args instead of emitting a warning.
6899 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6901 * tracepoint.h (struct static_tracepoint_marker): Initialize
6902 fields, define default constructor, move constructor and move
6903 assignment, disable the rest.
6904 <str_id, extra>: Make std::string.
6905 (release_static_tracepoint_marker): Remove.
6906 (free_current_marker): Remove.
6907 * tracepoint.c (free_current_marker): Remove.
6908 (parse_static_tracepoint_marker_definition): Adjust to
6909 std::string, use new hex2str overload.
6910 (release_static_tracepoint_marker): Remove.
6911 (print_one_static_tracepoint_marker): Get marker by reference
6912 and adjust to std::string.
6913 (info_static_tracepoint_markers_command): Adjust to std::vector
6915 * target.h (static_tracepoint_marker_p): Remove typedef.
6916 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6917 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6919 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6921 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6922 (target_debug_print_std_vector_static_tracepoint_marker): New.
6923 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6925 (target_debug_print_static_tracepoint_marker_p): ... this.
6926 * target-delegates.c: Re-generate.
6927 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6929 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6930 (decode_static_tracepoint_spec): Adjust to std::vector.
6931 (tracepoint_print_one_detail): Adjust to std::string.
6932 (strace_marker_decode_location): Adjust to std::string.
6933 (update_static_tracepoint): Adjust to std::string, remove call
6934 to release_static_tracepoint_marker.
6935 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6936 Adjust to std::vector.
6937 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6938 (remote_static_tracepoint_markers_by_strid): Adjust to
6940 * common/rsp-low.h (hex2str): New overload with explicit count
6942 * common/rsp-low.c (hex2str): New overload with explicit count
6944 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6945 (_initialize_rsp_low_selftests): Add test_hex2str test.
6946 * unittests/tracepoint-selftests.c
6947 (test_parse_static_tracepoint_marker_definition): Adjust to
6950 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6952 * tracepoint.c (parse_static_tracepoint_marker_definition):
6953 Consider case where the definition is followed by more
6955 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6956 tracepoint-selftests.c.
6957 * unittests/tracepoint-selftests.c: New.
6959 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6961 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6964 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6966 * symtab.c (find_pc_sect_line): fixed indentation.
6968 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6970 * symtab.c (find_pc_sect_line): now uses binary search.
6972 2018-03-19 Tom Tromey <tom@tromey.com>
6974 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6977 2018-03-19 Pedro Alves <palves@redhat.com>
6978 Tom Tromey <tom@tromey.com>
6980 * unittests/observable-selftests.c: New file.
6981 * common/observable.h: New file.
6982 * observable.h: New file.
6983 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6984 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6985 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6986 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6987 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6988 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6989 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6990 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6991 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6992 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6993 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6994 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6995 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6996 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6997 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6998 tui/tui-interp.c, valops.c: Update all users.
6999 * tui/tui-hooks.c (tui_bp_created_observer)
7000 (tui_bp_deleted_observer, tui_bp_modified_observer)
7001 (tui_inferior_exit_observer, tui_before_prompt_observer)
7002 (tui_normal_stop_observer, tui_register_changed_observer):
7004 (tui_observers_token): New global.
7005 (attach_or_detach, tui_attach_detach_observers): New functions.
7006 (tui_install_hooks, tui_remove_hooks): Use
7007 tui_attach_detach_observers.
7008 * record-btrace.c (record_btrace_thread_observer): Remove.
7009 (record_btrace_thread_observer_token): New global.
7010 * observer.sh: Remove.
7011 * observer.c: Rename to observable.c.
7012 * observable.c (namespace gdb_observers): Define new objects.
7013 (observer_debug): Move into gdb_observers namespace.
7014 (struct observer, struct observer_list, xalloc_observer_list_node)
7015 (xfree_observer_list_node, generic_observer_attach)
7016 (generic_observer_detach, generic_observer_notify): Remove.
7017 (_initialize_observer): Update.
7018 Don't include observer.inc.
7019 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7020 (clean mostlyclean): Likewise.
7021 (observer.h, observer.inc): Remove targets.
7022 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7023 (COMMON_SFILES): Use observable.c, not observer.c.
7024 * .gitignore: Remove observer.h.
7026 2018-03-18 Tom Tromey <tom@tromey.com>
7028 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7030 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7032 2018-03-17 Tom Tromey <tom@tromey.com>
7034 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7036 2018-03-17 Tom Tromey <tom@tromey.com>
7038 * target.c (class scoped_target_fd): New.
7039 (target_fileio_close_cleanup): Remove.
7040 (target_fileio_read_alloc_1): Use scoped_target_fd.
7042 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7044 * silent-rules.mk: New.
7045 * Makefile.in: Include silent-rules.mk
7046 (srcdir, VPATH, top_srcdir): Move up.
7047 (COMPILE): Add ECHO_CXX.
7048 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7049 (init.c): Add ECHO_INIT_C.
7050 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7051 (version.c): Add ECHO_GEN.
7052 (printcmd.o): Add ECHO_CXX.
7053 (target-float.o): Add ECHO_CXX.
7054 (ada-exp.o): Add ECHO_CXX.
7055 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7056 (insight$(EXEEXT)): Add ECHO_CXXLD.
7057 * gnulib/configure.ac: Add AM_SILENT_RULES.
7058 * gnulib/aclocal.m4: Re-generate.
7059 * gnulib/configure: Re-generate.
7060 * gnulib/import/Makefile.in: Re-generate.
7062 2018-03-16 Tom Tromey <tom@tromey.com>
7064 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7065 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7066 * utils.c (do_free_section_addr_info)
7067 (make_cleanup_free_section_addr_info): Remove.
7068 * symfile.h (struct other_sections): Add constructor.
7069 (struct section_addr_info): Remove.
7070 (section_addr_info): New typedef.
7071 (struct sym_fns) <sym_offsets>: Change type of parameter.
7072 (build_section_addr_info_from_objfile)
7073 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7074 (default_symfile_offsets, symbol_file_add)
7075 (symbol_file_add_from_bfd)
7076 (build_section_addr_info_from_section_table): Update.
7077 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7078 * symfile.c (alloc_section_addr_info): Remove.
7079 (build_section_addr_info_from_section_table): Change return type.
7081 (build_section_addr_info_from_bfd)
7082 (build_section_addr_info_from_objfile): Likewise.
7083 (free_section_addr_info): Remove.
7084 (relative_addr_info_to_section_offsets): Change type of "addrs".
7085 (addrs_section_compar): Now a std::sort comparator.
7086 (addrs_section_sort): Change return type.
7087 (addr_info_make_relative): Change type of "addrs". Update.
7088 (default_symfile_offsets, syms_from_objfile_1)
7089 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7090 (symbol_file_add_separate): Update.
7091 (symbol_file_add): Change type of "addrs". Update.
7092 (add_symbol_file_command): Update. Remove cleanups.
7093 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7095 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7096 * solib.c (solib_read_symbols): Update.
7097 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7098 * machoread.c (macho_symfile_offsets): Update.
7099 * jit.c (jit_bfd_try_read_symtab): Update.
7101 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7103 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7104 unittests/utils-selftests.c.
7105 * unittests/utils-selftests.c: New file.
7107 2018-03-14 Tom Tromey <tom@tromey.com>
7110 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7113 2018-03-14 Tom Tromey <tom@tromey.com>
7116 * printcmd.c (printf_pointer): Allow "-" in format.
7118 2018-03-14 Tom Tromey <tom@tromey.com>
7120 * printcmd.c (_initialize_printcmd): Add usage to printf.
7122 2018-03-14 Yao Qi <qiyao@sourceware.org>
7124 * MAINTAINERS: Update my email address.
7126 2018-03-13 Tom Tromey <tom@tromey.com>
7128 * machoread.c (macho_check_dsym): Change filenamep to a
7130 (macho_symfile_read): Update.
7131 * symfile.c (load_command): Use std::string.
7133 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7135 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7136 to error message string.
7137 (riscv_register_name): Use xsnprintf instead of sprintf.
7138 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7140 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7142 (riscv_push_dummy_call): Likewise.
7144 2018-03-12 Tom Tromey <tom@tromey.com>
7146 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7147 Use gdb::byte_vector.
7148 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7150 2018-03-12 Yao Qi <yao.qi@linaro.org>
7152 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7153 parameter type to readable_regcache.
7154 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7157 2018-03-11 Tom Tromey <tom@tromey.com>
7159 * dwarf2read.c (struct nextfield): Add initializers.
7160 (struct nextfnfield): Remove.
7161 (struct fnfieldlist): Add initializers. Remove "length" and
7162 "head", use std::vector.
7163 (struct decl_field_list): Remove.
7164 (struct field_info): Add initializers.
7165 <fields, baseclasses>: Now std::vector.
7166 <nbaseclasses, nfnfields, typedef_field_list_count,
7167 nested_types_list_count>: Remove.
7168 (dwarf2_add_field, dwarf2_add_type_defn)
7169 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7170 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7171 (process_structure_scope): Update.
7173 2018-03-11 Tom Tromey <tom@tromey.com>
7175 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7176 for use by std::sort.
7177 (build_type_psymtabs_1): Use std::vector.
7179 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7181 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7182 and LIBMPFR in the printed configuration.
7184 2018-03-08 Tom Tromey <tom@tromey.com>
7186 * source.c (get_filename_and_charpos): Use scoped_fd.
7187 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7188 (procfs_pidlist): Likewise.
7189 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7190 (iterate_over_mappings): Likewise.
7192 2018-03-08 Tom Tromey <tom@tromey.com>
7194 * infcall.c (struct call_return_meta_info)
7195 <stack_temporaries_enabled>: Remove.
7196 (get_call_return_value, call_function_by_hand_dummy): Update.
7197 * thread.c (disable_thread_stack_temporaries): Remove.
7198 (enable_thread_stack_temporaries): Remove.
7199 (thread_stack_temporaries_enabled_p): Return bool.
7200 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7201 (get_last_thread_stack_temporary): Update.
7202 * eval.c (evaluate_subexp): Update.
7203 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7204 class, not a function.
7205 (value_ptr, value_vec): Remove typedefs.
7206 (class thread_info) <stack_temporaries_enabled>: Now bool.
7207 <stack_temporaries>: Now a std::vector.
7208 (thread_stack_temporaries_enabled_p)
7209 (value_in_thread_stack_temporaries): Return bool.
7211 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7213 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7214 (getpkt_or_notif_sane_1): Likewise.
7216 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7218 * build-id.c (build_id_to_debug_bfd): Use std::string.
7220 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7222 * build-id.c (find_separate_debug_file_by_buildid): Return
7224 * build-id.h (find_separate_debug_file_by_buildid): Return
7226 * coffread.c (coff_symfile_read): Adjust to std::string.
7227 * elfread.c (elf_symfile_read): Adjust to std::string.
7228 * symfile.c (separate_debug_file_exists): Change parameter to
7230 (find_separate_debug_file): Return std::string.
7231 (find_separate_debug_file_by_debuglink): Return std::string.
7232 * symfile.h (find_separate_debug_file_by_debuglink): Return
7235 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7237 * common/xml-utils.c (xml_escape_text): Move code to...
7238 (xml_escape_text_append): ... this new function.
7239 * common/xml-utils.h (xml_escape_text_append): New declaration.
7240 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7242 (_initialize_xml_utils): register test_xml_escape_text_append as
7245 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7247 * defs.h: Remove MAX_REGISTER_SIZE.
7248 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7250 * python/py-unwind.c (pyuw_sniffer): Likewise.
7252 2018-03-07 Tom Tromey <tom@tromey.com>
7254 * linux-tdep.c (linux_info_proc): Update.
7255 * target.h (struct target_ops) <to_fileio_readlink>: Return
7257 (target_fileio_readlink): Return optional<string>.
7258 * remote.c (remote_hostio_readlink): Return optional<string>.
7259 * inf-child.c (inf_child_fileio_readlink): Return
7261 * target.c (target_fileio_readlink): Return optional<string>.
7263 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7265 * regcache.c (cooked_read_test): Add riscv to the list of
7266 architectures that have a save_reggroup.
7268 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7270 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7271 value is not a dynamic class object.
7273 2018-03-06 Tom Tromey <tom@tromey.com>
7275 * rust-exp.y: Formatting fixes.
7277 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7279 * riscv-tdep.c (riscv_register_name): Remove target description
7281 (riscv_gdbarch_init): Remove target description check.
7283 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7285 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7287 * riscv-tdep.h: Likewise.
7289 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7291 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7292 (riscv_pseudo_register_write): Delete.
7293 (riscv_gdbarch_init): Remove all use of pseudo registers.
7295 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7297 * record-btrace.c (btrace_print_lines): Replace cleanup
7298 parameter with RAII equivalents.
7299 (btrace_insn_history): Replace cleanup with RAII equivalents.
7300 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7301 make_cleanup_ui_out_tuple_begin_end): Remove.
7302 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7303 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7304 make_cleanup_ui_out_list_begin_end): Remove.
7306 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7308 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7309 parameter types to std::vector. Use bool.
7310 (record_btrace_wait): Replace VEC(tp_t) with
7311 std::vector<thread_info *>.
7312 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7314 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7316 * record-btrace.c (record_btrace_disable_callback): Remove.
7317 (struct scoped_btrace_disable): New.
7318 (record_btrace_open): Use scoped_btrace_disable.
7320 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7322 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7323 reading values from registers.
7325 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7327 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7330 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7332 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7333 change parameter type. Use GDB's print functions, and use
7334 core_addr_to_string where appropriate.
7335 (riscv_push_dummy_call): Use core_addr_to_string where
7336 appropriate, update call to riscv_print_arg_location, and reindent
7338 (riscv_return_value): Update call to riscv_print_arg_location.
7340 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7341 Tim Newsome <tim@sifive.com>
7342 Albert Ou <a0u@eecs.berkeley.edu>
7343 Darius Rad <darius@bluespec.com>
7345 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7346 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7347 (ALLDEPFILES): Add riscv-tdep.c
7348 * configure.tgt: Add riscv support.
7349 * riscv-tdep.c: New file.
7350 * riscv-tdep.h: New file.
7351 * NEWS: Mention new target.
7352 * MAINTAINERS: Add entry for riscv.
7354 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7356 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7357 fields within aggregates.
7359 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7361 * record-btrace.c (btrace_print_lines): Change type of flags to
7362 gdb_disassembly_flags.
7364 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7366 * fbsd-nat.c: Include "inf-ptrace.h".
7367 (USE_SIGTRAP_SIGINFO): Conditionally define.
7368 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7369 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7370 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7372 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7374 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7376 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7377 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7378 "supports_stopped_by_hw_breakpoint" target methods.
7380 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7382 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7383 * fbsd-nat.c (debug_fbsd_nat): New variable.
7384 (show_fbsd_nat_debug): New function.
7385 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7386 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7388 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7390 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7391 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7393 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7394 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7397 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7399 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7400 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7402 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7404 * charset.c (struct charset_vector): New.
7405 (charsets): Change type to charset_vector.
7406 (find_charset_names): Adjust.
7408 (_initialize_charset): Adjust.
7410 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7412 * progspace.h (struct program_space) <deleted_solibs>: Change
7413 type to std::vector<std::string>.
7414 * progspace.c (clear_program_space_solib_cache): Adjust.
7415 * breakpoint.c (print_solib_event): Adjust.
7416 (check_status_catch_solib): Adjust.
7417 * solib.c (update_solib_list): Adjust.
7418 * ui-out.h (class ui_out) <field_string>: New overload.
7419 * ui-out.c (ui_out::field_string): New overload.
7421 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7423 * progspace.h (struct program_space): Add constructor and
7424 destructor, initialize fields.
7425 (add_program_space): Remove.
7426 * progspace.c (add_program_space): Rename to...
7427 (program_space::program_space): ... this.
7428 (release_program_space): Rename to...
7429 (program_space::~program_space): ... this.
7430 (delete_program_space): Use delete to delete program_space.
7431 (initialize_progspace): Use new to allocate program_space.
7432 * inferior.c (add_inferior_with_spaces): Likewise.
7433 (clone_inferior_command): Likewise.
7434 * infrun.c (follow_fork_inferior): Likewise.
7435 (handle_vfork_child_exec_or_exit): Likewise.
7437 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7439 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7440 (delim_string_to_char_ptr_vec): Return std::vector of
7441 gdb::unique_xmalloc_ptr.
7442 (dirnames_to_char_ptr_vec_append): Take std::vector of
7443 gdb::unique_xmalloc_ptr.
7444 (dirnames_to_char_ptr_vec): Return std::vector of
7445 gdb::unique_xmalloc_ptr.
7446 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7447 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7448 (delim_string_to_char_ptr_vec): Return an std::vector of
7449 gdb::unique_xmalloc_ptr, adjust the code.
7450 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7451 gdb::unique_xmalloc_ptr, adjust the code.
7452 (dirnames_to_char_ptr_vec): Return an std::vector of
7453 gdb::unique_xmalloc_ptr, adjust the code.
7454 * auto-load.c (auto_load_safe_path_vec): Change type to
7455 std::vector of gdb::unique_xmalloc_ptr.
7456 (auto_load_expand_dir_vars): Return an std::vector of
7457 gdb::unique_xmalloc_ptr, adjust the code.
7458 (auto_load_safe_path_vec_update): Adjust.
7459 (filename_is_in_auto_load_safe_path_vec): Adjust.
7460 (auto_load_objfile_script_1): Adjust.
7461 * build-id.c (build_id_to_debug_bfd): Adjust.
7462 * linux-thread-db.c (thread_db_load_search): Adjust.
7463 * source.c (add_path): Adjust.
7465 * symfile.c (find_separate_debug_file): Adjust.
7466 * utils.c (do_free_char_ptr_vec): Remove.
7467 (make_cleanup_free_char_ptr_vec): Remove.
7469 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7472 * common/pathstuff.c: Conditionally include "<windows.h>".
7474 2018-03-01 Georg Sauthoff <mail@georg.so>
7477 * gcore.in: Quote variables and switch interpreter to bash.
7479 2018-03-01 Tom Tromey <tom@tromey.com>
7481 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7482 assertion. Add assertion for discriminant_index.
7483 (quirk_rust_enum): Use correct base type name in univariant case.
7485 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7487 * record.c (get_call_history_modifiers): Return a
7489 (cmd_record_call_history): Adjust.
7490 * record-btrace.c (record_btrace_call_history): Adjust.
7491 (record_btrace_call_history_range): Adjust.
7492 (record_btrace_call_history_from): Adjust.
7493 * target-debug.h (target_debug_print_record_print_flags): New.
7494 * target-delegates.c: Re-generate.
7495 * target.c (target_call_history): Change flags type.
7496 (target_call_history_from): Likewise.
7497 (target_call_history_range): Likewise.
7498 * target.h (struct target_ops) <target_call_history>: Likewise.
7499 (target_call_history_from): Likewise.
7500 (target_call_history_range): Likewise.
7502 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7503 Simon Marchi <simon.marchi@polymtl.ca>
7505 * common/common-utils.c: Include "sys/stat.h".
7506 (is_regular_file): Move here from "source.c"; change return
7508 * common/common-utils.h (is_regular_file): New prototype.
7509 * common/pathstuff.c (contains_dir_separator): New function.
7510 * common/pathstuff.h (contains_dir_separator): New prototype.
7511 * source.c: Don't include "sys/stat.h".
7512 (is_regular_file): Move to "common/common-utils.c".
7514 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7516 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7517 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7518 * auto-load.c: Include "common/pathstuff.h".
7519 * common/common-def.h (current_directory): Move here.
7520 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7522 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7524 * common/pathstuff.c: New file.
7525 * common/pathstuff.h: New file.
7526 * compile/compile.c: Include "common/pathstuff.h".
7527 * defs.h (current_directory): Move to "common/common-defs.h".
7528 * dwarf2read.c: Include "common/pathstuff.h".
7530 * guile/scm-safe-call.c: Likewise.
7531 * linux-thread-db.c: Likewise.
7533 * nto-tdep.c: Likewise.
7534 * objfiles.c: Likewise.
7535 * source.c: Likewise.
7536 * symtab.c: Likewise.
7537 * utils.c: Include "common/pathstuff.h".
7538 (gdb_realpath): Move to "common/pathstuff.c".
7539 (gdb_realpath_keepfile): Likewise.
7540 (gdb_abspath): Likewise.
7541 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7542 (gdb_realpath_keepfile): Likewise.
7543 (gdb_abspath): Likewise.
7545 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7547 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7548 wildcard process pid for super_resume for kernels with a
7551 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7553 * compile/compile.c (get_args): Add additional comments
7554 explaining function.
7556 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7557 Tom Tromey <tom@tromey.com>
7559 * target.h (memory_write_request_s): Remove typedef. Don't define
7561 (target_write_memory_blocks): Change argument to std::vector.
7562 (struct memory_write_request): Add constructor.
7563 * target-memory.c (compare_block_starting_address): Return bool.
7564 Change argument types.
7565 (claim_memory): Change arguments to use std::vector.
7566 (split_regular_and_flash_blocks, blocks_to_erase)
7567 (compute_garbled_blocks): Likewise.
7568 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7569 (target_write_memory_blocks): Change argument to std::vector.
7570 * symfile.c (struct load_section_data): Add constructor and
7571 destructor. Use std::vector for "requests".
7572 (struct load_progress_data): Add initializers.
7573 (load_section_callback): Update. Use "new".
7574 (clear_memory_write_data): Remove.
7575 (generic_load): Update.
7577 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7579 * arch/aarch64.h: Use common/tdesc.h.
7581 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7583 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7584 architecture with a 64-bit ABI.
7586 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7588 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7589 ahead of target description loading.
7591 2018-02-26 Tom Tromey <tom@tromey.com>
7593 * stack.c (backtrace_command_1): Update.
7594 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7596 * python/py-framefilter.c (py_print_frame)
7597 (gdbpy_apply_frame_filter): Change type of "flags".
7598 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7600 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7601 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7602 * extension.h (enum frame_filter_flag): Rename from
7604 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7605 (apply_ext_lang_frame_filter): Change type of "flags".
7606 * extension.c (apply_ext_lang_frame_filter): Change type of
7608 * extension-priv.h (struct extension_language_ops)
7609 <apply_frame_filter>: Change type of "flags".
7611 2018-02-26 Tom Tromey <tom@tromey.com>
7614 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7615 off-by-one in py_end computation.
7616 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7618 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7621 2018-02-26 Tom Tromey <tom@tromey.com>
7623 * dwarf2read.c (struct variant_field): New.
7624 (struct nextfield) <variant>: New field.
7625 (dwarf2_add_field): Handle DW_TAG_variant_part.
7626 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7627 discriminated union.
7628 (read_structure_type): Handle DW_TAG_variant_part.
7629 (handle_struct_member_die): New function, extracted from
7630 process_structure_scope. Handle DW_TAG_variant.
7631 (process_structure_scope): Handle discriminated unions. Call
7632 handle_struct_member_die.
7634 2018-02-26 Tom Tromey <tom@tromey.com>
7636 * rust-lang.h (rust_last_path_segment): Declare.
7637 * rust-lang.c (rust_last_path_segment): Now public. Change
7639 (struct disr_info): Remove.
7640 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7641 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7642 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7643 (rust_enum_p, rust_enum_variant): New function.
7644 (rust_underscore_fields): Remove "offset" parameter.
7645 (rust_print_enum): New function.
7646 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7647 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7648 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7650 (rust_internal_print_type): New function, from rust_print_type.
7652 (rust_print_type): Call rust_internal_print_type.
7653 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7654 Update enum handling.
7655 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7656 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7657 (rust_union_quirks): New functions.
7658 (process_full_comp_unit, process_full_type_unit): Call
7660 (process_structure_scope): Update rust_unions if necessary.
7662 2018-02-26 Tom Tromey <tom@tromey.com>
7664 * value.h (value_union_variant): Declare.
7665 * valops.c (value_union_variant): New function.
7666 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7667 (struct discriminant_info): New.
7668 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7670 (struct main_type) <flag_discriminated_union>: New field.
7672 2018-02-26 Tom Tromey <tom@tromey.com>
7674 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7675 unittests/unpack-selftests.c.
7676 * unittests/unpack-selftests.c: New file.
7677 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7679 2018-02-26 Yao Qi <yao.qi@linaro.org>
7681 * dwarf2read.c (struct partial_die_info) <read>: New method.
7682 (read_partial_die): Remove the declaration.
7683 (load_partial_dies): Update.
7684 (partial_die_info::partial_die_info):
7685 (read_partial_die): Change it to partial_die_info::read.
7687 2018-02-26 Yao Qi <yao.qi@linaro.org>
7689 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7690 (fixup_partial_die): Remove declaration.
7691 (scan_partial_symbols): Update.
7692 (partial_die_parent_scope): Likewise.
7693 (partial_die_full_name): Likewise.
7694 (fixup_partial_die): Change it to partial_die_info::fixup.
7696 2018-02-26 Yao Qi <yao.qi@linaro.org>
7698 * dwarf2read.c (read_partial_die): Update the declaration.
7699 (load_partial_dies): Caller update.
7700 (read_partial_die): Remove one argument abbrev_len.
7702 2018-02-26 Yao Qi <yao.qi@linaro.org>
7704 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7705 assignment operator.
7706 (load_partial_dies): Use ctor and copy ctor.
7707 (read_partial_die): Update.
7708 (dwarf2_cu::find_partial_die): Use ctor.
7710 2018-02-26 Yao Qi <yao.qi@linaro.org>
7712 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7713 (find_partial_die_in_comp_unit): Change it to
7714 dwarf2_cu::find_partial_die.
7715 (find_partial_die): Update.
7717 2018-02-26 Yao Qi <yao.qi@linaro.org>
7719 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7722 2018-02-26 Yao Qi <yao.qi@linaro.org>
7724 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7726 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7728 * arch/amd64.h: Use common/tdesc.h.
7729 * arch/i386.c: Likewise.
7730 * arch/i386.h: Likewise.
7731 * arch/tic6x.c: Likewise.
7732 * arch/tdesc.h: Move file from here...
7733 * common/tdesc.h: ...to here.
7734 * features/aarch64-core.c: Regenerate.
7735 * features/aarch64-fpu.c: Regenerate.
7736 * features/i386/32bit-avx.c: Regenerate.
7737 * features/i386/32bit-avx512.c: Regenerate.
7738 * features/i386/32bit-core.c: Regenerate.
7739 * features/i386/32bit-linux.c: Regenerate.
7740 * features/i386/32bit-mpx.c: Regenerate.
7741 * features/i386/32bit-pkeys.c: Regenerate.
7742 * features/i386/32bit-sse.c: Regenerate.
7743 * features/i386/64bit-avx.c: Regenerate.
7744 * features/i386/64bit-avx512.c: Regenerate.
7745 * features/i386/64bit-core.c: Regenerate.
7746 * features/i386/64bit-linux.c: Regenerate.
7747 * features/i386/64bit-mpx.c: Regenerate.
7748 * features/i386/64bit-pkeys.c: Regenerate.
7749 * features/i386/64bit-segments.c: Regenerate.
7750 * features/i386/64bit-sse.c: Regenerate.
7751 * features/i386/x32-core.c: Regenerate.
7752 * features/tic6x-c6xp.c: Regenerate.
7753 * features/tic6x-core.c: Regenerate.
7754 * features/tic6x-gp.c: Regenerate.
7755 * target-descriptions.c: Use common/tdesc.h.
7756 * target-descriptions.h: Likewise.
7758 2018-02-24 Tom Tromey <tom@tromey.com>
7760 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7761 (try_thread_db_load_from_dir, thread_db_load_search): Use
7763 (info_auto_load_libthread_db_compare): Return bool. Change
7765 (info_auto_load_libthread_db): Use std::vector, std::string.
7768 2018-02-24 Tom Tromey <tom@tromey.com>
7770 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7772 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7774 * gdbarch.c: Rebuild.
7775 * gdbarch.h: Rebuild.
7776 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7777 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7778 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7781 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7783 * gdbtypes.h (sect_offset): Change type to uint64_t.
7784 (sect_offset_str): New function.
7785 * dwarf2read.c (create_addrmap_from_aranges): Use
7787 (error_check_comp_unit_head): Likewise.
7788 (create_debug_type_hash_table): Likewise.
7789 (read_cutu_die_from_dwo): Likewise.
7790 (init_cutu_and_read_dies): Likewise.
7791 (init_cutu_and_read_dies_no_follow): Likewise.
7792 (process_psymtab_comp_unit_reader): Likewise.
7793 (partial_die_parent_scope): Likewise.
7794 (peek_die_abbrev): Likewise.
7795 (process_queue): Likewise.
7796 (dwarf2_physname): Likewise.
7797 (read_namespace_alias): Likewise.
7798 (read_import_statement): Likewise.
7799 (create_dwo_cu_reader): Likewise.
7800 (create_cus_hash_table): Likewise.
7801 (lookup_dwo_cutu): Likewise.
7802 (inherit_abstract_dies): Likewise.
7803 (read_func_scope): Likewise.
7804 (read_call_site_scope): Likewise.
7805 (dwarf2_add_member_fn): Likewise.
7806 (read_common_block): Likewise.
7807 (read_module_type): Likewise.
7808 (read_typedef): Likewise.
7809 (read_subrange_type): Likewise.
7810 (load_partial_dies): Likewise.
7811 (read_partial_die): Likewise.
7812 (find_partial_die): Likewise.
7813 (read_str_index): Likewise.
7814 (dwarf2_string_attr): Likewise.
7815 (build_error_marker_type): Likewise.
7816 (lookup_die_type): Likewise.
7817 (dump_die_shallow): Likewise.
7818 (follow_die_ref): Likewise.
7819 (dwarf2_fetch_die_loc_sect_off): Likewise.
7820 (dwarf2_fetch_constant_bytes): Likewise.
7821 (follow_die_sig): Likewise.
7822 (get_signatured_type): Likewise.
7823 (get_DW_AT_signature_type): Likewise.
7824 (dwarf2_find_containing_comp_unit): Likewise.
7825 (set_die_type): Likewise.
7827 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7829 * arch/aarch64.c: Include "common-defs.h".
7830 * arch/amd64.c: Likewise.
7831 * arch/i386.c: Likewise.
7833 2018-02-21 Tom Tromey <tom@tromey.com>
7835 * value.h: (extract_field_op): Update.
7836 * eval.c (extract_field_op): Return a const char *.
7837 * expression.h (parse_expression_for_completion): Update.
7838 * completer.c (complete_expression): Update.
7839 (add_struct_fields): Make fieldname const.
7840 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7841 (mark_completion_tag, parse_exp_in_context_1): Update.
7842 (parse_expression_for_completion): Change "name" to
7843 unique_xmalloc_ptr*.
7845 2018-02-21 Tom Tromey <tom@tromey.com>
7847 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7849 2018-02-21 Yao Qi <yao.qi@linaro.org>
7851 * avr-tdep.c (avr_read_pc): Change parameter type to
7853 * gdbarch.sh (read_pc): Likewise.
7854 * gdbarch.c: Re-generated.
7855 * gdbarch.h: Re-generated.
7856 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7858 * ia64-tdep.c (ia64_read_pc): Likewise.
7859 * mips-tdep.c (mips_read_pc): Likewise.
7860 * spu-tdep.c (spu_read_pc): Likewise.
7862 2018-02-21 Yao Qi <yao.qi@linaro.org>
7864 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7865 * regcache-dump.c: New file.
7866 * regcache.c: Move register_dump to regcache-dump.c.
7867 (maintenance_print_registers): Likewise.
7868 (maintenance_print_raw_registers): Likewise.
7869 (maintenance_print_cooked_registers): Likewise.
7870 (maintenance_print_register_groups): Likewise.
7871 (maintenance_print_remote_registers): Likewise.
7872 (_initialize_regcache): Likewise.
7873 * regcache.h (register_dump): Moved from regcache.c.
7875 2018-02-21 Yao Qi <yao.qi@linaro.org>
7877 * regcache.c (regcache::regcache): Update.
7878 (regcache::invalidate): Move it to detached_regcache::invalidate.
7879 (get_thread_arch_aspace_regcache): Update.
7880 (regcache::raw_update): Update.
7881 (regcache::cooked_read): Remove some code.
7882 (regcache::cooked_read_value): Likewise.
7883 (regcache::raw_write): Remove assert on m_readonly_p.
7884 (regcache::raw_supply_integer): Move it to
7885 detached_regcache::raw_supply_integer.
7886 (regcache::raw_supply_zeroed): Likewise.
7887 * regcache.h (detached_regcache) <raw_supply_integer>: New
7889 <raw_supply_zeroed, invalidate>: Likewise.
7890 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7891 <invalidate>: Likewise.
7892 <m_readonly_p>: Removed.
7894 2018-02-21 Yao Qi <yao.qi@linaro.org>
7896 * infcmd.c (get_return_value): Let stop_regs point to
7897 get_current_regcache.
7898 * regcache.c (regcache::regcache): Remove.
7899 (register_dump_reg_buffer): New class.
7900 (regcache_print): Adjust.
7901 * regcache.h (regcache): Remove constructors.
7903 2018-02-21 Yao Qi <yao.qi@linaro.org>
7905 * regcache.c (class register_dump): New class.
7906 (register_dump_regcache, register_dump_none): New class.
7907 (register_dump_remote, register_dump_groups): New class.
7908 (regcache_print): Update.
7909 * regcache.h (regcache_dump_what): Move it to regcache.c.
7910 (regcache) <dump>: Remove.
7912 2018-02-21 Yao Qi <yao.qi@linaro.org>
7914 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7916 (jit_unwind_reg_set_impl): Call raw_supply.
7917 (jit_frame_sniffer): Use reg_buffer_rw.
7918 * record-full.c (record_full_core_regbuf): Change its type.
7919 (record_full_core_open_1): Use reg_buffer_rw.
7920 (record_full_close): Likewise.
7921 (record_full_core_fetch_registers): Use regcache->raw_supply.
7922 (record_full_core_store_registers): Likewise.
7923 * regcache.c (regcache::get_register_status): Move it to
7925 (regcache_raw_set_cached_value): Remove.
7926 (regcache::raw_set_cached_value): Remove.
7927 (regcache::raw_write): Call raw_supply.
7928 (regcache::raw_supply): Move it to reg_buffer_rw.
7929 * regcache.h (regcache_raw_set_cached_value): Remove.
7930 (reg_buffer_rw): New class.
7932 2018-02-21 Yao Qi <yao.qi@linaro.org>
7934 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7935 readonly_detached_regcache.
7936 (dummy_frame_prev_register): Use regcache->cooked_read.
7937 * frame.c (frame_save_as_regcache): Change return type.
7938 (frame_pop): Update.
7939 * frame.h (frame_save_as_regcache): Update declaration.
7940 * inferior.h (get_infcall_suspend_state_regcache): Update
7942 * infrun.c (infcall_suspend_state) <registers>: use
7943 readonly_detached_regcache.
7944 (save_infcall_suspend_state): Don't use regcache_dup.
7945 (get_infcall_suspend_state_regcache): Change return type.
7946 * linux-fork.c (struct fork_info) <savedregs>: Change to
7947 readonly_detached_regcache.
7949 (fork_save_infrun_state): Don't use regcache_dup.
7950 (info_checkpoints_command): Adjust.
7951 * mi/mi-main.c (register_changed_p): Update declaration.
7952 (mi_cmd_data_list_changed_registers): Use
7953 readonly_detached_regcache.
7954 (register_changed_p): Change parameter type to
7955 readonly_detached_regcache.
7956 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7957 readonly_detached_regcache.
7958 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7959 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7961 (regcache::save): Move it to reg_buffer.
7962 (regcache::restore): Change parameter type.
7963 (regcache_dup): Remove.
7964 * regcache.h (reg_buffer) <save>: New method.
7965 (readonly_detached_regcache): New class.
7966 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7967 readonly_detached_regcache.
7968 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7970 2018-02-21 Yao Qi <yao.qi@linaro.org>
7972 * frame.c (frame_save_as_regcache): Use regcache method save.
7973 (frame_pop): Use regcache method restore.
7974 * infrun.c (restore_infcall_suspend_state): Likewise.
7975 * linux-fork.c (fork_load_infrun_state): Likewise.
7976 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7978 * regcache.c (regcache_save): Remove.
7979 (regcache::restore): More asserts.
7980 (regcache_cpy): Remove.
7981 * regcache.h (regcache_save): Remove the declaration.
7982 (regcache::restore): Move from private to public.
7983 Remove the friend declaration of regcache_cpy.
7984 (regcache_cpy): Remove declaration.
7986 2018-02-21 Yao Qi <yao.qi@linaro.org>
7988 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7989 parameter type to 'readable_regcache *'.
7990 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7991 * arm-tdep.c (arm_neon_quad_read): Likewise.
7992 (arm_pseudo_read): Likewise.
7993 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7994 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7995 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7996 * gdbarch.c: Re-generated.
7997 * gdbarch.h: Re-generated.
7998 * gdbarch.sh (pseudo_register_read): Change parameter type to
7999 'readable_regcache *'.
8000 (pseudo_register_read_value): Likewise.
8001 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8002 (h8300_pseudo_register_read): Likewise.
8003 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8004 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8005 (i386_pseudo_register_read_into_value): Likewise.
8006 (i386_pseudo_register_read_value): Likewise.
8007 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8009 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8010 * m32c-tdep.c (m32c_raw_read): Likewise.
8011 (m32c_read_flg): Likewise.
8012 (m32c_banked_register): Likewise.
8013 (m32c_banked_read): Likewise.
8014 (m32c_sb_read): Likewise.
8015 (m32c_part_read): Likewise.
8016 (m32c_cat_read): Likewise.
8017 (m32c_r3r2r1r0_read): Likewise.
8018 (m32c_pseudo_register_read): Likewise.
8019 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8020 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8021 (mep_pseudo_cr64_read): Likewise.
8022 (mep_pseudo_register_read): Likewise.
8023 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8024 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8025 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8026 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8027 (regcache::cooked_read): Likewise.
8028 (regcache::cooked_read_value): Likewise.
8029 (regcache_cooked_read_signed):
8030 (regcache::cooked_read): Likewise.
8031 * regcache.h (readable_regcache): New class.
8032 (regcache): Inherit readable_regcache. Move some methods to
8034 * rl78-tdep.c (rl78_pseudo_register_read): Change
8035 parameter type to 'readable_regcache *'.
8036 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8037 (e500_pseudo_register_read): Change parameter type to
8038 'readable_regcache *'.
8039 (dfp_pseudo_register_read): Likewise.
8040 (vsx_pseudo_register_read): Likewise.
8041 (efpr_pseudo_register_read): Likewise.
8042 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8043 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8044 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8045 (sh64_pseudo_register_read): Likewise.
8046 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8047 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8048 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8049 (spu_pseudo_register_read): Likewise.
8050 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8051 (xtensa_pseudo_register_read): Likewise.
8053 2018-02-21 Yao Qi <yao.qi@linaro.org>
8055 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8056 (regcache::arch): Move it to reg_buffer::arch.
8057 (regcache::register_buffer): Likewise.
8058 (regcache::assert_regnum): Likewise.
8059 (regcache::num_raw_registers): Likewise.
8060 * regcache.h (reg_buffer): New class.
8061 (regcache): Inherit reg_buffer.
8063 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8065 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8066 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8068 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8070 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8072 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8074 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8075 (SFILES): Remove common/*.c files.
8076 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8077 * common/common.host: Add common reference.
8078 * configure.ac: Likewise.
8079 * configure: Regenerate.
8081 2018-02-16 Yao Qi <yao.qi@linaro.org>
8083 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8084 (block_initialize_namespace): Use new.
8085 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8086 (dwarf2_free_objfile): Use delete.
8087 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8088 (copy_type_recursive): Use new.
8089 * gdb_obstack.h (allocate_on_obstack): New.
8091 2018-02-15 Yao Qi <yao.qi@linaro.org>
8094 * inferior.c (exit_inferior_1): Reset inf->control.
8096 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8098 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8101 2018-02-14 Pedro Alves <palves@redhat.com>
8103 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8104 frame_cleanup_after_sniffer on exception.
8106 2018-02-14 Tom Tromey <tom@tromey.com>
8108 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8110 (solib_bfd_open): Make pathname const.
8111 * solib.c (solib_bfd_open): Make pathname const.
8112 * solib-spu.c (spu_bfd_fopen): Make name const.
8113 (spu_bfd_open): Make pathname const.
8114 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8115 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8117 2018-02-14 Tom Tromey <tom@tromey.com>
8119 * symfile.c (symfile_bfd_open): Update.
8120 * source.h (openp, source_full_path_of, find_and_open_source):
8121 Change argument type to unique_xmalloc_ptr.
8122 * source.c (openp): Take a unique_xmalloc_ptr.
8123 (source_full_path_of, find_and_open_source): Likewise.
8124 (open_source_file, symtab_to_fullname): Update.
8125 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8127 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8128 (exec_file_find): Update.
8129 * psymtab.c (psymtab_to_fullname): Update.
8130 * nto-tdep.h (nto_find_and_open_solib): Update.
8131 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8133 * exec.c (exec_file_attach): Update.
8134 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8135 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8137 2018-02-14 Tom Tromey <tom@tromey.com>
8139 * solib.c: Include source.h.
8140 * nto-tdep.c: Include source.h.
8141 * mi/mi-cmd-env.c: Include source.h.
8142 * infcmd.c: Include source.h.
8143 * exec.c: Include source.h.
8144 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8145 (add_path, directory_switch, source_path, init_source_path): Move
8147 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8148 (add_path, directory_switch, source_path, init_source_path):
8151 2018-02-14 Tom Tromey <tom@tromey.com>
8153 * solist.h (exec_file_find, solib_find): Return
8155 (solib_bfd_fopen): Take a const char *.
8156 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8157 (exec_file_find, solib_find): Likewise.
8158 (solib_bfd_fopen): Do not take ownership of "pathname".
8159 (solib_bfd_open): Use unique_xmalloc_ptr.
8160 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8161 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8162 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8163 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8165 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8167 * ada-lang.c (name_match_type_from_name): Remove reference to
8168 ada_name_for_lookup in function's documentation.
8169 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8171 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8173 * defs.h (enum openp_flags): New enum.
8174 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8175 Move to enum openp_flags.
8176 (openp_flags): New enum flags.
8177 (openp): Change parameter type to openp_flags.
8178 * source.c (openp): Change parameter type to openp_flags.
8179 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8180 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8182 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8184 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8187 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8189 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8191 (class dwarf2_queue_guard): ...the destructor of this new class.
8192 (dw2_do_instantiate_symtab): Create instance of the new class
8193 dwarf2_queue_guard, remove cleanup.
8195 2018-02-09 Tom Tromey <tom@tromey.com>
8197 * source.c (find_source_lines): Don't reference past the end of
8200 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8202 * remote.c (remote_btrace_maybe_reopen): Change error message.
8203 * btrace.c (btrace_enable): Likewise.
8204 (parse_xml_btrace): Likewise.
8205 (parse_xml_btrace_conf): Likewise.
8207 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8209 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8210 (linux_enable_pt, linux_enable_bts): Call
8211 diagnose_perf_event_open_fail.
8213 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8215 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8216 Remove parameter and change return type. Update callers. Move it.
8217 (linux_enable_bts, linux_enable_pt): Improve error message.
8218 (linux_enable_pt): Remove zero buffer size check.
8219 (linux_enable_btrace): Improve error messages. Remove NULL return
8222 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8224 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8225 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8226 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8227 (linux_supports_pt, linux_supports_btrace): Remove.
8228 (linux_enable_bts): Call cpu_supports_bts.
8229 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8230 * remote.c (remote_supports_btrace): Remove.
8231 (init_remote_ops): Remove remote_supports_btrace.
8232 * target-delegates.c: Regenerated.
8233 * target.c (target_supports_btrace): Remove.
8234 * target.h (target_ops) <to_supports_btrace>: Remove
8235 (target_supports_btrace): Remove.
8236 * x86-linux-nat.c (x86_linux_create_target): Remove
8237 linux_supports_btrace.
8239 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8241 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8243 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8244 exception and use message in own exception.
8246 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8248 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8249 (perf_event_pt_event_type): Use gdb_file_up.
8250 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8251 scoped_fd, and scoped_mmap.
8253 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8255 * common/scoped_mmap.h: New.
8256 * unittests/scoped_mmap-selftest.c: New.
8257 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8258 unittests/scoped_mmap-selftest.c.
8260 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8262 * common/scoped_fd.h: New.
8263 * unittests/scoped_fd-selftest.c: New.
8264 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8265 unittests/scoped_fd-selftest.c.
8267 2018-02-09 Tom Tromey <tom@tromey.com>
8269 * auto-load.c (auto_load_section_scripts): Use
8270 gdb::unique_xmalloc_ptr.
8272 2018-02-09 Tom Tromey <tom@tromey.com>
8274 * auto-load.c (execute_script_contents): Use std::string.
8276 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8278 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8279 Python function, rather than a new command.
8281 2018-02-08 Tom Tromey <tom@tromey.com>
8283 * solib.c (solib_find_1): Use std::string.
8284 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8286 2018-02-08 Tom Tromey <tom@tromey.com>
8288 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8290 2018-02-08 Tom Tromey <tom@tromey.com>
8292 * source.c (find_source_lines): Use gdb::def_vector.
8294 2018-02-08 Tom Tromey <tom@tromey.com>
8296 * macrocmd.c (struct temporary_macro_definition): New.
8297 (macro_define_command): Use temporary_macro_definition. Remove
8299 (free_macro_definition_ptr): Remove.
8301 2018-02-08 Tom Tromey <tom@tromey.com>
8303 * macroexp.c (maybe_expand): Use std::string.
8305 2018-02-08 Tom Tromey <tom@tromey.com>
8307 * macroexp.c (struct macro_buffer): Add initializers for some
8309 (init_buffer, init_shared_buffer, free_buffer)
8310 (free_buffer_return_text): Remove.
8311 (macro_buffer): New constructors.
8312 (~macro_buffer): New destructor.
8313 (macro_buffer::set_shared): New method.
8314 (macro_buffer::resize_buffer, macro_buffer::appendc)
8315 (macro_buffer::appendmem): Now methods, not free functions.
8316 (set_token, append_tokens_without_splicing, stringify)
8317 (macro_stringify): Update.
8318 (gather_arguments): Change return type. Remove argc_p argument,
8319 add args_ptr argument. Use std::vector.
8320 (substitute_args): Remove argc argument. Accept std::vector.
8321 (expand): Update. Use std::vector.
8322 (scan, macro_expand, macro_expand_next): Update.
8324 2018-02-08 Tom Tromey <tom@tromey.com>
8326 * symtab.c (default_collect_symbol_completion_matches_break_on):
8327 Use unique_xmalloc_ptr.
8328 * macroscope.h: (sal_macro_scope, user_macro_scope)
8329 (default_macro_scope): Return unique_xmalloc_ptr.
8330 * macroscope.c (sal_macro_scope, user_macro_scope)
8331 (default_macro_scope): Return unique_xmalloc_ptr.
8332 * macroexp.h (macro_expand, macro_expand_once): Return
8334 * macroexp.c (macro_expand, macro_expand_once): Return
8336 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8337 (info_macro_command, info_macros_command): Use
8339 * compile/compile-c-support.c (write_macro_definitions): Use
8341 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8343 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8345 * value.c (value_static_field): Assign field type instead of
8346 containing type when returning an optimized out value.
8348 2018-02-06 Yao Qi <yao.qi@linaro.org>
8350 * ft32-tdep.c (ft32_read_pc): Remove.
8351 (ft32_write_pc): Remove.
8352 (ft32_gdbarch_init): Update.
8353 * m32r-tdep.c (m32r_read_pc): Remove.
8354 (m32r_gdbarch_init): Update.
8355 * mep-tdep.c (mep_read_pc): Remove.
8356 (mep_gdbarch_init): Update.
8357 * microblaze-tdep.c (microblaze_write_pc): Remove.
8358 (microblaze_gdbarch_init): Update.
8359 * mn10300-tdep.c (mn10300_read_pc): Remove.
8360 (mn10300_write_pc): Remove.
8361 (mn10300_gdbarch_init): Update.
8362 * moxie-tdep.c (moxie_read_pc): Remove.
8363 (moxie_write_pc): Remove.
8364 (moxie_gdbarch_init): Update.
8366 2018-02-06 Yao Qi <yao.qi@linaro.org>
8368 * expprint.c (print_subexp_standard): Handle
8369 OP_F77_UNDETERMINED_ARGLIST.
8370 (dump_subexp_body_standard): Likewise.
8372 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8374 * target-descriptions.c (tdesc_element_visitor) Add empty
8376 (tdesc_type): Move make_gdb_type from here.
8377 (tdesc_type_builtin): Likewise.
8378 (tdesc_type_vector): Likewise.
8379 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8380 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8381 (make_gdb_type_union): Likewise.
8382 (make_gdb_type_flags): Likewise.
8383 (make_gdb_type_enum): Likewise.
8384 (make_gdb_type): New function.
8385 (tdesc_register_type): Use static make_gdb_type.
8387 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8389 * infcmd.c (default_print_one_register_info): Align natural-format
8390 column values consistently one under another.
8391 (pad_to_column): New function.
8393 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8395 * dwarf2read.c (dwarf2_physname): Move commment.
8397 2018-02-01 Leszek Swirski <leszeks@google.com>
8399 * varobj.c (varobj_formatted_print_options): Allow recursive
8400 pretty printing if pretty printing is enabled.
8402 2018-02-01 Leszek Swirski <leszeks@google.com>
8404 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8405 names after a structop as a filename.
8407 2018-02-01 Yao Qi <yao.qi@linaro.org>
8409 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8410 (arm_record_coproc_data_proc): Likewise.
8412 2018-02-01 Yao Qi <yao.qi@linaro.org>
8414 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8416 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8418 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8419 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8421 2018-01-31 Pedro Alves <palves@redhat.com>
8423 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8424 * inflow.c (child_terminal_save_inferior): Wrap reference to
8425 tcgetpgrp in HAVE_TERMIOS_H.
8426 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8428 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8429 always iterate over all inferiors.
8430 (gdbsim_cntrl_c): Adjust.
8431 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8433 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8435 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8436 index type is objfile-owned if the element type is as well.
8438 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8442 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8444 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8445 "features/s390x-linux64.c".
8446 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8447 s390_linux32 and s390x_linux64.
8448 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8450 * s390-tdep.c: Include "features/s390-linux32.c" and
8451 "features/s390x-linux64.c".
8452 (s390_tdesc_valid): Add check for tdesc_has_registers.
8453 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8454 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8455 tdesc_s390x_linux64.
8456 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8457 tdesc_s390x_linux64 to...
8458 * s390-tdep.h: ...here.
8460 2018-01-30 Pedro Alves <palves@redhat.com>
8463 * config.in, configure: Regenerate.
8464 * configure.ac: Check for getpgid.
8465 * go32-nat.c (go32_pass_ctrlc): New.
8466 (go32_target): Install it.
8467 * inf-child.c (inf_child_target): Install
8468 child_terminal_save_inferior, child_pass_ctrlc and
8470 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8471 (inf_ptrace_target): No longer install it.
8472 * infcmd.c (interrupt_target_1): Adjust.
8473 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8474 (child_interrupt): Declare.
8475 (inferior::terminal_state): New.
8476 * inflow.c (struct terminal_info): Update comments.
8477 (inferior_process_group): Delete.
8478 (terminal_is_ours): Delete.
8479 (gdb_tty_state): New.
8480 (child_terminal_init): Adjust.
8481 (is_gdb_terminal, sharing_input_terminal_1)
8482 (sharing_input_terminal): New functions.
8483 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8484 Set the process's actual process group in the foreground if
8485 possible. Handle is_ours_for_output/is_ours distinction. Don't
8486 mark terminal as the inferior's if not sharing GDB's terminal.
8487 Don't check attach_flag.
8488 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8489 pass down a target_terminal_state.
8490 (child_terminal_save_inferior): New, factored out from ...
8491 (child_terminal_ours_1): ... this. Handle
8492 target_terminal_state::is_ours_for_output.
8493 (child_interrupt, child_pass_ctrlc): New.
8494 (inflow_inferior_exit): Clear the inferior's terminal_state.
8495 (copy_terminal_info): Copy the inferior's terminal state.
8496 (_initialize_inflow): Remove reference to terminal_is_ours.
8497 * inflow.h (inferior_process_group): Delete.
8498 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8499 * procfs.c (procfs_target): Don't install procfs_interrupt.
8500 (procfs_interrupt): Delete.
8501 * remote.c (remote_serial_quit_handler): Adjust.
8502 (remote_interrupt): Remove ptid parameter. Adjust.
8503 * target-delegates.c: Regenerate.
8504 * target.c: Include "terminal.h".
8505 (target_terminal::terminal_state): Rename to ...
8506 (target_terminal::m_terminal_state): ... this.
8507 (target_terminal::init): Adjust.
8508 (target_terminal::inferior): Adjust to per-inferior
8510 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8511 (target_terminal::ours, target_terminal::ours_for_output): Use
8512 target_terminal_is_ours_kind.
8513 (target_interrupt): Remove ptid parameter. Adjust.
8514 (default_target_pass_ctrlc): Adjust.
8515 * target.h (target_ops::to_terminal_save_inferior): New field.
8516 (target_ops::to_interrupt): Remove ptid_t parameter.
8517 (target_interrupt): Remove ptid_t parameter. Update comment.
8518 (target_pass_ctrlc): Update comment.
8519 * target/target.h (target_terminal_state): New scoped enum,
8521 (target_terminal::terminal_state): ... here.
8522 (target_terminal::inferior): Update comments.
8523 (target_terminal::restore_inferior): New.
8524 (target_terminal::is_inferior, target_terminal::is_ours)
8525 (target_terminal::is_ours_for_output): Adjust.
8526 (target_terminal::scoped_restore_terminal_state): Adjust to
8527 rename, and call restore_inferior() instead of inferior().
8528 (target_terminal::scoped_restore_terminal_state::m_state): Change
8530 (target_terminal::terminal_state): Rename to ...
8531 (target_terminal::m_terminal_state): ... this and change type.
8533 2018-01-30 Pedro Alves <palves@redhat.com>
8535 * linux-nat.c (wait_for_signal): New function.
8536 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8538 (async_terminal_is_ours)
8539 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8540 (linux_nat_add_target): Don't override
8541 to_terminal_inferior/to_terminal_ours.
8543 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8545 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8547 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8549 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8550 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8551 dwarf2_per_objfile_free here.
8552 (dwarf2_per_objfile_free): Remove.
8553 (_initialize_dwarf2_read): Don't register
8554 dwarf2_per_objfile_free as a registry cleanup.
8556 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8558 Avoid compilation errors in MinGW native builds
8560 The error is triggered by including python-internal.h, and the
8563 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8564 from build-gnulib/import/math.h:27,
8565 from d:/usr/Python26/include/pyport.h:235,
8566 from d:/usr/Python26/include/Python.h:58,
8567 from python/python-internal.h:94,
8568 from python/py-arch.c:24:
8569 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8573 This happens because Python headers define 'hypot' to expand t
8574 '_hypot' in the Windows builds.
8575 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8576 'hypoth'. This avoids a compilation error.
8578 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8580 * MAINTAINERS (Write After Approval): Fix ordering.
8582 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8584 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8586 2018-01-26 Alan Modra <amodra@gmail.com>
8588 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8589 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8590 Remove nop. Make const. Comment.
8591 (powerpc32_plt_stub_so_2): New.
8592 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8593 Correct count. Update uses.
8594 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8595 Move common code reading PLT entry word. Correct
8596 powerpc32_plt_stub PLT address calculation.
8597 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8598 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8599 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8600 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8601 (ppc64_standard_linkage8): Likewise.
8602 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8603 Correct insns description.
8604 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8606 2018-01-24 Pedro Alves <palves@redhat.com>
8608 GCC PR libstdc++/83906
8609 * gdbtypes.c (operator==(const dynamic_prop &,
8610 const dynamic_prop &)): New.
8611 (operator==(const range_bounds &, const range_bounds &)): New.
8612 (check_types_equal): Use them instead of memcmp.
8613 * gdbtypes.h (operator==(const dynamic_prop &,
8614 const dynamic_prop &)): Declare.
8615 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8616 (operator==(const range_bounds &, const range_bounds &)): Declare.
8617 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8619 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8621 * s390-linux-tdep.c (s390_record_address_mask)
8622 (s390_record_calc_disp_common, s390_record_calc_disp)
8623 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8624 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8625 (s390_process_record): Move to s390-tdep.c.
8626 (s390_linux_init_abi_any): Adjust.
8627 * s390-tdep.c (s390_record_address_mask)
8628 (s390_record_calc_disp_common, s390_record_calc_disp)
8629 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8630 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8631 (s390_process_record): Moved from s390-linux-tdep.c
8632 (s390_gdbarch_init): Adjust.
8634 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8636 * s390-linux-nat.c (s390-tdep.h): New include.
8637 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8638 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8639 (ALLDEPFILES): Add s390-tdep.c.
8640 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8641 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8642 * s390-tdep.h: ...this. New file.
8643 * s390-linux-tdep.c (s390-tdep.h): New include.
8644 (_initialize_s390_tdep): Rename to...
8645 (_initialize_s390_linux_tdep): ...this and adjust.
8646 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8647 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8649 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8650 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8651 (s390_is_partial_instruction, s390_software_single_step)
8652 (is_non_branch_ril, s390_displaced_step_copy_insn)
8653 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8654 (s390_prologue_data, s390_addr, s390_store, s390_load)
8655 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8656 (s390_register_call_saved, s390_guess_tracepoint_registers)
8657 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8658 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8659 (s390_pseudo_register_name, s390_pseudo_register_type)
8660 (s390_pseudo_register_read, s390_pseudo_register_write)
8661 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8662 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8663 (s390_addr_bits_remove, s390_address_class_type_flags)
8664 (s390_address_class_type_flags_to_name)
8665 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8666 (s390_function_arg_float, s390_function_arg_vector)
8667 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8668 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8669 (s390_frame_align, s390_register_return_value, s390_return_value)
8670 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8671 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8672 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8673 (s390_trad_frame_prev_register, s390_unwind_cache)
8674 (s390_prologue_frame_unwind_cache)
8675 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8676 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8677 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8678 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8679 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8680 (s390_frame_base_address, s390_local_base_address)
8681 (s390_frame_base, s390_gcc_target_options)
8682 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8683 (s390_validate_reg_range, s390_tdesc_valid)
8684 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8685 * s390-tdep.c: ...this. New file.
8687 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8689 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8690 (s390_process_record, s390_gdbarch_tdep_alloc)
8691 (s390_linux_init_abi_any): Use/set new hook.
8693 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8695 * s390-linux-tdep.c (osabi.h): New include.
8696 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8697 (s390_linux_init_abi_any): New functions.
8698 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8700 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8702 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8703 tdesc_has_registers check
8705 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8707 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8708 (s390_validate_reg_range): New macro.
8709 (s390_gdbarch_init): Adjust.
8711 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8713 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8714 (s390_gdbarch_tdep_alloc): Adjust.
8715 (s390_gdbarch_init): Adjust.
8717 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8719 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8720 <have_tdb>: Change type to bool.
8721 (s390_gdbarch_tdep_alloc): Adjust.
8722 (s390_gdbarch_init): Adjust.
8724 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8726 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8727 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8728 (s390_gdbarch_tdep_alloc): New function.
8729 (s390_gdbarch_init): Allocate tdep at start and use its fields
8730 instead of separate variables.
8732 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8734 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8735 when looking for cached gdbarch and add comment for remaining.
8737 2018-01-22 Pedro Alves <palves@redhat.com>
8738 Sergio Durigan Junior <sergiodj@redhat.com>
8740 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8743 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8745 * MAINTAINERS: Update my company e-mail address.
8747 2018-01-22 Yao Qi <yao.qi@linaro.org>
8749 * regcache.c (cooked_write_test): New function.
8750 (_initialize_regcache): Register the test.
8752 2018-01-22 Yao Qi <yao.qi@linaro.org>
8754 * ia64-tdep.c (ia64_pseudo_register_read): Call
8755 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8756 * m32c-tdep.c (m32c_cat_read): Likewise.
8757 (m32c_r3r2r1r0_read): Likewise.
8758 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8759 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8761 2018-01-22 Yao Qi <yao.qi@linaro.org>
8763 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8764 method raw_read instead of regcache_raw_read.
8765 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8766 * arm-tdep.c (arm_neon_quad_read): Likewise.
8767 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8768 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8769 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8770 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8771 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8772 (i386_pseudo_register_read_into_value): Likewise.
8773 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8774 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8775 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8776 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8777 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8778 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8779 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8780 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8781 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8783 2018-01-22 Yao Qi <yao.qi@linaro.org>
8785 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8786 * configure.tgt: Remove target mt.
8787 * mt-tdep.c: Remove.
8788 * regcache.c (cooked_read_test): Remove the check for mt.
8790 2018-01-22 Yao Qi <yao.qi@linaro.org>
8792 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8793 instead of gdbarch_pseudo_register_read_value.
8795 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8797 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8800 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8802 * linespec.c (create_sals_line_offset): Remove code that preserved
8803 the symtab_and_line's line number.
8805 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8807 * varobj.c (varobj_create): Don't set valid_block when creating a
8810 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8812 * varobj.c (varobj_create): Remove out of date comment.
8814 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8817 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8818 updating innermost block.
8819 * parse.c (innermost_block_tracker::update): Take extra type
8820 parameter, and check types match before updating innermost block.
8821 (write_dollar_variable): Update innermost block for registers.
8822 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8823 (innermost_block_tracker::innermost_block_tracker): Initialise
8825 (innermost_block_tracker::reset): Take type parameter.
8826 (innermost_block_tracker::update): Take type parameter, and pass
8827 type through as needed.
8828 (innermost_block_tracker::m_types): New member.
8829 * varobj.c (varobj_create): Pass type when reseting innermost
8832 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8834 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8835 * ada-lang.c (resolve_subexp): Likewise.
8836 * breakpoint.c (set_breakpoint_condition) Likewise.
8837 (watch_command_1) Likewise.
8838 * c-exp.y (variable): Likewise.
8839 * d-exp.y (PrimaryExpression): Likewise.
8840 * f-exp.y (variable): Likewise.
8841 * go-exp.y (variable): Likewise.
8842 * m2-exp.y (variable): Likewise.
8843 * objfiles.c (objfile::~objfile): Likewise.
8844 * p-exp.y (variable): Likewise.
8845 * parse.c (innermost_block): Change type.
8846 * parser-defs.h (class innermost_block_tracker): New.
8847 (innermost_block): Change to innermost_block_tracker.
8848 * printcmd.c (display_command): Switch to innermost_block API.
8849 (do_one_display): Likewise.
8850 * rust-exp.y (do_one_display): Likewise.
8851 * symfile.c (clear_symtab_users): Likewise.
8852 * varobj.c (varobj_create): Switch to innermost_block API, replace
8853 use of innermost_block with block stored on varobj object.
8855 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8857 * expression.h (innermost_block): Remove declaration.
8858 * varobj.c: Add 'parser-defs.h' include.
8860 2018-01-19 Tom Tromey <tom@tromey.com>
8862 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8863 symbols in the static and global blocks.
8865 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8867 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8868 gdb_ptrace.h, and move including gdb_wait.h ...
8869 * nat/linux-ptrace.h: ... to here.
8871 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8873 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8874 inf_ptrace_detach_success.
8875 (inf_ptrace_detach_success): Add inferior parameter, use it
8876 instead of inferior_ptid, pass it to detach_inferior.
8877 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8879 * inferior.c (detach_inferior): Add overload that takes an
8881 * inferior.h (detach_inferior): Likewise.
8882 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8883 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8884 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8886 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8888 * target.h (struct target_ops) <to_detach>: Add inferior
8890 (target_detach): Likewise.
8891 * target.c (dispose_inferior): Pass inferior down.
8892 (target_detach): Pass inferior down. Assert that it is equal to
8893 the current inferior.
8894 * aix-thread.c (aix_thread_detach): Pass inferior down.
8895 * corefile.c (core_file_command): Pass current_inferior() down.
8896 * corelow.c (core_detach): Add inferior parameter.
8897 * darwin-nat.c (darwin_detach): Likewise.
8898 * gnu-nat.c (gnu_detach): Likewise.
8899 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8900 * infcmd.c (detach_command): Pass current_inferior() down to
8902 * infrun.c (follow_fork_inferior): Pass parent_inf to
8904 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8906 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8907 * linux-thread-db.c (thread_db_detach): Likewise.
8908 * nto-procfs.c (procfs_detach): Likewise.
8909 * procfs.c (procfs_detach): Likewise.
8910 * record.c (record_detach): Likewise.
8911 * record.h (struct inferior): Forward-declare.
8912 (record_detach): Add inferior parameter.
8913 * remote-sim.c (gdbsim_detach): Likewise.
8914 * remote.c (remote_detach_1): Likewise.
8915 (remote_detach): Likewise.
8916 (extended_remote_detach): Likewise.
8917 * sol-thread.c (sol_thread_detach): Likewise.
8918 * target-debug.h (target_debug_print_inferior_p): New macro.
8919 * target-delegates.c: Re-generate.
8920 * top.c (kill_or_detach): Pass inferior down to target_detach.
8921 * windows-nat.c (windows_detach): Add inferior parameter.
8923 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8925 * target.h (struct target_ops) <to_detach>: Remove args
8927 (target_detach): Likewise.
8928 * target.c (dispose_inferior): Adjust.
8929 (target_detach): Remove args parameter, adjust.
8930 * aix-thread.c (aix_thread_detach): Adjust.
8931 * corefile.c (core_file_command): Adjust.
8932 * corelow.c (core_detach): Adjust.
8933 * darwin-nat.c (darwin_detach): Adjust.
8934 * gnu-nat.c (gnu_detach): Adjust.
8935 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8936 * infcmd.c (detach_command): Adjust
8937 * infrun.c (follow_fork_inferior): Adjust.
8938 (handle_vfork_child_exec_or_exit): Adjust.
8939 * linux-fork.c (linux_fork_detach): Remove args parameter.
8940 * linux-fork.h (linux_fork_detach): Likewise.
8941 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8942 * linux-thread-db.c (thread_db_detach): Likewise.
8943 * nto-procfs.c (procfs_detach): Likewise.
8944 * procfs.c (procfs_detach): Likewise.
8945 (do_detach): Remove signo parameter.
8946 * record.c (record_detach): Remove args parameter.
8947 * record.h (record_detach): Likewise.
8948 * remote-sim.c (gdbsim_detach): Likewise.
8949 * remote.c (remote_detach_1): Likewise.
8950 (remote_detach): Likewise.
8951 (extended_remote_detach): Likewise.
8952 * sol-thread.c (sol_thread_detach): Likewise.
8953 * target-delegates.c: Re-generate.
8954 * top.c (struct qt_args) <args>: Remove field.
8955 (kill_or_detach): Don't pass args.
8956 (quit_force): Don't set args.
8957 * windows-nat.c (windows_detach): Remove args parameter.
8959 2018-01-19 Yao Qi <yao.qi@linaro.org>
8961 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8962 (arm_linux_init_abi): Install it.
8964 2018-01-19 Yao Qi <yao.qi@linaro.org>
8966 * osabi.c (gdb_osabi_names): Extend the regexp for
8967 arm-linux-gnueabihf.
8969 2018-01-18 Yao Qi <yao.qi@linaro.org>
8971 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8973 (abbrev_table::add_abbrev): Update.
8974 (abbrev_table::lookup_abbrev): Update.
8976 2018-01-18 Yao Qi <yao.qi@linaro.org>
8978 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8980 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8982 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8985 2018-01-17 Tom Tromey <tom@tromey.com>
8987 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8989 2018-01-17 Tom Tromey <tom@tromey.com>
8991 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8992 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8993 (create_array_type_with_stride): Update.
8994 * dwarf2read.c (set_die_type): Update.
8996 2018-01-17 Tom Tromey <tom@tromey.com>
8998 * dwarf2read.c (delayed_method_info): Remove typedef.
8999 (dwarf2_cu::method_info): Now a std::vector.
9000 (add_to_method_list): Update.
9001 (free_delayed_list): Remove.
9002 (compute_delayed_physnames): Update.
9003 (process_full_comp_unit, process_full_type_unit): Clear the method
9004 list. Remove cleanups.
9005 (psymtab_include_file_name): Add name_holder parameter. Use
9007 (dwarf_decode_lines): Update.
9009 2018-01-17 Tom Tromey <tom@tromey.com>
9010 Simon Marchi <simon.marchi@ericsson.com>
9012 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9013 (dwarf2_per_objfile::free_cached_comp_units)
9014 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9015 (init_cutu_and_read_dies_no_follow): Update.
9016 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9017 (dwarf2_cu::~dwarf2_cu): New.
9018 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9019 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9021 2018-01-17 Tom Tromey <tom@tromey.com>
9022 Simon Marchi <simon.marchi@ericsson.com>
9024 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9025 (struct die_reader_specs) <abbrev_table>: New member.
9026 (struct abbrev_table): Add constructor.
9027 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9028 <abbrev_obstack>: Now an auto_obstack.
9029 (abbrev_table_up): New typedef.
9030 (init_cu_die_reader): Add abbrev_table parameter.
9031 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9032 Add result_dwo_abbrev_table.
9033 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9034 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9036 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9038 (skip_children): Update.
9039 (abbrev_table::alloc_abbrev): Rename from
9040 abbrev_table_alloc_abbrev.
9041 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9042 (abbrev_table::lookup_abbrev): Rename from
9043 abbrev_table_lookup_abbrev.
9044 (abbrev_table_read_table): Return abbrev_table_up.
9045 (abbrev_table_free, abbrev_table_free_cleanup)
9046 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9047 (load_partial_dies): Update.
9049 2018-01-17 Tom Tromey <tom@tromey.com>
9051 * dwarf2read.c (dwarf2_compute_name): Update comment.
9052 (read_func_scope, read_variable): Update.
9053 (new_symbol): Remove.
9054 (new_symbol_full): Rename to new_symbol.
9056 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9059 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9060 a warning instead of throwing an error, set section size to 0 and return
9062 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9064 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9066 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9068 (linux_ptrace_attach_fail_reason_string): Likewise.
9069 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9071 (linux_ptrace_attach_fail_reason_string): Likewise.
9072 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9074 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9076 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9078 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9081 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9082 checking for fs_base/gs_base fields in struct user_regs_struct.
9083 * configure: Regenerate.
9085 2018-01-17 Yao Qi <yao.qi@linaro.org>
9087 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9089 (aarch64_linux_init_abi): Install it to gdbarch hook
9092 2018-01-15 Pedro Alves <palves@redhat.com>
9094 * common/signals-state-save-restore.c
9095 (save_original_signals_state): Fix typos.
9097 2017-01-12 Tom Tromey <tom@tromey.com>
9098 Sergio Durigan Junior <sergiodj@redhat.com>
9100 * Makefile.in (install-only): Install gdb-add-index.
9102 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9104 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9106 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9108 * infrun.c (keep_going_pass_signal): Clear step-over info when
9109 insert_breakpoints fails.
9111 2018-01-11 Pedro Alves <palves@redhat.com>
9114 * infrun.c (resume): Rename to ...
9115 (resume_1): ... this.
9116 (resume): Reimplement as wrapper around resume_1.
9118 2018-01-11 Pedro Alves <palves@redhat.com>
9121 * remote.c (remote_parse_stop_reply): Default to the last-set
9122 general thread instead of to 'magic_null_ptid'.
9124 2018-01-10 Pedro Alves <palves@redhat.com>
9126 * language.h (language_get_symbol_name_matcher): Rename ...
9127 (get_symbol_name_matcher): ... this.
9128 * language.c (language_get_symbol_name_matcher): Ditto.
9129 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9132 2018-01-10 Pedro Alves <palves@redhat.com>
9136 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9137 Adjust to use language_get_symbol_name_matcher instead of
9138 language_defn::la_get_symbol_name_matcher.
9139 * language.c (language_get_symbol_name_matcher): If in Ada mode
9140 and the lookup name is a verbatim match, return Ada's matcher.
9141 * language.h (language_get_symbol_name_matcher): Adjust comment.
9142 (ada_lookup_name_info::verbatim_p):: New method.
9144 2018-01-10 Pedro Alves <palves@redhat.com>
9147 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9148 minsym's language is language_auto or language_cplus, pass down
9149 language_ada instead.
9150 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9152 2018-01-10 Pedro Alves <palves@redhat.com>
9155 * minsyms.c (linkage_name_str): New function.
9156 (iterate_over_minimal_symbols): Use it.
9158 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9160 * NEWS: Document that 'info proc' now works on FreeBSD.
9162 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9164 * configure.ac: Check for kinfo_getfile in libutil.
9165 * configure: Regenerate.
9166 * config.in: Regenerate.
9167 * fbsd-nat.c: Include "fbsd-tdep.h".
9168 (fbsd_fetch_cmdline): New.
9169 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9170 rather than calling error.
9171 (fbsd_info_proc): New.
9172 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9173 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9174 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9176 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9178 * fbsd-nat.c (struct free_deleter): Remove.
9179 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9181 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9183 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9184 NULL for an empty pathname.
9186 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9188 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9189 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9190 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9191 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9192 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9193 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9194 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9195 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9196 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9197 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9198 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9199 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9200 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9201 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9202 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9204 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9206 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9207 (gnu_xfer_auxv): New function.
9208 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9211 2018-01-08 Yao Qi <yao.qi@linaro.org>
9212 Simon Marchi <simon.marchi@ericsson.com>
9214 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9216 (COMMON_OBS): Remove selftest.o.
9217 * configure.ac: Append selftest-arch.c and common/selftest.c to
9218 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9219 * configure: Re-generated.
9220 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9222 (maintenance_info_selftests): Likewise.
9224 2018-01-08 Xavier Roirand <roirand@adacore.com>
9226 * ada-valprint.c (val_print_packed_array_elements): Use
9227 proper number of elements when printing an array indexed
9228 by an enumeration type.
9230 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9232 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9233 (dw2_get_file_names_reader): Adjust.
9234 (lookup_dwo_signatured_type): Adjust.
9235 (lookup_dwp_signatured_type): Adjust.
9236 (lookup_signatured_type): Adjust.
9237 (create_type_unit_group): Adjust.
9238 (get_type_unit_group): Adjust.
9239 (process_psymtab_comp_unit_reader): Adjust.
9240 (build_type_psymtabs_reader): Adjust.
9241 (scan_partial_symbols): Adjust.
9242 (add_partial_symbol): Adjust.
9243 (add_partial_subprogram): Adjust.
9244 (peek_die_abbrev): Adjust.
9245 (fixup_go_packaging): Adjust.
9246 (process_imported_unit_die): Adjust.
9247 (dwarf2_compute_name): Adjust.
9248 (dwarf2_physname): Adjust.
9249 (read_import_statement): Adjust.
9250 (handle_DW_AT_stmt_list): Adjust.
9251 (read_file_scope): Adjust.
9252 (read_func_scope): Adjust.
9253 (read_lexical_block_scope): Adjust.
9254 (read_call_site_scope): Adjust.
9255 (read_variable): Adjust.
9256 (dwarf2_rnglists_process): Adjust.
9257 (dwarf2_ranges_process): Adjust.
9258 (dwarf2_ranges_read): Adjust.
9259 (dwarf2_get_pc_bounds): Adjust.
9260 (dwarf2_record_block_ranges): Adjust.
9261 (dwarf2_add_field): Adjust.
9262 (dwarf2_add_member_fn): Adjust.
9263 (read_structure_type): Adjust.
9264 (process_structure_scope): Adjust.
9265 (read_enumeration_type): Adjust.
9266 (read_array_type): Adjust.
9267 (mark_common_block_symbol_computed): Adjust.
9268 (read_common_block): Adjust.
9269 (read_namespace_type): Adjust.
9270 (read_namespace): Adjust.
9271 (read_module_type): Adjust.
9272 (read_tag_pointer_type): Adjust.
9273 (read_tag_ptr_to_member_type): Adjust.
9274 (read_tag_string_type): Adjust.
9275 (read_subroutine_type): Adjust.
9276 (read_typedef): Adjust.
9277 (read_base_type): Adjust.
9278 (attr_to_dynamic_prop): Adjust.
9279 (read_subrange_type): Adjust.
9280 (read_unspecified_type): Adjust.
9281 (dwarf2_read_abbrevs): Adjust.
9282 (load_partial_dies): Adjust.
9283 (read_partial_die): Adjust.
9284 (find_partial_die): Adjust.
9285 (guess_partial_die_structure_name): Adjust.
9286 (fixup_partial_die): Adjust.
9287 (read_attribute_value): Adjust.
9288 (read_addr_index): Adjust.
9289 (read_addr_index_from_leb128): Adjust.
9290 (read_str_index): Adjust.
9291 (dwarf2_string_attr): Adjust.
9292 (get_debug_line_section): Adjust.
9293 (dwarf_decode_line_header): Adjust.
9294 (lnp_state_machine::check_line_address): Adjust.
9295 (dwarf_decode_lines_1): Adjust.
9296 (dwarf_decode_lines): Adjust.
9297 (dwarf2_start_symtab): Adjust.
9298 (var_decode_location): Adjust.
9299 (new_symbol_full): Adjust.
9300 (dwarf2_const_value_data): Adjust.
9301 (dwarf2_const_value_attr): Adjust.
9302 (dwarf2_const_value): Adjust.
9304 (die_containing_type): Adjust.
9305 (build_error_marker_type): Adjust.
9306 (lookup_die_type): Adjust.
9307 (guess_full_die_structure_name): Adjust.
9308 (anonymous_struct_prefix): Adjust.
9309 (determine_prefix): Adjust.
9310 (dwarf2_name): Adjust.
9311 (follow_die_ref_or_sig): Adjust.
9312 (follow_die_offset): Adjust.
9313 (follow_die_ref): Adjust.
9314 (follow_die_sig_1): Adjust.
9315 (follow_die_sig): Adjust.
9316 (get_signatured_type): Adjust.
9317 (get_DW_AT_signature_type): Adjust.
9318 (decode_locdesc): Adjust.
9319 (dwarf_decode_macros): Adjust.
9320 (cu_debug_loc_section): Adjust.
9321 (fill_in_loclist_baton): Adjust.
9322 (dwarf2_symbol_mark_computed): Adjust.
9323 (init_one_comp_unit): Don't assign
9324 dwarf2_cu::dwarf2_per_objfile.
9325 (set_die_type): Adjust.
9327 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9329 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9330 <dwarf2_per_objfile>: New field.
9331 (dwarf2_per_objfile): Remove global.
9332 (get_dwarf2_per_objfile): New function.
9333 (set_dwarf2_per_objfile): New function.
9334 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9336 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9337 (read_abbrev_offset): Likewise.
9338 (read_indirect_string): Likewise.
9339 (read_indirect_line_string): Likewise.
9340 (read_indirect_string_at_offset): Likewise.
9341 (read_indirect_string_from_dwz): Likewise.
9342 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9344 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9345 (create_all_comp_units): Change objfile parameter to
9347 (create_all_type_units): Likewise.
9348 (process_queue): Add dwarf2_per_objfile parameter.
9349 (read_and_check_comp_unit_head): Likewise.
9350 (lookup_dwo_unit_in_dwp): Likewise.
9351 (get_dwp_file): Likewise.
9352 (process_cu_includes): Likewise.
9353 (struct free_dwo_file_cleanup_data): New struct.
9354 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9355 set_dwarf2_per_objfile.
9356 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9357 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9358 context, adjust calls.
9359 (dw2_instantiate_symtab): Likewise.
9360 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9361 (dw2_get_cu): Likewise.
9362 (create_cu_from_index_list): Change objfile parameter to
9364 (create_cus_from_index_list): Get dwarf2_per_objfile from
9365 context, adjust calls.
9366 (create_cus_from_index): Likewise.
9367 (create_signatured_type_table_from_index): Change objfile
9368 parameter to dwarf2_per_objfile.
9369 (create_signatured_type_table_from_debug_names): Change objfile
9370 parameter to dwarf2_per_objfile.
9371 (create_addrmap_from_index): Likewise.
9372 (create_addrmap_from_aranges): Likewise.
9373 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9374 (dw2_setup): Remove.
9375 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9377 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9378 get_dwarf2_per_objfile.
9379 (dw2_forget_cached_source_info): Likewise.
9380 (dw2_map_symtabs_matching_filename): Likewise.
9381 (struct dw2_symtab_iterator) <index>: Remove.
9382 <dwarf2_per_objfile>: New field.
9383 (dw2_symtab_iter_init): Replace index parameter with
9385 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9386 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9387 (dw2_print_stats): Likewise.
9388 (dw2_dump): Likewise.
9389 (dw2_expand_symtabs_for_function): Likewise.
9390 (dw2_expand_all_symtabs): Likewise.
9391 (dw2_expand_symtabs_with_fullname): Likewise.
9392 (dw2_expand_marked_cus): Replace index and objfile parameters
9393 with dwarf2_per_objfile.
9394 (dw_expand_symtabs_matching_file_matcher): Add
9395 dwarf2_per_objfile parameter and adjust calls.
9396 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9398 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9399 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9401 (create_cus_from_debug_names_list): Replace objfile parameter
9402 with dwarf2_per_objfile and adjust calls.
9403 (create_cus_from_debug_names): Likewise.
9404 (dwarf2_read_debug_names): Likewise.
9405 (mapped_debug_names::namei_to_name): Adjust call.
9406 (dw2_debug_names_iterator::next): Likewise.
9407 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9408 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9409 (dw2_debug_names_dump): Likewise.
9410 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9411 (dw2_debug_names_expand_symtabs_matching): Likewise.
9412 (dwarf2_initialize_objfile): Likewise.
9413 (dwarf2_build_psymtabs): Likewise.
9414 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9416 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9417 (read_and_check_comp_unit_head): Likewise.
9418 (read_abbrev_offset): Likewise.
9419 (create_debug_type_hash_table): Likewise.
9420 (create_debug_types_hash_table): Likewise.
9421 (create_all_type_units): Replace objfile parameter with
9423 (add_type_unit): Add dwarf2_per_objfile parameter.
9424 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9425 with dwarf2_per_objfile.
9426 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9427 (lookup_dwp_signatured_type): Likewise.
9428 (lookup_signatured_type): Likewise.
9429 (read_cutu_die_from_dwo): Likewise.
9430 (init_tu_and_read_dwo_dies): Likewise.
9431 (init_cutu_and_read_dies): Likewise.
9432 (init_cutu_and_read_dies_no_follow): Likewise.
9433 (allocate_type_unit_groups_table): Add objfile parameter.
9434 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9435 (get_type_unit_group): Likewise.
9436 (process_psymtab_comp_unit): Update call.
9437 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9438 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9439 (print_tu_stats): Likewise.
9440 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9442 (build_type_psymtabs): Change objfile parameter to
9444 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9445 passed in void* parameter.
9446 (process_skeletonless_type_units): Change objfile parameter to
9448 (set_partial_user): Likewise.
9449 (dwarf2_build_psymtabs_hard): Likewise.
9450 (read_comp_units_from_section): Likewise.
9451 (create_all_comp_units): Likewise.
9452 (scan_partial_symbols): Update calls.
9453 (add_partial_symbol): Likewise.
9454 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9455 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9456 (process_queue): Add dwarf2_per_objfile parameter.
9457 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9458 (compute_compunit_symtab_includes): Likewise.
9459 (process_cu_includes): Add dwarf2_per_objfile parameter.
9460 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9461 (process_full_type_unit): Likewise.
9462 (process_imported_unit_die): Update call.
9463 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9464 (read_file_scope): Likewise.
9465 (allocate_dwo_file_hash_table): Add objfile parameter.
9466 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9467 (create_cus_hash_table): Likewise.
9468 (create_dwp_hash_table): Likewise.
9469 (create_dwo_unit_in_dwp_v1): Likewise.
9470 (create_dwp_v2_section): Likewise.
9471 (create_dwo_unit_in_dwp_v2): Likewise.
9472 (lookup_dwo_unit_in_dwp): Likewise.
9473 (try_open_dwop_file): Likewise.
9474 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9475 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9476 cleanup to include a reference to dwarf2_per_objfile.
9477 (open_dwp_file): Add dwarf2_per_objfile parameter.
9478 (open_and_init_dwp_file): Likewise.
9479 (get_dwp_file): Likewise.
9480 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9481 (queue_and_load_all_dwo_tus): Update call.
9482 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9484 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9485 (dwarf2_ranges_process): Likewise.
9486 (dwarf2_get_pc_bounds): Likewise.
9487 (mark_common_block_symbol_computed): Likewise.
9488 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9489 (dwarf2_read_abbrevs): Update call.
9490 (read_partial_die): Use dwarf2_per_objfile from cu.
9491 (find_partial_die): Likewise.
9492 (fixup_partial_die): Likewise.
9493 (read_attribute_value): Likewise.
9494 (read_indirect_string_at_offset_from): Add objfile parameter.
9495 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9497 (read_indirect_string_from_dwz): Add objfile parameter.
9498 (read_indirect_string): Add objfile parameter.
9499 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9500 (read_addr_index): Use dwarf2_per_objfile from cu.
9501 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9503 (read_str_index): Use dwarf2_per_objfile from cu.
9504 (get_debug_line_section): Likewise.
9505 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9506 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9507 (new_symbol_full): Use dwarf2_per_objfile from cu.
9508 (build_error_marker_type): Likewise.
9509 (lookup_die_type): Likewise.
9510 (determine_prefix): Likewise.
9511 (follow_die_offset): Likewise.
9512 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9513 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9514 (dwarf2_fetch_die_type_sect_off): Likewise.
9515 (dwarf2_get_die_type): Likewise.
9516 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9517 (get_signatured_type): Likewise.
9518 (get_DW_AT_signature_type): Likewise.
9519 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9520 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9521 (cu_debug_loc_section): Likewise.
9522 (fill_in_loclist_baton): Likewise.
9523 (dwarf2_symbol_mark_computed): Likewise.
9524 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9526 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9528 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9529 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9530 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9531 (set_die_type): Use dwarf2_free_objfile from cu.
9532 (get_die_type_at_offset): Likewise.
9533 (dwarf2_per_objfile_free): Don't assign global variable.
9534 (debug_names) <constructor>: Add dwarf2_per_objfile
9535 parameter, update m_debugstrlookup construction.
9536 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9538 <m_dwarf2_per_objfile>: New field.
9539 <lookup>: Use m_dwarf2_per_objfile.
9540 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9541 (psyms_seen_size): Likewise.
9542 (write_gdbindex): Replace objfile parameter with
9544 (write_debug_names): Likewise.
9545 (write_psymtabs_to_index): Likewise.
9546 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9549 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9551 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9552 <dwarf2_per_objfile>: New field.
9553 (struct dwarf2_per_cu_data) <objfile>: Remove.
9554 <dwarf2_per_objfile>: New field.
9555 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9557 (create_signatured_type_table_from_index): Likewise.
9558 (create_debug_type_hash_table): Likewise.
9559 (fill_in_sig_entry_from_dwo_entry): Likewise.
9560 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9561 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9563 (create_partial_symtab): Access objfile through
9565 (process_psymtab_comp_unit_reader): Likewise.
9566 (read_comp_units_from_section): Likewise.
9567 (scan_partial_symbols): Likewise.
9568 (add_partial_symbol): Likewise.
9569 (add_partial_subprogram): Likewise.
9570 (peek_die_abbrev): Likewise.
9571 (fixup_go_packaging): Likewise.
9572 (process_full_comp_unit): Likewise.
9573 (process_full_type_unit): Likewise.
9574 (process_imported_unit_die): Likewise.
9575 (dwarf2_compute_name): Likewise.
9576 (dwarf2_physname): Likewise.
9577 (read_import_statement): Likewise.
9578 (create_cus_hash_table): Assign dwarf2_physname instead of
9580 (read_func_scope): Access objfile through dwarf2_per_objfile.
9581 (read_lexical_block_scope): Likewise.
9582 (read_call_site_scope): Likewise.
9583 (read_variable): Likewise.
9584 (dwarf2_rnglists_process): Likewise.
9585 (dwarf2_ranges_process): Likewise.
9586 (dwarf2_ranges_read): Likewise.
9587 (dwarf2_record_block_ranges): Likewise.
9588 (dwarf2_add_field): Likewise.
9589 (dwarf2_add_member_fn): Likewise.
9590 (read_structure_type): Likewise.
9591 (process_structure_scope): Likewise.
9592 (read_enumeration_type): Likewise.
9593 (read_array_type): Likewise.
9594 (read_common_block): Likewise.
9595 (read_namespace_type): Likewise.
9596 (read_namespace): Likewise.
9597 (read_module_type): Likewise.
9598 (read_tag_pointer_type): Likewise.
9599 (read_tag_ptr_to_member_type): Likewise.
9600 (read_tag_string_type): Likewise.
9601 (read_subroutine_type): Likewise.
9602 (read_typedef): Likewise.
9603 (read_base_type): Likewise.
9604 (attr_to_dynamic_prop): Likewise.
9605 (read_subrange_type): Likewise.
9606 (read_unspecified_type): Likewise.
9607 (load_partial_dies): Likewise.
9608 (read_partial_die): Likewise.
9609 (find_partial_die): Likewise.
9610 (guess_partial_die_structure_name): Likewise.
9611 (fixup_partial_die): Likewise.
9612 (read_attribute_value): Likewise.
9613 (read_addr_index_from_leb128): Likewise.
9614 (dwarf2_read_addr_index): Likewise.
9615 (dwarf2_string_attr): Likewise.
9616 (lnp_state_machine::check_line_address): Likewise.
9617 (dwarf_decode_lines_1): Likewise.
9618 (dwarf_decode_lines): Likewise.
9619 (dwarf2_start_symtab): Likewise.
9620 (var_decode_location): Likewise.
9621 (new_symbol_full): Likewise.
9622 (dwarf2_const_value_data): Likewise.
9623 (dwarf2_const_value_attr): Likewise.
9624 (dwarf2_const_value): Likewise.
9625 (die_type): Likewise.
9626 (die_containing_type): Likewise.
9627 (lookup_die_type): Likewise.
9628 (guess_full_die_structure_name): Likewise.
9629 (anonymous_struct_prefix): Likewise.
9630 (dwarf2_name): Likewise.
9631 (follow_die_ref_or_sig): Likewise.
9632 (follow_die_offset): Likewise.
9633 (follow_die_ref): Likewise.
9634 (dwarf2_fetch_die_loc_sect_off): Likewise.
9635 (dwarf2_fetch_constant_bytes): Likewise.
9636 (dwarf2_fetch_die_type_sect_off): Likewise.
9637 (dwarf2_get_die_type): Likewise.
9638 (follow_die_sig): Likewise.
9639 (decode_locdesc): Likewise.
9640 (dwarf2_per_cu_objfile): Likewise.
9641 (dwarf2_per_cu_text_offset): Likewise.
9642 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9644 (set_die_type): Access objfile through
9647 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9649 * valprint.c (converted_character_d): Remove typedef.
9650 (DEF_VEC_O (converted_character_d)): Remove.
9651 (count_next_character): Use std::vector.
9652 (print_converted_chars_to_obstack): Likewise.
9653 (generic_printstr): Likewise.
9655 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9657 * xml-support.h (struct gdb_xml_value): Add constructor.
9658 <value>: Change type to unique_xmalloc_ptr.
9659 (gdb_xml_value_s): Remove typedef.
9660 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9661 (gdb_xml_element_start_handler): Change parameter type to
9663 (xml_find_attribute): Likewise.
9664 * xml-support.c (xml_find_attribute): Change parameter type to
9665 std::vector and adjust.
9666 (gdb_xml_values_cleanup): Remove.
9667 (gdb_xml_parser::start_element): Adjust to std::vector.
9668 (xinclude_start_include): Change paraeter type to std::vector
9670 * btrace.c (check_xml_btrace_version): Likewise.
9671 (parse_xml_btrace_block): Likewise.
9672 (parse_xml_btrace_pt_config_cpu): Likewise.
9673 (parse_xml_btrace_pt): Likewise.
9674 (parse_xml_btrace_conf_bts): Likewise.
9675 (parse_xml_btrace_conf_pt): Likewise.
9676 * memory-map.c (memory_map_start_memory): Likewise.
9677 (memory_map_start_property): Likewise.
9678 * osdata.c (osdata_start_osdata): Likewise.
9679 (osdata_start_item): Likewise.
9680 (osdata_start_column): Likewise.
9681 * remote.c (start_thread): Likewise.
9682 * solib-aix.c (library_list_start_library): Likewise.
9683 (library_list_start_list): Likewise.
9684 * solib-svr4.c (library_list_start_library): Likewise.
9685 (svr4_library_list_start_list): Likewise.
9686 * solib-target.c (library_list_start_segment): Likewise.
9687 (library_list_start_section): Likewise.
9688 (library_list_start_library): Likewise.
9689 (library_list_start_list): Likewise.
9690 * tracepoint.c (traceframe_info_start_memory): Likewise.
9691 (traceframe_info_start_tvar): Likewise.
9692 * xml-syscall.c (syscall_start_syscall): Likewise.
9693 * xml-tdesc.c (tdesc_start_target): Likewise.
9694 (tdesc_start_feature): Likewise.
9695 (tdesc_start_reg): Likewise.
9696 (tdesc_start_union): Likewise.
9697 (tdesc_start_struct): Likewise.
9698 (tdesc_start_flags): Likewise.
9699 (tdesc_start_enum): Likewise.
9700 (tdesc_start_field): Likewise.
9701 (tdesc_start_enum_value): Likewise.
9702 (tdesc_start_vector): Likewise.
9704 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9706 * extension.h (struct xmethod_worker) <clone>: Remove.
9707 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9709 (python_xmethod_worker::clone): Remove.
9710 * valops.c (find_overload_match): Use std::move instead of
9713 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9715 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9716 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9717 <free_xmethod_worker_data>: Remove.
9718 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9719 <get_xmethod_arg_types>: Remove.
9720 <get_xmethod_result_type>: Remove.
9721 <invoke_xmethod>: Remove.
9722 * extension.c (new_xmethod_worker): Remove.
9723 (clone_xmethod_worker): Remove.
9724 (get_matching_xmethod_workers): Return void, pass std::vector by
9726 (get_xmethod_arg_types): Rename to...
9727 (xmethod_worker::get_arg_types): ... this, and adjust.
9728 (get_xmethod_result_type): Rename to...
9729 (xmethod_worker::get_result_type): ... this, and adjust.
9730 (invoke_xmethod): Remove.
9731 (free_xmethod_worker): Remove.
9732 (free_xmethod_worker_vec): Remove.
9733 * extension.h (enum ext_lang_rc): Move here from
9735 (struct xmethod_worker): Add constructor and destructor.
9738 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9739 virtual pure methods.
9740 <get_arg_types, get_result_type>: New methods.
9741 (xmethod_worker_ptr): Remove typedef.
9742 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9743 (xmethod_worker_vec): Remove typedef.
9744 (xmethod_worker_up): New typedef.
9745 (invoke_xmethod): Remove.
9746 (clone_xmethod_worker): Remove.
9747 (free_xmethod_worker): Remove.
9748 (free_xmethod_worker_vec): Remove.
9749 (get_xmethod_arg_types): Remove.
9750 (get_xmethod_result_type): Remove.
9751 * valops.c (find_method_list): Use std::vector, don't use
9752 intermediate vector.
9753 (value_find_oload_method_list): Use std::vector.
9754 (find_overload_match): Use std::vector.
9755 (find_oload_champ): Use std::vector.
9756 * value.c (value_free): Use operator delete.
9757 (value_of_xmethod): Rename to...
9758 (value_from_xmethod): ... this. Don't assign
9759 xmethod_worker::value, take rvalue-reference.
9760 (result_type_of_xmethod): Adjust.
9761 (call_xmethod): Adjust.
9762 * value.h: Include extension.h.
9763 (struct xmethod_worker): Don't forward-declare.
9764 (value_of_xmethod): Rename to...
9765 (value_from_xmethod): ... this, take rvalue-reference.
9766 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9767 (struct python_xmethod_worker): ... this, add constructor and
9769 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9770 (gdbpy_free_xmethod_worker_data): Rename to...
9771 (python_xmethod_worker::~python_xmethod_worker): ... this and
9773 (gdbpy_clone_xmethod_worker_data): Rename to...
9774 (python_xmethod_worker::clone): ... this and adjust.
9775 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9777 (gdbpy_get_xmethod_arg_types): Rename to...
9778 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9779 (gdbpy_get_xmethod_result_type): Rename to...
9780 (python_xmethod_worker::do_get_result_type): ... this and
9782 (gdbpy_invoke_xmethod): Rename to...
9783 (python_xmethod_worker::invoke): ... this and adjust.
9784 (new_python_xmethod_worker): Rename to...
9785 (python_xmethod_worker::python_xmethod_worker): ... this and
9787 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9789 (gdbpy_free_xmethod_worker_data): Remove.
9790 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9791 (gdbpy_get_xmethod_arg_types): Remove.
9792 (gdbpy_get_xmethod_result_type): Remove.
9793 (gdbpy_invoke_xmethod): Remove.
9794 * python/python.c (python_extension_ops): Remove obsolete
9797 2018-01-05 Pedro Alves <palves@redhat.com>
9800 * common/signals-state-save-restore.c
9801 (save_original_signals_state): New parameter 'quiet'. Warn if we
9802 find a custom handler preinstalled, instead of internal erroring.
9803 But only warn if !quiet.
9804 * common/signals-state-save-restore.h
9805 (save_original_signals_state): New parameter 'quiet'.
9806 * main.c (captured_main_1): Move save_original_signals_state call
9807 after option handling, and pass QUIET.
9809 2018-01-05 Pedro Alves <palves@redhat.com>
9811 * spu-tdep.c (spu_catch_start): Pass
9812 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9814 2018-01-05 Pedro Alves <palves@redhat.com>
9817 * ada-lang.c (literal_symbol_name_matcher): New function.
9818 (ada_get_symbol_name_matcher): Use it for
9819 symbol_name_match_type::SEARCH_NAME.
9820 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9821 it down instead of assuming symbol_name_match_type::FULL.
9822 * block.h (block_lookup_symbol): New parameter 'match_type'.
9823 * c-valprint.c (print_unpacked_pointer): Use
9824 lookup_symbol_search_name instead of lookup_symbol.
9825 * compile/compile-object-load.c (get_out_value_type): Pass down
9826 symbol_name_match_type::SEARCH_NAME.
9827 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9828 symbol_name_match_type::FULL.
9829 * cp-support.c (cp_get_symbol_name_matcher): Handle
9830 symbol_name_match_type::SEARCH_NAME.
9831 * infrun.c (insert_exception_resume_breakpoint): Use
9832 lookup_symbol_search_name.
9833 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9834 * psymtab.c (maintenance_check_psymtabs): Use
9835 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9836 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9838 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9839 if symbol_name_match_type::SEARCH_NAME.
9840 (lookup_symbol_in_language): Pass down
9841 symbol_name_match_type::FULL.
9842 (lookup_symbol_search_name): New.
9843 (lookup_language_this): Pass down
9844 symbol_name_match_type::SEARCH_NAME.
9845 (lookup_symbol_aux, lookup_local_symbol): New parameter
9846 'match_type'. Pass it down.
9847 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9848 (lookup_symbol_search_name): New declaration.
9849 (lookup_symbol_in_block): New 'match_type' parameter.
9851 2018-01-05 Pedro Alves <palves@redhat.com>
9854 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9856 (ada_lookup_symbol): Reimplement in terms of
9857 ada_lookup_symbol_list, bits factored out from
9858 ada_lookup_encoded_symbol.
9860 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9862 * ada-exp.y (write_object_renaming): When subscripting an array
9863 using a symbol as the index, pass the block in call to
9864 ada_lookup_encoded_symbol when looking that symbol up.
9866 2018-01-05 Jerome Guitton <guitton@adacore.com>
9868 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9871 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9873 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9874 the case where VALUE_LVAL (val0) is not lval_memory.
9876 2018-01-05 Xavier Roirand <roirand@adacore.com>
9878 * ada-valprint.c (print_optional_low_bound): Handle
9879 character-indexed array printing like boolean-indexed array
9882 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9884 * NEWS: Create a new section for the next release branch.
9885 Rename the section of the current branch, now that it has
9888 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9890 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9891 * version.in: Bump version to 8.1.50.DATE-git.
9893 2018-01-03 Xavier Roirand <roirand@adacore.com>
9895 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9897 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9899 (default_exception_support_info) <catch_handlers_sym>: Add field.
9900 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9901 (ada_exception_name_addr_1): Add "catch handlers" handling.
9902 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9904 (create_excep_cond_exprs) <ex>: Add parameter.
9905 (re_set_exception): Update create_excep_cond_exprs call.
9906 (print_it_exception, print_one_exception, print_mention_exception)
9907 (print_recreate_exception): Add "catch handler" handling.
9908 (allocate_location_catch_handlers, re_set_catch_handlers)
9909 (check_status_catch_handlers, print_it_catch_handlers)
9910 (print_one_catch_handlers, print_mention_catch_handlers)
9911 (print_recreate_catch_handlers): New function.
9912 (catch_handlers_breakpoint_ops): New variable.
9913 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9914 Add parameter. Add "catch handler" handling.
9915 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9916 Add "catch handler" handling.
9917 (ada_exception_catchpoint_cond_string): Add "catch handler"
9919 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9921 (catch_ada_handlers_command): New function.
9922 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9923 operations structure.
9924 (_initialize_ada_language): Add "catch handlers" command entry.
9925 * NEWS: Document "catch handlers" feature.
9927 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9929 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9930 account when creating the array type of the slice.
9931 (ada_value_slice): Likewise.
9933 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9935 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9937 (create_array_type_with_stride): Add byte_stride_prop parameter.
9938 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9939 New parameter. Update all callers in this file.
9940 (array_type_has_dynamic_stride): New function.
9941 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9942 of arrays with dynamic byte strides.
9943 * dwarf2read.c (read_array_type): Add support for dynamic
9944 DW_AT_byte_stride attributes.
9946 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9948 * dwarf2read.c (read_unspecified_type): Treat
9949 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9951 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9953 Update copyright year range in all GDB files.
9955 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9957 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9958 and gdb/testsuite/gdb.base/step-line.c.
9960 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9962 * copyright.py (main): Dump the contents of
9963 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9964 even if BY_HAND is empty.
9966 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9968 * top.c (print_gdb_version): Update Copyright year in version
9971 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9973 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9975 For older changes see ChangeLog-2017.
9981 version-control: never