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