1 2018-07-16 Tom Tromey <tom@tromey.com>
3 * dwarf2read.c (using_directives, read_func_scope)
4 (read_lexical_block_scope): Update.
5 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6 * buildsym.h (local_using_directives, global_using_directives):
8 (get_local_using_directives, set_local_using_directives)
9 (get_global_using_directives): Declare.
10 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
11 m_global_using_directives>: New members.
12 (finish_block_internal, prepare_for_building)
13 (reset_symtab_globals, end_symtab_get_static_block)
14 (push_context): Update.
15 (get_local_using_directives, set_local_using_directives)
16 (get_global_using_directives): New functions.
17 (buildsym_init): Update.
19 2018-07-16 Tom Tromey <tom@tromey.com>
21 * xcoffread.c (xcoff_initial_scan): Don't call
23 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
24 * buildsym.h (class scoped_free_pendings): Add constructor.
25 (free_pending_blocks): Don't declare.
26 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
27 (free_pending_blocks): Now static.
29 2018-07-16 Tom Tromey <tom@tromey.com>
31 * buildsym.h (push_subfile, pop_subfile): Update declarations.
32 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
34 (struct subfile_stack): Remove.
35 (subfile_stack): Remove.
36 (push_subfile, pop_subfile, buildsym_init): Update.
38 2018-07-16 Tom Tromey <tom@tromey.com>
40 * buildsym.c (push_subfile): Use gdb_assert.
41 (pop_subfile): Use gdb_assert.
43 2018-07-16 Tom Tromey <tom@tromey.com>
45 * buildsym.h (merge_symbol_lists): Remove.
46 * buildsym.c (merge_symbol_lists): Remove.
48 2018-07-16 Tom Tromey <tom@tromey.com>
50 * stabsread.c (scan_file_globals): Update comment.
51 * stabsread.h (scan_file_globals): Move from buildsym.h.
52 * buildsym.h (scan_file_globals): Move to stabsread.h.
54 2018-07-16 Tom Tromey <tom@tromey.com>
56 * xcoffread.c (xcoff_new_init): Update.
57 * mipsread.c (mipscoff_new_init): Update.
58 * mdebugread.c (mdebug_build_psymtabs): Update.
59 * elfread.c (elf_new_init): Update.
60 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
61 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
62 * buildsym.h (buildsym_new_init): Don't declare.
63 * buildsym.c (buildsym_new_init): Remove.
65 2018-07-16 Tom Tromey <tom@tromey.com>
67 * stabsread.h (within_function): Move from buildsym.h.
68 * stabsread.c (start_stabs): Clear within_function.
69 * coffread.c (coff_start_symtab): Clear within_function.
70 * buildsym.h (within_function): Move to stabsread.h.
71 * buildsym.c (prepare_for_building): Update.
73 2018-07-16 Tom Tromey <tom@tromey.com>
75 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
76 * dwarf2read.c (dwarf2_start_symtab): Don't set
77 processing_gcc_compilation.
78 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
80 2018-07-16 Tom Tromey <tom@tromey.com>
82 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
83 (next_symbol_text_func): Move from buildsym.h.
84 * stabsread.c (hashname): Move from buildsym.c.
85 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
86 (next_symbol_text_func, hashname): Move to stabsread.h.
87 * buildsym.c: Don't include bcache.h
88 (hashname): Move to stasbread.c.
90 2018-07-16 Tom Tromey <tom@tromey.com>
92 * buildsym.h (context_stack_size): Don't declare.
93 * buildsym.c (context_stack_size): New global.
95 2018-07-16 Tom Tromey <tom@tromey.com>
97 * dbxread.c (processing_acc_compilation): New global.
98 * buildsym.h (processing_acc_compilation): Don't declare.
100 2018-07-16 Tom Tromey <tom@tromey.com>
102 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
103 * dbxread.c (read_ofile_symtab): Update.
104 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
105 * buildsym.h (last_source_start_addr): Remove.
106 (set_last_source_start_addr, get_last_source_start_addr):
108 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
110 (struct buildsym_compunit) <m_last_source_start_addr>: New
112 (prepare_for_building): Remove start_addr parameter.
113 (start_symtab, restart_symtab, end_symtab_get_static_block)
114 (end_symtab_with_blockvector): Update.
115 (set_last_source_start_addr, get_last_source_start_addr): New
118 2018-07-16 Tom Tromey <tom@tromey.com>
120 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
122 (have_line_numbers): Remove.
123 (record_line, prepare_for_building, end_symtab_get_static_block)
124 (augment_type_symtab): Update.
126 2018-07-16 Tom Tromey <tom@tromey.com>
128 * buildsym.c (~buildsym_compunit): Free the macro table.
129 (struct buildsym_compunit) <get_macro_table, release_macros>: New
131 <m_pending_macros>: New member.
132 (pending_macros): Remove.
133 (~scoped_free_pendings, get_macro_table, prepare_for_building)
134 (reset_symtab_globals, end_symtab_get_static_block)
135 (end_symtab_with_blockvector, augment_type_symtab)
136 (buildsym_init): Update.
138 2018-07-16 Tom Tromey <tom@tromey.com>
140 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
142 (buildsym_compunit::set_last_source_file): New method.
143 <m_last_source_file>: New member.
144 (prepare_for_building): Remove "name" parameter.
145 (start_symtab, restart_symtab, reset_symtab_globals): Update.
146 (last_source_file): Remove.
147 (set_last_source_file, get_last_source_file): Update.
149 2018-07-16 Tom Tromey <tom@tromey.com>
151 * buildsym.c (prepare_for_building): Add assert.
153 2018-07-16 Tom Tromey <tom@tromey.com>
155 * buildsym.c (~buildsym_compunit): Update.
156 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
157 (start_subfile, patch_subfile_names)
158 (end_symtab_with_blockvector): Update.
160 2018-07-16 Tom Tromey <tom@tromey.com>
162 * buildsym.c (struct buildsym_compunit): Add constructor,
163 destructor, initializers.
164 (start_buildsym_compunit): Remove.
165 (free_buildsym_compunit): Use "delete".
166 (start_symtab, restart_symtab): Use "new".
168 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
170 * symfile.c (set_objfile_default_section_offset): Remove struct
173 2018-07-14 Stafford Horne <shorne@gmail.com>
175 * (Responsible Maintainers): Add myself as or1k maintainer.
177 2018-07-13 Tom Tromey <tom@tromey.com>
179 * symfile.c (set_objfile_default_section_offset): Use extra braces
182 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
184 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
187 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
189 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
190 unittests/cli-utils-selftests.c
191 * unittests/cli-utils-selftests.c: New file.
193 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
195 * NEWS: Mention new commands. Mention change to 'thread apply'.
197 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
199 * thread.c (thr_try_catch_cmd): New function.
200 (thread_apply_all_command): Handle qcs flags.
201 (thread_apply_command): Handle qcs flags.
202 (taas_command): New function.
203 (tfaas_command): New function.
204 (_initialize_thread): Update to setup the new commands 'taas
205 and 'tfaas'. Change doc string for 'thread apply'.
207 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
209 * stack.c: (trailing_outermost_frame): New function, mostly
210 extracted from backtrace_command_1.
211 (leading_innermost_frame): New function.
212 (backtrace_command_1): Update to call trailing_outermost_frame.
213 (frame_apply_command_count): New function.
214 (frame_apply_level_command): New function.
215 (frame_apply_all_command): New function.
216 (frame_apply_command): New function.
217 (faas_command): New function.
218 (frame_cmd_list): New variable.
219 (_initialize_stack): Update to setup the new commands 'frame apply'
222 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
224 * cli-utils.c (number_or_range_parser::get_number): Only handle
225 numbers or convenience var as numbers.
226 (parse_flags): New function.
227 (parse_flags_qcs): New function.
228 (number_or_range_parser::finished): Ensure parsing end is detected
229 before end of string.
230 * cli-utils.h (parse_flags): New function.
231 (parse_flags_qcs): New function.
232 (number_or_range_parser): Remove m_finished bool.
233 (number_or_range_parser::skip_range): Set m_in_range to false.
235 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
237 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
240 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
241 Jan Kratochvil <jan.kratochvil@redhat.com>
242 Paul Fertser <fercerpav@gmail.com>
243 Tsutomu Seki <sekiriki@gmail.com>
244 Pedro Alves <palves@redhat.com>
246 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
247 'unittests/parse-connection-spec-selftests.c'.
248 (COMMON_SFILES): Add 'common/netstuff.c'.
249 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
250 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
251 * common/netstuff.c: New file.
252 * common/netstuff.h: New file.
253 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
254 (wait_for_connect): Update comment. New parameter
255 'gdb::optional<int> sock' instead of 'struct serial *scb'.
256 Use 'sock' directly instead of 'scb->fd'.
257 (try_connect): New function, with code from 'net_open'.
258 (net_open): Rewrite main loop to deal with multiple
259 sockets/addresses. Handle IPv6-style hostnames; implement
260 support for IPv6 connections.
261 * unittests/parse-connection-spec-selftests.c: New file.
263 2018-07-11 Pedro Alves <palves@redhat.com>
266 * remote.c (remote_target::remote_detach_pid): Call
269 2018-07-11 Pedro Alves <palves@redhat.com>
271 * h8300-tdep.c (h8300_gdbarch_init): Remove
272 set_gdbarch_ecoff_reg_to_regnum calls.
274 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
277 * c-typeprint.c (c_type_print_base_struct_union): Don't print
278 offsets/sizes for static members of a class/struct.
280 2018-07-11 Alan Hayward <alan.hayward@arm.com>
282 * target-descriptions.c (tdesc_register_bitsize): Rename.
283 * target-descriptions.h (tdesc_register_bitsize): Likewise.
284 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
285 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
287 2018-07-10 Tom Tromey <tom@tromey.com>
289 * breakpoint.c (moribund_locations): Now static and a
291 (breakpoint_init_inferior, moribund_breakpoint_here_p)
292 (build_bpstat_chain, update_global_location_list)
293 (breakpoint_retire_moribund): Update.
294 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
297 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
299 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
300 (riscv_register_reggroup_p): Use new function, remove unneeded
302 (riscv_push_dummy_call): Extend assert to compare against xlen or
303 flen based on register type.
305 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
307 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
309 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
311 * remote.c (show_hardware_watchpoint_limit): New function.
312 (show_hardware_watchpoint_length_limit): New function.
313 (show_hardware_breakpoint_limit): New function.
314 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
315 where appropriate, update help text.
317 2018-07-09 Tom Tromey <tom@tromey.com>
319 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
320 (CLIBS): Don't mention NAT_CLIBS.
322 2018-07-09 Tom Tromey <tom@tromey.com>
324 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
325 (LIBGDB_OBS, clean mostlyclean): Update.
326 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
328 2018-07-09 Tom Tromey <tom@tromey.com>
330 * Makefile.in (%.c: %.y): Use ECHO_YACC.
331 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
332 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
334 2018-07-09 Tom Tromey <tom@tromey.com>
336 * Makefile.in (ALLDEPFILES): Remove exec.c.
337 (COMMON_OBS): Remove exec.o.
338 (COMMON_SFILES): Add exec.c.
340 2018-07-09 Tom Tromey <tom@tromey.com>
342 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
344 2018-07-09 Tom Tromey <tom@tromey.com>
346 * Makefile.in (clean mostlyclean): Remove stamp-version.
347 (version.c): Depend on stamp-version.
348 (stamp-version): New rule, from version.c rule.
350 2018-07-09 Tom Tromey <tom@tromey.com>
352 * Makefile.in (init.c): Depend on stamp-init.
353 (stamp-init): New rule, from init.c rule.
354 (clean mostlyclean): Remove stamp-init.
356 2018-07-09 Tom Tromey <tom@tromey.com>
358 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
359 SUBDIR_GCC_COMPILE_SRCS.
361 2018-07-09 Tom Tromey <tom@tromey.com>
363 * Makefile.in (init.c): Remove some unused sed rules.
365 2018-07-09 Tom Tromey <tom@tromey.com>
367 * Makefile.in (TSOBS): Remove.
368 (INIT_FILES): Update.
369 (LIBGDB_OBS): Update.
370 (COMMON_SFILES): Add inflow.c.
371 (SFILES): Remove inflow.c.
373 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
375 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
377 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
379 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
380 get_saveloc_name, is_signal_frame_name, step_name,
381 init_remote_name, create_addr_space_name,
382 destroy_addr_space_name, search_unwind_table_name,
383 find_dyn_list_name): Constify.
385 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
387 * darwin-nat.c (darwin_pthread_kill): New function.
388 (darwin_resume_thread): Use darwin_pthread_kill.
390 2018-07-05 Tom de Vries <tdevries@suse.de>
392 * macroexp.c (macro_buffer) <operator=>: New member function.
394 2018-07-04 Tom Tromey <tom@tromey.com>
396 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
398 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
400 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
401 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
405 2018-07-04 Joel Brobecker <brobecker@adacore.com>
407 * NEWS: Create a new section for the next release branch.
408 Rename the section of the current branch, now that it has
411 2018-07-04 Joel Brobecker <brobecker@adacore.com>
413 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
414 * version.in: Bump version to 8.2.50.DATE-git.
416 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
417 Pedro Alves <palves@redhat.com>
419 * linux-nat.c (linux_init_ptrace): Rename to ...
420 (linux_init_ptrace_procfs): ... this. Call
421 linux_proc_init_warnings.
422 (linux_nat_target::post_attach)
423 (linux_nat_target::post_startup_inferior): Adjust.
424 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
425 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
427 2018-07-04 Tom de Vries <tdevries@suse.de>
429 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
431 (read_comp_unit_head): ... here.
433 2018-07-03 Tom Tromey <tom@tromey.com>
435 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
436 (stop_tracing, tstatus_command)
437 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
438 (print_one_static_tracepoint_marker): Update.
439 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
441 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
443 (all_tracepoints, static_tracepoints_here): Return std::vector.
445 2018-07-03 Tom Tromey <tom@tromey.com>
447 * common/ptid.c (ptid_equal): Remove.
448 * common/ptid.h (ptid_equal): Don't declare.
449 * ada-tasks.c: Update.
450 * breakpoint.c: Update.
451 * common/agent.c: Update.
453 * darwin-nat-info.c: Update.
454 * darwin-nat.c: Update.
456 * dtrace-probe.c: Update.
457 * dummy-frame.c: Update.
458 * fbsd-nat.c: Update.
460 * gdbthread.h: Update.
462 * go32-nat.c: Update.
463 * inf-loop.c: Update.
464 * inf-ptrace.c: Update.
469 * linux-fork.c: Update.
470 * linux-nat.c: Update.
471 * linux-thread-db.c: Update.
472 * mi/mi-cmd-var.c: Update.
473 * mi/mi-interp.c: Update.
474 * mi/mi-main.c: Update.
475 * nto-procfs.c: Update.
476 * ppc-linux-tdep.c: Update.
478 * python/py-inferior.c: Update.
479 * python/py-record-btrace.c: Update.
480 * python/py-record.c: Update.
481 * ravenscar-thread.c: Update.
482 * regcache.c: Update.
483 * remote-sim.c: Update.
485 * sol-thread.c: Update.
488 * tui/tui-stack.c: Update.
490 * windows-nat.c: Update.
491 * windows-tdep.c: Update.
493 2018-07-03 Tom Tromey <tom@tromey.com>
495 * common/ptid.c (ptid_match): Remove.
496 * common/ptid.h (ptid_match): Don't declare.
497 * fbsd-nat.c: Update.
500 * linux-nat.c: Update.
501 * record-btrace.c: Update.
502 * regcache.c: Update.
505 2018-07-03 Tom Tromey <tom@tromey.com>
507 * common/ptid.c (ptid_tid_p): Remove.
508 * common/ptid.h (ptid_tid_p): Don't declare.
509 * sol-thread.c: Update.
511 2018-07-03 Tom Tromey <tom@tromey.com>
513 * common/ptid.c (ptid_lwp_p): Remove.
514 * common/ptid.h (ptid_lwp_p): Don't declare.
515 * fbsd-nat.c: Update.
516 * linux-nat.c: Update.
517 * nat/linux-procfs.c: Update.
518 * nat/x86-linux-dregs.c: Update.
519 * sol-thread.c: Update.
521 2018-07-03 Tom Tromey <tom@tromey.com>
523 * common/ptid.c (ptid_is_pid): Remove.
524 * common/ptid.h (ptid_is_pid): Don't declare.
526 * linux-nat.c: Update.
527 * mi/mi-interp.c: Update.
531 2018-07-03 Tom Tromey <tom@tromey.com>
533 * common/ptid.c (ptid_get_tid): Remove.
534 * common/ptid.h (ptid_get_tid): Don't declare.
535 * ada-tasks.c: Update.
536 * aix-thread.c: Update.
537 * bsd-uthread.c: Update.
538 * darwin-nat.c: Update.
539 * fbsd-nat.c: Update.
540 * i386-darwin-nat.c: Update.
542 * linux-tdep.c: Update.
543 * nto-procfs.c: Update.
544 * ppc-ravenscar-thread.c: Update.
545 * python/py-infthread.c: Update.
546 * ravenscar-thread.c: Update.
547 * sol-thread.c: Update.
548 * sparc-ravenscar-thread.c: Update.
549 * windows-nat.c: Update.
551 2018-07-03 Tom Tromey <tom@tromey.com>
553 * common/ptid.c (ptid_get_lwp): Remove.
554 * common/ptid.h (ptid_get_lwp): Don't declare.
555 * aarch64-linux-nat.c: Update.
556 * ada-tasks.c: Update.
557 * aix-thread.c: Update.
558 * amd64-linux-nat.c: Update.
559 * arm-linux-nat.c: Update.
561 * fbsd-nat.c: Update.
562 * fbsd-tdep.c: Update.
564 * i386-cygwin-tdep.c: Update.
565 * i386-gnu-nat.c: Update.
566 * i386-linux-nat.c: Update.
567 * ia64-linux-nat.c: Update.
568 * inf-ptrace.c: Update.
570 * linux-fork.c: Update.
571 * linux-nat.c: Update.
572 * linux-tdep.c: Update.
573 * linux-thread-db.c: Update.
574 * mips-linux-nat.c: Update.
575 * nat/aarch64-linux-hw-point.c: Update.
576 * nat/aarch64-linux.c: Update.
577 * nat/linux-btrace.c: Update.
578 * nat/linux-osdata.c: Update.
579 * nat/linux-procfs.c: Update.
580 * nat/x86-linux-dregs.c: Update.
581 * obsd-nat.c: Update.
582 * ppc-fbsd-nat.c: Update.
583 * ppc-linux-nat.c: Update.
585 * python/py-infthread.c: Update.
586 * ravenscar-thread.c: Update.
588 * s390-linux-nat.c: Update.
589 * sol-thread.c: Update.
590 * sol2-tdep.c: Update.
591 * spu-linux-nat.c: Update.
592 * x86-linux-nat.c: Update.
593 * xtensa-linux-nat.c: Update.
595 2018-07-03 Tom Tromey <tom@tromey.com>
597 * common/ptid.c (ptid_get_pid): Remove.
598 * common/ptid.h (ptid_get_pid): Don't declare.
599 * aarch64-linux-nat.c: Update.
600 * ada-lang.c: Update.
601 * aix-thread.c: Update.
602 * alpha-bsd-nat.c: Update.
603 * amd64-fbsd-nat.c: Update.
604 * amd64-linux-nat.c: Update.
605 * arm-linux-nat.c: Update.
606 * arm-nbsd-nat.c: Update.
608 * break-catch-syscall.c: Update.
609 * breakpoint.c: Update.
610 * bsd-uthread.c: Update.
613 * darwin-nat.c: Update.
614 * fbsd-nat.c: Update.
615 * fbsd-tdep.c: Update.
618 * hppa-nbsd-nat.c: Update.
619 * hppa-obsd-nat.c: Update.
620 * i386-fbsd-nat.c: Update.
621 * ia64-linux-nat.c: Update.
622 * inf-ptrace.c: Update.
624 * inferior.c: Update.
625 * inferior.h: Update.
628 * linux-fork.c: Update.
629 * linux-nat.c: Update.
630 * linux-tdep.c: Update.
631 * linux-thread-db.c: Update.
632 * m68k-bsd-nat.c: Update.
633 * mi/mi-interp.c: Update.
634 * mi/mi-main.c: Update.
635 * mips-linux-nat.c: Update.
636 * mips-nbsd-nat.c: Update.
637 * mips64-obsd-nat.c: Update.
638 * nat/aarch64-linux-hw-point.c: Update.
639 * nat/aarch64-linux.c: Update.
640 * nat/linux-btrace.c: Update.
641 * nat/linux-osdata.c: Update.
642 * nat/linux-procfs.c: Update.
643 * nat/x86-linux-dregs.c: Update.
644 * nto-procfs.c: Update.
645 * obsd-nat.c: Update.
646 * ppc-linux-nat.c: Update.
647 * ppc-nbsd-nat.c: Update.
648 * ppc-obsd-nat.c: Update.
649 * proc-service.c: Update.
651 * python/py-inferior.c: Update.
652 * python/py-infthread.c: Update.
653 * ravenscar-thread.c: Update.
655 * remote-sim.c: Update.
657 * rs6000-nat.c: Update.
658 * s390-linux-nat.c: Update.
659 * sh-nbsd-nat.c: Update.
660 * sol-thread.c: Update.
661 * sparc-nat.c: Update.
662 * sparc64-tdep.c: Update.
663 * spu-linux-nat.c: Update.
664 * spu-tdep.c: Update.
665 * target-debug.h: Update.
668 * tid-parse.c: Update.
669 * tracefile-tfile.c: Update.
670 * vax-bsd-nat.c: Update.
671 * windows-nat.c: Update.
672 * x86-linux-nat.c: Update.
675 2018-07-03 Tom Tromey <tom@tromey.com>
677 * common/ptid.c (pid_to_ptid): Remove.
678 * common/ptid.h (pid_to_ptid): Don't declare.
679 * aix-thread.c: Update.
680 * arm-linux-nat.c: Update.
681 * common/ptid.c: Update.
682 * common/ptid.h: Update.
685 * darwin-nat.c: Update.
686 * fbsd-nat.c: Update.
687 * fork-child.c: Update.
689 * go32-nat.c: Update.
690 * inf-ptrace.c: Update.
692 * inferior.c: Update.
694 * linux-fork.c: Update.
695 * linux-nat.c: Update.
696 * nat/aarch64-linux-hw-point.c: Update.
697 * nat/fork-inferior.c: Update.
698 * nat/x86-linux-dregs.c: Update.
699 * nto-procfs.c: Update.
700 * obsd-nat.c: Update.
702 * progspace.c: Update.
704 * rs6000-nat.c: Update.
705 * s390-linux-nat.c: Update.
706 * sol-thread.c: Update.
707 * spu-linux-nat.c: Update.
710 * tracefile-tfile.c: Update.
711 * windows-nat.c: Update.
713 2018-07-03 Tom Tromey <tom@tromey.com>
715 * common/ptid.h (ptid_build): Don't declare.
716 * common/ptid.c (ptid_build): Remove.
717 * aix-thread.c: Update.
719 * bsd-uthread.c: Update.
720 * common/agent.c: Update.
721 * common/ptid.c: Update.
722 * common/ptid.h: Update.
724 * darwin-nat.c: Update.
725 * fbsd-nat.c: Update.
727 * linux-fork.c: Update.
728 * linux-nat.c: Update.
729 * linux-thread-db.c: Update.
730 * nat/linux-osdata.c: Update.
731 * nat/linux-procfs.c: Update.
732 * nto-procfs.c: Update.
733 * obsd-nat.c: Update.
734 * proc-service.c: Update.
736 * ravenscar-thread.c: Update.
737 * remote-sim.c: Update.
739 * sol-thread.c: Update.
741 * windows-nat.c: Update.
743 2018-07-03 Tom Tromey <tom@tromey.com>
745 * infrun.c (follow_exec): Use exit_inferior_silent.
746 * inferior.c (exit_inferior_num_silent): Remove.
747 * inferior.h (exit_inferior_num_silent): Don't declare.
749 2018-07-03 Tom Tromey <tom@tromey.com>
752 * darwin-nat.c (darwin_attach_pid): Reset inferior and
753 inferior_ptid on error.
755 2018-07-02 Maciej W. Rozycki <macro@mips.com>
756 Simon Marchi <simon.marchi@polymtl.ca>
759 * disasm.h (gdb_disassembler): Add
760 `m_disassembler_options_holder'. member
761 * disasm.c (get_all_disassembler_options): New function.
762 (gdb_disassembler::gdb_disassembler): Use it.
763 (gdb_buffered_insn_length_init_dis): Likewise.
764 (gdb_buffered_insn_length): Adjust accordingly.
765 (set_disassembler_options): Handle options with arguments.
766 (show_disassembler_options_sfunc): Likewise. Add a leading new
767 line if showing options with descriptions.
768 (disassembler_options_completer): Adapt to using the
769 `disasm_options_and_args_t' structure.
770 * mips-tdep.c (mips_disassembler_options): New variable.
771 (mips_disassembler_options_o32): Likewise.
772 (mips_disassembler_options_n32): Likewise.
773 (mips_disassembler_options_n64): Likewise.
774 (gdb_print_insn_mips): Don't set `disassembler_options'.
775 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
777 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
778 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
779 `gdbarch_disassembler_options_implicit' and
780 `gdbarch_valid_disassembler_options'.
781 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
782 `disasm_options_and_args_t' structure.
783 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
785 (valid_disassembler_options): Switch from `disasm_options_t' to
786 the `disasm_options_and_args_t' structure.
787 * NEWS: Document `set disassembler-options' support for the MIPS
789 * gdbarch.h: Regenerate.
790 * gdbarch.c: Regenerate.
792 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
794 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
796 2018-06-29 Joel Brobecker <brobecker@adacore.com>
798 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
799 parameter in call to amd64_target_description.
800 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
801 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
802 (amd64fbsd_init_abi): Likewise.
803 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
804 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
805 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
806 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
808 2018-06-29 Pedro Alves <palves@redhat.com>
810 * gdb/amd64-tdep.h (amd64_create_target_description): Add
811 "segments" parameter.
812 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
813 (_initialize_amd64_tdep): Update call to
814 amd64_create_target_description.
815 (amd64_target_description): Add "segments" parameter. Adjust
816 the implementation to use it.
817 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
818 call to amd64_create_target_description.
819 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
820 * gdb/arch/amd64.h (amd64_create_target_description): Add
822 * gdb/arch/amd64.c (amd64_create_target_description): Add
823 "segments" parameter. Call create_feature_i386_64bit_segments
824 only if SEGMENTS is true.
825 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
826 call to amd64_create_target_description.
828 2018-06-29 Pedro Alves <palves@redhat.com>
830 * thread.c (thread_target_id_str): New, factored out from ...
831 (print_thread_info_1): ... here. Use it to compute the max
832 "Target Id" column width.
834 2018-06-29 Pedro Alves <palves@redhat.com>
836 * remote.c (remote_target::extra_thread_info): Delete
837 'display_buf' and 'n' locals. from the cache, regardless of
838 packet mechanims is in use. Use cache for qThreadExtra and qP
841 2018-06-29 Pedro Alves <palves@redhat.com>
843 * blockframe.c (find_pc_sect_containing_function): New function.
844 * breakpoint.c (print_breakpoint_location): Don't call
845 find_pc_sect_function.
846 * linespec.c (create_sals_line_offset): Record the location's
848 * linespec.c (convert_address_location_to_sals): Fill in sal's
849 symbol with find_pc_sect_containing_function.
850 * symtab.c (find_function_start_sal): Rename to ...
851 (find_function_start_sal_1): ... this.
852 (find_function_start_sal): Reimplement as wrapper around
853 find_function_start_sal_1, and use
854 find_pc_sect_containing_function to fill in the sal's symbol.
855 (find_function_start_sal(symbol*, bool)): Adjust.
856 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
858 (find_pc_sect_containing_function): Declare.
860 2018-06-29 Pedro Alves <palves@redhat.com>
862 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
863 true if the the location has no symbol.
865 2018-06-28 Tom Tromey <tom@tromey.com>
867 * NEWS: Mention --enable-codesign.
868 * silent-rules.mk (ECHO_SIGN): New variable.
869 * configure.ac: Add --enable-codesign.
870 * configure: Rebuild.
871 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
872 (gdb$(EXEEXT)): Optionally invoke codesign.
874 2018-06-28 Pedro Alves <palves@redhat.com>
876 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
878 (switch_to_thread_no_regs): Adjust comment.
879 * infcmd.c (stop_pc): Delete.
880 (post_create_inferior, info_program_command): Replace references
881 to stop_pc with references to thread_info->suspend.stop_pc.
882 * inferior.h (stop_pc): Delete declaration.
883 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
884 (handle_inferior_event_1, handle_signal_stop)
885 (process_event_stop_test, keep_going_stepped_thread)
886 (handle_step_into_function, handle_step_into_function_backward)
887 (print_stop_location): Replace references to stop_pc with
888 references to thread_info->suspend.stop_pc.
889 (struct infcall_suspend_state) <stop_pc>: Delete field.
890 (save_infcall_suspend_state, restore_infcall_suspend_state):
891 Remove references to inf_stat->stop_pc.
892 * linux-fork.c (fork_load_infrun_state): Likewise.
893 * record-btrace.c (record_btrace_set_replay): Likewise.
894 * record-full.c (record_full_goto_entry): Likewise.
895 * remote.c (print_one_stopped_thread): Likewise.
896 * target.c (target_resume): Extend comment.
897 * thread.c (set_executing_thread): New.
898 (set_executing): Use it.
899 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
900 Remove references to stop_pc.
902 2018-06-28 Pedro Alves <palves@redhat.com>
904 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
905 Moving fetching stop_pc until after ecs->event_thread is refreshed.
907 2018-06-28 Tom Tromey <tom@tromey.com>
909 * coffread.c (coff_symfile_finish): Update.
910 * xcoffread.c (xcoff_symfile_finish): Update.
911 * elfread.c (elf_symfile_finish): Update.
912 * symfile.h (dwarf2_free_objfile): Don't declare.
913 * dwarf2read.c (_initialize_dwarf2_read): Use
914 register_objfile_data_with_cleanup.
915 (dwarf2_free_objfile): Now static. Change signature.
917 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
919 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
920 option "-o" to add-symbol-file-load to add an offset to each
921 section's load address.
922 * symfile.c (set_objfile_default_section_offset): New function.
924 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
926 * symfile.c (add_symbol_file_command): Make sure that sections
927 with the same name are sorted in the same order.
929 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
931 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
932 require the second argument. If omitted, load sections at the
933 addresses specified in the file.
935 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
937 * symfile.c (symbol_file_command, symbol_file_add_main_1)
938 (_initialize_symfile): Add option "-o" to symbol-file to add an
939 offset to each section of the symbol file.
941 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
943 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
945 2018-06-27 Tom Tromey <tom@tromey.com>
947 * stack.c (_initialize_stack): Update "func" help text.
949 2018-06-27 Tom Tromey <tom@tromey.com>
951 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
953 (unwind_infopy_str, pyuw_create_unwind_info)
954 (unwind_infopy_add_saved_register, pyuw_sniffer)
955 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
957 (struct saved_reg): Add constructor.
958 <value>: Now a gdbpy_ref<>.
960 2018-06-27 Tom Tromey <tom@tromey.com>
962 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
964 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
966 * gdb-gdb.py.in: Format using autopep8.
968 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
970 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
971 (type_lookup_function): Recognize CORE_ADDR values.
973 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
975 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
978 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
980 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
983 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
985 * gdb-gdb.py: Move to...
986 * gdb-gdb.py.in: ... here.
987 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
988 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
990 (distclean): Remove gdb-gdb.py when cleaning.
991 (gdb-gdb.py, gdb-gdb.gdb): New rules.
992 * configure: Re-generate.
994 2018-06-27 Pedro Alves <palves@redhat.com>
996 * proc-service.c (get_ps_regcache): New.
997 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
998 (ps_lsetfpregs): Use it.
1000 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1003 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1004 (dwarf_decode_lines_1): Adjust.
1006 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1008 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1010 <info_proc>: Likewise.
1012 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1014 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1015 to windows_fetch_one_register, and only handle the case of
1016 fetching one register. Move the code that reloads the context
1017 and iterates over all registers if R is negative to...
1018 (windows_nat_target::fetch_registers): ... here.
1019 (do_windows_store_inferior_registers): Rename to
1020 windows_store_one_register, and only handle the case of storing
1021 one register. Move the code that handles the case where r is
1023 (windows_nat_target::store_registers) ... here.
1025 2018-06-26 Tom Tromey <tom@tromey.com>
1028 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1029 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1031 (rust_internal_print_type): Add podata parameter.
1032 (rust_print_type): Update.
1034 2018-06-26 Tom Tromey <tom@tromey.com>
1036 * typeprint.h (struct print_offset_data) <update, finish,
1037 maybe_print_hole>: New methods.
1038 <indentation>: New constant.
1039 * typeprint.c (print_offset_data::indentation): Define.
1040 (print_offset_data::maybe_print_hole, print_offset_data::update)
1041 (print_offset_data::finish): Move from c-typeprint.c and rename.
1042 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1043 (print_spaces_filtered_with_print_options): Update.
1044 (c_print_type_union_field_offset, maybe_print_hole)
1045 (c_print_type_struct_field_offset): Move to typeprint.c and
1047 (c_type_print_base_struct_union): Update.
1049 2018-06-25 Pedro Alves <palves@redhat.com>
1051 * gdbthread.h (thread_info_ref, delete_thread)
1052 (delete_thread_silent, first_thread_of_inferior)
1053 (any_thread_of_inferior, switch_to_thread)
1054 (enable_thread_stack_temporaries)
1055 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1056 (get_last_thread_stack_temporary)
1057 (value_in_thread_stack_temporaries, can_access_registers_thread):
1058 Spell out "struct thread_info" instead of just "thread_info".
1059 * inferior.h (notice_new_inferior): Likewise.
1061 2018-06-25 Pedro Alves <palves@redhat.com>
1063 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1064 pass thread_info pointer to delete_thread.
1065 (windows_nat_target::detach): Pass inferior pointer to
1067 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1069 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1070 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1071 and pass a thread_info pointer to delete_thread.
1072 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1073 pass thread_info pointer to delete_thread.
1074 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1075 delete_thread_silent call.
1076 * procfs.c (procfs_target::detach): Pass inferior pointer to
1078 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1079 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1080 delete_thread_silent call.
1081 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1082 pass thread_info pointer to delete_thread.
1083 (windows_nat_target::detach): Pass inferior pointer to
1086 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1088 * regcache.c (readable_regcache::read_part): Fix asserts.
1089 (reg_buffer::raw_collect_part): New function.
1090 (regcache::write_part): Fix asserts.
1091 (reg_buffer::raw_supply_part): New function.
1092 (regcache::transfer_regset_register): New helper function.
1093 (regcache::transfer_regset): Call new functions.
1094 (regcache_supply_regset): Use gdb_byte*.
1095 (regcache::supply_regset): Likewise.
1096 (regcache_collect_regset): Likewise.
1097 (regcache::collect_regset): Likewise.
1098 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1099 (reg_buffer::raw_supply_part): Likewise.
1100 (regcache::transfer_regset_register): Likewise.
1101 (regcache::transfer_regset): Use gdb_byte*.
1103 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1105 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1107 2018-06-21 Pedro Alves <palves@redhat.com>
1109 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1110 instead of a ptid_t. All callers adjusted.
1111 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1113 (print_ada_task_info, display_current_task_id, task_command_1):
1115 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1117 (breakpoint_kind): Adjust.
1118 (remove_breakpoints_pid): Rename to ...
1119 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1120 pointer. All callers adjusted.
1121 (bpstat_clear_actions): Use inferior_thread.
1122 (get_bpstat_thread): New.
1123 (bpstat_do_actions): Use it.
1124 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1125 to take a thread_info pointer. All callers adjusted.
1126 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1127 (breakpoint_re_set_thread): Use inferior_thread.
1128 * breakpoint.h (struct inferior): Forward declare.
1129 (bpstat_stop_status): Update.
1130 (remove_breakpoints_pid): Delete.
1131 (remove_breakpoints_inf): New.
1132 * bsd-uthread.c (bsd_uthread_target::wait)
1133 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1134 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1135 (maint_btrace_packet_history_cmd)
1136 (maint_btrace_clear_packet_history_cmd): Adjust.
1137 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1139 * cli/cli-interp.c: Include "inferior.h".
1140 * common/refcounted-object.h (struct
1141 refcounted_object_ref_policy): New.
1142 * compile/compile-object-load.c: Include gdbthread.h.
1143 (store_regs): Use inferior_thread.
1144 * corelow.c (core_target::close): Use current_inferior.
1145 (core_target_open): Adjust to use first_thread_of_inferior and use
1146 the current inferior.
1147 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1148 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1149 <thread>: ... this new field. All references adjusted.
1150 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1151 Take a thread_info pointer instead of a ptid_t.
1152 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1153 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1154 thread_info pointer instead of a ptid_t.
1155 * elfread.c: Include "inferior.h".
1156 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1157 Use inferior_thread.
1158 * eval.c (evaluate_subexp): Likewise.
1159 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1161 * gdb_proc_service.h (struct thread_info): Forward declare.
1162 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1163 <thread>: ... this new field. All references adjusted.
1164 * gdbarch.h, gdbarch.c: Regenerate.
1165 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1166 'thread' parameter. All implementations and callers adjusted.
1167 * gdbthread.h (thread_info) <set_running>: New method.
1168 (delete_thread, delete_thread_silent): Take a thread_info pointer
1170 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1171 (first_thread_of_process): Delete, replaced by ...
1172 (first_thread_of_inferior): ... this new function. All callers
1174 (any_live_thread_of_process): Delete, replaced by ...
1175 (any_live_thread_of_inferior): ... this new function. All callers
1177 (switch_to_thread, switch_to_no_thread): Declare.
1178 (is_executing): Delete.
1179 (enable_thread_stack_temporaries): Update comment.
1180 <enable_thread_stack_temporaries>: Take a thread_info pointer
1181 instead of a ptid_t. Incref the thread.
1182 <~enable_thread_stack_temporaries>: Decref the thread.
1185 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1186 (get_last_thread_stack_temporary)
1187 (value_in_thread_stack_temporaries, can_access_registers_thread):
1188 Take a thread_info pointer instead of a ptid_t. All callers
1190 * infcall.c (get_call_return_value): Use inferior_thread.
1191 (run_inferior_call): Work with thread pointers instead of ptid_t.
1192 (call_function_by_hand_dummy): Work with thread pointers instead
1193 of ptid_t. Use thread_info_ref.
1194 * infcmd.c (proceed_thread_callback): Access thread's state
1196 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1197 access thread's state directly.
1198 (continue_command): Use inferior_thread.
1199 (info_program_command): Use find_thread_ptid and access thread
1201 (proceed_after_attach_callback): Use thread state directly.
1202 (notice_new_inferior): Take a thread_info pointer instead of a
1203 ptid_t. All callers adjusted.
1204 (exit_inferior): Take an inferior pointer instead of a pid. All
1206 (exit_inferior_silent): New.
1207 (detach_inferior): Delete.
1208 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1209 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1210 (detach_inferior_command, kill_inferior_command): Use
1211 find_inferior_id instead of valid_gdb_inferior_id and
1212 gdb_inferior_id_to_pid.
1213 (inferior_command): Use inferior and thread pointers.
1214 * inferior.h (struct thread_info): Forward declare.
1215 (notice_new_inferior): Take a thread_info pointer instead of a
1216 ptid_t. All callers adjusted.
1217 (detach_inferior): Delete declaration.
1218 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1219 instead of a pid. All callers adjusted.
1220 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1221 (valid_gdb_inferior_id): Delete.
1222 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1223 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1224 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1226 <inf>: ... this new field.
1227 <step_ptid>: Delete, replaced by ...
1228 <step_thread>: ... this new field.
1229 (get_displaced_stepping_state): Take an inferior pointer instead
1230 of a pid. All callers adjusted.
1231 (displaced_step_in_progress_any_inferior): Adjust.
1232 (displaced_step_in_progress_thread): Take a thread pointer instead
1233 of a ptid_t. All callers adjusted.
1234 (displaced_step_in_progress, add_displaced_stepping_state): Take
1235 an inferior pointer instead of a pid. All callers adjusted.
1236 (get_displaced_step_closure_by_addr): Adjust.
1237 (remove_displaced_stepping_state): Take an inferior pointer
1238 instead of a pid. All callers adjusted.
1239 (displaced_step_prepare_throw, displaced_step_prepare)
1240 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1241 All callers adjusted.
1242 (start_step_over): Adjust.
1243 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1244 displaced step queue.
1245 (do_target_resume): Adjust.
1246 (fetch_inferior_event): Use inferior_thread.
1247 (context_switch, get_inferior_stop_soon): Take an
1248 execution_control_state pointer instead of a ptid_t. All callers
1250 (switch_to_thread_cleanup): Delete.
1251 (stop_all_threads): Use scoped_restore_current_thread.
1252 * inline-frame.c: Include "gdbthread.h".
1253 (inline_state) <inline_state>: Take a thread pointer instead of a
1254 ptid_t. All callers adjusted.
1255 <ptid>: Delete, replaced by ...
1256 <thread>: ... this new field.
1257 (find_inline_frame_state): Take a thread pointer instead of a
1258 ptid_t. All callers adjusted.
1259 (skip_inline_frames, step_into_inline_frame)
1260 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1261 pointer instead of a ptid_t. All callers adjusted.
1262 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1263 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1264 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1266 * linux-nat.c (get_detach_signal): Likewise.
1267 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1268 (thread_db_notice_clone): Adjust.
1269 (thread_db_find_new_threads_silently)
1270 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1271 a thread pointer instead of a ptid_t. All callers adjusted.
1272 * mi/mi-cmd-var.c: Include "inferior.h".
1273 (mi_cmd_var_update_iter): Update to use thread pointers.
1274 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1276 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1278 (mi_output_running): ... this new function.
1279 (mi_on_resume_1): Adjust to use it.
1280 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1281 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1283 (interrupt_thread_callback): : Adjust to use thread and inferior
1285 * proc-service.c: Include "gdbthread.h".
1286 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1287 * progspace-and-thread.c: Include "inferior.h".
1288 * progspace.c: Include "inferior.h".
1289 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1290 hold a reference to an inferior_object.
1291 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1293 * python/py-inferior.c (struct inferior_object): Give the type a
1294 tag name instead of a typedef.
1295 (python_on_normal_stop): No need to check if the current thread is
1297 (inferior_to_inferior_object): Change return type to
1298 inferior_object. All callers adjusted.
1299 (find_thread_object): Delete, bits factored out to ...
1300 (thread_to_thread_object): ... this new function.
1301 * python/py-infthread.c (create_thread_object): Use
1302 inferior_to_inferior_object.
1303 (thpy_is_stopped): Use thread pointer directly.
1304 (gdbpy_selected_thread): Use inferior_thread.
1305 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1306 field, replaced with ...
1307 <thread>: ... this new field. All users adjusted.
1308 (btpy_insn_or_gap_new): Drop const.
1309 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1311 * python/py-record.c: Include "gdbthread.h".
1312 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1313 a ptid_t. All callers adjusted.
1314 (gdbpy_current_recording): Use inferior_thread.
1315 * python/py-record.h (recpy_record_object) <ptid>: Delete
1316 field, replaced with ...
1317 <thread>: ... this new field. All users adjusted.
1318 (recpy_element_object) <ptid>: Delete
1319 field, replaced with ...
1320 <thread>: ... this new field. All users adjusted.
1321 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1322 a ptid_t. All callers adjusted.
1323 * python/py-threadevent.c: Include "gdbthread.h".
1324 (get_event_thread): Use thread_to_thread_object.
1325 * python/python-internal.h (struct inferior_object): Forward
1327 (find_thread_object, find_inferior_object): Delete declarations.
1328 (thread_to_thread_object, inferior_to_inferior_object): New
1330 * record-btrace.c: Include "inferior.h".
1331 (require_btrace_thread): Use inferior_thread.
1332 (record_btrace_frame_sniffer)
1333 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1334 (get_thread_current_frame): Use scoped_restore_current_thread and
1336 (get_thread_current_frame): Use thread pointer directly.
1337 (record_btrace_replay_at_breakpoint): Use thread's inferior
1339 * record-full.c: Include "inferior.h".
1340 * regcache.c: Include "gdbthread.h".
1341 (get_thread_arch_regcache): Use the inferior's address space
1343 (get_thread_regcache, registers_changed_thread): New.
1344 * regcache.h (get_thread_regcache(thread_info *thread)): New
1346 (registers_changed_thread): New.
1347 (remote_target) <remote_detach_1>: Swap order of parameters.
1348 (remote_add_thread): <remote_add_thread>: Return the new thread.
1349 (get_remote_thread_info(ptid_t)): New overload.
1350 (remote_target::remote_notice_new_inferior): Use thread pointers
1352 (remote_target::process_initial_stop_replies): Use
1353 thread_info::set_running.
1354 (remote_target::remote_detach_1, remote_target::detach)
1355 (extended_remote_target::detach): Adjust.
1356 * stack.c (frame_show_address): Use inferior_thread.
1357 * target-debug.h (target_debug_print_thread_info_pp): New.
1358 * target-delegates.c: Regenerate.
1359 * target.c (default_thread_address_space): Delete.
1360 (memory_xfer_partial_1): Use current_inferior.
1361 (target_detach): Use current_inferior.
1362 (target_thread_address_space): Delete.
1363 (generic_mourn_inferior): Use current_inferior.
1364 * target.h (struct target_ops) <thread_address_space>: Delete.
1365 (target_thread_address_space): Delete.
1366 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1368 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1369 thread pointer instead of a ptid_t. Adjust all callers.
1370 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1371 (first_thread_of_process): Delete, replaced by ...
1372 (first_thread_of_inferior): ... this new function. All callers
1374 (any_thread_of_process): Rename to ...
1375 (any_thread_of_inferior): ... this, and take an inferior pointer.
1376 (any_live_thread_of_process): Rename to ...
1377 (any_live_thread_of_inferior): ... this, and take an inferior
1379 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1380 (value_in_thread_stack_temporaries)
1381 (get_last_thread_stack_temporary): Take a thread pointer instead
1382 of a ptid_t. Adjust all callers.
1383 (thread_info::set_running): New.
1384 (validate_registers_access): Use inferior_thread.
1385 (can_access_registers_ptid): Rename to ...
1386 (can_access_registers_thread): ... this, and take a thread
1388 (print_thread_info_1): Adjust to compare thread pointers instead
1390 (switch_to_no_thread, switch_to_thread): Make extern.
1391 (scoped_restore_current_thread::~scoped_restore_current_thread):
1392 Use m_thread pointer directly.
1393 (scoped_restore_current_thread::scoped_restore_current_thread):
1394 Use inferior_thread.
1395 (thread_command): Use thread pointer directly.
1396 (thread_num_make_value_helper): Use inferior_thread.
1397 * top.c (execute_command): Use inferior_thread.
1398 * tui/tui-interp.c: Include "inferior.h".
1399 * varobj.c (varobj_create): Use inferior_thread.
1400 (value_of_root_1): Use find_thread_global_id instead of
1401 global_thread_id_to_ptid.
1403 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1405 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1407 (regcache::write_part): Likewise.
1408 (readable_regcache::cooked_read_part): Update comment.
1409 (readable_regcache::cooked_write_part): Likewise.
1410 * regcache.h: (readable_regcache::read_part): Likewise.
1411 (regcache::write_part): Likewise.
1413 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1414 Dirk Schubert <dirk.schubert@arm.com>
1416 * aarch64-linux-nat.c (post_attach): New.
1417 (aarch64_linux_nat_target::post_attach): Override post_attach to
1418 record the number of hardware debug registers.
1420 2018-06-20 Tom Tromey <tom@tromey.com>
1422 * python/py-param.c (add_setshow_generic): Make parameters const.
1423 (parmpy_init): Update.
1425 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1427 * regcache.h (regcache_cooked_read_ftype): Rename to...
1428 (register_read_ftype): ...this, change type to function_view.
1429 (class reg_buffer) <save>: Remove src parameter.
1430 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1431 parameter non-const in first overload. Remove src parameter in
1433 * regcache.c (do_cooked_read): Remove.
1434 (readonly_detached_regcache::readonly_detached_regcache): Make
1435 parameter non-const, adjust call to other constructor.
1436 (reg_buffer::save): Remove src parameter.
1437 * frame.c (do_frame_register_read): Remove.
1438 (frame_save_as_regcache): Use lambda function.
1439 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1440 parameter to ppu2spu_data *.
1441 (ppu2spu_sniffer): Use lambda function.
1443 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1445 * record-full.c (record_full_target::insert_breakpoint): Remove
1446 "struct" keyword, add const.
1448 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1450 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1451 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1452 * configure.ac: Remove AC_PREREQ, add missing quoting.
1453 * gnulib/configure.ac: Modernize usage of
1454 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1455 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1456 (AUTOMAKE_VERSION): Bump to 1.15.1.
1457 * configure: Re-generate.
1458 * config.in: Re-generate.
1459 * aclocal.m4: Re-generate.
1460 * gnulib/aclocal.m4: Re-generate.
1461 * gnulib/config.in: Re-generate.
1462 * gnulib/configure: Re-generate.
1463 * gnulib/import/Makefile.in: Re-generate.
1465 2018-06-19 Pedro Alves <palves@redhat.com>
1467 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1468 (lookup_minimal_symbol_by_pc_section): ... here with
1469 gdb_assert_not_reached added.
1471 2018-06-19 Pedro Alves <palves@redhat.com>
1473 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1474 parameter with a block parameter. Compare location's block symbol
1475 with the frame's block instead of addresses.
1476 (skip_inline_frames): Pass the current block instead of the
1477 frame's address. Break out as soon as we determine the frame
1478 should not be skipped.
1480 2018-06-18 Tom Tromey <tom@tromey.com>
1482 * solib-aix.c (solib_aix_get_section_offsets): Return
1484 (solib_aix_solib_create_inferior_hook): Update.
1486 2018-06-18 Tom Tromey <tom@tromey.com>
1488 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1490 2018-06-18 Tom Tromey <tom@tromey.com>
1492 * solib-frv.c (frv_relocate_main_executable): Use
1494 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1497 2018-06-18 Tom Tromey <tom@tromey.com>
1499 * objfiles.h (inhibit_section_map_updates): Update.
1500 (resume_section_map_updates, resume_section_map_updates_cleanup):
1502 * solib-svr4.c (svr4_handle_solib_event): Update.
1503 * objfiles.c (inhibit_section_map_updates): Return
1504 scoped_restore_tmpl<int>.
1505 (resume_section_map_updates, resume_section_map_updates_cleanup):
1508 2018-06-18 Tom Tromey <tom@tromey.com>
1510 * valprint.h (read_string): Update.
1511 * valprint.c (read_string): Change type of "buffer".
1512 (val_print_string): Update.
1513 * python/py-value.c (valpy_string): Update.
1514 * language.h (struct language_defn) <la_get_string>: Change
1516 (default_get_string, c_get_string): Update.
1517 * language.c (default_get_string): Change type of "buffer".
1518 * guile/scm-value.c (gdbscm_value_to_string): Update.
1519 * c-lang.c (c_get_string): Change type of "buffer".
1521 2018-06-18 Tom Tromey <tom@tromey.com>
1523 * ser-mingw.c (struct pipe_state_destroyer): New.
1524 (pipe_state_up): New typedef.
1525 (cleanup_pipe_state): Remove.
1526 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1528 2018-06-18 Tom Tromey <tom@tromey.com>
1530 * rust-lang.h (rust_yyerror): Don't declare.
1531 * rust-lang.c (rust_language_defn): Update.
1532 * rust-exp.y (yyerror): Now static.
1533 * parse.c (parse_exp_in_context_1): Update.
1534 * p-lang.h (p_yyerror): Don't declare.
1535 * p-lang.c (p_language_defn): Update.
1536 * p-exp.y (yyerror): Now static.
1537 * opencl-lang.c (opencl_language_defn): Update.
1538 * objc-lang.c (objc_language_defn): Update.
1539 * m2-lang.h (m2_yyerror): Don't declare.
1540 * m2-lang.c (m2_language_defn): Update.
1541 * m2-exp.y (yyerror): Now static.
1542 * language.h (struct language_defn) <la_error>: Remove.
1543 * language.c (unk_lang_error): Remove.
1544 (unknown_language_defn, auto_language_defn): Remove.
1545 * go-lang.h (go_yyerror): Don't declare.
1546 * go-lang.c (go_language_defn): Update.
1547 * go-exp.y (yyerror): Now static.
1548 * f-lang.h (f_yyerror): Don't declare.
1549 * f-lang.c (f_language_defn): Update.
1550 * f-exp.y (yyerror): Now static.
1551 * d-lang.h (d_yyerror): Don't declare.
1552 * d-lang.c (d_language_defn): Update.
1553 * d-exp.y (yyerror): Now static.
1554 * c-lang.h (c_yyerror): Don't declare.
1555 * c-lang.c (c_language_defn, cplus_language_defn)
1556 (asm_language_defn, minimal_language_defn): Update.
1557 * c-exp.y (yyerror): Now static.
1558 * ada-lang.h (ada_yyerror): Don't declare.
1559 * ada-lang.c (ada_language_defn): Update.
1560 * ada-exp.y (yyerror): Now static.
1562 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1564 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1565 (store_sveregs_to_thread): Likewise.
1566 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1567 (aarch64_linux_store_inferior_registers): Likewise.
1568 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1570 (aarch64_sve_regs_copy_to_regcache): Likewise.
1571 (aarch64_sve_regs_copy_from_regcache): Likewise.
1572 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1574 (aarch64_sve_regs_copy_to_regcache): Likewise.
1575 (aarch64_sve_regs_copy_from_regcache): Likewise.
1576 (sve_context): Structure from Linux headers.
1577 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1578 (SVE_SIG_ZREG_SIZE): Likewise.
1579 (SVE_SIG_PREG_SIZE): Likewise.
1580 (SVE_SIG_FFR_SIZE): Likewise.
1581 (SVE_SIG_REGS_OFFSET): Likewise.
1582 (SVE_SIG_ZREGS_OFFSET): Likewise.
1583 (SVE_SIG_ZREG_OFFSET): Likewise.
1584 (SVE_SIG_ZREGS_SIZE): Likewise.
1585 (SVE_SIG_PREGS_OFFSET): Likewise.
1586 (SVE_SIG_PREG_OFFSET): Likewise.
1587 (SVE_SIG_PREGS_SIZE): Likewise.
1588 (SVE_SIG_FFR_OFFSET): Likewise.
1589 (SVE_SIG_REGS_SIZE): Likewise.
1590 (SVE_SIG_CONTEXT_SIZE): Likewise.
1591 (SVE_PT_REGS_MASK): Likewise.
1592 (SVE_PT_REGS_FPSIMD): Likewise.
1593 (SVE_PT_REGS_SVE): Likewise.
1594 (SVE_PT_VL_INHERIT): Likewise.
1595 (SVE_PT_VL_ONEXEC): Likewise.
1596 (SVE_PT_REGS_OFFSET): Likewise.
1597 (SVE_PT_FPSIMD_OFFSET): Likewise.
1598 (SVE_PT_FPSIMD_SIZE): Likewise.
1599 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1600 (SVE_PT_SVE_PREG_SIZE): Likewise.
1601 (SVE_PT_SVE_FFR_SIZE): Likewise.
1602 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1603 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1604 (__SVE_SIG_TO_PT): Likewise.
1605 (SVE_PT_SVE_OFFSET): Likewise.
1606 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1607 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1608 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1609 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1610 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1611 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1612 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1613 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1614 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1615 (SVE_PT_SVE_SIZE): Likewise.
1616 (SVE_PT_SIZE): Likewise.
1617 (HAS_SVE_STATE): New define.
1619 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1621 * nat/aarch64-sve-linux-sigcontext.h: New file.
1622 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1624 (SVE_VQ_MIN): Likewise.
1625 (SVE_VQ_MAX): Likewise.
1626 (SVE_VL_MIN): Likewise.
1627 (SVE_VL_MAX): Likewise.
1628 (SVE_NUM_ZREGS): Likewise.
1629 (SVE_NUM_PREGS): Likewise.
1630 (sve_vl_valid): Likewise.
1631 (struct user_sve_header): Likewise.
1633 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1634 Richard Bunt <Richard.Bunt@arm.com>
1636 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1637 was requested by GDB.
1639 2018-06-15 Tom de Vries <tdevries@suse.de>
1641 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1643 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1645 * gnulib/update-gnulib.sh: Print expected versions of
1648 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1650 * arch-utils.c (default_type_align): Use type_length_units.
1651 * gdbtypes.c (type_align): Use type_length_units.
1653 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1655 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1656 of 'define' command.
1658 2018-06-14 Tom de Vries <tdevries@suse.de>
1661 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1662 get_no_prettyformat_print_options.
1664 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1666 * sparc-nat.h: Include target.h.
1667 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1668 <fetch_registers>: Remove this argument in function call.
1669 <store_registers>: Remove this argument in function call, remove
1671 <low_forget_process>: Call sparc64_forget_process instead of
1672 sparc_forget_process.
1674 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1676 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1677 (procfs_target::make_corefile_notes): Adjust to new
1678 target_read_alloc return type.
1680 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1681 Stephen Roberts <stephen.roberts@arm.com>
1684 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1685 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1686 Move should_notify_stop local into more inner scope.
1688 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1689 Stephen Roberts <stephen.roberts@arm.com>
1692 * infrun.c (resume_1): Add call to mark_async_event_handler.
1694 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1696 * infrun.c (do_target_wait): Change old version of $pc printed.
1698 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1700 * dwarf2read.c (read_index_from_section): Rename to...
1701 (read_gdb_index_from_section): ... this, update all callers.
1702 (dwarf2_read_index): Rename to...
1703 (dwarf2_read_gdb_index): ... this, update all callers.
1705 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1707 * gdb/hppa-linux-nat.c
1708 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1709 hppa_linux_nat_target::fetch_registers.
1711 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1713 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1714 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1715 (AARCH64_DWARF_SVE_FFR): Likewise.
1716 (AARCH64_DWARF_SVE_P0): Likewise.
1717 (AARCH64_DWARF_SVE_Z0): Likewise.
1719 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1721 * common/common-regcache.h (raw_compare): New function.
1722 * regcache.c (regcache::raw_compare): Likewise.
1723 * regcache.h (regcache::raw_compare): New declaration.
1725 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1727 * common/common-regcache.h (reg_buffer_common): New structure.
1728 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1729 (reg_buffer::raw_supply): Likewise.
1730 (reg_buffer::raw_supply_integer): Likewise.
1731 (reg_buffer::raw_supply_zeroed): Likewise.
1732 (reg_buffer::raw_collect): Likewise.
1733 (reg_buffer::raw_collect_integer): Likewise.
1734 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1735 (reg_buffer::raw_supply): Likewise.
1736 (reg_buffer::raw_supply_integer): Likewise.
1737 (reg_buffer::raw_supply_zeroed): Likewise.
1738 (reg_buffer::raw_collect): Likewise.
1739 (reg_buffer::raw_collect_integer): Likewise.
1741 2018-06-10 Tom Tromey <tom@tromey.com>
1743 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1744 (class remote_state) <stop_reply_queue>: Now std::vector.
1745 (remote_state::~remote_state)
1746 (remote_target::stop_reply_queue_length): Update.
1747 (struct queue_iter_param, remove_child_of_pending_fork)
1748 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1749 (check_pending_event_prevents_wildcard_vcont_callback)
1750 (remove_stop_reply_for_inferior)
1751 (remove_stop_reply_of_remote_state)
1752 (remote_notif_remove_once_on_match)
1753 (stop_reply_match_ptid_and_ws)
1754 (remote_kill_child_of_pending_fork): Remove.
1755 (remote_target::remove_new_fork_children)
1756 (remote_target::check_pending_events_prevent_wildcard_vcont)
1757 (remote_target::discard_pending_stop_replies)
1758 (remote_target::discard_pending_stop_replies_in_queue)
1759 (remote_target::remote_notif_remove_queued_reply)
1760 (remote_target::queued_stop_reply)
1761 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1762 (remote_target::wait, remote_target::kill_new_fork_children)
1763 (remote_target::async): Update.
1765 2018-06-10 Tom Tromey <tom@tromey.com>
1767 * record-full.c (record_full_arch_list_cleanups): Remove.
1768 (record_full_message): Use try/catch.
1769 (record_full_wait_cleanups): Remove.
1770 (record_full_wait_1): Use try/catch.
1771 (record_full_restore): Likewise.
1773 2018-06-10 Tom Tromey <tom@tromey.com>
1775 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1776 declare VEC. Add constructor.
1777 <in_target_beneath>: Now bool.
1778 (record_full_breakpoints): Now a std::vector, static.
1779 (record_full_sync_record_breakpoints)
1780 (record_full_init_record_breakpoints)
1781 (record_full_target::insert_breakpoint)
1782 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1784 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1786 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1787 * serial.c (serial_interface_lookup): Remove struct keyword.
1789 2018-06-10 Tom Tromey <tom@tromey.com>
1791 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1793 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1795 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1797 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1798 "beneath" as a method.
1799 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1800 Use "beneath" as a method.
1802 2018-06-10 Tom Tromey <tom@tromey.com>
1804 * tracefile.c (struct trace_file_writer_deleter): New.
1805 <operator()>: Rename from trace_file_writer_xfree.
1806 (trace_file_writer_up): New typedef.
1807 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1809 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1811 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1812 <m_registers, m_register_status>: Change type to
1814 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1817 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1819 * common/common-regcache.h (enum register_status): Add
1820 underlying type "signed char".
1821 * regcache.h (reg_buffer) <m_register_status>: Change type to
1823 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1824 register_status instead of signed char.
1825 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1826 (reg_buffer::get_register_status): Remove cast.
1827 (readable_regcache::raw_read): Remove cast.
1828 (readable_regcache::cooked_read): Remove cast.
1830 2018-06-09 Tom Tromey <tom@tromey.com>
1832 * source.c (reverse_search_command, forward_search_command): Use
1835 2018-06-09 Tom Tromey <tom@tromey.com>
1837 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1838 (serial_ops_list): Now static, std::vector.
1839 (serial_interface_lookup, serial_add_interface): Update.
1841 2018-06-09 Tom Tromey <tom@tromey.com>
1843 * dwarf2read.c (process_cu_includes): Update.
1844 (process_full_comp_unit): Update.
1845 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1848 2018-06-08 Paul Koning <paul_koning@dell.com>
1852 * python/python.c (do_start_initialization):
1853 Avoid call to internal Python API.
1854 (init__gdb_module): New function.
1856 2018-06-08 Gary Benson <gbenson@redhat.com>
1858 * linux-thread-db.c (valprint.h): New include.
1859 (struct check_thread_db_info): New structure.
1860 (check_thread_db_on_load, tdb_testinfo): New static globals.
1861 (check_thread_db, check_thread_db_callback): New functions.
1862 (try_thread_db_load_1): Run integrity checks if requested.
1863 (maintenance_check_libthread_db): New function.
1864 (_initialize_thread_db): Register "maint check libthread-db"
1865 and "maint set/show check-libthread-db".
1866 * NEWS: Mention the above new commands.
1868 2018-06-08 Tom Tromey <tom@tromey.com>
1870 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1873 2018-06-08 Tom Tromey <tom@tromey.com>
1875 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1877 2018-06-08 Tom Tromey <tom@tromey.com>
1879 * common/btrace-common.h (struct btrace_data): Add constructor,
1880 destructor, move assignment operator.
1881 <empty, clear, fini>: New methods.
1882 <format>: Initialize.
1883 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1884 (btrace_data_empty): Don't declare.
1885 * common/btrace-common.c (btrace_data_init): Remove.
1886 (btrace_data::fini): Rename from btrace_data_fini.
1887 (btrace_data::empty): Rename from btrace_data_empty.
1888 (btrace_data::clear): Rename from btrace_data_clear. Return
1890 * btrace.h (make_cleanup_btrace_data): Don't declare.
1891 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1892 (parse_xml_btrace): Update.
1893 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1894 (maint_btrace_clear_packet_history_cmd): Update.
1896 2018-06-07 Pedro Alves <palves@redhat.com>
1898 * target.h (target_ops) <beneath>: Now a method. All references
1900 (class target_stack): New.
1901 * target.c (g_target_stack): New.
1902 (g_current_top_target): Delete.
1903 (current_top_target): Get the top target out of g_target_stack.
1904 (target_stack::push, target_stack::unpush): New.
1905 (push_target, unpush_target): Reimplement.
1906 (target_is_pushed): Reimplement in terms of g_target_stack.
1907 (target_ops::beneath, target_stack::find_beneath): New.
1909 2018-06-07 Pedro Alves <palves@redhat.com>
1911 * target.h (find_target_beneath): Delete declaration.
1912 * target.c (find_target_beneath): Delete definition.
1913 * aix-thread.c: All callers of find_target_beneath adjusted to
1914 call target_ops::beneath instead.
1915 * bsd-uthread.c: Likewise.
1916 * linux-thread-db.c: Likewise.
1917 * ravenscar-thread.c: Likewise.
1918 * sol-thread.c: Likewise.
1919 * spu-multiarch.c: Likewise.
1921 2018-06-07 Pedro Alves <palves@redhat.com>
1923 * target.h (target_ops) <beneath>: Now a method. All references
1925 (target_ops) <m_beneath>: New.
1926 * target.c (target_ops::beneath): New.
1927 * corelow.c: Adjust all references to target_ops::beneath.
1928 * linux-thread-db.c: Likewise.
1929 * make-target-delegates: Likewise.
1930 * record-btrace.c: Likewise.
1931 * record-full.c: Likewise.
1932 * remote.c: Likewise.
1933 * target.c: Likewise.
1934 * target-delegates.c: Regenerate.
1936 2018-06-07 Pedro Alves <palves@redhat.com>
1938 * target.h (target_stack): Delete.
1939 (current_top_target): Declare function.
1940 * target.c (target_stack): Delete.
1941 (g_current_top_target): New.
1942 (current_top_target): New function.
1943 * auxv.c: Use current_top_target instead of target_stack
1945 * avr-tdep.c: Likewise.
1946 * breakpoint.c: Likewise.
1947 * corefile.c: Likewise.
1948 * elfread.c: Likewise.
1950 * exceptions.c: Likewise.
1951 * frame.c: Likewise.
1952 * gdbarch-selftests.c: Likewise.
1953 * gnu-v3-abi.c: Likewise.
1954 * ia64-tdep.c: Likewise.
1955 * ia64-vms-tdep.c: Likewise.
1956 * infcall.c: Likewise.
1957 * infcmd.c: Likewise.
1958 * infrun.c: Likewise.
1959 * linespec.c: Likewise.
1960 * linux-tdep.c: Likewise.
1961 * minsyms.c: Likewise.
1962 * ppc-linux-nat.c: Likewise.
1963 * ppc-linux-tdep.c: Likewise.
1964 * procfs.c: Likewise.
1965 * regcache.c: Likewise.
1966 * remote.c: Likewise.
1967 * rs6000-tdep.c: Likewise.
1968 * s390-linux-nat.c: Likewise.
1969 * s390-tdep.c: Likewise.
1970 * solib-aix.c: Likewise.
1971 * solib-darwin.c: Likewise.
1972 * solib-dsbt.c: Likewise.
1973 * solib-spu.c: Likewise.
1974 * solib-svr4.c: Likewise.
1975 * solib-target.c: Likewise.
1976 * sparc-tdep.c: Likewise.
1977 * sparc64-tdep.c: Likewise.
1978 * spu-tdep.c: Likewise.
1979 * symfile.c: Likewise.
1980 * symtab.c: Likewise.
1981 * target-descriptions.c: Likewise.
1982 * target-memory.c: Likewise.
1983 * target.c: Likewise.
1984 * target.h: Likewise.
1985 * tracefile-tfile.c: Likewise.
1986 * tracepoint.c: Likewise.
1987 * valops.c: Likewise.
1988 * valprint.c: Likewise.
1989 * value.c: Likewise.
1990 * windows-tdep.c: Likewise.
1991 * mi/mi-main.c: Likewise.
1993 2018-06-07 Tom Tromey <tom@tromey.com>
1995 * valprint.h (build_address_symbolic): Declare.
1996 * printcmd.c (print_address_symbolic): Update.
1997 (build_address_symbolic): Change "name" and "filename" to
1999 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2001 * defs.h (build_address_symbolic): Remove declaration.
2003 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2005 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2006 (aarch64_vnv_type): Add function.
2007 (aarch64_pseudo_register_name): Add V regs for SVE.
2008 (aarch64_pseudo_register_type): Likewise.
2009 (aarch64_pseudo_register_reggroup_p): Likewise.
2010 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2011 (aarch64_pseudo_read_value): Add V regs for SVE.
2012 (aarch64_pseudo_write_2): Use V0 offset for SVE
2013 (aarch64_pseudo_write): Add V regs for SVE.
2014 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2016 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2018 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2019 (sve_vl_from_vq): Likewise.
2021 2018-06-05 Tom Tromey <tom@tromey.com>
2023 * cli/cli-cmds.c (show_version): Update.
2024 * top.c (print_gdb_version): Add "interactive" parameter.
2026 * main.c (captured_main_1): Update.
2027 * top.h (print_gdb_version): Add "interactive" parameter and a
2030 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2032 * common/enum-flags.h: Add trailing semicolon to example in
2035 2018-06-05 Tom Tromey <tom@tromey.com>
2038 * NEWS: Add entry about pager.
2039 * utils.c (pagination_disabled_for_command): New global.
2040 (prompt_for_continue): Allow "c" response to prompt.
2041 (reinitialize_more_filter): Clear
2042 pagination_disabled_for_command.
2043 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2045 2018-06-04 Tom Tromey <tom@tromey.com>
2047 * ada-lang.h (ada_lookup_symbol_list): Update.
2048 * ada-lang.c (resolve_subexp): Update.
2049 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2051 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2052 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2053 results parameter to std::vector.
2054 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2056 * ada-exp.y (block_lookup): Update.
2057 (select_possible_type_sym): Change type of syms. Remove nsyms
2059 (write_var_or_type, write_name_assoc): Update.
2061 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2063 * windows-nat.c (windows_nat_target::xfer_partial): Return
2064 TARGET_XFER_E_IO if we need to delegate to the target beneath
2065 but BENEATH is NULL.
2067 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2069 * Makefile.in (config.status): Add configure.nat as a
2072 2018-06-04 Tom Tromey <tom@tromey.com>
2074 * cp-name-parser.y (cpname_state): Add method declarations.
2075 (HANDLE_QUAL): Update.
2076 (cpname_state::d_grab, cpname_state::fill_comp)
2077 (cpname_state::make_operator, cpname_state::make_dtor)
2078 (cpname_state::make_builtin_type, cpname_state::make_name)
2079 (cpname_state::d_qualify, cpname_state::d_int_type)
2080 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2081 (%union): Move earlier.
2083 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2085 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2087 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2089 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2090 (aarch64_pseudo_write_1): Likewise.
2091 (aarch64_pseudo_read_value): Use helper.
2092 (aarch64_pseudo_write): Likewise.
2094 2018-06-04 Pedro Alves <palves@redhat.com>
2096 * darwin-nat.c (darwin_ops): Delete.
2097 (darwin_attach_pid): Use get_native_target.
2099 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2101 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2102 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2104 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2106 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2107 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2108 (aarch64_gdbarch_init): Check for SVE.
2109 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2111 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2113 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2114 * aarch64-tdep.h (aarch64_read_description): Likewise.
2115 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2116 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2117 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2118 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2119 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2121 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2123 * value.c (value_fetch_lazy_bitfield): New.
2124 (value_fetch_lazy_memory): New.
2125 (value_fetch_lazy_register): New.
2126 (value_fetch_lazy): Factor out to smaller functions.
2128 2018-06-01 Tom Tromey <tom@tromey.com>
2130 * cp-name-parser.y (backslashable, represented): Now const.
2132 2018-06-01 Tom Tromey <tom@tromey.com>
2134 * cp-name-parser.y: Include parser-defs.h.
2135 (parser_fprintf): Remove declaration.
2137 2018-06-01 Tom Tromey <tom@tromey.com>
2139 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2141 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2142 (global_result): Remove globals.
2143 (struct cpname_state): New.
2144 (yyparse): Don't declare.
2145 (yylex, yyerror): Move declarations after %union.
2146 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2147 (make_name): Add state parameter.
2149 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2151 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2153 (yylex): Add lvalp, state parameters.
2154 (yyerror): Add state parameter.
2155 (cp_demangled_name_to_comp): Update.
2157 2018-06-01 Tom Tromey <tom@tromey.com>
2159 * cp-name-parser.y (parser_fprintf): Declare.
2160 (GDB_YY_REMAP_PREFIX): Define.
2161 Include yy-remap.h. Don't redefine yy* identifiers.
2163 2018-06-01 Tom Tromey <tom@tromey.com>
2165 * python/py-type.c (typy_legacy_template_argument): Update.
2166 * cp-support.h (cp_demangled_name_to_comp): Update.
2167 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2168 parameter to be a "std::string *".
2171 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2173 * ada-lex.l: Include "diagnostics.h" instead of
2174 "common/diagnostics.h".
2175 * unittests/environ-selftests.c: Likewise.
2176 * common/diagnostics.h: Moved to ../include.
2178 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2180 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2181 to language_mode_manual while calling breakpoint_re_set_one.
2183 2018-06-01 Tom Tromey <tom@tromey.com>
2185 * valops.c (value_cast_structs, destructor_name_p): Update.
2186 * symtab.c (gdb_mangle_name): Update.
2187 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2189 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2190 (pascal_object_print_value_fields, pascal_object_print_value):
2192 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2193 * linespec.c (find_methods): Update.
2194 * gdbtypes.h (type_name_no_tag): Remove.
2195 (type_name_or_error): Rename from type_name_no_tag_or_error.
2196 * gdbtypes.c (type_name_no_tag): Remove.
2197 (type_name_or_error): Rename from type_name_no_tag_or_error.
2198 (lookup_struct_elt_type, check_typedef): Update.
2199 * expprint.c (print_subexp_standard): Update.
2200 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2201 * d-namespace.c (d_lookup_nested_symbol): Update.
2202 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2203 (cp_print_class_member): Update.
2204 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2205 * completer.c (add_struct_fields): Update.
2206 * c-typeprint.c (cp_type_print_derivation_info)
2207 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2209 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2210 (ada_prefer_type, ada_is_exception_sym): Update.
2212 2018-06-01 Tom Tromey <tom@tromey.com>
2214 * valops.c (enum_constant_from_type, value_namespace_elt)
2215 (value_maybe_namespace_elt): Update.
2216 * valarith.c (find_size_for_pointer_math): Update.
2217 * target-descriptions.c (make_gdb_type): Update.
2218 * symmisc.c (print_symbol): Update.
2219 * stabsread.c (define_symbol, read_type)
2220 (complain_about_struct_wipeout, add_undefined_type)
2221 (cleanup_undefined_types_1): Update.
2222 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2223 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2224 (rust_internal_print_type, rust_composite_type)
2225 (rust_evaluate_funcall, rust_evaluate_subexp)
2226 (rust_inclusive_range_type_p): Update.
2227 * python/py-type.c (typy_get_tag): Update.
2228 * p-typeprint.c (pascal_type_print_base): Update.
2229 * mdebugread.c (parse_symbol, parse_type): Update.
2230 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2232 * guile/scm-type.c (gdbscm_type_tag): Update.
2233 * go-lang.c (sixg_string_p): Update.
2234 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2236 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2237 (TYPE_TAG_NAME): Remove.
2238 * gdbtypes.c (type_name_no_tag): Simplify.
2239 (check_typedef, check_types_equal, recursive_dump_type)
2240 (copy_type_recursive, arch_composite_type): Update.
2241 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2242 in summary mode when needed.
2243 * eval.c (evaluate_funcall): Update.
2244 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2245 (process_structure_scope, read_enumeration_type)
2246 (read_namespace_type, read_module_type, determine_prefix): Update.
2247 * cp-support.c (inspect_type): Update.
2248 * coffread.c (process_coff_symbol, decode_base_type): Update.
2249 * c-varobj.c (c_is_path_expr_parent): Update.
2250 * c-typeprint.c (c_type_print_base_struct_union): Update.
2251 (c_type_print_base_1): Update. Print struct/class/union/enum in
2252 summary when using C language.
2253 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2254 (gen_maybe_namespace_elt): Update.
2255 * ada-lang.c (ada_type_name): Simplify.
2256 (empty_record, ada_template_to_fixed_record_type_1)
2257 (template_to_static_fixed_type)
2258 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2260 2018-06-01 Tom Tromey <tom@tromey.com>
2262 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2264 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2265 (c_print_type): Update.
2266 (c_print_type): New overload.
2267 (c_type_print_varspec_prefix, c_type_print_args)
2268 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2269 (c_type_print_base_struct_union, c_type_print_base_1)
2270 (cp_type_print_method_args): Add "language" parameter.
2271 (c_type_print_base): Update.
2272 * c-lang.h (c_print_type): Add new overload.
2274 2018-06-01 Tom Tromey <tom@tromey.com>
2276 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2277 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2279 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2281 * aarch64-tdep.c (aarch64_sve_register_names): New const
2283 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2284 (AARCH64_SVE_Z_REGS_NUM): New define.
2285 (AARCH64_SVE_P_REGS_NUM): Likewise.
2286 (AARCH64_SVE_NUM_REGS): Likewise.
2288 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2290 * nat/linux-ptrace.h [__alpha__]
2291 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2294 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2296 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2297 the endianness selected.
2298 * NEWS: Document `set endian auto' mode operation update.
2300 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2302 * Makefile.in: Add new header.
2303 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2304 (sve_vl_from_vg): Likewise.
2305 (sve_vq_from_vl): Likewise.
2306 (sve_vl_from_vq): Likewise.
2307 (sve_vq_from_vg): Likewise.
2308 (sve_vg_from_vq): Likewise.
2309 * configure.nat: Add new c file.
2310 * nat/aarch64-sve-linux-ptrace.c: New file.
2311 * nat/aarch64-sve-linux-ptrace.h: New file.
2313 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2315 * aarch64-linux-nat.c (aarch64_linux_read_description):
2317 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2319 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2320 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2321 (aarch64_gdbarch_init): Add parmeter zero.
2322 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2323 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2324 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2326 * doc/gdb.texinfo: Describe SVE feature
2327 * features/aarch64-sve.c: New file.
2329 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2332 * gdbarch.sh (significant_addr_bit): Default to zero when
2333 not set by target architecture.
2334 * gdbarch.c: Re-generated.
2335 * utils.c (address_significant): Update.
2337 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2339 * stack.c (func_command): Remove trailing newline in call to error.
2341 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2343 * regcache.h (regcache_raw_collect): Remove, update callers to
2344 use regcache::raw_collect.
2345 * regcache.c (regcache_raw_collect): Remove.
2347 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2349 * regcache.h (regcache_raw_supply): Remove, update callers to
2350 use detached_regcache::raw_supply.
2351 * regcache.c (regcache_raw_supply): Remove.
2353 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2355 * regcache.h (regcache_cooked_write_part): Remove, update
2356 callers to use regcache::cooked_write_part.
2357 * regcache.c (regcache_cooked_write_part): Remove.
2359 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2361 * regcache.h (regcache_cooked_read_part): Remove, update callers
2362 to use readable_regcache::cooked_read_part.
2363 * regcache.c (regcache_cooked_read_part): Remove.
2365 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2367 * regcache.h (regcache_cooked_read_value): Remove, update
2368 callers to use readable_regcache::cooked_read_value.
2369 * regcache.c (regcache_cooked_read_value): Remove.
2371 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2373 * regcache.h (regcache_cooked_write): Remove, update callers to
2374 use regcache::cooked_write.
2375 * regcache.c (regcache_cooked_write): Remove.
2377 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2379 * regcache.h (regcache_invalidate): Remove, update callers to
2380 use detached_regcache::invalidate instead.
2381 * regcache.c (regcache_invalidate): Remove.
2383 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2385 * regcache.h (regcache_raw_write_part): Remove, update callers
2386 to use regcache::raw_write_part instead.
2387 * regcache.c (regcache_raw_write_part): Remove.
2389 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2391 * regcache.h (regcache_raw_read_part): Remove, update callers to
2392 use readable_regcache::raw_read_part instead.
2393 * regcache.c (regcache_raw_read_part): Remove.
2395 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2397 * regcache.h (regcache_cooked_read): Remove, update callers to
2398 use readable_regcache::cooked_read instead.
2399 * regcache.c (regcache_cooked_read): Remove.
2401 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2403 * regcache.h (regcache_raw_write): Remove, update callers to use
2404 regcache::raw_write instead.
2405 * regcache.c (regcache_raw_write): Remove.
2407 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2409 * regcache.h (regcache_raw_read): Remove, update callers to use
2410 readable_regcache::raw_read instead.
2411 * regcache.c (regcache_raw_read): Remove.
2413 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2415 * regcache.h (regcache_raw_update): Remove, update callers to
2416 use readable_regcache::raw_update instead.
2417 * regcache.c (regcache_raw_update): Remove.
2419 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2421 * regcache.h (regcache_register_status): Remove, update callers
2422 to use reg_buffer::get_register_status directly instead.
2423 * regcache.c (regcache_register_status): Remove.
2425 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2427 * regcache.h (regcache_get_ptid): Remove, update all callers to
2428 call regcache::ptid instead.
2429 * regcache.c (regcache_get_ptid): Remove.
2431 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2433 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2435 2018-05-30 Pedro Alves <palves@redhat.com>
2437 * common/common-exceptions.h (exception_rethrow): Use
2440 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2442 * breakpoint.c (print_solib_event, check_status_catch_solib):
2443 Remove struct keyword in range-based for loops.
2444 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2445 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2447 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2449 * symfile.c (addr_info_make_relative): Likewise.
2450 * thread.c (value_in_thread_stack_temporaries): Likewise.
2452 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2455 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2456 aggregate type to get its real type before accessing it.
2458 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2460 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2461 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2462 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2463 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2464 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2465 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2466 * printcmd.c (info_address_command): Likewise.
2468 2018-05-29 Tom Tromey <tom@tromey.com>
2470 * windows-nat.c (handle_exception): Update fall-through comment.
2472 2018-05-29 Tom Tromey <tom@tromey.com>
2474 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2475 (struct program_space) <added_solibs>: Now a std::vector.
2476 * breakpoint.c (print_solib_event): Update.
2477 (check_status_catch_solib): Update.
2478 * progspace.c (clear_program_space_solib_cache): Update.
2479 * solib.c (update_solib_list): Update.
2481 2018-05-29 Tom Tromey <tom@tromey.com>
2483 * python/py-type.c (typy_richcompare): Update.
2484 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2485 * gdbtypes.h (types_deeply_equal): Return bool.
2486 (types_equal): Likewise.
2487 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2489 (check_types_equal): Change worklist to std::vector. Return
2491 (struct type_equality_entry): Add constructor.
2492 (compare_maybe_null_strings): Return bool.
2493 (check_types_worklist): Return bool. Change worklist to
2495 (types_deeply_equal): Use std::vector.
2496 (types_equal): Return bool.
2497 (compare_maybe_null_strings): Simplify.
2499 2018-05-29 Tom Tromey <tom@tromey.com>
2501 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2503 2018-05-29 Tom Tromey <tom@tromey.com>
2505 * objc-lang.h: Don't include cp-support.h.
2506 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2509 2018-05-27 Tom Tromey <tom@tromey.com>
2511 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2513 2018-05-25 Tom Tromey <tom@tromey.com>
2515 * value.c (value::location): Initialize.
2517 2018-05-25 Tom Tromey <tom@tromey.com>
2519 * dbxread.c (init_bincl_list): Remove.
2520 (bincl_list): Now a std::vector.
2521 (bincls_allocated, next_bincl): Remove.
2522 (free_bincl_list, do_free_bincl_list_cleanup)
2523 (make_cleanup_free_bincl_list): Remove.
2524 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2526 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2527 (struct header_file_location): Add constructor.
2528 (add_bincl_to_list): Remove.
2530 2018-05-25 Tom Tromey <tom@tromey.com>
2532 * tui/tui.c (tui_enable): Update.
2533 * mi/mi-interp.c (mi_interp::init): Update.
2534 * interps.h (class interp) <name>: New method.
2535 <m_name>: Rename from name.
2536 (~scoped_restore_interp): Update.
2537 * interps.c (interp::interp): Update.
2538 (interp_add, interp_set, interp_lookup_existing)
2539 (current_interp_named_p): Update.
2541 2018-05-25 Tom Tromey <tom@tromey.com>
2543 * interps.c (interp_name): Remove.
2544 * mi/mi-interp.c (mi_interp::init): Update.
2545 * interps.h (interp_name): Remove.
2546 (~scoped_restore_interp): Update.
2547 * tui/tui.c (tui_enable): Update.
2549 2018-05-25 Tom Tromey <tom@tromey.com>
2551 * utils.c (fputs_maybe_filtered): Update.
2552 * linespec.c (decode_line_full): Update.
2553 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2554 (mi_print_breakpoint_for_event, mi_solib_loaded)
2555 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2556 (mi_user_selected_context_changed): Update.
2557 * mi/mi-main.c (mi_execute_command): Update.
2558 * cli/cli-script.c (execute_control_command): Update.
2559 * python/python.c (execute_gdb_command): Update.
2560 * solib.c (info_sharedlibrary_command): Update.
2561 * interps.c (interp_ui_out): Remove.
2562 * interps.h (interp_ui_out): Remove.
2564 2018-05-25 Tom Tromey <tom@tromey.com>
2566 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2567 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2568 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2570 2018-05-25 Tom Tromey <tom@tromey.com>
2572 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2573 * interps.c (interp_exec): Use scoped_restore.
2575 2018-05-25 Tom Tromey <tom@tromey.com>
2577 * remote.c (remote_target::remote_file_get): Use
2579 (remote_target::remote_file_put): Likewise.
2581 2018-05-25 Tom Tromey <tom@tromey.com>
2583 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2585 (get_pe_section_index, add_pe_exported_sym): Update.
2586 (read_pe_exported_syms): Use gdb::def_vector.
2588 2018-05-25 Tom Tromey <tom@tromey.com>
2590 * frame.c (remove_prev_frame): Remove.
2591 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2593 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2595 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2597 * mips-linux-nat.c (supply_fpregset): Always call
2598 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2599 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2600 `mips_fill_fpregset'.
2601 * mips-linux-tdep.c (mips_supply_fpregset)
2602 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2603 (mips_fill_fpregset_wrapper): Remove functions.
2604 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2605 (mips_linux_fpregset): Remove variable.
2606 (mips_linux_iterate_over_regset_sections): Use
2607 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2608 (mips_linux_o32_sigframe_init): Remove comment.
2610 2018-05-25 Pedro Alves <palves@redhat.com>
2612 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2613 (struct readahead_cache, struct packet_reg, struct
2614 remote_arch_state, class remote_state): Move higher up in the
2616 (remote_target::m_remote_state): Now an object instead of a pointer.
2617 (remote_target::get_remote_state): Adjust.
2619 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2621 * stack.c (select_and_print_frame): Delete.
2622 (struct function_bounds): Move struct within function.
2623 (func_command): Most content moved into new function
2624 find_frame_for_function, use new function, print result, add
2626 (find_frame_for_function): New function, now returns a result.
2628 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2630 * stack.c (iterate_over_block_arg_vars): Fix comment.
2631 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2633 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2637 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2639 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2641 * frame.h (class scoped_restore_selected_frame): New class.
2642 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2643 of any exception, use scoped_restore_selected_frame to restore the
2646 2018-05-24 Pedro Alves <palves@redhat.com>
2648 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2651 2018-05-23 Tom Tromey <tom@tromey.com>
2653 * complaints.c (struct complaints): Remove.
2654 (symfile_complaint_book): Remove.
2655 (series): New global.
2656 (complaint_internal): Update.
2657 (clear_complaints): Update.
2659 2018-05-23 Tom Tromey <tom@tromey.com>
2661 * complaints.c (counters): New global.
2662 (struct complain): Remove.
2663 (struct complaints) <root>: Remove.
2664 (complaint_sentinel): Remove.
2665 (symfile_complaint_book): Update.
2666 (find_complaint) Remove.
2667 (complaint_internal, clear_complaints): Update.
2669 2018-05-23 Tom Tromey <tom@tromey.com>
2671 * complaints.c (struct complain) <file, line>: Remove.
2672 (find_complaint): Remove file, line parameters.
2673 (complaint_internal): Update.
2675 2018-05-23 Tom Tromey <tom@tromey.com>
2677 * complaints.c (vcomplaint): Remove.
2678 (complaint_internal) Merge in contents of vcomplaint.
2680 2018-05-23 Tom Tromey <tom@tromey.com>
2682 * complaints.c (struct complaints) <explanation>: Remove.
2683 (symfile_explanations): Remove.
2684 (symfile_complaint_book): Update.
2685 (vcomplaint): Update.
2686 (struct explanation): Remove.
2688 2018-05-23 Tom Tromey <tom@tromey.com>
2690 * complaints.c (symfile_complaints): Remove.
2691 (complaint_internal): Remove "complaints" parameter.
2692 (clear_complaints, vcomplaint): Remove "c" parameter.
2693 (get_complaints): Remove.
2694 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2695 (dwarf2_debug_line_missing_file_complaint)
2696 (dwarf2_debug_line_missing_end_sequence_complaint)
2697 (dwarf2_complex_location_expr_complaint)
2698 (dwarf2_const_value_length_mismatch_complaint)
2699 (dwarf2_section_buffer_overflow_complaint)
2700 (dwarf2_macro_malformed_definition_complaint)
2701 (dwarf2_invalid_attrib_class_complaint)
2702 (create_addrmap_from_index, dw2_symtab_iter_next)
2703 (dw2_expand_marked_cus)
2704 (dw2_debug_names_iterator::find_vec_in_debug_names)
2705 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2706 (create_debug_type_hash_table, init_cutu_and_read_dies)
2707 (partial_die_parent_scope, add_partial_enumeration)
2708 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2709 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2710 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2711 (create_cus_hash_table, create_dwp_hash_table)
2712 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2713 (dwarf2_rnglists_process, dwarf2_ranges_process)
2714 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2715 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2716 (handle_struct_member_die, process_structure_scope)
2717 (read_array_type, read_common_block, read_module_type)
2718 (read_tag_pointer_type, read_typedef, read_base_type)
2719 (read_subrange_type, load_partial_dies, partial_die_info::read)
2720 (partial_die_info::read, partial_die_info::read)
2721 (partial_die_info::read, read_checked_initial_length_and_offset)
2722 (dwarf2_string_attr, read_formatted_entries)
2723 (dwarf_decode_line_header)
2724 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2725 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2726 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2727 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2728 (get_signatured_type, get_DW_AT_signature_type)
2729 (decode_locdesc, file_file_name, consume_improper_spaces)
2730 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2731 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2732 (dwarf2_symbol_mark_computed, set_die_type)
2733 (read_attribute_value): Update.
2734 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2736 * dbxread.c (unknown_symtype_complaint)
2737 (lbrac_mismatch_complaint, repeated_header_complaint)
2738 (set_namestring, function_outside_compilation_unit_complaint)
2739 (read_dbx_symtab, process_one_symbol): Update.
2740 * gdbtypes.c (stub_noname_complaint): Update.
2741 * windows-nat.c (handle_unload_dll): Update.
2742 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2743 (decode_base_type): Update.
2744 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2745 (eb_complaint, record_include_begin, record_include_end)
2746 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2747 (process_xcoff_symbol, read_symbol)
2748 (function_outside_compilation_unit_complaint)
2749 (scan_xcoff_symtab): Update.
2750 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2751 * buildsym.c (finish_block_internal, make_blockvector)
2752 (end_symtab_get_static_block, augment_type_symtab): Update.
2753 * dtrace-probe.c (dtrace_process_dof)
2754 (dtrace_static_probe_ops::get_probes): Update.
2755 * complaints.h (struct complaint): Don't declare.
2756 (symfile_complaints): Remove.
2757 (complaint_internal): Remove "complaints" parameter.
2758 (complaint): Likewise.
2759 (clear_complaints): Likewise.
2760 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2761 (reread_symbols): Update.
2762 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2763 (dwarf2_frame_cache, decode_frame_entry): Update.
2764 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2765 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2766 (info_selectors_command): Update.
2767 * macrotab.c (macro_include, check_for_redefinition)
2768 (macro_undef): Update.
2769 * objfiles.c (filter_overlapping_sections): Update.
2770 * stabsread.c (invalid_cpp_abbrev_complaint)
2771 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2772 (define_symbol, error_type, read_type, rs6000_builtin_type)
2773 (stabs_method_name_from_physname, read_member_functions)
2774 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2775 (attach_fields_to_type, complain_about_struct_wipeout)
2776 (read_range_type, read_args, common_block_start)
2777 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2779 * mdebugread.c (index_complaint, unknown_ext_complaint)
2780 (basic_type_complaint, bad_tag_guess_complaint)
2781 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2782 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2783 (parse_procedure, parse_lines)
2784 (function_outside_compilation_unit_complaint)
2785 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2786 (bad_tag_guess_complaint, reg_value_complaint): Update.
2787 * cp-support.c (demangled_name_complaint): Update.
2788 * macroscope.c (sal_macro_scope): Update.
2789 * dwarf-index-write.c (class debug_names): Update.
2791 2018-05-23 Tom Tromey <tom@tromey.com>
2793 * complaints.c (clear_complaints): Remove "noisy" parameter.
2794 * complaints.h (clear_complaints): Update.
2795 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2796 (reread_symbols): Update.
2798 2018-05-23 Tom Tromey <tom@tromey.com>
2800 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2802 (vcomplaint, clear_complaints): Update.
2803 (symfile_explanations): Remove some messages.
2805 2018-05-23 Tom Tromey <tom@tromey.com>
2807 * complaints.c (internal_complaint): Remove.
2808 * complaints.h (internal_complaint): Remove.
2810 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2812 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2814 2018-05-22 Pedro Alves <palves@redhat.com>
2816 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2817 (remote_fileio_badfd, remote_fileio_return_errno)
2818 (remote_fileio_return_success, remote_fileio_func_open)
2819 (remote_fileio_func_open, remote_fileio_func_close)
2820 (remote_fileio_func_read, remote_fileio_func_write)
2821 (remote_fileio_func_lseek, remote_fileio_func_rename)
2822 (remote_fileio_func_unlink, remote_fileio_func_stat)
2823 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2824 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2825 remote_target parameter.
2826 (remote_fio_func_map) <func>: Add remote_target parameter.
2827 (do_remote_fileio_request, remote_fileio_request):
2828 * remote-fileio.h (remote_fileio_request):
2829 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2830 remote_target parameter.
2831 (remote_notif_process, handle_notification): Adjust to pass down
2833 (remote_notif_state_allocate): Add remote_target parameter. Save
2835 * remote-notif.h (struct remote_target): Forward declare.
2836 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2837 remote_target parameter.
2838 (struct remote_notif_state) <remote>: New field.
2839 (remote_notif_ack, remote_notif_parse): Add remote_target
2841 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2842 remote_target parameter.
2843 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2844 (threads_listing_context, rmt_thread_action, protocol_feature)
2845 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2846 (packet_result, struct threads_listing_context, remote_state):
2847 Move definitions and declarations higher up.
2848 (remote_target) <~remote_target>: Declare.
2849 (remote_download_command_source, remote_file_put, remote_file_get)
2850 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2851 (remote_hostio_pread_vFile, remote_hostio_send_command)
2852 (remote_hostio_set_filesystem, remote_hostio_open)
2853 (remote_hostio_close, remote_hostio_unlink, remote_state)
2854 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2855 (get_memory_write_packet_size, get_memory_read_packet_size)
2856 (append_pending_thread_resumptions, remote_detach_1)
2857 (append_resumption, remote_resume_with_vcont)
2858 (add_current_inferior_and_thread, wait_ns, wait_as)
2859 (process_stop_reply, remote_notice_new_inferior)
2860 (process_initial_stop_replies, remote_add_thread)
2861 (btrace_sync_conf, remote_btrace_maybe_reopen)
2862 (remove_new_fork_children, kill_new_fork_children)
2863 (discard_pending_stop_replies, stop_reply_queue_length)
2864 (check_pending_events_prevent_wildcard_vcont)
2865 (discard_pending_stop_replies_in_queue, stop_reply)
2866 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2867 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2868 (remote_interrupt_as, remote_interrupt_ns)
2869 (remote_get_noisy_reply, remote_query_attached)
2870 (remote_add_inferior, remote_current_thread, get_current_thread)
2871 (set_thread, set_general_thread, set_continue_thread)
2872 (set_general_process, write_ptid)
2873 (remote_unpack_thread_info_response, remote_get_threadinfo)
2874 (parse_threadlist_response, remote_get_threadlist)
2875 (remote_threadlist_iterator, remote_get_threads_with_ql)
2876 (remote_get_threads_with_qxfer)
2877 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2878 (get_offsets, remote_check_symbols, remote_supported_packet)
2879 (remote_query_supported, remote_packet_size)
2880 (remote_serial_quit_handler, remote_detach_pid)
2881 (remote_vcont_probe, remote_resume_with_hc)
2882 (send_interrupt_sequence, interrupt_query)
2883 (remote_notif_get_pending_events, fetch_register_using_p)
2884 (send_g_packet, process_g_packet, fetch_registers_using_g)
2885 (store_register_using_P, store_registers_using_G)
2886 (set_remote_traceframe, check_binary_download)
2887 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2888 (remote_xfer_live_readonly_partial, remote_read_bytes)
2889 (remote_send_printf, remote_flash_write, readchar)
2890 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2891 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2892 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2893 (extended_remote_disable_randomization, extended_remote_run)
2894 (send_environment_packet, extended_remote_environment_support)
2895 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2896 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2897 (packet_command): Now methods of ...
2898 (remote_target): ... this class.
2899 (m_remote_state) <remote_target>: New field.
2900 (struct remote_state) <stop_reply_queue,
2901 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2903 (remote_state::remote_state): Allocate stop_reply_queue.
2904 (remote_state): Delete global.
2905 (get_remote_state_raw): Delete.
2906 (remote_target::get_remote_state): Allocate m_remote_state on
2908 (get_current_remote_target): New.
2909 (remote_ops, extended_remote_ops): Delete.
2910 (wait_forever_enabled_p, remote_async_inferior_event_token):
2911 Delete, moved to struct remote_state.
2912 (remote_target::close): Delete self. Destruction bits split to
2914 (remote_target::~remote_target): ... this.
2915 (show_memory_packet_size): Adjust to use
2916 get_current_remote_target.
2917 (struct protocol_feature) <func>: Add remote_target parameter.
2918 All callers adjusted.
2919 (curr_quit_handler_target): New.
2920 (remote_serial_quit_handler): Reimplement.
2921 (remote_target::open_1): Adjust to use get_current_remote_target.
2922 Heap-allocate remote_target/extended_remote_target instances.
2923 (vcont_builder::vcont_builder): Add remote_target parameter, and
2924 save it in m_remote. All callers adjusted.
2925 (vcont_builder::m_remote): New field.
2926 (vcont_builder::restart, vcont_builder::flush)
2927 (vcont_builder::push_action): Use it.
2928 (remote_target::commit_resume): Use it.
2929 (struct queue_iter_param) <remote>: New field.
2930 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2931 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2932 (check_pending_event_prevents_wildcard_vcont_callback)
2933 (remote_target::check_pending_events_prevent_wildcard_vcont)
2934 (remote_target::discard_pending_stop_replies)
2935 (remote_target::discard_pending_stop_replies_in_queue)
2936 (remote_target::remote_notif_remove_queued_reply): Fill in
2938 (remote_notif_get_pending_events): New.
2939 (remote_target::readchar, remote_target::remote_serial_write):
2940 Save/restore curr_quit_handler_target.
2942 (kill_new_fork_children): Fill in 'remote' field.
2943 (packet_command): Use get_current_remote_target, defer to
2944 remote_target method of same name.
2945 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2946 parameter, and save it in m_remote. All callers adjusted.
2947 (scoped_remote_fd::release): Use m_remote.
2948 (scoped_remote_fd::m_remote): New field.
2949 (remote_file_put, remote_file_get, remote_file_delete): Use
2950 get_current_remote_target, defer to remote_target method of same
2952 (remote_btrace_reset): Add remote_state paremeter. Update all
2954 (remote_async_inferior_event_handler). Pass down 'data'.
2955 (remote_new_objfile): Use get_current_remote_target.
2956 (remote_target::vcont_r_supported): New.
2957 (set_range_stepping): Use get_current_remote_target and
2958 remote_target::vcont_r_supported.
2959 (_initialize_remote): Don't allocate 'remote_state' and
2960 'stop_reply_queue' globals.
2961 * remote.h (struct remote_target): Forward declare.
2962 (getpkt, putpkt, remote_notif_get_pending_events): Add
2963 'remote_target' parameter.
2965 2018-05-22 Pedro Alves <palves@redhat.com>
2967 * remote.c (vcont_builder): Now a class. Make all data members
2969 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2971 (vcont_builder_restart): Rename to ...
2972 (vcont_builder::restart): ... this.
2973 (vcont_builder_flush): Rename to ...
2974 (vcont_builder::flush): ... this.
2975 (vcont_builder_push_action): Rename to ...
2976 (vcont_builder::push_action): ... this.
2977 (remote_target::commit_resume): Adjust.
2979 2018-05-22 Pedro Alves <palves@redhat.com>
2981 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2982 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2983 (get_fixed_memory_packet_size): New.
2984 (get_memory_packet_size): Use it.
2985 (set_memory_packet_size): Don't override the config size with
2986 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2987 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2988 Don't refer to get_memory_packet_size if not connected to a remote
2989 target. Show "(default)" if configured size is 0.
2991 2018-05-22 Pedro Alves <palves@redhat.com>
2993 * remote.c (remote_target::mourn_inferior): Move
2994 discard_pending_stop_replies call here from ...
2995 (_initialize_remote): ... here.
2997 2018-05-22 Pedro Alves <palves@redhat.com>
2999 * remote.c (compare_section_command): Remove set_general_process
3002 2018-05-22 Pedro Alves <palves@redhat.com>
3004 * remote.c (struct packet_reg, struct remote_arch_state):
3005 Move higher up in the file.
3006 (remote_state) <m_arch_states>: Store remote_arch_state values
3007 instead of remote_arch_state pointers.
3008 (remote_state::get_remote_arch_state): Adjust.
3010 2018-05-22 Pedro Alves <palves@redhat.com>
3012 * remote.c: Include <unordered_map>.
3013 (remote_state): Now a class.
3014 (remote_state) <get_remote_arch_state>: Declare method.
3015 <get_remote_arch_state>: New field.
3016 (remote_arch_state) <remote_arch_state>: Declare ctor.
3017 <regs>: Now a unique_ptr.
3018 (remote_gdbarch_data_handle): Delete.
3019 (get_remote_arch_state): Delete.
3020 (remote_state::get_remote_arch_state): New.
3021 (get_remote_state): Adjust to call remote_state's
3022 get_remote_arch_state method.
3023 (init_remote_state): Delete, bits factored out to ...
3024 (remote_arch_state::remote_arch_state): ... this new method.
3025 (get_remote_packet_size, get_memory_packet_size)
3026 (process_g_packet, remote_target::fetch_registers)
3027 (remote_target::prepare_to_store, store_registers_using_G)
3028 (remote_target::store_registers, remote_target::get_trace_status):
3029 Adjust to call remote_state's method.
3030 (_initialize_remote): Remove reference to
3031 remote_gdbarch_data_handle.
3033 2018-05-22 Pedro Alves <palves@redhat.com>
3035 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3036 pread>: New method declarations.
3037 (remote_target::open_1): Adjust.
3038 (readahead_cache_invalidate): Rename to ...
3039 (readahead_cache::invalidate): ... this, and adjust to be a class
3041 (readahead_cache_invalidate_fd): Rename to ...
3042 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3044 (remote_hostio_pwrite): Adjust.
3045 (remote_hostio_pread_from_cache): Rename to ...
3046 (readahead_cache::pread): ... this, and adjust to be a class
3048 (remote_hostio_close): Adjust.
3050 2018-05-22 Pedro Alves <palves@redhat.com>
3052 * remote.c (remote_hostio_close_cleanup): Delete.
3053 (class scoped_remote_fd): New.
3054 (remote_file_put, remote_file_get): Use it.
3056 2018-05-22 Pedro Alves <palves@redhat.com>
3058 (struct vCont_action_support): Use bool and initialize all fields.
3059 (struct readahead_cache): Initialize all fields.
3060 (remote_state): Use bool and initialize all fields.
3061 (remote_state::remote_state, remote_state::~remote_state): New.
3062 (new_remote_state): Delete.
3063 (_initialize_remote): Use new to allocate remote_state.
3065 2018-05-22 Pedro Alves <palves@redhat.com>
3069 * c-exp.y: Include "c-support.h".
3070 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3071 of tolower. Use c_ident_is_alpha to scan names.
3072 * c-lang.c: Include "c-support.h".
3073 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3074 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3075 * c-support.h: New file, with bits factored out from ...
3076 * cp-name-parser.y: ... this file.
3077 Include "c-support.h".
3078 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3079 c-support.h and renamed.
3080 (symbol_end, yylex): Adjust.
3082 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3084 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3085 parameter type to CORE_ADDR.
3086 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3087 parameter type in declaration to CORE_ADDR.
3088 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3089 target_auxv_search to get AT_HWCAP and use the result to get the
3091 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3092 to CORE_ADDR. Remove the cast of the return value to unsigned
3093 long. Fix error predicate of target_auxv_search.
3094 (ppc_linux_nat_target::read_description): Change the type of the
3095 hwcap variable to CORE_ADDR.
3097 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3099 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3100 if the size of fpscr is larger than 32 bits.
3102 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3104 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3105 (ppc32_linux_vsxregmap): New global.
3106 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3107 regcache_supply_regset, and regcache_collect_regset.
3108 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3109 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3110 (fetch_vsx_register, store_vsx_register): Remove.
3111 (fetch_vsx_registers): Add regno parameter. Get regset using
3112 ppc_linux_vsxregset. Use regset to supply registers.
3113 (store_vsx_registers): Add regno parameter. Get regset using
3114 ppc_linux_vsxregset. Use regset to collect registers.
3115 (fetch_register): Call fetch_vsx_registers instead of
3117 (store_register): Call store_vsx_registers instead of
3119 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3120 new regno parameter.
3121 (store_ppc_registers): Call store_vsx_registers with -1 for the
3122 new regno parameter.
3123 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3124 (ppc_collect_vsxregset): Remove.
3126 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3128 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3130 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3131 for vector register offset fields.
3132 (ppc64_fbsd_reg_offsets): Likewise.
3133 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3134 to vector register offset fields.
3135 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3136 to vector register offset fields.
3137 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3138 vector register offset fields.
3139 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3140 initializers for vector register offset fields.
3141 (rs6000_aix64_reg_offsets): Likewise.
3142 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3143 (ppc_supply_vrregset): Remove.
3144 (ppc_collect_vrregset): Remove.
3145 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3146 (ppc_linux_vrregset) : New function.
3147 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3148 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3149 (ppc32_linux_vrregset): Remove.
3150 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3151 and use result instead of ppc32_linux_vrregset.
3152 (ppc32_linux_reg_offsets): Remove initializers for vector register
3154 (ppc64_linux_reg_offsets): Likewise.
3155 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3156 * ppc-linux-nat.c: Include regset.h.
3157 (gdb_vrregset_t): Adjust comment to account for little-endian
3159 (supply_vrregset, fill_vrregset): Remove.
3160 (fetch_altivec_register, store_altivec_register): Remove.
3161 (fetch_altivec_registers): Add regno parameter. Get regset using
3162 ppc_linux_vrregset. Use regset to supply registers.
3163 (store_altivec_registers): Add regno parameter. Get regset using
3164 ppc_linux_vrregset. Use regset to collect registers.
3165 (fetch_register): Call fetch_altivec_registers instead of
3166 fetch_altivec_register.
3167 (store_register): Call store_altivec_registers instead of
3168 store_altivec_register.
3169 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3170 the new regno parameter.
3171 (store_ppc_registers): Call store_altivec_registers with -1 for
3172 the new regno parameter.
3174 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3176 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3177 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3178 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3179 (gdb_vrregset_t): Change array type size to
3180 PPC_LINUX_SIZEOF_VRREGSET.
3181 (gdb_vsxregset_t): Change array type size to
3182 PPC_LINUX_SIZEOF_VSXREGSET.
3183 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3184 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3185 PPC_LINUX_SIZEOF_VSXREGSET.
3187 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3189 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3190 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3192 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3193 ppc_linux_target_wordsize with tid.
3194 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3196 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3197 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3198 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3199 tid parameter. Remove static specifier.
3200 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3201 (ppc_linux_target_wordsize): New declaration.
3203 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3205 * arch/ppc-linux-common.c: New file.
3206 * arch/ppc-linux-common.h: New file.
3207 * arch/ppc-linux-tdesc.h: New file.
3208 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3209 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3210 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3211 arch/ppc-linux-tdesc.h.
3212 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3213 arch/ppc-linux-tdesc.h.
3214 (ppc_linux_nat_target::read_description): Remove target
3215 description matching code. Fill a ppc_linux_features struct and
3216 call ppc_linux_match_description with it. Move comment about ISA
3217 2.05 to ppc-linux-common.c.
3218 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3219 arch/ppc-linux-tdesc.h.
3220 (ppc_linux_core_read_description): Remove target description
3221 matching code. Fill a ppc_linux_features struct and call
3222 ppc_linux_match_description with it.
3223 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3224 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3225 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3226 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3227 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3228 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3229 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3230 (tdesc_powerpc_e500l): Remove.
3232 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3234 * ada-lang.c (catch_assert_command): Pass empty string instead
3235 of NULL for excep_string argument.
3237 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3239 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3240 the width of the requested register exceeds the width of the
3243 2018-05-21 Tom Tromey <tom@tromey.com>
3245 * printcmd.c (output_command): Remove.
3246 (output_command_const): Rename to output_command.
3247 * valprint.h (output_command): Rename from output_command_const.
3248 * tracepoint.c (trace_dump_actions): Call output_command.
3250 2018-05-21 Tom Tromey <tom@tromey.com>
3252 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3253 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3254 * ada-lang.h (create_ada_exception_catchpoint): Update.
3255 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3257 (create_excep_cond_exprs, ~ada_catchpoint)
3258 (should_stop_exception, print_one_exception)
3259 (print_mention_exception, print_recreate_exception): Update.
3260 (ada_get_next_arg): Remove.
3261 (catch_ada_exception_command_split): Use std::string. Change type
3262 of "excep_string", "cond_string".
3263 (catch_ada_exception_command): Update.
3264 (create_ada_exception_catchpoint): Change type of excep_string.
3265 (ada_exception_sal): Remove excep_string parameter.
3266 (~ada_catchpoint): Remove.
3268 2018-05-21 Tom Tromey <tom@tromey.com>
3270 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3273 2018-05-21 Tom Tromey <tom@tromey.com>
3275 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3276 Return unique_xmalloc_ptr.
3277 (print_it_exception): Update.
3279 2018-05-21 Tom Tromey <tom@tromey.com>
3281 * tracepoint.c (trace_dump_actions): Use std::string.
3283 2018-05-21 Tom Tromey <tom@tromey.com>
3285 * symfile.c (reread_symbols): Use std::string for original_name.
3287 2018-05-21 Tom Tromey <tom@tromey.com>
3289 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3290 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3293 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3295 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3297 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3298 * objfiles.c (get_objfile_bfd_data): Allocate
3299 objfile_per_bfd_storage with obstack_new when allocating on
3302 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3304 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3306 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3307 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3308 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3309 (add_pending): Likewise.
3310 (parse_symbol): Likewise.
3311 (parse_partial_symbols): Likewise.
3312 (psymtab_to_symtab_1): Likewise.
3313 (new_psymtab): Likewise.
3314 (elfmdebug_build_psymtabs): Likewise.
3315 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3316 * objfiles.c (get_objfile_bfd_data): Likewise.
3317 (objfile_register_static_link): Likewise.
3318 * psymtab.c (allocate_psymtab): Likewise.
3319 * stabsread.c (read_member_functions): Likewise.
3320 * xcoffread.c (xcoff_end_psymtab): Likewise.
3322 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3324 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3325 compiler supports std::is_trivially_constructible.
3326 * common/poison.h: Include obstack.h.
3327 (IsMallocable): Define to is_trivially_constructible if the
3328 compiler supports it, define to true_type otherwise.
3332 (XOBNEWVEC): Redefine.
3333 * gdb_obstack.h (obstack_zalloc): New.
3334 (OBSTACK_ZALLOC): Redefine.
3335 (obstack_calloc): New.
3336 (OBSTACK_CALLOC): Redefine.
3338 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3339 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3341 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3342 obstack_calloc/obstack_zalloc.
3343 (gdbarch_obstack_zalloc): Remove.
3344 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3346 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3348 * stack.c (backtrace_command_1): Remove useless variable int i.
3350 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3352 * stack.c (print_frame_info): Fix comment.
3354 2018-05-18 Tom Tromey <tom@tromey.com>
3356 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3357 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3358 (~dwarf2_per_objfile): Update
3359 (dwarf2_get_dwz_file): Use new.
3360 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3363 2018-05-18 Tom Tromey <tom@tromey.com>
3365 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3367 * dwarf2read.c (struct dwp_file): Add constructor and
3369 (open_and_init_dwp_file): Return a unique_ptr.
3370 (dwarf2_per_objfile, create_dwp_hash_table)
3371 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3372 (lookup_dwo_unit_in_dwp): Update.
3373 (open_and_init_dwp_file, get_dwp_file): Update.
3375 2018-05-18 Tom Tromey <tom@tromey.com>
3377 * dwarf2read.c (dwarf2_per_objfile): Update.
3378 (struct mapped_index): Add initializers.
3379 (dwarf2_read_index): Use new.
3380 (dw2_symtab_iter_init): Update.
3381 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3384 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3386 * dwarf2read.c (mapped_index) <total_size>: Remove.
3388 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3390 * unittests/format_pieces-selftests.c (test_format_specifier):
3393 2018-05-18 Tom Tromey <tom@tromey.com>
3395 * c-typeprint.c (maybe_print_hole): New function.
3396 (c_print_type_struct_field_offset): Update.
3397 (c_type_print_base_struct_union): Call maybe_print_hole.
3399 2018-05-17 Keith Seitz <keiths@redhat.com>
3401 * breakpoint.c (build_bpstat_chain): New function, moved from
3403 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3404 If no stop chain is passed, call build_bpstat_chain to build it.
3405 * breakpoint.h (build_bpstat_chain): Declare.
3406 (bpstat_stop_status): Move documentation here from breakpoint.c.
3407 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3408 build the stop chain and pass it to skip_inline_frames.
3409 Pass this stop chain to bpstat_stop_status.
3410 * inline-frame.c: Include breakpoint.h.
3411 (stopped_by_user_bp_inline_frame): New function.
3412 (skip_inline_frames): Add parameter `stop_chain'.
3413 Move documention to inline-frame.h.
3414 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3415 whether the frame should be elided.
3416 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3417 Add moved documentation and update for new parameter.
3419 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3422 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3423 unittests/format_pieces-selftests.c.
3424 * common/format.h (format_piece) <operator==>: New.
3425 (format_pieces) <operator[]>: Remove.
3426 * common/format.c (format_pieces::format_pieces): Handle \e.
3427 * unittests/format_pieces-selftests.c: New.
3429 2018-05-17 Tom Tromey <tom@tromey.com>
3432 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3433 (dw2_instantiate_symtab): Add skip_partial parameter.
3434 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3435 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3436 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3437 (dw2_expand_symtabs_matching_one)
3438 (dw2_find_pc_sect_compunit_symtab)
3439 (dw2_debug_names_lookup_symbol)
3440 (dw2_debug_names_expand_symtabs_for_function): Update.
3441 (init_cutu_and_read_dies): Add skip_partial parameter.
3442 (process_psymtab_comp_unit, build_type_psymtabs_1)
3443 (process_skeletonless_type_unit, load_partial_comp_unit)
3444 (psymtab_to_symtab_1): Update.
3445 (load_full_comp_unit): Add skip_partial parameter.
3446 (process_imported_unit_die, dwarf2_read_addr_index)
3447 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3448 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3449 (read_signatured_type): Update.
3451 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3453 * value.c (release_value): Remove unused variable.
3454 (record_latest_value): Likewise.
3455 (access_value_history): Likewise.
3456 (preserve_values): Likewise.
3458 2018-05-17 Tom Tromey <tom@tromey.com>
3460 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3463 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3466 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3467 Also handle registers whose width is not a multiple of
3469 (linux_nat_trad_target::store_register): Likewise.
3471 2018-05-16 Tom Tromey <tom@tromey.com>
3473 * gdbcore.h (core_bfd): Redefine.
3474 * corelow.c (core_target::close): Update.
3475 (core_target_open): Update.
3476 * progspace.h (struct program_space) <cbfd>: Now a
3479 2018-05-16 Tom Tromey <tom@tromey.com>
3482 * symfile-add-flags.h (enum symfile_add_flags)
3483 <SYMFILE_NOT_FILENAME>: New constant.
3484 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3485 objfile name from BFD.
3486 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3487 * minidebug.c (find_separate_debug_file_in_section): Put
3488 ".gnu_debugdata" into BFD's file name.
3490 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3492 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3495 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3498 * aarch64-tdep.c (aarch64_analyze_prologue,
3499 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3500 Indicate not interested in errors.
3502 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3504 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3505 Supply the MIPS_ZERO_REGNUM register.
3507 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3509 * mips-tdep.c (mask_address_var): Make variable static.
3511 2018-05-14 Tom Tromey <tom@tromey.com>
3513 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3515 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3517 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3518 FXSAVE_ADDR for the mxcsr register.
3520 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3522 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3524 2018-05-11 Pedro Alves <palves@redhat.com>
3526 * corelow.c (core_target) <core_target>: No longer inline.
3527 Initialize m_core_gdbarch, m_core_vec and build the section table
3529 <~core_target>: New.
3530 <core_gdbarch, get_core_register_section>: New methods.
3531 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3532 factored out from ...
3533 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3535 (sniff_core_bfd): Add gdbarch parameter.
3536 (core_close): Delete, merged into ...
3537 (core_target::close): ... here. Delete self.
3538 (core_close_cleanup): Delete.
3539 (core_target_open): Allocate a core_target on the heap. Use a
3540 unique_ptr instead of a cleanup. Bits moved into the core_target
3541 ctor. Adjust to use core_target methods instead of globals.
3542 (get_core_register_section): Rename to ...
3543 (core_target::get_core_register_section): ... this and adjust.
3544 (struct get_core_registers_cb_data): New.
3545 (get_core_registers_cb): Use it. Use bool.
3546 (core_target::fetch_registers, core_target::files_info)
3547 (core_target::xfer_partial, core_target::read_description)
3548 (core_target::pid_to, core_target::thread_name): Adjust to
3549 reference class fields instead of globals.
3550 * target.h (struct target_ops_deleter, target_ops_up): New.
3552 2018-05-11 Pedro Alves <palves@redhat.com>
3554 * corefile.c (core_file_command): Move to corelow.c.
3555 * corelow.c (the_core_target): Delete.
3556 (core_file_command): Moved from corefile.c. Check exec_bfd
3557 instead of the_core_target. Use target_detach instead of calling
3558 into the_core_target directly.
3559 (maybe_say_no_core_file_now): New.
3560 (core_target::detach): Use it.
3561 (_initialize_corelow): Remove references to the_core_target.
3562 * gdbcore.h (the_core_target): Delete.
3564 2018-05-11 Tom Tromey <tromey@redhat.com>
3565 Pedro Alves <palves@redhat.com>
3567 * corefile.c (core_bfd): Remove.
3568 * gdbcore.h (core_bfd): Now a macro.
3569 * progspace.h (struct program_space) <cbfd>: New field.
3571 2018-05-11 Tom Tromey <tom@tromey.com>
3573 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3576 2018-05-10 Tom Tromey <tom@tromey.com>
3578 * configure: Rebuild.
3579 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3581 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3584 * regformats/regdat.sh: Adjust script, following the addition
3585 of the new expedite_regs parameter to init_target_desc.
3587 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3590 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3591 set_gdbarch_significant_addr_bit.
3592 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3593 set_gdbarch_significant_addr_bit.
3594 * utils.c (address_significant): Update to sign extend addr.
3596 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3598 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3599 (xtensa_linux_init_abi): Limit tdep->num_regs by
3600 tdep->num_nopriv_regs.
3601 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3602 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3605 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3607 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3609 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3611 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3612 (I387_MXCSR_INIT_VAL): New constant.
3613 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3614 buffer if it was supplied by the inferior.
3615 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3616 (i387_xsave_get_clear_bv): New function.
3617 (i387_supply_xsave): Only read x87 control registers from the
3618 xsave buffer if the feature is enabled, and the state will have
3619 been written, otherwise, provide a suitable default.
3620 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3621 including x87 control registers. Update control registers if they
3622 have changed from the default value, and mark features as enabled
3624 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3626 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3628 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3630 2018-05-07 Tom Tromey <tom@tromey.com>
3632 * configure: Rebuild.
3633 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3635 2018-05-07 Tom Tromey <tom@tromey.com>
3638 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3639 bit. Use correct value for VDIV.
3641 2018-05-04 Tom Tromey <tom@tromey.com>
3643 * configure: Rebuild.
3644 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3646 2018-05-04 Tom Tromey <tom@tromey.com>
3648 * linux-record.c (record_linux_system_call) <case
3649 RECORD_SYS_RECVFROM>: Add "break".
3651 2018-05-04 Tom Tromey <tom@tromey.com>
3653 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3654 Add missing "break".
3655 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3656 Add missing "break".
3658 2018-05-04 Tom Tromey <tom@tromey.com>
3660 * rs6000-tdep.c (ppc_process_record_op4)
3661 (ppc_process_record_op63): Add fall-through comment.
3663 2018-05-04 Tom Tromey <tom@tromey.com>
3665 * i386-tdep.c (i386_process_record): Add fall-through comment.
3667 2018-05-04 Tom Tromey <tom@tromey.com>
3669 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3672 2018-05-04 Tom Tromey <tom@tromey.com>
3674 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3675 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3676 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3678 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3680 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3683 2018-05-04 Tom Tromey <tom@tromey.com>
3685 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3687 2018-05-04 Tom Tromey <tom@tromey.com>
3689 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3690 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3691 * symfile.c (section_is_mapped): Fix fall-through comment.
3692 * stabsread.c (define_symbol, read_member_functions): Fix
3693 fall-through comment.
3694 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3696 * remote.c (remote_wait_as): Fix fall-through comment.
3697 * p-exp.y (yylex): Fix fall-through comment.
3698 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3700 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3701 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3702 * jv-exp.y (yylex): Fix fall-through comment.
3703 * go-exp.y (lex_one_token): Fix fall-through comment.
3704 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3705 fall-through comment.
3706 * f-exp.y (yylex): Fix fall-through comment.
3707 * dwarf2read.c (process_die): Fix fall-through comments.
3708 * dbxread.c (process_one_symbol): Fix fall-through comment.
3709 * d-exp.y (lex_one_token): Fix fall-through comment.
3710 * cp-name-parser.y (yylex): Fix fall-through comment.
3711 * coffread.c (coff_symtab_read): Fix fall-through comment.
3712 * c-exp.y (lex_one_token): Fix fall-through comment.
3713 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3715 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3718 2018-05-04 Tom Tromey <tom@tromey.com>
3721 * NEWS: Mention gdb.execute change.
3722 * gdbcmd.h (execute_control_command): Don't declare.
3723 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3724 execute_control_commands, execute_control_commands_to_string.
3725 * cli/cli-script.h (execute_control_commands)
3726 (execute_control_commands_to_string): Declare.
3727 (execute_control_command): Add from_tty parameter.
3728 * cli/cli-script.c (execute_control_commands)
3729 (execute_control_commands_to_string): New functions.
3730 (execute_user_command): Use execute_control_commands.
3731 (execute_control_command_1): Add "from_tty" parameter. Update.
3732 (execute_control_command): Likewise.
3734 2018-05-04 Tom Tromey <tom@tromey.com>
3737 * NEWS: Mention that breakpoint commands are writable.
3738 * python/py-breakpoint.c (bppy_set_commands): New function.
3739 (breakpoint_object_getset) <"commands">: Use it.
3741 2018-05-04 Tom Tromey <tom@tromey.com>
3743 * tracepoint.c (actions_command): Update.
3744 * mi/mi-cmd-break.c (mi_command_line_array)
3745 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3746 (mi_read_next_line): Remove.
3747 (mi_cmd_break_commands): Update.
3748 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3750 * cli/cli-script.c (get_command_line): Update.
3751 (process_next_line): Use function_view. Constify.
3752 (recurse_read_control_structure, read_command_lines)
3753 (read_command_lines_1): Change argument types to function_view.
3754 (do_define_command, document_command): Update.
3755 * breakpoint.h (check_tracepoint_command): Don't declare.
3756 * breakpoint.c (check_tracepoint_command): Remove.
3757 (commands_command_1, create_tracepoint_from_upload): Update.
3759 2018-05-04 Tom Tromey <tom@tromey.com>
3762 * cli/cli-script.h (enum command_control_type) <define_control>:
3764 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3765 (build_command_line, execute_control_command_1)
3766 (process_next_line): Likewise.
3767 (do_define_command): New function, extracted from define_command.
3768 (define_command): Use it.
3770 2018-05-04 Tom Tromey <tom@tromey.com>
3772 * tracepoint.c (actions_command): Update.
3773 * cli/cli-script.h (read_command_lines): Update.
3774 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3775 (MAX_TMPBUF): Remove define.
3776 (define_command): Use string_printf.
3777 (document_command): Likewise.
3778 * breakpoint.c (commands_command_1): Update.
3780 2018-05-04 Tom Tromey <tom@tromey.com>
3782 * top.c (execute_command): Update.
3783 * cli/cli-script.h (print_command_lines): Now varargs.
3784 * cli/cli-script.c (print_command_lines): Now varargs.
3785 (execute_control_command_1) <case while_control, case if_control>:
3788 2018-05-04 Tom Tromey <tom@tromey.com>
3790 * tracepoint.c (all_tracepoint_actions): Rename from
3791 all_tracepoint_actions_and_cleanup. Change return type.
3792 (actions_command, encode_actions_1, encode_actions)
3793 (trace_dump_actions, tdump_command): Update.
3794 * remote.c (remote_download_command_source): Update.
3795 * python/python.c (gdbpy_eval_from_control_command)
3796 (python_command, python_interactive_command): Update.
3797 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3798 * guile/guile.c (guile_command)
3799 (gdbscm_eval_from_control_command, guile_command): Update.
3800 * compile/compile.c (compile_code_command)
3801 (compile_print_command, compile_to_object): Update.
3802 * cli/cli-script.h (struct command_lines_deleter): New.
3803 (counted_command_line): New typedef.
3804 (struct command_line): Add constructor, destructor.
3805 <body_list>: Remove.
3806 <body_list_0, body_list_1>: New members.
3807 (command_line_up): Remove typedef.
3808 (read_command_lines, read_command_lines_1, get_command_line):
3810 (copy_command_lines): Don't declare.
3811 * cli/cli-script.c (build_command_line): Use "new".
3812 (get_command_line): Return counted_command_line.
3813 (print_command_lines, execute_user_command)
3814 (execute_control_command_1, while_command, if_command): Update.
3815 (realloc_body_list): Remove.
3816 (process_next_line, recurse_read_control_structure): Update.
3817 (read_command_lines, read_command_lines_1): Return counted_command_line.
3818 (free_command_lines): Use "delete".
3819 (copy_command_lines): Remove.
3820 (define_command, document_command, show_user_1): Update.
3821 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3822 a counted_command_line.
3823 * breakpoint.h (counted_command_line): Remove typedef.
3824 (breakpoint_set_commands): Update.
3825 * breakpoint.c (check_no_tracepoint_commands)
3826 (validate_commands_for_breakpoint): Update.
3827 (breakpoint_set_commands): Change commands to be a
3828 counted_command_line.
3829 (commands_command_1, update_dprintf_command_list)
3830 (create_tracepoint_from_upload): Update.
3832 2018-05-04 Tom Tromey <tom@tromey.com>
3834 * cli/cli-decode.h (cmd_list_element): New constructor.
3835 (~cmd_list_element): New destructor.
3836 (struct cmd_list_element): Add initializers.
3837 * cli/cli-decode.c (do_add_cmd): Use "new".
3838 (delete_cmd): Use "delete".
3840 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3841 Pedro Alves <palves@redhat.com>
3843 PR breakpoints/19806 and support for PR external/20207.
3844 * NEWS: Mention Aarch64 watchpoint improvements.
3845 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3846 watchpoints and PR external/20207 watchpoints.
3847 * nat/aarch64-linux-hw-point.c
3848 (kernel_supports_any_contiguous_range): New.
3849 (aarch64_watchpoint_offset): New.
3850 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3851 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3852 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3853 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3854 next_addr_orig_p. Support PR external/20207 watchpoints.
3855 (aarch64_downgrade_regs): New.
3856 (aarch64_dr_state_insert_one_point): New parameters offset and
3858 (aarch64_dr_state_remove_one_point): Likewise.
3859 (aarch64_handle_breakpoint): Update caller.
3860 (aarch64_handle_aligned_watchpoint): Likewise.
3861 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3863 (aarch64_linux_set_debug_regs): Remove const from state. Call
3864 aarch64_downgrade_regs.
3865 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3866 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3867 (DR_CONTROL_MASK): ... this.
3868 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3869 (unsigned int aarch64_watchpoint_offset): New prototype.
3870 (aarch64_linux_set_debug_regs): Remove const from state.
3871 * utils.c (align_up, align_down): Move to ...
3872 * common/common-utils.c (align_up, align_down): ... here.
3873 * utils.h (align_up, align_down): Move to ...
3874 * common/common-utils.h (align_up, align_down): ... here.
3876 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3878 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3879 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3880 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3881 Re-implement to match the ABI as summarized in GCC's
3882 gcc/config/sparc/sparc.c. All callers updated.
3883 (sparc32_store_arguments): Remove assertion.
3885 2018-05-04 Tom Tromey <tom@tromey.com>
3887 * printcmd.c: Don't include tui.h.
3888 (decode_format): Use skip_spaces.
3890 2018-05-04 Tom Tromey <tom@tromey.com>
3893 * printcmd.c (last_count): New global.
3894 (x_command): Use saved count when repeating.
3896 2018-05-04 Tom Tromey <tom@tromey.com>
3898 * nto-procfs.c (do_closedir_cleanup): Remove.
3899 (procfs_pidlist): Use gdb_dir_up.
3900 * procfs.c (do_closedir_cleanup): Remove.
3901 (proc_update_threads): Use gdb_dir_up.
3902 * common/filestuff.h (struct gdb_dir_deleter): New.
3903 (gdb_dir_up): New typedef.
3905 2018-05-04 Tom Tromey <tom@tromey.com>
3907 * ada-lang.c (print_mention_exception): Use std::string.
3909 2018-05-04 Tom Tromey <tom@tromey.com>
3911 * ada-lang.c (create_excep_cond_exprs): Update.
3912 (ada_exception_catchpoint_cond_string): Use std::string.
3914 2018-05-04 Tom Tromey <tom@tromey.com>
3916 * ada-lang.c (xget_renaming_scope): Return std::string.
3917 (old_renaming_is_invisible): Update.
3919 2018-05-04 Tom Tromey <tom@tromey.com>
3921 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3922 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3924 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3926 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3928 2018-05-04 Tom Tromey <tom@tromey.com>
3930 * remote.c (remote_query_supported_append): Change type.
3931 (remote_check_symbols): Update.
3933 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3936 * configure.ac: Prepend libpython.
3937 * python/python-config.py: Likewise.
3938 * configure: Regenerate.
3940 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3942 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3944 2018-05-03 Pedro Alves <palves@redhat.com>
3947 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3948 override. Write 'true' instead of '1'.
3949 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3952 2018-05-02 Pedro Alves <palves@redhat.com>
3954 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3955 add_inf_child_target.
3956 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3957 add_inf_child_target.
3958 * aix-thread.c (aix_thread_target_info): New.
3959 (aix_thread_target) <shortname, longname, doc>: Delete.
3961 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3962 add_inf_child_target.
3963 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3964 add_inf_child_target.
3965 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3966 add_inf_child_target.
3967 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3968 add_inf_child_target.
3969 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3970 add_inf_child_target.
3971 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3972 add_inf_child_target.
3973 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3974 add_inf_child_target.
3975 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3976 add_inf_child_target.
3977 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3978 add_inf_child_target.
3979 * bfd-target.c (target_bfd_target_info): New.
3980 (target_bfd) <shortname, longname, doc>: Delete.
3982 * bsd-kvm.c (bsd_kvm_target_info): New.
3983 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3985 (bsd_kvm_target::open): Rename to ...
3986 (bsd_kvm_target_open): ... this. Adjust.
3987 * bsd-uthread.c (bsd_uthread_target_info): New.
3988 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3990 * corefile.c (core_file_command): Adjust.
3991 * corelow.c (core_target_info): New.
3992 (core_target) <shortname, longname, doc>: Delete.
3994 (core_target::open): Rename to ...
3995 (core_target_open): ... this. Adjust.
3996 * ctf.c (ctf_target_info): New.
3997 (ctf_target) <shortname, longname, doc>: Delete.
3999 (ctf_target::open): Rename to ...
4000 (ctf_target_open): ... this.
4001 (_initialize_ctf): Adjust.
4002 * exec.c (exec_target_info): New.
4003 (exec_target) <shortname, longname, doc>: Delete.
4005 (exec_target::open): Rename to ...
4006 (exec_target_open): ... this.
4007 * gdbcore.h (core_target_open): Declare.
4008 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4009 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4010 add_inf_child_target.
4011 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4012 add_inf_child_target.
4013 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4014 add_inf_child_target.
4015 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4016 add_inf_child_target.
4017 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4018 add_inf_child_target.
4019 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4020 add_inf_child_target.
4021 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4022 add_inf_child_target.
4023 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4024 add_inf_child_target.
4025 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4026 add_inf_child_target.
4027 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4028 add_inf_child_target.
4029 * inf-child.c (inf_child_target_info): New.
4030 (inf_child_target::info): New.
4031 (inf_child_open_target): Remove 'target' parameter. Use
4032 get_native_target instead.
4033 (inf_child_target::open): Delete.
4034 (add_inf_child_target): New.
4035 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4038 (add_inf_child_target): Declare.
4039 (inf_child_open_target): Declare.
4040 * linux-thread-db.c (thread_db_target_info): New.
4041 (thread_db_target) <shortname, longname, doc>: Delete.
4043 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4044 add_inf_child_target.
4045 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4046 add_inf_child_target.
4047 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4048 add_inf_child_target.
4049 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4050 add_inf_child_target.
4051 * make-target-delegates (print_class): Adjust.
4052 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4053 add_inf_child_target.
4054 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4055 add_inf_child_target.
4056 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4057 add_inf_child_target.
4058 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4059 add_inf_child_target.
4060 * nto-procfs.c (nto_native_target_info): New.
4061 (nto_procfs_target_native) <shortname, longname, doc>:
4064 (nto_procfs_target_info): New.
4065 (nto_procfs_target_procfs) <shortname, longname, doc>:
4068 (init_procfs_targets): Adjust.
4069 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4070 add_inf_child_target.
4071 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4072 add_inf_child_target.
4073 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4074 add_inf_child_target.
4075 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4076 add_inf_child_target.
4077 * ravenscar-thread.c (ravenscar_target_info): New.
4078 (ravenscar_thread_target) <shortname, longname, doc>:
4081 * record-btrace.c (record_btrace_target_info):
4082 (record_btrace_target) <shortname, longname, doc>: Delete.
4084 (record_btrace_target::open): Rename to ...
4085 (record_btrace_target_open): ... this. Adjust.
4086 * record-full.c (record_longname, record_doc): New.
4087 (record_full_base_target) <shortname, longname, doc>: Delete.
4089 (record_full_target_info): New.
4090 (record_full_target): <shortname>: Delete.
4092 (record_full_core_open_1, record_full_open_1): Update comments.
4093 (record_full_base_target::open): Rename to ...
4094 (record_full_open): ... this.
4095 (cmd_record_full_restore): Update.
4096 (_initialize_record_full): Update.
4097 * remote-sim.c (remote_sim_target_info): New.
4098 (gdbsim_target) <shortname, longname, doc>: Delete.
4100 (gdbsim_target::open): Rename to ...
4101 (gdbsim_target_open): ... this.
4102 (_initialize_remote_sim): Adjust.
4103 * remote.c (remote_doc): New.
4104 (remote_target_info): New.
4105 (remote_target) <shortname, longname, doc>: Delete.
4107 (extended_remote_target_info): New.
4108 (extended_remote_target) <shortname, longname, doc>: Delete.
4110 (remote_target::open_1): Make static. Adjust.
4111 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4112 * s390-linux-nat.c (_initialize_s390_nat): Use
4113 add_inf_child_target.
4114 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4115 add_inf_child_target.
4116 * sol-thread.c (thread_db_target_info): New.
4117 (sol_thread_target) <shortname, longname, doc>: Delete.
4119 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4120 add_inf_child_target.
4121 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4122 add_inf_child_target.
4123 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4124 add_inf_child_target.
4125 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4126 add_inf_child_target.
4127 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4128 add_inf_child_target.
4129 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4130 add_inf_child_target.
4131 * spu-linux-nat.c (_initialize_spu_nat): Use
4132 add_inf_child_target.
4133 * spu-multiarch.c (spu_multiarch_target_info): New.
4134 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4136 * target-delegates.c: Regenerate.
4137 * target.c: Include <unordered_map>.
4138 (target_ops_p): Delete.
4139 (DEF_VEC_P(target_ops_p)): Delete.
4140 (target_factories): New.
4141 (test_target_info): New.
4142 (test_target_ops::info): New.
4143 (open_target): Adjust to use target_factories.
4144 (add_target_with_completer): Rename to ...
4145 (add_target): ... this. Change prototype. Register target_info
4146 and open callback in target_factories. Register target_info in
4147 command context instead of target_ops.
4148 (add_target): Delete old implementation.
4149 (add_deprecated_target_alias): Change prototype. Adjust.
4150 (the_native_target): New.
4151 (set_native_target, get_native_target): New.
4152 (find_default_run_target): Use the_native_target.
4153 (find_attach_target, find_run_target): Simplify.
4154 (target_ops::open): Delete.
4155 (dummy_target_info): New.
4156 (dummy_target::shortname, dummy_target::longname)
4157 (dummy_target::doc): Delete.
4158 (dummy_target::info): New.
4159 (debug_target::shortname, debug_target::longname)
4160 (debug_target::doc): Delete.
4161 (debug_target::info): New.
4162 * target.h (struct target_info): New.
4163 (target_ops::~target_ops): Add comment.
4164 (target_ops::info): New.
4165 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4166 longer virtual. Implement in terms of target_info.
4167 (set_native_target, get_native_target): Declare.
4168 (target_open_ftype): New.
4169 (add_target, add_target_with_completer)
4170 (add_deprecated_target_alias): Change prototype.
4171 (test_target) <shortname, longname, doc>: Delete.
4173 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4174 add_inf_child_target.
4175 * tracefile-tfile.c (tfile_target_info): New.
4176 (tfile_target) <shortname, longname, doc>: Delete.
4178 (tfile_target::open): Rename to ...
4179 (tfile_target_open): ... this.
4180 (_initialize_tracefile_tfile): Adjust.
4181 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4182 add_inf_child_target.
4183 * windows-nat.c (_initialize_windows_nat): Use
4184 add_inf_child_target.
4185 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4186 add_inf_child_target.
4188 2018-05-02 Pedro Alves <palves@redhat.com>
4190 * linux-nat.h (linux_nat_target) <low_new_thread,
4191 low_delete_thread, low_new_fork, low_forget_process,
4192 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4193 New virtual methods.
4194 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4195 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4196 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4197 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4198 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4200 * linux-fork.c (delete_fork): Adjust to call low method.
4201 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4202 (linux_nat_new_fork, linux_nat_forget_process_hook)
4203 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4204 (linux_nat_status_is_event):
4205 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4206 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4208 (sigtrap_is_event): Rename to ...
4209 (linux_nat_target::low_status_is_event): ... this.
4210 (linux_nat_set_status_is_event): Delete.
4211 (save_stop_reason, linux_nat_wait_1)
4212 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4214 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4215 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4216 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4217 (linux_nat_set_prepare_to_resume): Delete.
4218 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4219 low virtual methods.
4220 * amd64-linux-nat.c: Likewise.
4221 * arm-linux-nat.c: Likewise.
4222 * i386-linux-nat.c: Likewise.
4223 * ia64-linux-nat.c: Likewise.
4224 * mips-linux-nat.c: Likewise.
4225 * ppc-linux-nat.c: Likewise.
4226 * s390-linux-nat.c: Likewise.
4227 * sparc64-linux-nat.c: Likewise.
4228 * x86-linux-nat.c: Likewise.
4229 * x86-linux-nat.h: Include "nat/x86-linux.h".
4230 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4231 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4234 2018-05-02 Pedro Alves <palves@redhat.com>
4236 * target.h (target_ops)
4237 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4238 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4239 stopped_by_watchpoint, have_continuable_watchpoint,
4240 stopped_data_address, watchpoint_addr_within_range,
4241 can_accel_watchpoint_condition, can_run, thread_alive,
4242 has_all_memory, has_memory, has_stack, has_registers,
4243 has_execution, can_async_p, is_async_p, supports_non_stop,
4244 always_non_stop_p, can_execute_reverse, supports_multi_process,
4245 supports_enable_disable_tracepoint,
4246 supports_disable_randomization, supports_string_tracing,
4247 supports_evaluation_of_breakpoint_conditions,
4248 can_run_breakpoint_commands, filesystem_is_local,
4249 can_download_tracepoint, get_trace_state_variable_value,
4250 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4251 record_is_replaying, record_will_replay,
4252 augmented_libraries_svr4_read>: Adjust to return bool.
4253 * aarch64-linux-nat.c: All implementations adjusted.
4254 * aix-thread.c: All implementations adjusted.
4255 * arm-linux-nat.c: All implementations adjusted.
4256 * breakpoint.c: All implementations adjusted.
4257 * bsd-kvm.c: All implementations adjusted.
4258 * bsd-uthread.c: All implementations adjusted.
4259 * corelow.c: All implementations adjusted.
4260 * ctf.c: All implementations adjusted.
4261 * darwin-nat.c: All implementations adjusted.
4262 * darwin-nat.h: All implementations adjusted.
4263 * exec.c: All implementations adjusted.
4264 * fbsd-nat.c: All implementations adjusted.
4265 * fbsd-nat.h: All implementations adjusted.
4266 * gnu-nat.c: All implementations adjusted.
4267 * gnu-nat.h: All implementations adjusted.
4268 * go32-nat.c: All implementations adjusted.
4269 * ia64-linux-nat.c: All implementations adjusted.
4270 * inf-child.c: All implementations adjusted.
4271 * inf-child.h: All implementations adjusted.
4272 * inf-ptrace.c: All implementations adjusted.
4273 * inf-ptrace.h: All implementations adjusted.
4274 * linux-nat.c: All implementations adjusted.
4275 * linux-nat.h: All implementations adjusted.
4276 * mips-linux-nat.c: All implementations adjusted.
4277 * nto-procfs.c: All implementations adjusted.
4278 * ppc-linux-nat.c: All implementations adjusted.
4279 * procfs.c: All implementations adjusted.
4280 * ravenscar-thread.c: All implementations adjusted.
4281 * record-btrace.c: All implementations adjusted.
4282 * record-full.c: All implementations adjusted.
4283 * remote-sim.c: All implementations adjusted.
4284 * remote.c: All implementations adjusted.
4285 * s390-linux-nat.c: All implementations adjusted.
4286 * sol-thread.c: All implementations adjusted.
4287 * spu-multiarch.c: All implementations adjusted.
4288 * target-delegates.c: All implementations adjusted.
4289 * target.c: All implementations adjusted.
4290 * target.h: All implementations adjusted.
4291 * tracefile-tfile.c: All implementations adjusted.
4292 * tracefile.c: All implementations adjusted.
4293 * tracefile.h: All implementations adjusted.
4294 * windows-nat.c: All implementations adjusted.
4295 * x86-linux-nat.h: All implementations adjusted.
4296 * x86-nat.h: All implementations adjusted.
4298 2018-05-02 Pedro Alves <palves@redhat.com>
4300 * make-target-delegates (scan_target_h): Don't trim lines here.
4301 Replace sequences of tabs and/or whitespace with a single
4303 (top level, parsing methods): Trim each line before processing it
4306 2018-05-02 Pedro Alves <palves@redhat.com>
4307 John Baldwin <jhb@freebsd.org>
4309 * target.h (enum strata) <debug_stratum>: New.
4310 (struct target_ops) <all delegation methods>: Replace by C++
4311 virtual methods, and drop "to_" prefix. All references updated
4313 <to_shortname, to_longname, to_doc, to_data,
4314 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4315 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4316 virtual methods. All references updated throughout.
4317 <can_attach, supports_terminal_ours, can_create_inferior,
4318 get_thread_control_capabilities, attach_no_wait>: New
4320 <insert_breakpoint, remove_breakpoint>: Now
4321 TARGET_DEFAULT_NORETURN methods.
4322 <info_proc>: Now returns bool.
4324 (OPS_MAGIC): Delete.
4325 (current_target): Delete. All references replaced by references
4327 (target_stack): ... this. New.
4328 (target_shortname, target_longname): Adjust.
4329 (target_can_run): Now a function declaration.
4330 (default_child_has_all_memory, default_child_has_memory)
4331 (default_child_has_stack, default_child_has_registers)
4332 (default_child_has_execution): Remove target_ops parameter.
4333 (complete_target_initialization): Delete.
4334 (memory_breakpoint_target): New template class.
4335 (test_target_ops): Refactor as a C++ class with virtual methods.
4336 * make-target-delegates (NAME_PART): Tighten.
4337 (POINTER_PART, CP_SYMBOL): New.
4338 (SIMPLE_RETURN_PART): Reimplement.
4339 (VEC_RETURN_PART): Expect less.
4340 (RETURN_PART, VIRTUAL_PART): New.
4341 (METHOD): Adjust to C++ virtual methods.
4342 (scan_target_h): Remove reference to C99.
4343 (dname): Output "target_ops::" prefix.
4344 (write_function_header): Adjust to output a C++ class method.
4345 (write_declaration): New.
4346 (write_delegator): Adjust to output a C++ class method.
4347 (tdname): Output "dummy_target::" prefix.
4348 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4350 (tdefault_names, debug_names): Delete.
4351 (return_types, tdefaults, styles, argtypes_array): New.
4352 (top level): All methods are delegators.
4354 (top level): Print dummy_target and debug_target classes.
4355 * target-delegates.c: Regenerate.
4356 * target-debug.h (target_debug_print_enum_info_proc_what)
4357 (target_debug_print_thread_control_capabilities)
4358 (target_debug_print_thread_info_p): New.
4359 * target.c (dummy_target): Delete.
4360 (the_dummy_target, the_debug_target): New.
4361 (target_stack): Now extern.
4362 (set_targetdebug): Push/unpush debug target.
4363 (default_child_has_all_memory, default_child_has_memory)
4364 (default_child_has_stack, default_child_has_registers)
4365 (default_child_has_execution): Remove target_ops parameter.
4366 (complete_target_initialization): Delete.
4367 (add_target_with_completer): No longer call
4368 complete_target_initialization.
4369 (target_supports_terminal_ours): Use regular delegation.
4370 (update_current_target): Delete.
4371 (push_target): No longer check magic number. Don't call
4372 update_current_target.
4373 (unpush_target): Don't call update_current_target.
4374 (target_is_pushed): No longer check magic number.
4375 (target_require_runnable): Skip for all stratums over
4377 (target_ops::info_proc): New.
4378 (target_info_proc): Use find_target_at and
4379 find_default_run_target.
4380 (target_supports_disable_randomization): Use regular delegation.
4381 (target_get_osdata): Use find_target_at.
4382 (target_ops::open, target_ops::close, target_ops::can_attach)
4383 (target_ops::attach, target_ops::can_create_inferior)
4384 (target_ops::create_inferior, target_ops::can_run)
4385 (target_can_run): New.
4386 (default_fileio_target): Use regular delegation.
4387 (target_ops::fileio_open, target_ops::fileio_pwrite)
4388 (target_ops::fileio_pread, target_ops::fileio_fstat)
4389 (target_ops::fileio_close, target_ops::fileio_unlink)
4390 (target_ops::fileio_readlink): New.
4391 (target_fileio_open_1, target_fileio_unlink)
4392 (target_fileio_readlink): Always call the target method. Handle
4394 (return_zero, return_zero_has_execution): Delete.
4395 (init_dummy_target): Delete.
4396 (dummy_target::dummy_target, dummy_target::shortname)
4397 (dummy_target::longname, dummy_target::doc)
4398 (debug_target::debug_target, debug_target::shortname)
4399 (debug_target::longname, debug_target::doc): New.
4400 (target_supports_delete_record): Use regular delegation.
4401 (setup_target_debug): Delete.
4402 (maintenance_print_target_stack): Skip debug_stratum.
4403 (initialize_targets): Instantiate the_dummy_target and
4405 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4407 (target_auxv_search, fprint_target_auxv): Adjust.
4408 (info_auxv_command): Adjust to use target_stack.
4409 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4410 * exceptions.c (print_flush): Handle a NULL target_stack.
4411 * regcache.c (target_ops_no_register): Refactor as class with
4414 * exec.c (exec_target): New class.
4415 (exec_ops): Now an exec_target.
4416 (exec_open, exec_close_1, exec_get_section_table)
4417 (exec_xfer_partial, exec_files_info, exec_has_memory)
4418 (exec_make_note_section): Refactor as exec_target methods.
4419 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4421 (exec_target::find_memory_regions): New.
4422 (_initialize_exec): Don't call init_exec_ops.
4423 * gdbcore.h (exec_file_clear): Delete.
4425 * corefile.c (core_target): Delete.
4426 (core_file_command): Adjust.
4427 * corelow.c (core_target): New class.
4428 (the_core_target): New.
4429 (core_close): Remove target_ops parameter.
4430 (core_close_cleanup): Adjust.
4431 (core_target::close): New.
4432 (core_open, core_detach, get_core_registers, core_files_info)
4433 (core_xfer_partial, core_thread_alive, core_read_description)
4434 (core_pid_to_str, core_thread_name, core_has_memory)
4435 (core_has_stack, core_has_registers, core_info_proc): Rework as
4436 core_target methods.
4437 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4438 (_initialize_corelow): Initialize the_core_target.
4439 * gdbcore.h (core_target): Delete.
4440 (the_core_target): New.
4442 * ctf.c: (ctf_target): New class.
4443 (ctf_ops): Now a ctf_target.
4444 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4445 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4446 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4448 (init_ctf_ops): Delete.
4449 (_initialize_ctf): Don't call it.
4450 * tracefile-tfile.c (tfile_target): New class.
4451 (tfile_ops): Now a tfile_target.
4452 (tfile_open, tfile_close, tfile_files_info)
4453 (tfile_get_tracepoint_status, tfile_trace_find)
4454 (tfile_fetch_registers, tfile_xfer_partial)
4455 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4456 Refactor as tfile_target methods.
4457 (tfile_xfer_partial_features): Remove target_ops parameter.
4458 (init_tfile_ops): Delete.
4459 (_initialize_tracefile_tfile): Don't call it.
4460 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4461 (tracefile_has_stack, tracefile_has_registers)
4462 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4463 tracefile_target methods.
4464 (init_tracefile_ops): Delete.
4465 (tracefile_target::tracefile_target): New.
4466 * tracefile.h: Include "target.h".
4467 (tracefile_target): New class.
4468 (init_tracefile_ops): Delete.
4470 * spu-multiarch.c (spu_multiarch_target): New class.
4471 (spu_ops): Now a spu_multiarch_target.
4472 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4473 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4474 (spu_search_memory, spu_mourn_inferior): Refactor as
4475 spu_multiarch_target methods.
4476 (init_spu_ops): Delete.
4477 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4478 complete_target_initialization.
4480 * ravenscar-thread.c (ravenscar_thread_target): New class.
4481 (ravenscar_ops): Now a ravenscar_thread_target.
4482 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4483 (ravenscar_thread_alive, ravenscar_pid_to_str)
4484 (ravenscar_fetch_registers, ravenscar_store_registers)
4485 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4486 (ravenscar_stopped_by_hw_breakpoint)
4487 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4488 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4489 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4491 (init_ravenscar_thread_ops): Delete.
4492 (_initialize_ravenscar): Remove references to
4493 init_ravenscar_thread_ops and complete_target_initialization.
4495 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4496 (bsd_uthread_target): New class.
4497 (bsd_uthread_ops): Now a bsd_uthread_target.
4498 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4499 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4500 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4501 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4502 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4503 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4504 (bsd_uthread_target): Delete function.
4505 (_initialize_bsd_uthread): Remove reference to
4506 complete_target_initialization.
4508 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4509 (target_bfd): ... this new class.
4510 (target_bfd_xfer_partial, target_bfd_get_section_table)
4511 (target_bfd_close): Refactor as target_bfd methods.
4512 (target_bfd::~target_bfd): New.
4513 (target_bfd_reopen): Adjust.
4514 (target_bfd::close): New.
4516 * record-btrace.c (record_btrace_target): New class.
4517 (record_btrace_ops): Now a record_btrace_target.
4518 (record_btrace_open, record_btrace_stop_recording)
4519 (record_btrace_disconnect, record_btrace_close)
4520 (record_btrace_async, record_btrace_info)
4521 (record_btrace_insn_history, record_btrace_insn_history_range)
4522 (record_btrace_insn_history_from, record_btrace_call_history)
4523 (record_btrace_call_history_range)
4524 (record_btrace_call_history_from, record_btrace_record_method)
4525 (record_btrace_is_replaying, record_btrace_will_replay)
4526 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4527 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4528 (record_btrace_store_registers, record_btrace_prepare_to_store)
4529 (record_btrace_to_get_unwinder)
4530 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4531 (record_btrace_commit_resume, record_btrace_wait)
4532 (record_btrace_stop, record_btrace_can_execute_reverse)
4533 (record_btrace_stopped_by_sw_breakpoint)
4534 (record_btrace_supports_stopped_by_sw_breakpoint)
4535 (record_btrace_stopped_by_hw_breakpoint)
4536 (record_btrace_supports_stopped_by_hw_breakpoint)
4537 (record_btrace_update_thread_list, record_btrace_thread_alive)
4538 (record_btrace_goto_begin, record_btrace_goto_end)
4539 (record_btrace_goto, record_btrace_stop_replaying_all)
4540 (record_btrace_execution_direction)
4541 (record_btrace_prepare_to_generate_core)
4542 (record_btrace_done_generating_core): Refactor as
4543 record_btrace_target methods.
4544 (init_record_btrace_ops): Delete.
4545 (_initialize_record_btrace): Remove reference to
4546 init_record_btrace_ops.
4547 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4548 the execution_direction global.
4549 (record_full_base_target, record_full_target)
4550 (record_full_core_target): New classes.
4551 (record_full_ops): Now a record_full_target.
4552 (record_full_core_ops): Now a record_full_core_target.
4553 (record_full_target::detach, record_full_target::disconnect)
4554 (record_full_core_target::disconnect)
4555 (record_full_target::mourn_inferior, record_full_target::kill):
4557 (record_full_open, record_full_close, record_full_async): Refactor
4558 as methods of the record_full_base_target class.
4559 (record_full_resume, record_full_commit_resume): Refactor
4560 as methods of the record_full_target class.
4561 (record_full_wait, record_full_stopped_by_watchpoint)
4562 (record_full_stopped_data_address)
4563 (record_full_stopped_by_sw_breakpoint)
4564 (record_full_supports_stopped_by_sw_breakpoint)
4565 (record_full_stopped_by_hw_breakpoint)
4566 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4567 methods of the record_full_base_target class.
4568 (record_full_store_registers, record_full_xfer_partial)
4569 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4570 Refactor as methods of the record_full_target class.
4571 (record_full_can_execute_reverse, record_full_get_bookmark)
4572 (record_full_goto_bookmark, record_full_execution_direction)
4573 (record_full_record_method, record_full_info, record_full_delete)
4574 (record_full_is_replaying, record_full_will_replay)
4575 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4576 (record_full_stop_replaying): Refactor as methods of the
4577 record_full_base_target class.
4578 (record_full_core_resume, record_full_core_kill)
4579 (record_full_core_fetch_registers)
4580 (record_full_core_prepare_to_store)
4581 (record_full_core_store_registers, record_full_core_xfer_partial)
4582 (record_full_core_insert_breakpoint)
4583 (record_full_core_remove_breakpoint)
4584 (record_full_core_has_execution): Refactor
4585 as methods of the record_full_core_target class.
4586 (record_full_base_target::supports_delete_record): New.
4587 (init_record_full_ops): Delete.
4588 (init_record_full_core_ops): Delete.
4589 (record_full_save): Refactor as method of the
4590 record_full_base_target class.
4591 (_initialize_record_full): Remove references to
4592 init_record_full_ops and init_record_full_core_ops.
4594 * remote.c (remote_target, extended_remote_target): New classes.
4595 (remote_ops): Now a remote_target.
4596 (extended_remote_ops): Now an extended_remote_target.
4597 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4598 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4599 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4600 (remote_pass_signals, remote_set_syscall_catchpoint)
4601 (remote_program_signals, )
4602 (remote_thread_always_alive): Remove target_ops parameter.
4603 (remote_thread_alive, remote_thread_name)
4604 (remote_update_thread_list, remote_threads_extra_info)
4605 (remote_static_tracepoint_marker_at)
4606 (remote_static_tracepoint_markers_by_strid)
4607 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4608 (remote_open): Refactor as methods of remote_target.
4609 (extended_remote_open, extended_remote_detach)
4610 (extended_remote_attach, extended_remote_post_attach):
4611 (extended_remote_supports_disable_randomization)
4612 (extended_remote_create_inferior): : Refactor as method of
4613 extended_remote_target.
4614 (remote_set_permissions, remote_open_1, remote_detach)
4615 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4616 (remote_resume, remote_commit_resume, remote_stop)
4617 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4618 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4619 (remote_prepare_to_store, remote_store_registers)
4620 (remote_flash_erase, remote_flash_done, remote_files_info)
4621 (remote_kill, remote_mourn, remote_insert_breakpoint)
4622 (remote_remove_breakpoint, remote_insert_watchpoint)
4623 (remote_watchpoint_addr_within_range)
4624 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4625 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4626 (remote_supports_stopped_by_sw_breakpoint)
4627 (remote_stopped_by_hw_breakpoint)
4628 (remote_supports_stopped_by_hw_breakpoint)
4629 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4630 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4631 (remote_verify_memory): Refactor as methods of remote_target.
4632 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4634 (remote_xfer_partial, remote_get_memory_xfer_limit)
4635 (remote_search_memory, remote_rcmd, remote_memory_map)
4636 (remote_pid_to_str, remote_get_thread_local_address)
4637 (remote_get_tib_address, remote_read_description): Refactor as
4638 methods of remote_target.
4639 (remote_target::fileio_open, remote_target::fileio_pwrite)
4640 (remote_target::fileio_pread, remote_target::fileio_close): New.
4641 (remote_hostio_readlink, remote_hostio_fstat)
4642 (remote_filesystem_is_local, remote_can_execute_reverse)
4643 (remote_supports_non_stop, remote_supports_disable_randomization)
4644 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4645 (remote_supports_enable_disable_tracepoint)
4646 (remote_supports_string_tracing)
4647 (remote_can_run_breakpoint_commands, remote_trace_init)
4648 (remote_download_tracepoint, remote_can_download_tracepoint)
4649 (remote_download_trace_state_variable, remote_enable_tracepoint)
4650 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4651 (remote_trace_start, remote_get_trace_status)
4652 (remote_get_tracepoint_status, remote_trace_stop)
4653 (remote_trace_find, remote_get_trace_state_variable_value)
4654 (remote_save_trace_data, remote_get_raw_trace_data)
4655 (remote_set_disconnected_tracing, remote_core_of_thread)
4656 (remote_set_circular_trace_buffer, remote_traceframe_info)
4657 (remote_get_min_fast_tracepoint_insn_len)
4658 (remote_set_trace_buffer_size, remote_set_trace_notes)
4659 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4660 (remote_disable_btrace, remote_teardown_btrace)
4661 (remote_read_btrace, remote_btrace_conf)
4662 (remote_augmented_libraries_svr4_read, remote_load)
4663 (remote_pid_to_exec_file, remote_can_do_single_step)
4664 (remote_execution_direction, remote_thread_handle_to_thread_info):
4665 Refactor as methods of remote_target.
4666 (init_remote_ops, init_extended_remote_ops): Delete.
4667 (remote_can_async_p, remote_is_async_p, remote_async)
4668 (remote_thread_events, remote_upload_tracepoints)
4669 (remote_upload_trace_state_variables): Refactor as methods of
4671 (_initialize_remote): Remove references to init_remote_ops and
4672 init_extended_remote_ops.
4674 * remote-sim.c (gdbsim_target): New class.
4675 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4676 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4677 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4678 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4679 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4680 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4681 Refactor as methods of gdbsim_target.
4682 (gdbsim_ops): Now a gdbsim_target.
4683 (init_gdbsim_ops): Delete.
4684 (gdbsim_cntrl_c): Adjust.
4685 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4687 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4688 (the_amd64_linux_nat_target): New.
4689 (amd64_linux_fetch_inferior_registers)
4690 (amd64_linux_store_inferior_registers): Refactor as methods of
4691 amd64_linux_nat_target.
4692 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4693 * i386-linux-nat.c: Don't include "linux-nat.h".
4694 (i386_linux_nat_target): New class.
4695 (the_i386_linux_nat_target): New.
4696 (i386_linux_fetch_inferior_registers)
4697 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4698 as methods of i386_linux_nat_target.
4699 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4700 * inf-child.c (inf_child_ops): Delete.
4701 (inf_child_fetch_inferior_registers)
4702 (inf_child_store_inferior_registers): Delete.
4703 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4704 methods of inf_child_target.
4705 (inf_child_target::supports_terminal_ours)
4706 (inf_child_target::terminal_init)
4707 (inf_child_target::terminal_inferior)
4708 (inf_child_target::terminal_ours_for_output)
4709 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4710 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4712 (inf_child_open, inf_child_disconnect, inf_child_close)
4713 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4714 (inf_child_post_startup_inferior, inf_child_can_run)
4715 (inf_child_pid_to_exec_file): Refactor as methods of
4717 (inf_child_follow_fork): Delete.
4718 (inf_child_target::can_create_inferior)
4719 (inf_child_target::can_attach): New.
4720 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4721 (inf_child_target::has_stack, inf_child_target::has_registers)
4722 (inf_child_target::has_execution): New.
4723 (inf_child_fileio_open, inf_child_fileio_pwrite)
4724 (inf_child_fileio_pread, inf_child_fileio_fstat)
4725 (inf_child_fileio_close, inf_child_fileio_unlink)
4726 (inf_child_fileio_readlink, inf_child_use_agent)
4727 (inf_child_can_use_agent): Refactor as methods of
4729 (return_zero, inf_child_target): Delete.
4730 (inf_child_target::inf_child_target): New.
4731 * inf-child.h: Include "target.h".
4732 (inf_child_target): Delete function prototype.
4733 (inf_child_target): New class.
4734 (inf_child_open_target, inf_child_mourn_inferior)
4735 (inf_child_maybe_unpush_target): Delete.
4736 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4737 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4738 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4739 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4740 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4741 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4742 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4743 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4744 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4745 methods of inf_ptrace_target.
4746 (inf_ptrace_target): Delete function.
4747 * inf-ptrace.h: Include "inf-child.h".
4748 (inf_ptrace_target): Delete function declaration.
4749 (inf_ptrace_target): New class.
4750 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4751 * linux-nat.c (linux_target): New.
4752 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4753 (linux_nat_target::~linux_nat_target): New.
4754 (linux_child_post_attach, linux_child_post_startup_inferior)
4755 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4756 (linux_child_remove_fork_catchpoint)
4757 (linux_child_insert_vfork_catchpoint)
4758 (linux_child_remove_vfork_catchpoint)
4759 (linux_child_insert_exec_catchpoint)
4760 (linux_child_remove_exec_catchpoint)
4761 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4762 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4763 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4764 (linux_nat_stopped_data_address)
4765 (linux_nat_stopped_by_sw_breakpoint)
4766 (linux_nat_supports_stopped_by_sw_breakpoint)
4767 (linux_nat_stopped_by_hw_breakpoint)
4768 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4769 (linux_nat_kill, linux_nat_mourn_inferior)
4770 (linux_nat_xfer_partial, linux_nat_thread_alive)
4771 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4772 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4773 (linux_child_static_tracepoint_markers_by_strid)
4774 (linux_nat_is_async_p, linux_nat_can_async_p)
4775 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4776 (linux_nat_supports_multi_process)
4777 (linux_nat_supports_disable_randomization, linux_nat_async)
4778 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4779 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4780 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4781 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4782 methods of linux_nat_target.
4783 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4784 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4786 (check_stopped_by_watchpoint): Adjust.
4787 (linux_xfer_partial): Delete.
4788 (linux_target_install_ops, linux_target, linux_nat_add_target):
4790 (linux_nat_target::linux_nat_target): New.
4791 * linux-nat.h: Include "inf-ptrace.h".
4792 (linux_nat_target): New.
4793 (linux_target, linux_target_install_ops, linux_nat_add_target):
4794 Delete function declarations.
4795 (linux_target): Declare global.
4796 * linux-thread-db.c (thread_db_target): New.
4797 (thread_db_target::thread_db_target): New.
4798 (thread_db_ops): Delete.
4799 (the_thread_db_target): New.
4800 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4801 (thread_db_update_thread_list, thread_db_pid_to_str)
4802 (thread_db_extra_thread_info)
4803 (thread_db_thread_handle_to_thread_info)
4804 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4805 (thread_db_resume): Refactor as methods of thread_db_target.
4806 (init_thread_db_ops): Delete.
4807 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4808 * x86-linux-nat.c: Don't include "linux-nat.h".
4809 (super_post_startup_inferior): Delete.
4810 (x86_linux_nat_target::~x86_linux_nat_target): New.
4811 (x86_linux_child_post_startup_inferior)
4812 (x86_linux_read_description, x86_linux_enable_btrace)
4813 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4814 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4815 methods of x86_linux_nat_target.
4816 (x86_linux_create_target): Delete. Bits folded ...
4817 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4819 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4820 (x86_linux_nat_target): New class.
4821 (x86_linux_create_target): Delete.
4822 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4823 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4824 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4825 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4826 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4827 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4829 (x86_use_watchpoints): Delete.
4830 * x86-nat.h: Include "breakpoint.h" and "target.h".
4831 (x86_use_watchpoints): Delete.
4832 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4833 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4834 (x86_insert_watchpoint, x86_remove_watchpoint)
4835 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4836 (x86_stopped_by_hw_breakpoint): New declarations.
4837 (x86_nat_target): New template class.
4839 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4840 (the_ppc_linux_nat_target): New.
4841 (ppc_linux_fetch_inferior_registers)
4842 (ppc_linux_can_use_hw_breakpoint)
4843 (ppc_linux_region_ok_for_hw_watchpoint)
4844 (ppc_linux_ranged_break_num_registers)
4845 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4846 (ppc_linux_insert_mask_watchpoint)
4847 (ppc_linux_remove_mask_watchpoint)
4848 (ppc_linux_can_accel_watchpoint_condition)
4849 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4850 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4851 (ppc_linux_watchpoint_addr_within_range)
4852 (ppc_linux_masked_watch_num_registers)
4853 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4854 (ppc_linux_read_description): Refactor as methods of
4855 ppc_linux_nat_target.
4856 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4858 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4859 (procfs_target): New class.
4860 (the_procfs_target): New.
4861 (procfs_target): Delete function.
4862 (procfs_auxv_parse, procfs_attach, procfs_detach)
4863 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4864 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4865 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4866 (procfs_create_inferior, procfs_update_thread_list)
4867 (procfs_thread_alive, procfs_pid_to_str)
4868 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4869 (procfs_stopped_data_address, procfs_insert_watchpoint)
4870 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4871 (proc_find_memory_regions, procfs_info_proc)
4872 (procfs_make_note_section): Refactor as methods of procfs_target.
4873 (_initialize_procfs): Adjust.
4874 * sol-thread.c (sol_thread_target): New class.
4875 (sol_thread_ops): Now a sol_thread_target.
4876 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4877 (sol_thread_fetch_registers, sol_thread_store_registers)
4878 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4879 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4880 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4881 (init_sol_thread_ops): Delete.
4882 (_initialize_sol_thread): Adjust. Remove references to
4883 init_sol_thread_ops and complete_target_initialization.
4885 * windows-nat.c (windows_nat_target): New class.
4886 (windows_fetch_inferior_registers)
4887 (windows_store_inferior_registers, windows_resume, windows_wait)
4888 (windows_attach, windows_detach, windows_pid_to_exec_file)
4889 (windows_files_info, windows_create_inferior)
4890 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4891 (windows_close, windows_pid_to_str, windows_xfer_partial)
4892 (windows_get_tib_address, windows_get_ada_task_ptid)
4893 (windows_thread_name, windows_thread_alive): Refactor as
4894 windows_nat_target methods.
4895 (do_initial_windows_stuff): Adjust.
4896 (windows_target): Delete function.
4897 (_initialize_windows_nat): Adjust.
4899 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4900 (darwin_mourn_inferior, darwin_kill_inferior)
4901 (darwin_create_inferior, darwin_attach, darwin_detach)
4902 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4903 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4904 (darwin_supports_multi_process): Refactor as darwin_nat_target
4906 (darwin_resume_to, darwin_files_info): Delete.
4907 (_initialize_darwin_inferior): Rename to ...
4908 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4909 * darwin-nat.h: Include "inf-child.h".
4910 (darwin_nat_target): New class.
4911 (darwin_complete_target): Delete.
4912 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4913 (darwin_target): New.
4914 (i386_darwin_fetch_inferior_registers)
4915 (i386_darwin_store_inferior_registers): Refactor as methods of
4917 (darwin_complete_target): Delete, with ...
4918 (_initialize_i386_darwin_nat): ... bits factored out here.
4920 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4921 (the_alpha_linux_nat_target): New.
4922 (alpha_linux_register_u_offset): Refactor as
4923 alpha_linux_nat_target method.
4924 (_initialize_alpha_linux_nat): Adjust.
4925 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4926 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4927 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4928 methods of linux_nat_trad_target.
4929 (linux_trad_target): Delete.
4930 * linux-nat-trad.h (linux_trad_target): Delete function.
4931 (linux_nat_trad_target): New class.
4932 * mips-linux-nat.c (mips_linux_nat_target): New class.
4933 (super_fetch_registers, super_store_registers, super_close):
4935 (the_mips_linux_nat_target): New.
4936 (mips64_linux_regsets_fetch_registers)
4937 (mips64_linux_regsets_store_registers)
4938 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4939 (mips_linux_register_u_offset, mips_linux_read_description)
4940 (mips_linux_can_use_hw_breakpoint)
4941 (mips_linux_stopped_by_watchpoint)
4942 (mips_linux_stopped_data_address)
4943 (mips_linux_region_ok_for_hw_watchpoint)
4944 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4945 (mips_linux_close): Refactor as methods of mips_linux_nat.
4946 (_initialize_mips_linux_nat): Adjust to C++ification.
4948 * aix-thread.c (aix_thread_target): New class.
4949 (aix_thread_ops): Now an aix_thread_target.
4950 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4951 (aix_thread_fetch_registers, aix_thread_store_registers)
4952 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4953 (aix_thread_thread_alive, aix_thread_pid_to_str)
4954 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4955 Refactor as methods of aix_thread_target.
4956 (init_aix_thread_ops): Delete.
4957 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4958 and complete_target_initialization.
4959 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4960 (rs6000_nat_target): New class.
4961 (the_rs6000_nat_target): New.
4962 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4963 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4964 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4965 (super_create_inferior): Delete.
4966 (_initialize_rs6000_nat): Adjust to C++ification.
4968 * arm-linux-nat.c (arm_linux_nat_target): New class.
4969 (the_arm_linux_nat_target): New.
4970 (arm_linux_fetch_inferior_registers)
4971 (arm_linux_store_inferior_registers, arm_linux_read_description)
4972 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4973 (arm_linux_remove_hw_breakpoint)
4974 (arm_linux_region_ok_for_hw_watchpoint)
4975 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4976 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4977 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4978 arm_linux_nat_target.
4979 (_initialize_arm_linux_nat): Adjust to C++ification.
4981 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4982 (the_aarch64_linux_nat_target): New.
4983 (aarch64_linux_fetch_inferior_registers)
4984 (aarch64_linux_store_inferior_registers)
4985 (aarch64_linux_child_post_startup_inferior)
4986 (aarch64_linux_read_description)
4987 (aarch64_linux_can_use_hw_breakpoint)
4988 (aarch64_linux_insert_hw_breakpoint)
4989 (aarch64_linux_remove_hw_breakpoint)
4990 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4991 (aarch64_linux_region_ok_for_hw_watchpoint)
4992 (aarch64_linux_stopped_data_address)
4993 (aarch64_linux_stopped_by_watchpoint)
4994 (aarch64_linux_watchpoint_addr_within_range)
4995 (aarch64_linux_can_do_single_step): Refactor as methods of
4996 aarch64_linux_nat_target.
4997 (super_post_startup_inferior): Delete.
4998 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5000 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5001 (the_hppa_linux_nat_target): New.
5002 (hppa_linux_fetch_inferior_registers)
5003 (hppa_linux_store_inferior_registers): Refactor as methods of
5004 hppa_linux_nat_target.
5005 (_initialize_hppa_linux_nat): Adjust to C++ification.
5007 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5008 (the_ia64_linux_nat_target): New.
5009 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5010 (ia64_linux_stopped_data_address)
5011 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5012 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5013 ia64_linux_nat_target methods.
5014 (super_xfer_partial): Delete.
5015 (_initialize_ia64_linux_nat): Adjust to C++ification.
5017 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5018 (the_m32r_linux_nat_target): New.
5019 (m32r_linux_fetch_inferior_registers)
5020 (m32r_linux_store_inferior_registers): Refactor as
5021 m32r_linux_nat_target methods.
5022 (_initialize_m32r_linux_nat): Adjust to C++ification.
5024 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5025 (the_m68k_linux_nat_target): New.
5026 (m68k_linux_fetch_inferior_registers)
5027 (m68k_linux_store_inferior_registers): Refactor as
5028 m68k_linux_nat_target methods.
5029 (_initialize_m68k_linux_nat): Adjust to C++ification.
5031 * s390-linux-nat.c (s390_linux_nat_target): New class.
5032 (the_s390_linux_nat_target): New.
5033 (s390_linux_fetch_inferior_registers)
5034 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5035 (s390_insert_watchpoint, s390_remove_watchpoint)
5036 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5037 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5038 (s390_auxv_parse, s390_read_description): Refactor as methods of
5039 s390_linux_nat_target.
5040 (_initialize_s390_nat): Adjust to C++ification.
5042 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5043 (the_sparc_linux_nat_target): New.
5044 (_initialize_sparc_linux_nat): Adjust to C++ification.
5045 * sparc-nat.c (sparc_fetch_inferior_registers)
5046 (sparc_store_inferior_registers): Remove target_ops parameter.
5047 * sparc-nat.h (sparc_fetch_inferior_registers)
5048 (sparc_store_inferior_registers): Remove target_ops parameter.
5049 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5050 (the_sparc64_linux_nat_target): New.
5051 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5053 * spu-linux-nat.c (spu_linux_nat_target): New class.
5054 (the_spu_linux_nat_target): New.
5055 (spu_child_post_startup_inferior, spu_child_post_attach)
5056 (spu_child_wait, spu_fetch_inferior_registers)
5057 (spu_store_inferior_registers, spu_xfer_partial)
5058 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5060 (_initialize_spu_nat): Adjust to C++ification.
5062 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5063 (the_tilegx_linux_nat_target): New.
5064 (fetch_inferior_registers, store_inferior_registers):
5065 Refactor as methods.
5066 (_initialize_tile_linux_nat): Adjust to C++ification.
5068 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5069 (the_xtensa_linux_nat_target): New.
5070 (xtensa_linux_fetch_inferior_registers)
5071 (xtensa_linux_store_inferior_registers): Refactor as
5072 xtensa_linux_nat_target methods.
5073 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5075 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5076 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5077 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5078 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5079 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5080 (fbsd_stopped_by_sw_breakpoint)
5081 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5082 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5083 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5084 (fbsd_post_startup_inferior, fbsd_post_attach)
5085 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5086 (fbsd_set_syscall_catchpoint)
5087 (super_xfer_partial, super_resume, super_wait)
5088 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5089 (fbsd_handle_debug_trap): Remove target_ops parameter.
5090 (fbsd_nat_add_target): Delete.
5091 * fbsd-nat.h: Include "inf-ptrace.h".
5092 (fbsd_nat_add_target): Delete.
5093 (USE_SIGTRAP_SIGINFO): Define.
5094 (fbsd_nat_target): New class.
5096 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5097 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5098 (amd64bsd_target): Delete.
5099 * amd64-bsd-nat.h: New file.
5100 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5102 (amd64_fbsd_nat_target): New class.
5103 (the_amd64_fbsd_nat_target): New.
5104 (amd64fbsd_read_description): Refactor as method of
5105 amd64_fbsd_nat_target.
5106 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5107 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5108 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5109 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5110 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5111 (i386bsd_target): Delete.
5112 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5113 (i386bsd_fetch_inferior_registers)
5114 (i386bsd_store_inferior_registers): Declare.
5115 (i386_bsd_nat_target): New class.
5116 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5117 (the_i386_fbsd_nat_target): New.
5118 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5119 i386_fbsd_nat_target methods.
5120 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5121 (_initialize_i386fbsd_nat): Adjust to C++ification.
5122 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5123 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5124 (_initialize_x86_bsd_nat): Adjust to C++ification.
5125 * x86-bsd-nat.h: Include "x86-nat.h".
5126 (x86bsd_target): Delete declaration.
5127 (x86bsd_nat_target): New class.
5129 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5130 (the_aarch64_fbsd_nat_target): New.
5131 (aarch64_fbsd_fetch_inferior_registers)
5132 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5133 aarch64_fbsd_nat_target.
5134 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5135 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5136 (the_alpha_bsd_nat_target): New.
5137 (alphabsd_fetch_inferior_registers)
5138 (alphabsd_store_inferior_registers): Refactor as
5139 alpha_bsd_nat_target methods.
5140 (_initialize_alphabsd_nat): Refactor as methods of
5141 alpha_bsd_nat_target.
5142 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5143 (the_amd64_nbsd_nat_target): New.
5144 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5145 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5146 (the_amd64_obsd_nat_target): New.
5147 (_initialize_amd64obsd_nat): Adjust to C++ification.
5148 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5149 (the_arm_fbsd_nat_target): New.
5150 (arm_fbsd_fetch_inferior_registers)
5151 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5152 (_initialize_arm_fbsd_nat): Refactor as methods of
5153 arm_fbsd_nat_target.
5154 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5155 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5156 (the_arm_netbsd_nat_target): New.
5157 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5158 arm_netbsd_nat_target.
5159 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5160 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5161 (the_hppa_nbsd_nat_target): New.
5162 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5163 hppa_nbsd_nat_target methods.
5164 (_initialize_hppanbsd_nat): Adjust to C++ification.
5165 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5166 (the_hppa_obsd_nat_target): New.
5167 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5168 methods of hppa_obsd_nat_target.
5169 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5171 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5172 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5174 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5175 (_initialize_i386obsd_nat): Use add_target.
5176 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5177 (the_m68k_bsd_nat_target): New.
5178 (m68kbsd_fetch_inferior_registers)
5179 (m68kbsd_store_inferior_registers): Refactor as methods of
5180 m68k_bsd_nat_target.
5181 (_initialize_m68kbsd_nat): Adjust to C++ification.
5182 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5183 (the_mips_fbsd_nat_target): New.
5184 (mips_fbsd_fetch_inferior_registers)
5185 (mips_fbsd_store_inferior_registers): Refactor as methods of
5186 mips_fbsd_nat_target.
5187 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5189 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5190 (the_mips_nbsd_nat_target): New.
5191 (mipsnbsd_fetch_inferior_registers)
5192 (mipsnbsd_store_inferior_registers): Refactor as methods of
5193 mips_nbsd_nat_target.
5194 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5195 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5196 (the_mips64_obsd_nat_target): New.
5197 (mips64obsd_fetch_inferior_registers)
5198 (mips64obsd_store_inferior_registers): Refactor as methods of
5199 mips64_obsd_nat_target.
5200 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5202 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5204 * nbsd-nat.h: Include "inf-ptrace.h".
5205 (nbsd_nat_target): New class.
5206 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5207 (obsd_wait): Refactor as methods of obsd_nat_target.
5208 (obsd_add_target): Delete.
5209 * obsd-nat.h: Include "inf-ptrace.h".
5210 (obsd_nat_target): New class.
5211 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5212 (the_ppc_fbsd_nat_target): New.
5213 (ppcfbsd_fetch_inferior_registers)
5214 (ppcfbsd_store_inferior_registers): Refactor as methods of
5215 ppc_fbsd_nat_target.
5216 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5218 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5219 (the_ppc_nbsd_nat_target): New.
5220 (ppcnbsd_fetch_inferior_registers)
5221 (ppcnbsd_store_inferior_registers): Refactor as methods of
5222 ppc_nbsd_nat_target.
5223 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5224 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5225 (the_ppc_obsd_nat_target): New.
5226 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5227 methods of ppc_obsd_nat_target.
5228 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5230 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5231 (the_sh_nbsd_nat_target): New.
5232 (shnbsd_fetch_inferior_registers)
5233 (shnbsd_store_inferior_registers): Refactor as methods of
5235 (_initialize_shnbsd_nat): Adjust to C++ification.
5236 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5237 (inf_ptrace_xfer_partial): Delete.
5238 (sparc_xfer_partial, sparc_target): Delete.
5239 * sparc-nat.h (sparc_fetch_inferior_registers)
5240 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5241 (sparc_target): Delete function declaration.
5242 (sparc_target): New template class.
5243 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5244 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5245 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5246 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5248 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5249 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5250 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5251 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5253 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5254 (the_vax_bsd_nat_target): New.
5255 (vaxbsd_fetch_inferior_registers)
5256 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5258 (_initialize_vaxbsd_nat): Adjust to C++ification.
5260 * bsd-kvm.c (bsd_kvm_target): New class.
5261 (bsd_kvm_ops): Now a bsd_kvm_target.
5262 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5263 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5264 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5266 (bsd_kvm_return_one): Delete.
5267 (bsd_kvm_add_target): Adjust to C++ification.
5269 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5270 (nto_procfs_target_procfs): New classes.
5271 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5272 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5273 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5274 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5275 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5276 (procfs_remove_hw_breakpoint, procfs_resume)
5277 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5278 (procfs_kill_inferior, procfs_store_registers)
5279 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5280 as methods of nto_procfs_target.
5281 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5282 (nto_native_ops): Delete.
5283 (procfs_open, procfs_native_open): Delete.
5284 (nto_native_ops): Now an nto_procfs_target_native.
5285 (init_procfs_targets): Adjust to C++ification.
5286 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5287 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5288 Refactor as methods of nto_procfs_target.
5290 * go32-nat.c (go32_nat_target): New class.
5291 (the_go32_nat_target): New.
5292 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5293 (go32_store_registers, go32_xfer_partial, go32_files_info)
5294 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5295 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5296 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5297 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5298 (go32_target): Delete.
5299 (_initialize_go32_nat): Adjust to C++ification.
5301 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5302 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5303 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5304 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5306 (gnu_target): Delete.
5307 * gnu-nat.h (gnu_target): Delete.
5308 (gnu_nat_target): New class.
5309 * i386-gnu-nat.c (gnu_base_target): New.
5310 (i386_gnu_nat_target): New class.
5311 (the_i386_gnu_nat_target): New.
5312 (_initialize_i386gnu_nat): Adjust to C++ification.
5314 2018-05-02 Pedro Alves <palves@redhat.com>
5316 * bfd-target.c (target_bfd_xclose): Rename to ...
5317 (target_bfd_close): ... this.
5318 (target_bfd_reopen): Adjust.
5319 * target.c (target_close): Remove references to to_xclose.
5320 * target.h (target_ops::to_xclose): Delete.
5321 (target_ops::to_close): Update comments.
5323 2018-05-02 Pedro Alves <palves@redhat.com>
5325 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5327 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5328 * inf-ptrace.c (inf_ptrace_register_u_offset)
5329 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5330 (inf_ptrace_store_register, inf_ptrace_store_registers)
5331 (inf_ptrace_trad_target): Move to ...
5332 * linux-nat-trad.c: ... this new file.
5333 * linux-nat-trad.h: New file.
5334 * linux-nat.c (linux_target_install_ops): Make extern.
5335 (linux_trad_target): Delete.
5336 * linux-nat.h (linux_trad_target): Delete declaration.
5337 (linux_target_install_ops): Declare.
5338 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5341 2018-05-02 Pedro Alves <palves@redhat.com>
5343 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5344 procfs_target/add_target here.
5345 * procfs.c (procfs_target): Make static.
5346 (_initialize_procfs): Call add_target here.
5347 * procfs.h (struct target_ops): Remove forward declaration.
5348 (procfs_target): Remove declaration.
5349 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5351 2018-05-02 Pedro Alves <palves@redhat.com>
5353 * procfs.c (procfs_stopped_by_watchpoint)
5354 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5355 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5357 (procfs_use_watchpoints): Delete, move contents...
5358 (procfs_target): ... here.
5359 * procfs.h (procfs_use_watchpoints): Delete declaration.
5360 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5361 procfs_use_watchpoints.
5362 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5363 procfs_use_watchpoints.
5365 2018-05-02 Tom Tromey <tom@tromey.com>
5368 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5369 and var_zuinteger_unlimited.
5370 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5371 and PARAM_ZUINTEGER_UNLIMITED.
5372 (set_parameter_value): Handle var_zuinteger and
5373 var_zuinteger_unlimited.
5374 (add_setshow_generic): Likewise.
5375 (parmpy_init): Likewise.
5377 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5380 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5381 pointer is not null before dereferencing it.
5383 2018-04-30 Tom Tromey <tom@tromey.com>
5385 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5388 2018-04-30 Tom Tromey <tom@tromey.com>
5390 * breakpoint.c (mention): Remove use of is_mi_like_p.
5391 (print_mention_ranged_breakpoint): Likewise.
5392 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5395 2018-04-30 Tom Tromey <tom@tromey.com>
5397 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5399 2018-04-30 Tom Tromey <tom@tromey.com>
5401 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5402 (info_spu_event_command): Remove some uses of is_mi_like_p.
5404 2018-04-30 Tom Tromey <tom@tromey.com>
5406 * python/py-framefilter.c (py_print_single_arg)
5407 (enumerate_locals, py_print_args, py_print_frame): Remove some
5408 uses of is_mi_like_p.
5410 2018-04-30 Tom Tromey <tom@tromey.com>
5413 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5414 * ui-out.h (ui_out::is_mi_like_p): Now const.
5415 (ui_out::do_is_mi_like_p): Now const.
5416 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5418 2018-04-30 Tom Tromey <tom@tromey.com>
5420 * varobj.c (varobj_set_visualizer): Use new_reference.
5421 * python/python.c (gdbpy_decode_line): Use new_reference.
5422 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5425 2018-04-30 Tom Tromey <tom@tromey.com>
5427 * varobj.c (install_new_value): Use new_reference.
5428 * value.h (value_incref): Return void. Swap intro comment with
5430 * value.c (set_value_parent): Use new_reference.
5431 (value_incref): Return void. Update intro comment.
5432 (release_value): Use new_reference.
5433 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5435 2018-04-30 Tom Tromey <tom@tromey.com>
5437 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5438 * gdb_bfd.h (new_bfd_ref): Remove.
5439 (gdb_bfd_open): Update comment.
5440 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5441 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5442 (gdb_bfd_fdopenr): Use new_reference.
5443 * exec.c (exec_file_attach): Use new_reference.
5445 2018-04-30 Tom Tromey <tom@tromey.com>
5447 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5450 2018-04-30 Tom Tromey <tom@tromey.com>
5452 * jit.c (jit_read_code_entry): Use type_align.
5453 * i386-tdep.c (i386_gdbarch_init): Don't call
5454 set_gdbarch_long_long_align_bit.
5455 * gdbarch.sh: Remove long_long_align_bit.
5456 * gdbarch.c, gdbarch.h: Rebuild.
5457 * arc-tdep.c (arc_type_align): New function.
5458 (arc_gdbarch_init): Use arc_type_align. Don't call
5459 set_gdbarch_long_long_align_bit.
5461 2018-04-30 Tom Tromey <tom@tromey.com>
5463 * rust-lang.c (rust_type_alignment): Remove.
5464 (rust_composite_type): Use type_align.
5466 2018-04-30 Tom Tromey <tom@tromey.com>
5468 * NEWS: Mention Type.align.
5469 * python/py-type.c (typy_get_alignof): New function.
5470 (type_object_getset): Add "alignof".
5472 2018-04-30 Tom Tromey <tom@tromey.com>
5476 * std-operator.def (UNOP_ALIGNOF): New operator.
5477 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5479 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5480 * c-lang.c (c_op_print_tab): Add alignof.
5481 * c-exp.y (ALIGNOF): New token.
5482 (exp): Add "ALIGNOF" production.
5483 (ident_tokens): Add _Alignof and alignof.
5485 2018-04-30 Tom Tromey <tom@tromey.com>
5487 * i386-tdep.c (i386_type_align): New function.
5488 (i386_gdbarch_init): Update.
5489 * gdbarch.sh (type_align): New method.
5490 * gdbarch.c, gdbarch.h: Rebuild.
5491 * arch-utils.h (default_type_align): Declare.
5492 * arch-utils.c (default_type_align): New function.
5493 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5494 (struct type) <align_log2>: New field.
5495 <instance_flags>: Now a bitfield.
5496 (TYPE_RAW_ALIGN): New macro.
5497 (type_align, type_raw_align, set_type_align): Declare.
5498 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5500 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5501 (get_alignment, maybe_set_alignment): New functions.
5502 (read_structure_type, read_enumeration_type, read_array_type)
5503 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5504 (read_subrange_type, read_base_type): Set type alignment.
5506 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5508 * dwarf2read.c (read_index_from_section): Use bool.
5510 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5513 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5516 2018-04-29 John Reiser <jreiser@BitWagon.com>
5519 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5520 last step, and do it atomically.
5522 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5524 * compile/compile-c-types.c (convert_int, convert_float):
5527 2018-04-27 Tom Tromey <tom@tromey.com>
5530 * rust-lang.c (rust_inclusive_range_type_p): New function.
5531 (rust_range): Handle inclusive ranges.
5532 (rust_compute_range): Likewise.
5533 * rust-exp.y (struct rust_op) <inclusive>: New field.
5534 (DOTDOTEQ): New constant.
5535 (range_expr): Add "..=" productions.
5536 (operator_tokens): Add "..=" token.
5537 (ast_range): Add "inclusive" parameter.
5538 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5540 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5542 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5543 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5545 * expprint.c (print_subexp_standard): Handle new bounds values.
5546 (dump_subexp_body_standard): Likewise.
5548 2018-04-27 Tom Tromey <tom@tromey.com>
5550 * configure: Rebuild.
5551 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5552 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5554 (class symbol_needs_eval_context): Likewise.
5555 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5556 (mock_mapped_index::symbol_name_at): Use "override". Remove
5558 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5560 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5561 * aarch64-tdep.c (instruction_reader::read): Use "override".
5562 (instruction_reader_test::read): Likewise.
5563 * arm-tdep.c (instruction_reader::read): Use "override".
5564 (instruction_reader_thumb::read): Likewise.
5566 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5569 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5570 instead of remote_send.
5571 (remote_send): Remove.
5573 2018-04-26 Pedro Alves <palves@redhat.com>
5575 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5576 find_function_start_sal instead of find_pc_line.
5578 2018-04-26 Pedro Alves <palves@redhat.com>
5580 * breakpoint.c (set_breakpoint_location_function): Handle
5582 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5583 * elfread.c (elf_symtab_read): Give data symbols with
5584 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5585 (elf_rel_plt_read): Update comment.
5586 * linespec.c (convert_linespec_to_sals): Handle
5588 (minsym_found): Handle mst_data_gnu_ifunc.
5589 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5590 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5591 * parse.c (find_minsym_type_and_address): Handle
5593 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5594 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5595 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5597 <mst_data_gnu_ifunc>: New enumerator.
5599 2018-04-26 Pedro Alves <palves@redhat.com>
5601 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5602 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5603 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5605 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5606 (lookup_minimal_symbol_by_pc): Adjust.
5607 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5608 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5609 * minsyms.h (lookup_msym_prefer): New enum.
5610 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5611 parameter by a lookup_msym_prefer parameter.
5613 2018-04-26 Pedro Alves <palves@redhat.com>
5615 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5616 ends in "@plt" instead of looking at the symbol's section.
5618 2018-04-26 Pedro Alves <palves@redhat.com>
5620 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5622 (find_pc_partial_function_gnu_ifunc): Rename to ...
5623 (find_pc_partial_function): ... this, and remove references to
5625 (find_pc_partial_function): Delete old implementation.
5626 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5628 2018-04-26 Pedro Alves <palves@redhat.com>
5630 * linespec.c (struct bound_minimal_symbol_search_key): New.
5631 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5632 skip first line if we found a GNU ifunc minimal symbol by name.
5633 (compare_msymbols): Change parameters to work with a destructured
5635 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5638 2018-04-26 Pedro Alves <palves@redhat.com>
5640 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5641 ifunc targets here. Instead, if we have an ifunc minsym, use its
5643 (add_location_to_breakpoint): Store the minsym and the objfile in
5644 the breakpoint location.
5645 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5646 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5647 Record the minsym in the sal.
5648 * symtab.h (symtab_and_line) <msymbol>: New field.
5650 2018-04-26 Pedro Alves <palves@redhat.com>
5652 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5653 unless we actually resolved the ifunc.
5655 2018-04-26 Pedro Alves <palves@redhat.com>
5657 * c-exp.y (variable production): Prefer ifunc minsyms over
5658 regular function symbols.
5659 * symtab.c (find_gnu_ifunc): New function.
5660 * minsyms.h (lookup_msym_prefer): New enum.
5661 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5662 parameter by a lookup_msym_prefer parameter.
5663 * symtab.h (find_gnu_ifunc): New declaration.
5665 2018-04-26 Pedro Alves <palves@redhat.com>
5667 * blockframe.c (find_gnu_ifunc_target_type): New function.
5668 (find_function_type): New.
5669 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5670 return a value with a memory address.
5671 (eval_call): For calls to GNU ifunc functions, try to find the
5672 type of the target function from the type that the resolver
5674 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5676 * infcall.c (find_function_return_type): Delete.
5677 (find_function_addr): Add 'function_type' parameter. For calls to
5678 GNU ifunc functions, try to find the type of the target function
5679 from the type that the resolver returns, and return it via
5681 (call_function_by_hand_dummy): Adjust to use the function type
5682 returned by find_function_addr.
5683 (find_function_addr): Add 'function_type' parameter and move
5685 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5688 2018-04-26 Pedro Alves <palves@redhat.com>
5690 * c-exp.y (variable production): Skip finding an alias for ifunc
5693 2018-04-26 Pedro Alves <palves@redhat.com>
5695 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5697 2018-04-25 Pedro Alves <palves@redhat.com>
5699 * infcmd.c (kill_command): Print the pid as string, not the whole
5700 thread's ptid. Add comment. s/has been killed/killed/ in output
5702 * remote.c (remote_detach_1): Print the pid as string, not the
5703 whole thread's ptid.
5705 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5706 Sergio Durigan Junior <sergiodj@redhat.com>
5707 Pedro Alves <palves@redhat.com>
5709 * infcmd.c (kill_command): Print message when inferior has
5711 * inferior.c (print_inferior_events): Remove 'static'. Set as
5713 (add_inferior): Improve message printed when
5714 'print_inferior_events' is on.
5715 (exit_inferior): Remove message printed when
5716 'print_inferior_events' is on.
5717 (detach_inferior): Improve message printed when
5718 'print_inferior_events' is on.
5719 (initialize_inferiors): Use 'add_inferior_silent' to set
5720 'current_inferior_'.
5721 * inferior.h (print_inferior_events): Declare here as
5723 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5724 '[Detaching...]' messages when 'print_inferior_events' is on.
5725 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5726 as prefix/suffix for messages. Remove periods. Fix erroneous
5727 'Detaching after fork from child...', replace it by '... from
5729 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5730 prefix/suffix when printing 'Detaching...' messages. Print
5731 them when 'print_inferior_events' is on.
5732 * remote.c (remote_detach_1): Print message when detaching
5733 from inferior and '!is_fork_parent'.
5735 2018-04-24 Tom Tromey <tom@tromey.com>
5737 * cli-out.h: Reindent.
5739 2018-04-24 Tom Tromey <tom@tromey.com>
5741 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5742 (cli_ui_out::do_field_string): Use fputs_filtered.
5743 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5745 2018-04-23 Tom Tromey <tom@tromey.com>
5747 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5748 gdb::unique_xmalloc_ptr.
5750 2018-04-23 Tom Tromey <tom@tromey.com>
5752 * configure: Rebuild.
5754 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5757 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5758 prepare_for_testing. Set normal_bp to r_debug_state if target
5761 2018-04-21 Pedro Alves <palves@redhat.com>
5762 Rajendra SY <rajendra.sy@gmail.com>
5764 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5765 * remote.c (extended_remote_attach): In all-stop mode, mark the
5766 thread as executing.
5768 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5770 * thread.c (thread_apply_all_command): Fix comment.
5771 (thread_command): Fix comment.
5773 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5775 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5777 * features/aarch64-core.c (create_feature_aarch64_core):
5779 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5781 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5783 * features/i386/32bit-avx512.c
5784 (create_feature_i386_32bit_avx512): Likewise.
5785 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5787 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5789 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5791 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5793 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5795 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5797 * features/i386/64bit-avx512.c
5798 (create_feature_i386_64bit_avx512): Likewise.
5799 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5801 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5803 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5805 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5807 * features/i386/64bit-segments.c
5808 (create_feature_i386_64bit_segments): Likewise.
5809 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5811 * features/i386/x32-core.c
5812 (create_feature_i386_x32_core): Likewise.
5813 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5814 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5815 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5816 * target-descriptions.c: In generated code, don't pass xml
5819 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5821 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5822 (print_xml_feature::visit_post): Likewise.
5823 (print_xml_feature::visit): Likewise.
5824 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5825 (print_xml_feature): Add new class.
5826 * regformats/regdat.sh: Null xmltarget on feature targets.
5827 * target-descriptions.c (struct target_desc): Add xmltarget.
5828 (maintenance_check_tdesc_xml_convert): Add unittest function.
5829 (tdesc_get_features_xml): Add function to get xml.
5830 (maintenance_check_xml_descriptions): Test xml generation.
5831 * xml-tdesc.c (string_read_description_xml): Add function.
5832 * xml-tdesc.h (string_read_description_xml): Add declaration.
5834 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5836 * features/Makefile: Add feature marker to targets with new style
5837 target descriptions.
5838 * regformats/aarch64.dat: Regenerate.
5839 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5840 * regformats/i386/amd64-avx-linux.dat: Likewise.
5841 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5842 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5843 * regformats/i386/amd64-linux.dat: Likewise.
5844 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5845 * regformats/i386/amd64.dat: Likewise.
5846 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5847 * regformats/i386/i386-avx-linux.dat: Likewise.
5848 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5849 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5850 * regformats/i386/i386-linux.dat: Likewise.
5851 * regformats/i386/i386-mmx-linux.dat: Likewise.
5852 * regformats/i386/i386-mpx-linux.dat: Likewise.
5853 * regformats/i386/i386.dat: Likewise.
5854 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5855 * regformats/i386/x32-avx-linux.dat: Likewise.
5856 * regformats/i386/x32-linux.dat: Likewise.
5857 * regformats/tic6x-c62x-linux.dat: Likewise.
5858 * regformats/tic6x-c64x-linux.dat: Likewise.
5859 * regformats/tic6x-c64xp-linux.dat: Likewise.
5860 * regformats/regdat.sh: Parse feature marker.
5862 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5864 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5865 (tdesc_osabi_name): Likewise.
5866 * target-descriptions.c (tdesc_architecture_name): Add new
5868 (tdesc_osabi_name): Likewise.
5870 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5872 * common/tdesc.c (tdesc_predefined_type): Move to here.
5873 (tdesc_named_type): Likewise.
5874 (tdesc_create_vector): Likewise.
5875 (tdesc_create_struct): Likewise.
5876 (tdesc_set_struct_size): Likewise.
5877 (tdesc_create_union): Likewise.
5878 (tdesc_create_flags): Likewise.
5879 (tdesc_create_enum): Likewise.
5880 (tdesc_add_field): Likewise.
5881 (tdesc_add_typed_bitfield): Likewise.
5882 (tdesc_add_bitfield): Likewise.
5883 (tdesc_add_flag): Likewise.
5884 (tdesc_add_enum_value): Likewise.
5885 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5886 (struct tdesc_type_vector): Likewise.
5887 (struct tdesc_type_field): Likewise.
5888 (struct tdesc_type_with_fields): Likewise.
5889 (tdesc_create_enum): Add declaration.
5890 (tdesc_add_typed_bitfield): Likewise.
5891 (tdesc_add_enum_value): Likewise.
5892 * target-descriptions.c (tdesc_type_field): Move from here.
5893 (tdesc_type_builtin): Likewise.
5894 (tdesc_type_vector): Likewise.
5895 (tdesc_type_with_fields): Likewise.
5896 (tdesc_predefined_types): Likewise.
5897 (tdesc_named_type): Likewise.
5898 (tdesc_create_vector): Likewise.
5899 (tdesc_create_struct): Likewise.
5900 (tdesc_set_struct_size): Likewise.
5901 (tdesc_create_union): Likewise.
5902 (tdesc_create_flags): Likewise.
5903 (tdesc_create_enum): Likewise.
5904 (tdesc_add_field): Likewise.
5905 (tdesc_add_typed_bitfield): Likewise.
5906 (tdesc_add_bitfield): Likewise.
5907 (tdesc_add_flag): Likewise.
5908 (tdesc_add_enum_value): Likewise.
5909 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5910 (tdesc_add_typed_bitfield): Likewise.
5911 (tdesc_add_enum_value): Likewise.
5913 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5915 * common/tdesc.c (tdesc_feature::accept): Move to here.
5916 (tdesc_feature::operator==): Likewise.
5917 (tdesc_create_reg): Likewise.
5918 * common/tdesc.h (tdesc_type_kind): Likewise.
5919 (struct tdesc_type): Likewise.
5920 (struct tdesc_feature): Likewise.
5921 * regformats/regdat.sh: Create a feature.
5922 * target-descriptions.c (tdesc_type_kind): Move from here.
5923 (tdesc_type): Likewise.
5924 (tdesc_type_up): Likewise.
5925 (tdesc_feature): Likewise.
5926 (tdesc_create_reg): Likewise.
5928 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5930 * Makefile.in: Add arch/tdesc.c
5931 * common/tdesc.c: New file.
5932 * common/tdesc.h (tdesc_element_visitor): Move to here.
5933 (tdesc_element): Likewise.
5934 (tdesc_reg): Likewise.
5935 (tdesc_reg_up): Likewise.
5936 * regformats/regdef.h (reg): Add offset to constructors.
5937 * target-descriptions.c (tdesc_element_visitor): Move from here.
5938 (tdesc_element): Likewise.
5939 (tdesc_reg): Likewise.
5940 (tdesc_reg_up): Likewise.
5942 2018-04-17 Tom Tromey <tom@tromey.com>
5944 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5947 2018-04-17 Tom Tromey <tom@tromey.com>
5949 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5951 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5953 * symtab.c (print_symbol_info): Skip printing filename and line
5954 number when `last' is NULL.
5955 (symtab_symbol_info): Use empty string instead of NULL for first
5956 invocation of print_symbol_info.
5957 (rbreak_command): Pass NULL to `last' parameter of
5960 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5962 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5965 2018-04-16 Pedro Alves <palves@redhat.com>
5967 * MAINTAINERS (sh): Remove.
5968 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5969 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5970 (ALLDEPFILES): Remove sh64-tdep.c.
5971 * NEWS: Mentions that support for SH-5/SH64 is removed.
5972 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5973 (sh*-*-openbsd*): Ditto.
5974 (sh64-*-elf*): Remove.
5976 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5977 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5978 * sh-tdep.c: No longer include "sh64-tdep.h".
5979 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5980 * sh64-tdep.c, sh64-tdep.h: Remove files.
5982 2018-04-16 Pedro Alves <palves@redhat.com>
5984 * MAINTAINERS: Remove m88k.
5985 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5986 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5987 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5988 * NEWS: Mention that support for m88k was removed.
5989 * configure.host (m88*-*-*): Remove support.
5990 * configure.nat (m88k-*-*): Remove support.
5991 * configure.tgt (m88*-*-openbsd*): Remove.
5992 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5994 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5996 * configure.tgt (x86_tobjs): New variable.
5997 (amd64_tobjs, i386_tobjs): Use it.
5999 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6001 * symtab.c (print_symbol_info): Precede the symbol definition by
6002 the line number when available.
6003 * NEWS: Advertise this enhancement.
6005 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6007 * NEWS (New options): announce set/show record btrace cpu.
6008 * btrace.c: Include record-btrace.h.
6009 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6010 the vendor is unknown.
6011 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6012 Maybe overwrite the btrace configuration's cpu.
6013 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6014 (btrace_fetch): Add cpu parameter. Update callers.
6015 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6016 Maybe overwrite the btrace configuration's cpu. Skip enabling
6017 errata workarounds if the vendor is unknown.
6018 * python/py-record-btrace.c: Include record-btrace.h.
6019 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6020 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6021 * record-btrace.c (record_btrace_cpu_state_kind): New.
6022 (record_btrace_cpu): New.
6023 (set_record_btrace_cpu_cmdlist): New.
6024 (record_btrace_get_cpu): New.
6025 (require_btrace_thread, record_btrace_info)
6026 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6027 (cmd_set_record_btrace_cpu_none): New.
6028 (cmd_set_record_btrace_cpu_auto): New.
6029 (cmd_set_record_btrace_cpu): New.
6030 (cmd_show_record_btrace_cpu): New.
6031 (_initialize_record_btrace): Initialize set/show record btrace cpu
6033 * record-btrace.h (record_btrace_get_cpu): New.
6035 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6037 * record.c (set_record_command): Fix typo in message.
6039 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6041 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6043 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6045 * infrun.c (process_event_stop_test): Call
6046 gdbarch_in_indirect_branch_thunk.
6047 * gdbarch.sh (in_indirect_branch_thunk): New.
6048 * gdbarch.c: Regenerated.
6049 * gdbarch.h: Regenerated.
6052 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6053 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6054 (ALLDEPFILES): Add x86-tdep.c.
6055 * arch-utils.h (default_in_indirect_branch_thunk): New.
6056 * arch-utils.c (default_in_indirect_branch_thunk): New.
6057 * i386-tdep: Include x86-tdep.h.
6058 (i386_in_indirect_branch_thunk): New.
6059 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6061 * amd64-tdep: Include x86-tdep.h.
6062 (amd64_in_indirect_branch_thunk): New.
6063 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6065 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6068 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6069 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6070 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6073 2018-04-12 Tom Tromey <tom@tromey.com>
6075 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6076 (rust_evaluate_subexp): Likewise.
6078 2018-04-12 Pedro Alves <palves@redhat.com>
6080 * procfs.c (procfs_detach): Make forward declaration's prototype
6081 match definition's protototype.
6082 (proc_get_LDT_entry): Remove stale do_cleanups call.
6084 2018-04-12 Pedro Alves <palves@redhat.com>
6086 * target.h (target_ops::to_has_exited): Delete.
6087 (target_has_exited): Delete.
6088 * target-delegates.c: Regenerate.
6090 2018-04-11 Pedro Alves <palves@redhat.com>
6092 * target.c (fileio_fh_t::t): Add comment.
6093 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6094 (target_fileio_close): Handle a NULL target.
6095 (invalidate_fileio_fh): New.
6096 (target_close): Call it.
6097 * remote.c (remote_hostio_send_command): No longer check whether
6098 remote_desc is open.
6100 2018-04-11 Pedro Alves <palves@redhat.com>
6102 * target.c (fileio_fh_t): Make it a named struct instead of a
6104 (fileio_fh_t::is_closed): New method.
6105 (DEF_VEC_O (fileio_fh_t)): Remove.
6106 (fileio_fhandles): Now a std::vector.
6107 (is_closed_fileio_fh): Delete.
6108 (acquire_fileio_fd): Adjust. Rename parameters.
6109 (release_fileio_fd): Adjust.
6110 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6111 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6112 (target_fileio_close): Adjust.
6114 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6116 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6119 2018-04-10 Pedro Alves <palves@redhat.com>
6121 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6122 (scoped_finish_thread_state): New class.
6123 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6125 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6126 (fetch_inferior_event, normal_stop): Likewise.
6127 * thread.c (finish_thread_state_cleanup): Delete.
6129 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6130 Pedro Alves <palves@redhat.com>
6132 * value.c: Include "selftest.h" and "common/array-view.h".
6133 (struct range) <operator ==>: New.
6134 (test_ranges_contain): New.
6135 (check_ranges_vector): New.
6136 (test_insert_into_bit_range_vector): New.
6137 (_initialize_values): Register selftests.
6138 * common/array-view.h (operator==, operator!=): New.
6140 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6142 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6144 * inline-frame.c: Include <algorithm>.
6145 (struct inline_state): Add constructor.
6146 (inline_state_s): Remove.
6147 (DEF_VEC_O(inline_state_s)): Remove.
6148 (inline_states): Change type to std::vector.
6149 (find_inline_frame_state): Adjust to std::vector.
6150 (allocate_inline_frame_state): Remove.
6151 (clear_inline_frame_state): Adjust to std::vector.
6152 (skip_inline_frames): Adjust to std::vector.
6154 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6156 * tracepoint.h (struct trace_state_variable): Add constructor.
6157 <name>: Change type to std::string.
6158 * tracepoint.c (tsv_s): Remove.
6159 (DEF_VEC_O(tsv_s)): Remove.
6160 (tvariables): Change to std::vector.
6161 (create_trace_state_variable): Adjust to std::vector.
6162 (find_trace_state_variable): Likewise.
6163 (find_trace_state_variable_by_number): Likewise.
6164 (delete_trace_state_variable): Likewise.
6165 (trace_variable_command): Adjust to std::string.
6166 (delete_trace_variable_command): Likewise.
6167 (tvariables_info_1): Adjust to std::vector.
6168 (save_trace_state_variables): Likewise.
6169 (start_tracing): Likewise.
6170 (merge_uploaded_trace_state_variables): Adjust to std::vector
6172 * target.h (struct target_ops)
6173 <to_download_trace_state_variable>: Pass reference to
6174 trace_state_variable.
6175 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6176 * target-delegates.c: Re-generate.
6177 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6178 (mi_tsv_deleted): Likewise.
6179 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6180 * remote.c (remote_download_trace_state_variable): Change
6181 pointer to reference and adjust.
6182 * make-target-delegates (parse_argtypes): Handle references.
6183 (write_function_header): Likewise.
6184 (munge_type): Likewise.
6186 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6188 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6189 string_view-selftests.c.
6190 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6192 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6193 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6194 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6195 * unittests/basic_string_view/element_access/char/1.cc:
6197 * unittests/basic_string_view/element_access/char/empty.cc:
6199 * unittests/basic_string_view/element_access/char/front_back.cc:
6201 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6202 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6204 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6206 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6208 * unittests/basic_string_view/operations/compare/char/1.cc:
6210 * unittests/basic_string_view/operations/compare/char/13650.cc:
6212 * unittests/basic_string_view/operations/copy/char/1.cc:
6214 * unittests/basic_string_view/operations/data/char/1.cc:
6216 * unittests/basic_string_view/operations/find/char/1.cc:
6218 * unittests/basic_string_view/operations/find/char/2.cc:
6220 * unittests/basic_string_view/operations/find/char/3.cc:
6222 * unittests/basic_string_view/operations/find/char/4.cc:
6224 * unittests/basic_string_view/operations/rfind/char/1.cc:
6226 * unittests/basic_string_view/operations/rfind/char/2.cc:
6228 * unittests/basic_string_view/operations/rfind/char/3.cc:
6230 * unittests/basic_string_view/operations/substr/char/1.cc:
6232 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6233 * unittests/string_view-selftests.c: New file.
6235 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6237 * unittests/basic_string_view/capacity/1.cc: New file.
6238 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6239 * unittests/basic_string_view/cons/char/1.cc: New file.
6240 * unittests/basic_string_view/cons/char/2.cc: New file.
6241 * unittests/basic_string_view/cons/char/3.cc: New file.
6242 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6243 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6244 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6245 * unittests/basic_string_view/element_access/char/1.cc: New file.
6246 * unittests/basic_string_view/element_access/char/2.cc: New file.
6247 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6248 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6249 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6250 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6251 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6252 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6253 * unittests/basic_string_view/include.cc: New file.
6254 * unittests/basic_string_view/inserters/char/1.cc: New file.
6255 * unittests/basic_string_view/inserters/char/2.cc: New file.
6256 * unittests/basic_string_view/inserters/char/3.cc: New file.
6257 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6258 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6259 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6260 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6261 * unittests/basic_string_view/literals/types.cc: New file.
6262 * unittests/basic_string_view/literals/values.cc: New file.
6263 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6264 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6265 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6266 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6267 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6268 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6269 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6270 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6271 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6272 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6273 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6274 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6275 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6276 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6277 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6278 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6279 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6280 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6281 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6282 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6283 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6284 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6285 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6286 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6287 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6288 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6289 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6290 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6291 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6292 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6293 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6294 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6295 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6296 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6297 * unittests/basic_string_view/operators/char/2.cc: New file.
6298 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6299 * unittests/basic_string_view/range_access/char/1.cc: New file.
6300 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6301 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6302 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6303 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6304 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6305 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6306 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6307 * unittests/basic_string_view/typedefs.cc: New file.
6308 * unittests/basic_string_view/types/1.cc: New file.
6310 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6312 * common/gdb_string_view.h: Remove libstdc++ implementation
6313 details, adjust to gdb reality.
6314 * common/gdb_string_view.tcc: Likewise.
6315 * cli/cli-script.c (struct string_view): Remove.
6316 (user_args) <m_args>: Change element type to gdb::string_view.
6317 (user_args::insert_args): Adjust.
6319 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6321 * common/gdb_string_view.h: New file.
6322 * common/gdb_string_view.tcc: New file.
6324 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6326 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6327 * configure: Re-generate.
6329 2018-04-09 Pedro Alves <palves@redhat.com>
6331 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6332 (set_target_gdbarch): Call
6333 gdb::observers::architecture_changed.notify instead of
6334 observer_notify_architecture_changed.
6336 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6338 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6339 (do_restore_current_traceframe_cleanup): Remove.
6340 (restore_current_traceframe_cleanup_dtor): Remove.
6341 (make_cleanup_restore_current_traceframe): Remove.
6342 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6344 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6345 * infrun.c (fetch_inferior_event): Use
6346 scoped_restore_current_traceframe.
6348 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6350 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6352 <n_allocated_type_units>: Remove.
6353 <all_type_units>: Change to std::vector.
6354 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6355 to std::vector change.
6356 (dwarf2_per_objfile::get_cutu): Likewise.
6357 (dwarf2_per_objfile::get_tu): Likewise.
6358 (create_signatured_type_table_from_index): Likewise.
6359 (create_signatured_type_table_from_debug_names): Likewise.
6360 (dw2_symtab_iter_next): Likewise.
6361 (dw2_print_stats): Likewise.
6362 (dw2_expand_all_symtabs): Likewise.
6363 (dw2_expand_marked_cus): Likewise.
6364 (dw2_debug_names_iterator::next): Likewise.
6365 (dwarf2_initialize_objfile): Likewise.
6366 (add_signatured_type_cu_to_table): Likewise.
6367 (create_all_type_units): Likewise.
6368 (add_type_unit): Likewise.
6369 (struct tu_abbrev_offset): Add constructor.
6370 (build_type_psymtabs_1): Adjust to std::vector change.
6371 (print_tu_stats): Likewise.
6372 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6373 (write_debug_names): Likewise.
6375 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6377 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6378 Make an std::vector.
6379 <n_comp_units>: Remove.
6380 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6381 to std::vector change.
6382 (dwarf2_per_objfile::get_cutu): Likewise.
6383 (dwarf2_per_objfile::get_cu): Likewise.
6384 (create_cus_from_index): Likewise.
6385 (create_addrmap_from_index): Likewise.
6386 (create_addrmap_from_aranges): Likewise.
6387 (dwarf2_read_index): Likewise.
6388 (dw2_find_last_source_symtab): Likewise.
6389 (dw2_map_symtabs_matching_filename): Likewise.
6390 (dw2_symtab_iter_next): Likewise.
6391 (dw2_print_stats): Likewise.
6392 (dw2_expand_all_symtabs): Likewise.
6393 (dw2_expand_symtabs_with_fullname): Likewise.
6394 (dw2_expand_marked_cus): Likewise.
6395 (dw2_map_symbol_filenames): Likewise.
6396 (create_cus_from_debug_names): Likewise.
6397 (dwarf2_read_debug_names): Likewise.
6398 (dw2_debug_names_iterator::next): Likewise.
6399 (dwarf2_initialize_objfile): Likewise.
6400 (set_partial_user): Likewise.
6401 (dwarf2_build_psymtabs_hard): Likewise.
6402 (read_comp_units_from_section): Remove arguments, adjust to
6404 (create_all_comp_units): Adjust to std::vector and
6405 read_comp_units_from_section changes.
6406 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6408 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6409 (psyms_seen_size): Likewise.
6410 (write_gdbindex): Likewise.
6411 (write_debug_names): Likewise.
6413 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6415 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6416 with dwarf2_per_objfile.
6417 (create_cus_from_index): Likewise.
6418 (create_signatured_type_table_from_index): Likewise.
6419 (dwarf2_read_index): Likewise.
6420 (dwarf2_initialize_objfile): Likewise.
6421 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6422 per_cu rather than get_dwarf2_per_objfile.
6424 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6426 * dwarf2read.h (struct signatured_type): Forward declare.
6427 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6429 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6430 (dw2_get_cutu): ...this.
6431 (dwarf2_per_objfile::get_cu): Rename from...
6432 (dw2_get_cu): ...this.
6433 (dwarf2_per_objfile::get_tu): New.
6434 (create_addrmap_from_index): Adjust.
6435 (create_addrmap_from_aranges): Adjust.
6436 (dw2_find_last_source_symtab): Adjust.
6437 (dw2_map_symtabs_matching_filename): Adjust.
6438 (dw2_symtab_iter_next): Adjust.
6439 (dw2_print_stats): Adjust.
6440 (dw2_expand_all_symtabs): Adjust.
6441 (dw2_expand_symtabs_with_fullname): Adjust.
6442 (dw2_expand_marked_cus): Adjust.
6443 (dw_expand_symtabs_matching_file_matcher): Adjust.
6444 (dw2_map_symbol_filenames): Adjust.
6445 (dw2_debug_names_iterator::next): Adjust.
6446 (dwarf2_initialize_objfile): Adjust.
6447 (set_partial_user): Adjust.
6448 (dwarf2_build_psymtabs_hard): Adjust.
6450 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6452 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6453 Remove unused variables.
6454 (dw2_map_symtabs_matching_filename): Likewise.
6455 (dwarf2_record_block_ranges): Likewise.
6456 (dwarf2_read_addr_index): Likewise.
6457 (follow_die_offset): Likewise.
6459 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6461 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6462 to symbol_file_add_main.
6464 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6467 * mi/mi-console.c (do_fputc_async_safe): New.
6468 (mi_console_file::write_async_safe): New.
6469 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6470 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6472 * ui-file.c (ui_file::putstrn): Adjust call to
6473 fputstrn_unfiltered.
6474 * utils.c (printchar): Replace do_fputs and do_fprintf
6475 parameters by do_fputc.
6476 (fputstr_filtered): Adjust call to printchar.
6477 (fputstr_unfiltered): Likewise.
6478 (fputstrn_filtered): Likewise.
6479 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6481 * utils.h (do_fputc_ftype): New typedef.
6482 (fputstrn_unfiltered): Add do_fputc parameter.
6484 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6486 * regformats/i386/i386-avx.dat: Remove.
6488 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6491 * amd64-tdep.c (amd64_none_init_abi): New function.
6492 (amd64_x32_none_init_abi): New function.
6493 (_initialize_amd64_tdep): Register handlers for x86-64 and
6494 x64_32 with GDB_OSABI_NONE.
6495 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6496 GDB_OSABI_NONE osabi.
6498 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6501 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6503 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6504 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6506 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6508 * common/byte-vector.h (char_vector): New type.
6509 * target.h (target_read_alloc): Return
6510 gdb::optional<byte_vector>.
6511 (target_read_stralloc): Return gdb::optional<char_vector>.
6512 (target_get_osdata): Return gdb::optional<char_vector>.
6513 * target.c (target_read_alloc_1): Templatize. Replacement
6514 manual memory management with vector.
6515 (target_read_alloc): Change return type, adjust.
6516 (target_read_stralloc): Change return type, adjust.
6517 (target_get_osdata): Change return type, adjust.
6518 * auxv.c (struct auxv_info) <length>: Remove.
6519 <data>: Change type to gdb::optional<byte_vector>.
6520 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6521 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6522 (target_auxv_search): Adjust.
6523 (fprint_target_auxv): Adjust.
6524 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6525 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6526 (linux_make_corefile_notes): Adjust.
6527 * osdata.c (get_osdata): Adjust.
6528 * remote.c (remote_get_threads_with_qxfer): Adjust.
6529 (remote_memory_map): Adjust.
6530 (remote_traceframe_info): Adjust.
6531 (btrace_read_config): Adjust.
6532 (remote_read_btrace): Adjust.
6533 (remote_pid_to_exec_file): Adjust.
6534 * solib-aix.c (solib_aix_get_library_list): Adjust.
6535 * solib-dsbt.c (decode_loadmap): Don't free buf.
6536 (dsbt_get_initial_loadmaps): Adjust.
6537 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6538 * solib-target.c (solib_target_current_sos): Adjust.
6539 * tracepoint.c (sdata_make_value): Adjust.
6540 * xml-support.c (xinclude_start_include): Adjust.
6541 (xml_fetch_content_from_file): Adjust.
6542 * xml-support.h (xml_fetch_another): Change return type.
6543 (xml_fetch_content_from_file): Change return type.
6544 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6545 * xml-tdesc.c (file_read_description_xml): Adjust.
6546 (fetch_available_features_from_target): Change return type.
6547 (target_fetch_description_xml): Adjust.
6548 (target_read_description_xml): Adjust.
6550 2018-04-06 Tom Tromey <tom@tromey.com>
6552 * value.c (~value): Update.
6553 (struct value) <contents>: Now unique_xmalloc_ptr.
6554 (value_contents_bits_eq, allocate_value_contents)
6555 (value_contents_raw, value_contents_all_raw)
6556 (value_contents_for_printing, value_contents_for_printing_const)
6557 (set_value_enclosing_type): Update.
6559 2018-04-06 Tom Tromey <tom@tromey.com>
6561 * value.c (range_s): Remove typedef, VEC.
6562 (struct range): Add operator<.
6563 (range_lessthan): Remove.
6564 (ranges_contain): Change type.
6566 (struct value) <unavailable, optimized_out>: Now std::vector.
6567 (value_entirely_available)
6568 (value_entirely_covered_by_range_vector)
6569 (value_entirely_unavailable, value_entirely_optimized_out):
6571 (insert_into_bit_range_vector): Change argument type.
6572 (find_first_range_overlap): Likewise.
6573 (struct ranges_and_idx, value_contents_bits_eq)
6574 (require_not_optimized_out, require_available): Update.
6575 (ranges_copy_adjusted): Change argument types.
6576 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6578 2018-04-06 Tom Tromey <tom@tromey.com>
6580 * value.c (~value): Update.
6581 (struct value) <parent>: Now a value_ref_ptr.
6582 (value_parent, set_value_parent, value_address, value_copy):
6585 2018-04-06 Tom Tromey <tom@tromey.com>
6587 * value.c (struct value): Add constructor, destructor, and member
6589 (allocate_value_lazy, value_decref): Update.
6591 2018-04-06 Tom Tromey <tom@tromey.com>
6593 * value.c (struct value) <released, next>: Remove.
6594 (all_values): Now a std::vector.
6595 (allocate_value_lazy): Update.
6596 (value_next): Remove.
6597 (value_mark, value_free_to_mark, release_value)
6598 (value_release_to_mark): Update.
6600 2018-04-06 Tom Tromey <tom@tromey.com>
6602 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6603 (free_value_chain): Remove.
6604 * value.c (free_value_chain): Remove.
6605 (value_release_to_mark): Return a std::vector.
6606 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6608 (check_condition): Update.
6609 * eval.c (fetch_subexp_value): Change "val_chain" to a
6611 * breakpoint.c (update_watchpoint): Update.
6612 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6614 2018-04-06 Tom Tromey <tom@tromey.com>
6616 * value.h (free_all_values): Remove.
6617 * value.c (free_all_values): Remove.
6619 2018-04-06 Tom Tromey <tom@tromey.com>
6621 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6622 (value_history_chain, value_history_count): Remove.
6623 (value_history): New global.
6624 (record_latest_value, access_value_history, show_values)
6625 (preserve_values): Update.
6627 2018-04-06 Tom Tromey <tom@tromey.com>
6629 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6630 * varobj.c (varobj_set_display_format, varobj_set_value)
6631 (install_default_visualizer, construct_visualizer)
6632 (install_new_value, ~varobj, varobj_get_value_type)
6633 (my_value_of_variable, varobj_editable_p): Update.
6634 * c-varobj.c (c_describe_child, c_value_of_variable)
6635 (cplus_number_of_children, cplus_describe_child): Update.
6636 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6637 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6638 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6640 2018-04-06 Tom Tromey <tom@tromey.com>
6642 * printcmd.c (last_examine_address): Change type to
6644 (do_examine, x_command): Update.
6646 2018-04-06 Tom Tromey <tom@tromey.com>
6648 * value.c (release_value): Update.
6649 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6650 (struct bpstats) <val>: Now a value_ref_ptr.
6651 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6652 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6653 (~watchpoint, print_it_watchpoint, watch_command_1)
6654 (invalidate_bp_value_on_memory_change): Update.
6656 2018-04-06 Tom Tromey <tom@tromey.com>
6658 * varobj.c (varobj_clear_saved_item)
6659 (update_dynamic_varobj_children, install_new_value, ~varobj):
6661 * value.h (value_incref): Move declaration earlier.
6662 (value_decref): Rename from value_free.
6663 (struct value_ref_policy): New.
6664 (value_ref_ptr): New typedef.
6665 (struct value_deleter): Remove.
6666 (gdb_value_up): Remove typedef.
6667 (release_value): Change return type.
6668 (release_value_or_incref): Remove.
6669 * value.c (set_value_parent): Update.
6670 (value_incref): Change return type.
6671 (value_decref): Rename from value_free.
6672 (value_free_to_mark, free_all_values, free_value_chain): Update.
6673 (release_value): Return value_ref_ptr.
6674 (release_value_or_incref): Remove.
6675 (record_latest_value, set_internalvar, clear_internalvar):
6677 * stack.c (info_frame_command): Don't call value_free.
6678 * python/py-value.c (valpy_dealloc, valpy_new)
6679 (value_to_value_object): Update.
6680 * printcmd.c (do_examine): Update.
6681 * opencl-lang.c (lval_func_free_closure): Update.
6682 * mi/mi-main.c (register_changed_p): Don't call value_free.
6683 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6684 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6685 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6687 * guile/scm-value.c (vlscm_free_value_smob)
6688 (vlscm_scm_from_value): Update.
6689 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6690 (frame_unwind_register_unsigned, get_frame_register_bytes)
6691 (put_frame_register_bytes): Don't call value_free.
6692 * findvar.c (address_from_register): Don't call value_free.
6693 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6694 * dwarf2loc.c (entry_data_value_free_closure)
6695 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6696 (dwarf2_evaluate_loc_desc_full): Update.
6697 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6698 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6699 (~watchpoint, watch_command_1)
6700 (invalidate_bp_value_on_memory_change): Update.
6701 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6703 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6706 * warning.m4: Add -Wno-error=deprecated-register.
6707 * configure: Re-generate.
6709 2018-04-05 Tom Tromey <tom@tromey.com>
6711 * linespec.h: Remove include of "vec.h".
6713 2018-04-05 Tom Tromey <tom@tromey.com>
6715 * linespec.c (typep): Remove typedef.
6716 (find_methods, find_superclass_methods): Take a std::vector.
6717 (find_method): Use std::vector.
6719 2018-04-05 Tom Tromey <tom@tromey.com>
6721 * utils.c (compare_strings): Remove.
6722 * utils.h (compare_strings): Remove.
6723 * objc-lang.h (find_imps): Update.
6724 * objc-lang.c (find_methods): Take a std::vector.
6725 (uniquify_strings, find_imps): Likewise.
6726 * linespec.c (find_methods): Take a std::vector.
6727 (decode_objc): Use std::vector.
6728 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6730 (find_method, find_function_symbols): Use std::vector.
6732 2018-04-05 Tom Tromey <tom@tromey.com>
6734 * completer.c (completion_tracker::completion_tracker): Remove
6736 (completion_tracker::discard_completions): Likewise.
6737 * breakpoint.c (ambiguous_names_p): Remove cast.
6738 * ada-lang.c (_initialize_ada_language): Remove cast.
6739 * utils.h (streq): Update.
6740 (streq_hash): Add new declaration.
6741 * utils.c (streq): Return bool.
6742 (streq_hash): New function.
6744 2018-04-05 Tom Tromey <tom@tromey.com>
6746 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6747 Remove a string copy.
6749 2018-04-05 Tom Tromey <tom@tromey.com>
6751 * linespec.c (filter_results): Use std::vector.
6752 (decode_line_2, decode_line_full): Update.
6754 2018-04-05 Tom Tromey <tom@tromey.com>
6756 * linespec.c (canonical_to_fullform): Return std::string.
6757 (filter_results): Update.
6758 (struct decode_line_2_item): Add constructor.
6759 <fullform, displayform>: Now std::string.
6760 (decode_line_2_compare_items): Now a std::sort comparator.
6761 (decode_line_2): Update.
6763 2018-04-05 Tom Tromey <tom@tromey.com>
6765 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6766 (unexpected_linespec_error): Update.
6767 (linespec_parse_basic, parse_linespec): Update.
6769 2018-04-05 Tom Tromey <tom@tromey.com>
6771 * linespec.c (linespec_parse_basic): Reindent.
6773 2018-04-05 Tom Tromey <tom@tromey.com>
6775 * minsyms.h (iterate_over_minimal_symbols): Update.
6776 * minsyms.c (iterate_over_minimal_symbols): Take a
6778 * linespec.c (struct collect_minsyms): Remove.
6779 (compare_msyms): Now a std::sort comparator.
6780 (add_minsym): Add parameters.
6781 (search_minsyms_for_name): Update. Use std::vector.
6783 2018-04-03 Tom Tromey <tom@tromey.com>
6785 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6788 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6790 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6792 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6795 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6796 printing static type.
6798 2018-04-01 Tom Tromey <tom@tromey.com>
6800 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6801 (rs6000_xfer_shared_libraries): Update.
6803 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6805 * common/gdb_vecs.h (char_ptr): Remove.
6806 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6808 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6810 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6812 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6814 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6816 * tracepoint.h (struct uploaded_tp): Initialize fields.
6817 <actions, step_actions, cmd_strings>: Change type to
6818 std::vector<char *>.
6819 * tracepoint.c (get_uploaded_tp): Allocate with new.
6820 (free_uploaded_tps): Free with delete.
6821 (parse_tracepoint_definition): Adjust to std::vector change.
6822 * breakpoint.c (read_uploaded_action): Likewise.
6823 (create_tracepoint_from_upload): Likewise.
6824 * ctf.c (ctf_write_uploaded_tp): Likewise.
6825 (SET_ARRAY_FIELD): Likewise.
6826 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6828 2018-03-30 Tom Tromey <tom@tromey.com>
6830 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6832 (svr4_keep_data_in_core): Update.
6833 (svr4_read_so_list): Update.
6835 2018-03-30 Tom Tromey <tom@tromey.com>
6837 * windows-nat.c (handle_output_debug_string, handle_exception):
6839 * target.h (target_read_string): Update.
6840 * target.c (target_read_string): Change "string" to
6842 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6844 * solib-frv.c (frv_current_sos): Update.
6845 * solib-dsbt.c (dsbt_current_sos): Update.
6846 * solib-darwin.c (darwin_current_sos): Update.
6847 * linux-thread-db.c (inferior_has_bug): Update.
6848 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6849 Update. Remove alloca.
6850 * ada-lang.c (ada_main_name): Update.
6852 2018-03-30 Tom Tromey <tom@tromey.com>
6854 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6855 (struct dwo_file_deleter): New.
6856 (dwo_file_up): New typedef.
6857 (open_and_init_dwo_file): Use dwo_file_up.
6858 (free_dwo_file_cleanup): Remove.
6860 2018-03-30 Tom Tromey <tom@tromey.com>
6862 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6863 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6865 2018-03-30 Tom Tromey <tom@tromey.com>
6867 * dwarf2read.c (class free_cached_comp_units): New class.
6868 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6869 (free_cached_comp_units): Remove function.
6871 2018-03-30 Tom Tromey <tom@tromey.com>
6873 * utils.h (make_cleanup_unpush_target): Remove.
6874 * inf-ptrace.c (struct target_unpusher): New.
6875 (target_unpush_up) New typedef.
6876 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6878 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6880 2018-03-27 Tom Tromey <tom@tromey.com>
6882 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6884 2018-03-27 Pedro Alves <palves@redhat.com>
6885 Tom Tromey <tom@tromey.com>
6887 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6888 destructor. Now a class.
6889 (gdb_readline_wrapper_cleanup): Remove function.
6890 (gdb_readline_wrapper): Remove cleanups.
6892 2018-03-27 Tom Tromey <tom@tromey.com>
6894 * typeprint.h (struct type_print_options) <local_typedefs,
6895 global_typedefs>: Remove "struct" keyword.
6896 (class typedef_hash_table): New class.
6897 (recursively_update_typedef_hash, add_template_parameters)
6898 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6899 (find_typedef_in_hash): Don't declare.
6900 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6901 (typedef_hash_table::recursively_update): Rename from
6902 recursively_update_typedef_hash. Now a member.
6903 (typedef_hash_table::add_template_parameters): Rename from
6904 add_template_parameters. Now a member.
6905 (typedef_hash_table::typedef_hash_table): Now a constructor;
6906 rename from create_typedef_hash.
6907 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6908 rename from free_typedef_hash.
6909 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6910 (do_free_global_table): Remove.
6911 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6912 from copy_type_recursive.
6913 (create_global_typedef_table): Remove.
6914 (typedef_hash_table::find_global_typedef): Now a member of
6916 (typedef_hash_table::find_typedef): Rename from
6917 find_typedef_in_hash; now a member.
6918 (whatis_exp): Update.
6919 * extension.h (struct ext_lang_type_printers): Add constructor and
6921 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6923 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6924 Now a constructor; rename from start_ext_lang_type_printers.
6925 (ext_lang_type_printers): Now a destructor; rename from
6926 free_ext_lang_type_printers.
6927 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6929 (c_type_print_base_struct_union): Update. Remove cleanups.
6931 2018-03-27 Tom Tromey <tom@tromey.com>
6933 * dwarf-index-write.c: Include <cmath>.
6935 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6937 * NEWS: Add entry describing new "set|show varsize-limit" command.
6938 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6940 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6943 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6945 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6947 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6948 * dwarf-index-common.c: New file.
6949 * dwarf-index-common.h: New file.
6950 * dwarf-index-write.c: New file.
6951 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6952 (struct dwarf2_section_info): Move from here.
6953 (dwarf2_section_info_def): Likewise.
6954 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6955 (offset_type): Likewise.
6956 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6957 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6958 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6959 (byte_swap): Likewise.
6960 (MAYBE_SWAP): Likewise.
6961 (dwarf2_per_cu_ptr): Likewise.
6962 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6963 (struct tu_stats): Likewise.
6964 (struct dwarf2_per_objfile): Likewise.
6965 (struct dwarf2_per_cu_data): Likewise.
6966 (struct signatured_type): Likewise.
6967 (sig_type_ptr): Likewise.
6968 (DEF_VEC_P (sig_type_ptr)): Likewise.
6969 (INDEX4_SUFFIX): Likewise.
6970 (INDEX5_SUFFIX): Likewise.
6971 (DEBUG_STR_SUFFIX): Likewise.
6972 (dwarf2_read_section): Make non-static.
6973 (mapped_index_string_hash): Move from here.
6974 (dwarf5_djb_hash): Likewise.
6975 (file_write): Likewise.
6976 (class data_buf): Likewise.
6977 (struct symtab_index_entry): Likewise.
6978 (struct mapped_symtab): Likewise.
6979 (find_slot): Likewise.
6980 (hash_expand): Likewise.
6981 (add_index_entry): Likewise.
6982 (uniquify_cu_indices): Likewise.
6983 (class c_str_view): Likewise.
6984 (class c_str_view_hasher): Likewise.
6985 (class vector_hasher): Likewise.
6986 (write_hash_table): Likewise.
6987 (psym_index_map): Likewise.
6988 (struct addrmap_index_data): Likewise.
6989 (add_address_entry): Likewise.
6990 (add_address_entry_worker): Likewise.
6991 (write_address_map): Likewise.
6992 (symbol_kind): Likewise.
6993 (write_psymbols): Likewise.
6994 (struct signatured_type_index_data): Likewise.
6995 (write_one_signatured_type): Likewise.
6996 (recursively_count_psymbols): Likewise.
6997 (recursively_write_psymbols): Likewise.
6998 (class debug_names): Likewise.
6999 (check_dwarf64_offsets): Likewise.
7000 (psyms_seen_size): Likewise.
7001 (write_gdbindex): Likewise.
7002 (write_debug_names): Likewise.
7003 (assert_file_size): Likewise.
7004 (write_psymtabs_to_index): Likewise.
7005 (save_gdb_index_command): Likewise.
7006 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7008 * dwarf2read.h: New file.
7010 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7013 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7014 symbol name if the CU's language stores symbol names in linkage
7016 * language.h (struct language_defn)
7017 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7018 all instances of this struct.
7020 2018-03-26 Tom Tromey <tom@tromey.com>
7022 * stack.c (backtrace_command_1): Remove verbose code.
7024 2018-03-26 Tom Tromey <tom@tromey.com>
7026 * python/py-framefilter.c (py_print_type): Don't catch
7027 exceptions. Return void.
7028 (py_print_value): Likewise.
7029 (py_print_single_arg): Likewise.
7030 (enumerate_args): Don't catch exceptions.
7031 (py_print_args): Likewise.
7032 (py_print_frame): Likewise.
7033 (gdbpy_apply_frame_filter): Catch exceptions here.
7035 2018-03-26 Tom Tromey <tom@tromey.com>
7037 * stack.c (_initialize_stack): Remove trailing newlines from help
7038 text. Add "Usage" line to "backtrace" help.
7040 2018-03-26 Tom Tromey <tom@tromey.com>
7043 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7045 2018-03-26 Tom Tromey <tom@tromey.com>
7047 * python/py-framefilter.c (py_print_single_arg): Return
7048 EXT_LANG_BT_ERROR from catch.
7050 2018-03-26 Tom Tromey <tom@tromey.com>
7053 * stack.c (backtrace_command_1): Move some code into no-filters
7056 2018-03-26 Tom Tromey <tom@tromey.com>
7058 * python/py-framefilter.c (throw_quit_or_print_exception): New
7060 (gdbpy_apply_frame_filter): Use it.
7062 2018-03-26 Tom Tromey <tom@tromey.com>
7065 * python/py-framefilter.c (py_print_type, py_print_value)
7066 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7069 2018-03-26 Tom Tromey <tom@tromey.com>
7071 * python/py-framefilter.c (enumerate_args): Use
7072 gdb::unique_xmalloc_ptr.
7074 2018-03-26 Tom Tromey <tom@tromey.com>
7076 * python/py-framefilter.c (py_print_frame): Return
7078 (gdbpy_apply_frame_filter): Update comment.
7079 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7081 <EXT_LANG_BT_NO_FILTERS>: Change value.
7083 2018-03-26 Tom Tromey <tom@tromey.com>
7086 * stack.c (backtrace_command): Parse "hide" argument.
7087 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7088 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7091 2018-03-26 Tom Tromey <tom@tromey.com>
7093 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7095 (backtrace_command): Remove "fulltrace", add "flags".
7097 2018-03-26 Tom Tromey <tom@tromey.com>
7099 * stack.c (backtrace_command): Rewrite command line parsing.
7101 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7103 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7105 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7107 * filename-seen-cache.h: Add include guard.
7109 2018-03-26 Keith Seitz <keiths@redhat.com>
7111 * symfile.c (place_section): Remove "struct" from section_addr_info
7113 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7114 "struct" keyword from section_addr_info.
7116 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7118 * regformats/regdef.h (reg): Add constructors.
7120 2018-03-25 Pedro Alves <palves@redhat.com>
7122 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7123 if then/else bodies in var_func_name extraction.
7125 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7127 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7128 lookup_minimal_symbol() to find symbol entry.
7129 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7131 2018-03-23 Keith Seitz <keiths@redhat.com>
7134 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7135 nested type definitions for C++, too.
7137 2018-03-23 Tom Tromey <tom@tromey.com>
7139 * machoread.c (struct oso_el): Add a constructor. Don't define as
7141 (macho_register_oso): Remove.
7142 (macho_symtab_read): Take a std::vector.
7143 (oso_el_compare_name): Now a std::sort comparator.
7144 (macho_symfile_read_all_oso): Take a std::vector.
7145 (macho_symfile_read): Use std::vector. Remove cleanups.
7147 2018-03-22 Tom Tromey <tom@tromey.com>
7149 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7150 (record_full_goto_bookmark): Use std::string.
7152 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7155 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7158 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7160 * rs6000-tdep.c (store_insn_p): New function.
7161 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7162 and cr_reg to their unshifted values. Use store_insn_p to
7163 match LR saves using either R1 or fdata->alloca_reg. Use
7164 store_insn_p to match CR saves. Set alloca_reg_offset
7165 when alloca_reg and framep are set. Remove lr_reg shift
7166 when assigning to fdata->lr_register.
7168 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7170 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7171 command line args instead of emitting a warning.
7173 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7175 * tracepoint.h (struct static_tracepoint_marker): Initialize
7176 fields, define default constructor, move constructor and move
7177 assignment, disable the rest.
7178 <str_id, extra>: Make std::string.
7179 (release_static_tracepoint_marker): Remove.
7180 (free_current_marker): Remove.
7181 * tracepoint.c (free_current_marker): Remove.
7182 (parse_static_tracepoint_marker_definition): Adjust to
7183 std::string, use new hex2str overload.
7184 (release_static_tracepoint_marker): Remove.
7185 (print_one_static_tracepoint_marker): Get marker by reference
7186 and adjust to std::string.
7187 (info_static_tracepoint_markers_command): Adjust to std::vector
7189 * target.h (static_tracepoint_marker_p): Remove typedef.
7190 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7191 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7193 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7195 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7196 (target_debug_print_std_vector_static_tracepoint_marker): New.
7197 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7199 (target_debug_print_static_tracepoint_marker_p): ... this.
7200 * target-delegates.c: Re-generate.
7201 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7203 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7204 (decode_static_tracepoint_spec): Adjust to std::vector.
7205 (tracepoint_print_one_detail): Adjust to std::string.
7206 (strace_marker_decode_location): Adjust to std::string.
7207 (update_static_tracepoint): Adjust to std::string, remove call
7208 to release_static_tracepoint_marker.
7209 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7210 Adjust to std::vector.
7211 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7212 (remote_static_tracepoint_markers_by_strid): Adjust to
7214 * common/rsp-low.h (hex2str): New overload with explicit count
7216 * common/rsp-low.c (hex2str): New overload with explicit count
7218 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7219 (_initialize_rsp_low_selftests): Add test_hex2str test.
7220 * unittests/tracepoint-selftests.c
7221 (test_parse_static_tracepoint_marker_definition): Adjust to
7224 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7226 * tracepoint.c (parse_static_tracepoint_marker_definition):
7227 Consider case where the definition is followed by more
7229 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7230 tracepoint-selftests.c.
7231 * unittests/tracepoint-selftests.c: New.
7233 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7235 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7238 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7240 * symtab.c (find_pc_sect_line): fixed indentation.
7242 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7244 * symtab.c (find_pc_sect_line): now uses binary search.
7246 2018-03-19 Tom Tromey <tom@tromey.com>
7248 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7251 2018-03-19 Pedro Alves <palves@redhat.com>
7252 Tom Tromey <tom@tromey.com>
7254 * unittests/observable-selftests.c: New file.
7255 * common/observable.h: New file.
7256 * observable.h: New file.
7257 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7258 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7259 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7260 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7261 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7262 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7263 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7264 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7265 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7266 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7267 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7268 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7269 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7270 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7271 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7272 tui/tui-interp.c, valops.c: Update all users.
7273 * tui/tui-hooks.c (tui_bp_created_observer)
7274 (tui_bp_deleted_observer, tui_bp_modified_observer)
7275 (tui_inferior_exit_observer, tui_before_prompt_observer)
7276 (tui_normal_stop_observer, tui_register_changed_observer):
7278 (tui_observers_token): New global.
7279 (attach_or_detach, tui_attach_detach_observers): New functions.
7280 (tui_install_hooks, tui_remove_hooks): Use
7281 tui_attach_detach_observers.
7282 * record-btrace.c (record_btrace_thread_observer): Remove.
7283 (record_btrace_thread_observer_token): New global.
7284 * observer.sh: Remove.
7285 * observer.c: Rename to observable.c.
7286 * observable.c (namespace gdb_observers): Define new objects.
7287 (observer_debug): Move into gdb_observers namespace.
7288 (struct observer, struct observer_list, xalloc_observer_list_node)
7289 (xfree_observer_list_node, generic_observer_attach)
7290 (generic_observer_detach, generic_observer_notify): Remove.
7291 (_initialize_observer): Update.
7292 Don't include observer.inc.
7293 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7294 (clean mostlyclean): Likewise.
7295 (observer.h, observer.inc): Remove targets.
7296 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7297 (COMMON_SFILES): Use observable.c, not observer.c.
7298 * .gitignore: Remove observer.h.
7300 2018-03-18 Tom Tromey <tom@tromey.com>
7302 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7304 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7306 2018-03-17 Tom Tromey <tom@tromey.com>
7308 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7310 2018-03-17 Tom Tromey <tom@tromey.com>
7312 * target.c (class scoped_target_fd): New.
7313 (target_fileio_close_cleanup): Remove.
7314 (target_fileio_read_alloc_1): Use scoped_target_fd.
7316 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7318 * silent-rules.mk: New.
7319 * Makefile.in: Include silent-rules.mk
7320 (srcdir, VPATH, top_srcdir): Move up.
7321 (COMPILE): Add ECHO_CXX.
7322 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7323 (init.c): Add ECHO_INIT_C.
7324 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7325 (version.c): Add ECHO_GEN.
7326 (printcmd.o): Add ECHO_CXX.
7327 (target-float.o): Add ECHO_CXX.
7328 (ada-exp.o): Add ECHO_CXX.
7329 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7330 (insight$(EXEEXT)): Add ECHO_CXXLD.
7331 * gnulib/configure.ac: Add AM_SILENT_RULES.
7332 * gnulib/aclocal.m4: Re-generate.
7333 * gnulib/configure: Re-generate.
7334 * gnulib/import/Makefile.in: Re-generate.
7336 2018-03-16 Tom Tromey <tom@tromey.com>
7338 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7339 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7340 * utils.c (do_free_section_addr_info)
7341 (make_cleanup_free_section_addr_info): Remove.
7342 * symfile.h (struct other_sections): Add constructor.
7343 (struct section_addr_info): Remove.
7344 (section_addr_info): New typedef.
7345 (struct sym_fns) <sym_offsets>: Change type of parameter.
7346 (build_section_addr_info_from_objfile)
7347 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7348 (default_symfile_offsets, symbol_file_add)
7349 (symbol_file_add_from_bfd)
7350 (build_section_addr_info_from_section_table): Update.
7351 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7352 * symfile.c (alloc_section_addr_info): Remove.
7353 (build_section_addr_info_from_section_table): Change return type.
7355 (build_section_addr_info_from_bfd)
7356 (build_section_addr_info_from_objfile): Likewise.
7357 (free_section_addr_info): Remove.
7358 (relative_addr_info_to_section_offsets): Change type of "addrs".
7359 (addrs_section_compar): Now a std::sort comparator.
7360 (addrs_section_sort): Change return type.
7361 (addr_info_make_relative): Change type of "addrs". Update.
7362 (default_symfile_offsets, syms_from_objfile_1)
7363 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7364 (symbol_file_add_separate): Update.
7365 (symbol_file_add): Change type of "addrs". Update.
7366 (add_symbol_file_command): Update. Remove cleanups.
7367 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7369 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7370 * solib.c (solib_read_symbols): Update.
7371 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7372 * machoread.c (macho_symfile_offsets): Update.
7373 * jit.c (jit_bfd_try_read_symtab): Update.
7375 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7377 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7378 unittests/utils-selftests.c.
7379 * unittests/utils-selftests.c: New file.
7381 2018-03-14 Tom Tromey <tom@tromey.com>
7384 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7387 2018-03-14 Tom Tromey <tom@tromey.com>
7390 * printcmd.c (printf_pointer): Allow "-" in format.
7392 2018-03-14 Tom Tromey <tom@tromey.com>
7394 * printcmd.c (_initialize_printcmd): Add usage to printf.
7396 2018-03-14 Yao Qi <qiyao@sourceware.org>
7398 * MAINTAINERS: Update my email address.
7400 2018-03-13 Tom Tromey <tom@tromey.com>
7402 * machoread.c (macho_check_dsym): Change filenamep to a
7404 (macho_symfile_read): Update.
7405 * symfile.c (load_command): Use std::string.
7407 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7409 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7410 to error message string.
7411 (riscv_register_name): Use xsnprintf instead of sprintf.
7412 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7414 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7416 (riscv_push_dummy_call): Likewise.
7418 2018-03-12 Tom Tromey <tom@tromey.com>
7420 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7421 Use gdb::byte_vector.
7422 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7424 2018-03-12 Yao Qi <yao.qi@linaro.org>
7426 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7427 parameter type to readable_regcache.
7428 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7431 2018-03-11 Tom Tromey <tom@tromey.com>
7433 * dwarf2read.c (struct nextfield): Add initializers.
7434 (struct nextfnfield): Remove.
7435 (struct fnfieldlist): Add initializers. Remove "length" and
7436 "head", use std::vector.
7437 (struct decl_field_list): Remove.
7438 (struct field_info): Add initializers.
7439 <fields, baseclasses>: Now std::vector.
7440 <nbaseclasses, nfnfields, typedef_field_list_count,
7441 nested_types_list_count>: Remove.
7442 (dwarf2_add_field, dwarf2_add_type_defn)
7443 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7444 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7445 (process_structure_scope): Update.
7447 2018-03-11 Tom Tromey <tom@tromey.com>
7449 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7450 for use by std::sort.
7451 (build_type_psymtabs_1): Use std::vector.
7453 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7455 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7456 and LIBMPFR in the printed configuration.
7458 2018-03-08 Tom Tromey <tom@tromey.com>
7460 * source.c (get_filename_and_charpos): Use scoped_fd.
7461 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7462 (procfs_pidlist): Likewise.
7463 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7464 (iterate_over_mappings): Likewise.
7466 2018-03-08 Tom Tromey <tom@tromey.com>
7468 * infcall.c (struct call_return_meta_info)
7469 <stack_temporaries_enabled>: Remove.
7470 (get_call_return_value, call_function_by_hand_dummy): Update.
7471 * thread.c (disable_thread_stack_temporaries): Remove.
7472 (enable_thread_stack_temporaries): Remove.
7473 (thread_stack_temporaries_enabled_p): Return bool.
7474 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7475 (get_last_thread_stack_temporary): Update.
7476 * eval.c (evaluate_subexp): Update.
7477 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7478 class, not a function.
7479 (value_ptr, value_vec): Remove typedefs.
7480 (class thread_info) <stack_temporaries_enabled>: Now bool.
7481 <stack_temporaries>: Now a std::vector.
7482 (thread_stack_temporaries_enabled_p)
7483 (value_in_thread_stack_temporaries): Return bool.
7485 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7487 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7488 (getpkt_or_notif_sane_1): Likewise.
7490 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7492 * build-id.c (build_id_to_debug_bfd): Use std::string.
7494 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7496 * build-id.c (find_separate_debug_file_by_buildid): Return
7498 * build-id.h (find_separate_debug_file_by_buildid): Return
7500 * coffread.c (coff_symfile_read): Adjust to std::string.
7501 * elfread.c (elf_symfile_read): Adjust to std::string.
7502 * symfile.c (separate_debug_file_exists): Change parameter to
7504 (find_separate_debug_file): Return std::string.
7505 (find_separate_debug_file_by_debuglink): Return std::string.
7506 * symfile.h (find_separate_debug_file_by_debuglink): Return
7509 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7511 * common/xml-utils.c (xml_escape_text): Move code to...
7512 (xml_escape_text_append): ... this new function.
7513 * common/xml-utils.h (xml_escape_text_append): New declaration.
7514 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7516 (_initialize_xml_utils): register test_xml_escape_text_append as
7519 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7521 * defs.h: Remove MAX_REGISTER_SIZE.
7522 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7524 * python/py-unwind.c (pyuw_sniffer): Likewise.
7526 2018-03-07 Tom Tromey <tom@tromey.com>
7528 * linux-tdep.c (linux_info_proc): Update.
7529 * target.h (struct target_ops) <to_fileio_readlink>: Return
7531 (target_fileio_readlink): Return optional<string>.
7532 * remote.c (remote_hostio_readlink): Return optional<string>.
7533 * inf-child.c (inf_child_fileio_readlink): Return
7535 * target.c (target_fileio_readlink): Return optional<string>.
7537 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7539 * regcache.c (cooked_read_test): Add riscv to the list of
7540 architectures that have a save_reggroup.
7542 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7544 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7545 value is not a dynamic class object.
7547 2018-03-06 Tom Tromey <tom@tromey.com>
7549 * rust-exp.y: Formatting fixes.
7551 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7553 * riscv-tdep.c (riscv_register_name): Remove target description
7555 (riscv_gdbarch_init): Remove target description check.
7557 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7559 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7561 * riscv-tdep.h: Likewise.
7563 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7565 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7566 (riscv_pseudo_register_write): Delete.
7567 (riscv_gdbarch_init): Remove all use of pseudo registers.
7569 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7571 * record-btrace.c (btrace_print_lines): Replace cleanup
7572 parameter with RAII equivalents.
7573 (btrace_insn_history): Replace cleanup with RAII equivalents.
7574 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7575 make_cleanup_ui_out_tuple_begin_end): Remove.
7576 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7577 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7578 make_cleanup_ui_out_list_begin_end): Remove.
7580 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7582 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7583 parameter types to std::vector. Use bool.
7584 (record_btrace_wait): Replace VEC(tp_t) with
7585 std::vector<thread_info *>.
7586 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7588 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7590 * record-btrace.c (record_btrace_disable_callback): Remove.
7591 (struct scoped_btrace_disable): New.
7592 (record_btrace_open): Use scoped_btrace_disable.
7594 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7596 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7597 reading values from registers.
7599 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7601 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7604 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7606 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7607 change parameter type. Use GDB's print functions, and use
7608 core_addr_to_string where appropriate.
7609 (riscv_push_dummy_call): Use core_addr_to_string where
7610 appropriate, update call to riscv_print_arg_location, and reindent
7612 (riscv_return_value): Update call to riscv_print_arg_location.
7614 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7615 Tim Newsome <tim@sifive.com>
7616 Albert Ou <a0u@eecs.berkeley.edu>
7617 Darius Rad <darius@bluespec.com>
7619 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7620 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7621 (ALLDEPFILES): Add riscv-tdep.c
7622 * configure.tgt: Add riscv support.
7623 * riscv-tdep.c: New file.
7624 * riscv-tdep.h: New file.
7625 * NEWS: Mention new target.
7626 * MAINTAINERS: Add entry for riscv.
7628 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7630 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7631 fields within aggregates.
7633 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7635 * record-btrace.c (btrace_print_lines): Change type of flags to
7636 gdb_disassembly_flags.
7638 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7640 * fbsd-nat.c: Include "inf-ptrace.h".
7641 (USE_SIGTRAP_SIGINFO): Conditionally define.
7642 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7643 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7644 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7646 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7648 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7650 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7651 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7652 "supports_stopped_by_hw_breakpoint" target methods.
7654 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7656 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7657 * fbsd-nat.c (debug_fbsd_nat): New variable.
7658 (show_fbsd_nat_debug): New function.
7659 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7660 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7662 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7664 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7665 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7667 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7668 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7671 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7673 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7674 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7676 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7678 * charset.c (struct charset_vector): New.
7679 (charsets): Change type to charset_vector.
7680 (find_charset_names): Adjust.
7682 (_initialize_charset): Adjust.
7684 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7686 * progspace.h (struct program_space) <deleted_solibs>: Change
7687 type to std::vector<std::string>.
7688 * progspace.c (clear_program_space_solib_cache): Adjust.
7689 * breakpoint.c (print_solib_event): Adjust.
7690 (check_status_catch_solib): Adjust.
7691 * solib.c (update_solib_list): Adjust.
7692 * ui-out.h (class ui_out) <field_string>: New overload.
7693 * ui-out.c (ui_out::field_string): New overload.
7695 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7697 * progspace.h (struct program_space): Add constructor and
7698 destructor, initialize fields.
7699 (add_program_space): Remove.
7700 * progspace.c (add_program_space): Rename to...
7701 (program_space::program_space): ... this.
7702 (release_program_space): Rename to...
7703 (program_space::~program_space): ... this.
7704 (delete_program_space): Use delete to delete program_space.
7705 (initialize_progspace): Use new to allocate program_space.
7706 * inferior.c (add_inferior_with_spaces): Likewise.
7707 (clone_inferior_command): Likewise.
7708 * infrun.c (follow_fork_inferior): Likewise.
7709 (handle_vfork_child_exec_or_exit): Likewise.
7711 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7713 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7714 (delim_string_to_char_ptr_vec): Return std::vector of
7715 gdb::unique_xmalloc_ptr.
7716 (dirnames_to_char_ptr_vec_append): Take std::vector of
7717 gdb::unique_xmalloc_ptr.
7718 (dirnames_to_char_ptr_vec): Return std::vector of
7719 gdb::unique_xmalloc_ptr.
7720 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7721 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7722 (delim_string_to_char_ptr_vec): Return an std::vector of
7723 gdb::unique_xmalloc_ptr, adjust the code.
7724 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7725 gdb::unique_xmalloc_ptr, adjust the code.
7726 (dirnames_to_char_ptr_vec): Return an std::vector of
7727 gdb::unique_xmalloc_ptr, adjust the code.
7728 * auto-load.c (auto_load_safe_path_vec): Change type to
7729 std::vector of gdb::unique_xmalloc_ptr.
7730 (auto_load_expand_dir_vars): Return an std::vector of
7731 gdb::unique_xmalloc_ptr, adjust the code.
7732 (auto_load_safe_path_vec_update): Adjust.
7733 (filename_is_in_auto_load_safe_path_vec): Adjust.
7734 (auto_load_objfile_script_1): Adjust.
7735 * build-id.c (build_id_to_debug_bfd): Adjust.
7736 * linux-thread-db.c (thread_db_load_search): Adjust.
7737 * source.c (add_path): Adjust.
7739 * symfile.c (find_separate_debug_file): Adjust.
7740 * utils.c (do_free_char_ptr_vec): Remove.
7741 (make_cleanup_free_char_ptr_vec): Remove.
7743 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7746 * common/pathstuff.c: Conditionally include "<windows.h>".
7748 2018-03-01 Georg Sauthoff <mail@georg.so>
7751 * gcore.in: Quote variables and switch interpreter to bash.
7753 2018-03-01 Tom Tromey <tom@tromey.com>
7755 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7756 assertion. Add assertion for discriminant_index.
7757 (quirk_rust_enum): Use correct base type name in univariant case.
7759 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7761 * record.c (get_call_history_modifiers): Return a
7763 (cmd_record_call_history): Adjust.
7764 * record-btrace.c (record_btrace_call_history): Adjust.
7765 (record_btrace_call_history_range): Adjust.
7766 (record_btrace_call_history_from): Adjust.
7767 * target-debug.h (target_debug_print_record_print_flags): New.
7768 * target-delegates.c: Re-generate.
7769 * target.c (target_call_history): Change flags type.
7770 (target_call_history_from): Likewise.
7771 (target_call_history_range): Likewise.
7772 * target.h (struct target_ops) <target_call_history>: Likewise.
7773 (target_call_history_from): Likewise.
7774 (target_call_history_range): Likewise.
7776 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7777 Simon Marchi <simon.marchi@polymtl.ca>
7779 * common/common-utils.c: Include "sys/stat.h".
7780 (is_regular_file): Move here from "source.c"; change return
7782 * common/common-utils.h (is_regular_file): New prototype.
7783 * common/pathstuff.c (contains_dir_separator): New function.
7784 * common/pathstuff.h (contains_dir_separator): New prototype.
7785 * source.c: Don't include "sys/stat.h".
7786 (is_regular_file): Move to "common/common-utils.c".
7788 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7790 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7791 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7792 * auto-load.c: Include "common/pathstuff.h".
7793 * common/common-def.h (current_directory): Move here.
7794 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7796 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7798 * common/pathstuff.c: New file.
7799 * common/pathstuff.h: New file.
7800 * compile/compile.c: Include "common/pathstuff.h".
7801 * defs.h (current_directory): Move to "common/common-defs.h".
7802 * dwarf2read.c: Include "common/pathstuff.h".
7804 * guile/scm-safe-call.c: Likewise.
7805 * linux-thread-db.c: Likewise.
7807 * nto-tdep.c: Likewise.
7808 * objfiles.c: Likewise.
7809 * source.c: Likewise.
7810 * symtab.c: Likewise.
7811 * utils.c: Include "common/pathstuff.h".
7812 (gdb_realpath): Move to "common/pathstuff.c".
7813 (gdb_realpath_keepfile): Likewise.
7814 (gdb_abspath): Likewise.
7815 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7816 (gdb_realpath_keepfile): Likewise.
7817 (gdb_abspath): Likewise.
7819 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7821 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7822 wildcard process pid for super_resume for kernels with a
7825 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7827 * compile/compile.c (get_args): Add additional comments
7828 explaining function.
7830 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7831 Tom Tromey <tom@tromey.com>
7833 * target.h (memory_write_request_s): Remove typedef. Don't define
7835 (target_write_memory_blocks): Change argument to std::vector.
7836 (struct memory_write_request): Add constructor.
7837 * target-memory.c (compare_block_starting_address): Return bool.
7838 Change argument types.
7839 (claim_memory): Change arguments to use std::vector.
7840 (split_regular_and_flash_blocks, blocks_to_erase)
7841 (compute_garbled_blocks): Likewise.
7842 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7843 (target_write_memory_blocks): Change argument to std::vector.
7844 * symfile.c (struct load_section_data): Add constructor and
7845 destructor. Use std::vector for "requests".
7846 (struct load_progress_data): Add initializers.
7847 (load_section_callback): Update. Use "new".
7848 (clear_memory_write_data): Remove.
7849 (generic_load): Update.
7851 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7853 * arch/aarch64.h: Use common/tdesc.h.
7855 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7857 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7858 architecture with a 64-bit ABI.
7860 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7862 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7863 ahead of target description loading.
7865 2018-02-26 Tom Tromey <tom@tromey.com>
7867 * stack.c (backtrace_command_1): Update.
7868 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7870 * python/py-framefilter.c (py_print_frame)
7871 (gdbpy_apply_frame_filter): Change type of "flags".
7872 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7874 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7875 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7876 * extension.h (enum frame_filter_flag): Rename from
7878 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7879 (apply_ext_lang_frame_filter): Change type of "flags".
7880 * extension.c (apply_ext_lang_frame_filter): Change type of
7882 * extension-priv.h (struct extension_language_ops)
7883 <apply_frame_filter>: Change type of "flags".
7885 2018-02-26 Tom Tromey <tom@tromey.com>
7888 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7889 off-by-one in py_end computation.
7890 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7892 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7895 2018-02-26 Tom Tromey <tom@tromey.com>
7897 * dwarf2read.c (struct variant_field): New.
7898 (struct nextfield) <variant>: New field.
7899 (dwarf2_add_field): Handle DW_TAG_variant_part.
7900 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7901 discriminated union.
7902 (read_structure_type): Handle DW_TAG_variant_part.
7903 (handle_struct_member_die): New function, extracted from
7904 process_structure_scope. Handle DW_TAG_variant.
7905 (process_structure_scope): Handle discriminated unions. Call
7906 handle_struct_member_die.
7908 2018-02-26 Tom Tromey <tom@tromey.com>
7910 * rust-lang.h (rust_last_path_segment): Declare.
7911 * rust-lang.c (rust_last_path_segment): Now public. Change
7913 (struct disr_info): Remove.
7914 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7915 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7916 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7917 (rust_enum_p, rust_enum_variant): New function.
7918 (rust_underscore_fields): Remove "offset" parameter.
7919 (rust_print_enum): New function.
7920 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7921 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7922 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7924 (rust_internal_print_type): New function, from rust_print_type.
7926 (rust_print_type): Call rust_internal_print_type.
7927 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7928 Update enum handling.
7929 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7930 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7931 (rust_union_quirks): New functions.
7932 (process_full_comp_unit, process_full_type_unit): Call
7934 (process_structure_scope): Update rust_unions if necessary.
7936 2018-02-26 Tom Tromey <tom@tromey.com>
7938 * value.h (value_union_variant): Declare.
7939 * valops.c (value_union_variant): New function.
7940 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7941 (struct discriminant_info): New.
7942 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7944 (struct main_type) <flag_discriminated_union>: New field.
7946 2018-02-26 Tom Tromey <tom@tromey.com>
7948 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7949 unittests/unpack-selftests.c.
7950 * unittests/unpack-selftests.c: New file.
7951 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7953 2018-02-26 Yao Qi <yao.qi@linaro.org>
7955 * dwarf2read.c (struct partial_die_info) <read>: New method.
7956 (read_partial_die): Remove the declaration.
7957 (load_partial_dies): Update.
7958 (partial_die_info::partial_die_info):
7959 (read_partial_die): Change it to partial_die_info::read.
7961 2018-02-26 Yao Qi <yao.qi@linaro.org>
7963 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7964 (fixup_partial_die): Remove declaration.
7965 (scan_partial_symbols): Update.
7966 (partial_die_parent_scope): Likewise.
7967 (partial_die_full_name): Likewise.
7968 (fixup_partial_die): Change it to partial_die_info::fixup.
7970 2018-02-26 Yao Qi <yao.qi@linaro.org>
7972 * dwarf2read.c (read_partial_die): Update the declaration.
7973 (load_partial_dies): Caller update.
7974 (read_partial_die): Remove one argument abbrev_len.
7976 2018-02-26 Yao Qi <yao.qi@linaro.org>
7978 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7979 assignment operator.
7980 (load_partial_dies): Use ctor and copy ctor.
7981 (read_partial_die): Update.
7982 (dwarf2_cu::find_partial_die): Use ctor.
7984 2018-02-26 Yao Qi <yao.qi@linaro.org>
7986 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7987 (find_partial_die_in_comp_unit): Change it to
7988 dwarf2_cu::find_partial_die.
7989 (find_partial_die): Update.
7991 2018-02-26 Yao Qi <yao.qi@linaro.org>
7993 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7996 2018-02-26 Yao Qi <yao.qi@linaro.org>
7998 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8000 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8002 * arch/amd64.h: Use common/tdesc.h.
8003 * arch/i386.c: Likewise.
8004 * arch/i386.h: Likewise.
8005 * arch/tic6x.c: Likewise.
8006 * arch/tdesc.h: Move file from here...
8007 * common/tdesc.h: ...to here.
8008 * features/aarch64-core.c: Regenerate.
8009 * features/aarch64-fpu.c: Regenerate.
8010 * features/i386/32bit-avx.c: Regenerate.
8011 * features/i386/32bit-avx512.c: Regenerate.
8012 * features/i386/32bit-core.c: Regenerate.
8013 * features/i386/32bit-linux.c: Regenerate.
8014 * features/i386/32bit-mpx.c: Regenerate.
8015 * features/i386/32bit-pkeys.c: Regenerate.
8016 * features/i386/32bit-sse.c: Regenerate.
8017 * features/i386/64bit-avx.c: Regenerate.
8018 * features/i386/64bit-avx512.c: Regenerate.
8019 * features/i386/64bit-core.c: Regenerate.
8020 * features/i386/64bit-linux.c: Regenerate.
8021 * features/i386/64bit-mpx.c: Regenerate.
8022 * features/i386/64bit-pkeys.c: Regenerate.
8023 * features/i386/64bit-segments.c: Regenerate.
8024 * features/i386/64bit-sse.c: Regenerate.
8025 * features/i386/x32-core.c: Regenerate.
8026 * features/tic6x-c6xp.c: Regenerate.
8027 * features/tic6x-core.c: Regenerate.
8028 * features/tic6x-gp.c: Regenerate.
8029 * target-descriptions.c: Use common/tdesc.h.
8030 * target-descriptions.h: Likewise.
8032 2018-02-24 Tom Tromey <tom@tromey.com>
8034 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8035 (try_thread_db_load_from_dir, thread_db_load_search): Use
8037 (info_auto_load_libthread_db_compare): Return bool. Change
8039 (info_auto_load_libthread_db): Use std::vector, std::string.
8042 2018-02-24 Tom Tromey <tom@tromey.com>
8044 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8046 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8048 * gdbarch.c: Rebuild.
8049 * gdbarch.h: Rebuild.
8050 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8051 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8052 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8055 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8057 * gdbtypes.h (sect_offset): Change type to uint64_t.
8058 (sect_offset_str): New function.
8059 * dwarf2read.c (create_addrmap_from_aranges): Use
8061 (error_check_comp_unit_head): Likewise.
8062 (create_debug_type_hash_table): Likewise.
8063 (read_cutu_die_from_dwo): Likewise.
8064 (init_cutu_and_read_dies): Likewise.
8065 (init_cutu_and_read_dies_no_follow): Likewise.
8066 (process_psymtab_comp_unit_reader): Likewise.
8067 (partial_die_parent_scope): Likewise.
8068 (peek_die_abbrev): Likewise.
8069 (process_queue): Likewise.
8070 (dwarf2_physname): Likewise.
8071 (read_namespace_alias): Likewise.
8072 (read_import_statement): Likewise.
8073 (create_dwo_cu_reader): Likewise.
8074 (create_cus_hash_table): Likewise.
8075 (lookup_dwo_cutu): Likewise.
8076 (inherit_abstract_dies): Likewise.
8077 (read_func_scope): Likewise.
8078 (read_call_site_scope): Likewise.
8079 (dwarf2_add_member_fn): Likewise.
8080 (read_common_block): Likewise.
8081 (read_module_type): Likewise.
8082 (read_typedef): Likewise.
8083 (read_subrange_type): Likewise.
8084 (load_partial_dies): Likewise.
8085 (read_partial_die): Likewise.
8086 (find_partial_die): Likewise.
8087 (read_str_index): Likewise.
8088 (dwarf2_string_attr): Likewise.
8089 (build_error_marker_type): Likewise.
8090 (lookup_die_type): Likewise.
8091 (dump_die_shallow): Likewise.
8092 (follow_die_ref): Likewise.
8093 (dwarf2_fetch_die_loc_sect_off): Likewise.
8094 (dwarf2_fetch_constant_bytes): Likewise.
8095 (follow_die_sig): Likewise.
8096 (get_signatured_type): Likewise.
8097 (get_DW_AT_signature_type): Likewise.
8098 (dwarf2_find_containing_comp_unit): Likewise.
8099 (set_die_type): Likewise.
8101 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8103 * arch/aarch64.c: Include "common-defs.h".
8104 * arch/amd64.c: Likewise.
8105 * arch/i386.c: Likewise.
8107 2018-02-21 Tom Tromey <tom@tromey.com>
8109 * value.h: (extract_field_op): Update.
8110 * eval.c (extract_field_op): Return a const char *.
8111 * expression.h (parse_expression_for_completion): Update.
8112 * completer.c (complete_expression): Update.
8113 (add_struct_fields): Make fieldname const.
8114 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8115 (mark_completion_tag, parse_exp_in_context_1): Update.
8116 (parse_expression_for_completion): Change "name" to
8117 unique_xmalloc_ptr*.
8119 2018-02-21 Tom Tromey <tom@tromey.com>
8121 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8123 2018-02-21 Yao Qi <yao.qi@linaro.org>
8125 * avr-tdep.c (avr_read_pc): Change parameter type to
8127 * gdbarch.sh (read_pc): Likewise.
8128 * gdbarch.c: Re-generated.
8129 * gdbarch.h: Re-generated.
8130 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8132 * ia64-tdep.c (ia64_read_pc): Likewise.
8133 * mips-tdep.c (mips_read_pc): Likewise.
8134 * spu-tdep.c (spu_read_pc): Likewise.
8136 2018-02-21 Yao Qi <yao.qi@linaro.org>
8138 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8139 * regcache-dump.c: New file.
8140 * regcache.c: Move register_dump to regcache-dump.c.
8141 (maintenance_print_registers): Likewise.
8142 (maintenance_print_raw_registers): Likewise.
8143 (maintenance_print_cooked_registers): Likewise.
8144 (maintenance_print_register_groups): Likewise.
8145 (maintenance_print_remote_registers): Likewise.
8146 (_initialize_regcache): Likewise.
8147 * regcache.h (register_dump): Moved from regcache.c.
8149 2018-02-21 Yao Qi <yao.qi@linaro.org>
8151 * regcache.c (regcache::regcache): Update.
8152 (regcache::invalidate): Move it to detached_regcache::invalidate.
8153 (get_thread_arch_aspace_regcache): Update.
8154 (regcache::raw_update): Update.
8155 (regcache::cooked_read): Remove some code.
8156 (regcache::cooked_read_value): Likewise.
8157 (regcache::raw_write): Remove assert on m_readonly_p.
8158 (regcache::raw_supply_integer): Move it to
8159 detached_regcache::raw_supply_integer.
8160 (regcache::raw_supply_zeroed): Likewise.
8161 * regcache.h (detached_regcache) <raw_supply_integer>: New
8163 <raw_supply_zeroed, invalidate>: Likewise.
8164 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8165 <invalidate>: Likewise.
8166 <m_readonly_p>: Removed.
8168 2018-02-21 Yao Qi <yao.qi@linaro.org>
8170 * infcmd.c (get_return_value): Let stop_regs point to
8171 get_current_regcache.
8172 * regcache.c (regcache::regcache): Remove.
8173 (register_dump_reg_buffer): New class.
8174 (regcache_print): Adjust.
8175 * regcache.h (regcache): Remove constructors.
8177 2018-02-21 Yao Qi <yao.qi@linaro.org>
8179 * regcache.c (class register_dump): New class.
8180 (register_dump_regcache, register_dump_none): New class.
8181 (register_dump_remote, register_dump_groups): New class.
8182 (regcache_print): Update.
8183 * regcache.h (regcache_dump_what): Move it to regcache.c.
8184 (regcache) <dump>: Remove.
8186 2018-02-21 Yao Qi <yao.qi@linaro.org>
8188 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8190 (jit_unwind_reg_set_impl): Call raw_supply.
8191 (jit_frame_sniffer): Use reg_buffer_rw.
8192 * record-full.c (record_full_core_regbuf): Change its type.
8193 (record_full_core_open_1): Use reg_buffer_rw.
8194 (record_full_close): Likewise.
8195 (record_full_core_fetch_registers): Use regcache->raw_supply.
8196 (record_full_core_store_registers): Likewise.
8197 * regcache.c (regcache::get_register_status): Move it to
8199 (regcache_raw_set_cached_value): Remove.
8200 (regcache::raw_set_cached_value): Remove.
8201 (regcache::raw_write): Call raw_supply.
8202 (regcache::raw_supply): Move it to reg_buffer_rw.
8203 * regcache.h (regcache_raw_set_cached_value): Remove.
8204 (reg_buffer_rw): New class.
8206 2018-02-21 Yao Qi <yao.qi@linaro.org>
8208 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8209 readonly_detached_regcache.
8210 (dummy_frame_prev_register): Use regcache->cooked_read.
8211 * frame.c (frame_save_as_regcache): Change return type.
8212 (frame_pop): Update.
8213 * frame.h (frame_save_as_regcache): Update declaration.
8214 * inferior.h (get_infcall_suspend_state_regcache): Update
8216 * infrun.c (infcall_suspend_state) <registers>: use
8217 readonly_detached_regcache.
8218 (save_infcall_suspend_state): Don't use regcache_dup.
8219 (get_infcall_suspend_state_regcache): Change return type.
8220 * linux-fork.c (struct fork_info) <savedregs>: Change to
8221 readonly_detached_regcache.
8223 (fork_save_infrun_state): Don't use regcache_dup.
8224 (info_checkpoints_command): Adjust.
8225 * mi/mi-main.c (register_changed_p): Update declaration.
8226 (mi_cmd_data_list_changed_registers): Use
8227 readonly_detached_regcache.
8228 (register_changed_p): Change parameter type to
8229 readonly_detached_regcache.
8230 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8231 readonly_detached_regcache.
8232 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8233 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8235 (regcache::save): Move it to reg_buffer.
8236 (regcache::restore): Change parameter type.
8237 (regcache_dup): Remove.
8238 * regcache.h (reg_buffer) <save>: New method.
8239 (readonly_detached_regcache): New class.
8240 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8241 readonly_detached_regcache.
8242 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8244 2018-02-21 Yao Qi <yao.qi@linaro.org>
8246 * frame.c (frame_save_as_regcache): Use regcache method save.
8247 (frame_pop): Use regcache method restore.
8248 * infrun.c (restore_infcall_suspend_state): Likewise.
8249 * linux-fork.c (fork_load_infrun_state): Likewise.
8250 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8252 * regcache.c (regcache_save): Remove.
8253 (regcache::restore): More asserts.
8254 (regcache_cpy): Remove.
8255 * regcache.h (regcache_save): Remove the declaration.
8256 (regcache::restore): Move from private to public.
8257 Remove the friend declaration of regcache_cpy.
8258 (regcache_cpy): Remove declaration.
8260 2018-02-21 Yao Qi <yao.qi@linaro.org>
8262 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8263 parameter type to 'readable_regcache *'.
8264 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8265 * arm-tdep.c (arm_neon_quad_read): Likewise.
8266 (arm_pseudo_read): Likewise.
8267 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8268 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8269 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8270 * gdbarch.c: Re-generated.
8271 * gdbarch.h: Re-generated.
8272 * gdbarch.sh (pseudo_register_read): Change parameter type to
8273 'readable_regcache *'.
8274 (pseudo_register_read_value): Likewise.
8275 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8276 (h8300_pseudo_register_read): Likewise.
8277 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8278 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8279 (i386_pseudo_register_read_into_value): Likewise.
8280 (i386_pseudo_register_read_value): Likewise.
8281 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8283 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8284 * m32c-tdep.c (m32c_raw_read): Likewise.
8285 (m32c_read_flg): Likewise.
8286 (m32c_banked_register): Likewise.
8287 (m32c_banked_read): Likewise.
8288 (m32c_sb_read): Likewise.
8289 (m32c_part_read): Likewise.
8290 (m32c_cat_read): Likewise.
8291 (m32c_r3r2r1r0_read): Likewise.
8292 (m32c_pseudo_register_read): Likewise.
8293 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8294 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8295 (mep_pseudo_cr64_read): Likewise.
8296 (mep_pseudo_register_read): Likewise.
8297 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8298 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8299 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8300 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8301 (regcache::cooked_read): Likewise.
8302 (regcache::cooked_read_value): Likewise.
8303 (regcache_cooked_read_signed):
8304 (regcache::cooked_read): Likewise.
8305 * regcache.h (readable_regcache): New class.
8306 (regcache): Inherit readable_regcache. Move some methods to
8308 * rl78-tdep.c (rl78_pseudo_register_read): Change
8309 parameter type to 'readable_regcache *'.
8310 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8311 (e500_pseudo_register_read): Change parameter type to
8312 'readable_regcache *'.
8313 (dfp_pseudo_register_read): Likewise.
8314 (vsx_pseudo_register_read): Likewise.
8315 (efpr_pseudo_register_read): Likewise.
8316 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8317 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8318 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8319 (sh64_pseudo_register_read): Likewise.
8320 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8321 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8322 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8323 (spu_pseudo_register_read): Likewise.
8324 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8325 (xtensa_pseudo_register_read): Likewise.
8327 2018-02-21 Yao Qi <yao.qi@linaro.org>
8329 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8330 (regcache::arch): Move it to reg_buffer::arch.
8331 (regcache::register_buffer): Likewise.
8332 (regcache::assert_regnum): Likewise.
8333 (regcache::num_raw_registers): Likewise.
8334 * regcache.h (reg_buffer): New class.
8335 (regcache): Inherit reg_buffer.
8337 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8339 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8340 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8342 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8344 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8346 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8348 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8349 (SFILES): Remove common/*.c files.
8350 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8351 * common/common.host: Add common reference.
8352 * configure.ac: Likewise.
8353 * configure: Regenerate.
8355 2018-02-16 Yao Qi <yao.qi@linaro.org>
8357 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8358 (block_initialize_namespace): Use new.
8359 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8360 (dwarf2_free_objfile): Use delete.
8361 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8362 (copy_type_recursive): Use new.
8363 * gdb_obstack.h (allocate_on_obstack): New.
8365 2018-02-15 Yao Qi <yao.qi@linaro.org>
8368 * inferior.c (exit_inferior_1): Reset inf->control.
8370 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8372 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8375 2018-02-14 Pedro Alves <palves@redhat.com>
8377 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8378 frame_cleanup_after_sniffer on exception.
8380 2018-02-14 Tom Tromey <tom@tromey.com>
8382 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8384 (solib_bfd_open): Make pathname const.
8385 * solib.c (solib_bfd_open): Make pathname const.
8386 * solib-spu.c (spu_bfd_fopen): Make name const.
8387 (spu_bfd_open): Make pathname const.
8388 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8389 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8391 2018-02-14 Tom Tromey <tom@tromey.com>
8393 * symfile.c (symfile_bfd_open): Update.
8394 * source.h (openp, source_full_path_of, find_and_open_source):
8395 Change argument type to unique_xmalloc_ptr.
8396 * source.c (openp): Take a unique_xmalloc_ptr.
8397 (source_full_path_of, find_and_open_source): Likewise.
8398 (open_source_file, symtab_to_fullname): Update.
8399 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8401 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8402 (exec_file_find): Update.
8403 * psymtab.c (psymtab_to_fullname): Update.
8404 * nto-tdep.h (nto_find_and_open_solib): Update.
8405 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8407 * exec.c (exec_file_attach): Update.
8408 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8409 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8411 2018-02-14 Tom Tromey <tom@tromey.com>
8413 * solib.c: Include source.h.
8414 * nto-tdep.c: Include source.h.
8415 * mi/mi-cmd-env.c: Include source.h.
8416 * infcmd.c: Include source.h.
8417 * exec.c: Include source.h.
8418 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8419 (add_path, directory_switch, source_path, init_source_path): Move
8421 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8422 (add_path, directory_switch, source_path, init_source_path):
8425 2018-02-14 Tom Tromey <tom@tromey.com>
8427 * solist.h (exec_file_find, solib_find): Return
8429 (solib_bfd_fopen): Take a const char *.
8430 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8431 (exec_file_find, solib_find): Likewise.
8432 (solib_bfd_fopen): Do not take ownership of "pathname".
8433 (solib_bfd_open): Use unique_xmalloc_ptr.
8434 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8435 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8436 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8437 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8439 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8441 * ada-lang.c (name_match_type_from_name): Remove reference to
8442 ada_name_for_lookup in function's documentation.
8443 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8445 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8447 * defs.h (enum openp_flags): New enum.
8448 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8449 Move to enum openp_flags.
8450 (openp_flags): New enum flags.
8451 (openp): Change parameter type to openp_flags.
8452 * source.c (openp): Change parameter type to openp_flags.
8453 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8454 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8456 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8458 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8461 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8463 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8465 (class dwarf2_queue_guard): ...the destructor of this new class.
8466 (dw2_do_instantiate_symtab): Create instance of the new class
8467 dwarf2_queue_guard, remove cleanup.
8469 2018-02-09 Tom Tromey <tom@tromey.com>
8471 * source.c (find_source_lines): Don't reference past the end of
8474 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8476 * remote.c (remote_btrace_maybe_reopen): Change error message.
8477 * btrace.c (btrace_enable): Likewise.
8478 (parse_xml_btrace): Likewise.
8479 (parse_xml_btrace_conf): Likewise.
8481 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8483 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8484 (linux_enable_pt, linux_enable_bts): Call
8485 diagnose_perf_event_open_fail.
8487 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8489 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8490 Remove parameter and change return type. Update callers. Move it.
8491 (linux_enable_bts, linux_enable_pt): Improve error message.
8492 (linux_enable_pt): Remove zero buffer size check.
8493 (linux_enable_btrace): Improve error messages. Remove NULL return
8496 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8498 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8499 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8500 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8501 (linux_supports_pt, linux_supports_btrace): Remove.
8502 (linux_enable_bts): Call cpu_supports_bts.
8503 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8504 * remote.c (remote_supports_btrace): Remove.
8505 (init_remote_ops): Remove remote_supports_btrace.
8506 * target-delegates.c: Regenerated.
8507 * target.c (target_supports_btrace): Remove.
8508 * target.h (target_ops) <to_supports_btrace>: Remove
8509 (target_supports_btrace): Remove.
8510 * x86-linux-nat.c (x86_linux_create_target): Remove
8511 linux_supports_btrace.
8513 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8515 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8517 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8518 exception and use message in own exception.
8520 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8522 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8523 (perf_event_pt_event_type): Use gdb_file_up.
8524 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8525 scoped_fd, and scoped_mmap.
8527 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8529 * common/scoped_mmap.h: New.
8530 * unittests/scoped_mmap-selftest.c: New.
8531 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8532 unittests/scoped_mmap-selftest.c.
8534 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8536 * common/scoped_fd.h: New.
8537 * unittests/scoped_fd-selftest.c: New.
8538 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8539 unittests/scoped_fd-selftest.c.
8541 2018-02-09 Tom Tromey <tom@tromey.com>
8543 * auto-load.c (auto_load_section_scripts): Use
8544 gdb::unique_xmalloc_ptr.
8546 2018-02-09 Tom Tromey <tom@tromey.com>
8548 * auto-load.c (execute_script_contents): Use std::string.
8550 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8552 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8553 Python function, rather than a new command.
8555 2018-02-08 Tom Tromey <tom@tromey.com>
8557 * solib.c (solib_find_1): Use std::string.
8558 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8560 2018-02-08 Tom Tromey <tom@tromey.com>
8562 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8564 2018-02-08 Tom Tromey <tom@tromey.com>
8566 * source.c (find_source_lines): Use gdb::def_vector.
8568 2018-02-08 Tom Tromey <tom@tromey.com>
8570 * macrocmd.c (struct temporary_macro_definition): New.
8571 (macro_define_command): Use temporary_macro_definition. Remove
8573 (free_macro_definition_ptr): Remove.
8575 2018-02-08 Tom Tromey <tom@tromey.com>
8577 * macroexp.c (maybe_expand): Use std::string.
8579 2018-02-08 Tom Tromey <tom@tromey.com>
8581 * macroexp.c (struct macro_buffer): Add initializers for some
8583 (init_buffer, init_shared_buffer, free_buffer)
8584 (free_buffer_return_text): Remove.
8585 (macro_buffer): New constructors.
8586 (~macro_buffer): New destructor.
8587 (macro_buffer::set_shared): New method.
8588 (macro_buffer::resize_buffer, macro_buffer::appendc)
8589 (macro_buffer::appendmem): Now methods, not free functions.
8590 (set_token, append_tokens_without_splicing, stringify)
8591 (macro_stringify): Update.
8592 (gather_arguments): Change return type. Remove argc_p argument,
8593 add args_ptr argument. Use std::vector.
8594 (substitute_args): Remove argc argument. Accept std::vector.
8595 (expand): Update. Use std::vector.
8596 (scan, macro_expand, macro_expand_next): Update.
8598 2018-02-08 Tom Tromey <tom@tromey.com>
8600 * symtab.c (default_collect_symbol_completion_matches_break_on):
8601 Use unique_xmalloc_ptr.
8602 * macroscope.h: (sal_macro_scope, user_macro_scope)
8603 (default_macro_scope): Return unique_xmalloc_ptr.
8604 * macroscope.c (sal_macro_scope, user_macro_scope)
8605 (default_macro_scope): Return unique_xmalloc_ptr.
8606 * macroexp.h (macro_expand, macro_expand_once): Return
8608 * macroexp.c (macro_expand, macro_expand_once): Return
8610 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8611 (info_macro_command, info_macros_command): Use
8613 * compile/compile-c-support.c (write_macro_definitions): Use
8615 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8617 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8619 * value.c (value_static_field): Assign field type instead of
8620 containing type when returning an optimized out value.
8622 2018-02-06 Yao Qi <yao.qi@linaro.org>
8624 * ft32-tdep.c (ft32_read_pc): Remove.
8625 (ft32_write_pc): Remove.
8626 (ft32_gdbarch_init): Update.
8627 * m32r-tdep.c (m32r_read_pc): Remove.
8628 (m32r_gdbarch_init): Update.
8629 * mep-tdep.c (mep_read_pc): Remove.
8630 (mep_gdbarch_init): Update.
8631 * microblaze-tdep.c (microblaze_write_pc): Remove.
8632 (microblaze_gdbarch_init): Update.
8633 * mn10300-tdep.c (mn10300_read_pc): Remove.
8634 (mn10300_write_pc): Remove.
8635 (mn10300_gdbarch_init): Update.
8636 * moxie-tdep.c (moxie_read_pc): Remove.
8637 (moxie_write_pc): Remove.
8638 (moxie_gdbarch_init): Update.
8640 2018-02-06 Yao Qi <yao.qi@linaro.org>
8642 * expprint.c (print_subexp_standard): Handle
8643 OP_F77_UNDETERMINED_ARGLIST.
8644 (dump_subexp_body_standard): Likewise.
8646 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8648 * target-descriptions.c (tdesc_element_visitor) Add empty
8650 (tdesc_type): Move make_gdb_type from here.
8651 (tdesc_type_builtin): Likewise.
8652 (tdesc_type_vector): Likewise.
8653 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8654 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8655 (make_gdb_type_union): Likewise.
8656 (make_gdb_type_flags): Likewise.
8657 (make_gdb_type_enum): Likewise.
8658 (make_gdb_type): New function.
8659 (tdesc_register_type): Use static make_gdb_type.
8661 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8663 * infcmd.c (default_print_one_register_info): Align natural-format
8664 column values consistently one under another.
8665 (pad_to_column): New function.
8667 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8669 * dwarf2read.c (dwarf2_physname): Move commment.
8671 2018-02-01 Leszek Swirski <leszeks@google.com>
8673 * varobj.c (varobj_formatted_print_options): Allow recursive
8674 pretty printing if pretty printing is enabled.
8676 2018-02-01 Leszek Swirski <leszeks@google.com>
8678 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8679 names after a structop as a filename.
8681 2018-02-01 Yao Qi <yao.qi@linaro.org>
8683 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8684 (arm_record_coproc_data_proc): Likewise.
8686 2018-02-01 Yao Qi <yao.qi@linaro.org>
8688 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8690 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8692 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8693 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8695 2018-01-31 Pedro Alves <palves@redhat.com>
8697 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8698 * inflow.c (child_terminal_save_inferior): Wrap reference to
8699 tcgetpgrp in HAVE_TERMIOS_H.
8700 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8702 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8703 always iterate over all inferiors.
8704 (gdbsim_cntrl_c): Adjust.
8705 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8707 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8709 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8710 index type is objfile-owned if the element type is as well.
8712 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8716 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8718 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8719 "features/s390x-linux64.c".
8720 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8721 s390_linux32 and s390x_linux64.
8722 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8724 * s390-tdep.c: Include "features/s390-linux32.c" and
8725 "features/s390x-linux64.c".
8726 (s390_tdesc_valid): Add check for tdesc_has_registers.
8727 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8728 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8729 tdesc_s390x_linux64.
8730 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8731 tdesc_s390x_linux64 to...
8732 * s390-tdep.h: ...here.
8734 2018-01-30 Pedro Alves <palves@redhat.com>
8737 * config.in, configure: Regenerate.
8738 * configure.ac: Check for getpgid.
8739 * go32-nat.c (go32_pass_ctrlc): New.
8740 (go32_target): Install it.
8741 * inf-child.c (inf_child_target): Install
8742 child_terminal_save_inferior, child_pass_ctrlc and
8744 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8745 (inf_ptrace_target): No longer install it.
8746 * infcmd.c (interrupt_target_1): Adjust.
8747 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8748 (child_interrupt): Declare.
8749 (inferior::terminal_state): New.
8750 * inflow.c (struct terminal_info): Update comments.
8751 (inferior_process_group): Delete.
8752 (terminal_is_ours): Delete.
8753 (gdb_tty_state): New.
8754 (child_terminal_init): Adjust.
8755 (is_gdb_terminal, sharing_input_terminal_1)
8756 (sharing_input_terminal): New functions.
8757 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8758 Set the process's actual process group in the foreground if
8759 possible. Handle is_ours_for_output/is_ours distinction. Don't
8760 mark terminal as the inferior's if not sharing GDB's terminal.
8761 Don't check attach_flag.
8762 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8763 pass down a target_terminal_state.
8764 (child_terminal_save_inferior): New, factored out from ...
8765 (child_terminal_ours_1): ... this. Handle
8766 target_terminal_state::is_ours_for_output.
8767 (child_interrupt, child_pass_ctrlc): New.
8768 (inflow_inferior_exit): Clear the inferior's terminal_state.
8769 (copy_terminal_info): Copy the inferior's terminal state.
8770 (_initialize_inflow): Remove reference to terminal_is_ours.
8771 * inflow.h (inferior_process_group): Delete.
8772 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8773 * procfs.c (procfs_target): Don't install procfs_interrupt.
8774 (procfs_interrupt): Delete.
8775 * remote.c (remote_serial_quit_handler): Adjust.
8776 (remote_interrupt): Remove ptid parameter. Adjust.
8777 * target-delegates.c: Regenerate.
8778 * target.c: Include "terminal.h".
8779 (target_terminal::terminal_state): Rename to ...
8780 (target_terminal::m_terminal_state): ... this.
8781 (target_terminal::init): Adjust.
8782 (target_terminal::inferior): Adjust to per-inferior
8784 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8785 (target_terminal::ours, target_terminal::ours_for_output): Use
8786 target_terminal_is_ours_kind.
8787 (target_interrupt): Remove ptid parameter. Adjust.
8788 (default_target_pass_ctrlc): Adjust.
8789 * target.h (target_ops::to_terminal_save_inferior): New field.
8790 (target_ops::to_interrupt): Remove ptid_t parameter.
8791 (target_interrupt): Remove ptid_t parameter. Update comment.
8792 (target_pass_ctrlc): Update comment.
8793 * target/target.h (target_terminal_state): New scoped enum,
8795 (target_terminal::terminal_state): ... here.
8796 (target_terminal::inferior): Update comments.
8797 (target_terminal::restore_inferior): New.
8798 (target_terminal::is_inferior, target_terminal::is_ours)
8799 (target_terminal::is_ours_for_output): Adjust.
8800 (target_terminal::scoped_restore_terminal_state): Adjust to
8801 rename, and call restore_inferior() instead of inferior().
8802 (target_terminal::scoped_restore_terminal_state::m_state): Change
8804 (target_terminal::terminal_state): Rename to ...
8805 (target_terminal::m_terminal_state): ... this and change type.
8807 2018-01-30 Pedro Alves <palves@redhat.com>
8809 * linux-nat.c (wait_for_signal): New function.
8810 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8812 (async_terminal_is_ours)
8813 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8814 (linux_nat_add_target): Don't override
8815 to_terminal_inferior/to_terminal_ours.
8817 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8819 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8821 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8823 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8824 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8825 dwarf2_per_objfile_free here.
8826 (dwarf2_per_objfile_free): Remove.
8827 (_initialize_dwarf2_read): Don't register
8828 dwarf2_per_objfile_free as a registry cleanup.
8830 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8832 Avoid compilation errors in MinGW native builds
8834 The error is triggered by including python-internal.h, and the
8837 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8838 from build-gnulib/import/math.h:27,
8839 from d:/usr/Python26/include/pyport.h:235,
8840 from d:/usr/Python26/include/Python.h:58,
8841 from python/python-internal.h:94,
8842 from python/py-arch.c:24:
8843 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8847 This happens because Python headers define 'hypot' to expand t
8848 '_hypot' in the Windows builds.
8849 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8850 'hypoth'. This avoids a compilation error.
8852 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8854 * MAINTAINERS (Write After Approval): Fix ordering.
8856 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8858 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8860 2018-01-26 Alan Modra <amodra@gmail.com>
8862 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8863 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8864 Remove nop. Make const. Comment.
8865 (powerpc32_plt_stub_so_2): New.
8866 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8867 Correct count. Update uses.
8868 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8869 Move common code reading PLT entry word. Correct
8870 powerpc32_plt_stub PLT address calculation.
8871 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8872 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8873 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8874 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8875 (ppc64_standard_linkage8): Likewise.
8876 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8877 Correct insns description.
8878 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8880 2018-01-24 Pedro Alves <palves@redhat.com>
8882 GCC PR libstdc++/83906
8883 * gdbtypes.c (operator==(const dynamic_prop &,
8884 const dynamic_prop &)): New.
8885 (operator==(const range_bounds &, const range_bounds &)): New.
8886 (check_types_equal): Use them instead of memcmp.
8887 * gdbtypes.h (operator==(const dynamic_prop &,
8888 const dynamic_prop &)): Declare.
8889 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8890 (operator==(const range_bounds &, const range_bounds &)): Declare.
8891 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8893 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8895 * s390-linux-tdep.c (s390_record_address_mask)
8896 (s390_record_calc_disp_common, s390_record_calc_disp)
8897 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8898 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8899 (s390_process_record): Move to s390-tdep.c.
8900 (s390_linux_init_abi_any): Adjust.
8901 * s390-tdep.c (s390_record_address_mask)
8902 (s390_record_calc_disp_common, s390_record_calc_disp)
8903 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8904 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8905 (s390_process_record): Moved from s390-linux-tdep.c
8906 (s390_gdbarch_init): Adjust.
8908 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8910 * s390-linux-nat.c (s390-tdep.h): New include.
8911 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8912 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8913 (ALLDEPFILES): Add s390-tdep.c.
8914 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8915 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8916 * s390-tdep.h: ...this. New file.
8917 * s390-linux-tdep.c (s390-tdep.h): New include.
8918 (_initialize_s390_tdep): Rename to...
8919 (_initialize_s390_linux_tdep): ...this and adjust.
8920 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8921 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8923 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8924 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8925 (s390_is_partial_instruction, s390_software_single_step)
8926 (is_non_branch_ril, s390_displaced_step_copy_insn)
8927 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8928 (s390_prologue_data, s390_addr, s390_store, s390_load)
8929 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8930 (s390_register_call_saved, s390_guess_tracepoint_registers)
8931 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8932 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8933 (s390_pseudo_register_name, s390_pseudo_register_type)
8934 (s390_pseudo_register_read, s390_pseudo_register_write)
8935 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8936 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8937 (s390_addr_bits_remove, s390_address_class_type_flags)
8938 (s390_address_class_type_flags_to_name)
8939 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8940 (s390_function_arg_float, s390_function_arg_vector)
8941 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8942 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8943 (s390_frame_align, s390_register_return_value, s390_return_value)
8944 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8945 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8946 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8947 (s390_trad_frame_prev_register, s390_unwind_cache)
8948 (s390_prologue_frame_unwind_cache)
8949 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8950 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8951 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8952 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8953 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8954 (s390_frame_base_address, s390_local_base_address)
8955 (s390_frame_base, s390_gcc_target_options)
8956 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8957 (s390_validate_reg_range, s390_tdesc_valid)
8958 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8959 * s390-tdep.c: ...this. New file.
8961 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8963 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8964 (s390_process_record, s390_gdbarch_tdep_alloc)
8965 (s390_linux_init_abi_any): Use/set new hook.
8967 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8969 * s390-linux-tdep.c (osabi.h): New include.
8970 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8971 (s390_linux_init_abi_any): New functions.
8972 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8974 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8976 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8977 tdesc_has_registers check
8979 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8981 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8982 (s390_validate_reg_range): New macro.
8983 (s390_gdbarch_init): Adjust.
8985 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8987 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8988 (s390_gdbarch_tdep_alloc): Adjust.
8989 (s390_gdbarch_init): Adjust.
8991 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8993 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8994 <have_tdb>: Change type to bool.
8995 (s390_gdbarch_tdep_alloc): Adjust.
8996 (s390_gdbarch_init): Adjust.
8998 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9000 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9001 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9002 (s390_gdbarch_tdep_alloc): New function.
9003 (s390_gdbarch_init): Allocate tdep at start and use its fields
9004 instead of separate variables.
9006 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9008 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9009 when looking for cached gdbarch and add comment for remaining.
9011 2018-01-22 Pedro Alves <palves@redhat.com>
9012 Sergio Durigan Junior <sergiodj@redhat.com>
9014 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9017 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9019 * MAINTAINERS: Update my company e-mail address.
9021 2018-01-22 Yao Qi <yao.qi@linaro.org>
9023 * regcache.c (cooked_write_test): New function.
9024 (_initialize_regcache): Register the test.
9026 2018-01-22 Yao Qi <yao.qi@linaro.org>
9028 * ia64-tdep.c (ia64_pseudo_register_read): Call
9029 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9030 * m32c-tdep.c (m32c_cat_read): Likewise.
9031 (m32c_r3r2r1r0_read): Likewise.
9032 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9033 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9035 2018-01-22 Yao Qi <yao.qi@linaro.org>
9037 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9038 method raw_read instead of regcache_raw_read.
9039 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9040 * arm-tdep.c (arm_neon_quad_read): Likewise.
9041 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9042 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9043 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9044 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9045 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9046 (i386_pseudo_register_read_into_value): Likewise.
9047 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9048 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9049 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9050 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9051 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9052 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9053 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9054 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9055 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9057 2018-01-22 Yao Qi <yao.qi@linaro.org>
9059 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9060 * configure.tgt: Remove target mt.
9061 * mt-tdep.c: Remove.
9062 * regcache.c (cooked_read_test): Remove the check for mt.
9064 2018-01-22 Yao Qi <yao.qi@linaro.org>
9066 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9067 instead of gdbarch_pseudo_register_read_value.
9069 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9071 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9074 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9076 * linespec.c (create_sals_line_offset): Remove code that preserved
9077 the symtab_and_line's line number.
9079 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9081 * varobj.c (varobj_create): Don't set valid_block when creating a
9084 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9086 * varobj.c (varobj_create): Remove out of date comment.
9088 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9091 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9092 updating innermost block.
9093 * parse.c (innermost_block_tracker::update): Take extra type
9094 parameter, and check types match before updating innermost block.
9095 (write_dollar_variable): Update innermost block for registers.
9096 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9097 (innermost_block_tracker::innermost_block_tracker): Initialise
9099 (innermost_block_tracker::reset): Take type parameter.
9100 (innermost_block_tracker::update): Take type parameter, and pass
9101 type through as needed.
9102 (innermost_block_tracker::m_types): New member.
9103 * varobj.c (varobj_create): Pass type when reseting innermost
9106 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9108 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9109 * ada-lang.c (resolve_subexp): Likewise.
9110 * breakpoint.c (set_breakpoint_condition) Likewise.
9111 (watch_command_1) Likewise.
9112 * c-exp.y (variable): Likewise.
9113 * d-exp.y (PrimaryExpression): Likewise.
9114 * f-exp.y (variable): Likewise.
9115 * go-exp.y (variable): Likewise.
9116 * m2-exp.y (variable): Likewise.
9117 * objfiles.c (objfile::~objfile): Likewise.
9118 * p-exp.y (variable): Likewise.
9119 * parse.c (innermost_block): Change type.
9120 * parser-defs.h (class innermost_block_tracker): New.
9121 (innermost_block): Change to innermost_block_tracker.
9122 * printcmd.c (display_command): Switch to innermost_block API.
9123 (do_one_display): Likewise.
9124 * rust-exp.y (do_one_display): Likewise.
9125 * symfile.c (clear_symtab_users): Likewise.
9126 * varobj.c (varobj_create): Switch to innermost_block API, replace
9127 use of innermost_block with block stored on varobj object.
9129 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9131 * expression.h (innermost_block): Remove declaration.
9132 * varobj.c: Add 'parser-defs.h' include.
9134 2018-01-19 Tom Tromey <tom@tromey.com>
9136 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9137 symbols in the static and global blocks.
9139 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9141 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9142 gdb_ptrace.h, and move including gdb_wait.h ...
9143 * nat/linux-ptrace.h: ... to here.
9145 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9147 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9148 inf_ptrace_detach_success.
9149 (inf_ptrace_detach_success): Add inferior parameter, use it
9150 instead of inferior_ptid, pass it to detach_inferior.
9151 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9153 * inferior.c (detach_inferior): Add overload that takes an
9155 * inferior.h (detach_inferior): Likewise.
9156 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9157 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9158 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9160 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9162 * target.h (struct target_ops) <to_detach>: Add inferior
9164 (target_detach): Likewise.
9165 * target.c (dispose_inferior): Pass inferior down.
9166 (target_detach): Pass inferior down. Assert that it is equal to
9167 the current inferior.
9168 * aix-thread.c (aix_thread_detach): Pass inferior down.
9169 * corefile.c (core_file_command): Pass current_inferior() down.
9170 * corelow.c (core_detach): Add inferior parameter.
9171 * darwin-nat.c (darwin_detach): Likewise.
9172 * gnu-nat.c (gnu_detach): Likewise.
9173 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9174 * infcmd.c (detach_command): Pass current_inferior() down to
9176 * infrun.c (follow_fork_inferior): Pass parent_inf to
9178 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9180 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9181 * linux-thread-db.c (thread_db_detach): Likewise.
9182 * nto-procfs.c (procfs_detach): Likewise.
9183 * procfs.c (procfs_detach): Likewise.
9184 * record.c (record_detach): Likewise.
9185 * record.h (struct inferior): Forward-declare.
9186 (record_detach): Add inferior parameter.
9187 * remote-sim.c (gdbsim_detach): Likewise.
9188 * remote.c (remote_detach_1): Likewise.
9189 (remote_detach): Likewise.
9190 (extended_remote_detach): Likewise.
9191 * sol-thread.c (sol_thread_detach): Likewise.
9192 * target-debug.h (target_debug_print_inferior_p): New macro.
9193 * target-delegates.c: Re-generate.
9194 * top.c (kill_or_detach): Pass inferior down to target_detach.
9195 * windows-nat.c (windows_detach): Add inferior parameter.
9197 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9199 * target.h (struct target_ops) <to_detach>: Remove args
9201 (target_detach): Likewise.
9202 * target.c (dispose_inferior): Adjust.
9203 (target_detach): Remove args parameter, adjust.
9204 * aix-thread.c (aix_thread_detach): Adjust.
9205 * corefile.c (core_file_command): Adjust.
9206 * corelow.c (core_detach): Adjust.
9207 * darwin-nat.c (darwin_detach): Adjust.
9208 * gnu-nat.c (gnu_detach): Adjust.
9209 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9210 * infcmd.c (detach_command): Adjust
9211 * infrun.c (follow_fork_inferior): Adjust.
9212 (handle_vfork_child_exec_or_exit): Adjust.
9213 * linux-fork.c (linux_fork_detach): Remove args parameter.
9214 * linux-fork.h (linux_fork_detach): Likewise.
9215 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9216 * linux-thread-db.c (thread_db_detach): Likewise.
9217 * nto-procfs.c (procfs_detach): Likewise.
9218 * procfs.c (procfs_detach): Likewise.
9219 (do_detach): Remove signo parameter.
9220 * record.c (record_detach): Remove args parameter.
9221 * record.h (record_detach): Likewise.
9222 * remote-sim.c (gdbsim_detach): Likewise.
9223 * remote.c (remote_detach_1): Likewise.
9224 (remote_detach): Likewise.
9225 (extended_remote_detach): Likewise.
9226 * sol-thread.c (sol_thread_detach): Likewise.
9227 * target-delegates.c: Re-generate.
9228 * top.c (struct qt_args) <args>: Remove field.
9229 (kill_or_detach): Don't pass args.
9230 (quit_force): Don't set args.
9231 * windows-nat.c (windows_detach): Remove args parameter.
9233 2018-01-19 Yao Qi <yao.qi@linaro.org>
9235 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9236 (arm_linux_init_abi): Install it.
9238 2018-01-19 Yao Qi <yao.qi@linaro.org>
9240 * osabi.c (gdb_osabi_names): Extend the regexp for
9241 arm-linux-gnueabihf.
9243 2018-01-18 Yao Qi <yao.qi@linaro.org>
9245 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9247 (abbrev_table::add_abbrev): Update.
9248 (abbrev_table::lookup_abbrev): Update.
9250 2018-01-18 Yao Qi <yao.qi@linaro.org>
9252 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9254 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9256 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9259 2018-01-17 Tom Tromey <tom@tromey.com>
9261 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9263 2018-01-17 Tom Tromey <tom@tromey.com>
9265 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9266 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9267 (create_array_type_with_stride): Update.
9268 * dwarf2read.c (set_die_type): Update.
9270 2018-01-17 Tom Tromey <tom@tromey.com>
9272 * dwarf2read.c (delayed_method_info): Remove typedef.
9273 (dwarf2_cu::method_info): Now a std::vector.
9274 (add_to_method_list): Update.
9275 (free_delayed_list): Remove.
9276 (compute_delayed_physnames): Update.
9277 (process_full_comp_unit, process_full_type_unit): Clear the method
9278 list. Remove cleanups.
9279 (psymtab_include_file_name): Add name_holder parameter. Use
9281 (dwarf_decode_lines): Update.
9283 2018-01-17 Tom Tromey <tom@tromey.com>
9284 Simon Marchi <simon.marchi@ericsson.com>
9286 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9287 (dwarf2_per_objfile::free_cached_comp_units)
9288 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9289 (init_cutu_and_read_dies_no_follow): Update.
9290 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9291 (dwarf2_cu::~dwarf2_cu): New.
9292 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9293 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9295 2018-01-17 Tom Tromey <tom@tromey.com>
9296 Simon Marchi <simon.marchi@ericsson.com>
9298 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9299 (struct die_reader_specs) <abbrev_table>: New member.
9300 (struct abbrev_table): Add constructor.
9301 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9302 <abbrev_obstack>: Now an auto_obstack.
9303 (abbrev_table_up): New typedef.
9304 (init_cu_die_reader): Add abbrev_table parameter.
9305 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9306 Add result_dwo_abbrev_table.
9307 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9308 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9310 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9312 (skip_children): Update.
9313 (abbrev_table::alloc_abbrev): Rename from
9314 abbrev_table_alloc_abbrev.
9315 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9316 (abbrev_table::lookup_abbrev): Rename from
9317 abbrev_table_lookup_abbrev.
9318 (abbrev_table_read_table): Return abbrev_table_up.
9319 (abbrev_table_free, abbrev_table_free_cleanup)
9320 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9321 (load_partial_dies): Update.
9323 2018-01-17 Tom Tromey <tom@tromey.com>
9325 * dwarf2read.c (dwarf2_compute_name): Update comment.
9326 (read_func_scope, read_variable): Update.
9327 (new_symbol): Remove.
9328 (new_symbol_full): Rename to new_symbol.
9330 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9333 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9334 a warning instead of throwing an error, set section size to 0 and return
9336 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9338 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9340 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9342 (linux_ptrace_attach_fail_reason_string): Likewise.
9343 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9345 (linux_ptrace_attach_fail_reason_string): Likewise.
9346 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9348 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9350 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9352 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9355 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9356 checking for fs_base/gs_base fields in struct user_regs_struct.
9357 * configure: Regenerate.
9359 2018-01-17 Yao Qi <yao.qi@linaro.org>
9361 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9363 (aarch64_linux_init_abi): Install it to gdbarch hook
9366 2018-01-15 Pedro Alves <palves@redhat.com>
9368 * common/signals-state-save-restore.c
9369 (save_original_signals_state): Fix typos.
9371 2017-01-12 Tom Tromey <tom@tromey.com>
9372 Sergio Durigan Junior <sergiodj@redhat.com>
9374 * Makefile.in (install-only): Install gdb-add-index.
9376 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9378 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9380 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9382 * infrun.c (keep_going_pass_signal): Clear step-over info when
9383 insert_breakpoints fails.
9385 2018-01-11 Pedro Alves <palves@redhat.com>
9388 * infrun.c (resume): Rename to ...
9389 (resume_1): ... this.
9390 (resume): Reimplement as wrapper around resume_1.
9392 2018-01-11 Pedro Alves <palves@redhat.com>
9395 * remote.c (remote_parse_stop_reply): Default to the last-set
9396 general thread instead of to 'magic_null_ptid'.
9398 2018-01-10 Pedro Alves <palves@redhat.com>
9400 * language.h (language_get_symbol_name_matcher): Rename ...
9401 (get_symbol_name_matcher): ... this.
9402 * language.c (language_get_symbol_name_matcher): Ditto.
9403 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9406 2018-01-10 Pedro Alves <palves@redhat.com>
9410 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9411 Adjust to use language_get_symbol_name_matcher instead of
9412 language_defn::la_get_symbol_name_matcher.
9413 * language.c (language_get_symbol_name_matcher): If in Ada mode
9414 and the lookup name is a verbatim match, return Ada's matcher.
9415 * language.h (language_get_symbol_name_matcher): Adjust comment.
9416 (ada_lookup_name_info::verbatim_p):: New method.
9418 2018-01-10 Pedro Alves <palves@redhat.com>
9421 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9422 minsym's language is language_auto or language_cplus, pass down
9423 language_ada instead.
9424 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9426 2018-01-10 Pedro Alves <palves@redhat.com>
9429 * minsyms.c (linkage_name_str): New function.
9430 (iterate_over_minimal_symbols): Use it.
9432 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9434 * NEWS: Document that 'info proc' now works on FreeBSD.
9436 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9438 * configure.ac: Check for kinfo_getfile in libutil.
9439 * configure: Regenerate.
9440 * config.in: Regenerate.
9441 * fbsd-nat.c: Include "fbsd-tdep.h".
9442 (fbsd_fetch_cmdline): New.
9443 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9444 rather than calling error.
9445 (fbsd_info_proc): New.
9446 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9447 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9448 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9450 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9452 * fbsd-nat.c (struct free_deleter): Remove.
9453 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9455 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9457 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9458 NULL for an empty pathname.
9460 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9462 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9463 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9464 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9465 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9466 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9467 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9468 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9469 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9470 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9471 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9472 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9473 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9474 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9475 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9476 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9478 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9480 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9481 (gnu_xfer_auxv): New function.
9482 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9485 2018-01-08 Yao Qi <yao.qi@linaro.org>
9486 Simon Marchi <simon.marchi@ericsson.com>
9488 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9490 (COMMON_OBS): Remove selftest.o.
9491 * configure.ac: Append selftest-arch.c and common/selftest.c to
9492 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9493 * configure: Re-generated.
9494 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9496 (maintenance_info_selftests): Likewise.
9498 2018-01-08 Xavier Roirand <roirand@adacore.com>
9500 * ada-valprint.c (val_print_packed_array_elements): Use
9501 proper number of elements when printing an array indexed
9502 by an enumeration type.
9504 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9506 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9507 (dw2_get_file_names_reader): Adjust.
9508 (lookup_dwo_signatured_type): Adjust.
9509 (lookup_dwp_signatured_type): Adjust.
9510 (lookup_signatured_type): Adjust.
9511 (create_type_unit_group): Adjust.
9512 (get_type_unit_group): Adjust.
9513 (process_psymtab_comp_unit_reader): Adjust.
9514 (build_type_psymtabs_reader): Adjust.
9515 (scan_partial_symbols): Adjust.
9516 (add_partial_symbol): Adjust.
9517 (add_partial_subprogram): Adjust.
9518 (peek_die_abbrev): Adjust.
9519 (fixup_go_packaging): Adjust.
9520 (process_imported_unit_die): Adjust.
9521 (dwarf2_compute_name): Adjust.
9522 (dwarf2_physname): Adjust.
9523 (read_import_statement): Adjust.
9524 (handle_DW_AT_stmt_list): Adjust.
9525 (read_file_scope): Adjust.
9526 (read_func_scope): Adjust.
9527 (read_lexical_block_scope): Adjust.
9528 (read_call_site_scope): Adjust.
9529 (read_variable): Adjust.
9530 (dwarf2_rnglists_process): Adjust.
9531 (dwarf2_ranges_process): Adjust.
9532 (dwarf2_ranges_read): Adjust.
9533 (dwarf2_get_pc_bounds): Adjust.
9534 (dwarf2_record_block_ranges): Adjust.
9535 (dwarf2_add_field): Adjust.
9536 (dwarf2_add_member_fn): Adjust.
9537 (read_structure_type): Adjust.
9538 (process_structure_scope): Adjust.
9539 (read_enumeration_type): Adjust.
9540 (read_array_type): Adjust.
9541 (mark_common_block_symbol_computed): Adjust.
9542 (read_common_block): Adjust.
9543 (read_namespace_type): Adjust.
9544 (read_namespace): Adjust.
9545 (read_module_type): Adjust.
9546 (read_tag_pointer_type): Adjust.
9547 (read_tag_ptr_to_member_type): Adjust.
9548 (read_tag_string_type): Adjust.
9549 (read_subroutine_type): Adjust.
9550 (read_typedef): Adjust.
9551 (read_base_type): Adjust.
9552 (attr_to_dynamic_prop): Adjust.
9553 (read_subrange_type): Adjust.
9554 (read_unspecified_type): Adjust.
9555 (dwarf2_read_abbrevs): Adjust.
9556 (load_partial_dies): Adjust.
9557 (read_partial_die): Adjust.
9558 (find_partial_die): Adjust.
9559 (guess_partial_die_structure_name): Adjust.
9560 (fixup_partial_die): Adjust.
9561 (read_attribute_value): Adjust.
9562 (read_addr_index): Adjust.
9563 (read_addr_index_from_leb128): Adjust.
9564 (read_str_index): Adjust.
9565 (dwarf2_string_attr): Adjust.
9566 (get_debug_line_section): Adjust.
9567 (dwarf_decode_line_header): Adjust.
9568 (lnp_state_machine::check_line_address): Adjust.
9569 (dwarf_decode_lines_1): Adjust.
9570 (dwarf_decode_lines): Adjust.
9571 (dwarf2_start_symtab): Adjust.
9572 (var_decode_location): Adjust.
9573 (new_symbol_full): Adjust.
9574 (dwarf2_const_value_data): Adjust.
9575 (dwarf2_const_value_attr): Adjust.
9576 (dwarf2_const_value): Adjust.
9578 (die_containing_type): Adjust.
9579 (build_error_marker_type): Adjust.
9580 (lookup_die_type): Adjust.
9581 (guess_full_die_structure_name): Adjust.
9582 (anonymous_struct_prefix): Adjust.
9583 (determine_prefix): Adjust.
9584 (dwarf2_name): Adjust.
9585 (follow_die_ref_or_sig): Adjust.
9586 (follow_die_offset): Adjust.
9587 (follow_die_ref): Adjust.
9588 (follow_die_sig_1): Adjust.
9589 (follow_die_sig): Adjust.
9590 (get_signatured_type): Adjust.
9591 (get_DW_AT_signature_type): Adjust.
9592 (decode_locdesc): Adjust.
9593 (dwarf_decode_macros): Adjust.
9594 (cu_debug_loc_section): Adjust.
9595 (fill_in_loclist_baton): Adjust.
9596 (dwarf2_symbol_mark_computed): Adjust.
9597 (init_one_comp_unit): Don't assign
9598 dwarf2_cu::dwarf2_per_objfile.
9599 (set_die_type): Adjust.
9601 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9603 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9604 <dwarf2_per_objfile>: New field.
9605 (dwarf2_per_objfile): Remove global.
9606 (get_dwarf2_per_objfile): New function.
9607 (set_dwarf2_per_objfile): New function.
9608 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9610 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9611 (read_abbrev_offset): Likewise.
9612 (read_indirect_string): Likewise.
9613 (read_indirect_line_string): Likewise.
9614 (read_indirect_string_at_offset): Likewise.
9615 (read_indirect_string_from_dwz): Likewise.
9616 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9618 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9619 (create_all_comp_units): Change objfile parameter to
9621 (create_all_type_units): Likewise.
9622 (process_queue): Add dwarf2_per_objfile parameter.
9623 (read_and_check_comp_unit_head): Likewise.
9624 (lookup_dwo_unit_in_dwp): Likewise.
9625 (get_dwp_file): Likewise.
9626 (process_cu_includes): Likewise.
9627 (struct free_dwo_file_cleanup_data): New struct.
9628 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9629 set_dwarf2_per_objfile.
9630 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9631 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9632 context, adjust calls.
9633 (dw2_instantiate_symtab): Likewise.
9634 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9635 (dw2_get_cu): Likewise.
9636 (create_cu_from_index_list): Change objfile parameter to
9638 (create_cus_from_index_list): Get dwarf2_per_objfile from
9639 context, adjust calls.
9640 (create_cus_from_index): Likewise.
9641 (create_signatured_type_table_from_index): Change objfile
9642 parameter to dwarf2_per_objfile.
9643 (create_signatured_type_table_from_debug_names): Change objfile
9644 parameter to dwarf2_per_objfile.
9645 (create_addrmap_from_index): Likewise.
9646 (create_addrmap_from_aranges): Likewise.
9647 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9648 (dw2_setup): Remove.
9649 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9651 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9652 get_dwarf2_per_objfile.
9653 (dw2_forget_cached_source_info): Likewise.
9654 (dw2_map_symtabs_matching_filename): Likewise.
9655 (struct dw2_symtab_iterator) <index>: Remove.
9656 <dwarf2_per_objfile>: New field.
9657 (dw2_symtab_iter_init): Replace index parameter with
9659 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9660 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9661 (dw2_print_stats): Likewise.
9662 (dw2_dump): Likewise.
9663 (dw2_expand_symtabs_for_function): Likewise.
9664 (dw2_expand_all_symtabs): Likewise.
9665 (dw2_expand_symtabs_with_fullname): Likewise.
9666 (dw2_expand_marked_cus): Replace index and objfile parameters
9667 with dwarf2_per_objfile.
9668 (dw_expand_symtabs_matching_file_matcher): Add
9669 dwarf2_per_objfile parameter and adjust calls.
9670 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9672 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9673 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9675 (create_cus_from_debug_names_list): Replace objfile parameter
9676 with dwarf2_per_objfile and adjust calls.
9677 (create_cus_from_debug_names): Likewise.
9678 (dwarf2_read_debug_names): Likewise.
9679 (mapped_debug_names::namei_to_name): Adjust call.
9680 (dw2_debug_names_iterator::next): Likewise.
9681 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9682 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9683 (dw2_debug_names_dump): Likewise.
9684 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9685 (dw2_debug_names_expand_symtabs_matching): Likewise.
9686 (dwarf2_initialize_objfile): Likewise.
9687 (dwarf2_build_psymtabs): Likewise.
9688 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9690 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9691 (read_and_check_comp_unit_head): Likewise.
9692 (read_abbrev_offset): Likewise.
9693 (create_debug_type_hash_table): Likewise.
9694 (create_debug_types_hash_table): Likewise.
9695 (create_all_type_units): Replace objfile parameter with
9697 (add_type_unit): Add dwarf2_per_objfile parameter.
9698 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9699 with dwarf2_per_objfile.
9700 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9701 (lookup_dwp_signatured_type): Likewise.
9702 (lookup_signatured_type): Likewise.
9703 (read_cutu_die_from_dwo): Likewise.
9704 (init_tu_and_read_dwo_dies): Likewise.
9705 (init_cutu_and_read_dies): Likewise.
9706 (init_cutu_and_read_dies_no_follow): Likewise.
9707 (allocate_type_unit_groups_table): Add objfile parameter.
9708 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9709 (get_type_unit_group): Likewise.
9710 (process_psymtab_comp_unit): Update call.
9711 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9712 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9713 (print_tu_stats): Likewise.
9714 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9716 (build_type_psymtabs): Change objfile parameter to
9718 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9719 passed in void* parameter.
9720 (process_skeletonless_type_units): Change objfile parameter to
9722 (set_partial_user): Likewise.
9723 (dwarf2_build_psymtabs_hard): Likewise.
9724 (read_comp_units_from_section): Likewise.
9725 (create_all_comp_units): Likewise.
9726 (scan_partial_symbols): Update calls.
9727 (add_partial_symbol): Likewise.
9728 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9729 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9730 (process_queue): Add dwarf2_per_objfile parameter.
9731 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9732 (compute_compunit_symtab_includes): Likewise.
9733 (process_cu_includes): Add dwarf2_per_objfile parameter.
9734 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9735 (process_full_type_unit): Likewise.
9736 (process_imported_unit_die): Update call.
9737 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9738 (read_file_scope): Likewise.
9739 (allocate_dwo_file_hash_table): Add objfile parameter.
9740 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9741 (create_cus_hash_table): Likewise.
9742 (create_dwp_hash_table): Likewise.
9743 (create_dwo_unit_in_dwp_v1): Likewise.
9744 (create_dwp_v2_section): Likewise.
9745 (create_dwo_unit_in_dwp_v2): Likewise.
9746 (lookup_dwo_unit_in_dwp): Likewise.
9747 (try_open_dwop_file): Likewise.
9748 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9749 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9750 cleanup to include a reference to dwarf2_per_objfile.
9751 (open_dwp_file): Add dwarf2_per_objfile parameter.
9752 (open_and_init_dwp_file): Likewise.
9753 (get_dwp_file): Likewise.
9754 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9755 (queue_and_load_all_dwo_tus): Update call.
9756 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9758 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9759 (dwarf2_ranges_process): Likewise.
9760 (dwarf2_get_pc_bounds): Likewise.
9761 (mark_common_block_symbol_computed): Likewise.
9762 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9763 (dwarf2_read_abbrevs): Update call.
9764 (read_partial_die): Use dwarf2_per_objfile from cu.
9765 (find_partial_die): Likewise.
9766 (fixup_partial_die): Likewise.
9767 (read_attribute_value): Likewise.
9768 (read_indirect_string_at_offset_from): Add objfile parameter.
9769 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9771 (read_indirect_string_from_dwz): Add objfile parameter.
9772 (read_indirect_string): Add objfile parameter.
9773 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9774 (read_addr_index): Use dwarf2_per_objfile from cu.
9775 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9777 (read_str_index): Use dwarf2_per_objfile from cu.
9778 (get_debug_line_section): Likewise.
9779 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9780 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9781 (new_symbol_full): Use dwarf2_per_objfile from cu.
9782 (build_error_marker_type): Likewise.
9783 (lookup_die_type): Likewise.
9784 (determine_prefix): Likewise.
9785 (follow_die_offset): Likewise.
9786 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9787 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9788 (dwarf2_fetch_die_type_sect_off): Likewise.
9789 (dwarf2_get_die_type): Likewise.
9790 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9791 (get_signatured_type): Likewise.
9792 (get_DW_AT_signature_type): Likewise.
9793 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9794 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9795 (cu_debug_loc_section): Likewise.
9796 (fill_in_loclist_baton): Likewise.
9797 (dwarf2_symbol_mark_computed): Likewise.
9798 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9800 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9802 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9803 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9804 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9805 (set_die_type): Use dwarf2_free_objfile from cu.
9806 (get_die_type_at_offset): Likewise.
9807 (dwarf2_per_objfile_free): Don't assign global variable.
9808 (debug_names) <constructor>: Add dwarf2_per_objfile
9809 parameter, update m_debugstrlookup construction.
9810 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9812 <m_dwarf2_per_objfile>: New field.
9813 <lookup>: Use m_dwarf2_per_objfile.
9814 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9815 (psyms_seen_size): Likewise.
9816 (write_gdbindex): Replace objfile parameter with
9818 (write_debug_names): Likewise.
9819 (write_psymtabs_to_index): Likewise.
9820 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9823 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9825 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9826 <dwarf2_per_objfile>: New field.
9827 (struct dwarf2_per_cu_data) <objfile>: Remove.
9828 <dwarf2_per_objfile>: New field.
9829 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9831 (create_signatured_type_table_from_index): Likewise.
9832 (create_debug_type_hash_table): Likewise.
9833 (fill_in_sig_entry_from_dwo_entry): Likewise.
9834 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9835 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9837 (create_partial_symtab): Access objfile through
9839 (process_psymtab_comp_unit_reader): Likewise.
9840 (read_comp_units_from_section): Likewise.
9841 (scan_partial_symbols): Likewise.
9842 (add_partial_symbol): Likewise.
9843 (add_partial_subprogram): Likewise.
9844 (peek_die_abbrev): Likewise.
9845 (fixup_go_packaging): Likewise.
9846 (process_full_comp_unit): Likewise.
9847 (process_full_type_unit): Likewise.
9848 (process_imported_unit_die): Likewise.
9849 (dwarf2_compute_name): Likewise.
9850 (dwarf2_physname): Likewise.
9851 (read_import_statement): Likewise.
9852 (create_cus_hash_table): Assign dwarf2_physname instead of
9854 (read_func_scope): Access objfile through dwarf2_per_objfile.
9855 (read_lexical_block_scope): Likewise.
9856 (read_call_site_scope): Likewise.
9857 (read_variable): Likewise.
9858 (dwarf2_rnglists_process): Likewise.
9859 (dwarf2_ranges_process): Likewise.
9860 (dwarf2_ranges_read): Likewise.
9861 (dwarf2_record_block_ranges): Likewise.
9862 (dwarf2_add_field): Likewise.
9863 (dwarf2_add_member_fn): Likewise.
9864 (read_structure_type): Likewise.
9865 (process_structure_scope): Likewise.
9866 (read_enumeration_type): Likewise.
9867 (read_array_type): Likewise.
9868 (read_common_block): Likewise.
9869 (read_namespace_type): Likewise.
9870 (read_namespace): Likewise.
9871 (read_module_type): Likewise.
9872 (read_tag_pointer_type): Likewise.
9873 (read_tag_ptr_to_member_type): Likewise.
9874 (read_tag_string_type): Likewise.
9875 (read_subroutine_type): Likewise.
9876 (read_typedef): Likewise.
9877 (read_base_type): Likewise.
9878 (attr_to_dynamic_prop): Likewise.
9879 (read_subrange_type): Likewise.
9880 (read_unspecified_type): Likewise.
9881 (load_partial_dies): Likewise.
9882 (read_partial_die): Likewise.
9883 (find_partial_die): Likewise.
9884 (guess_partial_die_structure_name): Likewise.
9885 (fixup_partial_die): Likewise.
9886 (read_attribute_value): Likewise.
9887 (read_addr_index_from_leb128): Likewise.
9888 (dwarf2_read_addr_index): Likewise.
9889 (dwarf2_string_attr): Likewise.
9890 (lnp_state_machine::check_line_address): Likewise.
9891 (dwarf_decode_lines_1): Likewise.
9892 (dwarf_decode_lines): Likewise.
9893 (dwarf2_start_symtab): Likewise.
9894 (var_decode_location): Likewise.
9895 (new_symbol_full): Likewise.
9896 (dwarf2_const_value_data): Likewise.
9897 (dwarf2_const_value_attr): Likewise.
9898 (dwarf2_const_value): Likewise.
9899 (die_type): Likewise.
9900 (die_containing_type): Likewise.
9901 (lookup_die_type): Likewise.
9902 (guess_full_die_structure_name): Likewise.
9903 (anonymous_struct_prefix): Likewise.
9904 (dwarf2_name): Likewise.
9905 (follow_die_ref_or_sig): Likewise.
9906 (follow_die_offset): Likewise.
9907 (follow_die_ref): Likewise.
9908 (dwarf2_fetch_die_loc_sect_off): Likewise.
9909 (dwarf2_fetch_constant_bytes): Likewise.
9910 (dwarf2_fetch_die_type_sect_off): Likewise.
9911 (dwarf2_get_die_type): Likewise.
9912 (follow_die_sig): Likewise.
9913 (decode_locdesc): Likewise.
9914 (dwarf2_per_cu_objfile): Likewise.
9915 (dwarf2_per_cu_text_offset): Likewise.
9916 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9918 (set_die_type): Access objfile through
9921 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9923 * valprint.c (converted_character_d): Remove typedef.
9924 (DEF_VEC_O (converted_character_d)): Remove.
9925 (count_next_character): Use std::vector.
9926 (print_converted_chars_to_obstack): Likewise.
9927 (generic_printstr): Likewise.
9929 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9931 * xml-support.h (struct gdb_xml_value): Add constructor.
9932 <value>: Change type to unique_xmalloc_ptr.
9933 (gdb_xml_value_s): Remove typedef.
9934 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9935 (gdb_xml_element_start_handler): Change parameter type to
9937 (xml_find_attribute): Likewise.
9938 * xml-support.c (xml_find_attribute): Change parameter type to
9939 std::vector and adjust.
9940 (gdb_xml_values_cleanup): Remove.
9941 (gdb_xml_parser::start_element): Adjust to std::vector.
9942 (xinclude_start_include): Change paraeter type to std::vector
9944 * btrace.c (check_xml_btrace_version): Likewise.
9945 (parse_xml_btrace_block): Likewise.
9946 (parse_xml_btrace_pt_config_cpu): Likewise.
9947 (parse_xml_btrace_pt): Likewise.
9948 (parse_xml_btrace_conf_bts): Likewise.
9949 (parse_xml_btrace_conf_pt): Likewise.
9950 * memory-map.c (memory_map_start_memory): Likewise.
9951 (memory_map_start_property): Likewise.
9952 * osdata.c (osdata_start_osdata): Likewise.
9953 (osdata_start_item): Likewise.
9954 (osdata_start_column): Likewise.
9955 * remote.c (start_thread): Likewise.
9956 * solib-aix.c (library_list_start_library): Likewise.
9957 (library_list_start_list): Likewise.
9958 * solib-svr4.c (library_list_start_library): Likewise.
9959 (svr4_library_list_start_list): Likewise.
9960 * solib-target.c (library_list_start_segment): Likewise.
9961 (library_list_start_section): Likewise.
9962 (library_list_start_library): Likewise.
9963 (library_list_start_list): Likewise.
9964 * tracepoint.c (traceframe_info_start_memory): Likewise.
9965 (traceframe_info_start_tvar): Likewise.
9966 * xml-syscall.c (syscall_start_syscall): Likewise.
9967 * xml-tdesc.c (tdesc_start_target): Likewise.
9968 (tdesc_start_feature): Likewise.
9969 (tdesc_start_reg): Likewise.
9970 (tdesc_start_union): Likewise.
9971 (tdesc_start_struct): Likewise.
9972 (tdesc_start_flags): Likewise.
9973 (tdesc_start_enum): Likewise.
9974 (tdesc_start_field): Likewise.
9975 (tdesc_start_enum_value): Likewise.
9976 (tdesc_start_vector): Likewise.
9978 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9980 * extension.h (struct xmethod_worker) <clone>: Remove.
9981 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9983 (python_xmethod_worker::clone): Remove.
9984 * valops.c (find_overload_match): Use std::move instead of
9987 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9989 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9990 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9991 <free_xmethod_worker_data>: Remove.
9992 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9993 <get_xmethod_arg_types>: Remove.
9994 <get_xmethod_result_type>: Remove.
9995 <invoke_xmethod>: Remove.
9996 * extension.c (new_xmethod_worker): Remove.
9997 (clone_xmethod_worker): Remove.
9998 (get_matching_xmethod_workers): Return void, pass std::vector by
10000 (get_xmethod_arg_types): Rename to...
10001 (xmethod_worker::get_arg_types): ... this, and adjust.
10002 (get_xmethod_result_type): Rename to...
10003 (xmethod_worker::get_result_type): ... this, and adjust.
10004 (invoke_xmethod): Remove.
10005 (free_xmethod_worker): Remove.
10006 (free_xmethod_worker_vec): Remove.
10007 * extension.h (enum ext_lang_rc): Move here from
10009 (struct xmethod_worker): Add constructor and destructor.
10012 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10013 virtual pure methods.
10014 <get_arg_types, get_result_type>: New methods.
10015 (xmethod_worker_ptr): Remove typedef.
10016 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10017 (xmethod_worker_vec): Remove typedef.
10018 (xmethod_worker_up): New typedef.
10019 (invoke_xmethod): Remove.
10020 (clone_xmethod_worker): Remove.
10021 (free_xmethod_worker): Remove.
10022 (free_xmethod_worker_vec): Remove.
10023 (get_xmethod_arg_types): Remove.
10024 (get_xmethod_result_type): Remove.
10025 * valops.c (find_method_list): Use std::vector, don't use
10026 intermediate vector.
10027 (value_find_oload_method_list): Use std::vector.
10028 (find_overload_match): Use std::vector.
10029 (find_oload_champ): Use std::vector.
10030 * value.c (value_free): Use operator delete.
10031 (value_of_xmethod): Rename to...
10032 (value_from_xmethod): ... this. Don't assign
10033 xmethod_worker::value, take rvalue-reference.
10034 (result_type_of_xmethod): Adjust.
10035 (call_xmethod): Adjust.
10036 * value.h: Include extension.h.
10037 (struct xmethod_worker): Don't forward-declare.
10038 (value_of_xmethod): Rename to...
10039 (value_from_xmethod): ... this, take rvalue-reference.
10040 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10041 (struct python_xmethod_worker): ... this, add constructor and
10043 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10044 (gdbpy_free_xmethod_worker_data): Rename to...
10045 (python_xmethod_worker::~python_xmethod_worker): ... this and
10047 (gdbpy_clone_xmethod_worker_data): Rename to...
10048 (python_xmethod_worker::clone): ... this and adjust.
10049 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10051 (gdbpy_get_xmethod_arg_types): Rename to...
10052 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10053 (gdbpy_get_xmethod_result_type): Rename to...
10054 (python_xmethod_worker::do_get_result_type): ... this and
10056 (gdbpy_invoke_xmethod): Rename to...
10057 (python_xmethod_worker::invoke): ... this and adjust.
10058 (new_python_xmethod_worker): Rename to...
10059 (python_xmethod_worker::python_xmethod_worker): ... this and
10061 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10063 (gdbpy_free_xmethod_worker_data): Remove.
10064 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10065 (gdbpy_get_xmethod_arg_types): Remove.
10066 (gdbpy_get_xmethod_result_type): Remove.
10067 (gdbpy_invoke_xmethod): Remove.
10068 * python/python.c (python_extension_ops): Remove obsolete
10071 2018-01-05 Pedro Alves <palves@redhat.com>
10074 * common/signals-state-save-restore.c
10075 (save_original_signals_state): New parameter 'quiet'. Warn if we
10076 find a custom handler preinstalled, instead of internal erroring.
10077 But only warn if !quiet.
10078 * common/signals-state-save-restore.h
10079 (save_original_signals_state): New parameter 'quiet'.
10080 * main.c (captured_main_1): Move save_original_signals_state call
10081 after option handling, and pass QUIET.
10083 2018-01-05 Pedro Alves <palves@redhat.com>
10085 * spu-tdep.c (spu_catch_start): Pass
10086 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10088 2018-01-05 Pedro Alves <palves@redhat.com>
10091 * ada-lang.c (literal_symbol_name_matcher): New function.
10092 (ada_get_symbol_name_matcher): Use it for
10093 symbol_name_match_type::SEARCH_NAME.
10094 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10095 it down instead of assuming symbol_name_match_type::FULL.
10096 * block.h (block_lookup_symbol): New parameter 'match_type'.
10097 * c-valprint.c (print_unpacked_pointer): Use
10098 lookup_symbol_search_name instead of lookup_symbol.
10099 * compile/compile-object-load.c (get_out_value_type): Pass down
10100 symbol_name_match_type::SEARCH_NAME.
10101 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10102 symbol_name_match_type::FULL.
10103 * cp-support.c (cp_get_symbol_name_matcher): Handle
10104 symbol_name_match_type::SEARCH_NAME.
10105 * infrun.c (insert_exception_resume_breakpoint): Use
10106 lookup_symbol_search_name.
10107 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10108 * psymtab.c (maintenance_check_psymtabs): Use
10109 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10110 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10111 SYMBOL_SEARCH_NAME.
10112 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10113 if symbol_name_match_type::SEARCH_NAME.
10114 (lookup_symbol_in_language): Pass down
10115 symbol_name_match_type::FULL.
10116 (lookup_symbol_search_name): New.
10117 (lookup_language_this): Pass down
10118 symbol_name_match_type::SEARCH_NAME.
10119 (lookup_symbol_aux, lookup_local_symbol): New parameter
10120 'match_type'. Pass it down.
10121 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10122 (lookup_symbol_search_name): New declaration.
10123 (lookup_symbol_in_block): New 'match_type' parameter.
10125 2018-01-05 Pedro Alves <palves@redhat.com>
10128 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10130 (ada_lookup_symbol): Reimplement in terms of
10131 ada_lookup_symbol_list, bits factored out from
10132 ada_lookup_encoded_symbol.
10134 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10136 * ada-exp.y (write_object_renaming): When subscripting an array
10137 using a symbol as the index, pass the block in call to
10138 ada_lookup_encoded_symbol when looking that symbol up.
10140 2018-01-05 Jerome Guitton <guitton@adacore.com>
10142 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10145 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10147 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10148 the case where VALUE_LVAL (val0) is not lval_memory.
10150 2018-01-05 Xavier Roirand <roirand@adacore.com>
10152 * ada-valprint.c (print_optional_low_bound): Handle
10153 character-indexed array printing like boolean-indexed array
10156 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10158 * NEWS: Create a new section for the next release branch.
10159 Rename the section of the current branch, now that it has
10162 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10164 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10165 * version.in: Bump version to 8.1.50.DATE-git.
10167 2018-01-03 Xavier Roirand <roirand@adacore.com>
10169 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10171 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10173 (default_exception_support_info) <catch_handlers_sym>: Add field.
10174 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10175 (ada_exception_name_addr_1): Add "catch handlers" handling.
10176 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10177 Update all callers.
10178 (create_excep_cond_exprs) <ex>: Add parameter.
10179 (re_set_exception): Update create_excep_cond_exprs call.
10180 (print_it_exception, print_one_exception, print_mention_exception)
10181 (print_recreate_exception): Add "catch handler" handling.
10182 (allocate_location_catch_handlers, re_set_catch_handlers)
10183 (check_status_catch_handlers, print_it_catch_handlers)
10184 (print_one_catch_handlers, print_mention_catch_handlers)
10185 (print_recreate_catch_handlers): New function.
10186 (catch_handlers_breakpoint_ops): New variable.
10187 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10188 Add parameter. Add "catch handler" handling.
10189 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10190 Add "catch handler" handling.
10191 (ada_exception_catchpoint_cond_string): Add "catch handler"
10193 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10195 (catch_ada_handlers_command): New function.
10196 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10197 operations structure.
10198 (_initialize_ada_language): Add "catch handlers" command entry.
10199 * NEWS: Document "catch handlers" feature.
10201 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10203 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10204 account when creating the array type of the slice.
10205 (ada_value_slice): Likewise.
10207 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10209 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10211 (create_array_type_with_stride): Add byte_stride_prop parameter.
10212 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10213 New parameter. Update all callers in this file.
10214 (array_type_has_dynamic_stride): New function.
10215 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10216 of arrays with dynamic byte strides.
10217 * dwarf2read.c (read_array_type): Add support for dynamic
10218 DW_AT_byte_stride attributes.
10220 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10222 * dwarf2read.c (read_unspecified_type): Treat
10223 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10225 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10227 Update copyright year range in all GDB files.
10229 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10231 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10232 and gdb/testsuite/gdb.base/step-line.c.
10234 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10236 * copyright.py (main): Dump the contents of
10237 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10238 even if BY_HAND is empty.
10240 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10242 * top.c (print_gdb_version): Update Copyright year in version
10245 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10247 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10249 For older changes see ChangeLog-2017.
10255 version-control: never