1 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4 (riscv_register_reggroup_p): Use new function, remove unneeded
6 (riscv_push_dummy_call): Extend assert to compare against xlen or
7 flen based on register type.
9 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
11 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
13 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
15 * remote.c (show_hardware_watchpoint_limit): New function.
16 (show_hardware_watchpoint_length_limit): New function.
17 (show_hardware_breakpoint_limit): New function.
18 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
19 where appropriate, update help text.
21 2018-07-09 Tom Tromey <tom@tromey.com>
23 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
24 (CLIBS): Don't mention NAT_CLIBS.
26 2018-07-09 Tom Tromey <tom@tromey.com>
28 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
29 (LIBGDB_OBS, clean mostlyclean): Update.
30 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
32 2018-07-09 Tom Tromey <tom@tromey.com>
34 * Makefile.in (%.c: %.y): Use ECHO_YACC.
35 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
36 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
38 2018-07-09 Tom Tromey <tom@tromey.com>
40 * Makefile.in (ALLDEPFILES): Remove exec.c.
41 (COMMON_OBS): Remove exec.o.
42 (COMMON_SFILES): Add exec.c.
44 2018-07-09 Tom Tromey <tom@tromey.com>
46 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
48 2018-07-09 Tom Tromey <tom@tromey.com>
50 * Makefile.in (clean mostlyclean): Remove stamp-version.
51 (version.c): Depend on stamp-version.
52 (stamp-version): New rule, from version.c rule.
54 2018-07-09 Tom Tromey <tom@tromey.com>
56 * Makefile.in (init.c): Depend on stamp-init.
57 (stamp-init): New rule, from init.c rule.
58 (clean mostlyclean): Remove stamp-init.
60 2018-07-09 Tom Tromey <tom@tromey.com>
62 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
63 SUBDIR_GCC_COMPILE_SRCS.
65 2018-07-09 Tom Tromey <tom@tromey.com>
67 * Makefile.in (init.c): Remove some unused sed rules.
69 2018-07-09 Tom Tromey <tom@tromey.com>
71 * Makefile.in (TSOBS): Remove.
74 (COMMON_SFILES): Add inflow.c.
75 (SFILES): Remove inflow.c.
77 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
79 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
81 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
83 * ia64-tdep.c (get_reg_name, get_fpreg_name, get_saveloc_name,
84 is_signal_frame_name, step_name, init_remote_name,
85 create_addr_space_name, destroy_addr_space_name,
86 search_unwind_table_name, find_dyn_list_name): Constify.
88 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
90 * darwin-nat.c (darwin_pthread_kill): New function.
91 (darwin_resume_thread): Use darwin_pthread_kill.
93 2018-07-05 Tom de Vries <tdevries@suse.de>
95 * macroexp.c (macro_buffer) <operator=>: New member function.
97 2018-07-04 Tom Tromey <tom@tromey.com>
99 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
101 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
103 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
104 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
108 2018-07-04 Joel Brobecker <brobecker@adacore.com>
110 * NEWS: Create a new section for the next release branch.
111 Rename the section of the current branch, now that it has
114 2018-07-04 Joel Brobecker <brobecker@adacore.com>
116 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
117 * version.in: Bump version to 8.2.50.DATE-git.
119 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
120 Pedro Alves <palves@redhat.com>
122 * linux-nat.c (linux_init_ptrace): Rename to ...
123 (linux_init_ptrace_procfs): ... this. Call
124 linux_proc_init_warnings.
125 (linux_nat_target::post_attach)
126 (linux_nat_target::post_startup_inferior): Adjust.
127 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
128 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
130 2018-07-04 Tom de Vries <tdevries@suse.de>
132 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
134 (read_comp_unit_head): ... here.
136 2018-07-03 Tom Tromey <tom@tromey.com>
138 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
139 (stop_tracing, tstatus_command)
140 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
141 (print_one_static_tracepoint_marker): Update.
142 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
144 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
146 (all_tracepoints, static_tracepoints_here): Return std::vector.
148 2018-07-03 Tom Tromey <tom@tromey.com>
150 * common/ptid.c (ptid_equal): Remove.
151 * common/ptid.h (ptid_equal): Don't declare.
152 * ada-tasks.c: Update.
153 * breakpoint.c: Update.
154 * common/agent.c: Update.
156 * darwin-nat-info.c: Update.
157 * darwin-nat.c: Update.
159 * dtrace-probe.c: Update.
160 * dummy-frame.c: Update.
161 * fbsd-nat.c: Update.
163 * gdbthread.h: Update.
165 * go32-nat.c: Update.
166 * inf-loop.c: Update.
167 * inf-ptrace.c: Update.
172 * linux-fork.c: Update.
173 * linux-nat.c: Update.
174 * linux-thread-db.c: Update.
175 * mi/mi-cmd-var.c: Update.
176 * mi/mi-interp.c: Update.
177 * mi/mi-main.c: Update.
178 * nto-procfs.c: Update.
179 * ppc-linux-tdep.c: Update.
181 * python/py-inferior.c: Update.
182 * python/py-record-btrace.c: Update.
183 * python/py-record.c: Update.
184 * ravenscar-thread.c: Update.
185 * regcache.c: Update.
186 * remote-sim.c: Update.
188 * sol-thread.c: Update.
191 * tui/tui-stack.c: Update.
193 * windows-nat.c: Update.
194 * windows-tdep.c: Update.
196 2018-07-03 Tom Tromey <tom@tromey.com>
198 * common/ptid.c (ptid_match): Remove.
199 * common/ptid.h (ptid_match): Don't declare.
200 * fbsd-nat.c: Update.
203 * linux-nat.c: Update.
204 * record-btrace.c: Update.
205 * regcache.c: Update.
208 2018-07-03 Tom Tromey <tom@tromey.com>
210 * common/ptid.c (ptid_tid_p): Remove.
211 * common/ptid.h (ptid_tid_p): Don't declare.
212 * sol-thread.c: Update.
214 2018-07-03 Tom Tromey <tom@tromey.com>
216 * common/ptid.c (ptid_lwp_p): Remove.
217 * common/ptid.h (ptid_lwp_p): Don't declare.
218 * fbsd-nat.c: Update.
219 * linux-nat.c: Update.
220 * nat/linux-procfs.c: Update.
221 * nat/x86-linux-dregs.c: Update.
222 * sol-thread.c: Update.
224 2018-07-03 Tom Tromey <tom@tromey.com>
226 * common/ptid.c (ptid_is_pid): Remove.
227 * common/ptid.h (ptid_is_pid): Don't declare.
229 * linux-nat.c: Update.
230 * mi/mi-interp.c: Update.
234 2018-07-03 Tom Tromey <tom@tromey.com>
236 * common/ptid.c (ptid_get_tid): Remove.
237 * common/ptid.h (ptid_get_tid): Don't declare.
238 * ada-tasks.c: Update.
239 * aix-thread.c: Update.
240 * bsd-uthread.c: Update.
241 * darwin-nat.c: Update.
242 * fbsd-nat.c: Update.
243 * i386-darwin-nat.c: Update.
245 * linux-tdep.c: Update.
246 * nto-procfs.c: Update.
247 * ppc-ravenscar-thread.c: Update.
248 * python/py-infthread.c: Update.
249 * ravenscar-thread.c: Update.
250 * sol-thread.c: Update.
251 * sparc-ravenscar-thread.c: Update.
252 * windows-nat.c: Update.
254 2018-07-03 Tom Tromey <tom@tromey.com>
256 * common/ptid.c (ptid_get_lwp): Remove.
257 * common/ptid.h (ptid_get_lwp): Don't declare.
258 * aarch64-linux-nat.c: Update.
259 * ada-tasks.c: Update.
260 * aix-thread.c: Update.
261 * amd64-linux-nat.c: Update.
262 * arm-linux-nat.c: Update.
264 * fbsd-nat.c: Update.
265 * fbsd-tdep.c: Update.
267 * i386-cygwin-tdep.c: Update.
268 * i386-gnu-nat.c: Update.
269 * i386-linux-nat.c: Update.
270 * ia64-linux-nat.c: Update.
271 * inf-ptrace.c: Update.
273 * linux-fork.c: Update.
274 * linux-nat.c: Update.
275 * linux-tdep.c: Update.
276 * linux-thread-db.c: Update.
277 * mips-linux-nat.c: Update.
278 * nat/aarch64-linux-hw-point.c: Update.
279 * nat/aarch64-linux.c: Update.
280 * nat/linux-btrace.c: Update.
281 * nat/linux-osdata.c: Update.
282 * nat/linux-procfs.c: Update.
283 * nat/x86-linux-dregs.c: Update.
284 * obsd-nat.c: Update.
285 * ppc-fbsd-nat.c: Update.
286 * ppc-linux-nat.c: Update.
288 * python/py-infthread.c: Update.
289 * ravenscar-thread.c: Update.
291 * s390-linux-nat.c: Update.
292 * sol-thread.c: Update.
293 * sol2-tdep.c: Update.
294 * spu-linux-nat.c: Update.
295 * x86-linux-nat.c: Update.
296 * xtensa-linux-nat.c: Update.
298 2018-07-03 Tom Tromey <tom@tromey.com>
300 * common/ptid.c (ptid_get_pid): Remove.
301 * common/ptid.h (ptid_get_pid): Don't declare.
302 * aarch64-linux-nat.c: Update.
303 * ada-lang.c: Update.
304 * aix-thread.c: Update.
305 * alpha-bsd-nat.c: Update.
306 * amd64-fbsd-nat.c: Update.
307 * amd64-linux-nat.c: Update.
308 * arm-linux-nat.c: Update.
309 * arm-nbsd-nat.c: Update.
311 * break-catch-syscall.c: Update.
312 * breakpoint.c: Update.
313 * bsd-uthread.c: Update.
316 * darwin-nat.c: Update.
317 * fbsd-nat.c: Update.
318 * fbsd-tdep.c: Update.
321 * hppa-nbsd-nat.c: Update.
322 * hppa-obsd-nat.c: Update.
323 * i386-fbsd-nat.c: Update.
324 * ia64-linux-nat.c: Update.
325 * inf-ptrace.c: Update.
327 * inferior.c: Update.
328 * inferior.h: Update.
331 * linux-fork.c: Update.
332 * linux-nat.c: Update.
333 * linux-tdep.c: Update.
334 * linux-thread-db.c: Update.
335 * m68k-bsd-nat.c: Update.
336 * mi/mi-interp.c: Update.
337 * mi/mi-main.c: Update.
338 * mips-linux-nat.c: Update.
339 * mips-nbsd-nat.c: Update.
340 * mips64-obsd-nat.c: Update.
341 * nat/aarch64-linux-hw-point.c: Update.
342 * nat/aarch64-linux.c: Update.
343 * nat/linux-btrace.c: Update.
344 * nat/linux-osdata.c: Update.
345 * nat/linux-procfs.c: Update.
346 * nat/x86-linux-dregs.c: Update.
347 * nto-procfs.c: Update.
348 * obsd-nat.c: Update.
349 * ppc-linux-nat.c: Update.
350 * ppc-nbsd-nat.c: Update.
351 * ppc-obsd-nat.c: Update.
352 * proc-service.c: Update.
354 * python/py-inferior.c: Update.
355 * python/py-infthread.c: Update.
356 * ravenscar-thread.c: Update.
358 * remote-sim.c: Update.
360 * rs6000-nat.c: Update.
361 * s390-linux-nat.c: Update.
362 * sh-nbsd-nat.c: Update.
363 * sol-thread.c: Update.
364 * sparc-nat.c: Update.
365 * sparc64-tdep.c: Update.
366 * spu-linux-nat.c: Update.
367 * spu-tdep.c: Update.
368 * target-debug.h: Update.
371 * tid-parse.c: Update.
372 * tracefile-tfile.c: Update.
373 * vax-bsd-nat.c: Update.
374 * windows-nat.c: Update.
375 * x86-linux-nat.c: Update.
378 2018-07-03 Tom Tromey <tom@tromey.com>
380 * common/ptid.c (pid_to_ptid): Remove.
381 * common/ptid.h (pid_to_ptid): Don't declare.
382 * aix-thread.c: Update.
383 * arm-linux-nat.c: Update.
384 * common/ptid.c: Update.
385 * common/ptid.h: Update.
388 * darwin-nat.c: Update.
389 * fbsd-nat.c: Update.
390 * fork-child.c: Update.
392 * go32-nat.c: Update.
393 * inf-ptrace.c: Update.
395 * inferior.c: Update.
397 * linux-fork.c: Update.
398 * linux-nat.c: Update.
399 * nat/aarch64-linux-hw-point.c: Update.
400 * nat/fork-inferior.c: Update.
401 * nat/x86-linux-dregs.c: Update.
402 * nto-procfs.c: Update.
403 * obsd-nat.c: Update.
405 * progspace.c: Update.
407 * rs6000-nat.c: Update.
408 * s390-linux-nat.c: Update.
409 * sol-thread.c: Update.
410 * spu-linux-nat.c: Update.
413 * tracefile-tfile.c: Update.
414 * windows-nat.c: Update.
416 2018-07-03 Tom Tromey <tom@tromey.com>
418 * common/ptid.h (ptid_build): Don't declare.
419 * common/ptid.c (ptid_build): Remove.
420 * aix-thread.c: Update.
422 * bsd-uthread.c: Update.
423 * common/agent.c: Update.
424 * common/ptid.c: Update.
425 * common/ptid.h: Update.
427 * darwin-nat.c: Update.
428 * fbsd-nat.c: Update.
430 * linux-fork.c: Update.
431 * linux-nat.c: Update.
432 * linux-thread-db.c: Update.
433 * nat/linux-osdata.c: Update.
434 * nat/linux-procfs.c: Update.
435 * nto-procfs.c: Update.
436 * obsd-nat.c: Update.
437 * proc-service.c: Update.
439 * ravenscar-thread.c: Update.
440 * remote-sim.c: Update.
442 * sol-thread.c: Update.
444 * windows-nat.c: Update.
446 2018-07-03 Tom Tromey <tom@tromey.com>
448 * infrun.c (follow_exec): Use exit_inferior_silent.
449 * inferior.c (exit_inferior_num_silent): Remove.
450 * inferior.h (exit_inferior_num_silent): Don't declare.
452 2018-07-03 Tom Tromey <tom@tromey.com>
455 * darwin-nat.c (darwin_attach_pid): Reset inferior and
456 inferior_ptid on error.
458 2018-07-02 Maciej W. Rozycki <macro@mips.com>
459 Simon Marchi <simon.marchi@polymtl.ca>
462 * disasm.h (gdb_disassembler): Add
463 `m_disassembler_options_holder'. member
464 * disasm.c (get_all_disassembler_options): New function.
465 (gdb_disassembler::gdb_disassembler): Use it.
466 (gdb_buffered_insn_length_init_dis): Likewise.
467 (gdb_buffered_insn_length): Adjust accordingly.
468 (set_disassembler_options): Handle options with arguments.
469 (show_disassembler_options_sfunc): Likewise. Add a leading new
470 line if showing options with descriptions.
471 (disassembler_options_completer): Adapt to using the
472 `disasm_options_and_args_t' structure.
473 * mips-tdep.c (mips_disassembler_options): New variable.
474 (mips_disassembler_options_o32): Likewise.
475 (mips_disassembler_options_n32): Likewise.
476 (mips_disassembler_options_n64): Likewise.
477 (gdb_print_insn_mips): Don't set `disassembler_options'.
478 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
480 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
481 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
482 `gdbarch_disassembler_options_implicit' and
483 `gdbarch_valid_disassembler_options'.
484 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
485 `disasm_options_and_args_t' structure.
486 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
488 (valid_disassembler_options): Switch from `disasm_options_t' to
489 the `disasm_options_and_args_t' structure.
490 * NEWS: Document `set disassembler-options' support for the MIPS
492 * gdbarch.h: Regenerate.
493 * gdbarch.c: Regenerate.
495 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
497 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
499 2018-06-29 Joel Brobecker <brobecker@adacore.com>
501 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
502 parameter in call to amd64_target_description.
503 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
504 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
505 (amd64fbsd_init_abi): Likewise.
506 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
507 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
508 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
509 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
511 2018-06-29 Pedro Alves <palves@redhat.com>
513 * gdb/amd64-tdep.h (amd64_create_target_description): Add
514 "segments" parameter.
515 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
516 (_initialize_amd64_tdep): Update call to
517 amd64_create_target_description.
518 (amd64_target_description): Add "segments" parameter. Adjust
519 the implementation to use it.
520 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
521 call to amd64_create_target_description.
522 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
523 * gdb/arch/amd64.h (amd64_create_target_description): Add
525 * gdb/arch/amd64.c (amd64_create_target_description): Add
526 "segments" parameter. Call create_feature_i386_64bit_segments
527 only if SEGMENTS is true.
528 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
529 call to amd64_create_target_description.
531 2018-06-29 Pedro Alves <palves@redhat.com>
533 * thread.c (thread_target_id_str): New, factored out from ...
534 (print_thread_info_1): ... here. Use it to compute the max
535 "Target Id" column width.
537 2018-06-29 Pedro Alves <palves@redhat.com>
539 * remote.c (remote_target::extra_thread_info): Delete
540 'display_buf' and 'n' locals. from the cache, regardless of
541 packet mechanims is in use. Use cache for qThreadExtra and qP
544 2018-06-29 Pedro Alves <palves@redhat.com>
546 * blockframe.c (find_pc_sect_containing_function): New function.
547 * breakpoint.c (print_breakpoint_location): Don't call
548 find_pc_sect_function.
549 * linespec.c (create_sals_line_offset): Record the location's
551 * linespec.c (convert_address_location_to_sals): Fill in sal's
552 symbol with find_pc_sect_containing_function.
553 * symtab.c (find_function_start_sal): Rename to ...
554 (find_function_start_sal_1): ... this.
555 (find_function_start_sal): Reimplement as wrapper around
556 find_function_start_sal_1, and use
557 find_pc_sect_containing_function to fill in the sal's symbol.
558 (find_function_start_sal(symbol*, bool)): Adjust.
559 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
561 (find_pc_sect_containing_function): Declare.
563 2018-06-29 Pedro Alves <palves@redhat.com>
565 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
566 true if the the location has no symbol.
568 2018-06-28 Tom Tromey <tom@tromey.com>
570 * NEWS: Mention --enable-codesign.
571 * silent-rules.mk (ECHO_SIGN): New variable.
572 * configure.ac: Add --enable-codesign.
573 * configure: Rebuild.
574 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
575 (gdb$(EXEEXT)): Optionally invoke codesign.
577 2018-06-28 Pedro Alves <palves@redhat.com>
579 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
581 (switch_to_thread_no_regs): Adjust comment.
582 * infcmd.c (stop_pc): Delete.
583 (post_create_inferior, info_program_command): Replace references
584 to stop_pc with references to thread_info->suspend.stop_pc.
585 * inferior.h (stop_pc): Delete declaration.
586 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
587 (handle_inferior_event_1, handle_signal_stop)
588 (process_event_stop_test, keep_going_stepped_thread)
589 (handle_step_into_function, handle_step_into_function_backward)
590 (print_stop_location): Replace references to stop_pc with
591 references to thread_info->suspend.stop_pc.
592 (struct infcall_suspend_state) <stop_pc>: Delete field.
593 (save_infcall_suspend_state, restore_infcall_suspend_state):
594 Remove references to inf_stat->stop_pc.
595 * linux-fork.c (fork_load_infrun_state): Likewise.
596 * record-btrace.c (record_btrace_set_replay): Likewise.
597 * record-full.c (record_full_goto_entry): Likewise.
598 * remote.c (print_one_stopped_thread): Likewise.
599 * target.c (target_resume): Extend comment.
600 * thread.c (set_executing_thread): New.
601 (set_executing): Use it.
602 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
603 Remove references to stop_pc.
605 2018-06-28 Pedro Alves <palves@redhat.com>
607 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
608 Moving fetching stop_pc until after ecs->event_thread is refreshed.
610 2018-06-28 Tom Tromey <tom@tromey.com>
612 * coffread.c (coff_symfile_finish): Update.
613 * xcoffread.c (xcoff_symfile_finish): Update.
614 * elfread.c (elf_symfile_finish): Update.
615 * symfile.h (dwarf2_free_objfile): Don't declare.
616 * dwarf2read.c (_initialize_dwarf2_read): Use
617 register_objfile_data_with_cleanup.
618 (dwarf2_free_objfile): Now static. Change signature.
620 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
622 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
623 option "-o" to add-symbol-file-load to add an offset to each
624 section's load address.
625 * symfile.c (set_objfile_default_section_offset): New function.
627 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
629 * symfile.c (add_symbol_file_command): Make sure that sections
630 with the same name are sorted in the same order.
632 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
634 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
635 require the second argument. If omitted, load sections at the
636 addresses specified in the file.
638 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
640 * symfile.c (symbol_file_command, symbol_file_add_main_1)
641 (_initialize_symfile): Add option "-o" to symbol-file to add an
642 offset to each section of the symbol file.
644 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
646 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
648 2018-06-27 Tom Tromey <tom@tromey.com>
650 * stack.c (_initialize_stack): Update "func" help text.
652 2018-06-27 Tom Tromey <tom@tromey.com>
654 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
656 (unwind_infopy_str, pyuw_create_unwind_info)
657 (unwind_infopy_add_saved_register, pyuw_sniffer)
658 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
660 (struct saved_reg): Add constructor.
661 <value>: Now a gdbpy_ref<>.
663 2018-06-27 Tom Tromey <tom@tromey.com>
665 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
667 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
669 * gdb-gdb.py.in: Format using autopep8.
671 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
673 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
674 (type_lookup_function): Recognize CORE_ADDR values.
676 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
678 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
681 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
683 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
686 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
688 * gdb-gdb.py: Move to...
689 * gdb-gdb.py.in: ... here.
690 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
691 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
693 (distclean): Remove gdb-gdb.py when cleaning.
694 (gdb-gdb.py, gdb-gdb.gdb): New rules.
695 * configure: Re-generate.
697 2018-06-27 Pedro Alves <palves@redhat.com>
699 * proc-service.c (get_ps_regcache): New.
700 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
701 (ps_lsetfpregs): Use it.
703 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
706 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
707 (dwarf_decode_lines_1): Adjust.
709 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
711 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
713 <info_proc>: Likewise.
715 2018-06-26 Joel Brobecker <brobecker@adacore.com>
717 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
718 to windows_fetch_one_register, and only handle the case of
719 fetching one register. Move the code that reloads the context
720 and iterates over all registers if R is negative to...
721 (windows_nat_target::fetch_registers): ... here.
722 (do_windows_store_inferior_registers): Rename to
723 windows_store_one_register, and only handle the case of storing
724 one register. Move the code that handles the case where r is
726 (windows_nat_target::store_registers) ... here.
728 2018-06-26 Tom Tromey <tom@tromey.com>
731 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
732 * rust-lang.c (rust_print_struct_def): Add podata parameter.
734 (rust_internal_print_type): Add podata parameter.
735 (rust_print_type): Update.
737 2018-06-26 Tom Tromey <tom@tromey.com>
739 * typeprint.h (struct print_offset_data) <update, finish,
740 maybe_print_hole>: New methods.
741 <indentation>: New constant.
742 * typeprint.c (print_offset_data::indentation): Define.
743 (print_offset_data::maybe_print_hole, print_offset_data::update)
744 (print_offset_data::finish): Move from c-typeprint.c and rename.
745 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
746 (print_spaces_filtered_with_print_options): Update.
747 (c_print_type_union_field_offset, maybe_print_hole)
748 (c_print_type_struct_field_offset): Move to typeprint.c and
750 (c_type_print_base_struct_union): Update.
752 2018-06-25 Pedro Alves <palves@redhat.com>
754 * gdbthread.h (thread_info_ref, delete_thread)
755 (delete_thread_silent, first_thread_of_inferior)
756 (any_thread_of_inferior, switch_to_thread)
757 (enable_thread_stack_temporaries)
758 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
759 (get_last_thread_stack_temporary)
760 (value_in_thread_stack_temporaries, can_access_registers_thread):
761 Spell out "struct thread_info" instead of just "thread_info".
762 * inferior.h (notice_new_inferior): Likewise.
764 2018-06-25 Pedro Alves <palves@redhat.com>
766 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
767 pass thread_info pointer to delete_thread.
768 (windows_nat_target::detach): Pass inferior pointer to
770 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
772 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
773 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
774 and pass a thread_info pointer to delete_thread.
775 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
776 pass thread_info pointer to delete_thread.
777 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
778 delete_thread_silent call.
779 * procfs.c (procfs_target::detach): Pass inferior pointer to
781 (procfs_target::wait): Pass thread_info pointer to delete_thread.
782 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
783 delete_thread_silent call.
784 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
785 pass thread_info pointer to delete_thread.
786 (windows_nat_target::detach): Pass inferior pointer to
789 2018-06-22 Alan Hayward <alan.hayward@arm.com>
791 * regcache.c (readable_regcache::read_part): Fix asserts.
792 (reg_buffer::raw_collect_part): New function.
793 (regcache::write_part): Fix asserts.
794 (reg_buffer::raw_supply_part): New function.
795 (regcache::transfer_regset_register): New helper function.
796 (regcache::transfer_regset): Call new functions.
797 (regcache_supply_regset): Use gdb_byte*.
798 (regcache::supply_regset): Likewise.
799 (regcache_collect_regset): Likewise.
800 (regcache::collect_regset): Likewise.
801 * regcache.h (reg_buffer::raw_collect_part): New declaration.
802 (reg_buffer::raw_supply_part): Likewise.
803 (regcache::transfer_regset_register): Likewise.
804 (regcache::transfer_regset): Use gdb_byte*.
806 2018-06-22 Alan Hayward <alan.hayward@arm.com>
808 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
810 2018-06-21 Pedro Alves <palves@redhat.com>
812 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
813 instead of a ptid_t. All callers adjusted.
814 * ada-tasks.c (ada_get_task_number): Likewise. All callers
816 (print_ada_task_info, display_current_task_id, task_command_1):
818 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
820 (breakpoint_kind): Adjust.
821 (remove_breakpoints_pid): Rename to ...
822 (remove_breakpoints_inf): ... this. Adjust to take an inferior
823 pointer. All callers adjusted.
824 (bpstat_clear_actions): Use inferior_thread.
825 (get_bpstat_thread): New.
826 (bpstat_do_actions): Use it.
827 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
828 to take a thread_info pointer. All callers adjusted.
829 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
830 (breakpoint_re_set_thread): Use inferior_thread.
831 * breakpoint.h (struct inferior): Forward declare.
832 (bpstat_stop_status): Update.
833 (remove_breakpoints_pid): Delete.
834 (remove_breakpoints_inf): New.
835 * bsd-uthread.c (bsd_uthread_target::wait)
836 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
837 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
838 (maint_btrace_packet_history_cmd)
839 (maint_btrace_clear_packet_history_cmd): Adjust.
840 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
842 * cli/cli-interp.c: Include "inferior.h".
843 * common/refcounted-object.h (struct
844 refcounted_object_ref_policy): New.
845 * compile/compile-object-load.c: Include gdbthread.h.
846 (store_regs): Use inferior_thread.
847 * corelow.c (core_target::close): Use current_inferior.
848 (core_target_open): Adjust to use first_thread_of_inferior and use
849 the current inferior.
850 * ctf.c (ctf_target::close): Adjust to use current_inferior.
851 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
852 <thread>: ... this new field. All references adjusted.
853 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
854 Take a thread_info pointer instead of a ptid_t.
855 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
856 (dummy_frame_discard, register_dummy_frame_dtor): Take a
857 thread_info pointer instead of a ptid_t.
858 * elfread.c: Include "inferior.h".
859 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
861 * eval.c (evaluate_subexp): Likewise.
862 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
864 * gdb_proc_service.h (struct thread_info): Forward declare.
865 (struct ps_prochandle) <ptid>: Delete, replaced by ...
866 <thread>: ... this new field. All references adjusted.
867 * gdbarch.h, gdbarch.c: Regenerate.
868 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
869 'thread' parameter. All implementations and callers adjusted.
870 * gdbthread.h (thread_info) <set_running>: New method.
871 (delete_thread, delete_thread_silent): Take a thread_info pointer
873 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
874 (first_thread_of_process): Delete, replaced by ...
875 (first_thread_of_inferior): ... this new function. All callers
877 (any_live_thread_of_process): Delete, replaced by ...
878 (any_live_thread_of_inferior): ... this new function. All callers
880 (switch_to_thread, switch_to_no_thread): Declare.
881 (is_executing): Delete.
882 (enable_thread_stack_temporaries): Update comment.
883 <enable_thread_stack_temporaries>: Take a thread_info pointer
884 instead of a ptid_t. Incref the thread.
885 <~enable_thread_stack_temporaries>: Decref the thread.
888 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
889 (get_last_thread_stack_temporary)
890 (value_in_thread_stack_temporaries, can_access_registers_thread):
891 Take a thread_info pointer instead of a ptid_t. All callers
893 * infcall.c (get_call_return_value): Use inferior_thread.
894 (run_inferior_call): Work with thread pointers instead of ptid_t.
895 (call_function_by_hand_dummy): Work with thread pointers instead
896 of ptid_t. Use thread_info_ref.
897 * infcmd.c (proceed_thread_callback): Access thread's state
899 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
900 access thread's state directly.
901 (continue_command): Use inferior_thread.
902 (info_program_command): Use find_thread_ptid and access thread
904 (proceed_after_attach_callback): Use thread state directly.
905 (notice_new_inferior): Take a thread_info pointer instead of a
906 ptid_t. All callers adjusted.
907 (exit_inferior): Take an inferior pointer instead of a pid. All
909 (exit_inferior_silent): New.
910 (detach_inferior): Delete.
911 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
912 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
913 (detach_inferior_command, kill_inferior_command): Use
914 find_inferior_id instead of valid_gdb_inferior_id and
915 gdb_inferior_id_to_pid.
916 (inferior_command): Use inferior and thread pointers.
917 * inferior.h (struct thread_info): Forward declare.
918 (notice_new_inferior): Take a thread_info pointer instead of a
919 ptid_t. All callers adjusted.
920 (detach_inferior): Delete declaration.
921 (exit_inferior, exit_inferior_silent): Take an inferior pointer
922 instead of a pid. All callers adjusted.
923 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
924 (valid_gdb_inferior_id): Delete.
925 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
926 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
927 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
929 <inf>: ... this new field.
930 <step_ptid>: Delete, replaced by ...
931 <step_thread>: ... this new field.
932 (get_displaced_stepping_state): Take an inferior pointer instead
933 of a pid. All callers adjusted.
934 (displaced_step_in_progress_any_inferior): Adjust.
935 (displaced_step_in_progress_thread): Take a thread pointer instead
936 of a ptid_t. All callers adjusted.
937 (displaced_step_in_progress, add_displaced_stepping_state): Take
938 an inferior pointer instead of a pid. All callers adjusted.
939 (get_displaced_step_closure_by_addr): Adjust.
940 (remove_displaced_stepping_state): Take an inferior pointer
941 instead of a pid. All callers adjusted.
942 (displaced_step_prepare_throw, displaced_step_prepare)
943 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
944 All callers adjusted.
945 (start_step_over): Adjust.
946 (infrun_thread_ptid_changed): Remove bit updating ptids in the
947 displaced step queue.
948 (do_target_resume): Adjust.
949 (fetch_inferior_event): Use inferior_thread.
950 (context_switch, get_inferior_stop_soon): Take an
951 execution_control_state pointer instead of a ptid_t. All callers
953 (switch_to_thread_cleanup): Delete.
954 (stop_all_threads): Use scoped_restore_current_thread.
955 * inline-frame.c: Include "gdbthread.h".
956 (inline_state) <inline_state>: Take a thread pointer instead of a
957 ptid_t. All callers adjusted.
958 <ptid>: Delete, replaced by ...
959 <thread>: ... this new field.
960 (find_inline_frame_state): Take a thread pointer instead of a
961 ptid_t. All callers adjusted.
962 (skip_inline_frames, step_into_inline_frame)
963 (inline_skipped_frames, inline_skipped_symbol): Take a thread
964 pointer instead of a ptid_t. All callers adjusted.
965 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
966 (inline_skipped_frames, inline_skipped_symbol): Likewise.
967 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
969 * linux-nat.c (get_detach_signal): Likewise.
970 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
971 (thread_db_notice_clone): Adjust.
972 (thread_db_find_new_threads_silently)
973 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
974 a thread pointer instead of a ptid_t. All callers adjusted.
975 * mi/mi-cmd-var.c: Include "inferior.h".
976 (mi_cmd_var_update_iter): Update to use thread pointers.
977 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
979 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
981 (mi_output_running): ... this new function.
982 (mi_on_resume_1): Adjust to use it.
983 (mi_user_selected_context_changed): Adjust to use inferior_thread.
984 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
986 (interrupt_thread_callback): : Adjust to use thread and inferior
988 * proc-service.c: Include "gdbthread.h".
989 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
990 * progspace-and-thread.c: Include "inferior.h".
991 * progspace.c: Include "inferior.h".
992 * python/py-exitedevent.c (create_exited_event_object): Adjust to
993 hold a reference to an inferior_object.
994 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
996 * python/py-inferior.c (struct inferior_object): Give the type a
997 tag name instead of a typedef.
998 (python_on_normal_stop): No need to check if the current thread is
1000 (inferior_to_inferior_object): Change return type to
1001 inferior_object. All callers adjusted.
1002 (find_thread_object): Delete, bits factored out to ...
1003 (thread_to_thread_object): ... this new function.
1004 * python/py-infthread.c (create_thread_object): Use
1005 inferior_to_inferior_object.
1006 (thpy_is_stopped): Use thread pointer directly.
1007 (gdbpy_selected_thread): Use inferior_thread.
1008 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1009 field, replaced with ...
1010 <thread>: ... this new field. All users adjusted.
1011 (btpy_insn_or_gap_new): Drop const.
1012 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1014 * python/py-record.c: Include "gdbthread.h".
1015 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1016 a ptid_t. All callers adjusted.
1017 (gdbpy_current_recording): Use inferior_thread.
1018 * python/py-record.h (recpy_record_object) <ptid>: Delete
1019 field, replaced with ...
1020 <thread>: ... this new field. All users adjusted.
1021 (recpy_element_object) <ptid>: Delete
1022 field, replaced with ...
1023 <thread>: ... this new field. All users adjusted.
1024 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1025 a ptid_t. All callers adjusted.
1026 * python/py-threadevent.c: Include "gdbthread.h".
1027 (get_event_thread): Use thread_to_thread_object.
1028 * python/python-internal.h (struct inferior_object): Forward
1030 (find_thread_object, find_inferior_object): Delete declarations.
1031 (thread_to_thread_object, inferior_to_inferior_object): New
1033 * record-btrace.c: Include "inferior.h".
1034 (require_btrace_thread): Use inferior_thread.
1035 (record_btrace_frame_sniffer)
1036 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1037 (get_thread_current_frame): Use scoped_restore_current_thread and
1039 (get_thread_current_frame): Use thread pointer directly.
1040 (record_btrace_replay_at_breakpoint): Use thread's inferior
1042 * record-full.c: Include "inferior.h".
1043 * regcache.c: Include "gdbthread.h".
1044 (get_thread_arch_regcache): Use the inferior's address space
1046 (get_thread_regcache, registers_changed_thread): New.
1047 * regcache.h (get_thread_regcache(thread_info *thread)): New
1049 (registers_changed_thread): New.
1050 (remote_target) <remote_detach_1>: Swap order of parameters.
1051 (remote_add_thread): <remote_add_thread>: Return the new thread.
1052 (get_remote_thread_info(ptid_t)): New overload.
1053 (remote_target::remote_notice_new_inferior): Use thread pointers
1055 (remote_target::process_initial_stop_replies): Use
1056 thread_info::set_running.
1057 (remote_target::remote_detach_1, remote_target::detach)
1058 (extended_remote_target::detach): Adjust.
1059 * stack.c (frame_show_address): Use inferior_thread.
1060 * target-debug.h (target_debug_print_thread_info_pp): New.
1061 * target-delegates.c: Regenerate.
1062 * target.c (default_thread_address_space): Delete.
1063 (memory_xfer_partial_1): Use current_inferior.
1064 (target_detach): Use current_inferior.
1065 (target_thread_address_space): Delete.
1066 (generic_mourn_inferior): Use current_inferior.
1067 * target.h (struct target_ops) <thread_address_space>: Delete.
1068 (target_thread_address_space): Delete.
1069 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1071 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1072 thread pointer instead of a ptid_t. Adjust all callers.
1073 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1074 (first_thread_of_process): Delete, replaced by ...
1075 (first_thread_of_inferior): ... this new function. All callers
1077 (any_thread_of_process): Rename to ...
1078 (any_thread_of_inferior): ... this, and take an inferior pointer.
1079 (any_live_thread_of_process): Rename to ...
1080 (any_live_thread_of_inferior): ... this, and take an inferior
1082 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1083 (value_in_thread_stack_temporaries)
1084 (get_last_thread_stack_temporary): Take a thread pointer instead
1085 of a ptid_t. Adjust all callers.
1086 (thread_info::set_running): New.
1087 (validate_registers_access): Use inferior_thread.
1088 (can_access_registers_ptid): Rename to ...
1089 (can_access_registers_thread): ... this, and take a thread
1091 (print_thread_info_1): Adjust to compare thread pointers instead
1093 (switch_to_no_thread, switch_to_thread): Make extern.
1094 (scoped_restore_current_thread::~scoped_restore_current_thread):
1095 Use m_thread pointer directly.
1096 (scoped_restore_current_thread::scoped_restore_current_thread):
1097 Use inferior_thread.
1098 (thread_command): Use thread pointer directly.
1099 (thread_num_make_value_helper): Use inferior_thread.
1100 * top.c (execute_command): Use inferior_thread.
1101 * tui/tui-interp.c: Include "inferior.h".
1102 * varobj.c (varobj_create): Use inferior_thread.
1103 (value_of_root_1): Use find_thread_global_id instead of
1104 global_thread_id_to_ptid.
1106 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1108 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1110 (regcache::write_part): Likewise.
1111 (readable_regcache::cooked_read_part): Update comment.
1112 (readable_regcache::cooked_write_part): Likewise.
1113 * regcache.h: (readable_regcache::read_part): Likewise.
1114 (regcache::write_part): Likewise.
1116 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1117 Dirk Schubert <dirk.schubert@arm.com>
1119 * aarch64-linux-nat.c (post_attach): New.
1120 (aarch64_linux_nat_target::post_attach): Override post_attach to
1121 record the number of hardware debug registers.
1123 2018-06-20 Tom Tromey <tom@tromey.com>
1125 * python/py-param.c (add_setshow_generic): Make parameters const.
1126 (parmpy_init): Update.
1128 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1130 * regcache.h (regcache_cooked_read_ftype): Rename to...
1131 (register_read_ftype): ...this, change type to function_view.
1132 (class reg_buffer) <save>: Remove src parameter.
1133 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1134 parameter non-const in first overload. Remove src parameter in
1136 * regcache.c (do_cooked_read): Remove.
1137 (readonly_detached_regcache::readonly_detached_regcache): Make
1138 parameter non-const, adjust call to other constructor.
1139 (reg_buffer::save): Remove src parameter.
1140 * frame.c (do_frame_register_read): Remove.
1141 (frame_save_as_regcache): Use lambda function.
1142 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1143 parameter to ppu2spu_data *.
1144 (ppu2spu_sniffer): Use lambda function.
1146 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1148 * record-full.c (record_full_target::insert_breakpoint): Remove
1149 "struct" keyword, add const.
1151 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1153 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1154 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1155 * configure.ac: Remove AC_PREREQ, add missing quoting.
1156 * gnulib/configure.ac: Modernize usage of
1157 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1158 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1159 (AUTOMAKE_VERSION): Bump to 1.15.1.
1160 * configure: Re-generate.
1161 * config.in: Re-generate.
1162 * aclocal.m4: Re-generate.
1163 * gnulib/aclocal.m4: Re-generate.
1164 * gnulib/config.in: Re-generate.
1165 * gnulib/configure: Re-generate.
1166 * gnulib/import/Makefile.in: Re-generate.
1168 2018-06-19 Pedro Alves <palves@redhat.com>
1170 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1171 (lookup_minimal_symbol_by_pc_section): ... here with
1172 gdb_assert_not_reached added.
1174 2018-06-19 Pedro Alves <palves@redhat.com>
1176 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1177 parameter with a block parameter. Compare location's block symbol
1178 with the frame's block instead of addresses.
1179 (skip_inline_frames): Pass the current block instead of the
1180 frame's address. Break out as soon as we determine the frame
1181 should not be skipped.
1183 2018-06-18 Tom Tromey <tom@tromey.com>
1185 * solib-aix.c (solib_aix_get_section_offsets): Return
1187 (solib_aix_solib_create_inferior_hook): Update.
1189 2018-06-18 Tom Tromey <tom@tromey.com>
1191 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1193 2018-06-18 Tom Tromey <tom@tromey.com>
1195 * solib-frv.c (frv_relocate_main_executable): Use
1197 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1200 2018-06-18 Tom Tromey <tom@tromey.com>
1202 * objfiles.h (inhibit_section_map_updates): Update.
1203 (resume_section_map_updates, resume_section_map_updates_cleanup):
1205 * solib-svr4.c (svr4_handle_solib_event): Update.
1206 * objfiles.c (inhibit_section_map_updates): Return
1207 scoped_restore_tmpl<int>.
1208 (resume_section_map_updates, resume_section_map_updates_cleanup):
1211 2018-06-18 Tom Tromey <tom@tromey.com>
1213 * valprint.h (read_string): Update.
1214 * valprint.c (read_string): Change type of "buffer".
1215 (val_print_string): Update.
1216 * python/py-value.c (valpy_string): Update.
1217 * language.h (struct language_defn) <la_get_string>: Change
1219 (default_get_string, c_get_string): Update.
1220 * language.c (default_get_string): Change type of "buffer".
1221 * guile/scm-value.c (gdbscm_value_to_string): Update.
1222 * c-lang.c (c_get_string): Change type of "buffer".
1224 2018-06-18 Tom Tromey <tom@tromey.com>
1226 * ser-mingw.c (struct pipe_state_destroyer): New.
1227 (pipe_state_up): New typedef.
1228 (cleanup_pipe_state): Remove.
1229 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1231 2018-06-18 Tom Tromey <tom@tromey.com>
1233 * rust-lang.h (rust_yyerror): Don't declare.
1234 * rust-lang.c (rust_language_defn): Update.
1235 * rust-exp.y (yyerror): Now static.
1236 * parse.c (parse_exp_in_context_1): Update.
1237 * p-lang.h (p_yyerror): Don't declare.
1238 * p-lang.c (p_language_defn): Update.
1239 * p-exp.y (yyerror): Now static.
1240 * opencl-lang.c (opencl_language_defn): Update.
1241 * objc-lang.c (objc_language_defn): Update.
1242 * m2-lang.h (m2_yyerror): Don't declare.
1243 * m2-lang.c (m2_language_defn): Update.
1244 * m2-exp.y (yyerror): Now static.
1245 * language.h (struct language_defn) <la_error>: Remove.
1246 * language.c (unk_lang_error): Remove.
1247 (unknown_language_defn, auto_language_defn): Remove.
1248 * go-lang.h (go_yyerror): Don't declare.
1249 * go-lang.c (go_language_defn): Update.
1250 * go-exp.y (yyerror): Now static.
1251 * f-lang.h (f_yyerror): Don't declare.
1252 * f-lang.c (f_language_defn): Update.
1253 * f-exp.y (yyerror): Now static.
1254 * d-lang.h (d_yyerror): Don't declare.
1255 * d-lang.c (d_language_defn): Update.
1256 * d-exp.y (yyerror): Now static.
1257 * c-lang.h (c_yyerror): Don't declare.
1258 * c-lang.c (c_language_defn, cplus_language_defn)
1259 (asm_language_defn, minimal_language_defn): Update.
1260 * c-exp.y (yyerror): Now static.
1261 * ada-lang.h (ada_yyerror): Don't declare.
1262 * ada-lang.c (ada_language_defn): Update.
1263 * ada-exp.y (yyerror): Now static.
1265 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1267 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1268 (store_sveregs_to_thread): Likewise.
1269 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1270 (aarch64_linux_store_inferior_registers): Likewise.
1271 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1273 (aarch64_sve_regs_copy_to_regcache): Likewise.
1274 (aarch64_sve_regs_copy_from_regcache): Likewise.
1275 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1277 (aarch64_sve_regs_copy_to_regcache): Likewise.
1278 (aarch64_sve_regs_copy_from_regcache): Likewise.
1279 (sve_context): Structure from Linux headers.
1280 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1281 (SVE_SIG_ZREG_SIZE): Likewise.
1282 (SVE_SIG_PREG_SIZE): Likewise.
1283 (SVE_SIG_FFR_SIZE): Likewise.
1284 (SVE_SIG_REGS_OFFSET): Likewise.
1285 (SVE_SIG_ZREGS_OFFSET): Likewise.
1286 (SVE_SIG_ZREG_OFFSET): Likewise.
1287 (SVE_SIG_ZREGS_SIZE): Likewise.
1288 (SVE_SIG_PREGS_OFFSET): Likewise.
1289 (SVE_SIG_PREG_OFFSET): Likewise.
1290 (SVE_SIG_PREGS_SIZE): Likewise.
1291 (SVE_SIG_FFR_OFFSET): Likewise.
1292 (SVE_SIG_REGS_SIZE): Likewise.
1293 (SVE_SIG_CONTEXT_SIZE): Likewise.
1294 (SVE_PT_REGS_MASK): Likewise.
1295 (SVE_PT_REGS_FPSIMD): Likewise.
1296 (SVE_PT_REGS_SVE): Likewise.
1297 (SVE_PT_VL_INHERIT): Likewise.
1298 (SVE_PT_VL_ONEXEC): Likewise.
1299 (SVE_PT_REGS_OFFSET): Likewise.
1300 (SVE_PT_FPSIMD_OFFSET): Likewise.
1301 (SVE_PT_FPSIMD_SIZE): Likewise.
1302 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1303 (SVE_PT_SVE_PREG_SIZE): Likewise.
1304 (SVE_PT_SVE_FFR_SIZE): Likewise.
1305 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1306 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1307 (__SVE_SIG_TO_PT): Likewise.
1308 (SVE_PT_SVE_OFFSET): Likewise.
1309 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1310 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1311 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1312 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1313 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1314 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1315 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1316 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1317 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1318 (SVE_PT_SVE_SIZE): Likewise.
1319 (SVE_PT_SIZE): Likewise.
1320 (HAS_SVE_STATE): New define.
1322 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1324 * nat/aarch64-sve-linux-sigcontext.h: New file.
1325 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1327 (SVE_VQ_MIN): Likewise.
1328 (SVE_VQ_MAX): Likewise.
1329 (SVE_VL_MIN): Likewise.
1330 (SVE_VL_MAX): Likewise.
1331 (SVE_NUM_ZREGS): Likewise.
1332 (SVE_NUM_PREGS): Likewise.
1333 (sve_vl_valid): Likewise.
1334 (struct user_sve_header): Likewise.
1336 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1337 Richard Bunt <Richard.Bunt@arm.com>
1339 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1340 was requested by GDB.
1342 2018-06-15 Tom de Vries <tdevries@suse.de>
1344 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1346 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1348 * gnulib/update-gnulib.sh: Print expected versions of
1351 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1353 * arch-utils.c (default_type_align): Use type_length_units.
1354 * gdbtypes.c (type_align): Use type_length_units.
1356 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1358 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1359 of 'define' command.
1361 2018-06-14 Tom de Vries <tdevries@suse.de>
1364 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1365 get_no_prettyformat_print_options.
1367 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1369 * sparc-nat.h: Include target.h.
1370 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1371 <fetch_registers>: Remove this argument in function call.
1372 <store_registers>: Remove this argument in function call, remove
1374 <low_forget_process>: Call sparc64_forget_process instead of
1375 sparc_forget_process.
1377 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1379 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1380 (procfs_target::make_corefile_notes): Adjust to new
1381 target_read_alloc return type.
1383 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1384 Stephen Roberts <stephen.roberts@arm.com>
1387 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1388 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1389 Move should_notify_stop local into more inner scope.
1391 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1392 Stephen Roberts <stephen.roberts@arm.com>
1395 * infrun.c (resume_1): Add call to mark_async_event_handler.
1397 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1399 * infrun.c (do_target_wait): Change old version of $pc printed.
1401 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1403 * dwarf2read.c (read_index_from_section): Rename to...
1404 (read_gdb_index_from_section): ... this, update all callers.
1405 (dwarf2_read_index): Rename to...
1406 (dwarf2_read_gdb_index): ... this, update all callers.
1408 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1410 * gdb/hppa-linux-nat.c
1411 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1412 hppa_linux_nat_target::fetch_registers.
1414 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1416 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1417 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1418 (AARCH64_DWARF_SVE_FFR): Likewise.
1419 (AARCH64_DWARF_SVE_P0): Likewise.
1420 (AARCH64_DWARF_SVE_Z0): Likewise.
1422 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1424 * common/common-regcache.h (raw_compare): New function.
1425 * regcache.c (regcache::raw_compare): Likewise.
1426 * regcache.h (regcache::raw_compare): New declaration.
1428 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1430 * common/common-regcache.h (reg_buffer_common): New structure.
1431 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1432 (reg_buffer::raw_supply): Likewise.
1433 (reg_buffer::raw_supply_integer): Likewise.
1434 (reg_buffer::raw_supply_zeroed): Likewise.
1435 (reg_buffer::raw_collect): Likewise.
1436 (reg_buffer::raw_collect_integer): Likewise.
1437 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1438 (reg_buffer::raw_supply): Likewise.
1439 (reg_buffer::raw_supply_integer): Likewise.
1440 (reg_buffer::raw_supply_zeroed): Likewise.
1441 (reg_buffer::raw_collect): Likewise.
1442 (reg_buffer::raw_collect_integer): Likewise.
1444 2018-06-10 Tom Tromey <tom@tromey.com>
1446 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1447 (class remote_state) <stop_reply_queue>: Now std::vector.
1448 (remote_state::~remote_state)
1449 (remote_target::stop_reply_queue_length): Update.
1450 (struct queue_iter_param, remove_child_of_pending_fork)
1451 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1452 (check_pending_event_prevents_wildcard_vcont_callback)
1453 (remove_stop_reply_for_inferior)
1454 (remove_stop_reply_of_remote_state)
1455 (remote_notif_remove_once_on_match)
1456 (stop_reply_match_ptid_and_ws)
1457 (remote_kill_child_of_pending_fork): Remove.
1458 (remote_target::remove_new_fork_children)
1459 (remote_target::check_pending_events_prevent_wildcard_vcont)
1460 (remote_target::discard_pending_stop_replies)
1461 (remote_target::discard_pending_stop_replies_in_queue)
1462 (remote_target::remote_notif_remove_queued_reply)
1463 (remote_target::queued_stop_reply)
1464 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1465 (remote_target::wait, remote_target::kill_new_fork_children)
1466 (remote_target::async): Update.
1468 2018-06-10 Tom Tromey <tom@tromey.com>
1470 * record-full.c (record_full_arch_list_cleanups): Remove.
1471 (record_full_message): Use try/catch.
1472 (record_full_wait_cleanups): Remove.
1473 (record_full_wait_1): Use try/catch.
1474 (record_full_restore): Likewise.
1476 2018-06-10 Tom Tromey <tom@tromey.com>
1478 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1479 declare VEC. Add constructor.
1480 <in_target_beneath>: Now bool.
1481 (record_full_breakpoints): Now a std::vector, static.
1482 (record_full_sync_record_breakpoints)
1483 (record_full_init_record_breakpoints)
1484 (record_full_target::insert_breakpoint)
1485 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1487 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1489 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1490 * serial.c (serial_interface_lookup): Remove struct keyword.
1492 2018-06-10 Tom Tromey <tom@tromey.com>
1494 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1496 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1498 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1500 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1501 "beneath" as a method.
1502 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1503 Use "beneath" as a method.
1505 2018-06-10 Tom Tromey <tom@tromey.com>
1507 * tracefile.c (struct trace_file_writer_deleter): New.
1508 <operator()>: Rename from trace_file_writer_xfree.
1509 (trace_file_writer_up): New typedef.
1510 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1512 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1514 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1515 <m_registers, m_register_status>: Change type to
1517 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1520 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1522 * common/common-regcache.h (enum register_status): Add
1523 underlying type "signed char".
1524 * regcache.h (reg_buffer) <m_register_status>: Change type to
1526 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1527 register_status instead of signed char.
1528 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1529 (reg_buffer::get_register_status): Remove cast.
1530 (readable_regcache::raw_read): Remove cast.
1531 (readable_regcache::cooked_read): Remove cast.
1533 2018-06-09 Tom Tromey <tom@tromey.com>
1535 * source.c (reverse_search_command, forward_search_command): Use
1538 2018-06-09 Tom Tromey <tom@tromey.com>
1540 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1541 (serial_ops_list): Now static, std::vector.
1542 (serial_interface_lookup, serial_add_interface): Update.
1544 2018-06-09 Tom Tromey <tom@tromey.com>
1546 * dwarf2read.c (process_cu_includes): Update.
1547 (process_full_comp_unit): Update.
1548 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1551 2018-06-08 Paul Koning <paul_koning@dell.com>
1555 * python/python.c (do_start_initialization):
1556 Avoid call to internal Python API.
1557 (init__gdb_module): New function.
1559 2018-06-08 Gary Benson <gbenson@redhat.com>
1561 * linux-thread-db.c (valprint.h): New include.
1562 (struct check_thread_db_info): New structure.
1563 (check_thread_db_on_load, tdb_testinfo): New static globals.
1564 (check_thread_db, check_thread_db_callback): New functions.
1565 (try_thread_db_load_1): Run integrity checks if requested.
1566 (maintenance_check_libthread_db): New function.
1567 (_initialize_thread_db): Register "maint check libthread-db"
1568 and "maint set/show check-libthread-db".
1569 * NEWS: Mention the above new commands.
1571 2018-06-08 Tom Tromey <tom@tromey.com>
1573 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1576 2018-06-08 Tom Tromey <tom@tromey.com>
1578 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1580 2018-06-08 Tom Tromey <tom@tromey.com>
1582 * common/btrace-common.h (struct btrace_data): Add constructor,
1583 destructor, move assignment operator.
1584 <empty, clear, fini>: New methods.
1585 <format>: Initialize.
1586 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1587 (btrace_data_empty): Don't declare.
1588 * common/btrace-common.c (btrace_data_init): Remove.
1589 (btrace_data::fini): Rename from btrace_data_fini.
1590 (btrace_data::empty): Rename from btrace_data_empty.
1591 (btrace_data::clear): Rename from btrace_data_clear. Return
1593 * btrace.h (make_cleanup_btrace_data): Don't declare.
1594 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1595 (parse_xml_btrace): Update.
1596 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1597 (maint_btrace_clear_packet_history_cmd): Update.
1599 2018-06-07 Pedro Alves <palves@redhat.com>
1601 * target.h (target_ops) <beneath>: Now a method. All references
1603 (class target_stack): New.
1604 * target.c (g_target_stack): New.
1605 (g_current_top_target): Delete.
1606 (current_top_target): Get the top target out of g_target_stack.
1607 (target_stack::push, target_stack::unpush): New.
1608 (push_target, unpush_target): Reimplement.
1609 (target_is_pushed): Reimplement in terms of g_target_stack.
1610 (target_ops::beneath, target_stack::find_beneath): New.
1612 2018-06-07 Pedro Alves <palves@redhat.com>
1614 * target.h (find_target_beneath): Delete declaration.
1615 * target.c (find_target_beneath): Delete definition.
1616 * aix-thread.c: All callers of find_target_beneath adjusted to
1617 call target_ops::beneath instead.
1618 * bsd-uthread.c: Likewise.
1619 * linux-thread-db.c: Likewise.
1620 * ravenscar-thread.c: Likewise.
1621 * sol-thread.c: Likewise.
1622 * spu-multiarch.c: Likewise.
1624 2018-06-07 Pedro Alves <palves@redhat.com>
1626 * target.h (target_ops) <beneath>: Now a method. All references
1628 (target_ops) <m_beneath>: New.
1629 * target.c (target_ops::beneath): New.
1630 * corelow.c: Adjust all references to target_ops::beneath.
1631 * linux-thread-db.c: Likewise.
1632 * make-target-delegates: Likewise.
1633 * record-btrace.c: Likewise.
1634 * record-full.c: Likewise.
1635 * remote.c: Likewise.
1636 * target.c: Likewise.
1637 * target-delegates.c: Regenerate.
1639 2018-06-07 Pedro Alves <palves@redhat.com>
1641 * target.h (target_stack): Delete.
1642 (current_top_target): Declare function.
1643 * target.c (target_stack): Delete.
1644 (g_current_top_target): New.
1645 (current_top_target): New function.
1646 * auxv.c: Use current_top_target instead of target_stack
1648 * avr-tdep.c: Likewise.
1649 * breakpoint.c: Likewise.
1650 * corefile.c: Likewise.
1651 * elfread.c: Likewise.
1653 * exceptions.c: Likewise.
1654 * frame.c: Likewise.
1655 * gdbarch-selftests.c: Likewise.
1656 * gnu-v3-abi.c: Likewise.
1657 * ia64-tdep.c: Likewise.
1658 * ia64-vms-tdep.c: Likewise.
1659 * infcall.c: Likewise.
1660 * infcmd.c: Likewise.
1661 * infrun.c: Likewise.
1662 * linespec.c: Likewise.
1663 * linux-tdep.c: Likewise.
1664 * minsyms.c: Likewise.
1665 * ppc-linux-nat.c: Likewise.
1666 * ppc-linux-tdep.c: Likewise.
1667 * procfs.c: Likewise.
1668 * regcache.c: Likewise.
1669 * remote.c: Likewise.
1670 * rs6000-tdep.c: Likewise.
1671 * s390-linux-nat.c: Likewise.
1672 * s390-tdep.c: Likewise.
1673 * solib-aix.c: Likewise.
1674 * solib-darwin.c: Likewise.
1675 * solib-dsbt.c: Likewise.
1676 * solib-spu.c: Likewise.
1677 * solib-svr4.c: Likewise.
1678 * solib-target.c: Likewise.
1679 * sparc-tdep.c: Likewise.
1680 * sparc64-tdep.c: Likewise.
1681 * spu-tdep.c: Likewise.
1682 * symfile.c: Likewise.
1683 * symtab.c: Likewise.
1684 * target-descriptions.c: Likewise.
1685 * target-memory.c: Likewise.
1686 * target.c: Likewise.
1687 * target.h: Likewise.
1688 * tracefile-tfile.c: Likewise.
1689 * tracepoint.c: Likewise.
1690 * valops.c: Likewise.
1691 * valprint.c: Likewise.
1692 * value.c: Likewise.
1693 * windows-tdep.c: Likewise.
1694 * mi/mi-main.c: Likewise.
1696 2018-06-07 Tom Tromey <tom@tromey.com>
1698 * valprint.h (build_address_symbolic): Declare.
1699 * printcmd.c (print_address_symbolic): Update.
1700 (build_address_symbolic): Change "name" and "filename" to
1702 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1704 * defs.h (build_address_symbolic): Remove declaration.
1706 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1708 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1709 (aarch64_vnv_type): Add function.
1710 (aarch64_pseudo_register_name): Add V regs for SVE.
1711 (aarch64_pseudo_register_type): Likewise.
1712 (aarch64_pseudo_register_reggroup_p): Likewise.
1713 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1714 (aarch64_pseudo_read_value): Add V regs for SVE.
1715 (aarch64_pseudo_write_2): Use V0 offset for SVE
1716 (aarch64_pseudo_write): Add V regs for SVE.
1717 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1719 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1721 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1722 (sve_vl_from_vq): Likewise.
1724 2018-06-05 Tom Tromey <tom@tromey.com>
1726 * cli/cli-cmds.c (show_version): Update.
1727 * top.c (print_gdb_version): Add "interactive" parameter.
1729 * main.c (captured_main_1): Update.
1730 * top.h (print_gdb_version): Add "interactive" parameter and a
1733 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1735 * common/enum-flags.h: Add trailing semicolon to example in
1738 2018-06-05 Tom Tromey <tom@tromey.com>
1741 * NEWS: Add entry about pager.
1742 * utils.c (pagination_disabled_for_command): New global.
1743 (prompt_for_continue): Allow "c" response to prompt.
1744 (reinitialize_more_filter): Clear
1745 pagination_disabled_for_command.
1746 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1748 2018-06-04 Tom Tromey <tom@tromey.com>
1750 * ada-lang.h (ada_lookup_symbol_list): Update.
1751 * ada-lang.c (resolve_subexp): Update.
1752 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1754 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1755 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1756 results parameter to std::vector.
1757 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1759 * ada-exp.y (block_lookup): Update.
1760 (select_possible_type_sym): Change type of syms. Remove nsyms
1762 (write_var_or_type, write_name_assoc): Update.
1764 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1766 * windows-nat.c (windows_nat_target::xfer_partial): Return
1767 TARGET_XFER_E_IO if we need to delegate to the target beneath
1768 but BENEATH is NULL.
1770 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1772 * Makefile.in (config.status): Add configure.nat as a
1775 2018-06-04 Tom Tromey <tom@tromey.com>
1777 * cp-name-parser.y (cpname_state): Add method declarations.
1778 (HANDLE_QUAL): Update.
1779 (cpname_state::d_grab, cpname_state::fill_comp)
1780 (cpname_state::make_operator, cpname_state::make_dtor)
1781 (cpname_state::make_builtin_type, cpname_state::make_name)
1782 (cpname_state::d_qualify, cpname_state::d_int_type)
1783 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1784 (%union): Move earlier.
1786 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1788 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1790 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1792 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1793 (aarch64_pseudo_write_1): Likewise.
1794 (aarch64_pseudo_read_value): Use helper.
1795 (aarch64_pseudo_write): Likewise.
1797 2018-06-04 Pedro Alves <palves@redhat.com>
1799 * darwin-nat.c (darwin_ops): Delete.
1800 (darwin_attach_pid): Use get_native_target.
1802 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1804 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1805 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1807 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1809 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1810 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1811 (aarch64_gdbarch_init): Check for SVE.
1812 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1814 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1816 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1817 * aarch64-tdep.h (aarch64_read_description): Likewise.
1818 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1819 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1820 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1821 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1822 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1824 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1826 * value.c (value_fetch_lazy_bitfield): New.
1827 (value_fetch_lazy_memory): New.
1828 (value_fetch_lazy_register): New.
1829 (value_fetch_lazy): Factor out to smaller functions.
1831 2018-06-01 Tom Tromey <tom@tromey.com>
1833 * cp-name-parser.y (backslashable, represented): Now const.
1835 2018-06-01 Tom Tromey <tom@tromey.com>
1837 * cp-name-parser.y: Include parser-defs.h.
1838 (parser_fprintf): Remove declaration.
1840 2018-06-01 Tom Tromey <tom@tromey.com>
1842 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1844 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1845 (global_result): Remove globals.
1846 (struct cpname_state): New.
1847 (yyparse): Don't declare.
1848 (yylex, yyerror): Move declarations after %union.
1849 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1850 (make_name): Add state parameter.
1852 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1854 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1856 (yylex): Add lvalp, state parameters.
1857 (yyerror): Add state parameter.
1858 (cp_demangled_name_to_comp): Update.
1860 2018-06-01 Tom Tromey <tom@tromey.com>
1862 * cp-name-parser.y (parser_fprintf): Declare.
1863 (GDB_YY_REMAP_PREFIX): Define.
1864 Include yy-remap.h. Don't redefine yy* identifiers.
1866 2018-06-01 Tom Tromey <tom@tromey.com>
1868 * python/py-type.c (typy_legacy_template_argument): Update.
1869 * cp-support.h (cp_demangled_name_to_comp): Update.
1870 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1871 parameter to be a "std::string *".
1874 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1876 * ada-lex.l: Include "diagnostics.h" instead of
1877 "common/diagnostics.h".
1878 * unittests/environ-selftests.c: Likewise.
1879 * common/diagnostics.h: Moved to ../include.
1881 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1883 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1884 to language_mode_manual while calling breakpoint_re_set_one.
1886 2018-06-01 Tom Tromey <tom@tromey.com>
1888 * valops.c (value_cast_structs, destructor_name_p): Update.
1889 * symtab.c (gdb_mangle_name): Update.
1890 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1892 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1893 (pascal_object_print_value_fields, pascal_object_print_value):
1895 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1896 * linespec.c (find_methods): Update.
1897 * gdbtypes.h (type_name_no_tag): Remove.
1898 (type_name_or_error): Rename from type_name_no_tag_or_error.
1899 * gdbtypes.c (type_name_no_tag): Remove.
1900 (type_name_or_error): Rename from type_name_no_tag_or_error.
1901 (lookup_struct_elt_type, check_typedef): Update.
1902 * expprint.c (print_subexp_standard): Update.
1903 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1904 * d-namespace.c (d_lookup_nested_symbol): Update.
1905 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1906 (cp_print_class_member): Update.
1907 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1908 * completer.c (add_struct_fields): Update.
1909 * c-typeprint.c (cp_type_print_derivation_info)
1910 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1912 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1913 (ada_prefer_type, ada_is_exception_sym): Update.
1915 2018-06-01 Tom Tromey <tom@tromey.com>
1917 * valops.c (enum_constant_from_type, value_namespace_elt)
1918 (value_maybe_namespace_elt): Update.
1919 * valarith.c (find_size_for_pointer_math): Update.
1920 * target-descriptions.c (make_gdb_type): Update.
1921 * symmisc.c (print_symbol): Update.
1922 * stabsread.c (define_symbol, read_type)
1923 (complain_about_struct_wipeout, add_undefined_type)
1924 (cleanup_undefined_types_1): Update.
1925 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1926 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1927 (rust_internal_print_type, rust_composite_type)
1928 (rust_evaluate_funcall, rust_evaluate_subexp)
1929 (rust_inclusive_range_type_p): Update.
1930 * python/py-type.c (typy_get_tag): Update.
1931 * p-typeprint.c (pascal_type_print_base): Update.
1932 * mdebugread.c (parse_symbol, parse_type): Update.
1933 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1935 * guile/scm-type.c (gdbscm_type_tag): Update.
1936 * go-lang.c (sixg_string_p): Update.
1937 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1939 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1940 (TYPE_TAG_NAME): Remove.
1941 * gdbtypes.c (type_name_no_tag): Simplify.
1942 (check_typedef, check_types_equal, recursive_dump_type)
1943 (copy_type_recursive, arch_composite_type): Update.
1944 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1945 in summary mode when needed.
1946 * eval.c (evaluate_funcall): Update.
1947 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1948 (process_structure_scope, read_enumeration_type)
1949 (read_namespace_type, read_module_type, determine_prefix): Update.
1950 * cp-support.c (inspect_type): Update.
1951 * coffread.c (process_coff_symbol, decode_base_type): Update.
1952 * c-varobj.c (c_is_path_expr_parent): Update.
1953 * c-typeprint.c (c_type_print_base_struct_union): Update.
1954 (c_type_print_base_1): Update. Print struct/class/union/enum in
1955 summary when using C language.
1956 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1957 (gen_maybe_namespace_elt): Update.
1958 * ada-lang.c (ada_type_name): Simplify.
1959 (empty_record, ada_template_to_fixed_record_type_1)
1960 (template_to_static_fixed_type)
1961 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1963 2018-06-01 Tom Tromey <tom@tromey.com>
1965 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1967 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1968 (c_print_type): Update.
1969 (c_print_type): New overload.
1970 (c_type_print_varspec_prefix, c_type_print_args)
1971 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1972 (c_type_print_base_struct_union, c_type_print_base_1)
1973 (cp_type_print_method_args): Add "language" parameter.
1974 (c_type_print_base): Update.
1975 * c-lang.h (c_print_type): Add new overload.
1977 2018-06-01 Tom Tromey <tom@tromey.com>
1979 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1980 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1982 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1984 * aarch64-tdep.c (aarch64_sve_register_names): New const
1986 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1987 (AARCH64_SVE_Z_REGS_NUM): New define.
1988 (AARCH64_SVE_P_REGS_NUM): Likewise.
1989 (AARCH64_SVE_NUM_REGS): Likewise.
1991 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1993 * nat/linux-ptrace.h [__alpha__]
1994 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1997 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1999 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2000 the endianness selected.
2001 * NEWS: Document `set endian auto' mode operation update.
2003 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2005 * Makefile.in: Add new header.
2006 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2007 (sve_vl_from_vg): Likewise.
2008 (sve_vq_from_vl): Likewise.
2009 (sve_vl_from_vq): Likewise.
2010 (sve_vq_from_vg): Likewise.
2011 (sve_vg_from_vq): Likewise.
2012 * configure.nat: Add new c file.
2013 * nat/aarch64-sve-linux-ptrace.c: New file.
2014 * nat/aarch64-sve-linux-ptrace.h: New file.
2016 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2018 * aarch64-linux-nat.c (aarch64_linux_read_description):
2020 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2022 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2023 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2024 (aarch64_gdbarch_init): Add parmeter zero.
2025 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2026 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2027 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2029 * doc/gdb.texinfo: Describe SVE feature
2030 * features/aarch64-sve.c: New file.
2032 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2035 * gdbarch.sh (significant_addr_bit): Default to zero when
2036 not set by target architecture.
2037 * gdbarch.c: Re-generated.
2038 * utils.c (address_significant): Update.
2040 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2042 * stack.c (func_command): Remove trailing newline in call to error.
2044 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2046 * regcache.h (regcache_raw_collect): Remove, update callers to
2047 use regcache::raw_collect.
2048 * regcache.c (regcache_raw_collect): Remove.
2050 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2052 * regcache.h (regcache_raw_supply): Remove, update callers to
2053 use detached_regcache::raw_supply.
2054 * regcache.c (regcache_raw_supply): Remove.
2056 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2058 * regcache.h (regcache_cooked_write_part): Remove, update
2059 callers to use regcache::cooked_write_part.
2060 * regcache.c (regcache_cooked_write_part): Remove.
2062 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2064 * regcache.h (regcache_cooked_read_part): Remove, update callers
2065 to use readable_regcache::cooked_read_part.
2066 * regcache.c (regcache_cooked_read_part): Remove.
2068 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2070 * regcache.h (regcache_cooked_read_value): Remove, update
2071 callers to use readable_regcache::cooked_read_value.
2072 * regcache.c (regcache_cooked_read_value): Remove.
2074 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2076 * regcache.h (regcache_cooked_write): Remove, update callers to
2077 use regcache::cooked_write.
2078 * regcache.c (regcache_cooked_write): Remove.
2080 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2082 * regcache.h (regcache_invalidate): Remove, update callers to
2083 use detached_regcache::invalidate instead.
2084 * regcache.c (regcache_invalidate): Remove.
2086 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2088 * regcache.h (regcache_raw_write_part): Remove, update callers
2089 to use regcache::raw_write_part instead.
2090 * regcache.c (regcache_raw_write_part): Remove.
2092 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2094 * regcache.h (regcache_raw_read_part): Remove, update callers to
2095 use readable_regcache::raw_read_part instead.
2096 * regcache.c (regcache_raw_read_part): Remove.
2098 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2100 * regcache.h (regcache_cooked_read): Remove, update callers to
2101 use readable_regcache::cooked_read instead.
2102 * regcache.c (regcache_cooked_read): Remove.
2104 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2106 * regcache.h (regcache_raw_write): Remove, update callers to use
2107 regcache::raw_write instead.
2108 * regcache.c (regcache_raw_write): Remove.
2110 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2112 * regcache.h (regcache_raw_read): Remove, update callers to use
2113 readable_regcache::raw_read instead.
2114 * regcache.c (regcache_raw_read): Remove.
2116 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2118 * regcache.h (regcache_raw_update): Remove, update callers to
2119 use readable_regcache::raw_update instead.
2120 * regcache.c (regcache_raw_update): Remove.
2122 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2124 * regcache.h (regcache_register_status): Remove, update callers
2125 to use reg_buffer::get_register_status directly instead.
2126 * regcache.c (regcache_register_status): Remove.
2128 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2130 * regcache.h (regcache_get_ptid): Remove, update all callers to
2131 call regcache::ptid instead.
2132 * regcache.c (regcache_get_ptid): Remove.
2134 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2136 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2138 2018-05-30 Pedro Alves <palves@redhat.com>
2140 * common/common-exceptions.h (exception_rethrow): Use
2143 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2145 * breakpoint.c (print_solib_event, check_status_catch_solib):
2146 Remove struct keyword in range-based for loops.
2147 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2148 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2150 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2152 * symfile.c (addr_info_make_relative): Likewise.
2153 * thread.c (value_in_thread_stack_temporaries): Likewise.
2155 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2158 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2159 aggregate type to get its real type before accessing it.
2161 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2163 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2164 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2165 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2166 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2167 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2168 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2169 * printcmd.c (info_address_command): Likewise.
2171 2018-05-29 Tom Tromey <tom@tromey.com>
2173 * windows-nat.c (handle_exception): Update fall-through comment.
2175 2018-05-29 Tom Tromey <tom@tromey.com>
2177 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2178 (struct program_space) <added_solibs>: Now a std::vector.
2179 * breakpoint.c (print_solib_event): Update.
2180 (check_status_catch_solib): Update.
2181 * progspace.c (clear_program_space_solib_cache): Update.
2182 * solib.c (update_solib_list): Update.
2184 2018-05-29 Tom Tromey <tom@tromey.com>
2186 * python/py-type.c (typy_richcompare): Update.
2187 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2188 * gdbtypes.h (types_deeply_equal): Return bool.
2189 (types_equal): Likewise.
2190 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2192 (check_types_equal): Change worklist to std::vector. Return
2194 (struct type_equality_entry): Add constructor.
2195 (compare_maybe_null_strings): Return bool.
2196 (check_types_worklist): Return bool. Change worklist to
2198 (types_deeply_equal): Use std::vector.
2199 (types_equal): Return bool.
2200 (compare_maybe_null_strings): Simplify.
2202 2018-05-29 Tom Tromey <tom@tromey.com>
2204 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2206 2018-05-29 Tom Tromey <tom@tromey.com>
2208 * objc-lang.h: Don't include cp-support.h.
2209 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2212 2018-05-27 Tom Tromey <tom@tromey.com>
2214 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2216 2018-05-25 Tom Tromey <tom@tromey.com>
2218 * value.c (value::location): Initialize.
2220 2018-05-25 Tom Tromey <tom@tromey.com>
2222 * dbxread.c (init_bincl_list): Remove.
2223 (bincl_list): Now a std::vector.
2224 (bincls_allocated, next_bincl): Remove.
2225 (free_bincl_list, do_free_bincl_list_cleanup)
2226 (make_cleanup_free_bincl_list): Remove.
2227 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2229 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2230 (struct header_file_location): Add constructor.
2231 (add_bincl_to_list): Remove.
2233 2018-05-25 Tom Tromey <tom@tromey.com>
2235 * tui/tui.c (tui_enable): Update.
2236 * mi/mi-interp.c (mi_interp::init): Update.
2237 * interps.h (class interp) <name>: New method.
2238 <m_name>: Rename from name.
2239 (~scoped_restore_interp): Update.
2240 * interps.c (interp::interp): Update.
2241 (interp_add, interp_set, interp_lookup_existing)
2242 (current_interp_named_p): Update.
2244 2018-05-25 Tom Tromey <tom@tromey.com>
2246 * interps.c (interp_name): Remove.
2247 * mi/mi-interp.c (mi_interp::init): Update.
2248 * interps.h (interp_name): Remove.
2249 (~scoped_restore_interp): Update.
2250 * tui/tui.c (tui_enable): Update.
2252 2018-05-25 Tom Tromey <tom@tromey.com>
2254 * utils.c (fputs_maybe_filtered): Update.
2255 * linespec.c (decode_line_full): Update.
2256 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2257 (mi_print_breakpoint_for_event, mi_solib_loaded)
2258 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2259 (mi_user_selected_context_changed): Update.
2260 * mi/mi-main.c (mi_execute_command): Update.
2261 * cli/cli-script.c (execute_control_command): Update.
2262 * python/python.c (execute_gdb_command): Update.
2263 * solib.c (info_sharedlibrary_command): Update.
2264 * interps.c (interp_ui_out): Remove.
2265 * interps.h (interp_ui_out): Remove.
2267 2018-05-25 Tom Tromey <tom@tromey.com>
2269 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2270 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2271 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2273 2018-05-25 Tom Tromey <tom@tromey.com>
2275 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2276 * interps.c (interp_exec): Use scoped_restore.
2278 2018-05-25 Tom Tromey <tom@tromey.com>
2280 * remote.c (remote_target::remote_file_get): Use
2282 (remote_target::remote_file_put): Likewise.
2284 2018-05-25 Tom Tromey <tom@tromey.com>
2286 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2288 (get_pe_section_index, add_pe_exported_sym): Update.
2289 (read_pe_exported_syms): Use gdb::def_vector.
2291 2018-05-25 Tom Tromey <tom@tromey.com>
2293 * frame.c (remove_prev_frame): Remove.
2294 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2296 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2298 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2300 * mips-linux-nat.c (supply_fpregset): Always call
2301 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2302 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2303 `mips_fill_fpregset'.
2304 * mips-linux-tdep.c (mips_supply_fpregset)
2305 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2306 (mips_fill_fpregset_wrapper): Remove functions.
2307 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2308 (mips_linux_fpregset): Remove variable.
2309 (mips_linux_iterate_over_regset_sections): Use
2310 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2311 (mips_linux_o32_sigframe_init): Remove comment.
2313 2018-05-25 Pedro Alves <palves@redhat.com>
2315 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2316 (struct readahead_cache, struct packet_reg, struct
2317 remote_arch_state, class remote_state): Move higher up in the
2319 (remote_target::m_remote_state): Now an object instead of a pointer.
2320 (remote_target::get_remote_state): Adjust.
2322 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2324 * stack.c (select_and_print_frame): Delete.
2325 (struct function_bounds): Move struct within function.
2326 (func_command): Most content moved into new function
2327 find_frame_for_function, use new function, print result, add
2329 (find_frame_for_function): New function, now returns a result.
2331 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2333 * stack.c (iterate_over_block_arg_vars): Fix comment.
2334 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2336 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2340 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2342 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2344 * frame.h (class scoped_restore_selected_frame): New class.
2345 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2346 of any exception, use scoped_restore_selected_frame to restore the
2349 2018-05-24 Pedro Alves <palves@redhat.com>
2351 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2354 2018-05-23 Tom Tromey <tom@tromey.com>
2356 * complaints.c (struct complaints): Remove.
2357 (symfile_complaint_book): Remove.
2358 (series): New global.
2359 (complaint_internal): Update.
2360 (clear_complaints): Update.
2362 2018-05-23 Tom Tromey <tom@tromey.com>
2364 * complaints.c (counters): New global.
2365 (struct complain): Remove.
2366 (struct complaints) <root>: Remove.
2367 (complaint_sentinel): Remove.
2368 (symfile_complaint_book): Update.
2369 (find_complaint) Remove.
2370 (complaint_internal, clear_complaints): Update.
2372 2018-05-23 Tom Tromey <tom@tromey.com>
2374 * complaints.c (struct complain) <file, line>: Remove.
2375 (find_complaint): Remove file, line parameters.
2376 (complaint_internal): Update.
2378 2018-05-23 Tom Tromey <tom@tromey.com>
2380 * complaints.c (vcomplaint): Remove.
2381 (complaint_internal) Merge in contents of vcomplaint.
2383 2018-05-23 Tom Tromey <tom@tromey.com>
2385 * complaints.c (struct complaints) <explanation>: Remove.
2386 (symfile_explanations): Remove.
2387 (symfile_complaint_book): Update.
2388 (vcomplaint): Update.
2389 (struct explanation): Remove.
2391 2018-05-23 Tom Tromey <tom@tromey.com>
2393 * complaints.c (symfile_complaints): Remove.
2394 (complaint_internal): Remove "complaints" parameter.
2395 (clear_complaints, vcomplaint): Remove "c" parameter.
2396 (get_complaints): Remove.
2397 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2398 (dwarf2_debug_line_missing_file_complaint)
2399 (dwarf2_debug_line_missing_end_sequence_complaint)
2400 (dwarf2_complex_location_expr_complaint)
2401 (dwarf2_const_value_length_mismatch_complaint)
2402 (dwarf2_section_buffer_overflow_complaint)
2403 (dwarf2_macro_malformed_definition_complaint)
2404 (dwarf2_invalid_attrib_class_complaint)
2405 (create_addrmap_from_index, dw2_symtab_iter_next)
2406 (dw2_expand_marked_cus)
2407 (dw2_debug_names_iterator::find_vec_in_debug_names)
2408 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2409 (create_debug_type_hash_table, init_cutu_and_read_dies)
2410 (partial_die_parent_scope, add_partial_enumeration)
2411 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2412 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2413 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2414 (create_cus_hash_table, create_dwp_hash_table)
2415 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2416 (dwarf2_rnglists_process, dwarf2_ranges_process)
2417 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2418 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2419 (handle_struct_member_die, process_structure_scope)
2420 (read_array_type, read_common_block, read_module_type)
2421 (read_tag_pointer_type, read_typedef, read_base_type)
2422 (read_subrange_type, load_partial_dies, partial_die_info::read)
2423 (partial_die_info::read, partial_die_info::read)
2424 (partial_die_info::read, read_checked_initial_length_and_offset)
2425 (dwarf2_string_attr, read_formatted_entries)
2426 (dwarf_decode_line_header)
2427 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2428 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2429 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2430 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2431 (get_signatured_type, get_DW_AT_signature_type)
2432 (decode_locdesc, file_file_name, consume_improper_spaces)
2433 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2434 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2435 (dwarf2_symbol_mark_computed, set_die_type)
2436 (read_attribute_value): Update.
2437 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2439 * dbxread.c (unknown_symtype_complaint)
2440 (lbrac_mismatch_complaint, repeated_header_complaint)
2441 (set_namestring, function_outside_compilation_unit_complaint)
2442 (read_dbx_symtab, process_one_symbol): Update.
2443 * gdbtypes.c (stub_noname_complaint): Update.
2444 * windows-nat.c (handle_unload_dll): Update.
2445 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2446 (decode_base_type): Update.
2447 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2448 (eb_complaint, record_include_begin, record_include_end)
2449 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2450 (process_xcoff_symbol, read_symbol)
2451 (function_outside_compilation_unit_complaint)
2452 (scan_xcoff_symtab): Update.
2453 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2454 * buildsym.c (finish_block_internal, make_blockvector)
2455 (end_symtab_get_static_block, augment_type_symtab): Update.
2456 * dtrace-probe.c (dtrace_process_dof)
2457 (dtrace_static_probe_ops::get_probes): Update.
2458 * complaints.h (struct complaint): Don't declare.
2459 (symfile_complaints): Remove.
2460 (complaint_internal): Remove "complaints" parameter.
2461 (complaint): Likewise.
2462 (clear_complaints): Likewise.
2463 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2464 (reread_symbols): Update.
2465 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2466 (dwarf2_frame_cache, decode_frame_entry): Update.
2467 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2468 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2469 (info_selectors_command): Update.
2470 * macrotab.c (macro_include, check_for_redefinition)
2471 (macro_undef): Update.
2472 * objfiles.c (filter_overlapping_sections): Update.
2473 * stabsread.c (invalid_cpp_abbrev_complaint)
2474 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2475 (define_symbol, error_type, read_type, rs6000_builtin_type)
2476 (stabs_method_name_from_physname, read_member_functions)
2477 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2478 (attach_fields_to_type, complain_about_struct_wipeout)
2479 (read_range_type, read_args, common_block_start)
2480 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2482 * mdebugread.c (index_complaint, unknown_ext_complaint)
2483 (basic_type_complaint, bad_tag_guess_complaint)
2484 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2485 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2486 (parse_procedure, parse_lines)
2487 (function_outside_compilation_unit_complaint)
2488 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2489 (bad_tag_guess_complaint, reg_value_complaint): Update.
2490 * cp-support.c (demangled_name_complaint): Update.
2491 * macroscope.c (sal_macro_scope): Update.
2492 * dwarf-index-write.c (class debug_names): Update.
2494 2018-05-23 Tom Tromey <tom@tromey.com>
2496 * complaints.c (clear_complaints): Remove "noisy" parameter.
2497 * complaints.h (clear_complaints): Update.
2498 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2499 (reread_symbols): Update.
2501 2018-05-23 Tom Tromey <tom@tromey.com>
2503 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2505 (vcomplaint, clear_complaints): Update.
2506 (symfile_explanations): Remove some messages.
2508 2018-05-23 Tom Tromey <tom@tromey.com>
2510 * complaints.c (internal_complaint): Remove.
2511 * complaints.h (internal_complaint): Remove.
2513 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2515 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2517 2018-05-22 Pedro Alves <palves@redhat.com>
2519 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2520 (remote_fileio_badfd, remote_fileio_return_errno)
2521 (remote_fileio_return_success, remote_fileio_func_open)
2522 (remote_fileio_func_open, remote_fileio_func_close)
2523 (remote_fileio_func_read, remote_fileio_func_write)
2524 (remote_fileio_func_lseek, remote_fileio_func_rename)
2525 (remote_fileio_func_unlink, remote_fileio_func_stat)
2526 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2527 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2528 remote_target parameter.
2529 (remote_fio_func_map) <func>: Add remote_target parameter.
2530 (do_remote_fileio_request, remote_fileio_request):
2531 * remote-fileio.h (remote_fileio_request):
2532 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2533 remote_target parameter.
2534 (remote_notif_process, handle_notification): Adjust to pass down
2536 (remote_notif_state_allocate): Add remote_target parameter. Save
2538 * remote-notif.h (struct remote_target): Forward declare.
2539 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2540 remote_target parameter.
2541 (struct remote_notif_state) <remote>: New field.
2542 (remote_notif_ack, remote_notif_parse): Add remote_target
2544 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2545 remote_target parameter.
2546 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2547 (threads_listing_context, rmt_thread_action, protocol_feature)
2548 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2549 (packet_result, struct threads_listing_context, remote_state):
2550 Move definitions and declarations higher up.
2551 (remote_target) <~remote_target>: Declare.
2552 (remote_download_command_source, remote_file_put, remote_file_get)
2553 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2554 (remote_hostio_pread_vFile, remote_hostio_send_command)
2555 (remote_hostio_set_filesystem, remote_hostio_open)
2556 (remote_hostio_close, remote_hostio_unlink, remote_state)
2557 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2558 (get_memory_write_packet_size, get_memory_read_packet_size)
2559 (append_pending_thread_resumptions, remote_detach_1)
2560 (append_resumption, remote_resume_with_vcont)
2561 (add_current_inferior_and_thread, wait_ns, wait_as)
2562 (process_stop_reply, remote_notice_new_inferior)
2563 (process_initial_stop_replies, remote_add_thread)
2564 (btrace_sync_conf, remote_btrace_maybe_reopen)
2565 (remove_new_fork_children, kill_new_fork_children)
2566 (discard_pending_stop_replies, stop_reply_queue_length)
2567 (check_pending_events_prevent_wildcard_vcont)
2568 (discard_pending_stop_replies_in_queue, stop_reply)
2569 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2570 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2571 (remote_interrupt_as, remote_interrupt_ns)
2572 (remote_get_noisy_reply, remote_query_attached)
2573 (remote_add_inferior, remote_current_thread, get_current_thread)
2574 (set_thread, set_general_thread, set_continue_thread)
2575 (set_general_process, write_ptid)
2576 (remote_unpack_thread_info_response, remote_get_threadinfo)
2577 (parse_threadlist_response, remote_get_threadlist)
2578 (remote_threadlist_iterator, remote_get_threads_with_ql)
2579 (remote_get_threads_with_qxfer)
2580 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2581 (get_offsets, remote_check_symbols, remote_supported_packet)
2582 (remote_query_supported, remote_packet_size)
2583 (remote_serial_quit_handler, remote_detach_pid)
2584 (remote_vcont_probe, remote_resume_with_hc)
2585 (send_interrupt_sequence, interrupt_query)
2586 (remote_notif_get_pending_events, fetch_register_using_p)
2587 (send_g_packet, process_g_packet, fetch_registers_using_g)
2588 (store_register_using_P, store_registers_using_G)
2589 (set_remote_traceframe, check_binary_download)
2590 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2591 (remote_xfer_live_readonly_partial, remote_read_bytes)
2592 (remote_send_printf, remote_flash_write, readchar)
2593 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2594 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2595 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2596 (extended_remote_disable_randomization, extended_remote_run)
2597 (send_environment_packet, extended_remote_environment_support)
2598 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2599 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2600 (packet_command): Now methods of ...
2601 (remote_target): ... this class.
2602 (m_remote_state) <remote_target>: New field.
2603 (struct remote_state) <stop_reply_queue,
2604 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2606 (remote_state::remote_state): Allocate stop_reply_queue.
2607 (remote_state): Delete global.
2608 (get_remote_state_raw): Delete.
2609 (remote_target::get_remote_state): Allocate m_remote_state on
2611 (get_current_remote_target): New.
2612 (remote_ops, extended_remote_ops): Delete.
2613 (wait_forever_enabled_p, remote_async_inferior_event_token):
2614 Delete, moved to struct remote_state.
2615 (remote_target::close): Delete self. Destruction bits split to
2617 (remote_target::~remote_target): ... this.
2618 (show_memory_packet_size): Adjust to use
2619 get_current_remote_target.
2620 (struct protocol_feature) <func>: Add remote_target parameter.
2621 All callers adjusted.
2622 (curr_quit_handler_target): New.
2623 (remote_serial_quit_handler): Reimplement.
2624 (remote_target::open_1): Adjust to use get_current_remote_target.
2625 Heap-allocate remote_target/extended_remote_target instances.
2626 (vcont_builder::vcont_builder): Add remote_target parameter, and
2627 save it in m_remote. All callers adjusted.
2628 (vcont_builder::m_remote): New field.
2629 (vcont_builder::restart, vcont_builder::flush)
2630 (vcont_builder::push_action): Use it.
2631 (remote_target::commit_resume): Use it.
2632 (struct queue_iter_param) <remote>: New field.
2633 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2634 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2635 (check_pending_event_prevents_wildcard_vcont_callback)
2636 (remote_target::check_pending_events_prevent_wildcard_vcont)
2637 (remote_target::discard_pending_stop_replies)
2638 (remote_target::discard_pending_stop_replies_in_queue)
2639 (remote_target::remote_notif_remove_queued_reply): Fill in
2641 (remote_notif_get_pending_events): New.
2642 (remote_target::readchar, remote_target::remote_serial_write):
2643 Save/restore curr_quit_handler_target.
2645 (kill_new_fork_children): Fill in 'remote' field.
2646 (packet_command): Use get_current_remote_target, defer to
2647 remote_target method of same name.
2648 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2649 parameter, and save it in m_remote. All callers adjusted.
2650 (scoped_remote_fd::release): Use m_remote.
2651 (scoped_remote_fd::m_remote): New field.
2652 (remote_file_put, remote_file_get, remote_file_delete): Use
2653 get_current_remote_target, defer to remote_target method of same
2655 (remote_btrace_reset): Add remote_state paremeter. Update all
2657 (remote_async_inferior_event_handler). Pass down 'data'.
2658 (remote_new_objfile): Use get_current_remote_target.
2659 (remote_target::vcont_r_supported): New.
2660 (set_range_stepping): Use get_current_remote_target and
2661 remote_target::vcont_r_supported.
2662 (_initialize_remote): Don't allocate 'remote_state' and
2663 'stop_reply_queue' globals.
2664 * remote.h (struct remote_target): Forward declare.
2665 (getpkt, putpkt, remote_notif_get_pending_events): Add
2666 'remote_target' parameter.
2668 2018-05-22 Pedro Alves <palves@redhat.com>
2670 * remote.c (vcont_builder): Now a class. Make all data members
2672 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2674 (vcont_builder_restart): Rename to ...
2675 (vcont_builder::restart): ... this.
2676 (vcont_builder_flush): Rename to ...
2677 (vcont_builder::flush): ... this.
2678 (vcont_builder_push_action): Rename to ...
2679 (vcont_builder::push_action): ... this.
2680 (remote_target::commit_resume): Adjust.
2682 2018-05-22 Pedro Alves <palves@redhat.com>
2684 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2685 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2686 (get_fixed_memory_packet_size): New.
2687 (get_memory_packet_size): Use it.
2688 (set_memory_packet_size): Don't override the config size with
2689 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2690 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2691 Don't refer to get_memory_packet_size if not connected to a remote
2692 target. Show "(default)" if configured size is 0.
2694 2018-05-22 Pedro Alves <palves@redhat.com>
2696 * remote.c (remote_target::mourn_inferior): Move
2697 discard_pending_stop_replies call here from ...
2698 (_initialize_remote): ... here.
2700 2018-05-22 Pedro Alves <palves@redhat.com>
2702 * remote.c (compare_section_command): Remove set_general_process
2705 2018-05-22 Pedro Alves <palves@redhat.com>
2707 * remote.c (struct packet_reg, struct remote_arch_state):
2708 Move higher up in the file.
2709 (remote_state) <m_arch_states>: Store remote_arch_state values
2710 instead of remote_arch_state pointers.
2711 (remote_state::get_remote_arch_state): Adjust.
2713 2018-05-22 Pedro Alves <palves@redhat.com>
2715 * remote.c: Include <unordered_map>.
2716 (remote_state): Now a class.
2717 (remote_state) <get_remote_arch_state>: Declare method.
2718 <get_remote_arch_state>: New field.
2719 (remote_arch_state) <remote_arch_state>: Declare ctor.
2720 <regs>: Now a unique_ptr.
2721 (remote_gdbarch_data_handle): Delete.
2722 (get_remote_arch_state): Delete.
2723 (remote_state::get_remote_arch_state): New.
2724 (get_remote_state): Adjust to call remote_state's
2725 get_remote_arch_state method.
2726 (init_remote_state): Delete, bits factored out to ...
2727 (remote_arch_state::remote_arch_state): ... this new method.
2728 (get_remote_packet_size, get_memory_packet_size)
2729 (process_g_packet, remote_target::fetch_registers)
2730 (remote_target::prepare_to_store, store_registers_using_G)
2731 (remote_target::store_registers, remote_target::get_trace_status):
2732 Adjust to call remote_state's method.
2733 (_initialize_remote): Remove reference to
2734 remote_gdbarch_data_handle.
2736 2018-05-22 Pedro Alves <palves@redhat.com>
2738 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2739 pread>: New method declarations.
2740 (remote_target::open_1): Adjust.
2741 (readahead_cache_invalidate): Rename to ...
2742 (readahead_cache::invalidate): ... this, and adjust to be a class
2744 (readahead_cache_invalidate_fd): Rename to ...
2745 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2747 (remote_hostio_pwrite): Adjust.
2748 (remote_hostio_pread_from_cache): Rename to ...
2749 (readahead_cache::pread): ... this, and adjust to be a class
2751 (remote_hostio_close): Adjust.
2753 2018-05-22 Pedro Alves <palves@redhat.com>
2755 * remote.c (remote_hostio_close_cleanup): Delete.
2756 (class scoped_remote_fd): New.
2757 (remote_file_put, remote_file_get): Use it.
2759 2018-05-22 Pedro Alves <palves@redhat.com>
2761 (struct vCont_action_support): Use bool and initialize all fields.
2762 (struct readahead_cache): Initialize all fields.
2763 (remote_state): Use bool and initialize all fields.
2764 (remote_state::remote_state, remote_state::~remote_state): New.
2765 (new_remote_state): Delete.
2766 (_initialize_remote): Use new to allocate remote_state.
2768 2018-05-22 Pedro Alves <palves@redhat.com>
2772 * c-exp.y: Include "c-support.h".
2773 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2774 of tolower. Use c_ident_is_alpha to scan names.
2775 * c-lang.c: Include "c-support.h".
2776 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2777 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2778 * c-support.h: New file, with bits factored out from ...
2779 * cp-name-parser.y: ... this file.
2780 Include "c-support.h".
2781 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2782 c-support.h and renamed.
2783 (symbol_end, yylex): Adjust.
2785 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2787 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2788 parameter type to CORE_ADDR.
2789 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2790 parameter type in declaration to CORE_ADDR.
2791 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2792 target_auxv_search to get AT_HWCAP and use the result to get the
2794 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2795 to CORE_ADDR. Remove the cast of the return value to unsigned
2796 long. Fix error predicate of target_auxv_search.
2797 (ppc_linux_nat_target::read_description): Change the type of the
2798 hwcap variable to CORE_ADDR.
2800 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2802 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2803 if the size of fpscr is larger than 32 bits.
2805 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2807 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2808 (ppc32_linux_vsxregmap): New global.
2809 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2810 regcache_supply_regset, and regcache_collect_regset.
2811 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2812 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2813 (fetch_vsx_register, store_vsx_register): Remove.
2814 (fetch_vsx_registers): Add regno parameter. Get regset using
2815 ppc_linux_vsxregset. Use regset to supply registers.
2816 (store_vsx_registers): Add regno parameter. Get regset using
2817 ppc_linux_vsxregset. Use regset to collect registers.
2818 (fetch_register): Call fetch_vsx_registers instead of
2820 (store_register): Call store_vsx_registers instead of
2822 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2823 new regno parameter.
2824 (store_ppc_registers): Call store_vsx_registers with -1 for the
2825 new regno parameter.
2826 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2827 (ppc_collect_vsxregset): Remove.
2829 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2831 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2833 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2834 for vector register offset fields.
2835 (ppc64_fbsd_reg_offsets): Likewise.
2836 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2837 to vector register offset fields.
2838 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2839 to vector register offset fields.
2840 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2841 vector register offset fields.
2842 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2843 initializers for vector register offset fields.
2844 (rs6000_aix64_reg_offsets): Likewise.
2845 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2846 (ppc_supply_vrregset): Remove.
2847 (ppc_collect_vrregset): Remove.
2848 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2849 (ppc_linux_vrregset) : New function.
2850 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2851 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2852 (ppc32_linux_vrregset): Remove.
2853 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2854 and use result instead of ppc32_linux_vrregset.
2855 (ppc32_linux_reg_offsets): Remove initializers for vector register
2857 (ppc64_linux_reg_offsets): Likewise.
2858 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2859 * ppc-linux-nat.c: Include regset.h.
2860 (gdb_vrregset_t): Adjust comment to account for little-endian
2862 (supply_vrregset, fill_vrregset): Remove.
2863 (fetch_altivec_register, store_altivec_register): Remove.
2864 (fetch_altivec_registers): Add regno parameter. Get regset using
2865 ppc_linux_vrregset. Use regset to supply registers.
2866 (store_altivec_registers): Add regno parameter. Get regset using
2867 ppc_linux_vrregset. Use regset to collect registers.
2868 (fetch_register): Call fetch_altivec_registers instead of
2869 fetch_altivec_register.
2870 (store_register): Call store_altivec_registers instead of
2871 store_altivec_register.
2872 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2873 the new regno parameter.
2874 (store_ppc_registers): Call store_altivec_registers with -1 for
2875 the new regno parameter.
2877 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2879 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2880 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2881 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2882 (gdb_vrregset_t): Change array type size to
2883 PPC_LINUX_SIZEOF_VRREGSET.
2884 (gdb_vsxregset_t): Change array type size to
2885 PPC_LINUX_SIZEOF_VSXREGSET.
2886 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2887 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2888 PPC_LINUX_SIZEOF_VSXREGSET.
2890 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2892 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2893 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2895 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2896 ppc_linux_target_wordsize with tid.
2897 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2899 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2900 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2901 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2902 tid parameter. Remove static specifier.
2903 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2904 (ppc_linux_target_wordsize): New declaration.
2906 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2908 * arch/ppc-linux-common.c: New file.
2909 * arch/ppc-linux-common.h: New file.
2910 * arch/ppc-linux-tdesc.h: New file.
2911 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2912 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2913 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2914 arch/ppc-linux-tdesc.h.
2915 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2916 arch/ppc-linux-tdesc.h.
2917 (ppc_linux_nat_target::read_description): Remove target
2918 description matching code. Fill a ppc_linux_features struct and
2919 call ppc_linux_match_description with it. Move comment about ISA
2920 2.05 to ppc-linux-common.c.
2921 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2922 arch/ppc-linux-tdesc.h.
2923 (ppc_linux_core_read_description): Remove target description
2924 matching code. Fill a ppc_linux_features struct and call
2925 ppc_linux_match_description with it.
2926 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2927 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2928 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2929 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2930 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2931 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2932 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2933 (tdesc_powerpc_e500l): Remove.
2935 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2937 * ada-lang.c (catch_assert_command): Pass empty string instead
2938 of NULL for excep_string argument.
2940 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2942 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2943 the width of the requested register exceeds the width of the
2946 2018-05-21 Tom Tromey <tom@tromey.com>
2948 * printcmd.c (output_command): Remove.
2949 (output_command_const): Rename to output_command.
2950 * valprint.h (output_command): Rename from output_command_const.
2951 * tracepoint.c (trace_dump_actions): Call output_command.
2953 2018-05-21 Tom Tromey <tom@tromey.com>
2955 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2956 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2957 * ada-lang.h (create_ada_exception_catchpoint): Update.
2958 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2960 (create_excep_cond_exprs, ~ada_catchpoint)
2961 (should_stop_exception, print_one_exception)
2962 (print_mention_exception, print_recreate_exception): Update.
2963 (ada_get_next_arg): Remove.
2964 (catch_ada_exception_command_split): Use std::string. Change type
2965 of "excep_string", "cond_string".
2966 (catch_ada_exception_command): Update.
2967 (create_ada_exception_catchpoint): Change type of excep_string.
2968 (ada_exception_sal): Remove excep_string parameter.
2969 (~ada_catchpoint): Remove.
2971 2018-05-21 Tom Tromey <tom@tromey.com>
2973 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2976 2018-05-21 Tom Tromey <tom@tromey.com>
2978 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2979 Return unique_xmalloc_ptr.
2980 (print_it_exception): Update.
2982 2018-05-21 Tom Tromey <tom@tromey.com>
2984 * tracepoint.c (trace_dump_actions): Use std::string.
2986 2018-05-21 Tom Tromey <tom@tromey.com>
2988 * symfile.c (reread_symbols): Use std::string for original_name.
2990 2018-05-21 Tom Tromey <tom@tromey.com>
2992 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2993 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2996 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2998 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3000 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3001 * objfiles.c (get_objfile_bfd_data): Allocate
3002 objfile_per_bfd_storage with obstack_new when allocating on
3005 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3007 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3009 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3010 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3011 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3012 (add_pending): Likewise.
3013 (parse_symbol): Likewise.
3014 (parse_partial_symbols): Likewise.
3015 (psymtab_to_symtab_1): Likewise.
3016 (new_psymtab): Likewise.
3017 (elfmdebug_build_psymtabs): Likewise.
3018 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3019 * objfiles.c (get_objfile_bfd_data): Likewise.
3020 (objfile_register_static_link): Likewise.
3021 * psymtab.c (allocate_psymtab): Likewise.
3022 * stabsread.c (read_member_functions): Likewise.
3023 * xcoffread.c (xcoff_end_psymtab): Likewise.
3025 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3027 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3028 compiler supports std::is_trivially_constructible.
3029 * common/poison.h: Include obstack.h.
3030 (IsMallocable): Define to is_trivially_constructible if the
3031 compiler supports it, define to true_type otherwise.
3035 (XOBNEWVEC): Redefine.
3036 * gdb_obstack.h (obstack_zalloc): New.
3037 (OBSTACK_ZALLOC): Redefine.
3038 (obstack_calloc): New.
3039 (OBSTACK_CALLOC): Redefine.
3041 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3042 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3044 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3045 obstack_calloc/obstack_zalloc.
3046 (gdbarch_obstack_zalloc): Remove.
3047 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3049 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3051 * stack.c (backtrace_command_1): Remove useless variable int i.
3053 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3055 * stack.c (print_frame_info): Fix comment.
3057 2018-05-18 Tom Tromey <tom@tromey.com>
3059 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3060 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3061 (~dwarf2_per_objfile): Update
3062 (dwarf2_get_dwz_file): Use new.
3063 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3066 2018-05-18 Tom Tromey <tom@tromey.com>
3068 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3070 * dwarf2read.c (struct dwp_file): Add constructor and
3072 (open_and_init_dwp_file): Return a unique_ptr.
3073 (dwarf2_per_objfile, create_dwp_hash_table)
3074 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3075 (lookup_dwo_unit_in_dwp): Update.
3076 (open_and_init_dwp_file, get_dwp_file): Update.
3078 2018-05-18 Tom Tromey <tom@tromey.com>
3080 * dwarf2read.c (dwarf2_per_objfile): Update.
3081 (struct mapped_index): Add initializers.
3082 (dwarf2_read_index): Use new.
3083 (dw2_symtab_iter_init): Update.
3084 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3087 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3089 * dwarf2read.c (mapped_index) <total_size>: Remove.
3091 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3093 * unittests/format_pieces-selftests.c (test_format_specifier):
3096 2018-05-18 Tom Tromey <tom@tromey.com>
3098 * c-typeprint.c (maybe_print_hole): New function.
3099 (c_print_type_struct_field_offset): Update.
3100 (c_type_print_base_struct_union): Call maybe_print_hole.
3102 2018-05-17 Keith Seitz <keiths@redhat.com>
3104 * breakpoint.c (build_bpstat_chain): New function, moved from
3106 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3107 If no stop chain is passed, call build_bpstat_chain to build it.
3108 * breakpoint.h (build_bpstat_chain): Declare.
3109 (bpstat_stop_status): Move documentation here from breakpoint.c.
3110 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3111 build the stop chain and pass it to skip_inline_frames.
3112 Pass this stop chain to bpstat_stop_status.
3113 * inline-frame.c: Include breakpoint.h.
3114 (stopped_by_user_bp_inline_frame): New function.
3115 (skip_inline_frames): Add parameter `stop_chain'.
3116 Move documention to inline-frame.h.
3117 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3118 whether the frame should be elided.
3119 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3120 Add moved documentation and update for new parameter.
3122 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3125 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3126 unittests/format_pieces-selftests.c.
3127 * common/format.h (format_piece) <operator==>: New.
3128 (format_pieces) <operator[]>: Remove.
3129 * common/format.c (format_pieces::format_pieces): Handle \e.
3130 * unittests/format_pieces-selftests.c: New.
3132 2018-05-17 Tom Tromey <tom@tromey.com>
3135 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3136 (dw2_instantiate_symtab): Add skip_partial parameter.
3137 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3138 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3139 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3140 (dw2_expand_symtabs_matching_one)
3141 (dw2_find_pc_sect_compunit_symtab)
3142 (dw2_debug_names_lookup_symbol)
3143 (dw2_debug_names_expand_symtabs_for_function): Update.
3144 (init_cutu_and_read_dies): Add skip_partial parameter.
3145 (process_psymtab_comp_unit, build_type_psymtabs_1)
3146 (process_skeletonless_type_unit, load_partial_comp_unit)
3147 (psymtab_to_symtab_1): Update.
3148 (load_full_comp_unit): Add skip_partial parameter.
3149 (process_imported_unit_die, dwarf2_read_addr_index)
3150 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3151 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3152 (read_signatured_type): Update.
3154 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3156 * value.c (release_value): Remove unused variable.
3157 (record_latest_value): Likewise.
3158 (access_value_history): Likewise.
3159 (preserve_values): Likewise.
3161 2018-05-17 Tom Tromey <tom@tromey.com>
3163 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3166 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3169 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3170 Also handle registers whose width is not a multiple of
3172 (linux_nat_trad_target::store_register): Likewise.
3174 2018-05-16 Tom Tromey <tom@tromey.com>
3176 * gdbcore.h (core_bfd): Redefine.
3177 * corelow.c (core_target::close): Update.
3178 (core_target_open): Update.
3179 * progspace.h (struct program_space) <cbfd>: Now a
3182 2018-05-16 Tom Tromey <tom@tromey.com>
3185 * symfile-add-flags.h (enum symfile_add_flags)
3186 <SYMFILE_NOT_FILENAME>: New constant.
3187 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3188 objfile name from BFD.
3189 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3190 * minidebug.c (find_separate_debug_file_in_section): Put
3191 ".gnu_debugdata" into BFD's file name.
3193 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3195 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3198 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3201 * aarch64-tdep.c (aarch64_analyze_prologue,
3202 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3203 Indicate not interested in errors.
3205 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3207 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3208 Supply the MIPS_ZERO_REGNUM register.
3210 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3212 * mips-tdep.c (mask_address_var): Make variable static.
3214 2018-05-14 Tom Tromey <tom@tromey.com>
3216 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3218 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3220 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3221 FXSAVE_ADDR for the mxcsr register.
3223 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3225 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3227 2018-05-11 Pedro Alves <palves@redhat.com>
3229 * corelow.c (core_target) <core_target>: No longer inline.
3230 Initialize m_core_gdbarch, m_core_vec and build the section table
3232 <~core_target>: New.
3233 <core_gdbarch, get_core_register_section>: New methods.
3234 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3235 factored out from ...
3236 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3238 (sniff_core_bfd): Add gdbarch parameter.
3239 (core_close): Delete, merged into ...
3240 (core_target::close): ... here. Delete self.
3241 (core_close_cleanup): Delete.
3242 (core_target_open): Allocate a core_target on the heap. Use a
3243 unique_ptr instead of a cleanup. Bits moved into the core_target
3244 ctor. Adjust to use core_target methods instead of globals.
3245 (get_core_register_section): Rename to ...
3246 (core_target::get_core_register_section): ... this and adjust.
3247 (struct get_core_registers_cb_data): New.
3248 (get_core_registers_cb): Use it. Use bool.
3249 (core_target::fetch_registers, core_target::files_info)
3250 (core_target::xfer_partial, core_target::read_description)
3251 (core_target::pid_to, core_target::thread_name): Adjust to
3252 reference class fields instead of globals.
3253 * target.h (struct target_ops_deleter, target_ops_up): New.
3255 2018-05-11 Pedro Alves <palves@redhat.com>
3257 * corefile.c (core_file_command): Move to corelow.c.
3258 * corelow.c (the_core_target): Delete.
3259 (core_file_command): Moved from corefile.c. Check exec_bfd
3260 instead of the_core_target. Use target_detach instead of calling
3261 into the_core_target directly.
3262 (maybe_say_no_core_file_now): New.
3263 (core_target::detach): Use it.
3264 (_initialize_corelow): Remove references to the_core_target.
3265 * gdbcore.h (the_core_target): Delete.
3267 2018-05-11 Tom Tromey <tromey@redhat.com>
3268 Pedro Alves <palves@redhat.com>
3270 * corefile.c (core_bfd): Remove.
3271 * gdbcore.h (core_bfd): Now a macro.
3272 * progspace.h (struct program_space) <cbfd>: New field.
3274 2018-05-11 Tom Tromey <tom@tromey.com>
3276 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3279 2018-05-10 Tom Tromey <tom@tromey.com>
3281 * configure: Rebuild.
3282 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3284 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3287 * regformats/regdat.sh: Adjust script, following the addition
3288 of the new expedite_regs parameter to init_target_desc.
3290 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3293 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3294 set_gdbarch_significant_addr_bit.
3295 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3296 set_gdbarch_significant_addr_bit.
3297 * utils.c (address_significant): Update to sign extend addr.
3299 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3301 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3302 (xtensa_linux_init_abi): Limit tdep->num_regs by
3303 tdep->num_nopriv_regs.
3304 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3305 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3308 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3310 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3312 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3314 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3315 (I387_MXCSR_INIT_VAL): New constant.
3316 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3317 buffer if it was supplied by the inferior.
3318 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3319 (i387_xsave_get_clear_bv): New function.
3320 (i387_supply_xsave): Only read x87 control registers from the
3321 xsave buffer if the feature is enabled, and the state will have
3322 been written, otherwise, provide a suitable default.
3323 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3324 including x87 control registers. Update control registers if they
3325 have changed from the default value, and mark features as enabled
3327 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3329 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3331 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3333 2018-05-07 Tom Tromey <tom@tromey.com>
3335 * configure: Rebuild.
3336 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3338 2018-05-07 Tom Tromey <tom@tromey.com>
3341 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3342 bit. Use correct value for VDIV.
3344 2018-05-04 Tom Tromey <tom@tromey.com>
3346 * configure: Rebuild.
3347 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3349 2018-05-04 Tom Tromey <tom@tromey.com>
3351 * linux-record.c (record_linux_system_call) <case
3352 RECORD_SYS_RECVFROM>: Add "break".
3354 2018-05-04 Tom Tromey <tom@tromey.com>
3356 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3357 Add missing "break".
3358 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3359 Add missing "break".
3361 2018-05-04 Tom Tromey <tom@tromey.com>
3363 * rs6000-tdep.c (ppc_process_record_op4)
3364 (ppc_process_record_op63): Add fall-through comment.
3366 2018-05-04 Tom Tromey <tom@tromey.com>
3368 * i386-tdep.c (i386_process_record): Add fall-through comment.
3370 2018-05-04 Tom Tromey <tom@tromey.com>
3372 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3375 2018-05-04 Tom Tromey <tom@tromey.com>
3377 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3378 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3379 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3381 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3383 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3386 2018-05-04 Tom Tromey <tom@tromey.com>
3388 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3390 2018-05-04 Tom Tromey <tom@tromey.com>
3392 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3393 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3394 * symfile.c (section_is_mapped): Fix fall-through comment.
3395 * stabsread.c (define_symbol, read_member_functions): Fix
3396 fall-through comment.
3397 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3399 * remote.c (remote_wait_as): Fix fall-through comment.
3400 * p-exp.y (yylex): Fix fall-through comment.
3401 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3403 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3404 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3405 * jv-exp.y (yylex): Fix fall-through comment.
3406 * go-exp.y (lex_one_token): Fix fall-through comment.
3407 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3408 fall-through comment.
3409 * f-exp.y (yylex): Fix fall-through comment.
3410 * dwarf2read.c (process_die): Fix fall-through comments.
3411 * dbxread.c (process_one_symbol): Fix fall-through comment.
3412 * d-exp.y (lex_one_token): Fix fall-through comment.
3413 * cp-name-parser.y (yylex): Fix fall-through comment.
3414 * coffread.c (coff_symtab_read): Fix fall-through comment.
3415 * c-exp.y (lex_one_token): Fix fall-through comment.
3416 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3418 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3421 2018-05-04 Tom Tromey <tom@tromey.com>
3424 * NEWS: Mention gdb.execute change.
3425 * gdbcmd.h (execute_control_command): Don't declare.
3426 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3427 execute_control_commands, execute_control_commands_to_string.
3428 * cli/cli-script.h (execute_control_commands)
3429 (execute_control_commands_to_string): Declare.
3430 (execute_control_command): Add from_tty parameter.
3431 * cli/cli-script.c (execute_control_commands)
3432 (execute_control_commands_to_string): New functions.
3433 (execute_user_command): Use execute_control_commands.
3434 (execute_control_command_1): Add "from_tty" parameter. Update.
3435 (execute_control_command): Likewise.
3437 2018-05-04 Tom Tromey <tom@tromey.com>
3440 * NEWS: Mention that breakpoint commands are writable.
3441 * python/py-breakpoint.c (bppy_set_commands): New function.
3442 (breakpoint_object_getset) <"commands">: Use it.
3444 2018-05-04 Tom Tromey <tom@tromey.com>
3446 * tracepoint.c (actions_command): Update.
3447 * mi/mi-cmd-break.c (mi_command_line_array)
3448 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3449 (mi_read_next_line): Remove.
3450 (mi_cmd_break_commands): Update.
3451 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3453 * cli/cli-script.c (get_command_line): Update.
3454 (process_next_line): Use function_view. Constify.
3455 (recurse_read_control_structure, read_command_lines)
3456 (read_command_lines_1): Change argument types to function_view.
3457 (do_define_command, document_command): Update.
3458 * breakpoint.h (check_tracepoint_command): Don't declare.
3459 * breakpoint.c (check_tracepoint_command): Remove.
3460 (commands_command_1, create_tracepoint_from_upload): Update.
3462 2018-05-04 Tom Tromey <tom@tromey.com>
3465 * cli/cli-script.h (enum command_control_type) <define_control>:
3467 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3468 (build_command_line, execute_control_command_1)
3469 (process_next_line): Likewise.
3470 (do_define_command): New function, extracted from define_command.
3471 (define_command): Use it.
3473 2018-05-04 Tom Tromey <tom@tromey.com>
3475 * tracepoint.c (actions_command): Update.
3476 * cli/cli-script.h (read_command_lines): Update.
3477 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3478 (MAX_TMPBUF): Remove define.
3479 (define_command): Use string_printf.
3480 (document_command): Likewise.
3481 * breakpoint.c (commands_command_1): Update.
3483 2018-05-04 Tom Tromey <tom@tromey.com>
3485 * top.c (execute_command): Update.
3486 * cli/cli-script.h (print_command_lines): Now varargs.
3487 * cli/cli-script.c (print_command_lines): Now varargs.
3488 (execute_control_command_1) <case while_control, case if_control>:
3491 2018-05-04 Tom Tromey <tom@tromey.com>
3493 * tracepoint.c (all_tracepoint_actions): Rename from
3494 all_tracepoint_actions_and_cleanup. Change return type.
3495 (actions_command, encode_actions_1, encode_actions)
3496 (trace_dump_actions, tdump_command): Update.
3497 * remote.c (remote_download_command_source): Update.
3498 * python/python.c (gdbpy_eval_from_control_command)
3499 (python_command, python_interactive_command): Update.
3500 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3501 * guile/guile.c (guile_command)
3502 (gdbscm_eval_from_control_command, guile_command): Update.
3503 * compile/compile.c (compile_code_command)
3504 (compile_print_command, compile_to_object): Update.
3505 * cli/cli-script.h (struct command_lines_deleter): New.
3506 (counted_command_line): New typedef.
3507 (struct command_line): Add constructor, destructor.
3508 <body_list>: Remove.
3509 <body_list_0, body_list_1>: New members.
3510 (command_line_up): Remove typedef.
3511 (read_command_lines, read_command_lines_1, get_command_line):
3513 (copy_command_lines): Don't declare.
3514 * cli/cli-script.c (build_command_line): Use "new".
3515 (get_command_line): Return counted_command_line.
3516 (print_command_lines, execute_user_command)
3517 (execute_control_command_1, while_command, if_command): Update.
3518 (realloc_body_list): Remove.
3519 (process_next_line, recurse_read_control_structure): Update.
3520 (read_command_lines, read_command_lines_1): Return counted_command_line.
3521 (free_command_lines): Use "delete".
3522 (copy_command_lines): Remove.
3523 (define_command, document_command, show_user_1): Update.
3524 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3525 a counted_command_line.
3526 * breakpoint.h (counted_command_line): Remove typedef.
3527 (breakpoint_set_commands): Update.
3528 * breakpoint.c (check_no_tracepoint_commands)
3529 (validate_commands_for_breakpoint): Update.
3530 (breakpoint_set_commands): Change commands to be a
3531 counted_command_line.
3532 (commands_command_1, update_dprintf_command_list)
3533 (create_tracepoint_from_upload): Update.
3535 2018-05-04 Tom Tromey <tom@tromey.com>
3537 * cli/cli-decode.h (cmd_list_element): New constructor.
3538 (~cmd_list_element): New destructor.
3539 (struct cmd_list_element): Add initializers.
3540 * cli/cli-decode.c (do_add_cmd): Use "new".
3541 (delete_cmd): Use "delete".
3543 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3544 Pedro Alves <palves@redhat.com>
3546 PR breakpoints/19806 and support for PR external/20207.
3547 * NEWS: Mention Aarch64 watchpoint improvements.
3548 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3549 watchpoints and PR external/20207 watchpoints.
3550 * nat/aarch64-linux-hw-point.c
3551 (kernel_supports_any_contiguous_range): New.
3552 (aarch64_watchpoint_offset): New.
3553 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3554 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3555 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3556 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3557 next_addr_orig_p. Support PR external/20207 watchpoints.
3558 (aarch64_downgrade_regs): New.
3559 (aarch64_dr_state_insert_one_point): New parameters offset and
3561 (aarch64_dr_state_remove_one_point): Likewise.
3562 (aarch64_handle_breakpoint): Update caller.
3563 (aarch64_handle_aligned_watchpoint): Likewise.
3564 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3566 (aarch64_linux_set_debug_regs): Remove const from state. Call
3567 aarch64_downgrade_regs.
3568 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3569 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3570 (DR_CONTROL_MASK): ... this.
3571 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3572 (unsigned int aarch64_watchpoint_offset): New prototype.
3573 (aarch64_linux_set_debug_regs): Remove const from state.
3574 * utils.c (align_up, align_down): Move to ...
3575 * common/common-utils.c (align_up, align_down): ... here.
3576 * utils.h (align_up, align_down): Move to ...
3577 * common/common-utils.h (align_up, align_down): ... here.
3579 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3581 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3582 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3583 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3584 Re-implement to match the ABI as summarized in GCC's
3585 gcc/config/sparc/sparc.c. All callers updated.
3586 (sparc32_store_arguments): Remove assertion.
3588 2018-05-04 Tom Tromey <tom@tromey.com>
3590 * printcmd.c: Don't include tui.h.
3591 (decode_format): Use skip_spaces.
3593 2018-05-04 Tom Tromey <tom@tromey.com>
3596 * printcmd.c (last_count): New global.
3597 (x_command): Use saved count when repeating.
3599 2018-05-04 Tom Tromey <tom@tromey.com>
3601 * nto-procfs.c (do_closedir_cleanup): Remove.
3602 (procfs_pidlist): Use gdb_dir_up.
3603 * procfs.c (do_closedir_cleanup): Remove.
3604 (proc_update_threads): Use gdb_dir_up.
3605 * common/filestuff.h (struct gdb_dir_deleter): New.
3606 (gdb_dir_up): New typedef.
3608 2018-05-04 Tom Tromey <tom@tromey.com>
3610 * ada-lang.c (print_mention_exception): Use std::string.
3612 2018-05-04 Tom Tromey <tom@tromey.com>
3614 * ada-lang.c (create_excep_cond_exprs): Update.
3615 (ada_exception_catchpoint_cond_string): Use std::string.
3617 2018-05-04 Tom Tromey <tom@tromey.com>
3619 * ada-lang.c (xget_renaming_scope): Return std::string.
3620 (old_renaming_is_invisible): Update.
3622 2018-05-04 Tom Tromey <tom@tromey.com>
3624 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3625 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3627 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3629 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3631 2018-05-04 Tom Tromey <tom@tromey.com>
3633 * remote.c (remote_query_supported_append): Change type.
3634 (remote_check_symbols): Update.
3636 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3639 * configure.ac: Prepend libpython.
3640 * python/python-config.py: Likewise.
3641 * configure: Regenerate.
3643 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3645 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3647 2018-05-03 Pedro Alves <palves@redhat.com>
3650 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3651 override. Write 'true' instead of '1'.
3652 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3655 2018-05-02 Pedro Alves <palves@redhat.com>
3657 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3658 add_inf_child_target.
3659 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3660 add_inf_child_target.
3661 * aix-thread.c (aix_thread_target_info): New.
3662 (aix_thread_target) <shortname, longname, doc>: Delete.
3664 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3665 add_inf_child_target.
3666 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3667 add_inf_child_target.
3668 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3669 add_inf_child_target.
3670 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3671 add_inf_child_target.
3672 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3673 add_inf_child_target.
3674 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3675 add_inf_child_target.
3676 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3677 add_inf_child_target.
3678 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3679 add_inf_child_target.
3680 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3681 add_inf_child_target.
3682 * bfd-target.c (target_bfd_target_info): New.
3683 (target_bfd) <shortname, longname, doc>: Delete.
3685 * bsd-kvm.c (bsd_kvm_target_info): New.
3686 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3688 (bsd_kvm_target::open): Rename to ...
3689 (bsd_kvm_target_open): ... this. Adjust.
3690 * bsd-uthread.c (bsd_uthread_target_info): New.
3691 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3693 * corefile.c (core_file_command): Adjust.
3694 * corelow.c (core_target_info): New.
3695 (core_target) <shortname, longname, doc>: Delete.
3697 (core_target::open): Rename to ...
3698 (core_target_open): ... this. Adjust.
3699 * ctf.c (ctf_target_info): New.
3700 (ctf_target) <shortname, longname, doc>: Delete.
3702 (ctf_target::open): Rename to ...
3703 (ctf_target_open): ... this.
3704 (_initialize_ctf): Adjust.
3705 * exec.c (exec_target_info): New.
3706 (exec_target) <shortname, longname, doc>: Delete.
3708 (exec_target::open): Rename to ...
3709 (exec_target_open): ... this.
3710 * gdbcore.h (core_target_open): Declare.
3711 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3712 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3713 add_inf_child_target.
3714 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3715 add_inf_child_target.
3716 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3717 add_inf_child_target.
3718 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3719 add_inf_child_target.
3720 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3721 add_inf_child_target.
3722 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3723 add_inf_child_target.
3724 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3725 add_inf_child_target.
3726 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3727 add_inf_child_target.
3728 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3729 add_inf_child_target.
3730 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3731 add_inf_child_target.
3732 * inf-child.c (inf_child_target_info): New.
3733 (inf_child_target::info): New.
3734 (inf_child_open_target): Remove 'target' parameter. Use
3735 get_native_target instead.
3736 (inf_child_target::open): Delete.
3737 (add_inf_child_target): New.
3738 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3741 (add_inf_child_target): Declare.
3742 (inf_child_open_target): Declare.
3743 * linux-thread-db.c (thread_db_target_info): New.
3744 (thread_db_target) <shortname, longname, doc>: Delete.
3746 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3747 add_inf_child_target.
3748 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3749 add_inf_child_target.
3750 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3751 add_inf_child_target.
3752 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3753 add_inf_child_target.
3754 * make-target-delegates (print_class): Adjust.
3755 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3756 add_inf_child_target.
3757 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3758 add_inf_child_target.
3759 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3760 add_inf_child_target.
3761 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3762 add_inf_child_target.
3763 * nto-procfs.c (nto_native_target_info): New.
3764 (nto_procfs_target_native) <shortname, longname, doc>:
3767 (nto_procfs_target_info): New.
3768 (nto_procfs_target_procfs) <shortname, longname, doc>:
3771 (init_procfs_targets): Adjust.
3772 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3773 add_inf_child_target.
3774 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3775 add_inf_child_target.
3776 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3777 add_inf_child_target.
3778 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3779 add_inf_child_target.
3780 * ravenscar-thread.c (ravenscar_target_info): New.
3781 (ravenscar_thread_target) <shortname, longname, doc>:
3784 * record-btrace.c (record_btrace_target_info):
3785 (record_btrace_target) <shortname, longname, doc>: Delete.
3787 (record_btrace_target::open): Rename to ...
3788 (record_btrace_target_open): ... this. Adjust.
3789 * record-full.c (record_longname, record_doc): New.
3790 (record_full_base_target) <shortname, longname, doc>: Delete.
3792 (record_full_target_info): New.
3793 (record_full_target): <shortname>: Delete.
3795 (record_full_core_open_1, record_full_open_1): Update comments.
3796 (record_full_base_target::open): Rename to ...
3797 (record_full_open): ... this.
3798 (cmd_record_full_restore): Update.
3799 (_initialize_record_full): Update.
3800 * remote-sim.c (remote_sim_target_info): New.
3801 (gdbsim_target) <shortname, longname, doc>: Delete.
3803 (gdbsim_target::open): Rename to ...
3804 (gdbsim_target_open): ... this.
3805 (_initialize_remote_sim): Adjust.
3806 * remote.c (remote_doc): New.
3807 (remote_target_info): New.
3808 (remote_target) <shortname, longname, doc>: Delete.
3810 (extended_remote_target_info): New.
3811 (extended_remote_target) <shortname, longname, doc>: Delete.
3813 (remote_target::open_1): Make static. Adjust.
3814 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3815 * s390-linux-nat.c (_initialize_s390_nat): Use
3816 add_inf_child_target.
3817 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3818 add_inf_child_target.
3819 * sol-thread.c (thread_db_target_info): New.
3820 (sol_thread_target) <shortname, longname, doc>: Delete.
3822 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3823 add_inf_child_target.
3824 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3825 add_inf_child_target.
3826 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3827 add_inf_child_target.
3828 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3829 add_inf_child_target.
3830 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3831 add_inf_child_target.
3832 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3833 add_inf_child_target.
3834 * spu-linux-nat.c (_initialize_spu_nat): Use
3835 add_inf_child_target.
3836 * spu-multiarch.c (spu_multiarch_target_info): New.
3837 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3839 * target-delegates.c: Regenerate.
3840 * target.c: Include <unordered_map>.
3841 (target_ops_p): Delete.
3842 (DEF_VEC_P(target_ops_p)): Delete.
3843 (target_factories): New.
3844 (test_target_info): New.
3845 (test_target_ops::info): New.
3846 (open_target): Adjust to use target_factories.
3847 (add_target_with_completer): Rename to ...
3848 (add_target): ... this. Change prototype. Register target_info
3849 and open callback in target_factories. Register target_info in
3850 command context instead of target_ops.
3851 (add_target): Delete old implementation.
3852 (add_deprecated_target_alias): Change prototype. Adjust.
3853 (the_native_target): New.
3854 (set_native_target, get_native_target): New.
3855 (find_default_run_target): Use the_native_target.
3856 (find_attach_target, find_run_target): Simplify.
3857 (target_ops::open): Delete.
3858 (dummy_target_info): New.
3859 (dummy_target::shortname, dummy_target::longname)
3860 (dummy_target::doc): Delete.
3861 (dummy_target::info): New.
3862 (debug_target::shortname, debug_target::longname)
3863 (debug_target::doc): Delete.
3864 (debug_target::info): New.
3865 * target.h (struct target_info): New.
3866 (target_ops::~target_ops): Add comment.
3867 (target_ops::info): New.
3868 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3869 longer virtual. Implement in terms of target_info.
3870 (set_native_target, get_native_target): Declare.
3871 (target_open_ftype): New.
3872 (add_target, add_target_with_completer)
3873 (add_deprecated_target_alias): Change prototype.
3874 (test_target) <shortname, longname, doc>: Delete.
3876 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3877 add_inf_child_target.
3878 * tracefile-tfile.c (tfile_target_info): New.
3879 (tfile_target) <shortname, longname, doc>: Delete.
3881 (tfile_target::open): Rename to ...
3882 (tfile_target_open): ... this.
3883 (_initialize_tracefile_tfile): Adjust.
3884 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3885 add_inf_child_target.
3886 * windows-nat.c (_initialize_windows_nat): Use
3887 add_inf_child_target.
3888 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3889 add_inf_child_target.
3891 2018-05-02 Pedro Alves <palves@redhat.com>
3893 * linux-nat.h (linux_nat_target) <low_new_thread,
3894 low_delete_thread, low_new_fork, low_forget_process,
3895 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3896 New virtual methods.
3897 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3898 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3899 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3900 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3901 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3903 * linux-fork.c (delete_fork): Adjust to call low method.
3904 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3905 (linux_nat_new_fork, linux_nat_forget_process_hook)
3906 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3907 (linux_nat_status_is_event):
3908 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3909 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3911 (sigtrap_is_event): Rename to ...
3912 (linux_nat_target::low_status_is_event): ... this.
3913 (linux_nat_set_status_is_event): Delete.
3914 (save_stop_reason, linux_nat_wait_1)
3915 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3917 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3918 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3919 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3920 (linux_nat_set_prepare_to_resume): Delete.
3921 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3922 low virtual methods.
3923 * amd64-linux-nat.c: Likewise.
3924 * arm-linux-nat.c: Likewise.
3925 * i386-linux-nat.c: Likewise.
3926 * ia64-linux-nat.c: Likewise.
3927 * mips-linux-nat.c: Likewise.
3928 * ppc-linux-nat.c: Likewise.
3929 * s390-linux-nat.c: Likewise.
3930 * sparc64-linux-nat.c: Likewise.
3931 * x86-linux-nat.c: Likewise.
3932 * x86-linux-nat.h: Include "nat/x86-linux.h".
3933 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3934 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3937 2018-05-02 Pedro Alves <palves@redhat.com>
3939 * target.h (target_ops)
3940 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3941 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3942 stopped_by_watchpoint, have_continuable_watchpoint,
3943 stopped_data_address, watchpoint_addr_within_range,
3944 can_accel_watchpoint_condition, can_run, thread_alive,
3945 has_all_memory, has_memory, has_stack, has_registers,
3946 has_execution, can_async_p, is_async_p, supports_non_stop,
3947 always_non_stop_p, can_execute_reverse, supports_multi_process,
3948 supports_enable_disable_tracepoint,
3949 supports_disable_randomization, supports_string_tracing,
3950 supports_evaluation_of_breakpoint_conditions,
3951 can_run_breakpoint_commands, filesystem_is_local,
3952 can_download_tracepoint, get_trace_state_variable_value,
3953 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3954 record_is_replaying, record_will_replay,
3955 augmented_libraries_svr4_read>: Adjust to return bool.
3956 * aarch64-linux-nat.c: All implementations adjusted.
3957 * aix-thread.c: All implementations adjusted.
3958 * arm-linux-nat.c: All implementations adjusted.
3959 * breakpoint.c: All implementations adjusted.
3960 * bsd-kvm.c: All implementations adjusted.
3961 * bsd-uthread.c: All implementations adjusted.
3962 * corelow.c: All implementations adjusted.
3963 * ctf.c: All implementations adjusted.
3964 * darwin-nat.c: All implementations adjusted.
3965 * darwin-nat.h: All implementations adjusted.
3966 * exec.c: All implementations adjusted.
3967 * fbsd-nat.c: All implementations adjusted.
3968 * fbsd-nat.h: All implementations adjusted.
3969 * gnu-nat.c: All implementations adjusted.
3970 * gnu-nat.h: All implementations adjusted.
3971 * go32-nat.c: All implementations adjusted.
3972 * ia64-linux-nat.c: All implementations adjusted.
3973 * inf-child.c: All implementations adjusted.
3974 * inf-child.h: All implementations adjusted.
3975 * inf-ptrace.c: All implementations adjusted.
3976 * inf-ptrace.h: All implementations adjusted.
3977 * linux-nat.c: All implementations adjusted.
3978 * linux-nat.h: All implementations adjusted.
3979 * mips-linux-nat.c: All implementations adjusted.
3980 * nto-procfs.c: All implementations adjusted.
3981 * ppc-linux-nat.c: All implementations adjusted.
3982 * procfs.c: All implementations adjusted.
3983 * ravenscar-thread.c: All implementations adjusted.
3984 * record-btrace.c: All implementations adjusted.
3985 * record-full.c: All implementations adjusted.
3986 * remote-sim.c: All implementations adjusted.
3987 * remote.c: All implementations adjusted.
3988 * s390-linux-nat.c: All implementations adjusted.
3989 * sol-thread.c: All implementations adjusted.
3990 * spu-multiarch.c: All implementations adjusted.
3991 * target-delegates.c: All implementations adjusted.
3992 * target.c: All implementations adjusted.
3993 * target.h: All implementations adjusted.
3994 * tracefile-tfile.c: All implementations adjusted.
3995 * tracefile.c: All implementations adjusted.
3996 * tracefile.h: All implementations adjusted.
3997 * windows-nat.c: All implementations adjusted.
3998 * x86-linux-nat.h: All implementations adjusted.
3999 * x86-nat.h: All implementations adjusted.
4001 2018-05-02 Pedro Alves <palves@redhat.com>
4003 * make-target-delegates (scan_target_h): Don't trim lines here.
4004 Replace sequences of tabs and/or whitespace with a single
4006 (top level, parsing methods): Trim each line before processing it
4009 2018-05-02 Pedro Alves <palves@redhat.com>
4010 John Baldwin <jhb@freebsd.org>
4012 * target.h (enum strata) <debug_stratum>: New.
4013 (struct target_ops) <all delegation methods>: Replace by C++
4014 virtual methods, and drop "to_" prefix. All references updated
4016 <to_shortname, to_longname, to_doc, to_data,
4017 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4018 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4019 virtual methods. All references updated throughout.
4020 <can_attach, supports_terminal_ours, can_create_inferior,
4021 get_thread_control_capabilities, attach_no_wait>: New
4023 <insert_breakpoint, remove_breakpoint>: Now
4024 TARGET_DEFAULT_NORETURN methods.
4025 <info_proc>: Now returns bool.
4027 (OPS_MAGIC): Delete.
4028 (current_target): Delete. All references replaced by references
4030 (target_stack): ... this. New.
4031 (target_shortname, target_longname): Adjust.
4032 (target_can_run): Now a function declaration.
4033 (default_child_has_all_memory, default_child_has_memory)
4034 (default_child_has_stack, default_child_has_registers)
4035 (default_child_has_execution): Remove target_ops parameter.
4036 (complete_target_initialization): Delete.
4037 (memory_breakpoint_target): New template class.
4038 (test_target_ops): Refactor as a C++ class with virtual methods.
4039 * make-target-delegates (NAME_PART): Tighten.
4040 (POINTER_PART, CP_SYMBOL): New.
4041 (SIMPLE_RETURN_PART): Reimplement.
4042 (VEC_RETURN_PART): Expect less.
4043 (RETURN_PART, VIRTUAL_PART): New.
4044 (METHOD): Adjust to C++ virtual methods.
4045 (scan_target_h): Remove reference to C99.
4046 (dname): Output "target_ops::" prefix.
4047 (write_function_header): Adjust to output a C++ class method.
4048 (write_declaration): New.
4049 (write_delegator): Adjust to output a C++ class method.
4050 (tdname): Output "dummy_target::" prefix.
4051 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4053 (tdefault_names, debug_names): Delete.
4054 (return_types, tdefaults, styles, argtypes_array): New.
4055 (top level): All methods are delegators.
4057 (top level): Print dummy_target and debug_target classes.
4058 * target-delegates.c: Regenerate.
4059 * target-debug.h (target_debug_print_enum_info_proc_what)
4060 (target_debug_print_thread_control_capabilities)
4061 (target_debug_print_thread_info_p): New.
4062 * target.c (dummy_target): Delete.
4063 (the_dummy_target, the_debug_target): New.
4064 (target_stack): Now extern.
4065 (set_targetdebug): Push/unpush debug target.
4066 (default_child_has_all_memory, default_child_has_memory)
4067 (default_child_has_stack, default_child_has_registers)
4068 (default_child_has_execution): Remove target_ops parameter.
4069 (complete_target_initialization): Delete.
4070 (add_target_with_completer): No longer call
4071 complete_target_initialization.
4072 (target_supports_terminal_ours): Use regular delegation.
4073 (update_current_target): Delete.
4074 (push_target): No longer check magic number. Don't call
4075 update_current_target.
4076 (unpush_target): Don't call update_current_target.
4077 (target_is_pushed): No longer check magic number.
4078 (target_require_runnable): Skip for all stratums over
4080 (target_ops::info_proc): New.
4081 (target_info_proc): Use find_target_at and
4082 find_default_run_target.
4083 (target_supports_disable_randomization): Use regular delegation.
4084 (target_get_osdata): Use find_target_at.
4085 (target_ops::open, target_ops::close, target_ops::can_attach)
4086 (target_ops::attach, target_ops::can_create_inferior)
4087 (target_ops::create_inferior, target_ops::can_run)
4088 (target_can_run): New.
4089 (default_fileio_target): Use regular delegation.
4090 (target_ops::fileio_open, target_ops::fileio_pwrite)
4091 (target_ops::fileio_pread, target_ops::fileio_fstat)
4092 (target_ops::fileio_close, target_ops::fileio_unlink)
4093 (target_ops::fileio_readlink): New.
4094 (target_fileio_open_1, target_fileio_unlink)
4095 (target_fileio_readlink): Always call the target method. Handle
4097 (return_zero, return_zero_has_execution): Delete.
4098 (init_dummy_target): Delete.
4099 (dummy_target::dummy_target, dummy_target::shortname)
4100 (dummy_target::longname, dummy_target::doc)
4101 (debug_target::debug_target, debug_target::shortname)
4102 (debug_target::longname, debug_target::doc): New.
4103 (target_supports_delete_record): Use regular delegation.
4104 (setup_target_debug): Delete.
4105 (maintenance_print_target_stack): Skip debug_stratum.
4106 (initialize_targets): Instantiate the_dummy_target and
4108 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4110 (target_auxv_search, fprint_target_auxv): Adjust.
4111 (info_auxv_command): Adjust to use target_stack.
4112 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4113 * exceptions.c (print_flush): Handle a NULL target_stack.
4114 * regcache.c (target_ops_no_register): Refactor as class with
4117 * exec.c (exec_target): New class.
4118 (exec_ops): Now an exec_target.
4119 (exec_open, exec_close_1, exec_get_section_table)
4120 (exec_xfer_partial, exec_files_info, exec_has_memory)
4121 (exec_make_note_section): Refactor as exec_target methods.
4122 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4124 (exec_target::find_memory_regions): New.
4125 (_initialize_exec): Don't call init_exec_ops.
4126 * gdbcore.h (exec_file_clear): Delete.
4128 * corefile.c (core_target): Delete.
4129 (core_file_command): Adjust.
4130 * corelow.c (core_target): New class.
4131 (the_core_target): New.
4132 (core_close): Remove target_ops parameter.
4133 (core_close_cleanup): Adjust.
4134 (core_target::close): New.
4135 (core_open, core_detach, get_core_registers, core_files_info)
4136 (core_xfer_partial, core_thread_alive, core_read_description)
4137 (core_pid_to_str, core_thread_name, core_has_memory)
4138 (core_has_stack, core_has_registers, core_info_proc): Rework as
4139 core_target methods.
4140 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4141 (_initialize_corelow): Initialize the_core_target.
4142 * gdbcore.h (core_target): Delete.
4143 (the_core_target): New.
4145 * ctf.c: (ctf_target): New class.
4146 (ctf_ops): Now a ctf_target.
4147 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4148 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4149 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4151 (init_ctf_ops): Delete.
4152 (_initialize_ctf): Don't call it.
4153 * tracefile-tfile.c (tfile_target): New class.
4154 (tfile_ops): Now a tfile_target.
4155 (tfile_open, tfile_close, tfile_files_info)
4156 (tfile_get_tracepoint_status, tfile_trace_find)
4157 (tfile_fetch_registers, tfile_xfer_partial)
4158 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4159 Refactor as tfile_target methods.
4160 (tfile_xfer_partial_features): Remove target_ops parameter.
4161 (init_tfile_ops): Delete.
4162 (_initialize_tracefile_tfile): Don't call it.
4163 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4164 (tracefile_has_stack, tracefile_has_registers)
4165 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4166 tracefile_target methods.
4167 (init_tracefile_ops): Delete.
4168 (tracefile_target::tracefile_target): New.
4169 * tracefile.h: Include "target.h".
4170 (tracefile_target): New class.
4171 (init_tracefile_ops): Delete.
4173 * spu-multiarch.c (spu_multiarch_target): New class.
4174 (spu_ops): Now a spu_multiarch_target.
4175 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4176 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4177 (spu_search_memory, spu_mourn_inferior): Refactor as
4178 spu_multiarch_target methods.
4179 (init_spu_ops): Delete.
4180 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4181 complete_target_initialization.
4183 * ravenscar-thread.c (ravenscar_thread_target): New class.
4184 (ravenscar_ops): Now a ravenscar_thread_target.
4185 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4186 (ravenscar_thread_alive, ravenscar_pid_to_str)
4187 (ravenscar_fetch_registers, ravenscar_store_registers)
4188 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4189 (ravenscar_stopped_by_hw_breakpoint)
4190 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4191 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4192 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4194 (init_ravenscar_thread_ops): Delete.
4195 (_initialize_ravenscar): Remove references to
4196 init_ravenscar_thread_ops and complete_target_initialization.
4198 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4199 (bsd_uthread_target): New class.
4200 (bsd_uthread_ops): Now a bsd_uthread_target.
4201 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4202 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4203 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4204 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4205 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4206 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4207 (bsd_uthread_target): Delete function.
4208 (_initialize_bsd_uthread): Remove reference to
4209 complete_target_initialization.
4211 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4212 (target_bfd): ... this new class.
4213 (target_bfd_xfer_partial, target_bfd_get_section_table)
4214 (target_bfd_close): Refactor as target_bfd methods.
4215 (target_bfd::~target_bfd): New.
4216 (target_bfd_reopen): Adjust.
4217 (target_bfd::close): New.
4219 * record-btrace.c (record_btrace_target): New class.
4220 (record_btrace_ops): Now a record_btrace_target.
4221 (record_btrace_open, record_btrace_stop_recording)
4222 (record_btrace_disconnect, record_btrace_close)
4223 (record_btrace_async, record_btrace_info)
4224 (record_btrace_insn_history, record_btrace_insn_history_range)
4225 (record_btrace_insn_history_from, record_btrace_call_history)
4226 (record_btrace_call_history_range)
4227 (record_btrace_call_history_from, record_btrace_record_method)
4228 (record_btrace_is_replaying, record_btrace_will_replay)
4229 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4230 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4231 (record_btrace_store_registers, record_btrace_prepare_to_store)
4232 (record_btrace_to_get_unwinder)
4233 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4234 (record_btrace_commit_resume, record_btrace_wait)
4235 (record_btrace_stop, record_btrace_can_execute_reverse)
4236 (record_btrace_stopped_by_sw_breakpoint)
4237 (record_btrace_supports_stopped_by_sw_breakpoint)
4238 (record_btrace_stopped_by_hw_breakpoint)
4239 (record_btrace_supports_stopped_by_hw_breakpoint)
4240 (record_btrace_update_thread_list, record_btrace_thread_alive)
4241 (record_btrace_goto_begin, record_btrace_goto_end)
4242 (record_btrace_goto, record_btrace_stop_replaying_all)
4243 (record_btrace_execution_direction)
4244 (record_btrace_prepare_to_generate_core)
4245 (record_btrace_done_generating_core): Refactor as
4246 record_btrace_target methods.
4247 (init_record_btrace_ops): Delete.
4248 (_initialize_record_btrace): Remove reference to
4249 init_record_btrace_ops.
4250 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4251 the execution_direction global.
4252 (record_full_base_target, record_full_target)
4253 (record_full_core_target): New classes.
4254 (record_full_ops): Now a record_full_target.
4255 (record_full_core_ops): Now a record_full_core_target.
4256 (record_full_target::detach, record_full_target::disconnect)
4257 (record_full_core_target::disconnect)
4258 (record_full_target::mourn_inferior, record_full_target::kill):
4260 (record_full_open, record_full_close, record_full_async): Refactor
4261 as methods of the record_full_base_target class.
4262 (record_full_resume, record_full_commit_resume): Refactor
4263 as methods of the record_full_target class.
4264 (record_full_wait, record_full_stopped_by_watchpoint)
4265 (record_full_stopped_data_address)
4266 (record_full_stopped_by_sw_breakpoint)
4267 (record_full_supports_stopped_by_sw_breakpoint)
4268 (record_full_stopped_by_hw_breakpoint)
4269 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4270 methods of the record_full_base_target class.
4271 (record_full_store_registers, record_full_xfer_partial)
4272 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4273 Refactor as methods of the record_full_target class.
4274 (record_full_can_execute_reverse, record_full_get_bookmark)
4275 (record_full_goto_bookmark, record_full_execution_direction)
4276 (record_full_record_method, record_full_info, record_full_delete)
4277 (record_full_is_replaying, record_full_will_replay)
4278 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4279 (record_full_stop_replaying): Refactor as methods of the
4280 record_full_base_target class.
4281 (record_full_core_resume, record_full_core_kill)
4282 (record_full_core_fetch_registers)
4283 (record_full_core_prepare_to_store)
4284 (record_full_core_store_registers, record_full_core_xfer_partial)
4285 (record_full_core_insert_breakpoint)
4286 (record_full_core_remove_breakpoint)
4287 (record_full_core_has_execution): Refactor
4288 as methods of the record_full_core_target class.
4289 (record_full_base_target::supports_delete_record): New.
4290 (init_record_full_ops): Delete.
4291 (init_record_full_core_ops): Delete.
4292 (record_full_save): Refactor as method of the
4293 record_full_base_target class.
4294 (_initialize_record_full): Remove references to
4295 init_record_full_ops and init_record_full_core_ops.
4297 * remote.c (remote_target, extended_remote_target): New classes.
4298 (remote_ops): Now a remote_target.
4299 (extended_remote_ops): Now an extended_remote_target.
4300 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4301 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4302 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4303 (remote_pass_signals, remote_set_syscall_catchpoint)
4304 (remote_program_signals, )
4305 (remote_thread_always_alive): Remove target_ops parameter.
4306 (remote_thread_alive, remote_thread_name)
4307 (remote_update_thread_list, remote_threads_extra_info)
4308 (remote_static_tracepoint_marker_at)
4309 (remote_static_tracepoint_markers_by_strid)
4310 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4311 (remote_open): Refactor as methods of remote_target.
4312 (extended_remote_open, extended_remote_detach)
4313 (extended_remote_attach, extended_remote_post_attach):
4314 (extended_remote_supports_disable_randomization)
4315 (extended_remote_create_inferior): : Refactor as method of
4316 extended_remote_target.
4317 (remote_set_permissions, remote_open_1, remote_detach)
4318 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4319 (remote_resume, remote_commit_resume, remote_stop)
4320 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4321 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4322 (remote_prepare_to_store, remote_store_registers)
4323 (remote_flash_erase, remote_flash_done, remote_files_info)
4324 (remote_kill, remote_mourn, remote_insert_breakpoint)
4325 (remote_remove_breakpoint, remote_insert_watchpoint)
4326 (remote_watchpoint_addr_within_range)
4327 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4328 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4329 (remote_supports_stopped_by_sw_breakpoint)
4330 (remote_stopped_by_hw_breakpoint)
4331 (remote_supports_stopped_by_hw_breakpoint)
4332 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4333 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4334 (remote_verify_memory): Refactor as methods of remote_target.
4335 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4337 (remote_xfer_partial, remote_get_memory_xfer_limit)
4338 (remote_search_memory, remote_rcmd, remote_memory_map)
4339 (remote_pid_to_str, remote_get_thread_local_address)
4340 (remote_get_tib_address, remote_read_description): Refactor as
4341 methods of remote_target.
4342 (remote_target::fileio_open, remote_target::fileio_pwrite)
4343 (remote_target::fileio_pread, remote_target::fileio_close): New.
4344 (remote_hostio_readlink, remote_hostio_fstat)
4345 (remote_filesystem_is_local, remote_can_execute_reverse)
4346 (remote_supports_non_stop, remote_supports_disable_randomization)
4347 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4348 (remote_supports_enable_disable_tracepoint)
4349 (remote_supports_string_tracing)
4350 (remote_can_run_breakpoint_commands, remote_trace_init)
4351 (remote_download_tracepoint, remote_can_download_tracepoint)
4352 (remote_download_trace_state_variable, remote_enable_tracepoint)
4353 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4354 (remote_trace_start, remote_get_trace_status)
4355 (remote_get_tracepoint_status, remote_trace_stop)
4356 (remote_trace_find, remote_get_trace_state_variable_value)
4357 (remote_save_trace_data, remote_get_raw_trace_data)
4358 (remote_set_disconnected_tracing, remote_core_of_thread)
4359 (remote_set_circular_trace_buffer, remote_traceframe_info)
4360 (remote_get_min_fast_tracepoint_insn_len)
4361 (remote_set_trace_buffer_size, remote_set_trace_notes)
4362 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4363 (remote_disable_btrace, remote_teardown_btrace)
4364 (remote_read_btrace, remote_btrace_conf)
4365 (remote_augmented_libraries_svr4_read, remote_load)
4366 (remote_pid_to_exec_file, remote_can_do_single_step)
4367 (remote_execution_direction, remote_thread_handle_to_thread_info):
4368 Refactor as methods of remote_target.
4369 (init_remote_ops, init_extended_remote_ops): Delete.
4370 (remote_can_async_p, remote_is_async_p, remote_async)
4371 (remote_thread_events, remote_upload_tracepoints)
4372 (remote_upload_trace_state_variables): Refactor as methods of
4374 (_initialize_remote): Remove references to init_remote_ops and
4375 init_extended_remote_ops.
4377 * remote-sim.c (gdbsim_target): New class.
4378 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4379 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4380 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4381 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4382 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4383 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4384 Refactor as methods of gdbsim_target.
4385 (gdbsim_ops): Now a gdbsim_target.
4386 (init_gdbsim_ops): Delete.
4387 (gdbsim_cntrl_c): Adjust.
4388 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4390 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4391 (the_amd64_linux_nat_target): New.
4392 (amd64_linux_fetch_inferior_registers)
4393 (amd64_linux_store_inferior_registers): Refactor as methods of
4394 amd64_linux_nat_target.
4395 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4396 * i386-linux-nat.c: Don't include "linux-nat.h".
4397 (i386_linux_nat_target): New class.
4398 (the_i386_linux_nat_target): New.
4399 (i386_linux_fetch_inferior_registers)
4400 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4401 as methods of i386_linux_nat_target.
4402 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4403 * inf-child.c (inf_child_ops): Delete.
4404 (inf_child_fetch_inferior_registers)
4405 (inf_child_store_inferior_registers): Delete.
4406 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4407 methods of inf_child_target.
4408 (inf_child_target::supports_terminal_ours)
4409 (inf_child_target::terminal_init)
4410 (inf_child_target::terminal_inferior)
4411 (inf_child_target::terminal_ours_for_output)
4412 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4413 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4415 (inf_child_open, inf_child_disconnect, inf_child_close)
4416 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4417 (inf_child_post_startup_inferior, inf_child_can_run)
4418 (inf_child_pid_to_exec_file): Refactor as methods of
4420 (inf_child_follow_fork): Delete.
4421 (inf_child_target::can_create_inferior)
4422 (inf_child_target::can_attach): New.
4423 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4424 (inf_child_target::has_stack, inf_child_target::has_registers)
4425 (inf_child_target::has_execution): New.
4426 (inf_child_fileio_open, inf_child_fileio_pwrite)
4427 (inf_child_fileio_pread, inf_child_fileio_fstat)
4428 (inf_child_fileio_close, inf_child_fileio_unlink)
4429 (inf_child_fileio_readlink, inf_child_use_agent)
4430 (inf_child_can_use_agent): Refactor as methods of
4432 (return_zero, inf_child_target): Delete.
4433 (inf_child_target::inf_child_target): New.
4434 * inf-child.h: Include "target.h".
4435 (inf_child_target): Delete function prototype.
4436 (inf_child_target): New class.
4437 (inf_child_open_target, inf_child_mourn_inferior)
4438 (inf_child_maybe_unpush_target): Delete.
4439 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4440 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4441 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4442 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4443 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4444 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4445 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4446 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4447 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4448 methods of inf_ptrace_target.
4449 (inf_ptrace_target): Delete function.
4450 * inf-ptrace.h: Include "inf-child.h".
4451 (inf_ptrace_target): Delete function declaration.
4452 (inf_ptrace_target): New class.
4453 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4454 * linux-nat.c (linux_target): New.
4455 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4456 (linux_nat_target::~linux_nat_target): New.
4457 (linux_child_post_attach, linux_child_post_startup_inferior)
4458 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4459 (linux_child_remove_fork_catchpoint)
4460 (linux_child_insert_vfork_catchpoint)
4461 (linux_child_remove_vfork_catchpoint)
4462 (linux_child_insert_exec_catchpoint)
4463 (linux_child_remove_exec_catchpoint)
4464 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4465 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4466 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4467 (linux_nat_stopped_data_address)
4468 (linux_nat_stopped_by_sw_breakpoint)
4469 (linux_nat_supports_stopped_by_sw_breakpoint)
4470 (linux_nat_stopped_by_hw_breakpoint)
4471 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4472 (linux_nat_kill, linux_nat_mourn_inferior)
4473 (linux_nat_xfer_partial, linux_nat_thread_alive)
4474 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4475 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4476 (linux_child_static_tracepoint_markers_by_strid)
4477 (linux_nat_is_async_p, linux_nat_can_async_p)
4478 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4479 (linux_nat_supports_multi_process)
4480 (linux_nat_supports_disable_randomization, linux_nat_async)
4481 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4482 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4483 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4484 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4485 methods of linux_nat_target.
4486 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4487 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4489 (check_stopped_by_watchpoint): Adjust.
4490 (linux_xfer_partial): Delete.
4491 (linux_target_install_ops, linux_target, linux_nat_add_target):
4493 (linux_nat_target::linux_nat_target): New.
4494 * linux-nat.h: Include "inf-ptrace.h".
4495 (linux_nat_target): New.
4496 (linux_target, linux_target_install_ops, linux_nat_add_target):
4497 Delete function declarations.
4498 (linux_target): Declare global.
4499 * linux-thread-db.c (thread_db_target): New.
4500 (thread_db_target::thread_db_target): New.
4501 (thread_db_ops): Delete.
4502 (the_thread_db_target): New.
4503 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4504 (thread_db_update_thread_list, thread_db_pid_to_str)
4505 (thread_db_extra_thread_info)
4506 (thread_db_thread_handle_to_thread_info)
4507 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4508 (thread_db_resume): Refactor as methods of thread_db_target.
4509 (init_thread_db_ops): Delete.
4510 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4511 * x86-linux-nat.c: Don't include "linux-nat.h".
4512 (super_post_startup_inferior): Delete.
4513 (x86_linux_nat_target::~x86_linux_nat_target): New.
4514 (x86_linux_child_post_startup_inferior)
4515 (x86_linux_read_description, x86_linux_enable_btrace)
4516 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4517 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4518 methods of x86_linux_nat_target.
4519 (x86_linux_create_target): Delete. Bits folded ...
4520 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4522 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4523 (x86_linux_nat_target): New class.
4524 (x86_linux_create_target): Delete.
4525 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4526 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4527 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4528 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4529 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4530 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4532 (x86_use_watchpoints): Delete.
4533 * x86-nat.h: Include "breakpoint.h" and "target.h".
4534 (x86_use_watchpoints): Delete.
4535 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4536 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4537 (x86_insert_watchpoint, x86_remove_watchpoint)
4538 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4539 (x86_stopped_by_hw_breakpoint): New declarations.
4540 (x86_nat_target): New template class.
4542 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4543 (the_ppc_linux_nat_target): New.
4544 (ppc_linux_fetch_inferior_registers)
4545 (ppc_linux_can_use_hw_breakpoint)
4546 (ppc_linux_region_ok_for_hw_watchpoint)
4547 (ppc_linux_ranged_break_num_registers)
4548 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4549 (ppc_linux_insert_mask_watchpoint)
4550 (ppc_linux_remove_mask_watchpoint)
4551 (ppc_linux_can_accel_watchpoint_condition)
4552 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4553 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4554 (ppc_linux_watchpoint_addr_within_range)
4555 (ppc_linux_masked_watch_num_registers)
4556 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4557 (ppc_linux_read_description): Refactor as methods of
4558 ppc_linux_nat_target.
4559 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4561 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4562 (procfs_target): New class.
4563 (the_procfs_target): New.
4564 (procfs_target): Delete function.
4565 (procfs_auxv_parse, procfs_attach, procfs_detach)
4566 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4567 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4568 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4569 (procfs_create_inferior, procfs_update_thread_list)
4570 (procfs_thread_alive, procfs_pid_to_str)
4571 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4572 (procfs_stopped_data_address, procfs_insert_watchpoint)
4573 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4574 (proc_find_memory_regions, procfs_info_proc)
4575 (procfs_make_note_section): Refactor as methods of procfs_target.
4576 (_initialize_procfs): Adjust.
4577 * sol-thread.c (sol_thread_target): New class.
4578 (sol_thread_ops): Now a sol_thread_target.
4579 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4580 (sol_thread_fetch_registers, sol_thread_store_registers)
4581 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4582 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4583 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4584 (init_sol_thread_ops): Delete.
4585 (_initialize_sol_thread): Adjust. Remove references to
4586 init_sol_thread_ops and complete_target_initialization.
4588 * windows-nat.c (windows_nat_target): New class.
4589 (windows_fetch_inferior_registers)
4590 (windows_store_inferior_registers, windows_resume, windows_wait)
4591 (windows_attach, windows_detach, windows_pid_to_exec_file)
4592 (windows_files_info, windows_create_inferior)
4593 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4594 (windows_close, windows_pid_to_str, windows_xfer_partial)
4595 (windows_get_tib_address, windows_get_ada_task_ptid)
4596 (windows_thread_name, windows_thread_alive): Refactor as
4597 windows_nat_target methods.
4598 (do_initial_windows_stuff): Adjust.
4599 (windows_target): Delete function.
4600 (_initialize_windows_nat): Adjust.
4602 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4603 (darwin_mourn_inferior, darwin_kill_inferior)
4604 (darwin_create_inferior, darwin_attach, darwin_detach)
4605 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4606 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4607 (darwin_supports_multi_process): Refactor as darwin_nat_target
4609 (darwin_resume_to, darwin_files_info): Delete.
4610 (_initialize_darwin_inferior): Rename to ...
4611 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4612 * darwin-nat.h: Include "inf-child.h".
4613 (darwin_nat_target): New class.
4614 (darwin_complete_target): Delete.
4615 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4616 (darwin_target): New.
4617 (i386_darwin_fetch_inferior_registers)
4618 (i386_darwin_store_inferior_registers): Refactor as methods of
4620 (darwin_complete_target): Delete, with ...
4621 (_initialize_i386_darwin_nat): ... bits factored out here.
4623 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4624 (the_alpha_linux_nat_target): New.
4625 (alpha_linux_register_u_offset): Refactor as
4626 alpha_linux_nat_target method.
4627 (_initialize_alpha_linux_nat): Adjust.
4628 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4629 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4630 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4631 methods of linux_nat_trad_target.
4632 (linux_trad_target): Delete.
4633 * linux-nat-trad.h (linux_trad_target): Delete function.
4634 (linux_nat_trad_target): New class.
4635 * mips-linux-nat.c (mips_linux_nat_target): New class.
4636 (super_fetch_registers, super_store_registers, super_close):
4638 (the_mips_linux_nat_target): New.
4639 (mips64_linux_regsets_fetch_registers)
4640 (mips64_linux_regsets_store_registers)
4641 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4642 (mips_linux_register_u_offset, mips_linux_read_description)
4643 (mips_linux_can_use_hw_breakpoint)
4644 (mips_linux_stopped_by_watchpoint)
4645 (mips_linux_stopped_data_address)
4646 (mips_linux_region_ok_for_hw_watchpoint)
4647 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4648 (mips_linux_close): Refactor as methods of mips_linux_nat.
4649 (_initialize_mips_linux_nat): Adjust to C++ification.
4651 * aix-thread.c (aix_thread_target): New class.
4652 (aix_thread_ops): Now an aix_thread_target.
4653 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4654 (aix_thread_fetch_registers, aix_thread_store_registers)
4655 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4656 (aix_thread_thread_alive, aix_thread_pid_to_str)
4657 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4658 Refactor as methods of aix_thread_target.
4659 (init_aix_thread_ops): Delete.
4660 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4661 and complete_target_initialization.
4662 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4663 (rs6000_nat_target): New class.
4664 (the_rs6000_nat_target): New.
4665 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4666 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4667 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4668 (super_create_inferior): Delete.
4669 (_initialize_rs6000_nat): Adjust to C++ification.
4671 * arm-linux-nat.c (arm_linux_nat_target): New class.
4672 (the_arm_linux_nat_target): New.
4673 (arm_linux_fetch_inferior_registers)
4674 (arm_linux_store_inferior_registers, arm_linux_read_description)
4675 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4676 (arm_linux_remove_hw_breakpoint)
4677 (arm_linux_region_ok_for_hw_watchpoint)
4678 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4679 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4680 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4681 arm_linux_nat_target.
4682 (_initialize_arm_linux_nat): Adjust to C++ification.
4684 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4685 (the_aarch64_linux_nat_target): New.
4686 (aarch64_linux_fetch_inferior_registers)
4687 (aarch64_linux_store_inferior_registers)
4688 (aarch64_linux_child_post_startup_inferior)
4689 (aarch64_linux_read_description)
4690 (aarch64_linux_can_use_hw_breakpoint)
4691 (aarch64_linux_insert_hw_breakpoint)
4692 (aarch64_linux_remove_hw_breakpoint)
4693 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4694 (aarch64_linux_region_ok_for_hw_watchpoint)
4695 (aarch64_linux_stopped_data_address)
4696 (aarch64_linux_stopped_by_watchpoint)
4697 (aarch64_linux_watchpoint_addr_within_range)
4698 (aarch64_linux_can_do_single_step): Refactor as methods of
4699 aarch64_linux_nat_target.
4700 (super_post_startup_inferior): Delete.
4701 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4703 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4704 (the_hppa_linux_nat_target): New.
4705 (hppa_linux_fetch_inferior_registers)
4706 (hppa_linux_store_inferior_registers): Refactor as methods of
4707 hppa_linux_nat_target.
4708 (_initialize_hppa_linux_nat): Adjust to C++ification.
4710 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4711 (the_ia64_linux_nat_target): New.
4712 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4713 (ia64_linux_stopped_data_address)
4714 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4715 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4716 ia64_linux_nat_target methods.
4717 (super_xfer_partial): Delete.
4718 (_initialize_ia64_linux_nat): Adjust to C++ification.
4720 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4721 (the_m32r_linux_nat_target): New.
4722 (m32r_linux_fetch_inferior_registers)
4723 (m32r_linux_store_inferior_registers): Refactor as
4724 m32r_linux_nat_target methods.
4725 (_initialize_m32r_linux_nat): Adjust to C++ification.
4727 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4728 (the_m68k_linux_nat_target): New.
4729 (m68k_linux_fetch_inferior_registers)
4730 (m68k_linux_store_inferior_registers): Refactor as
4731 m68k_linux_nat_target methods.
4732 (_initialize_m68k_linux_nat): Adjust to C++ification.
4734 * s390-linux-nat.c (s390_linux_nat_target): New class.
4735 (the_s390_linux_nat_target): New.
4736 (s390_linux_fetch_inferior_registers)
4737 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4738 (s390_insert_watchpoint, s390_remove_watchpoint)
4739 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4740 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4741 (s390_auxv_parse, s390_read_description): Refactor as methods of
4742 s390_linux_nat_target.
4743 (_initialize_s390_nat): Adjust to C++ification.
4745 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4746 (the_sparc_linux_nat_target): New.
4747 (_initialize_sparc_linux_nat): Adjust to C++ification.
4748 * sparc-nat.c (sparc_fetch_inferior_registers)
4749 (sparc_store_inferior_registers): Remove target_ops parameter.
4750 * sparc-nat.h (sparc_fetch_inferior_registers)
4751 (sparc_store_inferior_registers): Remove target_ops parameter.
4752 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4753 (the_sparc64_linux_nat_target): New.
4754 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4756 * spu-linux-nat.c (spu_linux_nat_target): New class.
4757 (the_spu_linux_nat_target): New.
4758 (spu_child_post_startup_inferior, spu_child_post_attach)
4759 (spu_child_wait, spu_fetch_inferior_registers)
4760 (spu_store_inferior_registers, spu_xfer_partial)
4761 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4763 (_initialize_spu_nat): Adjust to C++ification.
4765 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4766 (the_tilegx_linux_nat_target): New.
4767 (fetch_inferior_registers, store_inferior_registers):
4768 Refactor as methods.
4769 (_initialize_tile_linux_nat): Adjust to C++ification.
4771 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4772 (the_xtensa_linux_nat_target): New.
4773 (xtensa_linux_fetch_inferior_registers)
4774 (xtensa_linux_store_inferior_registers): Refactor as
4775 xtensa_linux_nat_target methods.
4776 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4778 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4779 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4780 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4781 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4782 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4783 (fbsd_stopped_by_sw_breakpoint)
4784 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4785 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4786 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4787 (fbsd_post_startup_inferior, fbsd_post_attach)
4788 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4789 (fbsd_set_syscall_catchpoint)
4790 (super_xfer_partial, super_resume, super_wait)
4791 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4792 (fbsd_handle_debug_trap): Remove target_ops parameter.
4793 (fbsd_nat_add_target): Delete.
4794 * fbsd-nat.h: Include "inf-ptrace.h".
4795 (fbsd_nat_add_target): Delete.
4796 (USE_SIGTRAP_SIGINFO): Define.
4797 (fbsd_nat_target): New class.
4799 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4800 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4801 (amd64bsd_target): Delete.
4802 * amd64-bsd-nat.h: New file.
4803 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4805 (amd64_fbsd_nat_target): New class.
4806 (the_amd64_fbsd_nat_target): New.
4807 (amd64fbsd_read_description): Refactor as method of
4808 amd64_fbsd_nat_target.
4809 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4810 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4811 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4812 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4813 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4814 (i386bsd_target): Delete.
4815 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4816 (i386bsd_fetch_inferior_registers)
4817 (i386bsd_store_inferior_registers): Declare.
4818 (i386_bsd_nat_target): New class.
4819 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4820 (the_i386_fbsd_nat_target): New.
4821 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4822 i386_fbsd_nat_target methods.
4823 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4824 (_initialize_i386fbsd_nat): Adjust to C++ification.
4825 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4826 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4827 (_initialize_x86_bsd_nat): Adjust to C++ification.
4828 * x86-bsd-nat.h: Include "x86-nat.h".
4829 (x86bsd_target): Delete declaration.
4830 (x86bsd_nat_target): New class.
4832 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4833 (the_aarch64_fbsd_nat_target): New.
4834 (aarch64_fbsd_fetch_inferior_registers)
4835 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4836 aarch64_fbsd_nat_target.
4837 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4838 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4839 (the_alpha_bsd_nat_target): New.
4840 (alphabsd_fetch_inferior_registers)
4841 (alphabsd_store_inferior_registers): Refactor as
4842 alpha_bsd_nat_target methods.
4843 (_initialize_alphabsd_nat): Refactor as methods of
4844 alpha_bsd_nat_target.
4845 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4846 (the_amd64_nbsd_nat_target): New.
4847 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4848 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4849 (the_amd64_obsd_nat_target): New.
4850 (_initialize_amd64obsd_nat): Adjust to C++ification.
4851 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4852 (the_arm_fbsd_nat_target): New.
4853 (arm_fbsd_fetch_inferior_registers)
4854 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4855 (_initialize_arm_fbsd_nat): Refactor as methods of
4856 arm_fbsd_nat_target.
4857 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4858 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4859 (the_arm_netbsd_nat_target): New.
4860 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4861 arm_netbsd_nat_target.
4862 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4863 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4864 (the_hppa_nbsd_nat_target): New.
4865 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4866 hppa_nbsd_nat_target methods.
4867 (_initialize_hppanbsd_nat): Adjust to C++ification.
4868 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4869 (the_hppa_obsd_nat_target): New.
4870 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4871 methods of hppa_obsd_nat_target.
4872 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4874 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4875 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4877 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4878 (_initialize_i386obsd_nat): Use add_target.
4879 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4880 (the_m68k_bsd_nat_target): New.
4881 (m68kbsd_fetch_inferior_registers)
4882 (m68kbsd_store_inferior_registers): Refactor as methods of
4883 m68k_bsd_nat_target.
4884 (_initialize_m68kbsd_nat): Adjust to C++ification.
4885 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4886 (the_mips_fbsd_nat_target): New.
4887 (mips_fbsd_fetch_inferior_registers)
4888 (mips_fbsd_store_inferior_registers): Refactor as methods of
4889 mips_fbsd_nat_target.
4890 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4892 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4893 (the_mips_nbsd_nat_target): New.
4894 (mipsnbsd_fetch_inferior_registers)
4895 (mipsnbsd_store_inferior_registers): Refactor as methods of
4896 mips_nbsd_nat_target.
4897 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4898 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4899 (the_mips64_obsd_nat_target): New.
4900 (mips64obsd_fetch_inferior_registers)
4901 (mips64obsd_store_inferior_registers): Refactor as methods of
4902 mips64_obsd_nat_target.
4903 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4905 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4907 * nbsd-nat.h: Include "inf-ptrace.h".
4908 (nbsd_nat_target): New class.
4909 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4910 (obsd_wait): Refactor as methods of obsd_nat_target.
4911 (obsd_add_target): Delete.
4912 * obsd-nat.h: Include "inf-ptrace.h".
4913 (obsd_nat_target): New class.
4914 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4915 (the_ppc_fbsd_nat_target): New.
4916 (ppcfbsd_fetch_inferior_registers)
4917 (ppcfbsd_store_inferior_registers): Refactor as methods of
4918 ppc_fbsd_nat_target.
4919 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4921 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4922 (the_ppc_nbsd_nat_target): New.
4923 (ppcnbsd_fetch_inferior_registers)
4924 (ppcnbsd_store_inferior_registers): Refactor as methods of
4925 ppc_nbsd_nat_target.
4926 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4927 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4928 (the_ppc_obsd_nat_target): New.
4929 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4930 methods of ppc_obsd_nat_target.
4931 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4933 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4934 (the_sh_nbsd_nat_target): New.
4935 (shnbsd_fetch_inferior_registers)
4936 (shnbsd_store_inferior_registers): Refactor as methods of
4938 (_initialize_shnbsd_nat): Adjust to C++ification.
4939 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4940 (inf_ptrace_xfer_partial): Delete.
4941 (sparc_xfer_partial, sparc_target): Delete.
4942 * sparc-nat.h (sparc_fetch_inferior_registers)
4943 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4944 (sparc_target): Delete function declaration.
4945 (sparc_target): New template class.
4946 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4947 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4948 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4949 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4951 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4952 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4953 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4954 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4956 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4957 (the_vax_bsd_nat_target): New.
4958 (vaxbsd_fetch_inferior_registers)
4959 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4961 (_initialize_vaxbsd_nat): Adjust to C++ification.
4963 * bsd-kvm.c (bsd_kvm_target): New class.
4964 (bsd_kvm_ops): Now a bsd_kvm_target.
4965 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4966 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4967 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4969 (bsd_kvm_return_one): Delete.
4970 (bsd_kvm_add_target): Adjust to C++ification.
4972 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4973 (nto_procfs_target_procfs): New classes.
4974 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4975 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4976 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4977 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4978 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4979 (procfs_remove_hw_breakpoint, procfs_resume)
4980 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4981 (procfs_kill_inferior, procfs_store_registers)
4982 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4983 as methods of nto_procfs_target.
4984 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4985 (nto_native_ops): Delete.
4986 (procfs_open, procfs_native_open): Delete.
4987 (nto_native_ops): Now an nto_procfs_target_native.
4988 (init_procfs_targets): Adjust to C++ification.
4989 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4990 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4991 Refactor as methods of nto_procfs_target.
4993 * go32-nat.c (go32_nat_target): New class.
4994 (the_go32_nat_target): New.
4995 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4996 (go32_store_registers, go32_xfer_partial, go32_files_info)
4997 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4998 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4999 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5000 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5001 (go32_target): Delete.
5002 (_initialize_go32_nat): Adjust to C++ification.
5004 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5005 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5006 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5007 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5009 (gnu_target): Delete.
5010 * gnu-nat.h (gnu_target): Delete.
5011 (gnu_nat_target): New class.
5012 * i386-gnu-nat.c (gnu_base_target): New.
5013 (i386_gnu_nat_target): New class.
5014 (the_i386_gnu_nat_target): New.
5015 (_initialize_i386gnu_nat): Adjust to C++ification.
5017 2018-05-02 Pedro Alves <palves@redhat.com>
5019 * bfd-target.c (target_bfd_xclose): Rename to ...
5020 (target_bfd_close): ... this.
5021 (target_bfd_reopen): Adjust.
5022 * target.c (target_close): Remove references to to_xclose.
5023 * target.h (target_ops::to_xclose): Delete.
5024 (target_ops::to_close): Update comments.
5026 2018-05-02 Pedro Alves <palves@redhat.com>
5028 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5030 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5031 * inf-ptrace.c (inf_ptrace_register_u_offset)
5032 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5033 (inf_ptrace_store_register, inf_ptrace_store_registers)
5034 (inf_ptrace_trad_target): Move to ...
5035 * linux-nat-trad.c: ... this new file.
5036 * linux-nat-trad.h: New file.
5037 * linux-nat.c (linux_target_install_ops): Make extern.
5038 (linux_trad_target): Delete.
5039 * linux-nat.h (linux_trad_target): Delete declaration.
5040 (linux_target_install_ops): Declare.
5041 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5044 2018-05-02 Pedro Alves <palves@redhat.com>
5046 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5047 procfs_target/add_target here.
5048 * procfs.c (procfs_target): Make static.
5049 (_initialize_procfs): Call add_target here.
5050 * procfs.h (struct target_ops): Remove forward declaration.
5051 (procfs_target): Remove declaration.
5052 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5054 2018-05-02 Pedro Alves <palves@redhat.com>
5056 * procfs.c (procfs_stopped_by_watchpoint)
5057 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5058 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5060 (procfs_use_watchpoints): Delete, move contents...
5061 (procfs_target): ... here.
5062 * procfs.h (procfs_use_watchpoints): Delete declaration.
5063 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5064 procfs_use_watchpoints.
5065 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5066 procfs_use_watchpoints.
5068 2018-05-02 Tom Tromey <tom@tromey.com>
5071 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5072 and var_zuinteger_unlimited.
5073 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5074 and PARAM_ZUINTEGER_UNLIMITED.
5075 (set_parameter_value): Handle var_zuinteger and
5076 var_zuinteger_unlimited.
5077 (add_setshow_generic): Likewise.
5078 (parmpy_init): Likewise.
5080 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5083 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5084 pointer is not null before dereferencing it.
5086 2018-04-30 Tom Tromey <tom@tromey.com>
5088 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5091 2018-04-30 Tom Tromey <tom@tromey.com>
5093 * breakpoint.c (mention): Remove use of is_mi_like_p.
5094 (print_mention_ranged_breakpoint): Likewise.
5095 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5098 2018-04-30 Tom Tromey <tom@tromey.com>
5100 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5102 2018-04-30 Tom Tromey <tom@tromey.com>
5104 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5105 (info_spu_event_command): Remove some uses of is_mi_like_p.
5107 2018-04-30 Tom Tromey <tom@tromey.com>
5109 * python/py-framefilter.c (py_print_single_arg)
5110 (enumerate_locals, py_print_args, py_print_frame): Remove some
5111 uses of is_mi_like_p.
5113 2018-04-30 Tom Tromey <tom@tromey.com>
5116 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5117 * ui-out.h (ui_out::is_mi_like_p): Now const.
5118 (ui_out::do_is_mi_like_p): Now const.
5119 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5121 2018-04-30 Tom Tromey <tom@tromey.com>
5123 * varobj.c (varobj_set_visualizer): Use new_reference.
5124 * python/python.c (gdbpy_decode_line): Use new_reference.
5125 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5128 2018-04-30 Tom Tromey <tom@tromey.com>
5130 * varobj.c (install_new_value): Use new_reference.
5131 * value.h (value_incref): Return void. Swap intro comment with
5133 * value.c (set_value_parent): Use new_reference.
5134 (value_incref): Return void. Update intro comment.
5135 (release_value): Use new_reference.
5136 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5138 2018-04-30 Tom Tromey <tom@tromey.com>
5140 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5141 * gdb_bfd.h (new_bfd_ref): Remove.
5142 (gdb_bfd_open): Update comment.
5143 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5144 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5145 (gdb_bfd_fdopenr): Use new_reference.
5146 * exec.c (exec_file_attach): Use new_reference.
5148 2018-04-30 Tom Tromey <tom@tromey.com>
5150 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5153 2018-04-30 Tom Tromey <tom@tromey.com>
5155 * jit.c (jit_read_code_entry): Use type_align.
5156 * i386-tdep.c (i386_gdbarch_init): Don't call
5157 set_gdbarch_long_long_align_bit.
5158 * gdbarch.sh: Remove long_long_align_bit.
5159 * gdbarch.c, gdbarch.h: Rebuild.
5160 * arc-tdep.c (arc_type_align): New function.
5161 (arc_gdbarch_init): Use arc_type_align. Don't call
5162 set_gdbarch_long_long_align_bit.
5164 2018-04-30 Tom Tromey <tom@tromey.com>
5166 * rust-lang.c (rust_type_alignment): Remove.
5167 (rust_composite_type): Use type_align.
5169 2018-04-30 Tom Tromey <tom@tromey.com>
5171 * NEWS: Mention Type.align.
5172 * python/py-type.c (typy_get_alignof): New function.
5173 (type_object_getset): Add "alignof".
5175 2018-04-30 Tom Tromey <tom@tromey.com>
5179 * std-operator.def (UNOP_ALIGNOF): New operator.
5180 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5182 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5183 * c-lang.c (c_op_print_tab): Add alignof.
5184 * c-exp.y (ALIGNOF): New token.
5185 (exp): Add "ALIGNOF" production.
5186 (ident_tokens): Add _Alignof and alignof.
5188 2018-04-30 Tom Tromey <tom@tromey.com>
5190 * i386-tdep.c (i386_type_align): New function.
5191 (i386_gdbarch_init): Update.
5192 * gdbarch.sh (type_align): New method.
5193 * gdbarch.c, gdbarch.h: Rebuild.
5194 * arch-utils.h (default_type_align): Declare.
5195 * arch-utils.c (default_type_align): New function.
5196 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5197 (struct type) <align_log2>: New field.
5198 <instance_flags>: Now a bitfield.
5199 (TYPE_RAW_ALIGN): New macro.
5200 (type_align, type_raw_align, set_type_align): Declare.
5201 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5203 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5204 (get_alignment, maybe_set_alignment): New functions.
5205 (read_structure_type, read_enumeration_type, read_array_type)
5206 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5207 (read_subrange_type, read_base_type): Set type alignment.
5209 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5211 * dwarf2read.c (read_index_from_section): Use bool.
5213 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5216 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5219 2018-04-29 John Reiser <jreiser@BitWagon.com>
5222 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5223 last step, and do it atomically.
5225 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5227 * compile/compile-c-types.c (convert_int, convert_float):
5230 2018-04-27 Tom Tromey <tom@tromey.com>
5233 * rust-lang.c (rust_inclusive_range_type_p): New function.
5234 (rust_range): Handle inclusive ranges.
5235 (rust_compute_range): Likewise.
5236 * rust-exp.y (struct rust_op) <inclusive>: New field.
5237 (DOTDOTEQ): New constant.
5238 (range_expr): Add "..=" productions.
5239 (operator_tokens): Add "..=" token.
5240 (ast_range): Add "inclusive" parameter.
5241 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5243 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5245 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5246 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5248 * expprint.c (print_subexp_standard): Handle new bounds values.
5249 (dump_subexp_body_standard): Likewise.
5251 2018-04-27 Tom Tromey <tom@tromey.com>
5253 * configure: Rebuild.
5254 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5255 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5257 (class symbol_needs_eval_context): Likewise.
5258 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5259 (mock_mapped_index::symbol_name_at): Use "override". Remove
5261 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5263 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5264 * aarch64-tdep.c (instruction_reader::read): Use "override".
5265 (instruction_reader_test::read): Likewise.
5266 * arm-tdep.c (instruction_reader::read): Use "override".
5267 (instruction_reader_thumb::read): Likewise.
5269 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5272 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5273 instead of remote_send.
5274 (remote_send): Remove.
5276 2018-04-26 Pedro Alves <palves@redhat.com>
5278 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5279 find_function_start_sal instead of find_pc_line.
5281 2018-04-26 Pedro Alves <palves@redhat.com>
5283 * breakpoint.c (set_breakpoint_location_function): Handle
5285 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5286 * elfread.c (elf_symtab_read): Give data symbols with
5287 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5288 (elf_rel_plt_read): Update comment.
5289 * linespec.c (convert_linespec_to_sals): Handle
5291 (minsym_found): Handle mst_data_gnu_ifunc.
5292 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5293 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5294 * parse.c (find_minsym_type_and_address): Handle
5296 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5297 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5298 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5300 <mst_data_gnu_ifunc>: New enumerator.
5302 2018-04-26 Pedro Alves <palves@redhat.com>
5304 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5305 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5306 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5308 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5309 (lookup_minimal_symbol_by_pc): Adjust.
5310 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5311 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5312 * minsyms.h (lookup_msym_prefer): New enum.
5313 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5314 parameter by a lookup_msym_prefer parameter.
5316 2018-04-26 Pedro Alves <palves@redhat.com>
5318 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5319 ends in "@plt" instead of looking at the symbol's section.
5321 2018-04-26 Pedro Alves <palves@redhat.com>
5323 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5325 (find_pc_partial_function_gnu_ifunc): Rename to ...
5326 (find_pc_partial_function): ... this, and remove references to
5328 (find_pc_partial_function): Delete old implementation.
5329 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5331 2018-04-26 Pedro Alves <palves@redhat.com>
5333 * linespec.c (struct bound_minimal_symbol_search_key): New.
5334 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5335 skip first line if we found a GNU ifunc minimal symbol by name.
5336 (compare_msymbols): Change parameters to work with a destructured
5338 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5341 2018-04-26 Pedro Alves <palves@redhat.com>
5343 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5344 ifunc targets here. Instead, if we have an ifunc minsym, use its
5346 (add_location_to_breakpoint): Store the minsym and the objfile in
5347 the breakpoint location.
5348 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5349 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5350 Record the minsym in the sal.
5351 * symtab.h (symtab_and_line) <msymbol>: New field.
5353 2018-04-26 Pedro Alves <palves@redhat.com>
5355 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5356 unless we actually resolved the ifunc.
5358 2018-04-26 Pedro Alves <palves@redhat.com>
5360 * c-exp.y (variable production): Prefer ifunc minsyms over
5361 regular function symbols.
5362 * symtab.c (find_gnu_ifunc): New function.
5363 * minsyms.h (lookup_msym_prefer): New enum.
5364 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5365 parameter by a lookup_msym_prefer parameter.
5366 * symtab.h (find_gnu_ifunc): New declaration.
5368 2018-04-26 Pedro Alves <palves@redhat.com>
5370 * blockframe.c (find_gnu_ifunc_target_type): New function.
5371 (find_function_type): New.
5372 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5373 return a value with a memory address.
5374 (eval_call): For calls to GNU ifunc functions, try to find the
5375 type of the target function from the type that the resolver
5377 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5379 * infcall.c (find_function_return_type): Delete.
5380 (find_function_addr): Add 'function_type' parameter. For calls to
5381 GNU ifunc functions, try to find the type of the target function
5382 from the type that the resolver returns, and return it via
5384 (call_function_by_hand_dummy): Adjust to use the function type
5385 returned by find_function_addr.
5386 (find_function_addr): Add 'function_type' parameter and move
5388 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5391 2018-04-26 Pedro Alves <palves@redhat.com>
5393 * c-exp.y (variable production): Skip finding an alias for ifunc
5396 2018-04-26 Pedro Alves <palves@redhat.com>
5398 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5400 2018-04-25 Pedro Alves <palves@redhat.com>
5402 * infcmd.c (kill_command): Print the pid as string, not the whole
5403 thread's ptid. Add comment. s/has been killed/killed/ in output
5405 * remote.c (remote_detach_1): Print the pid as string, not the
5406 whole thread's ptid.
5408 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5409 Sergio Durigan Junior <sergiodj@redhat.com>
5410 Pedro Alves <palves@redhat.com>
5412 * infcmd.c (kill_command): Print message when inferior has
5414 * inferior.c (print_inferior_events): Remove 'static'. Set as
5416 (add_inferior): Improve message printed when
5417 'print_inferior_events' is on.
5418 (exit_inferior): Remove message printed when
5419 'print_inferior_events' is on.
5420 (detach_inferior): Improve message printed when
5421 'print_inferior_events' is on.
5422 (initialize_inferiors): Use 'add_inferior_silent' to set
5423 'current_inferior_'.
5424 * inferior.h (print_inferior_events): Declare here as
5426 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5427 '[Detaching...]' messages when 'print_inferior_events' is on.
5428 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5429 as prefix/suffix for messages. Remove periods. Fix erroneous
5430 'Detaching after fork from child...', replace it by '... from
5432 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5433 prefix/suffix when printing 'Detaching...' messages. Print
5434 them when 'print_inferior_events' is on.
5435 * remote.c (remote_detach_1): Print message when detaching
5436 from inferior and '!is_fork_parent'.
5438 2018-04-24 Tom Tromey <tom@tromey.com>
5440 * cli-out.h: Reindent.
5442 2018-04-24 Tom Tromey <tom@tromey.com>
5444 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5445 (cli_ui_out::do_field_string): Use fputs_filtered.
5446 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5448 2018-04-23 Tom Tromey <tom@tromey.com>
5450 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5451 gdb::unique_xmalloc_ptr.
5453 2018-04-23 Tom Tromey <tom@tromey.com>
5455 * configure: Rebuild.
5457 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5460 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5461 prepare_for_testing. Set normal_bp to r_debug_state if target
5464 2018-04-21 Pedro Alves <palves@redhat.com>
5465 Rajendra SY <rajendra.sy@gmail.com>
5467 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5468 * remote.c (extended_remote_attach): In all-stop mode, mark the
5469 thread as executing.
5471 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5473 * thread.c (thread_apply_all_command): Fix comment.
5474 (thread_command): Fix comment.
5476 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5478 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5480 * features/aarch64-core.c (create_feature_aarch64_core):
5482 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5484 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5486 * features/i386/32bit-avx512.c
5487 (create_feature_i386_32bit_avx512): Likewise.
5488 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5490 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5492 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5494 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5496 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5498 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5500 * features/i386/64bit-avx512.c
5501 (create_feature_i386_64bit_avx512): Likewise.
5502 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5504 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5506 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5508 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5510 * features/i386/64bit-segments.c
5511 (create_feature_i386_64bit_segments): Likewise.
5512 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5514 * features/i386/x32-core.c
5515 (create_feature_i386_x32_core): Likewise.
5516 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5517 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5518 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5519 * target-descriptions.c: In generated code, don't pass xml
5522 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5524 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5525 (print_xml_feature::visit_post): Likewise.
5526 (print_xml_feature::visit): Likewise.
5527 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5528 (print_xml_feature): Add new class.
5529 * regformats/regdat.sh: Null xmltarget on feature targets.
5530 * target-descriptions.c (struct target_desc): Add xmltarget.
5531 (maintenance_check_tdesc_xml_convert): Add unittest function.
5532 (tdesc_get_features_xml): Add function to get xml.
5533 (maintenance_check_xml_descriptions): Test xml generation.
5534 * xml-tdesc.c (string_read_description_xml): Add function.
5535 * xml-tdesc.h (string_read_description_xml): Add declaration.
5537 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5539 * features/Makefile: Add feature marker to targets with new style
5540 target descriptions.
5541 * regformats/aarch64.dat: Regenerate.
5542 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5543 * regformats/i386/amd64-avx-linux.dat: Likewise.
5544 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5545 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5546 * regformats/i386/amd64-linux.dat: Likewise.
5547 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5548 * regformats/i386/amd64.dat: Likewise.
5549 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5550 * regformats/i386/i386-avx-linux.dat: Likewise.
5551 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5552 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5553 * regformats/i386/i386-linux.dat: Likewise.
5554 * regformats/i386/i386-mmx-linux.dat: Likewise.
5555 * regformats/i386/i386-mpx-linux.dat: Likewise.
5556 * regformats/i386/i386.dat: Likewise.
5557 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5558 * regformats/i386/x32-avx-linux.dat: Likewise.
5559 * regformats/i386/x32-linux.dat: Likewise.
5560 * regformats/tic6x-c62x-linux.dat: Likewise.
5561 * regformats/tic6x-c64x-linux.dat: Likewise.
5562 * regformats/tic6x-c64xp-linux.dat: Likewise.
5563 * regformats/regdat.sh: Parse feature marker.
5565 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5567 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5568 (tdesc_osabi_name): Likewise.
5569 * target-descriptions.c (tdesc_architecture_name): Add new
5571 (tdesc_osabi_name): Likewise.
5573 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5575 * common/tdesc.c (tdesc_predefined_type): Move to here.
5576 (tdesc_named_type): Likewise.
5577 (tdesc_create_vector): Likewise.
5578 (tdesc_create_struct): Likewise.
5579 (tdesc_set_struct_size): Likewise.
5580 (tdesc_create_union): Likewise.
5581 (tdesc_create_flags): Likewise.
5582 (tdesc_create_enum): Likewise.
5583 (tdesc_add_field): Likewise.
5584 (tdesc_add_typed_bitfield): Likewise.
5585 (tdesc_add_bitfield): Likewise.
5586 (tdesc_add_flag): Likewise.
5587 (tdesc_add_enum_value): Likewise.
5588 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5589 (struct tdesc_type_vector): Likewise.
5590 (struct tdesc_type_field): Likewise.
5591 (struct tdesc_type_with_fields): Likewise.
5592 (tdesc_create_enum): Add declaration.
5593 (tdesc_add_typed_bitfield): Likewise.
5594 (tdesc_add_enum_value): Likewise.
5595 * target-descriptions.c (tdesc_type_field): Move from here.
5596 (tdesc_type_builtin): Likewise.
5597 (tdesc_type_vector): Likewise.
5598 (tdesc_type_with_fields): Likewise.
5599 (tdesc_predefined_types): Likewise.
5600 (tdesc_named_type): Likewise.
5601 (tdesc_create_vector): Likewise.
5602 (tdesc_create_struct): Likewise.
5603 (tdesc_set_struct_size): Likewise.
5604 (tdesc_create_union): Likewise.
5605 (tdesc_create_flags): Likewise.
5606 (tdesc_create_enum): Likewise.
5607 (tdesc_add_field): Likewise.
5608 (tdesc_add_typed_bitfield): Likewise.
5609 (tdesc_add_bitfield): Likewise.
5610 (tdesc_add_flag): Likewise.
5611 (tdesc_add_enum_value): Likewise.
5612 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5613 (tdesc_add_typed_bitfield): Likewise.
5614 (tdesc_add_enum_value): Likewise.
5616 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5618 * common/tdesc.c (tdesc_feature::accept): Move to here.
5619 (tdesc_feature::operator==): Likewise.
5620 (tdesc_create_reg): Likewise.
5621 * common/tdesc.h (tdesc_type_kind): Likewise.
5622 (struct tdesc_type): Likewise.
5623 (struct tdesc_feature): Likewise.
5624 * regformats/regdat.sh: Create a feature.
5625 * target-descriptions.c (tdesc_type_kind): Move from here.
5626 (tdesc_type): Likewise.
5627 (tdesc_type_up): Likewise.
5628 (tdesc_feature): Likewise.
5629 (tdesc_create_reg): Likewise.
5631 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5633 * Makefile.in: Add arch/tdesc.c
5634 * common/tdesc.c: New file.
5635 * common/tdesc.h (tdesc_element_visitor): Move to here.
5636 (tdesc_element): Likewise.
5637 (tdesc_reg): Likewise.
5638 (tdesc_reg_up): Likewise.
5639 * regformats/regdef.h (reg): Add offset to constructors.
5640 * target-descriptions.c (tdesc_element_visitor): Move from here.
5641 (tdesc_element): Likewise.
5642 (tdesc_reg): Likewise.
5643 (tdesc_reg_up): Likewise.
5645 2018-04-17 Tom Tromey <tom@tromey.com>
5647 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5650 2018-04-17 Tom Tromey <tom@tromey.com>
5652 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5654 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5656 * symtab.c (print_symbol_info): Skip printing filename and line
5657 number when `last' is NULL.
5658 (symtab_symbol_info): Use empty string instead of NULL for first
5659 invocation of print_symbol_info.
5660 (rbreak_command): Pass NULL to `last' parameter of
5663 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5665 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5668 2018-04-16 Pedro Alves <palves@redhat.com>
5670 * MAINTAINERS (sh): Remove.
5671 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5672 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5673 (ALLDEPFILES): Remove sh64-tdep.c.
5674 * NEWS: Mentions that support for SH-5/SH64 is removed.
5675 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5676 (sh*-*-openbsd*): Ditto.
5677 (sh64-*-elf*): Remove.
5679 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5680 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5681 * sh-tdep.c: No longer include "sh64-tdep.h".
5682 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5683 * sh64-tdep.c, sh64-tdep.h: Remove files.
5685 2018-04-16 Pedro Alves <palves@redhat.com>
5687 * MAINTAINERS: Remove m88k.
5688 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5689 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5690 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5691 * NEWS: Mention that support for m88k was removed.
5692 * configure.host (m88*-*-*): Remove support.
5693 * configure.nat (m88k-*-*): Remove support.
5694 * configure.tgt (m88*-*-openbsd*): Remove.
5695 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5697 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5699 * configure.tgt (x86_tobjs): New variable.
5700 (amd64_tobjs, i386_tobjs): Use it.
5702 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5704 * symtab.c (print_symbol_info): Precede the symbol definition by
5705 the line number when available.
5706 * NEWS: Advertise this enhancement.
5708 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5710 * NEWS (New options): announce set/show record btrace cpu.
5711 * btrace.c: Include record-btrace.h.
5712 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5713 the vendor is unknown.
5714 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5715 Maybe overwrite the btrace configuration's cpu.
5716 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5717 (btrace_fetch): Add cpu parameter. Update callers.
5718 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5719 Maybe overwrite the btrace configuration's cpu. Skip enabling
5720 errata workarounds if the vendor is unknown.
5721 * python/py-record-btrace.c: Include record-btrace.h.
5722 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5723 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5724 * record-btrace.c (record_btrace_cpu_state_kind): New.
5725 (record_btrace_cpu): New.
5726 (set_record_btrace_cpu_cmdlist): New.
5727 (record_btrace_get_cpu): New.
5728 (require_btrace_thread, record_btrace_info)
5729 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5730 (cmd_set_record_btrace_cpu_none): New.
5731 (cmd_set_record_btrace_cpu_auto): New.
5732 (cmd_set_record_btrace_cpu): New.
5733 (cmd_show_record_btrace_cpu): New.
5734 (_initialize_record_btrace): Initialize set/show record btrace cpu
5736 * record-btrace.h (record_btrace_get_cpu): New.
5738 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5740 * record.c (set_record_command): Fix typo in message.
5742 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5744 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5746 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5748 * infrun.c (process_event_stop_test): Call
5749 gdbarch_in_indirect_branch_thunk.
5750 * gdbarch.sh (in_indirect_branch_thunk): New.
5751 * gdbarch.c: Regenerated.
5752 * gdbarch.h: Regenerated.
5755 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5756 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5757 (ALLDEPFILES): Add x86-tdep.c.
5758 * arch-utils.h (default_in_indirect_branch_thunk): New.
5759 * arch-utils.c (default_in_indirect_branch_thunk): New.
5760 * i386-tdep: Include x86-tdep.h.
5761 (i386_in_indirect_branch_thunk): New.
5762 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5764 * amd64-tdep: Include x86-tdep.h.
5765 (amd64_in_indirect_branch_thunk): New.
5766 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5768 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5771 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5772 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5773 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5776 2018-04-12 Tom Tromey <tom@tromey.com>
5778 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5779 (rust_evaluate_subexp): Likewise.
5781 2018-04-12 Pedro Alves <palves@redhat.com>
5783 * procfs.c (procfs_detach): Make forward declaration's prototype
5784 match definition's protototype.
5785 (proc_get_LDT_entry): Remove stale do_cleanups call.
5787 2018-04-12 Pedro Alves <palves@redhat.com>
5789 * target.h (target_ops::to_has_exited): Delete.
5790 (target_has_exited): Delete.
5791 * target-delegates.c: Regenerate.
5793 2018-04-11 Pedro Alves <palves@redhat.com>
5795 * target.c (fileio_fh_t::t): Add comment.
5796 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5797 (target_fileio_close): Handle a NULL target.
5798 (invalidate_fileio_fh): New.
5799 (target_close): Call it.
5800 * remote.c (remote_hostio_send_command): No longer check whether
5801 remote_desc is open.
5803 2018-04-11 Pedro Alves <palves@redhat.com>
5805 * target.c (fileio_fh_t): Make it a named struct instead of a
5807 (fileio_fh_t::is_closed): New method.
5808 (DEF_VEC_O (fileio_fh_t)): Remove.
5809 (fileio_fhandles): Now a std::vector.
5810 (is_closed_fileio_fh): Delete.
5811 (acquire_fileio_fd): Adjust. Rename parameters.
5812 (release_fileio_fd): Adjust.
5813 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5814 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5815 (target_fileio_close): Adjust.
5817 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5819 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5822 2018-04-10 Pedro Alves <palves@redhat.com>
5824 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5825 (scoped_finish_thread_state): New class.
5826 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5828 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5829 (fetch_inferior_event, normal_stop): Likewise.
5830 * thread.c (finish_thread_state_cleanup): Delete.
5832 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5833 Pedro Alves <palves@redhat.com>
5835 * value.c: Include "selftest.h" and "common/array-view.h".
5836 (struct range) <operator ==>: New.
5837 (test_ranges_contain): New.
5838 (check_ranges_vector): New.
5839 (test_insert_into_bit_range_vector): New.
5840 (_initialize_values): Register selftests.
5841 * common/array-view.h (operator==, operator!=): New.
5843 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5845 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5847 * inline-frame.c: Include <algorithm>.
5848 (struct inline_state): Add constructor.
5849 (inline_state_s): Remove.
5850 (DEF_VEC_O(inline_state_s)): Remove.
5851 (inline_states): Change type to std::vector.
5852 (find_inline_frame_state): Adjust to std::vector.
5853 (allocate_inline_frame_state): Remove.
5854 (clear_inline_frame_state): Adjust to std::vector.
5855 (skip_inline_frames): Adjust to std::vector.
5857 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5859 * tracepoint.h (struct trace_state_variable): Add constructor.
5860 <name>: Change type to std::string.
5861 * tracepoint.c (tsv_s): Remove.
5862 (DEF_VEC_O(tsv_s)): Remove.
5863 (tvariables): Change to std::vector.
5864 (create_trace_state_variable): Adjust to std::vector.
5865 (find_trace_state_variable): Likewise.
5866 (find_trace_state_variable_by_number): Likewise.
5867 (delete_trace_state_variable): Likewise.
5868 (trace_variable_command): Adjust to std::string.
5869 (delete_trace_variable_command): Likewise.
5870 (tvariables_info_1): Adjust to std::vector.
5871 (save_trace_state_variables): Likewise.
5872 (start_tracing): Likewise.
5873 (merge_uploaded_trace_state_variables): Adjust to std::vector
5875 * target.h (struct target_ops)
5876 <to_download_trace_state_variable>: Pass reference to
5877 trace_state_variable.
5878 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5879 * target-delegates.c: Re-generate.
5880 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5881 (mi_tsv_deleted): Likewise.
5882 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5883 * remote.c (remote_download_trace_state_variable): Change
5884 pointer to reference and adjust.
5885 * make-target-delegates (parse_argtypes): Handle references.
5886 (write_function_header): Likewise.
5887 (munge_type): Likewise.
5889 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5891 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5892 string_view-selftests.c.
5893 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5895 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5896 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5897 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5898 * unittests/basic_string_view/element_access/char/1.cc:
5900 * unittests/basic_string_view/element_access/char/empty.cc:
5902 * unittests/basic_string_view/element_access/char/front_back.cc:
5904 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5905 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5907 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5909 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5911 * unittests/basic_string_view/operations/compare/char/1.cc:
5913 * unittests/basic_string_view/operations/compare/char/13650.cc:
5915 * unittests/basic_string_view/operations/copy/char/1.cc:
5917 * unittests/basic_string_view/operations/data/char/1.cc:
5919 * unittests/basic_string_view/operations/find/char/1.cc:
5921 * unittests/basic_string_view/operations/find/char/2.cc:
5923 * unittests/basic_string_view/operations/find/char/3.cc:
5925 * unittests/basic_string_view/operations/find/char/4.cc:
5927 * unittests/basic_string_view/operations/rfind/char/1.cc:
5929 * unittests/basic_string_view/operations/rfind/char/2.cc:
5931 * unittests/basic_string_view/operations/rfind/char/3.cc:
5933 * unittests/basic_string_view/operations/substr/char/1.cc:
5935 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5936 * unittests/string_view-selftests.c: New file.
5938 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5940 * unittests/basic_string_view/capacity/1.cc: New file.
5941 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5942 * unittests/basic_string_view/cons/char/1.cc: New file.
5943 * unittests/basic_string_view/cons/char/2.cc: New file.
5944 * unittests/basic_string_view/cons/char/3.cc: New file.
5945 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5946 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5947 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5948 * unittests/basic_string_view/element_access/char/1.cc: New file.
5949 * unittests/basic_string_view/element_access/char/2.cc: New file.
5950 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5951 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5952 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5953 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5954 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5955 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5956 * unittests/basic_string_view/include.cc: New file.
5957 * unittests/basic_string_view/inserters/char/1.cc: New file.
5958 * unittests/basic_string_view/inserters/char/2.cc: New file.
5959 * unittests/basic_string_view/inserters/char/3.cc: New file.
5960 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5961 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5962 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5963 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5964 * unittests/basic_string_view/literals/types.cc: New file.
5965 * unittests/basic_string_view/literals/values.cc: New file.
5966 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5967 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5968 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5969 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5970 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5971 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5972 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5973 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5974 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5975 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5976 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5977 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5978 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5979 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5980 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5981 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5982 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5983 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5984 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5985 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5986 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5987 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5988 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5989 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5990 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5991 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5992 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5993 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5994 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5995 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5996 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5997 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5998 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5999 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6000 * unittests/basic_string_view/operators/char/2.cc: New file.
6001 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6002 * unittests/basic_string_view/range_access/char/1.cc: New file.
6003 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6004 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6005 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6006 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6007 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6008 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6009 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6010 * unittests/basic_string_view/typedefs.cc: New file.
6011 * unittests/basic_string_view/types/1.cc: New file.
6013 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6015 * common/gdb_string_view.h: Remove libstdc++ implementation
6016 details, adjust to gdb reality.
6017 * common/gdb_string_view.tcc: Likewise.
6018 * cli/cli-script.c (struct string_view): Remove.
6019 (user_args) <m_args>: Change element type to gdb::string_view.
6020 (user_args::insert_args): Adjust.
6022 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6024 * common/gdb_string_view.h: New file.
6025 * common/gdb_string_view.tcc: New file.
6027 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6029 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6030 * configure: Re-generate.
6032 2018-04-09 Pedro Alves <palves@redhat.com>
6034 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6035 (set_target_gdbarch): Call
6036 gdb::observers::architecture_changed.notify instead of
6037 observer_notify_architecture_changed.
6039 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6041 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6042 (do_restore_current_traceframe_cleanup): Remove.
6043 (restore_current_traceframe_cleanup_dtor): Remove.
6044 (make_cleanup_restore_current_traceframe): Remove.
6045 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6047 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6048 * infrun.c (fetch_inferior_event): Use
6049 scoped_restore_current_traceframe.
6051 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6053 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6055 <n_allocated_type_units>: Remove.
6056 <all_type_units>: Change to std::vector.
6057 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6058 to std::vector change.
6059 (dwarf2_per_objfile::get_cutu): Likewise.
6060 (dwarf2_per_objfile::get_tu): Likewise.
6061 (create_signatured_type_table_from_index): Likewise.
6062 (create_signatured_type_table_from_debug_names): Likewise.
6063 (dw2_symtab_iter_next): Likewise.
6064 (dw2_print_stats): Likewise.
6065 (dw2_expand_all_symtabs): Likewise.
6066 (dw2_expand_marked_cus): Likewise.
6067 (dw2_debug_names_iterator::next): Likewise.
6068 (dwarf2_initialize_objfile): Likewise.
6069 (add_signatured_type_cu_to_table): Likewise.
6070 (create_all_type_units): Likewise.
6071 (add_type_unit): Likewise.
6072 (struct tu_abbrev_offset): Add constructor.
6073 (build_type_psymtabs_1): Adjust to std::vector change.
6074 (print_tu_stats): Likewise.
6075 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6076 (write_debug_names): Likewise.
6078 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6080 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6081 Make an std::vector.
6082 <n_comp_units>: Remove.
6083 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6084 to std::vector change.
6085 (dwarf2_per_objfile::get_cutu): Likewise.
6086 (dwarf2_per_objfile::get_cu): Likewise.
6087 (create_cus_from_index): Likewise.
6088 (create_addrmap_from_index): Likewise.
6089 (create_addrmap_from_aranges): Likewise.
6090 (dwarf2_read_index): Likewise.
6091 (dw2_find_last_source_symtab): Likewise.
6092 (dw2_map_symtabs_matching_filename): Likewise.
6093 (dw2_symtab_iter_next): Likewise.
6094 (dw2_print_stats): Likewise.
6095 (dw2_expand_all_symtabs): Likewise.
6096 (dw2_expand_symtabs_with_fullname): Likewise.
6097 (dw2_expand_marked_cus): Likewise.
6098 (dw2_map_symbol_filenames): Likewise.
6099 (create_cus_from_debug_names): Likewise.
6100 (dwarf2_read_debug_names): Likewise.
6101 (dw2_debug_names_iterator::next): Likewise.
6102 (dwarf2_initialize_objfile): Likewise.
6103 (set_partial_user): Likewise.
6104 (dwarf2_build_psymtabs_hard): Likewise.
6105 (read_comp_units_from_section): Remove arguments, adjust to
6107 (create_all_comp_units): Adjust to std::vector and
6108 read_comp_units_from_section changes.
6109 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6111 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6112 (psyms_seen_size): Likewise.
6113 (write_gdbindex): Likewise.
6114 (write_debug_names): Likewise.
6116 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6118 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6119 with dwarf2_per_objfile.
6120 (create_cus_from_index): Likewise.
6121 (create_signatured_type_table_from_index): Likewise.
6122 (dwarf2_read_index): Likewise.
6123 (dwarf2_initialize_objfile): Likewise.
6124 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6125 per_cu rather than get_dwarf2_per_objfile.
6127 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6129 * dwarf2read.h (struct signatured_type): Forward declare.
6130 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6132 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6133 (dw2_get_cutu): ...this.
6134 (dwarf2_per_objfile::get_cu): Rename from...
6135 (dw2_get_cu): ...this.
6136 (dwarf2_per_objfile::get_tu): New.
6137 (create_addrmap_from_index): Adjust.
6138 (create_addrmap_from_aranges): Adjust.
6139 (dw2_find_last_source_symtab): Adjust.
6140 (dw2_map_symtabs_matching_filename): Adjust.
6141 (dw2_symtab_iter_next): Adjust.
6142 (dw2_print_stats): Adjust.
6143 (dw2_expand_all_symtabs): Adjust.
6144 (dw2_expand_symtabs_with_fullname): Adjust.
6145 (dw2_expand_marked_cus): Adjust.
6146 (dw_expand_symtabs_matching_file_matcher): Adjust.
6147 (dw2_map_symbol_filenames): Adjust.
6148 (dw2_debug_names_iterator::next): Adjust.
6149 (dwarf2_initialize_objfile): Adjust.
6150 (set_partial_user): Adjust.
6151 (dwarf2_build_psymtabs_hard): Adjust.
6153 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6155 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6156 Remove unused variables.
6157 (dw2_map_symtabs_matching_filename): Likewise.
6158 (dwarf2_record_block_ranges): Likewise.
6159 (dwarf2_read_addr_index): Likewise.
6160 (follow_die_offset): Likewise.
6162 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6164 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6165 to symbol_file_add_main.
6167 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6170 * mi/mi-console.c (do_fputc_async_safe): New.
6171 (mi_console_file::write_async_safe): New.
6172 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6173 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6175 * ui-file.c (ui_file::putstrn): Adjust call to
6176 fputstrn_unfiltered.
6177 * utils.c (printchar): Replace do_fputs and do_fprintf
6178 parameters by do_fputc.
6179 (fputstr_filtered): Adjust call to printchar.
6180 (fputstr_unfiltered): Likewise.
6181 (fputstrn_filtered): Likewise.
6182 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6184 * utils.h (do_fputc_ftype): New typedef.
6185 (fputstrn_unfiltered): Add do_fputc parameter.
6187 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6189 * regformats/i386/i386-avx.dat: Remove.
6191 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6194 * amd64-tdep.c (amd64_none_init_abi): New function.
6195 (amd64_x32_none_init_abi): New function.
6196 (_initialize_amd64_tdep): Register handlers for x86-64 and
6197 x64_32 with GDB_OSABI_NONE.
6198 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6199 GDB_OSABI_NONE osabi.
6201 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6204 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6206 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6207 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6209 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6211 * common/byte-vector.h (char_vector): New type.
6212 * target.h (target_read_alloc): Return
6213 gdb::optional<byte_vector>.
6214 (target_read_stralloc): Return gdb::optional<char_vector>.
6215 (target_get_osdata): Return gdb::optional<char_vector>.
6216 * target.c (target_read_alloc_1): Templatize. Replacement
6217 manual memory management with vector.
6218 (target_read_alloc): Change return type, adjust.
6219 (target_read_stralloc): Change return type, adjust.
6220 (target_get_osdata): Change return type, adjust.
6221 * auxv.c (struct auxv_info) <length>: Remove.
6222 <data>: Change type to gdb::optional<byte_vector>.
6223 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6224 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6225 (target_auxv_search): Adjust.
6226 (fprint_target_auxv): Adjust.
6227 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6228 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6229 (linux_make_corefile_notes): Adjust.
6230 * osdata.c (get_osdata): Adjust.
6231 * remote.c (remote_get_threads_with_qxfer): Adjust.
6232 (remote_memory_map): Adjust.
6233 (remote_traceframe_info): Adjust.
6234 (btrace_read_config): Adjust.
6235 (remote_read_btrace): Adjust.
6236 (remote_pid_to_exec_file): Adjust.
6237 * solib-aix.c (solib_aix_get_library_list): Adjust.
6238 * solib-dsbt.c (decode_loadmap): Don't free buf.
6239 (dsbt_get_initial_loadmaps): Adjust.
6240 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6241 * solib-target.c (solib_target_current_sos): Adjust.
6242 * tracepoint.c (sdata_make_value): Adjust.
6243 * xml-support.c (xinclude_start_include): Adjust.
6244 (xml_fetch_content_from_file): Adjust.
6245 * xml-support.h (xml_fetch_another): Change return type.
6246 (xml_fetch_content_from_file): Change return type.
6247 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6248 * xml-tdesc.c (file_read_description_xml): Adjust.
6249 (fetch_available_features_from_target): Change return type.
6250 (target_fetch_description_xml): Adjust.
6251 (target_read_description_xml): Adjust.
6253 2018-04-06 Tom Tromey <tom@tromey.com>
6255 * value.c (~value): Update.
6256 (struct value) <contents>: Now unique_xmalloc_ptr.
6257 (value_contents_bits_eq, allocate_value_contents)
6258 (value_contents_raw, value_contents_all_raw)
6259 (value_contents_for_printing, value_contents_for_printing_const)
6260 (set_value_enclosing_type): Update.
6262 2018-04-06 Tom Tromey <tom@tromey.com>
6264 * value.c (range_s): Remove typedef, VEC.
6265 (struct range): Add operator<.
6266 (range_lessthan): Remove.
6267 (ranges_contain): Change type.
6269 (struct value) <unavailable, optimized_out>: Now std::vector.
6270 (value_entirely_available)
6271 (value_entirely_covered_by_range_vector)
6272 (value_entirely_unavailable, value_entirely_optimized_out):
6274 (insert_into_bit_range_vector): Change argument type.
6275 (find_first_range_overlap): Likewise.
6276 (struct ranges_and_idx, value_contents_bits_eq)
6277 (require_not_optimized_out, require_available): Update.
6278 (ranges_copy_adjusted): Change argument types.
6279 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6281 2018-04-06 Tom Tromey <tom@tromey.com>
6283 * value.c (~value): Update.
6284 (struct value) <parent>: Now a value_ref_ptr.
6285 (value_parent, set_value_parent, value_address, value_copy):
6288 2018-04-06 Tom Tromey <tom@tromey.com>
6290 * value.c (struct value): Add constructor, destructor, and member
6292 (allocate_value_lazy, value_decref): Update.
6294 2018-04-06 Tom Tromey <tom@tromey.com>
6296 * value.c (struct value) <released, next>: Remove.
6297 (all_values): Now a std::vector.
6298 (allocate_value_lazy): Update.
6299 (value_next): Remove.
6300 (value_mark, value_free_to_mark, release_value)
6301 (value_release_to_mark): Update.
6303 2018-04-06 Tom Tromey <tom@tromey.com>
6305 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6306 (free_value_chain): Remove.
6307 * value.c (free_value_chain): Remove.
6308 (value_release_to_mark): Return a std::vector.
6309 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6311 (check_condition): Update.
6312 * eval.c (fetch_subexp_value): Change "val_chain" to a
6314 * breakpoint.c (update_watchpoint): Update.
6315 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6317 2018-04-06 Tom Tromey <tom@tromey.com>
6319 * value.h (free_all_values): Remove.
6320 * value.c (free_all_values): Remove.
6322 2018-04-06 Tom Tromey <tom@tromey.com>
6324 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6325 (value_history_chain, value_history_count): Remove.
6326 (value_history): New global.
6327 (record_latest_value, access_value_history, show_values)
6328 (preserve_values): Update.
6330 2018-04-06 Tom Tromey <tom@tromey.com>
6332 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6333 * varobj.c (varobj_set_display_format, varobj_set_value)
6334 (install_default_visualizer, construct_visualizer)
6335 (install_new_value, ~varobj, varobj_get_value_type)
6336 (my_value_of_variable, varobj_editable_p): Update.
6337 * c-varobj.c (c_describe_child, c_value_of_variable)
6338 (cplus_number_of_children, cplus_describe_child): Update.
6339 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6340 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6341 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6343 2018-04-06 Tom Tromey <tom@tromey.com>
6345 * printcmd.c (last_examine_address): Change type to
6347 (do_examine, x_command): Update.
6349 2018-04-06 Tom Tromey <tom@tromey.com>
6351 * value.c (release_value): Update.
6352 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6353 (struct bpstats) <val>: Now a value_ref_ptr.
6354 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6355 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6356 (~watchpoint, print_it_watchpoint, watch_command_1)
6357 (invalidate_bp_value_on_memory_change): Update.
6359 2018-04-06 Tom Tromey <tom@tromey.com>
6361 * varobj.c (varobj_clear_saved_item)
6362 (update_dynamic_varobj_children, install_new_value, ~varobj):
6364 * value.h (value_incref): Move declaration earlier.
6365 (value_decref): Rename from value_free.
6366 (struct value_ref_policy): New.
6367 (value_ref_ptr): New typedef.
6368 (struct value_deleter): Remove.
6369 (gdb_value_up): Remove typedef.
6370 (release_value): Change return type.
6371 (release_value_or_incref): Remove.
6372 * value.c (set_value_parent): Update.
6373 (value_incref): Change return type.
6374 (value_decref): Rename from value_free.
6375 (value_free_to_mark, free_all_values, free_value_chain): Update.
6376 (release_value): Return value_ref_ptr.
6377 (release_value_or_incref): Remove.
6378 (record_latest_value, set_internalvar, clear_internalvar):
6380 * stack.c (info_frame_command): Don't call value_free.
6381 * python/py-value.c (valpy_dealloc, valpy_new)
6382 (value_to_value_object): Update.
6383 * printcmd.c (do_examine): Update.
6384 * opencl-lang.c (lval_func_free_closure): Update.
6385 * mi/mi-main.c (register_changed_p): Don't call value_free.
6386 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6387 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6388 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6390 * guile/scm-value.c (vlscm_free_value_smob)
6391 (vlscm_scm_from_value): Update.
6392 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6393 (frame_unwind_register_unsigned, get_frame_register_bytes)
6394 (put_frame_register_bytes): Don't call value_free.
6395 * findvar.c (address_from_register): Don't call value_free.
6396 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6397 * dwarf2loc.c (entry_data_value_free_closure)
6398 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6399 (dwarf2_evaluate_loc_desc_full): Update.
6400 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6401 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6402 (~watchpoint, watch_command_1)
6403 (invalidate_bp_value_on_memory_change): Update.
6404 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6406 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6409 * warning.m4: Add -Wno-error=deprecated-register.
6410 * configure: Re-generate.
6412 2018-04-05 Tom Tromey <tom@tromey.com>
6414 * linespec.h: Remove include of "vec.h".
6416 2018-04-05 Tom Tromey <tom@tromey.com>
6418 * linespec.c (typep): Remove typedef.
6419 (find_methods, find_superclass_methods): Take a std::vector.
6420 (find_method): Use std::vector.
6422 2018-04-05 Tom Tromey <tom@tromey.com>
6424 * utils.c (compare_strings): Remove.
6425 * utils.h (compare_strings): Remove.
6426 * objc-lang.h (find_imps): Update.
6427 * objc-lang.c (find_methods): Take a std::vector.
6428 (uniquify_strings, find_imps): Likewise.
6429 * linespec.c (find_methods): Take a std::vector.
6430 (decode_objc): Use std::vector.
6431 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6433 (find_method, find_function_symbols): Use std::vector.
6435 2018-04-05 Tom Tromey <tom@tromey.com>
6437 * completer.c (completion_tracker::completion_tracker): Remove
6439 (completion_tracker::discard_completions): Likewise.
6440 * breakpoint.c (ambiguous_names_p): Remove cast.
6441 * ada-lang.c (_initialize_ada_language): Remove cast.
6442 * utils.h (streq): Update.
6443 (streq_hash): Add new declaration.
6444 * utils.c (streq): Return bool.
6445 (streq_hash): New function.
6447 2018-04-05 Tom Tromey <tom@tromey.com>
6449 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6450 Remove a string copy.
6452 2018-04-05 Tom Tromey <tom@tromey.com>
6454 * linespec.c (filter_results): Use std::vector.
6455 (decode_line_2, decode_line_full): Update.
6457 2018-04-05 Tom Tromey <tom@tromey.com>
6459 * linespec.c (canonical_to_fullform): Return std::string.
6460 (filter_results): Update.
6461 (struct decode_line_2_item): Add constructor.
6462 <fullform, displayform>: Now std::string.
6463 (decode_line_2_compare_items): Now a std::sort comparator.
6464 (decode_line_2): Update.
6466 2018-04-05 Tom Tromey <tom@tromey.com>
6468 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6469 (unexpected_linespec_error): Update.
6470 (linespec_parse_basic, parse_linespec): Update.
6472 2018-04-05 Tom Tromey <tom@tromey.com>
6474 * linespec.c (linespec_parse_basic): Reindent.
6476 2018-04-05 Tom Tromey <tom@tromey.com>
6478 * minsyms.h (iterate_over_minimal_symbols): Update.
6479 * minsyms.c (iterate_over_minimal_symbols): Take a
6481 * linespec.c (struct collect_minsyms): Remove.
6482 (compare_msyms): Now a std::sort comparator.
6483 (add_minsym): Add parameters.
6484 (search_minsyms_for_name): Update. Use std::vector.
6486 2018-04-03 Tom Tromey <tom@tromey.com>
6488 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6491 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6493 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6495 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6498 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6499 printing static type.
6501 2018-04-01 Tom Tromey <tom@tromey.com>
6503 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6504 (rs6000_xfer_shared_libraries): Update.
6506 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6508 * common/gdb_vecs.h (char_ptr): Remove.
6509 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6511 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6513 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6515 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6517 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6519 * tracepoint.h (struct uploaded_tp): Initialize fields.
6520 <actions, step_actions, cmd_strings>: Change type to
6521 std::vector<char *>.
6522 * tracepoint.c (get_uploaded_tp): Allocate with new.
6523 (free_uploaded_tps): Free with delete.
6524 (parse_tracepoint_definition): Adjust to std::vector change.
6525 * breakpoint.c (read_uploaded_action): Likewise.
6526 (create_tracepoint_from_upload): Likewise.
6527 * ctf.c (ctf_write_uploaded_tp): Likewise.
6528 (SET_ARRAY_FIELD): Likewise.
6529 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6531 2018-03-30 Tom Tromey <tom@tromey.com>
6533 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6535 (svr4_keep_data_in_core): Update.
6536 (svr4_read_so_list): Update.
6538 2018-03-30 Tom Tromey <tom@tromey.com>
6540 * windows-nat.c (handle_output_debug_string, handle_exception):
6542 * target.h (target_read_string): Update.
6543 * target.c (target_read_string): Change "string" to
6545 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6547 * solib-frv.c (frv_current_sos): Update.
6548 * solib-dsbt.c (dsbt_current_sos): Update.
6549 * solib-darwin.c (darwin_current_sos): Update.
6550 * linux-thread-db.c (inferior_has_bug): Update.
6551 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6552 Update. Remove alloca.
6553 * ada-lang.c (ada_main_name): Update.
6555 2018-03-30 Tom Tromey <tom@tromey.com>
6557 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6558 (struct dwo_file_deleter): New.
6559 (dwo_file_up): New typedef.
6560 (open_and_init_dwo_file): Use dwo_file_up.
6561 (free_dwo_file_cleanup): Remove.
6563 2018-03-30 Tom Tromey <tom@tromey.com>
6565 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6566 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6568 2018-03-30 Tom Tromey <tom@tromey.com>
6570 * dwarf2read.c (class free_cached_comp_units): New class.
6571 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6572 (free_cached_comp_units): Remove function.
6574 2018-03-30 Tom Tromey <tom@tromey.com>
6576 * utils.h (make_cleanup_unpush_target): Remove.
6577 * inf-ptrace.c (struct target_unpusher): New.
6578 (target_unpush_up) New typedef.
6579 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6581 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6583 2018-03-27 Tom Tromey <tom@tromey.com>
6585 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6587 2018-03-27 Pedro Alves <palves@redhat.com>
6588 Tom Tromey <tom@tromey.com>
6590 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6591 destructor. Now a class.
6592 (gdb_readline_wrapper_cleanup): Remove function.
6593 (gdb_readline_wrapper): Remove cleanups.
6595 2018-03-27 Tom Tromey <tom@tromey.com>
6597 * typeprint.h (struct type_print_options) <local_typedefs,
6598 global_typedefs>: Remove "struct" keyword.
6599 (class typedef_hash_table): New class.
6600 (recursively_update_typedef_hash, add_template_parameters)
6601 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6602 (find_typedef_in_hash): Don't declare.
6603 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6604 (typedef_hash_table::recursively_update): Rename from
6605 recursively_update_typedef_hash. Now a member.
6606 (typedef_hash_table::add_template_parameters): Rename from
6607 add_template_parameters. Now a member.
6608 (typedef_hash_table::typedef_hash_table): Now a constructor;
6609 rename from create_typedef_hash.
6610 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6611 rename from free_typedef_hash.
6612 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6613 (do_free_global_table): Remove.
6614 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6615 from copy_type_recursive.
6616 (create_global_typedef_table): Remove.
6617 (typedef_hash_table::find_global_typedef): Now a member of
6619 (typedef_hash_table::find_typedef): Rename from
6620 find_typedef_in_hash; now a member.
6621 (whatis_exp): Update.
6622 * extension.h (struct ext_lang_type_printers): Add constructor and
6624 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6626 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6627 Now a constructor; rename from start_ext_lang_type_printers.
6628 (ext_lang_type_printers): Now a destructor; rename from
6629 free_ext_lang_type_printers.
6630 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6632 (c_type_print_base_struct_union): Update. Remove cleanups.
6634 2018-03-27 Tom Tromey <tom@tromey.com>
6636 * dwarf-index-write.c: Include <cmath>.
6638 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6640 * NEWS: Add entry describing new "set|show varsize-limit" command.
6641 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6643 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6646 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6648 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6650 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6651 * dwarf-index-common.c: New file.
6652 * dwarf-index-common.h: New file.
6653 * dwarf-index-write.c: New file.
6654 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6655 (struct dwarf2_section_info): Move from here.
6656 (dwarf2_section_info_def): Likewise.
6657 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6658 (offset_type): Likewise.
6659 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6660 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6661 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6662 (byte_swap): Likewise.
6663 (MAYBE_SWAP): Likewise.
6664 (dwarf2_per_cu_ptr): Likewise.
6665 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6666 (struct tu_stats): Likewise.
6667 (struct dwarf2_per_objfile): Likewise.
6668 (struct dwarf2_per_cu_data): Likewise.
6669 (struct signatured_type): Likewise.
6670 (sig_type_ptr): Likewise.
6671 (DEF_VEC_P (sig_type_ptr)): Likewise.
6672 (INDEX4_SUFFIX): Likewise.
6673 (INDEX5_SUFFIX): Likewise.
6674 (DEBUG_STR_SUFFIX): Likewise.
6675 (dwarf2_read_section): Make non-static.
6676 (mapped_index_string_hash): Move from here.
6677 (dwarf5_djb_hash): Likewise.
6678 (file_write): Likewise.
6679 (class data_buf): Likewise.
6680 (struct symtab_index_entry): Likewise.
6681 (struct mapped_symtab): Likewise.
6682 (find_slot): Likewise.
6683 (hash_expand): Likewise.
6684 (add_index_entry): Likewise.
6685 (uniquify_cu_indices): Likewise.
6686 (class c_str_view): Likewise.
6687 (class c_str_view_hasher): Likewise.
6688 (class vector_hasher): Likewise.
6689 (write_hash_table): Likewise.
6690 (psym_index_map): Likewise.
6691 (struct addrmap_index_data): Likewise.
6692 (add_address_entry): Likewise.
6693 (add_address_entry_worker): Likewise.
6694 (write_address_map): Likewise.
6695 (symbol_kind): Likewise.
6696 (write_psymbols): Likewise.
6697 (struct signatured_type_index_data): Likewise.
6698 (write_one_signatured_type): Likewise.
6699 (recursively_count_psymbols): Likewise.
6700 (recursively_write_psymbols): Likewise.
6701 (class debug_names): Likewise.
6702 (check_dwarf64_offsets): Likewise.
6703 (psyms_seen_size): Likewise.
6704 (write_gdbindex): Likewise.
6705 (write_debug_names): Likewise.
6706 (assert_file_size): Likewise.
6707 (write_psymtabs_to_index): Likewise.
6708 (save_gdb_index_command): Likewise.
6709 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6711 * dwarf2read.h: New file.
6713 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6716 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6717 symbol name if the CU's language stores symbol names in linkage
6719 * language.h (struct language_defn)
6720 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6721 all instances of this struct.
6723 2018-03-26 Tom Tromey <tom@tromey.com>
6725 * stack.c (backtrace_command_1): Remove verbose code.
6727 2018-03-26 Tom Tromey <tom@tromey.com>
6729 * python/py-framefilter.c (py_print_type): Don't catch
6730 exceptions. Return void.
6731 (py_print_value): Likewise.
6732 (py_print_single_arg): Likewise.
6733 (enumerate_args): Don't catch exceptions.
6734 (py_print_args): Likewise.
6735 (py_print_frame): Likewise.
6736 (gdbpy_apply_frame_filter): Catch exceptions here.
6738 2018-03-26 Tom Tromey <tom@tromey.com>
6740 * stack.c (_initialize_stack): Remove trailing newlines from help
6741 text. Add "Usage" line to "backtrace" help.
6743 2018-03-26 Tom Tromey <tom@tromey.com>
6746 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6748 2018-03-26 Tom Tromey <tom@tromey.com>
6750 * python/py-framefilter.c (py_print_single_arg): Return
6751 EXT_LANG_BT_ERROR from catch.
6753 2018-03-26 Tom Tromey <tom@tromey.com>
6756 * stack.c (backtrace_command_1): Move some code into no-filters
6759 2018-03-26 Tom Tromey <tom@tromey.com>
6761 * python/py-framefilter.c (throw_quit_or_print_exception): New
6763 (gdbpy_apply_frame_filter): Use it.
6765 2018-03-26 Tom Tromey <tom@tromey.com>
6768 * python/py-framefilter.c (py_print_type, py_print_value)
6769 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6772 2018-03-26 Tom Tromey <tom@tromey.com>
6774 * python/py-framefilter.c (enumerate_args): Use
6775 gdb::unique_xmalloc_ptr.
6777 2018-03-26 Tom Tromey <tom@tromey.com>
6779 * python/py-framefilter.c (py_print_frame): Return
6781 (gdbpy_apply_frame_filter): Update comment.
6782 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6784 <EXT_LANG_BT_NO_FILTERS>: Change value.
6786 2018-03-26 Tom Tromey <tom@tromey.com>
6789 * stack.c (backtrace_command): Parse "hide" argument.
6790 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6791 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6794 2018-03-26 Tom Tromey <tom@tromey.com>
6796 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6798 (backtrace_command): Remove "fulltrace", add "flags".
6800 2018-03-26 Tom Tromey <tom@tromey.com>
6802 * stack.c (backtrace_command): Rewrite command line parsing.
6804 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6806 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6808 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6810 * filename-seen-cache.h: Add include guard.
6812 2018-03-26 Keith Seitz <keiths@redhat.com>
6814 * symfile.c (place_section): Remove "struct" from section_addr_info
6816 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6817 "struct" keyword from section_addr_info.
6819 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6821 * regformats/regdef.h (reg): Add constructors.
6823 2018-03-25 Pedro Alves <palves@redhat.com>
6825 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6826 if then/else bodies in var_func_name extraction.
6828 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6830 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6831 lookup_minimal_symbol() to find symbol entry.
6832 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6834 2018-03-23 Keith Seitz <keiths@redhat.com>
6837 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6838 nested type definitions for C++, too.
6840 2018-03-23 Tom Tromey <tom@tromey.com>
6842 * machoread.c (struct oso_el): Add a constructor. Don't define as
6844 (macho_register_oso): Remove.
6845 (macho_symtab_read): Take a std::vector.
6846 (oso_el_compare_name): Now a std::sort comparator.
6847 (macho_symfile_read_all_oso): Take a std::vector.
6848 (macho_symfile_read): Use std::vector. Remove cleanups.
6850 2018-03-22 Tom Tromey <tom@tromey.com>
6852 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6853 (record_full_goto_bookmark): Use std::string.
6855 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6858 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6861 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6863 * rs6000-tdep.c (store_insn_p): New function.
6864 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6865 and cr_reg to their unshifted values. Use store_insn_p to
6866 match LR saves using either R1 or fdata->alloca_reg. Use
6867 store_insn_p to match CR saves. Set alloca_reg_offset
6868 when alloca_reg and framep are set. Remove lr_reg shift
6869 when assigning to fdata->lr_register.
6871 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6873 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6874 command line args instead of emitting a warning.
6876 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6878 * tracepoint.h (struct static_tracepoint_marker): Initialize
6879 fields, define default constructor, move constructor and move
6880 assignment, disable the rest.
6881 <str_id, extra>: Make std::string.
6882 (release_static_tracepoint_marker): Remove.
6883 (free_current_marker): Remove.
6884 * tracepoint.c (free_current_marker): Remove.
6885 (parse_static_tracepoint_marker_definition): Adjust to
6886 std::string, use new hex2str overload.
6887 (release_static_tracepoint_marker): Remove.
6888 (print_one_static_tracepoint_marker): Get marker by reference
6889 and adjust to std::string.
6890 (info_static_tracepoint_markers_command): Adjust to std::vector
6892 * target.h (static_tracepoint_marker_p): Remove typedef.
6893 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6894 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6896 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6898 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6899 (target_debug_print_std_vector_static_tracepoint_marker): New.
6900 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6902 (target_debug_print_static_tracepoint_marker_p): ... this.
6903 * target-delegates.c: Re-generate.
6904 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6906 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6907 (decode_static_tracepoint_spec): Adjust to std::vector.
6908 (tracepoint_print_one_detail): Adjust to std::string.
6909 (strace_marker_decode_location): Adjust to std::string.
6910 (update_static_tracepoint): Adjust to std::string, remove call
6911 to release_static_tracepoint_marker.
6912 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6913 Adjust to std::vector.
6914 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6915 (remote_static_tracepoint_markers_by_strid): Adjust to
6917 * common/rsp-low.h (hex2str): New overload with explicit count
6919 * common/rsp-low.c (hex2str): New overload with explicit count
6921 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6922 (_initialize_rsp_low_selftests): Add test_hex2str test.
6923 * unittests/tracepoint-selftests.c
6924 (test_parse_static_tracepoint_marker_definition): Adjust to
6927 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6929 * tracepoint.c (parse_static_tracepoint_marker_definition):
6930 Consider case where the definition is followed by more
6932 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6933 tracepoint-selftests.c.
6934 * unittests/tracepoint-selftests.c: New.
6936 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6938 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6941 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6943 * symtab.c (find_pc_sect_line): fixed indentation.
6945 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6947 * symtab.c (find_pc_sect_line): now uses binary search.
6949 2018-03-19 Tom Tromey <tom@tromey.com>
6951 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6954 2018-03-19 Pedro Alves <palves@redhat.com>
6955 Tom Tromey <tom@tromey.com>
6957 * unittests/observable-selftests.c: New file.
6958 * common/observable.h: New file.
6959 * observable.h: New file.
6960 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6961 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6962 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6963 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6964 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6965 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6966 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6967 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6968 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6969 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6970 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6971 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6972 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6973 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6974 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6975 tui/tui-interp.c, valops.c: Update all users.
6976 * tui/tui-hooks.c (tui_bp_created_observer)
6977 (tui_bp_deleted_observer, tui_bp_modified_observer)
6978 (tui_inferior_exit_observer, tui_before_prompt_observer)
6979 (tui_normal_stop_observer, tui_register_changed_observer):
6981 (tui_observers_token): New global.
6982 (attach_or_detach, tui_attach_detach_observers): New functions.
6983 (tui_install_hooks, tui_remove_hooks): Use
6984 tui_attach_detach_observers.
6985 * record-btrace.c (record_btrace_thread_observer): Remove.
6986 (record_btrace_thread_observer_token): New global.
6987 * observer.sh: Remove.
6988 * observer.c: Rename to observable.c.
6989 * observable.c (namespace gdb_observers): Define new objects.
6990 (observer_debug): Move into gdb_observers namespace.
6991 (struct observer, struct observer_list, xalloc_observer_list_node)
6992 (xfree_observer_list_node, generic_observer_attach)
6993 (generic_observer_detach, generic_observer_notify): Remove.
6994 (_initialize_observer): Update.
6995 Don't include observer.inc.
6996 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6997 (clean mostlyclean): Likewise.
6998 (observer.h, observer.inc): Remove targets.
6999 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7000 (COMMON_SFILES): Use observable.c, not observer.c.
7001 * .gitignore: Remove observer.h.
7003 2018-03-18 Tom Tromey <tom@tromey.com>
7005 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7007 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7009 2018-03-17 Tom Tromey <tom@tromey.com>
7011 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7013 2018-03-17 Tom Tromey <tom@tromey.com>
7015 * target.c (class scoped_target_fd): New.
7016 (target_fileio_close_cleanup): Remove.
7017 (target_fileio_read_alloc_1): Use scoped_target_fd.
7019 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7021 * silent-rules.mk: New.
7022 * Makefile.in: Include silent-rules.mk
7023 (srcdir, VPATH, top_srcdir): Move up.
7024 (COMPILE): Add ECHO_CXX.
7025 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7026 (init.c): Add ECHO_INIT_C.
7027 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7028 (version.c): Add ECHO_GEN.
7029 (printcmd.o): Add ECHO_CXX.
7030 (target-float.o): Add ECHO_CXX.
7031 (ada-exp.o): Add ECHO_CXX.
7032 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7033 (insight$(EXEEXT)): Add ECHO_CXXLD.
7034 * gnulib/configure.ac: Add AM_SILENT_RULES.
7035 * gnulib/aclocal.m4: Re-generate.
7036 * gnulib/configure: Re-generate.
7037 * gnulib/import/Makefile.in: Re-generate.
7039 2018-03-16 Tom Tromey <tom@tromey.com>
7041 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7042 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7043 * utils.c (do_free_section_addr_info)
7044 (make_cleanup_free_section_addr_info): Remove.
7045 * symfile.h (struct other_sections): Add constructor.
7046 (struct section_addr_info): Remove.
7047 (section_addr_info): New typedef.
7048 (struct sym_fns) <sym_offsets>: Change type of parameter.
7049 (build_section_addr_info_from_objfile)
7050 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7051 (default_symfile_offsets, symbol_file_add)
7052 (symbol_file_add_from_bfd)
7053 (build_section_addr_info_from_section_table): Update.
7054 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7055 * symfile.c (alloc_section_addr_info): Remove.
7056 (build_section_addr_info_from_section_table): Change return type.
7058 (build_section_addr_info_from_bfd)
7059 (build_section_addr_info_from_objfile): Likewise.
7060 (free_section_addr_info): Remove.
7061 (relative_addr_info_to_section_offsets): Change type of "addrs".
7062 (addrs_section_compar): Now a std::sort comparator.
7063 (addrs_section_sort): Change return type.
7064 (addr_info_make_relative): Change type of "addrs". Update.
7065 (default_symfile_offsets, syms_from_objfile_1)
7066 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7067 (symbol_file_add_separate): Update.
7068 (symbol_file_add): Change type of "addrs". Update.
7069 (add_symbol_file_command): Update. Remove cleanups.
7070 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7072 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7073 * solib.c (solib_read_symbols): Update.
7074 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7075 * machoread.c (macho_symfile_offsets): Update.
7076 * jit.c (jit_bfd_try_read_symtab): Update.
7078 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7080 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7081 unittests/utils-selftests.c.
7082 * unittests/utils-selftests.c: New file.
7084 2018-03-14 Tom Tromey <tom@tromey.com>
7087 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7090 2018-03-14 Tom Tromey <tom@tromey.com>
7093 * printcmd.c (printf_pointer): Allow "-" in format.
7095 2018-03-14 Tom Tromey <tom@tromey.com>
7097 * printcmd.c (_initialize_printcmd): Add usage to printf.
7099 2018-03-14 Yao Qi <qiyao@sourceware.org>
7101 * MAINTAINERS: Update my email address.
7103 2018-03-13 Tom Tromey <tom@tromey.com>
7105 * machoread.c (macho_check_dsym): Change filenamep to a
7107 (macho_symfile_read): Update.
7108 * symfile.c (load_command): Use std::string.
7110 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7112 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7113 to error message string.
7114 (riscv_register_name): Use xsnprintf instead of sprintf.
7115 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7117 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7119 (riscv_push_dummy_call): Likewise.
7121 2018-03-12 Tom Tromey <tom@tromey.com>
7123 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7124 Use gdb::byte_vector.
7125 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7127 2018-03-12 Yao Qi <yao.qi@linaro.org>
7129 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7130 parameter type to readable_regcache.
7131 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7134 2018-03-11 Tom Tromey <tom@tromey.com>
7136 * dwarf2read.c (struct nextfield): Add initializers.
7137 (struct nextfnfield): Remove.
7138 (struct fnfieldlist): Add initializers. Remove "length" and
7139 "head", use std::vector.
7140 (struct decl_field_list): Remove.
7141 (struct field_info): Add initializers.
7142 <fields, baseclasses>: Now std::vector.
7143 <nbaseclasses, nfnfields, typedef_field_list_count,
7144 nested_types_list_count>: Remove.
7145 (dwarf2_add_field, dwarf2_add_type_defn)
7146 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7147 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7148 (process_structure_scope): Update.
7150 2018-03-11 Tom Tromey <tom@tromey.com>
7152 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7153 for use by std::sort.
7154 (build_type_psymtabs_1): Use std::vector.
7156 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7158 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7159 and LIBMPFR in the printed configuration.
7161 2018-03-08 Tom Tromey <tom@tromey.com>
7163 * source.c (get_filename_and_charpos): Use scoped_fd.
7164 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7165 (procfs_pidlist): Likewise.
7166 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7167 (iterate_over_mappings): Likewise.
7169 2018-03-08 Tom Tromey <tom@tromey.com>
7171 * infcall.c (struct call_return_meta_info)
7172 <stack_temporaries_enabled>: Remove.
7173 (get_call_return_value, call_function_by_hand_dummy): Update.
7174 * thread.c (disable_thread_stack_temporaries): Remove.
7175 (enable_thread_stack_temporaries): Remove.
7176 (thread_stack_temporaries_enabled_p): Return bool.
7177 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7178 (get_last_thread_stack_temporary): Update.
7179 * eval.c (evaluate_subexp): Update.
7180 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7181 class, not a function.
7182 (value_ptr, value_vec): Remove typedefs.
7183 (class thread_info) <stack_temporaries_enabled>: Now bool.
7184 <stack_temporaries>: Now a std::vector.
7185 (thread_stack_temporaries_enabled_p)
7186 (value_in_thread_stack_temporaries): Return bool.
7188 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7190 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7191 (getpkt_or_notif_sane_1): Likewise.
7193 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7195 * build-id.c (build_id_to_debug_bfd): Use std::string.
7197 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7199 * build-id.c (find_separate_debug_file_by_buildid): Return
7201 * build-id.h (find_separate_debug_file_by_buildid): Return
7203 * coffread.c (coff_symfile_read): Adjust to std::string.
7204 * elfread.c (elf_symfile_read): Adjust to std::string.
7205 * symfile.c (separate_debug_file_exists): Change parameter to
7207 (find_separate_debug_file): Return std::string.
7208 (find_separate_debug_file_by_debuglink): Return std::string.
7209 * symfile.h (find_separate_debug_file_by_debuglink): Return
7212 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7214 * common/xml-utils.c (xml_escape_text): Move code to...
7215 (xml_escape_text_append): ... this new function.
7216 * common/xml-utils.h (xml_escape_text_append): New declaration.
7217 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7219 (_initialize_xml_utils): register test_xml_escape_text_append as
7222 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7224 * defs.h: Remove MAX_REGISTER_SIZE.
7225 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7227 * python/py-unwind.c (pyuw_sniffer): Likewise.
7229 2018-03-07 Tom Tromey <tom@tromey.com>
7231 * linux-tdep.c (linux_info_proc): Update.
7232 * target.h (struct target_ops) <to_fileio_readlink>: Return
7234 (target_fileio_readlink): Return optional<string>.
7235 * remote.c (remote_hostio_readlink): Return optional<string>.
7236 * inf-child.c (inf_child_fileio_readlink): Return
7238 * target.c (target_fileio_readlink): Return optional<string>.
7240 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7242 * regcache.c (cooked_read_test): Add riscv to the list of
7243 architectures that have a save_reggroup.
7245 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7247 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7248 value is not a dynamic class object.
7250 2018-03-06 Tom Tromey <tom@tromey.com>
7252 * rust-exp.y: Formatting fixes.
7254 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7256 * riscv-tdep.c (riscv_register_name): Remove target description
7258 (riscv_gdbarch_init): Remove target description check.
7260 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7262 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7264 * riscv-tdep.h: Likewise.
7266 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7268 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7269 (riscv_pseudo_register_write): Delete.
7270 (riscv_gdbarch_init): Remove all use of pseudo registers.
7272 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7274 * record-btrace.c (btrace_print_lines): Replace cleanup
7275 parameter with RAII equivalents.
7276 (btrace_insn_history): Replace cleanup with RAII equivalents.
7277 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7278 make_cleanup_ui_out_tuple_begin_end): Remove.
7279 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7280 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7281 make_cleanup_ui_out_list_begin_end): Remove.
7283 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7285 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7286 parameter types to std::vector. Use bool.
7287 (record_btrace_wait): Replace VEC(tp_t) with
7288 std::vector<thread_info *>.
7289 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7291 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7293 * record-btrace.c (record_btrace_disable_callback): Remove.
7294 (struct scoped_btrace_disable): New.
7295 (record_btrace_open): Use scoped_btrace_disable.
7297 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7299 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7300 reading values from registers.
7302 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7304 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7307 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7309 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7310 change parameter type. Use GDB's print functions, and use
7311 core_addr_to_string where appropriate.
7312 (riscv_push_dummy_call): Use core_addr_to_string where
7313 appropriate, update call to riscv_print_arg_location, and reindent
7315 (riscv_return_value): Update call to riscv_print_arg_location.
7317 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7318 Tim Newsome <tim@sifive.com>
7319 Albert Ou <a0u@eecs.berkeley.edu>
7320 Darius Rad <darius@bluespec.com>
7322 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7323 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7324 (ALLDEPFILES): Add riscv-tdep.c
7325 * configure.tgt: Add riscv support.
7326 * riscv-tdep.c: New file.
7327 * riscv-tdep.h: New file.
7328 * NEWS: Mention new target.
7329 * MAINTAINERS: Add entry for riscv.
7331 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7333 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7334 fields within aggregates.
7336 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7338 * record-btrace.c (btrace_print_lines): Change type of flags to
7339 gdb_disassembly_flags.
7341 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7343 * fbsd-nat.c: Include "inf-ptrace.h".
7344 (USE_SIGTRAP_SIGINFO): Conditionally define.
7345 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7346 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7347 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7349 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7351 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7353 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7354 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7355 "supports_stopped_by_hw_breakpoint" target methods.
7357 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7359 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7360 * fbsd-nat.c (debug_fbsd_nat): New variable.
7361 (show_fbsd_nat_debug): New function.
7362 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7363 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7365 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7367 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7368 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7370 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7371 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7374 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7376 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7377 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7379 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7381 * charset.c (struct charset_vector): New.
7382 (charsets): Change type to charset_vector.
7383 (find_charset_names): Adjust.
7385 (_initialize_charset): Adjust.
7387 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7389 * progspace.h (struct program_space) <deleted_solibs>: Change
7390 type to std::vector<std::string>.
7391 * progspace.c (clear_program_space_solib_cache): Adjust.
7392 * breakpoint.c (print_solib_event): Adjust.
7393 (check_status_catch_solib): Adjust.
7394 * solib.c (update_solib_list): Adjust.
7395 * ui-out.h (class ui_out) <field_string>: New overload.
7396 * ui-out.c (ui_out::field_string): New overload.
7398 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7400 * progspace.h (struct program_space): Add constructor and
7401 destructor, initialize fields.
7402 (add_program_space): Remove.
7403 * progspace.c (add_program_space): Rename to...
7404 (program_space::program_space): ... this.
7405 (release_program_space): Rename to...
7406 (program_space::~program_space): ... this.
7407 (delete_program_space): Use delete to delete program_space.
7408 (initialize_progspace): Use new to allocate program_space.
7409 * inferior.c (add_inferior_with_spaces): Likewise.
7410 (clone_inferior_command): Likewise.
7411 * infrun.c (follow_fork_inferior): Likewise.
7412 (handle_vfork_child_exec_or_exit): Likewise.
7414 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7416 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7417 (delim_string_to_char_ptr_vec): Return std::vector of
7418 gdb::unique_xmalloc_ptr.
7419 (dirnames_to_char_ptr_vec_append): Take std::vector of
7420 gdb::unique_xmalloc_ptr.
7421 (dirnames_to_char_ptr_vec): Return std::vector of
7422 gdb::unique_xmalloc_ptr.
7423 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7424 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7425 (delim_string_to_char_ptr_vec): Return an std::vector of
7426 gdb::unique_xmalloc_ptr, adjust the code.
7427 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7428 gdb::unique_xmalloc_ptr, adjust the code.
7429 (dirnames_to_char_ptr_vec): Return an std::vector of
7430 gdb::unique_xmalloc_ptr, adjust the code.
7431 * auto-load.c (auto_load_safe_path_vec): Change type to
7432 std::vector of gdb::unique_xmalloc_ptr.
7433 (auto_load_expand_dir_vars): Return an std::vector of
7434 gdb::unique_xmalloc_ptr, adjust the code.
7435 (auto_load_safe_path_vec_update): Adjust.
7436 (filename_is_in_auto_load_safe_path_vec): Adjust.
7437 (auto_load_objfile_script_1): Adjust.
7438 * build-id.c (build_id_to_debug_bfd): Adjust.
7439 * linux-thread-db.c (thread_db_load_search): Adjust.
7440 * source.c (add_path): Adjust.
7442 * symfile.c (find_separate_debug_file): Adjust.
7443 * utils.c (do_free_char_ptr_vec): Remove.
7444 (make_cleanup_free_char_ptr_vec): Remove.
7446 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7449 * common/pathstuff.c: Conditionally include "<windows.h>".
7451 2018-03-01 Georg Sauthoff <mail@georg.so>
7454 * gcore.in: Quote variables and switch interpreter to bash.
7456 2018-03-01 Tom Tromey <tom@tromey.com>
7458 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7459 assertion. Add assertion for discriminant_index.
7460 (quirk_rust_enum): Use correct base type name in univariant case.
7462 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7464 * record.c (get_call_history_modifiers): Return a
7466 (cmd_record_call_history): Adjust.
7467 * record-btrace.c (record_btrace_call_history): Adjust.
7468 (record_btrace_call_history_range): Adjust.
7469 (record_btrace_call_history_from): Adjust.
7470 * target-debug.h (target_debug_print_record_print_flags): New.
7471 * target-delegates.c: Re-generate.
7472 * target.c (target_call_history): Change flags type.
7473 (target_call_history_from): Likewise.
7474 (target_call_history_range): Likewise.
7475 * target.h (struct target_ops) <target_call_history>: Likewise.
7476 (target_call_history_from): Likewise.
7477 (target_call_history_range): Likewise.
7479 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7480 Simon Marchi <simon.marchi@polymtl.ca>
7482 * common/common-utils.c: Include "sys/stat.h".
7483 (is_regular_file): Move here from "source.c"; change return
7485 * common/common-utils.h (is_regular_file): New prototype.
7486 * common/pathstuff.c (contains_dir_separator): New function.
7487 * common/pathstuff.h (contains_dir_separator): New prototype.
7488 * source.c: Don't include "sys/stat.h".
7489 (is_regular_file): Move to "common/common-utils.c".
7491 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7493 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7494 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7495 * auto-load.c: Include "common/pathstuff.h".
7496 * common/common-def.h (current_directory): Move here.
7497 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7499 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7501 * common/pathstuff.c: New file.
7502 * common/pathstuff.h: New file.
7503 * compile/compile.c: Include "common/pathstuff.h".
7504 * defs.h (current_directory): Move to "common/common-defs.h".
7505 * dwarf2read.c: Include "common/pathstuff.h".
7507 * guile/scm-safe-call.c: Likewise.
7508 * linux-thread-db.c: Likewise.
7510 * nto-tdep.c: Likewise.
7511 * objfiles.c: Likewise.
7512 * source.c: Likewise.
7513 * symtab.c: Likewise.
7514 * utils.c: Include "common/pathstuff.h".
7515 (gdb_realpath): Move to "common/pathstuff.c".
7516 (gdb_realpath_keepfile): Likewise.
7517 (gdb_abspath): Likewise.
7518 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7519 (gdb_realpath_keepfile): Likewise.
7520 (gdb_abspath): Likewise.
7522 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7524 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7525 wildcard process pid for super_resume for kernels with a
7528 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7530 * compile/compile.c (get_args): Add additional comments
7531 explaining function.
7533 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7534 Tom Tromey <tom@tromey.com>
7536 * target.h (memory_write_request_s): Remove typedef. Don't define
7538 (target_write_memory_blocks): Change argument to std::vector.
7539 (struct memory_write_request): Add constructor.
7540 * target-memory.c (compare_block_starting_address): Return bool.
7541 Change argument types.
7542 (claim_memory): Change arguments to use std::vector.
7543 (split_regular_and_flash_blocks, blocks_to_erase)
7544 (compute_garbled_blocks): Likewise.
7545 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7546 (target_write_memory_blocks): Change argument to std::vector.
7547 * symfile.c (struct load_section_data): Add constructor and
7548 destructor. Use std::vector for "requests".
7549 (struct load_progress_data): Add initializers.
7550 (load_section_callback): Update. Use "new".
7551 (clear_memory_write_data): Remove.
7552 (generic_load): Update.
7554 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7556 * arch/aarch64.h: Use common/tdesc.h.
7558 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7560 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7561 architecture with a 64-bit ABI.
7563 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7565 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7566 ahead of target description loading.
7568 2018-02-26 Tom Tromey <tom@tromey.com>
7570 * stack.c (backtrace_command_1): Update.
7571 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7573 * python/py-framefilter.c (py_print_frame)
7574 (gdbpy_apply_frame_filter): Change type of "flags".
7575 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7577 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7578 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7579 * extension.h (enum frame_filter_flag): Rename from
7581 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7582 (apply_ext_lang_frame_filter): Change type of "flags".
7583 * extension.c (apply_ext_lang_frame_filter): Change type of
7585 * extension-priv.h (struct extension_language_ops)
7586 <apply_frame_filter>: Change type of "flags".
7588 2018-02-26 Tom Tromey <tom@tromey.com>
7591 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7592 off-by-one in py_end computation.
7593 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7595 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7598 2018-02-26 Tom Tromey <tom@tromey.com>
7600 * dwarf2read.c (struct variant_field): New.
7601 (struct nextfield) <variant>: New field.
7602 (dwarf2_add_field): Handle DW_TAG_variant_part.
7603 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7604 discriminated union.
7605 (read_structure_type): Handle DW_TAG_variant_part.
7606 (handle_struct_member_die): New function, extracted from
7607 process_structure_scope. Handle DW_TAG_variant.
7608 (process_structure_scope): Handle discriminated unions. Call
7609 handle_struct_member_die.
7611 2018-02-26 Tom Tromey <tom@tromey.com>
7613 * rust-lang.h (rust_last_path_segment): Declare.
7614 * rust-lang.c (rust_last_path_segment): Now public. Change
7616 (struct disr_info): Remove.
7617 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7618 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7619 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7620 (rust_enum_p, rust_enum_variant): New function.
7621 (rust_underscore_fields): Remove "offset" parameter.
7622 (rust_print_enum): New function.
7623 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7624 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7625 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7627 (rust_internal_print_type): New function, from rust_print_type.
7629 (rust_print_type): Call rust_internal_print_type.
7630 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7631 Update enum handling.
7632 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7633 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7634 (rust_union_quirks): New functions.
7635 (process_full_comp_unit, process_full_type_unit): Call
7637 (process_structure_scope): Update rust_unions if necessary.
7639 2018-02-26 Tom Tromey <tom@tromey.com>
7641 * value.h (value_union_variant): Declare.
7642 * valops.c (value_union_variant): New function.
7643 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7644 (struct discriminant_info): New.
7645 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7647 (struct main_type) <flag_discriminated_union>: New field.
7649 2018-02-26 Tom Tromey <tom@tromey.com>
7651 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7652 unittests/unpack-selftests.c.
7653 * unittests/unpack-selftests.c: New file.
7654 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7656 2018-02-26 Yao Qi <yao.qi@linaro.org>
7658 * dwarf2read.c (struct partial_die_info) <read>: New method.
7659 (read_partial_die): Remove the declaration.
7660 (load_partial_dies): Update.
7661 (partial_die_info::partial_die_info):
7662 (read_partial_die): Change it to partial_die_info::read.
7664 2018-02-26 Yao Qi <yao.qi@linaro.org>
7666 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7667 (fixup_partial_die): Remove declaration.
7668 (scan_partial_symbols): Update.
7669 (partial_die_parent_scope): Likewise.
7670 (partial_die_full_name): Likewise.
7671 (fixup_partial_die): Change it to partial_die_info::fixup.
7673 2018-02-26 Yao Qi <yao.qi@linaro.org>
7675 * dwarf2read.c (read_partial_die): Update the declaration.
7676 (load_partial_dies): Caller update.
7677 (read_partial_die): Remove one argument abbrev_len.
7679 2018-02-26 Yao Qi <yao.qi@linaro.org>
7681 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7682 assignment operator.
7683 (load_partial_dies): Use ctor and copy ctor.
7684 (read_partial_die): Update.
7685 (dwarf2_cu::find_partial_die): Use ctor.
7687 2018-02-26 Yao Qi <yao.qi@linaro.org>
7689 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7690 (find_partial_die_in_comp_unit): Change it to
7691 dwarf2_cu::find_partial_die.
7692 (find_partial_die): Update.
7694 2018-02-26 Yao Qi <yao.qi@linaro.org>
7696 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7699 2018-02-26 Yao Qi <yao.qi@linaro.org>
7701 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7703 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7705 * arch/amd64.h: Use common/tdesc.h.
7706 * arch/i386.c: Likewise.
7707 * arch/i386.h: Likewise.
7708 * arch/tic6x.c: Likewise.
7709 * arch/tdesc.h: Move file from here...
7710 * common/tdesc.h: ...to here.
7711 * features/aarch64-core.c: Regenerate.
7712 * features/aarch64-fpu.c: Regenerate.
7713 * features/i386/32bit-avx.c: Regenerate.
7714 * features/i386/32bit-avx512.c: Regenerate.
7715 * features/i386/32bit-core.c: Regenerate.
7716 * features/i386/32bit-linux.c: Regenerate.
7717 * features/i386/32bit-mpx.c: Regenerate.
7718 * features/i386/32bit-pkeys.c: Regenerate.
7719 * features/i386/32bit-sse.c: Regenerate.
7720 * features/i386/64bit-avx.c: Regenerate.
7721 * features/i386/64bit-avx512.c: Regenerate.
7722 * features/i386/64bit-core.c: Regenerate.
7723 * features/i386/64bit-linux.c: Regenerate.
7724 * features/i386/64bit-mpx.c: Regenerate.
7725 * features/i386/64bit-pkeys.c: Regenerate.
7726 * features/i386/64bit-segments.c: Regenerate.
7727 * features/i386/64bit-sse.c: Regenerate.
7728 * features/i386/x32-core.c: Regenerate.
7729 * features/tic6x-c6xp.c: Regenerate.
7730 * features/tic6x-core.c: Regenerate.
7731 * features/tic6x-gp.c: Regenerate.
7732 * target-descriptions.c: Use common/tdesc.h.
7733 * target-descriptions.h: Likewise.
7735 2018-02-24 Tom Tromey <tom@tromey.com>
7737 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7738 (try_thread_db_load_from_dir, thread_db_load_search): Use
7740 (info_auto_load_libthread_db_compare): Return bool. Change
7742 (info_auto_load_libthread_db): Use std::vector, std::string.
7745 2018-02-24 Tom Tromey <tom@tromey.com>
7747 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7749 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7751 * gdbarch.c: Rebuild.
7752 * gdbarch.h: Rebuild.
7753 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7754 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7755 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7758 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7760 * gdbtypes.h (sect_offset): Change type to uint64_t.
7761 (sect_offset_str): New function.
7762 * dwarf2read.c (create_addrmap_from_aranges): Use
7764 (error_check_comp_unit_head): Likewise.
7765 (create_debug_type_hash_table): Likewise.
7766 (read_cutu_die_from_dwo): Likewise.
7767 (init_cutu_and_read_dies): Likewise.
7768 (init_cutu_and_read_dies_no_follow): Likewise.
7769 (process_psymtab_comp_unit_reader): Likewise.
7770 (partial_die_parent_scope): Likewise.
7771 (peek_die_abbrev): Likewise.
7772 (process_queue): Likewise.
7773 (dwarf2_physname): Likewise.
7774 (read_namespace_alias): Likewise.
7775 (read_import_statement): Likewise.
7776 (create_dwo_cu_reader): Likewise.
7777 (create_cus_hash_table): Likewise.
7778 (lookup_dwo_cutu): Likewise.
7779 (inherit_abstract_dies): Likewise.
7780 (read_func_scope): Likewise.
7781 (read_call_site_scope): Likewise.
7782 (dwarf2_add_member_fn): Likewise.
7783 (read_common_block): Likewise.
7784 (read_module_type): Likewise.
7785 (read_typedef): Likewise.
7786 (read_subrange_type): Likewise.
7787 (load_partial_dies): Likewise.
7788 (read_partial_die): Likewise.
7789 (find_partial_die): Likewise.
7790 (read_str_index): Likewise.
7791 (dwarf2_string_attr): Likewise.
7792 (build_error_marker_type): Likewise.
7793 (lookup_die_type): Likewise.
7794 (dump_die_shallow): Likewise.
7795 (follow_die_ref): Likewise.
7796 (dwarf2_fetch_die_loc_sect_off): Likewise.
7797 (dwarf2_fetch_constant_bytes): Likewise.
7798 (follow_die_sig): Likewise.
7799 (get_signatured_type): Likewise.
7800 (get_DW_AT_signature_type): Likewise.
7801 (dwarf2_find_containing_comp_unit): Likewise.
7802 (set_die_type): Likewise.
7804 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7806 * arch/aarch64.c: Include "common-defs.h".
7807 * arch/amd64.c: Likewise.
7808 * arch/i386.c: Likewise.
7810 2018-02-21 Tom Tromey <tom@tromey.com>
7812 * value.h: (extract_field_op): Update.
7813 * eval.c (extract_field_op): Return a const char *.
7814 * expression.h (parse_expression_for_completion): Update.
7815 * completer.c (complete_expression): Update.
7816 (add_struct_fields): Make fieldname const.
7817 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7818 (mark_completion_tag, parse_exp_in_context_1): Update.
7819 (parse_expression_for_completion): Change "name" to
7820 unique_xmalloc_ptr*.
7822 2018-02-21 Tom Tromey <tom@tromey.com>
7824 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7826 2018-02-21 Yao Qi <yao.qi@linaro.org>
7828 * avr-tdep.c (avr_read_pc): Change parameter type to
7830 * gdbarch.sh (read_pc): Likewise.
7831 * gdbarch.c: Re-generated.
7832 * gdbarch.h: Re-generated.
7833 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7835 * ia64-tdep.c (ia64_read_pc): Likewise.
7836 * mips-tdep.c (mips_read_pc): Likewise.
7837 * spu-tdep.c (spu_read_pc): Likewise.
7839 2018-02-21 Yao Qi <yao.qi@linaro.org>
7841 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7842 * regcache-dump.c: New file.
7843 * regcache.c: Move register_dump to regcache-dump.c.
7844 (maintenance_print_registers): Likewise.
7845 (maintenance_print_raw_registers): Likewise.
7846 (maintenance_print_cooked_registers): Likewise.
7847 (maintenance_print_register_groups): Likewise.
7848 (maintenance_print_remote_registers): Likewise.
7849 (_initialize_regcache): Likewise.
7850 * regcache.h (register_dump): Moved from regcache.c.
7852 2018-02-21 Yao Qi <yao.qi@linaro.org>
7854 * regcache.c (regcache::regcache): Update.
7855 (regcache::invalidate): Move it to detached_regcache::invalidate.
7856 (get_thread_arch_aspace_regcache): Update.
7857 (regcache::raw_update): Update.
7858 (regcache::cooked_read): Remove some code.
7859 (regcache::cooked_read_value): Likewise.
7860 (regcache::raw_write): Remove assert on m_readonly_p.
7861 (regcache::raw_supply_integer): Move it to
7862 detached_regcache::raw_supply_integer.
7863 (regcache::raw_supply_zeroed): Likewise.
7864 * regcache.h (detached_regcache) <raw_supply_integer>: New
7866 <raw_supply_zeroed, invalidate>: Likewise.
7867 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7868 <invalidate>: Likewise.
7869 <m_readonly_p>: Removed.
7871 2018-02-21 Yao Qi <yao.qi@linaro.org>
7873 * infcmd.c (get_return_value): Let stop_regs point to
7874 get_current_regcache.
7875 * regcache.c (regcache::regcache): Remove.
7876 (register_dump_reg_buffer): New class.
7877 (regcache_print): Adjust.
7878 * regcache.h (regcache): Remove constructors.
7880 2018-02-21 Yao Qi <yao.qi@linaro.org>
7882 * regcache.c (class register_dump): New class.
7883 (register_dump_regcache, register_dump_none): New class.
7884 (register_dump_remote, register_dump_groups): New class.
7885 (regcache_print): Update.
7886 * regcache.h (regcache_dump_what): Move it to regcache.c.
7887 (regcache) <dump>: Remove.
7889 2018-02-21 Yao Qi <yao.qi@linaro.org>
7891 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7893 (jit_unwind_reg_set_impl): Call raw_supply.
7894 (jit_frame_sniffer): Use reg_buffer_rw.
7895 * record-full.c (record_full_core_regbuf): Change its type.
7896 (record_full_core_open_1): Use reg_buffer_rw.
7897 (record_full_close): Likewise.
7898 (record_full_core_fetch_registers): Use regcache->raw_supply.
7899 (record_full_core_store_registers): Likewise.
7900 * regcache.c (regcache::get_register_status): Move it to
7902 (regcache_raw_set_cached_value): Remove.
7903 (regcache::raw_set_cached_value): Remove.
7904 (regcache::raw_write): Call raw_supply.
7905 (regcache::raw_supply): Move it to reg_buffer_rw.
7906 * regcache.h (regcache_raw_set_cached_value): Remove.
7907 (reg_buffer_rw): New class.
7909 2018-02-21 Yao Qi <yao.qi@linaro.org>
7911 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7912 readonly_detached_regcache.
7913 (dummy_frame_prev_register): Use regcache->cooked_read.
7914 * frame.c (frame_save_as_regcache): Change return type.
7915 (frame_pop): Update.
7916 * frame.h (frame_save_as_regcache): Update declaration.
7917 * inferior.h (get_infcall_suspend_state_regcache): Update
7919 * infrun.c (infcall_suspend_state) <registers>: use
7920 readonly_detached_regcache.
7921 (save_infcall_suspend_state): Don't use regcache_dup.
7922 (get_infcall_suspend_state_regcache): Change return type.
7923 * linux-fork.c (struct fork_info) <savedregs>: Change to
7924 readonly_detached_regcache.
7926 (fork_save_infrun_state): Don't use regcache_dup.
7927 (info_checkpoints_command): Adjust.
7928 * mi/mi-main.c (register_changed_p): Update declaration.
7929 (mi_cmd_data_list_changed_registers): Use
7930 readonly_detached_regcache.
7931 (register_changed_p): Change parameter type to
7932 readonly_detached_regcache.
7933 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7934 readonly_detached_regcache.
7935 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7936 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7938 (regcache::save): Move it to reg_buffer.
7939 (regcache::restore): Change parameter type.
7940 (regcache_dup): Remove.
7941 * regcache.h (reg_buffer) <save>: New method.
7942 (readonly_detached_regcache): New class.
7943 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7944 readonly_detached_regcache.
7945 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7947 2018-02-21 Yao Qi <yao.qi@linaro.org>
7949 * frame.c (frame_save_as_regcache): Use regcache method save.
7950 (frame_pop): Use regcache method restore.
7951 * infrun.c (restore_infcall_suspend_state): Likewise.
7952 * linux-fork.c (fork_load_infrun_state): Likewise.
7953 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7955 * regcache.c (regcache_save): Remove.
7956 (regcache::restore): More asserts.
7957 (regcache_cpy): Remove.
7958 * regcache.h (regcache_save): Remove the declaration.
7959 (regcache::restore): Move from private to public.
7960 Remove the friend declaration of regcache_cpy.
7961 (regcache_cpy): Remove declaration.
7963 2018-02-21 Yao Qi <yao.qi@linaro.org>
7965 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7966 parameter type to 'readable_regcache *'.
7967 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7968 * arm-tdep.c (arm_neon_quad_read): Likewise.
7969 (arm_pseudo_read): Likewise.
7970 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7971 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7972 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7973 * gdbarch.c: Re-generated.
7974 * gdbarch.h: Re-generated.
7975 * gdbarch.sh (pseudo_register_read): Change parameter type to
7976 'readable_regcache *'.
7977 (pseudo_register_read_value): Likewise.
7978 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7979 (h8300_pseudo_register_read): Likewise.
7980 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7981 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7982 (i386_pseudo_register_read_into_value): Likewise.
7983 (i386_pseudo_register_read_value): Likewise.
7984 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7986 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7987 * m32c-tdep.c (m32c_raw_read): Likewise.
7988 (m32c_read_flg): Likewise.
7989 (m32c_banked_register): Likewise.
7990 (m32c_banked_read): Likewise.
7991 (m32c_sb_read): Likewise.
7992 (m32c_part_read): Likewise.
7993 (m32c_cat_read): Likewise.
7994 (m32c_r3r2r1r0_read): Likewise.
7995 (m32c_pseudo_register_read): Likewise.
7996 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7997 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7998 (mep_pseudo_cr64_read): Likewise.
7999 (mep_pseudo_register_read): Likewise.
8000 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8001 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8002 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8003 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8004 (regcache::cooked_read): Likewise.
8005 (regcache::cooked_read_value): Likewise.
8006 (regcache_cooked_read_signed):
8007 (regcache::cooked_read): Likewise.
8008 * regcache.h (readable_regcache): New class.
8009 (regcache): Inherit readable_regcache. Move some methods to
8011 * rl78-tdep.c (rl78_pseudo_register_read): Change
8012 parameter type to 'readable_regcache *'.
8013 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8014 (e500_pseudo_register_read): Change parameter type to
8015 'readable_regcache *'.
8016 (dfp_pseudo_register_read): Likewise.
8017 (vsx_pseudo_register_read): Likewise.
8018 (efpr_pseudo_register_read): Likewise.
8019 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8020 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8021 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8022 (sh64_pseudo_register_read): Likewise.
8023 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8024 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8025 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8026 (spu_pseudo_register_read): Likewise.
8027 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8028 (xtensa_pseudo_register_read): Likewise.
8030 2018-02-21 Yao Qi <yao.qi@linaro.org>
8032 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8033 (regcache::arch): Move it to reg_buffer::arch.
8034 (regcache::register_buffer): Likewise.
8035 (regcache::assert_regnum): Likewise.
8036 (regcache::num_raw_registers): Likewise.
8037 * regcache.h (reg_buffer): New class.
8038 (regcache): Inherit reg_buffer.
8040 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8042 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8043 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8045 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8047 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8049 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8051 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8052 (SFILES): Remove common/*.c files.
8053 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8054 * common/common.host: Add common reference.
8055 * configure.ac: Likewise.
8056 * configure: Regenerate.
8058 2018-02-16 Yao Qi <yao.qi@linaro.org>
8060 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8061 (block_initialize_namespace): Use new.
8062 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8063 (dwarf2_free_objfile): Use delete.
8064 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8065 (copy_type_recursive): Use new.
8066 * gdb_obstack.h (allocate_on_obstack): New.
8068 2018-02-15 Yao Qi <yao.qi@linaro.org>
8071 * inferior.c (exit_inferior_1): Reset inf->control.
8073 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8075 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8078 2018-02-14 Pedro Alves <palves@redhat.com>
8080 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8081 frame_cleanup_after_sniffer on exception.
8083 2018-02-14 Tom Tromey <tom@tromey.com>
8085 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8087 (solib_bfd_open): Make pathname const.
8088 * solib.c (solib_bfd_open): Make pathname const.
8089 * solib-spu.c (spu_bfd_fopen): Make name const.
8090 (spu_bfd_open): Make pathname const.
8091 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8092 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8094 2018-02-14 Tom Tromey <tom@tromey.com>
8096 * symfile.c (symfile_bfd_open): Update.
8097 * source.h (openp, source_full_path_of, find_and_open_source):
8098 Change argument type to unique_xmalloc_ptr.
8099 * source.c (openp): Take a unique_xmalloc_ptr.
8100 (source_full_path_of, find_and_open_source): Likewise.
8101 (open_source_file, symtab_to_fullname): Update.
8102 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8104 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8105 (exec_file_find): Update.
8106 * psymtab.c (psymtab_to_fullname): Update.
8107 * nto-tdep.h (nto_find_and_open_solib): Update.
8108 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8110 * exec.c (exec_file_attach): Update.
8111 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8112 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8114 2018-02-14 Tom Tromey <tom@tromey.com>
8116 * solib.c: Include source.h.
8117 * nto-tdep.c: Include source.h.
8118 * mi/mi-cmd-env.c: Include source.h.
8119 * infcmd.c: Include source.h.
8120 * exec.c: Include source.h.
8121 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8122 (add_path, directory_switch, source_path, init_source_path): Move
8124 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8125 (add_path, directory_switch, source_path, init_source_path):
8128 2018-02-14 Tom Tromey <tom@tromey.com>
8130 * solist.h (exec_file_find, solib_find): Return
8132 (solib_bfd_fopen): Take a const char *.
8133 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8134 (exec_file_find, solib_find): Likewise.
8135 (solib_bfd_fopen): Do not take ownership of "pathname".
8136 (solib_bfd_open): Use unique_xmalloc_ptr.
8137 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8138 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8139 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8140 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8142 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8144 * ada-lang.c (name_match_type_from_name): Remove reference to
8145 ada_name_for_lookup in function's documentation.
8146 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8148 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8150 * defs.h (enum openp_flags): New enum.
8151 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8152 Move to enum openp_flags.
8153 (openp_flags): New enum flags.
8154 (openp): Change parameter type to openp_flags.
8155 * source.c (openp): Change parameter type to openp_flags.
8156 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8157 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8159 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8161 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8164 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8166 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8168 (class dwarf2_queue_guard): ...the destructor of this new class.
8169 (dw2_do_instantiate_symtab): Create instance of the new class
8170 dwarf2_queue_guard, remove cleanup.
8172 2018-02-09 Tom Tromey <tom@tromey.com>
8174 * source.c (find_source_lines): Don't reference past the end of
8177 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8179 * remote.c (remote_btrace_maybe_reopen): Change error message.
8180 * btrace.c (btrace_enable): Likewise.
8181 (parse_xml_btrace): Likewise.
8182 (parse_xml_btrace_conf): Likewise.
8184 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8186 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8187 (linux_enable_pt, linux_enable_bts): Call
8188 diagnose_perf_event_open_fail.
8190 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8192 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8193 Remove parameter and change return type. Update callers. Move it.
8194 (linux_enable_bts, linux_enable_pt): Improve error message.
8195 (linux_enable_pt): Remove zero buffer size check.
8196 (linux_enable_btrace): Improve error messages. Remove NULL return
8199 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8201 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8202 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8203 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8204 (linux_supports_pt, linux_supports_btrace): Remove.
8205 (linux_enable_bts): Call cpu_supports_bts.
8206 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8207 * remote.c (remote_supports_btrace): Remove.
8208 (init_remote_ops): Remove remote_supports_btrace.
8209 * target-delegates.c: Regenerated.
8210 * target.c (target_supports_btrace): Remove.
8211 * target.h (target_ops) <to_supports_btrace>: Remove
8212 (target_supports_btrace): Remove.
8213 * x86-linux-nat.c (x86_linux_create_target): Remove
8214 linux_supports_btrace.
8216 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8218 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8220 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8221 exception and use message in own exception.
8223 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8225 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8226 (perf_event_pt_event_type): Use gdb_file_up.
8227 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8228 scoped_fd, and scoped_mmap.
8230 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8232 * common/scoped_mmap.h: New.
8233 * unittests/scoped_mmap-selftest.c: New.
8234 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8235 unittests/scoped_mmap-selftest.c.
8237 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8239 * common/scoped_fd.h: New.
8240 * unittests/scoped_fd-selftest.c: New.
8241 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8242 unittests/scoped_fd-selftest.c.
8244 2018-02-09 Tom Tromey <tom@tromey.com>
8246 * auto-load.c (auto_load_section_scripts): Use
8247 gdb::unique_xmalloc_ptr.
8249 2018-02-09 Tom Tromey <tom@tromey.com>
8251 * auto-load.c (execute_script_contents): Use std::string.
8253 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8255 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8256 Python function, rather than a new command.
8258 2018-02-08 Tom Tromey <tom@tromey.com>
8260 * solib.c (solib_find_1): Use std::string.
8261 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8263 2018-02-08 Tom Tromey <tom@tromey.com>
8265 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8267 2018-02-08 Tom Tromey <tom@tromey.com>
8269 * source.c (find_source_lines): Use gdb::def_vector.
8271 2018-02-08 Tom Tromey <tom@tromey.com>
8273 * macrocmd.c (struct temporary_macro_definition): New.
8274 (macro_define_command): Use temporary_macro_definition. Remove
8276 (free_macro_definition_ptr): Remove.
8278 2018-02-08 Tom Tromey <tom@tromey.com>
8280 * macroexp.c (maybe_expand): Use std::string.
8282 2018-02-08 Tom Tromey <tom@tromey.com>
8284 * macroexp.c (struct macro_buffer): Add initializers for some
8286 (init_buffer, init_shared_buffer, free_buffer)
8287 (free_buffer_return_text): Remove.
8288 (macro_buffer): New constructors.
8289 (~macro_buffer): New destructor.
8290 (macro_buffer::set_shared): New method.
8291 (macro_buffer::resize_buffer, macro_buffer::appendc)
8292 (macro_buffer::appendmem): Now methods, not free functions.
8293 (set_token, append_tokens_without_splicing, stringify)
8294 (macro_stringify): Update.
8295 (gather_arguments): Change return type. Remove argc_p argument,
8296 add args_ptr argument. Use std::vector.
8297 (substitute_args): Remove argc argument. Accept std::vector.
8298 (expand): Update. Use std::vector.
8299 (scan, macro_expand, macro_expand_next): Update.
8301 2018-02-08 Tom Tromey <tom@tromey.com>
8303 * symtab.c (default_collect_symbol_completion_matches_break_on):
8304 Use unique_xmalloc_ptr.
8305 * macroscope.h: (sal_macro_scope, user_macro_scope)
8306 (default_macro_scope): Return unique_xmalloc_ptr.
8307 * macroscope.c (sal_macro_scope, user_macro_scope)
8308 (default_macro_scope): Return unique_xmalloc_ptr.
8309 * macroexp.h (macro_expand, macro_expand_once): Return
8311 * macroexp.c (macro_expand, macro_expand_once): Return
8313 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8314 (info_macro_command, info_macros_command): Use
8316 * compile/compile-c-support.c (write_macro_definitions): Use
8318 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8320 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8322 * value.c (value_static_field): Assign field type instead of
8323 containing type when returning an optimized out value.
8325 2018-02-06 Yao Qi <yao.qi@linaro.org>
8327 * ft32-tdep.c (ft32_read_pc): Remove.
8328 (ft32_write_pc): Remove.
8329 (ft32_gdbarch_init): Update.
8330 * m32r-tdep.c (m32r_read_pc): Remove.
8331 (m32r_gdbarch_init): Update.
8332 * mep-tdep.c (mep_read_pc): Remove.
8333 (mep_gdbarch_init): Update.
8334 * microblaze-tdep.c (microblaze_write_pc): Remove.
8335 (microblaze_gdbarch_init): Update.
8336 * mn10300-tdep.c (mn10300_read_pc): Remove.
8337 (mn10300_write_pc): Remove.
8338 (mn10300_gdbarch_init): Update.
8339 * moxie-tdep.c (moxie_read_pc): Remove.
8340 (moxie_write_pc): Remove.
8341 (moxie_gdbarch_init): Update.
8343 2018-02-06 Yao Qi <yao.qi@linaro.org>
8345 * expprint.c (print_subexp_standard): Handle
8346 OP_F77_UNDETERMINED_ARGLIST.
8347 (dump_subexp_body_standard): Likewise.
8349 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8351 * target-descriptions.c (tdesc_element_visitor) Add empty
8353 (tdesc_type): Move make_gdb_type from here.
8354 (tdesc_type_builtin): Likewise.
8355 (tdesc_type_vector): Likewise.
8356 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8357 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8358 (make_gdb_type_union): Likewise.
8359 (make_gdb_type_flags): Likewise.
8360 (make_gdb_type_enum): Likewise.
8361 (make_gdb_type): New function.
8362 (tdesc_register_type): Use static make_gdb_type.
8364 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8366 * infcmd.c (default_print_one_register_info): Align natural-format
8367 column values consistently one under another.
8368 (pad_to_column): New function.
8370 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8372 * dwarf2read.c (dwarf2_physname): Move commment.
8374 2018-02-01 Leszek Swirski <leszeks@google.com>
8376 * varobj.c (varobj_formatted_print_options): Allow recursive
8377 pretty printing if pretty printing is enabled.
8379 2018-02-01 Leszek Swirski <leszeks@google.com>
8381 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8382 names after a structop as a filename.
8384 2018-02-01 Yao Qi <yao.qi@linaro.org>
8386 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8387 (arm_record_coproc_data_proc): Likewise.
8389 2018-02-01 Yao Qi <yao.qi@linaro.org>
8391 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8393 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8395 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8396 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8398 2018-01-31 Pedro Alves <palves@redhat.com>
8400 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8401 * inflow.c (child_terminal_save_inferior): Wrap reference to
8402 tcgetpgrp in HAVE_TERMIOS_H.
8403 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8405 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8406 always iterate over all inferiors.
8407 (gdbsim_cntrl_c): Adjust.
8408 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8410 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8412 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8413 index type is objfile-owned if the element type is as well.
8415 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8419 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8421 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8422 "features/s390x-linux64.c".
8423 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8424 s390_linux32 and s390x_linux64.
8425 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8427 * s390-tdep.c: Include "features/s390-linux32.c" and
8428 "features/s390x-linux64.c".
8429 (s390_tdesc_valid): Add check for tdesc_has_registers.
8430 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8431 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8432 tdesc_s390x_linux64.
8433 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8434 tdesc_s390x_linux64 to...
8435 * s390-tdep.h: ...here.
8437 2018-01-30 Pedro Alves <palves@redhat.com>
8440 * config.in, configure: Regenerate.
8441 * configure.ac: Check for getpgid.
8442 * go32-nat.c (go32_pass_ctrlc): New.
8443 (go32_target): Install it.
8444 * inf-child.c (inf_child_target): Install
8445 child_terminal_save_inferior, child_pass_ctrlc and
8447 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8448 (inf_ptrace_target): No longer install it.
8449 * infcmd.c (interrupt_target_1): Adjust.
8450 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8451 (child_interrupt): Declare.
8452 (inferior::terminal_state): New.
8453 * inflow.c (struct terminal_info): Update comments.
8454 (inferior_process_group): Delete.
8455 (terminal_is_ours): Delete.
8456 (gdb_tty_state): New.
8457 (child_terminal_init): Adjust.
8458 (is_gdb_terminal, sharing_input_terminal_1)
8459 (sharing_input_terminal): New functions.
8460 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8461 Set the process's actual process group in the foreground if
8462 possible. Handle is_ours_for_output/is_ours distinction. Don't
8463 mark terminal as the inferior's if not sharing GDB's terminal.
8464 Don't check attach_flag.
8465 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8466 pass down a target_terminal_state.
8467 (child_terminal_save_inferior): New, factored out from ...
8468 (child_terminal_ours_1): ... this. Handle
8469 target_terminal_state::is_ours_for_output.
8470 (child_interrupt, child_pass_ctrlc): New.
8471 (inflow_inferior_exit): Clear the inferior's terminal_state.
8472 (copy_terminal_info): Copy the inferior's terminal state.
8473 (_initialize_inflow): Remove reference to terminal_is_ours.
8474 * inflow.h (inferior_process_group): Delete.
8475 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8476 * procfs.c (procfs_target): Don't install procfs_interrupt.
8477 (procfs_interrupt): Delete.
8478 * remote.c (remote_serial_quit_handler): Adjust.
8479 (remote_interrupt): Remove ptid parameter. Adjust.
8480 * target-delegates.c: Regenerate.
8481 * target.c: Include "terminal.h".
8482 (target_terminal::terminal_state): Rename to ...
8483 (target_terminal::m_terminal_state): ... this.
8484 (target_terminal::init): Adjust.
8485 (target_terminal::inferior): Adjust to per-inferior
8487 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8488 (target_terminal::ours, target_terminal::ours_for_output): Use
8489 target_terminal_is_ours_kind.
8490 (target_interrupt): Remove ptid parameter. Adjust.
8491 (default_target_pass_ctrlc): Adjust.
8492 * target.h (target_ops::to_terminal_save_inferior): New field.
8493 (target_ops::to_interrupt): Remove ptid_t parameter.
8494 (target_interrupt): Remove ptid_t parameter. Update comment.
8495 (target_pass_ctrlc): Update comment.
8496 * target/target.h (target_terminal_state): New scoped enum,
8498 (target_terminal::terminal_state): ... here.
8499 (target_terminal::inferior): Update comments.
8500 (target_terminal::restore_inferior): New.
8501 (target_terminal::is_inferior, target_terminal::is_ours)
8502 (target_terminal::is_ours_for_output): Adjust.
8503 (target_terminal::scoped_restore_terminal_state): Adjust to
8504 rename, and call restore_inferior() instead of inferior().
8505 (target_terminal::scoped_restore_terminal_state::m_state): Change
8507 (target_terminal::terminal_state): Rename to ...
8508 (target_terminal::m_terminal_state): ... this and change type.
8510 2018-01-30 Pedro Alves <palves@redhat.com>
8512 * linux-nat.c (wait_for_signal): New function.
8513 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8515 (async_terminal_is_ours)
8516 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8517 (linux_nat_add_target): Don't override
8518 to_terminal_inferior/to_terminal_ours.
8520 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8522 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8524 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8526 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8527 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8528 dwarf2_per_objfile_free here.
8529 (dwarf2_per_objfile_free): Remove.
8530 (_initialize_dwarf2_read): Don't register
8531 dwarf2_per_objfile_free as a registry cleanup.
8533 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8535 Avoid compilation errors in MinGW native builds
8537 The error is triggered by including python-internal.h, and the
8540 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8541 from build-gnulib/import/math.h:27,
8542 from d:/usr/Python26/include/pyport.h:235,
8543 from d:/usr/Python26/include/Python.h:58,
8544 from python/python-internal.h:94,
8545 from python/py-arch.c:24:
8546 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8550 This happens because Python headers define 'hypot' to expand t
8551 '_hypot' in the Windows builds.
8552 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8553 'hypoth'. This avoids a compilation error.
8555 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8557 * MAINTAINERS (Write After Approval): Fix ordering.
8559 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8561 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8563 2018-01-26 Alan Modra <amodra@gmail.com>
8565 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8566 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8567 Remove nop. Make const. Comment.
8568 (powerpc32_plt_stub_so_2): New.
8569 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8570 Correct count. Update uses.
8571 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8572 Move common code reading PLT entry word. Correct
8573 powerpc32_plt_stub PLT address calculation.
8574 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8575 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8576 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8577 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8578 (ppc64_standard_linkage8): Likewise.
8579 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8580 Correct insns description.
8581 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8583 2018-01-24 Pedro Alves <palves@redhat.com>
8585 GCC PR libstdc++/83906
8586 * gdbtypes.c (operator==(const dynamic_prop &,
8587 const dynamic_prop &)): New.
8588 (operator==(const range_bounds &, const range_bounds &)): New.
8589 (check_types_equal): Use them instead of memcmp.
8590 * gdbtypes.h (operator==(const dynamic_prop &,
8591 const dynamic_prop &)): Declare.
8592 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8593 (operator==(const range_bounds &, const range_bounds &)): Declare.
8594 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8596 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8598 * s390-linux-tdep.c (s390_record_address_mask)
8599 (s390_record_calc_disp_common, s390_record_calc_disp)
8600 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8601 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8602 (s390_process_record): Move to s390-tdep.c.
8603 (s390_linux_init_abi_any): Adjust.
8604 * s390-tdep.c (s390_record_address_mask)
8605 (s390_record_calc_disp_common, s390_record_calc_disp)
8606 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8607 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8608 (s390_process_record): Moved from s390-linux-tdep.c
8609 (s390_gdbarch_init): Adjust.
8611 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8613 * s390-linux-nat.c (s390-tdep.h): New include.
8614 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8615 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8616 (ALLDEPFILES): Add s390-tdep.c.
8617 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8618 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8619 * s390-tdep.h: ...this. New file.
8620 * s390-linux-tdep.c (s390-tdep.h): New include.
8621 (_initialize_s390_tdep): Rename to...
8622 (_initialize_s390_linux_tdep): ...this and adjust.
8623 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8624 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8626 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8627 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8628 (s390_is_partial_instruction, s390_software_single_step)
8629 (is_non_branch_ril, s390_displaced_step_copy_insn)
8630 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8631 (s390_prologue_data, s390_addr, s390_store, s390_load)
8632 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8633 (s390_register_call_saved, s390_guess_tracepoint_registers)
8634 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8635 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8636 (s390_pseudo_register_name, s390_pseudo_register_type)
8637 (s390_pseudo_register_read, s390_pseudo_register_write)
8638 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8639 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8640 (s390_addr_bits_remove, s390_address_class_type_flags)
8641 (s390_address_class_type_flags_to_name)
8642 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8643 (s390_function_arg_float, s390_function_arg_vector)
8644 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8645 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8646 (s390_frame_align, s390_register_return_value, s390_return_value)
8647 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8648 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8649 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8650 (s390_trad_frame_prev_register, s390_unwind_cache)
8651 (s390_prologue_frame_unwind_cache)
8652 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8653 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8654 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8655 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8656 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8657 (s390_frame_base_address, s390_local_base_address)
8658 (s390_frame_base, s390_gcc_target_options)
8659 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8660 (s390_validate_reg_range, s390_tdesc_valid)
8661 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8662 * s390-tdep.c: ...this. New file.
8664 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8666 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8667 (s390_process_record, s390_gdbarch_tdep_alloc)
8668 (s390_linux_init_abi_any): Use/set new hook.
8670 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8672 * s390-linux-tdep.c (osabi.h): New include.
8673 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8674 (s390_linux_init_abi_any): New functions.
8675 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8677 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8679 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8680 tdesc_has_registers check
8682 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8684 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8685 (s390_validate_reg_range): New macro.
8686 (s390_gdbarch_init): Adjust.
8688 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8690 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8691 (s390_gdbarch_tdep_alloc): Adjust.
8692 (s390_gdbarch_init): Adjust.
8694 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8696 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8697 <have_tdb>: Change type to bool.
8698 (s390_gdbarch_tdep_alloc): Adjust.
8699 (s390_gdbarch_init): Adjust.
8701 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8703 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8704 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8705 (s390_gdbarch_tdep_alloc): New function.
8706 (s390_gdbarch_init): Allocate tdep at start and use its fields
8707 instead of separate variables.
8709 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8711 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8712 when looking for cached gdbarch and add comment for remaining.
8714 2018-01-22 Pedro Alves <palves@redhat.com>
8715 Sergio Durigan Junior <sergiodj@redhat.com>
8717 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8720 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8722 * MAINTAINERS: Update my company e-mail address.
8724 2018-01-22 Yao Qi <yao.qi@linaro.org>
8726 * regcache.c (cooked_write_test): New function.
8727 (_initialize_regcache): Register the test.
8729 2018-01-22 Yao Qi <yao.qi@linaro.org>
8731 * ia64-tdep.c (ia64_pseudo_register_read): Call
8732 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8733 * m32c-tdep.c (m32c_cat_read): Likewise.
8734 (m32c_r3r2r1r0_read): Likewise.
8735 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8736 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8738 2018-01-22 Yao Qi <yao.qi@linaro.org>
8740 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8741 method raw_read instead of regcache_raw_read.
8742 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8743 * arm-tdep.c (arm_neon_quad_read): Likewise.
8744 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8745 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8746 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8747 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8748 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8749 (i386_pseudo_register_read_into_value): Likewise.
8750 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8751 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8752 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8753 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8754 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8755 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8756 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8757 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8758 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8760 2018-01-22 Yao Qi <yao.qi@linaro.org>
8762 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8763 * configure.tgt: Remove target mt.
8764 * mt-tdep.c: Remove.
8765 * regcache.c (cooked_read_test): Remove the check for mt.
8767 2018-01-22 Yao Qi <yao.qi@linaro.org>
8769 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8770 instead of gdbarch_pseudo_register_read_value.
8772 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8774 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8777 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8779 * linespec.c (create_sals_line_offset): Remove code that preserved
8780 the symtab_and_line's line number.
8782 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8784 * varobj.c (varobj_create): Don't set valid_block when creating a
8787 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8789 * varobj.c (varobj_create): Remove out of date comment.
8791 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8794 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8795 updating innermost block.
8796 * parse.c (innermost_block_tracker::update): Take extra type
8797 parameter, and check types match before updating innermost block.
8798 (write_dollar_variable): Update innermost block for registers.
8799 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8800 (innermost_block_tracker::innermost_block_tracker): Initialise
8802 (innermost_block_tracker::reset): Take type parameter.
8803 (innermost_block_tracker::update): Take type parameter, and pass
8804 type through as needed.
8805 (innermost_block_tracker::m_types): New member.
8806 * varobj.c (varobj_create): Pass type when reseting innermost
8809 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8811 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8812 * ada-lang.c (resolve_subexp): Likewise.
8813 * breakpoint.c (set_breakpoint_condition) Likewise.
8814 (watch_command_1) Likewise.
8815 * c-exp.y (variable): Likewise.
8816 * d-exp.y (PrimaryExpression): Likewise.
8817 * f-exp.y (variable): Likewise.
8818 * go-exp.y (variable): Likewise.
8819 * m2-exp.y (variable): Likewise.
8820 * objfiles.c (objfile::~objfile): Likewise.
8821 * p-exp.y (variable): Likewise.
8822 * parse.c (innermost_block): Change type.
8823 * parser-defs.h (class innermost_block_tracker): New.
8824 (innermost_block): Change to innermost_block_tracker.
8825 * printcmd.c (display_command): Switch to innermost_block API.
8826 (do_one_display): Likewise.
8827 * rust-exp.y (do_one_display): Likewise.
8828 * symfile.c (clear_symtab_users): Likewise.
8829 * varobj.c (varobj_create): Switch to innermost_block API, replace
8830 use of innermost_block with block stored on varobj object.
8832 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8834 * expression.h (innermost_block): Remove declaration.
8835 * varobj.c: Add 'parser-defs.h' include.
8837 2018-01-19 Tom Tromey <tom@tromey.com>
8839 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8840 symbols in the static and global blocks.
8842 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8844 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8845 gdb_ptrace.h, and move including gdb_wait.h ...
8846 * nat/linux-ptrace.h: ... to here.
8848 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8850 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8851 inf_ptrace_detach_success.
8852 (inf_ptrace_detach_success): Add inferior parameter, use it
8853 instead of inferior_ptid, pass it to detach_inferior.
8854 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8856 * inferior.c (detach_inferior): Add overload that takes an
8858 * inferior.h (detach_inferior): Likewise.
8859 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8860 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8861 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8863 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8865 * target.h (struct target_ops) <to_detach>: Add inferior
8867 (target_detach): Likewise.
8868 * target.c (dispose_inferior): Pass inferior down.
8869 (target_detach): Pass inferior down. Assert that it is equal to
8870 the current inferior.
8871 * aix-thread.c (aix_thread_detach): Pass inferior down.
8872 * corefile.c (core_file_command): Pass current_inferior() down.
8873 * corelow.c (core_detach): Add inferior parameter.
8874 * darwin-nat.c (darwin_detach): Likewise.
8875 * gnu-nat.c (gnu_detach): Likewise.
8876 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8877 * infcmd.c (detach_command): Pass current_inferior() down to
8879 * infrun.c (follow_fork_inferior): Pass parent_inf to
8881 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8883 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8884 * linux-thread-db.c (thread_db_detach): Likewise.
8885 * nto-procfs.c (procfs_detach): Likewise.
8886 * procfs.c (procfs_detach): Likewise.
8887 * record.c (record_detach): Likewise.
8888 * record.h (struct inferior): Forward-declare.
8889 (record_detach): Add inferior parameter.
8890 * remote-sim.c (gdbsim_detach): Likewise.
8891 * remote.c (remote_detach_1): Likewise.
8892 (remote_detach): Likewise.
8893 (extended_remote_detach): Likewise.
8894 * sol-thread.c (sol_thread_detach): Likewise.
8895 * target-debug.h (target_debug_print_inferior_p): New macro.
8896 * target-delegates.c: Re-generate.
8897 * top.c (kill_or_detach): Pass inferior down to target_detach.
8898 * windows-nat.c (windows_detach): Add inferior parameter.
8900 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8902 * target.h (struct target_ops) <to_detach>: Remove args
8904 (target_detach): Likewise.
8905 * target.c (dispose_inferior): Adjust.
8906 (target_detach): Remove args parameter, adjust.
8907 * aix-thread.c (aix_thread_detach): Adjust.
8908 * corefile.c (core_file_command): Adjust.
8909 * corelow.c (core_detach): Adjust.
8910 * darwin-nat.c (darwin_detach): Adjust.
8911 * gnu-nat.c (gnu_detach): Adjust.
8912 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8913 * infcmd.c (detach_command): Adjust
8914 * infrun.c (follow_fork_inferior): Adjust.
8915 (handle_vfork_child_exec_or_exit): Adjust.
8916 * linux-fork.c (linux_fork_detach): Remove args parameter.
8917 * linux-fork.h (linux_fork_detach): Likewise.
8918 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8919 * linux-thread-db.c (thread_db_detach): Likewise.
8920 * nto-procfs.c (procfs_detach): Likewise.
8921 * procfs.c (procfs_detach): Likewise.
8922 (do_detach): Remove signo parameter.
8923 * record.c (record_detach): Remove args parameter.
8924 * record.h (record_detach): Likewise.
8925 * remote-sim.c (gdbsim_detach): Likewise.
8926 * remote.c (remote_detach_1): Likewise.
8927 (remote_detach): Likewise.
8928 (extended_remote_detach): Likewise.
8929 * sol-thread.c (sol_thread_detach): Likewise.
8930 * target-delegates.c: Re-generate.
8931 * top.c (struct qt_args) <args>: Remove field.
8932 (kill_or_detach): Don't pass args.
8933 (quit_force): Don't set args.
8934 * windows-nat.c (windows_detach): Remove args parameter.
8936 2018-01-19 Yao Qi <yao.qi@linaro.org>
8938 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8939 (arm_linux_init_abi): Install it.
8941 2018-01-19 Yao Qi <yao.qi@linaro.org>
8943 * osabi.c (gdb_osabi_names): Extend the regexp for
8944 arm-linux-gnueabihf.
8946 2018-01-18 Yao Qi <yao.qi@linaro.org>
8948 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8950 (abbrev_table::add_abbrev): Update.
8951 (abbrev_table::lookup_abbrev): Update.
8953 2018-01-18 Yao Qi <yao.qi@linaro.org>
8955 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8957 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8959 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8962 2018-01-17 Tom Tromey <tom@tromey.com>
8964 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8966 2018-01-17 Tom Tromey <tom@tromey.com>
8968 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8969 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8970 (create_array_type_with_stride): Update.
8971 * dwarf2read.c (set_die_type): Update.
8973 2018-01-17 Tom Tromey <tom@tromey.com>
8975 * dwarf2read.c (delayed_method_info): Remove typedef.
8976 (dwarf2_cu::method_info): Now a std::vector.
8977 (add_to_method_list): Update.
8978 (free_delayed_list): Remove.
8979 (compute_delayed_physnames): Update.
8980 (process_full_comp_unit, process_full_type_unit): Clear the method
8981 list. Remove cleanups.
8982 (psymtab_include_file_name): Add name_holder parameter. Use
8984 (dwarf_decode_lines): Update.
8986 2018-01-17 Tom Tromey <tom@tromey.com>
8987 Simon Marchi <simon.marchi@ericsson.com>
8989 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8990 (dwarf2_per_objfile::free_cached_comp_units)
8991 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8992 (init_cutu_and_read_dies_no_follow): Update.
8993 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8994 (dwarf2_cu::~dwarf2_cu): New.
8995 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8996 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8998 2018-01-17 Tom Tromey <tom@tromey.com>
8999 Simon Marchi <simon.marchi@ericsson.com>
9001 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9002 (struct die_reader_specs) <abbrev_table>: New member.
9003 (struct abbrev_table): Add constructor.
9004 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9005 <abbrev_obstack>: Now an auto_obstack.
9006 (abbrev_table_up): New typedef.
9007 (init_cu_die_reader): Add abbrev_table parameter.
9008 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9009 Add result_dwo_abbrev_table.
9010 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9011 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9013 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9015 (skip_children): Update.
9016 (abbrev_table::alloc_abbrev): Rename from
9017 abbrev_table_alloc_abbrev.
9018 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9019 (abbrev_table::lookup_abbrev): Rename from
9020 abbrev_table_lookup_abbrev.
9021 (abbrev_table_read_table): Return abbrev_table_up.
9022 (abbrev_table_free, abbrev_table_free_cleanup)
9023 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9024 (load_partial_dies): Update.
9026 2018-01-17 Tom Tromey <tom@tromey.com>
9028 * dwarf2read.c (dwarf2_compute_name): Update comment.
9029 (read_func_scope, read_variable): Update.
9030 (new_symbol): Remove.
9031 (new_symbol_full): Rename to new_symbol.
9033 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9036 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9037 a warning instead of throwing an error, set section size to 0 and return
9039 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9041 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9043 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9045 (linux_ptrace_attach_fail_reason_string): Likewise.
9046 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9048 (linux_ptrace_attach_fail_reason_string): Likewise.
9049 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9051 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9053 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9055 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9058 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9059 checking for fs_base/gs_base fields in struct user_regs_struct.
9060 * configure: Regenerate.
9062 2018-01-17 Yao Qi <yao.qi@linaro.org>
9064 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9066 (aarch64_linux_init_abi): Install it to gdbarch hook
9069 2018-01-15 Pedro Alves <palves@redhat.com>
9071 * common/signals-state-save-restore.c
9072 (save_original_signals_state): Fix typos.
9074 2017-01-12 Tom Tromey <tom@tromey.com>
9075 Sergio Durigan Junior <sergiodj@redhat.com>
9077 * Makefile.in (install-only): Install gdb-add-index.
9079 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9081 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9083 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9085 * infrun.c (keep_going_pass_signal): Clear step-over info when
9086 insert_breakpoints fails.
9088 2018-01-11 Pedro Alves <palves@redhat.com>
9091 * infrun.c (resume): Rename to ...
9092 (resume_1): ... this.
9093 (resume): Reimplement as wrapper around resume_1.
9095 2018-01-11 Pedro Alves <palves@redhat.com>
9098 * remote.c (remote_parse_stop_reply): Default to the last-set
9099 general thread instead of to 'magic_null_ptid'.
9101 2018-01-10 Pedro Alves <palves@redhat.com>
9103 * language.h (language_get_symbol_name_matcher): Rename ...
9104 (get_symbol_name_matcher): ... this.
9105 * language.c (language_get_symbol_name_matcher): Ditto.
9106 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9109 2018-01-10 Pedro Alves <palves@redhat.com>
9113 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9114 Adjust to use language_get_symbol_name_matcher instead of
9115 language_defn::la_get_symbol_name_matcher.
9116 * language.c (language_get_symbol_name_matcher): If in Ada mode
9117 and the lookup name is a verbatim match, return Ada's matcher.
9118 * language.h (language_get_symbol_name_matcher): Adjust comment.
9119 (ada_lookup_name_info::verbatim_p):: New method.
9121 2018-01-10 Pedro Alves <palves@redhat.com>
9124 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9125 minsym's language is language_auto or language_cplus, pass down
9126 language_ada instead.
9127 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9129 2018-01-10 Pedro Alves <palves@redhat.com>
9132 * minsyms.c (linkage_name_str): New function.
9133 (iterate_over_minimal_symbols): Use it.
9135 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9137 * NEWS: Document that 'info proc' now works on FreeBSD.
9139 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9141 * configure.ac: Check for kinfo_getfile in libutil.
9142 * configure: Regenerate.
9143 * config.in: Regenerate.
9144 * fbsd-nat.c: Include "fbsd-tdep.h".
9145 (fbsd_fetch_cmdline): New.
9146 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9147 rather than calling error.
9148 (fbsd_info_proc): New.
9149 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9150 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9151 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9153 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9155 * fbsd-nat.c (struct free_deleter): Remove.
9156 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9158 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9160 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9161 NULL for an empty pathname.
9163 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9165 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9166 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9167 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9168 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9169 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9170 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9171 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9172 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9173 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9174 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9175 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9176 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9177 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9178 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9179 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9181 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9183 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9184 (gnu_xfer_auxv): New function.
9185 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9188 2018-01-08 Yao Qi <yao.qi@linaro.org>
9189 Simon Marchi <simon.marchi@ericsson.com>
9191 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9193 (COMMON_OBS): Remove selftest.o.
9194 * configure.ac: Append selftest-arch.c and common/selftest.c to
9195 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9196 * configure: Re-generated.
9197 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9199 (maintenance_info_selftests): Likewise.
9201 2018-01-08 Xavier Roirand <roirand@adacore.com>
9203 * ada-valprint.c (val_print_packed_array_elements): Use
9204 proper number of elements when printing an array indexed
9205 by an enumeration type.
9207 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9209 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9210 (dw2_get_file_names_reader): Adjust.
9211 (lookup_dwo_signatured_type): Adjust.
9212 (lookup_dwp_signatured_type): Adjust.
9213 (lookup_signatured_type): Adjust.
9214 (create_type_unit_group): Adjust.
9215 (get_type_unit_group): Adjust.
9216 (process_psymtab_comp_unit_reader): Adjust.
9217 (build_type_psymtabs_reader): Adjust.
9218 (scan_partial_symbols): Adjust.
9219 (add_partial_symbol): Adjust.
9220 (add_partial_subprogram): Adjust.
9221 (peek_die_abbrev): Adjust.
9222 (fixup_go_packaging): Adjust.
9223 (process_imported_unit_die): Adjust.
9224 (dwarf2_compute_name): Adjust.
9225 (dwarf2_physname): Adjust.
9226 (read_import_statement): Adjust.
9227 (handle_DW_AT_stmt_list): Adjust.
9228 (read_file_scope): Adjust.
9229 (read_func_scope): Adjust.
9230 (read_lexical_block_scope): Adjust.
9231 (read_call_site_scope): Adjust.
9232 (read_variable): Adjust.
9233 (dwarf2_rnglists_process): Adjust.
9234 (dwarf2_ranges_process): Adjust.
9235 (dwarf2_ranges_read): Adjust.
9236 (dwarf2_get_pc_bounds): Adjust.
9237 (dwarf2_record_block_ranges): Adjust.
9238 (dwarf2_add_field): Adjust.
9239 (dwarf2_add_member_fn): Adjust.
9240 (read_structure_type): Adjust.
9241 (process_structure_scope): Adjust.
9242 (read_enumeration_type): Adjust.
9243 (read_array_type): Adjust.
9244 (mark_common_block_symbol_computed): Adjust.
9245 (read_common_block): Adjust.
9246 (read_namespace_type): Adjust.
9247 (read_namespace): Adjust.
9248 (read_module_type): Adjust.
9249 (read_tag_pointer_type): Adjust.
9250 (read_tag_ptr_to_member_type): Adjust.
9251 (read_tag_string_type): Adjust.
9252 (read_subroutine_type): Adjust.
9253 (read_typedef): Adjust.
9254 (read_base_type): Adjust.
9255 (attr_to_dynamic_prop): Adjust.
9256 (read_subrange_type): Adjust.
9257 (read_unspecified_type): Adjust.
9258 (dwarf2_read_abbrevs): Adjust.
9259 (load_partial_dies): Adjust.
9260 (read_partial_die): Adjust.
9261 (find_partial_die): Adjust.
9262 (guess_partial_die_structure_name): Adjust.
9263 (fixup_partial_die): Adjust.
9264 (read_attribute_value): Adjust.
9265 (read_addr_index): Adjust.
9266 (read_addr_index_from_leb128): Adjust.
9267 (read_str_index): Adjust.
9268 (dwarf2_string_attr): Adjust.
9269 (get_debug_line_section): Adjust.
9270 (dwarf_decode_line_header): Adjust.
9271 (lnp_state_machine::check_line_address): Adjust.
9272 (dwarf_decode_lines_1): Adjust.
9273 (dwarf_decode_lines): Adjust.
9274 (dwarf2_start_symtab): Adjust.
9275 (var_decode_location): Adjust.
9276 (new_symbol_full): Adjust.
9277 (dwarf2_const_value_data): Adjust.
9278 (dwarf2_const_value_attr): Adjust.
9279 (dwarf2_const_value): Adjust.
9281 (die_containing_type): Adjust.
9282 (build_error_marker_type): Adjust.
9283 (lookup_die_type): Adjust.
9284 (guess_full_die_structure_name): Adjust.
9285 (anonymous_struct_prefix): Adjust.
9286 (determine_prefix): Adjust.
9287 (dwarf2_name): Adjust.
9288 (follow_die_ref_or_sig): Adjust.
9289 (follow_die_offset): Adjust.
9290 (follow_die_ref): Adjust.
9291 (follow_die_sig_1): Adjust.
9292 (follow_die_sig): Adjust.
9293 (get_signatured_type): Adjust.
9294 (get_DW_AT_signature_type): Adjust.
9295 (decode_locdesc): Adjust.
9296 (dwarf_decode_macros): Adjust.
9297 (cu_debug_loc_section): Adjust.
9298 (fill_in_loclist_baton): Adjust.
9299 (dwarf2_symbol_mark_computed): Adjust.
9300 (init_one_comp_unit): Don't assign
9301 dwarf2_cu::dwarf2_per_objfile.
9302 (set_die_type): Adjust.
9304 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9306 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9307 <dwarf2_per_objfile>: New field.
9308 (dwarf2_per_objfile): Remove global.
9309 (get_dwarf2_per_objfile): New function.
9310 (set_dwarf2_per_objfile): New function.
9311 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9313 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9314 (read_abbrev_offset): Likewise.
9315 (read_indirect_string): Likewise.
9316 (read_indirect_line_string): Likewise.
9317 (read_indirect_string_at_offset): Likewise.
9318 (read_indirect_string_from_dwz): Likewise.
9319 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9321 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9322 (create_all_comp_units): Change objfile parameter to
9324 (create_all_type_units): Likewise.
9325 (process_queue): Add dwarf2_per_objfile parameter.
9326 (read_and_check_comp_unit_head): Likewise.
9327 (lookup_dwo_unit_in_dwp): Likewise.
9328 (get_dwp_file): Likewise.
9329 (process_cu_includes): Likewise.
9330 (struct free_dwo_file_cleanup_data): New struct.
9331 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9332 set_dwarf2_per_objfile.
9333 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9334 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9335 context, adjust calls.
9336 (dw2_instantiate_symtab): Likewise.
9337 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9338 (dw2_get_cu): Likewise.
9339 (create_cu_from_index_list): Change objfile parameter to
9341 (create_cus_from_index_list): Get dwarf2_per_objfile from
9342 context, adjust calls.
9343 (create_cus_from_index): Likewise.
9344 (create_signatured_type_table_from_index): Change objfile
9345 parameter to dwarf2_per_objfile.
9346 (create_signatured_type_table_from_debug_names): Change objfile
9347 parameter to dwarf2_per_objfile.
9348 (create_addrmap_from_index): Likewise.
9349 (create_addrmap_from_aranges): Likewise.
9350 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9351 (dw2_setup): Remove.
9352 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9354 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9355 get_dwarf2_per_objfile.
9356 (dw2_forget_cached_source_info): Likewise.
9357 (dw2_map_symtabs_matching_filename): Likewise.
9358 (struct dw2_symtab_iterator) <index>: Remove.
9359 <dwarf2_per_objfile>: New field.
9360 (dw2_symtab_iter_init): Replace index parameter with
9362 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9363 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9364 (dw2_print_stats): Likewise.
9365 (dw2_dump): Likewise.
9366 (dw2_expand_symtabs_for_function): Likewise.
9367 (dw2_expand_all_symtabs): Likewise.
9368 (dw2_expand_symtabs_with_fullname): Likewise.
9369 (dw2_expand_marked_cus): Replace index and objfile parameters
9370 with dwarf2_per_objfile.
9371 (dw_expand_symtabs_matching_file_matcher): Add
9372 dwarf2_per_objfile parameter and adjust calls.
9373 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9375 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9376 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9378 (create_cus_from_debug_names_list): Replace objfile parameter
9379 with dwarf2_per_objfile and adjust calls.
9380 (create_cus_from_debug_names): Likewise.
9381 (dwarf2_read_debug_names): Likewise.
9382 (mapped_debug_names::namei_to_name): Adjust call.
9383 (dw2_debug_names_iterator::next): Likewise.
9384 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9385 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9386 (dw2_debug_names_dump): Likewise.
9387 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9388 (dw2_debug_names_expand_symtabs_matching): Likewise.
9389 (dwarf2_initialize_objfile): Likewise.
9390 (dwarf2_build_psymtabs): Likewise.
9391 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9393 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9394 (read_and_check_comp_unit_head): Likewise.
9395 (read_abbrev_offset): Likewise.
9396 (create_debug_type_hash_table): Likewise.
9397 (create_debug_types_hash_table): Likewise.
9398 (create_all_type_units): Replace objfile parameter with
9400 (add_type_unit): Add dwarf2_per_objfile parameter.
9401 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9402 with dwarf2_per_objfile.
9403 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9404 (lookup_dwp_signatured_type): Likewise.
9405 (lookup_signatured_type): Likewise.
9406 (read_cutu_die_from_dwo): Likewise.
9407 (init_tu_and_read_dwo_dies): Likewise.
9408 (init_cutu_and_read_dies): Likewise.
9409 (init_cutu_and_read_dies_no_follow): Likewise.
9410 (allocate_type_unit_groups_table): Add objfile parameter.
9411 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9412 (get_type_unit_group): Likewise.
9413 (process_psymtab_comp_unit): Update call.
9414 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9415 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9416 (print_tu_stats): Likewise.
9417 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9419 (build_type_psymtabs): Change objfile parameter to
9421 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9422 passed in void* parameter.
9423 (process_skeletonless_type_units): Change objfile parameter to
9425 (set_partial_user): Likewise.
9426 (dwarf2_build_psymtabs_hard): Likewise.
9427 (read_comp_units_from_section): Likewise.
9428 (create_all_comp_units): Likewise.
9429 (scan_partial_symbols): Update calls.
9430 (add_partial_symbol): Likewise.
9431 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9432 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9433 (process_queue): Add dwarf2_per_objfile parameter.
9434 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9435 (compute_compunit_symtab_includes): Likewise.
9436 (process_cu_includes): Add dwarf2_per_objfile parameter.
9437 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9438 (process_full_type_unit): Likewise.
9439 (process_imported_unit_die): Update call.
9440 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9441 (read_file_scope): Likewise.
9442 (allocate_dwo_file_hash_table): Add objfile parameter.
9443 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9444 (create_cus_hash_table): Likewise.
9445 (create_dwp_hash_table): Likewise.
9446 (create_dwo_unit_in_dwp_v1): Likewise.
9447 (create_dwp_v2_section): Likewise.
9448 (create_dwo_unit_in_dwp_v2): Likewise.
9449 (lookup_dwo_unit_in_dwp): Likewise.
9450 (try_open_dwop_file): Likewise.
9451 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9452 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9453 cleanup to include a reference to dwarf2_per_objfile.
9454 (open_dwp_file): Add dwarf2_per_objfile parameter.
9455 (open_and_init_dwp_file): Likewise.
9456 (get_dwp_file): Likewise.
9457 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9458 (queue_and_load_all_dwo_tus): Update call.
9459 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9461 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9462 (dwarf2_ranges_process): Likewise.
9463 (dwarf2_get_pc_bounds): Likewise.
9464 (mark_common_block_symbol_computed): Likewise.
9465 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9466 (dwarf2_read_abbrevs): Update call.
9467 (read_partial_die): Use dwarf2_per_objfile from cu.
9468 (find_partial_die): Likewise.
9469 (fixup_partial_die): Likewise.
9470 (read_attribute_value): Likewise.
9471 (read_indirect_string_at_offset_from): Add objfile parameter.
9472 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9474 (read_indirect_string_from_dwz): Add objfile parameter.
9475 (read_indirect_string): Add objfile parameter.
9476 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9477 (read_addr_index): Use dwarf2_per_objfile from cu.
9478 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9480 (read_str_index): Use dwarf2_per_objfile from cu.
9481 (get_debug_line_section): Likewise.
9482 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9483 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9484 (new_symbol_full): Use dwarf2_per_objfile from cu.
9485 (build_error_marker_type): Likewise.
9486 (lookup_die_type): Likewise.
9487 (determine_prefix): Likewise.
9488 (follow_die_offset): Likewise.
9489 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9490 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9491 (dwarf2_fetch_die_type_sect_off): Likewise.
9492 (dwarf2_get_die_type): Likewise.
9493 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9494 (get_signatured_type): Likewise.
9495 (get_DW_AT_signature_type): Likewise.
9496 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9497 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9498 (cu_debug_loc_section): Likewise.
9499 (fill_in_loclist_baton): Likewise.
9500 (dwarf2_symbol_mark_computed): Likewise.
9501 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9503 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9505 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9506 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9507 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9508 (set_die_type): Use dwarf2_free_objfile from cu.
9509 (get_die_type_at_offset): Likewise.
9510 (dwarf2_per_objfile_free): Don't assign global variable.
9511 (debug_names) <constructor>: Add dwarf2_per_objfile
9512 parameter, update m_debugstrlookup construction.
9513 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9515 <m_dwarf2_per_objfile>: New field.
9516 <lookup>: Use m_dwarf2_per_objfile.
9517 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9518 (psyms_seen_size): Likewise.
9519 (write_gdbindex): Replace objfile parameter with
9521 (write_debug_names): Likewise.
9522 (write_psymtabs_to_index): Likewise.
9523 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9526 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9528 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9529 <dwarf2_per_objfile>: New field.
9530 (struct dwarf2_per_cu_data) <objfile>: Remove.
9531 <dwarf2_per_objfile>: New field.
9532 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9534 (create_signatured_type_table_from_index): Likewise.
9535 (create_debug_type_hash_table): Likewise.
9536 (fill_in_sig_entry_from_dwo_entry): Likewise.
9537 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9538 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9540 (create_partial_symtab): Access objfile through
9542 (process_psymtab_comp_unit_reader): Likewise.
9543 (read_comp_units_from_section): Likewise.
9544 (scan_partial_symbols): Likewise.
9545 (add_partial_symbol): Likewise.
9546 (add_partial_subprogram): Likewise.
9547 (peek_die_abbrev): Likewise.
9548 (fixup_go_packaging): Likewise.
9549 (process_full_comp_unit): Likewise.
9550 (process_full_type_unit): Likewise.
9551 (process_imported_unit_die): Likewise.
9552 (dwarf2_compute_name): Likewise.
9553 (dwarf2_physname): Likewise.
9554 (read_import_statement): Likewise.
9555 (create_cus_hash_table): Assign dwarf2_physname instead of
9557 (read_func_scope): Access objfile through dwarf2_per_objfile.
9558 (read_lexical_block_scope): Likewise.
9559 (read_call_site_scope): Likewise.
9560 (read_variable): Likewise.
9561 (dwarf2_rnglists_process): Likewise.
9562 (dwarf2_ranges_process): Likewise.
9563 (dwarf2_ranges_read): Likewise.
9564 (dwarf2_record_block_ranges): Likewise.
9565 (dwarf2_add_field): Likewise.
9566 (dwarf2_add_member_fn): Likewise.
9567 (read_structure_type): Likewise.
9568 (process_structure_scope): Likewise.
9569 (read_enumeration_type): Likewise.
9570 (read_array_type): Likewise.
9571 (read_common_block): Likewise.
9572 (read_namespace_type): Likewise.
9573 (read_namespace): Likewise.
9574 (read_module_type): Likewise.
9575 (read_tag_pointer_type): Likewise.
9576 (read_tag_ptr_to_member_type): Likewise.
9577 (read_tag_string_type): Likewise.
9578 (read_subroutine_type): Likewise.
9579 (read_typedef): Likewise.
9580 (read_base_type): Likewise.
9581 (attr_to_dynamic_prop): Likewise.
9582 (read_subrange_type): Likewise.
9583 (read_unspecified_type): Likewise.
9584 (load_partial_dies): Likewise.
9585 (read_partial_die): Likewise.
9586 (find_partial_die): Likewise.
9587 (guess_partial_die_structure_name): Likewise.
9588 (fixup_partial_die): Likewise.
9589 (read_attribute_value): Likewise.
9590 (read_addr_index_from_leb128): Likewise.
9591 (dwarf2_read_addr_index): Likewise.
9592 (dwarf2_string_attr): Likewise.
9593 (lnp_state_machine::check_line_address): Likewise.
9594 (dwarf_decode_lines_1): Likewise.
9595 (dwarf_decode_lines): Likewise.
9596 (dwarf2_start_symtab): Likewise.
9597 (var_decode_location): Likewise.
9598 (new_symbol_full): Likewise.
9599 (dwarf2_const_value_data): Likewise.
9600 (dwarf2_const_value_attr): Likewise.
9601 (dwarf2_const_value): Likewise.
9602 (die_type): Likewise.
9603 (die_containing_type): Likewise.
9604 (lookup_die_type): Likewise.
9605 (guess_full_die_structure_name): Likewise.
9606 (anonymous_struct_prefix): Likewise.
9607 (dwarf2_name): Likewise.
9608 (follow_die_ref_or_sig): Likewise.
9609 (follow_die_offset): Likewise.
9610 (follow_die_ref): Likewise.
9611 (dwarf2_fetch_die_loc_sect_off): Likewise.
9612 (dwarf2_fetch_constant_bytes): Likewise.
9613 (dwarf2_fetch_die_type_sect_off): Likewise.
9614 (dwarf2_get_die_type): Likewise.
9615 (follow_die_sig): Likewise.
9616 (decode_locdesc): Likewise.
9617 (dwarf2_per_cu_objfile): Likewise.
9618 (dwarf2_per_cu_text_offset): Likewise.
9619 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9621 (set_die_type): Access objfile through
9624 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9626 * valprint.c (converted_character_d): Remove typedef.
9627 (DEF_VEC_O (converted_character_d)): Remove.
9628 (count_next_character): Use std::vector.
9629 (print_converted_chars_to_obstack): Likewise.
9630 (generic_printstr): Likewise.
9632 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9634 * xml-support.h (struct gdb_xml_value): Add constructor.
9635 <value>: Change type to unique_xmalloc_ptr.
9636 (gdb_xml_value_s): Remove typedef.
9637 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9638 (gdb_xml_element_start_handler): Change parameter type to
9640 (xml_find_attribute): Likewise.
9641 * xml-support.c (xml_find_attribute): Change parameter type to
9642 std::vector and adjust.
9643 (gdb_xml_values_cleanup): Remove.
9644 (gdb_xml_parser::start_element): Adjust to std::vector.
9645 (xinclude_start_include): Change paraeter type to std::vector
9647 * btrace.c (check_xml_btrace_version): Likewise.
9648 (parse_xml_btrace_block): Likewise.
9649 (parse_xml_btrace_pt_config_cpu): Likewise.
9650 (parse_xml_btrace_pt): Likewise.
9651 (parse_xml_btrace_conf_bts): Likewise.
9652 (parse_xml_btrace_conf_pt): Likewise.
9653 * memory-map.c (memory_map_start_memory): Likewise.
9654 (memory_map_start_property): Likewise.
9655 * osdata.c (osdata_start_osdata): Likewise.
9656 (osdata_start_item): Likewise.
9657 (osdata_start_column): Likewise.
9658 * remote.c (start_thread): Likewise.
9659 * solib-aix.c (library_list_start_library): Likewise.
9660 (library_list_start_list): Likewise.
9661 * solib-svr4.c (library_list_start_library): Likewise.
9662 (svr4_library_list_start_list): Likewise.
9663 * solib-target.c (library_list_start_segment): Likewise.
9664 (library_list_start_section): Likewise.
9665 (library_list_start_library): Likewise.
9666 (library_list_start_list): Likewise.
9667 * tracepoint.c (traceframe_info_start_memory): Likewise.
9668 (traceframe_info_start_tvar): Likewise.
9669 * xml-syscall.c (syscall_start_syscall): Likewise.
9670 * xml-tdesc.c (tdesc_start_target): Likewise.
9671 (tdesc_start_feature): Likewise.
9672 (tdesc_start_reg): Likewise.
9673 (tdesc_start_union): Likewise.
9674 (tdesc_start_struct): Likewise.
9675 (tdesc_start_flags): Likewise.
9676 (tdesc_start_enum): Likewise.
9677 (tdesc_start_field): Likewise.
9678 (tdesc_start_enum_value): Likewise.
9679 (tdesc_start_vector): Likewise.
9681 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9683 * extension.h (struct xmethod_worker) <clone>: Remove.
9684 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9686 (python_xmethod_worker::clone): Remove.
9687 * valops.c (find_overload_match): Use std::move instead of
9690 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9692 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9693 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9694 <free_xmethod_worker_data>: Remove.
9695 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9696 <get_xmethod_arg_types>: Remove.
9697 <get_xmethod_result_type>: Remove.
9698 <invoke_xmethod>: Remove.
9699 * extension.c (new_xmethod_worker): Remove.
9700 (clone_xmethod_worker): Remove.
9701 (get_matching_xmethod_workers): Return void, pass std::vector by
9703 (get_xmethod_arg_types): Rename to...
9704 (xmethod_worker::get_arg_types): ... this, and adjust.
9705 (get_xmethod_result_type): Rename to...
9706 (xmethod_worker::get_result_type): ... this, and adjust.
9707 (invoke_xmethod): Remove.
9708 (free_xmethod_worker): Remove.
9709 (free_xmethod_worker_vec): Remove.
9710 * extension.h (enum ext_lang_rc): Move here from
9712 (struct xmethod_worker): Add constructor and destructor.
9715 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9716 virtual pure methods.
9717 <get_arg_types, get_result_type>: New methods.
9718 (xmethod_worker_ptr): Remove typedef.
9719 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9720 (xmethod_worker_vec): Remove typedef.
9721 (xmethod_worker_up): New typedef.
9722 (invoke_xmethod): Remove.
9723 (clone_xmethod_worker): Remove.
9724 (free_xmethod_worker): Remove.
9725 (free_xmethod_worker_vec): Remove.
9726 (get_xmethod_arg_types): Remove.
9727 (get_xmethod_result_type): Remove.
9728 * valops.c (find_method_list): Use std::vector, don't use
9729 intermediate vector.
9730 (value_find_oload_method_list): Use std::vector.
9731 (find_overload_match): Use std::vector.
9732 (find_oload_champ): Use std::vector.
9733 * value.c (value_free): Use operator delete.
9734 (value_of_xmethod): Rename to...
9735 (value_from_xmethod): ... this. Don't assign
9736 xmethod_worker::value, take rvalue-reference.
9737 (result_type_of_xmethod): Adjust.
9738 (call_xmethod): Adjust.
9739 * value.h: Include extension.h.
9740 (struct xmethod_worker): Don't forward-declare.
9741 (value_of_xmethod): Rename to...
9742 (value_from_xmethod): ... this, take rvalue-reference.
9743 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9744 (struct python_xmethod_worker): ... this, add constructor and
9746 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9747 (gdbpy_free_xmethod_worker_data): Rename to...
9748 (python_xmethod_worker::~python_xmethod_worker): ... this and
9750 (gdbpy_clone_xmethod_worker_data): Rename to...
9751 (python_xmethod_worker::clone): ... this and adjust.
9752 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9754 (gdbpy_get_xmethod_arg_types): Rename to...
9755 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9756 (gdbpy_get_xmethod_result_type): Rename to...
9757 (python_xmethod_worker::do_get_result_type): ... this and
9759 (gdbpy_invoke_xmethod): Rename to...
9760 (python_xmethod_worker::invoke): ... this and adjust.
9761 (new_python_xmethod_worker): Rename to...
9762 (python_xmethod_worker::python_xmethod_worker): ... this and
9764 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9766 (gdbpy_free_xmethod_worker_data): Remove.
9767 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9768 (gdbpy_get_xmethod_arg_types): Remove.
9769 (gdbpy_get_xmethod_result_type): Remove.
9770 (gdbpy_invoke_xmethod): Remove.
9771 * python/python.c (python_extension_ops): Remove obsolete
9774 2018-01-05 Pedro Alves <palves@redhat.com>
9777 * common/signals-state-save-restore.c
9778 (save_original_signals_state): New parameter 'quiet'. Warn if we
9779 find a custom handler preinstalled, instead of internal erroring.
9780 But only warn if !quiet.
9781 * common/signals-state-save-restore.h
9782 (save_original_signals_state): New parameter 'quiet'.
9783 * main.c (captured_main_1): Move save_original_signals_state call
9784 after option handling, and pass QUIET.
9786 2018-01-05 Pedro Alves <palves@redhat.com>
9788 * spu-tdep.c (spu_catch_start): Pass
9789 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9791 2018-01-05 Pedro Alves <palves@redhat.com>
9794 * ada-lang.c (literal_symbol_name_matcher): New function.
9795 (ada_get_symbol_name_matcher): Use it for
9796 symbol_name_match_type::SEARCH_NAME.
9797 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9798 it down instead of assuming symbol_name_match_type::FULL.
9799 * block.h (block_lookup_symbol): New parameter 'match_type'.
9800 * c-valprint.c (print_unpacked_pointer): Use
9801 lookup_symbol_search_name instead of lookup_symbol.
9802 * compile/compile-object-load.c (get_out_value_type): Pass down
9803 symbol_name_match_type::SEARCH_NAME.
9804 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9805 symbol_name_match_type::FULL.
9806 * cp-support.c (cp_get_symbol_name_matcher): Handle
9807 symbol_name_match_type::SEARCH_NAME.
9808 * infrun.c (insert_exception_resume_breakpoint): Use
9809 lookup_symbol_search_name.
9810 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9811 * psymtab.c (maintenance_check_psymtabs): Use
9812 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9813 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9815 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9816 if symbol_name_match_type::SEARCH_NAME.
9817 (lookup_symbol_in_language): Pass down
9818 symbol_name_match_type::FULL.
9819 (lookup_symbol_search_name): New.
9820 (lookup_language_this): Pass down
9821 symbol_name_match_type::SEARCH_NAME.
9822 (lookup_symbol_aux, lookup_local_symbol): New parameter
9823 'match_type'. Pass it down.
9824 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9825 (lookup_symbol_search_name): New declaration.
9826 (lookup_symbol_in_block): New 'match_type' parameter.
9828 2018-01-05 Pedro Alves <palves@redhat.com>
9831 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9833 (ada_lookup_symbol): Reimplement in terms of
9834 ada_lookup_symbol_list, bits factored out from
9835 ada_lookup_encoded_symbol.
9837 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9839 * ada-exp.y (write_object_renaming): When subscripting an array
9840 using a symbol as the index, pass the block in call to
9841 ada_lookup_encoded_symbol when looking that symbol up.
9843 2018-01-05 Jerome Guitton <guitton@adacore.com>
9845 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9848 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9850 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9851 the case where VALUE_LVAL (val0) is not lval_memory.
9853 2018-01-05 Xavier Roirand <roirand@adacore.com>
9855 * ada-valprint.c (print_optional_low_bound): Handle
9856 character-indexed array printing like boolean-indexed array
9859 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9861 * NEWS: Create a new section for the next release branch.
9862 Rename the section of the current branch, now that it has
9865 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9867 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9868 * version.in: Bump version to 8.1.50.DATE-git.
9870 2018-01-03 Xavier Roirand <roirand@adacore.com>
9872 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9874 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9876 (default_exception_support_info) <catch_handlers_sym>: Add field.
9877 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9878 (ada_exception_name_addr_1): Add "catch handlers" handling.
9879 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9881 (create_excep_cond_exprs) <ex>: Add parameter.
9882 (re_set_exception): Update create_excep_cond_exprs call.
9883 (print_it_exception, print_one_exception, print_mention_exception)
9884 (print_recreate_exception): Add "catch handler" handling.
9885 (allocate_location_catch_handlers, re_set_catch_handlers)
9886 (check_status_catch_handlers, print_it_catch_handlers)
9887 (print_one_catch_handlers, print_mention_catch_handlers)
9888 (print_recreate_catch_handlers): New function.
9889 (catch_handlers_breakpoint_ops): New variable.
9890 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9891 Add parameter. Add "catch handler" handling.
9892 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9893 Add "catch handler" handling.
9894 (ada_exception_catchpoint_cond_string): Add "catch handler"
9896 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9898 (catch_ada_handlers_command): New function.
9899 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9900 operations structure.
9901 (_initialize_ada_language): Add "catch handlers" command entry.
9902 * NEWS: Document "catch handlers" feature.
9904 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9906 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9907 account when creating the array type of the slice.
9908 (ada_value_slice): Likewise.
9910 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9912 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9914 (create_array_type_with_stride): Add byte_stride_prop parameter.
9915 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9916 New parameter. Update all callers in this file.
9917 (array_type_has_dynamic_stride): New function.
9918 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9919 of arrays with dynamic byte strides.
9920 * dwarf2read.c (read_array_type): Add support for dynamic
9921 DW_AT_byte_stride attributes.
9923 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9925 * dwarf2read.c (read_unspecified_type): Treat
9926 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9928 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9930 Update copyright year range in all GDB files.
9932 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9934 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9935 and gdb/testsuite/gdb.base/step-line.c.
9937 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9939 * copyright.py (main): Dump the contents of
9940 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9941 even if BY_HAND is empty.
9943 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9945 * top.c (print_gdb_version): Update Copyright year in version
9948 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9950 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9952 For older changes see ChangeLog-2017.
9958 version-control: never