1 2018-07-17 Tom Tromey <tom@tromey.com>
3 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6 2018-07-17 Jim Wilson <jimw@sifive.com>
8 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
9 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
10 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
11 unecessary braces after EF_RISCV_RVC test. Delete call to
12 set_gdbarch_decr_pc_after_break.
14 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
15 RISCV_LAST_FP_REGNUM + 1.
16 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
18 2018-07-17 Tom Tromey <tom@tromey.com>
20 * configure.ac: Remove --disable-gdbcli.
22 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
23 (SUBDIR_CLI_CFLAGS): Remove.
24 (SFILES): Use SUBDIR_CLI_SRCS.
25 (COMMON_OBS): Use SUBDIR_CLI_OBS.
27 2018-07-17 Tom Tromey <tom@tromey.com>
30 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
32 2018-07-16 Jim Wilson <jimw@sifive.com>
34 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
36 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
38 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
40 (libunwind_frame_sniffer): Likewise.
41 (libunwind_frame_prev_register): Likewise.
42 (libunwind_sigtramp_frame_sniffer): Likewise.
43 * ia64-tdep.c (ia64_access_reg): Likewise.
44 (ia64_access_rse_reg): Likewise.
45 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
46 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
48 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
50 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
52 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
54 * remote-sim.c (gdbsim_target::close,
55 gdbsim_target::mourn_inferior): Remove unused variables.
57 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
59 * ia64-tdep.c (ktab_buf): New global.
60 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
61 (get_kernel_table): Adjust.
63 2018-07-16 Tom Tromey <tom@tromey.com>
65 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
66 * dwarf2read.c (using_directives, new_symbol): Use
68 * dbxread.c (process_one_symbol): Use outermost_context_p.
69 * coffread.c (coff_symtab_read): Use outermost_context_p.
71 2018-07-16 Tom Tromey <tom@tromey.com>
73 * dwarf2read.c (using_directives, read_func_scope)
74 (read_lexical_block_scope): Update.
75 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
76 * buildsym.h (local_using_directives, global_using_directives):
78 (get_local_using_directives, set_local_using_directives)
79 (get_global_using_directives): Declare.
80 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
81 m_global_using_directives>: New members.
82 (finish_block_internal, prepare_for_building)
83 (reset_symtab_globals, end_symtab_get_static_block)
84 (push_context): Update.
85 (get_local_using_directives, set_local_using_directives)
86 (get_global_using_directives): New functions.
87 (buildsym_init): Update.
89 2018-07-16 Tom Tromey <tom@tromey.com>
91 * xcoffread.c (xcoff_initial_scan): Don't call
93 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
94 * buildsym.h (class scoped_free_pendings): Add constructor.
95 (free_pending_blocks): Don't declare.
96 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
97 (free_pending_blocks): Now static.
99 2018-07-16 Tom Tromey <tom@tromey.com>
101 * buildsym.h (push_subfile, pop_subfile): Update declarations.
102 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
104 (struct subfile_stack): Remove.
105 (subfile_stack): Remove.
106 (push_subfile, pop_subfile, buildsym_init): Update.
108 2018-07-16 Tom Tromey <tom@tromey.com>
110 * buildsym.c (push_subfile): Use gdb_assert.
111 (pop_subfile): Use gdb_assert.
113 2018-07-16 Tom Tromey <tom@tromey.com>
115 * buildsym.h (merge_symbol_lists): Remove.
116 * buildsym.c (merge_symbol_lists): Remove.
118 2018-07-16 Tom Tromey <tom@tromey.com>
120 * stabsread.c (scan_file_globals): Update comment.
121 * stabsread.h (scan_file_globals): Move from buildsym.h.
122 * buildsym.h (scan_file_globals): Move to stabsread.h.
124 2018-07-16 Tom Tromey <tom@tromey.com>
126 * xcoffread.c (xcoff_new_init): Update.
127 * mipsread.c (mipscoff_new_init): Update.
128 * mdebugread.c (mdebug_build_psymtabs): Update.
129 * elfread.c (elf_new_init): Update.
130 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
131 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
132 * buildsym.h (buildsym_new_init): Don't declare.
133 * buildsym.c (buildsym_new_init): Remove.
135 2018-07-16 Tom Tromey <tom@tromey.com>
137 * stabsread.h (within_function): Move from buildsym.h.
138 * stabsread.c (start_stabs): Clear within_function.
139 * coffread.c (coff_start_symtab): Clear within_function.
140 * buildsym.h (within_function): Move to stabsread.h.
141 * buildsym.c (prepare_for_building): Update.
143 2018-07-16 Tom Tromey <tom@tromey.com>
145 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
146 * dwarf2read.c (dwarf2_start_symtab): Don't set
147 processing_gcc_compilation.
148 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
150 2018-07-16 Tom Tromey <tom@tromey.com>
152 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
153 (next_symbol_text_func): Move from buildsym.h.
154 * stabsread.c (hashname): Move from buildsym.c.
155 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
156 (next_symbol_text_func, hashname): Move to stabsread.h.
157 * buildsym.c: Don't include bcache.h
158 (hashname): Move to stasbread.c.
160 2018-07-16 Tom Tromey <tom@tromey.com>
162 * buildsym.h (context_stack_size): Don't declare.
163 * buildsym.c (context_stack_size): New global.
165 2018-07-16 Tom Tromey <tom@tromey.com>
167 * dbxread.c (processing_acc_compilation): New global.
168 * buildsym.h (processing_acc_compilation): Don't declare.
170 2018-07-16 Tom Tromey <tom@tromey.com>
172 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
173 * dbxread.c (read_ofile_symtab): Update.
174 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
175 * buildsym.h (last_source_start_addr): Remove.
176 (set_last_source_start_addr, get_last_source_start_addr):
178 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
180 (struct buildsym_compunit) <m_last_source_start_addr>: New
182 (prepare_for_building): Remove start_addr parameter.
183 (start_symtab, restart_symtab, end_symtab_get_static_block)
184 (end_symtab_with_blockvector): Update.
185 (set_last_source_start_addr, get_last_source_start_addr): New
188 2018-07-16 Tom Tromey <tom@tromey.com>
190 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
192 (have_line_numbers): Remove.
193 (record_line, prepare_for_building, end_symtab_get_static_block)
194 (augment_type_symtab): Update.
196 2018-07-16 Tom Tromey <tom@tromey.com>
198 * buildsym.c (~buildsym_compunit): Free the macro table.
199 (struct buildsym_compunit) <get_macro_table, release_macros>: New
201 <m_pending_macros>: New member.
202 (pending_macros): Remove.
203 (~scoped_free_pendings, get_macro_table, prepare_for_building)
204 (reset_symtab_globals, end_symtab_get_static_block)
205 (end_symtab_with_blockvector, augment_type_symtab)
206 (buildsym_init): Update.
208 2018-07-16 Tom Tromey <tom@tromey.com>
210 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
212 (buildsym_compunit::set_last_source_file): New method.
213 <m_last_source_file>: New member.
214 (prepare_for_building): Remove "name" parameter.
215 (start_symtab, restart_symtab, reset_symtab_globals): Update.
216 (last_source_file): Remove.
217 (set_last_source_file, get_last_source_file): Update.
219 2018-07-16 Tom Tromey <tom@tromey.com>
221 * buildsym.c (prepare_for_building): Add assert.
223 2018-07-16 Tom Tromey <tom@tromey.com>
225 * buildsym.c (~buildsym_compunit): Update.
226 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
227 (start_subfile, patch_subfile_names)
228 (end_symtab_with_blockvector): Update.
230 2018-07-16 Tom Tromey <tom@tromey.com>
232 * buildsym.c (struct buildsym_compunit): Add constructor,
233 destructor, initializers.
234 (start_buildsym_compunit): Remove.
235 (free_buildsym_compunit): Use "delete".
236 (start_symtab, restart_symtab): Use "new".
238 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
240 * symfile.c (set_objfile_default_section_offset): Remove struct
243 2018-07-14 Stafford Horne <shorne@gmail.com>
245 * (Responsible Maintainers): Add myself as or1k maintainer.
247 2018-07-13 Tom Tromey <tom@tromey.com>
249 * symfile.c (set_objfile_default_section_offset): Use extra braces
252 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
254 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
257 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
259 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
260 unittests/cli-utils-selftests.c
261 * unittests/cli-utils-selftests.c: New file.
263 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
265 * NEWS: Mention new commands. Mention change to 'thread apply'.
267 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
269 * thread.c (thr_try_catch_cmd): New function.
270 (thread_apply_all_command): Handle qcs flags.
271 (thread_apply_command): Handle qcs flags.
272 (taas_command): New function.
273 (tfaas_command): New function.
274 (_initialize_thread): Update to setup the new commands 'taas
275 and 'tfaas'. Change doc string for 'thread apply'.
277 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
279 * stack.c: (trailing_outermost_frame): New function, mostly
280 extracted from backtrace_command_1.
281 (leading_innermost_frame): New function.
282 (backtrace_command_1): Update to call trailing_outermost_frame.
283 (frame_apply_command_count): New function.
284 (frame_apply_level_command): New function.
285 (frame_apply_all_command): New function.
286 (frame_apply_command): New function.
287 (faas_command): New function.
288 (frame_cmd_list): New variable.
289 (_initialize_stack): Update to setup the new commands 'frame apply'
292 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
294 * cli-utils.c (number_or_range_parser::get_number): Only handle
295 numbers or convenience var as numbers.
296 (parse_flags): New function.
297 (parse_flags_qcs): New function.
298 (number_or_range_parser::finished): Ensure parsing end is detected
299 before end of string.
300 * cli-utils.h (parse_flags): New function.
301 (parse_flags_qcs): New function.
302 (number_or_range_parser): Remove m_finished bool.
303 (number_or_range_parser::skip_range): Set m_in_range to false.
305 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
307 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
310 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
311 Jan Kratochvil <jan.kratochvil@redhat.com>
312 Paul Fertser <fercerpav@gmail.com>
313 Tsutomu Seki <sekiriki@gmail.com>
314 Pedro Alves <palves@redhat.com>
316 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
317 'unittests/parse-connection-spec-selftests.c'.
318 (COMMON_SFILES): Add 'common/netstuff.c'.
319 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
320 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
321 * common/netstuff.c: New file.
322 * common/netstuff.h: New file.
323 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
324 (wait_for_connect): Update comment. New parameter
325 'gdb::optional<int> sock' instead of 'struct serial *scb'.
326 Use 'sock' directly instead of 'scb->fd'.
327 (try_connect): New function, with code from 'net_open'.
328 (net_open): Rewrite main loop to deal with multiple
329 sockets/addresses. Handle IPv6-style hostnames; implement
330 support for IPv6 connections.
331 * unittests/parse-connection-spec-selftests.c: New file.
333 2018-07-11 Pedro Alves <palves@redhat.com>
336 * remote.c (remote_target::remote_detach_pid): Call
339 2018-07-11 Pedro Alves <palves@redhat.com>
341 * h8300-tdep.c (h8300_gdbarch_init): Remove
342 set_gdbarch_ecoff_reg_to_regnum calls.
344 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
347 * c-typeprint.c (c_type_print_base_struct_union): Don't print
348 offsets/sizes for static members of a class/struct.
350 2018-07-11 Alan Hayward <alan.hayward@arm.com>
352 * target-descriptions.c (tdesc_register_bitsize): Rename.
353 * target-descriptions.h (tdesc_register_bitsize): Likewise.
354 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
355 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
357 2018-07-10 Tom Tromey <tom@tromey.com>
359 * breakpoint.c (moribund_locations): Now static and a
361 (breakpoint_init_inferior, moribund_breakpoint_here_p)
362 (build_bpstat_chain, update_global_location_list)
363 (breakpoint_retire_moribund): Update.
364 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
367 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
369 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
370 (riscv_register_reggroup_p): Use new function, remove unneeded
372 (riscv_push_dummy_call): Extend assert to compare against xlen or
373 flen based on register type.
375 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
377 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
379 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
381 * remote.c (show_hardware_watchpoint_limit): New function.
382 (show_hardware_watchpoint_length_limit): New function.
383 (show_hardware_breakpoint_limit): New function.
384 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
385 where appropriate, update help text.
387 2018-07-09 Tom Tromey <tom@tromey.com>
389 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
390 (CLIBS): Don't mention NAT_CLIBS.
392 2018-07-09 Tom Tromey <tom@tromey.com>
394 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
395 (LIBGDB_OBS, clean mostlyclean): Update.
396 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
398 2018-07-09 Tom Tromey <tom@tromey.com>
400 * Makefile.in (%.c: %.y): Use ECHO_YACC.
401 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
402 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
404 2018-07-09 Tom Tromey <tom@tromey.com>
406 * Makefile.in (ALLDEPFILES): Remove exec.c.
407 (COMMON_OBS): Remove exec.o.
408 (COMMON_SFILES): Add exec.c.
410 2018-07-09 Tom Tromey <tom@tromey.com>
412 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
414 2018-07-09 Tom Tromey <tom@tromey.com>
416 * Makefile.in (clean mostlyclean): Remove stamp-version.
417 (version.c): Depend on stamp-version.
418 (stamp-version): New rule, from version.c rule.
420 2018-07-09 Tom Tromey <tom@tromey.com>
422 * Makefile.in (init.c): Depend on stamp-init.
423 (stamp-init): New rule, from init.c rule.
424 (clean mostlyclean): Remove stamp-init.
426 2018-07-09 Tom Tromey <tom@tromey.com>
428 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
429 SUBDIR_GCC_COMPILE_SRCS.
431 2018-07-09 Tom Tromey <tom@tromey.com>
433 * Makefile.in (init.c): Remove some unused sed rules.
435 2018-07-09 Tom Tromey <tom@tromey.com>
437 * Makefile.in (TSOBS): Remove.
438 (INIT_FILES): Update.
439 (LIBGDB_OBS): Update.
440 (COMMON_SFILES): Add inflow.c.
441 (SFILES): Remove inflow.c.
443 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
445 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
447 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
449 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
450 get_saveloc_name, is_signal_frame_name, step_name,
451 init_remote_name, create_addr_space_name,
452 destroy_addr_space_name, search_unwind_table_name,
453 find_dyn_list_name): Constify.
455 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
457 * darwin-nat.c (darwin_pthread_kill): New function.
458 (darwin_resume_thread): Use darwin_pthread_kill.
460 2018-07-05 Tom de Vries <tdevries@suse.de>
462 * macroexp.c (macro_buffer) <operator=>: New member function.
464 2018-07-04 Tom Tromey <tom@tromey.com>
466 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
468 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
470 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
471 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
475 2018-07-04 Joel Brobecker <brobecker@adacore.com>
477 * NEWS: Create a new section for the next release branch.
478 Rename the section of the current branch, now that it has
481 2018-07-04 Joel Brobecker <brobecker@adacore.com>
483 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
484 * version.in: Bump version to 8.2.50.DATE-git.
486 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
487 Pedro Alves <palves@redhat.com>
489 * linux-nat.c (linux_init_ptrace): Rename to ...
490 (linux_init_ptrace_procfs): ... this. Call
491 linux_proc_init_warnings.
492 (linux_nat_target::post_attach)
493 (linux_nat_target::post_startup_inferior): Adjust.
494 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
495 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
497 2018-07-04 Tom de Vries <tdevries@suse.de>
499 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
501 (read_comp_unit_head): ... here.
503 2018-07-03 Tom Tromey <tom@tromey.com>
505 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
506 (stop_tracing, tstatus_command)
507 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
508 (print_one_static_tracepoint_marker): Update.
509 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
511 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
513 (all_tracepoints, static_tracepoints_here): Return std::vector.
515 2018-07-03 Tom Tromey <tom@tromey.com>
517 * common/ptid.c (ptid_equal): Remove.
518 * common/ptid.h (ptid_equal): Don't declare.
519 * ada-tasks.c: Update.
520 * breakpoint.c: Update.
521 * common/agent.c: Update.
523 * darwin-nat-info.c: Update.
524 * darwin-nat.c: Update.
526 * dtrace-probe.c: Update.
527 * dummy-frame.c: Update.
528 * fbsd-nat.c: Update.
530 * gdbthread.h: Update.
532 * go32-nat.c: Update.
533 * inf-loop.c: Update.
534 * inf-ptrace.c: Update.
539 * linux-fork.c: Update.
540 * linux-nat.c: Update.
541 * linux-thread-db.c: Update.
542 * mi/mi-cmd-var.c: Update.
543 * mi/mi-interp.c: Update.
544 * mi/mi-main.c: Update.
545 * nto-procfs.c: Update.
546 * ppc-linux-tdep.c: Update.
548 * python/py-inferior.c: Update.
549 * python/py-record-btrace.c: Update.
550 * python/py-record.c: Update.
551 * ravenscar-thread.c: Update.
552 * regcache.c: Update.
553 * remote-sim.c: Update.
555 * sol-thread.c: Update.
558 * tui/tui-stack.c: Update.
560 * windows-nat.c: Update.
561 * windows-tdep.c: Update.
563 2018-07-03 Tom Tromey <tom@tromey.com>
565 * common/ptid.c (ptid_match): Remove.
566 * common/ptid.h (ptid_match): Don't declare.
567 * fbsd-nat.c: Update.
570 * linux-nat.c: Update.
571 * record-btrace.c: Update.
572 * regcache.c: Update.
575 2018-07-03 Tom Tromey <tom@tromey.com>
577 * common/ptid.c (ptid_tid_p): Remove.
578 * common/ptid.h (ptid_tid_p): Don't declare.
579 * sol-thread.c: Update.
581 2018-07-03 Tom Tromey <tom@tromey.com>
583 * common/ptid.c (ptid_lwp_p): Remove.
584 * common/ptid.h (ptid_lwp_p): Don't declare.
585 * fbsd-nat.c: Update.
586 * linux-nat.c: Update.
587 * nat/linux-procfs.c: Update.
588 * nat/x86-linux-dregs.c: Update.
589 * sol-thread.c: Update.
591 2018-07-03 Tom Tromey <tom@tromey.com>
593 * common/ptid.c (ptid_is_pid): Remove.
594 * common/ptid.h (ptid_is_pid): Don't declare.
596 * linux-nat.c: Update.
597 * mi/mi-interp.c: Update.
601 2018-07-03 Tom Tromey <tom@tromey.com>
603 * common/ptid.c (ptid_get_tid): Remove.
604 * common/ptid.h (ptid_get_tid): Don't declare.
605 * ada-tasks.c: Update.
606 * aix-thread.c: Update.
607 * bsd-uthread.c: Update.
608 * darwin-nat.c: Update.
609 * fbsd-nat.c: Update.
610 * i386-darwin-nat.c: Update.
612 * linux-tdep.c: Update.
613 * nto-procfs.c: Update.
614 * ppc-ravenscar-thread.c: Update.
615 * python/py-infthread.c: Update.
616 * ravenscar-thread.c: Update.
617 * sol-thread.c: Update.
618 * sparc-ravenscar-thread.c: Update.
619 * windows-nat.c: Update.
621 2018-07-03 Tom Tromey <tom@tromey.com>
623 * common/ptid.c (ptid_get_lwp): Remove.
624 * common/ptid.h (ptid_get_lwp): Don't declare.
625 * aarch64-linux-nat.c: Update.
626 * ada-tasks.c: Update.
627 * aix-thread.c: Update.
628 * amd64-linux-nat.c: Update.
629 * arm-linux-nat.c: Update.
631 * fbsd-nat.c: Update.
632 * fbsd-tdep.c: Update.
634 * i386-cygwin-tdep.c: Update.
635 * i386-gnu-nat.c: Update.
636 * i386-linux-nat.c: Update.
637 * ia64-linux-nat.c: Update.
638 * inf-ptrace.c: Update.
640 * linux-fork.c: Update.
641 * linux-nat.c: Update.
642 * linux-tdep.c: Update.
643 * linux-thread-db.c: Update.
644 * mips-linux-nat.c: Update.
645 * nat/aarch64-linux-hw-point.c: Update.
646 * nat/aarch64-linux.c: Update.
647 * nat/linux-btrace.c: Update.
648 * nat/linux-osdata.c: Update.
649 * nat/linux-procfs.c: Update.
650 * nat/x86-linux-dregs.c: Update.
651 * obsd-nat.c: Update.
652 * ppc-fbsd-nat.c: Update.
653 * ppc-linux-nat.c: Update.
655 * python/py-infthread.c: Update.
656 * ravenscar-thread.c: Update.
658 * s390-linux-nat.c: Update.
659 * sol-thread.c: Update.
660 * sol2-tdep.c: Update.
661 * spu-linux-nat.c: Update.
662 * x86-linux-nat.c: Update.
663 * xtensa-linux-nat.c: Update.
665 2018-07-03 Tom Tromey <tom@tromey.com>
667 * common/ptid.c (ptid_get_pid): Remove.
668 * common/ptid.h (ptid_get_pid): Don't declare.
669 * aarch64-linux-nat.c: Update.
670 * ada-lang.c: Update.
671 * aix-thread.c: Update.
672 * alpha-bsd-nat.c: Update.
673 * amd64-fbsd-nat.c: Update.
674 * amd64-linux-nat.c: Update.
675 * arm-linux-nat.c: Update.
676 * arm-nbsd-nat.c: Update.
678 * break-catch-syscall.c: Update.
679 * breakpoint.c: Update.
680 * bsd-uthread.c: Update.
683 * darwin-nat.c: Update.
684 * fbsd-nat.c: Update.
685 * fbsd-tdep.c: Update.
688 * hppa-nbsd-nat.c: Update.
689 * hppa-obsd-nat.c: Update.
690 * i386-fbsd-nat.c: Update.
691 * ia64-linux-nat.c: Update.
692 * inf-ptrace.c: Update.
694 * inferior.c: Update.
695 * inferior.h: Update.
698 * linux-fork.c: Update.
699 * linux-nat.c: Update.
700 * linux-tdep.c: Update.
701 * linux-thread-db.c: Update.
702 * m68k-bsd-nat.c: Update.
703 * mi/mi-interp.c: Update.
704 * mi/mi-main.c: Update.
705 * mips-linux-nat.c: Update.
706 * mips-nbsd-nat.c: Update.
707 * mips64-obsd-nat.c: Update.
708 * nat/aarch64-linux-hw-point.c: Update.
709 * nat/aarch64-linux.c: Update.
710 * nat/linux-btrace.c: Update.
711 * nat/linux-osdata.c: Update.
712 * nat/linux-procfs.c: Update.
713 * nat/x86-linux-dregs.c: Update.
714 * nto-procfs.c: Update.
715 * obsd-nat.c: Update.
716 * ppc-linux-nat.c: Update.
717 * ppc-nbsd-nat.c: Update.
718 * ppc-obsd-nat.c: Update.
719 * proc-service.c: Update.
721 * python/py-inferior.c: Update.
722 * python/py-infthread.c: Update.
723 * ravenscar-thread.c: Update.
725 * remote-sim.c: Update.
727 * rs6000-nat.c: Update.
728 * s390-linux-nat.c: Update.
729 * sh-nbsd-nat.c: Update.
730 * sol-thread.c: Update.
731 * sparc-nat.c: Update.
732 * sparc64-tdep.c: Update.
733 * spu-linux-nat.c: Update.
734 * spu-tdep.c: Update.
735 * target-debug.h: Update.
738 * tid-parse.c: Update.
739 * tracefile-tfile.c: Update.
740 * vax-bsd-nat.c: Update.
741 * windows-nat.c: Update.
742 * x86-linux-nat.c: Update.
745 2018-07-03 Tom Tromey <tom@tromey.com>
747 * common/ptid.c (pid_to_ptid): Remove.
748 * common/ptid.h (pid_to_ptid): Don't declare.
749 * aix-thread.c: Update.
750 * arm-linux-nat.c: Update.
751 * common/ptid.c: Update.
752 * common/ptid.h: Update.
755 * darwin-nat.c: Update.
756 * fbsd-nat.c: Update.
757 * fork-child.c: Update.
759 * go32-nat.c: Update.
760 * inf-ptrace.c: Update.
762 * inferior.c: Update.
764 * linux-fork.c: Update.
765 * linux-nat.c: Update.
766 * nat/aarch64-linux-hw-point.c: Update.
767 * nat/fork-inferior.c: Update.
768 * nat/x86-linux-dregs.c: Update.
769 * nto-procfs.c: Update.
770 * obsd-nat.c: Update.
772 * progspace.c: Update.
774 * rs6000-nat.c: Update.
775 * s390-linux-nat.c: Update.
776 * sol-thread.c: Update.
777 * spu-linux-nat.c: Update.
780 * tracefile-tfile.c: Update.
781 * windows-nat.c: Update.
783 2018-07-03 Tom Tromey <tom@tromey.com>
785 * common/ptid.h (ptid_build): Don't declare.
786 * common/ptid.c (ptid_build): Remove.
787 * aix-thread.c: Update.
789 * bsd-uthread.c: Update.
790 * common/agent.c: Update.
791 * common/ptid.c: Update.
792 * common/ptid.h: Update.
794 * darwin-nat.c: Update.
795 * fbsd-nat.c: Update.
797 * linux-fork.c: Update.
798 * linux-nat.c: Update.
799 * linux-thread-db.c: Update.
800 * nat/linux-osdata.c: Update.
801 * nat/linux-procfs.c: Update.
802 * nto-procfs.c: Update.
803 * obsd-nat.c: Update.
804 * proc-service.c: Update.
806 * ravenscar-thread.c: Update.
807 * remote-sim.c: Update.
809 * sol-thread.c: Update.
811 * windows-nat.c: Update.
813 2018-07-03 Tom Tromey <tom@tromey.com>
815 * infrun.c (follow_exec): Use exit_inferior_silent.
816 * inferior.c (exit_inferior_num_silent): Remove.
817 * inferior.h (exit_inferior_num_silent): Don't declare.
819 2018-07-03 Tom Tromey <tom@tromey.com>
822 * darwin-nat.c (darwin_attach_pid): Reset inferior and
823 inferior_ptid on error.
825 2018-07-02 Maciej W. Rozycki <macro@mips.com>
826 Simon Marchi <simon.marchi@polymtl.ca>
829 * disasm.h (gdb_disassembler): Add
830 `m_disassembler_options_holder'. member
831 * disasm.c (get_all_disassembler_options): New function.
832 (gdb_disassembler::gdb_disassembler): Use it.
833 (gdb_buffered_insn_length_init_dis): Likewise.
834 (gdb_buffered_insn_length): Adjust accordingly.
835 (set_disassembler_options): Handle options with arguments.
836 (show_disassembler_options_sfunc): Likewise. Add a leading new
837 line if showing options with descriptions.
838 (disassembler_options_completer): Adapt to using the
839 `disasm_options_and_args_t' structure.
840 * mips-tdep.c (mips_disassembler_options): New variable.
841 (mips_disassembler_options_o32): Likewise.
842 (mips_disassembler_options_n32): Likewise.
843 (mips_disassembler_options_n64): Likewise.
844 (gdb_print_insn_mips): Don't set `disassembler_options'.
845 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
847 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
848 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
849 `gdbarch_disassembler_options_implicit' and
850 `gdbarch_valid_disassembler_options'.
851 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
852 `disasm_options_and_args_t' structure.
853 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
855 (valid_disassembler_options): Switch from `disasm_options_t' to
856 the `disasm_options_and_args_t' structure.
857 * NEWS: Document `set disassembler-options' support for the MIPS
859 * gdbarch.h: Regenerate.
860 * gdbarch.c: Regenerate.
862 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
864 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
866 2018-06-29 Joel Brobecker <brobecker@adacore.com>
868 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
869 parameter in call to amd64_target_description.
870 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
871 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
872 (amd64fbsd_init_abi): Likewise.
873 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
874 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
875 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
876 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
878 2018-06-29 Pedro Alves <palves@redhat.com>
880 * gdb/amd64-tdep.h (amd64_create_target_description): Add
881 "segments" parameter.
882 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
883 (_initialize_amd64_tdep): Update call to
884 amd64_create_target_description.
885 (amd64_target_description): Add "segments" parameter. Adjust
886 the implementation to use it.
887 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
888 call to amd64_create_target_description.
889 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
890 * gdb/arch/amd64.h (amd64_create_target_description): Add
892 * gdb/arch/amd64.c (amd64_create_target_description): Add
893 "segments" parameter. Call create_feature_i386_64bit_segments
894 only if SEGMENTS is true.
895 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
896 call to amd64_create_target_description.
898 2018-06-29 Pedro Alves <palves@redhat.com>
900 * thread.c (thread_target_id_str): New, factored out from ...
901 (print_thread_info_1): ... here. Use it to compute the max
902 "Target Id" column width.
904 2018-06-29 Pedro Alves <palves@redhat.com>
906 * remote.c (remote_target::extra_thread_info): Delete
907 'display_buf' and 'n' locals. from the cache, regardless of
908 packet mechanims is in use. Use cache for qThreadExtra and qP
911 2018-06-29 Pedro Alves <palves@redhat.com>
913 * blockframe.c (find_pc_sect_containing_function): New function.
914 * breakpoint.c (print_breakpoint_location): Don't call
915 find_pc_sect_function.
916 * linespec.c (create_sals_line_offset): Record the location's
918 * linespec.c (convert_address_location_to_sals): Fill in sal's
919 symbol with find_pc_sect_containing_function.
920 * symtab.c (find_function_start_sal): Rename to ...
921 (find_function_start_sal_1): ... this.
922 (find_function_start_sal): Reimplement as wrapper around
923 find_function_start_sal_1, and use
924 find_pc_sect_containing_function to fill in the sal's symbol.
925 (find_function_start_sal(symbol*, bool)): Adjust.
926 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
928 (find_pc_sect_containing_function): Declare.
930 2018-06-29 Pedro Alves <palves@redhat.com>
932 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
933 true if the the location has no symbol.
935 2018-06-28 Tom Tromey <tom@tromey.com>
937 * NEWS: Mention --enable-codesign.
938 * silent-rules.mk (ECHO_SIGN): New variable.
939 * configure.ac: Add --enable-codesign.
940 * configure: Rebuild.
941 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
942 (gdb$(EXEEXT)): Optionally invoke codesign.
944 2018-06-28 Pedro Alves <palves@redhat.com>
946 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
948 (switch_to_thread_no_regs): Adjust comment.
949 * infcmd.c (stop_pc): Delete.
950 (post_create_inferior, info_program_command): Replace references
951 to stop_pc with references to thread_info->suspend.stop_pc.
952 * inferior.h (stop_pc): Delete declaration.
953 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
954 (handle_inferior_event_1, handle_signal_stop)
955 (process_event_stop_test, keep_going_stepped_thread)
956 (handle_step_into_function, handle_step_into_function_backward)
957 (print_stop_location): Replace references to stop_pc with
958 references to thread_info->suspend.stop_pc.
959 (struct infcall_suspend_state) <stop_pc>: Delete field.
960 (save_infcall_suspend_state, restore_infcall_suspend_state):
961 Remove references to inf_stat->stop_pc.
962 * linux-fork.c (fork_load_infrun_state): Likewise.
963 * record-btrace.c (record_btrace_set_replay): Likewise.
964 * record-full.c (record_full_goto_entry): Likewise.
965 * remote.c (print_one_stopped_thread): Likewise.
966 * target.c (target_resume): Extend comment.
967 * thread.c (set_executing_thread): New.
968 (set_executing): Use it.
969 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
970 Remove references to stop_pc.
972 2018-06-28 Pedro Alves <palves@redhat.com>
974 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
975 Moving fetching stop_pc until after ecs->event_thread is refreshed.
977 2018-06-28 Tom Tromey <tom@tromey.com>
979 * coffread.c (coff_symfile_finish): Update.
980 * xcoffread.c (xcoff_symfile_finish): Update.
981 * elfread.c (elf_symfile_finish): Update.
982 * symfile.h (dwarf2_free_objfile): Don't declare.
983 * dwarf2read.c (_initialize_dwarf2_read): Use
984 register_objfile_data_with_cleanup.
985 (dwarf2_free_objfile): Now static. Change signature.
987 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
989 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
990 option "-o" to add-symbol-file-load to add an offset to each
991 section's load address.
992 * symfile.c (set_objfile_default_section_offset): New function.
994 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
996 * symfile.c (add_symbol_file_command): Make sure that sections
997 with the same name are sorted in the same order.
999 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1001 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1002 require the second argument. If omitted, load sections at the
1003 addresses specified in the file.
1005 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1007 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1008 (_initialize_symfile): Add option "-o" to symbol-file to add an
1009 offset to each section of the symbol file.
1011 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1013 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1015 2018-06-27 Tom Tromey <tom@tromey.com>
1017 * stack.c (_initialize_stack): Update "func" help text.
1019 2018-06-27 Tom Tromey <tom@tromey.com>
1021 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1023 (unwind_infopy_str, pyuw_create_unwind_info)
1024 (unwind_infopy_add_saved_register, pyuw_sniffer)
1025 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1027 (struct saved_reg): Add constructor.
1028 <value>: Now a gdbpy_ref<>.
1030 2018-06-27 Tom Tromey <tom@tromey.com>
1032 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1034 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1036 * gdb-gdb.py.in: Format using autopep8.
1038 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1040 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1041 (type_lookup_function): Recognize CORE_ADDR values.
1043 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1045 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1048 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1050 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1053 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1055 * gdb-gdb.py: Move to...
1056 * gdb-gdb.py.in: ... here.
1057 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1058 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1060 (distclean): Remove gdb-gdb.py when cleaning.
1061 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1062 * configure: Re-generate.
1064 2018-06-27 Pedro Alves <palves@redhat.com>
1066 * proc-service.c (get_ps_regcache): New.
1067 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1068 (ps_lsetfpregs): Use it.
1070 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1073 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1074 (dwarf_decode_lines_1): Adjust.
1076 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1078 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1080 <info_proc>: Likewise.
1082 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1084 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1085 to windows_fetch_one_register, and only handle the case of
1086 fetching one register. Move the code that reloads the context
1087 and iterates over all registers if R is negative to...
1088 (windows_nat_target::fetch_registers): ... here.
1089 (do_windows_store_inferior_registers): Rename to
1090 windows_store_one_register, and only handle the case of storing
1091 one register. Move the code that handles the case where r is
1093 (windows_nat_target::store_registers) ... here.
1095 2018-06-26 Tom Tromey <tom@tromey.com>
1098 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1099 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1101 (rust_internal_print_type): Add podata parameter.
1102 (rust_print_type): Update.
1104 2018-06-26 Tom Tromey <tom@tromey.com>
1106 * typeprint.h (struct print_offset_data) <update, finish,
1107 maybe_print_hole>: New methods.
1108 <indentation>: New constant.
1109 * typeprint.c (print_offset_data::indentation): Define.
1110 (print_offset_data::maybe_print_hole, print_offset_data::update)
1111 (print_offset_data::finish): Move from c-typeprint.c and rename.
1112 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1113 (print_spaces_filtered_with_print_options): Update.
1114 (c_print_type_union_field_offset, maybe_print_hole)
1115 (c_print_type_struct_field_offset): Move to typeprint.c and
1117 (c_type_print_base_struct_union): Update.
1119 2018-06-25 Pedro Alves <palves@redhat.com>
1121 * gdbthread.h (thread_info_ref, delete_thread)
1122 (delete_thread_silent, first_thread_of_inferior)
1123 (any_thread_of_inferior, switch_to_thread)
1124 (enable_thread_stack_temporaries)
1125 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1126 (get_last_thread_stack_temporary)
1127 (value_in_thread_stack_temporaries, can_access_registers_thread):
1128 Spell out "struct thread_info" instead of just "thread_info".
1129 * inferior.h (notice_new_inferior): Likewise.
1131 2018-06-25 Pedro Alves <palves@redhat.com>
1133 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1134 pass thread_info pointer to delete_thread.
1135 (windows_nat_target::detach): Pass inferior pointer to
1137 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1139 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1140 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1141 and pass a thread_info pointer to delete_thread.
1142 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1143 pass thread_info pointer to delete_thread.
1144 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1145 delete_thread_silent call.
1146 * procfs.c (procfs_target::detach): Pass inferior pointer to
1148 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1149 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1150 delete_thread_silent call.
1151 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1152 pass thread_info pointer to delete_thread.
1153 (windows_nat_target::detach): Pass inferior pointer to
1156 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1158 * regcache.c (readable_regcache::read_part): Fix asserts.
1159 (reg_buffer::raw_collect_part): New function.
1160 (regcache::write_part): Fix asserts.
1161 (reg_buffer::raw_supply_part): New function.
1162 (regcache::transfer_regset_register): New helper function.
1163 (regcache::transfer_regset): Call new functions.
1164 (regcache_supply_regset): Use gdb_byte*.
1165 (regcache::supply_regset): Likewise.
1166 (regcache_collect_regset): Likewise.
1167 (regcache::collect_regset): Likewise.
1168 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1169 (reg_buffer::raw_supply_part): Likewise.
1170 (regcache::transfer_regset_register): Likewise.
1171 (regcache::transfer_regset): Use gdb_byte*.
1173 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1175 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1177 2018-06-21 Pedro Alves <palves@redhat.com>
1179 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1180 instead of a ptid_t. All callers adjusted.
1181 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1183 (print_ada_task_info, display_current_task_id, task_command_1):
1185 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1187 (breakpoint_kind): Adjust.
1188 (remove_breakpoints_pid): Rename to ...
1189 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1190 pointer. All callers adjusted.
1191 (bpstat_clear_actions): Use inferior_thread.
1192 (get_bpstat_thread): New.
1193 (bpstat_do_actions): Use it.
1194 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1195 to take a thread_info pointer. All callers adjusted.
1196 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1197 (breakpoint_re_set_thread): Use inferior_thread.
1198 * breakpoint.h (struct inferior): Forward declare.
1199 (bpstat_stop_status): Update.
1200 (remove_breakpoints_pid): Delete.
1201 (remove_breakpoints_inf): New.
1202 * bsd-uthread.c (bsd_uthread_target::wait)
1203 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1204 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1205 (maint_btrace_packet_history_cmd)
1206 (maint_btrace_clear_packet_history_cmd): Adjust.
1207 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1209 * cli/cli-interp.c: Include "inferior.h".
1210 * common/refcounted-object.h (struct
1211 refcounted_object_ref_policy): New.
1212 * compile/compile-object-load.c: Include gdbthread.h.
1213 (store_regs): Use inferior_thread.
1214 * corelow.c (core_target::close): Use current_inferior.
1215 (core_target_open): Adjust to use first_thread_of_inferior and use
1216 the current inferior.
1217 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1218 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1219 <thread>: ... this new field. All references adjusted.
1220 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1221 Take a thread_info pointer instead of a ptid_t.
1222 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1223 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1224 thread_info pointer instead of a ptid_t.
1225 * elfread.c: Include "inferior.h".
1226 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1227 Use inferior_thread.
1228 * eval.c (evaluate_subexp): Likewise.
1229 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1231 * gdb_proc_service.h (struct thread_info): Forward declare.
1232 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1233 <thread>: ... this new field. All references adjusted.
1234 * gdbarch.h, gdbarch.c: Regenerate.
1235 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1236 'thread' parameter. All implementations and callers adjusted.
1237 * gdbthread.h (thread_info) <set_running>: New method.
1238 (delete_thread, delete_thread_silent): Take a thread_info pointer
1240 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1241 (first_thread_of_process): Delete, replaced by ...
1242 (first_thread_of_inferior): ... this new function. All callers
1244 (any_live_thread_of_process): Delete, replaced by ...
1245 (any_live_thread_of_inferior): ... this new function. All callers
1247 (switch_to_thread, switch_to_no_thread): Declare.
1248 (is_executing): Delete.
1249 (enable_thread_stack_temporaries): Update comment.
1250 <enable_thread_stack_temporaries>: Take a thread_info pointer
1251 instead of a ptid_t. Incref the thread.
1252 <~enable_thread_stack_temporaries>: Decref the thread.
1255 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1256 (get_last_thread_stack_temporary)
1257 (value_in_thread_stack_temporaries, can_access_registers_thread):
1258 Take a thread_info pointer instead of a ptid_t. All callers
1260 * infcall.c (get_call_return_value): Use inferior_thread.
1261 (run_inferior_call): Work with thread pointers instead of ptid_t.
1262 (call_function_by_hand_dummy): Work with thread pointers instead
1263 of ptid_t. Use thread_info_ref.
1264 * infcmd.c (proceed_thread_callback): Access thread's state
1266 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1267 access thread's state directly.
1268 (continue_command): Use inferior_thread.
1269 (info_program_command): Use find_thread_ptid and access thread
1271 (proceed_after_attach_callback): Use thread state directly.
1272 (notice_new_inferior): Take a thread_info pointer instead of a
1273 ptid_t. All callers adjusted.
1274 (exit_inferior): Take an inferior pointer instead of a pid. All
1276 (exit_inferior_silent): New.
1277 (detach_inferior): Delete.
1278 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1279 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1280 (detach_inferior_command, kill_inferior_command): Use
1281 find_inferior_id instead of valid_gdb_inferior_id and
1282 gdb_inferior_id_to_pid.
1283 (inferior_command): Use inferior and thread pointers.
1284 * inferior.h (struct thread_info): Forward declare.
1285 (notice_new_inferior): Take a thread_info pointer instead of a
1286 ptid_t. All callers adjusted.
1287 (detach_inferior): Delete declaration.
1288 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1289 instead of a pid. All callers adjusted.
1290 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1291 (valid_gdb_inferior_id): Delete.
1292 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1293 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1294 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1296 <inf>: ... this new field.
1297 <step_ptid>: Delete, replaced by ...
1298 <step_thread>: ... this new field.
1299 (get_displaced_stepping_state): Take an inferior pointer instead
1300 of a pid. All callers adjusted.
1301 (displaced_step_in_progress_any_inferior): Adjust.
1302 (displaced_step_in_progress_thread): Take a thread pointer instead
1303 of a ptid_t. All callers adjusted.
1304 (displaced_step_in_progress, add_displaced_stepping_state): Take
1305 an inferior pointer instead of a pid. All callers adjusted.
1306 (get_displaced_step_closure_by_addr): Adjust.
1307 (remove_displaced_stepping_state): Take an inferior pointer
1308 instead of a pid. All callers adjusted.
1309 (displaced_step_prepare_throw, displaced_step_prepare)
1310 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1311 All callers adjusted.
1312 (start_step_over): Adjust.
1313 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1314 displaced step queue.
1315 (do_target_resume): Adjust.
1316 (fetch_inferior_event): Use inferior_thread.
1317 (context_switch, get_inferior_stop_soon): Take an
1318 execution_control_state pointer instead of a ptid_t. All callers
1320 (switch_to_thread_cleanup): Delete.
1321 (stop_all_threads): Use scoped_restore_current_thread.
1322 * inline-frame.c: Include "gdbthread.h".
1323 (inline_state) <inline_state>: Take a thread pointer instead of a
1324 ptid_t. All callers adjusted.
1325 <ptid>: Delete, replaced by ...
1326 <thread>: ... this new field.
1327 (find_inline_frame_state): Take a thread pointer instead of a
1328 ptid_t. All callers adjusted.
1329 (skip_inline_frames, step_into_inline_frame)
1330 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1331 pointer instead of a ptid_t. All callers adjusted.
1332 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1333 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1334 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1336 * linux-nat.c (get_detach_signal): Likewise.
1337 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1338 (thread_db_notice_clone): Adjust.
1339 (thread_db_find_new_threads_silently)
1340 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1341 a thread pointer instead of a ptid_t. All callers adjusted.
1342 * mi/mi-cmd-var.c: Include "inferior.h".
1343 (mi_cmd_var_update_iter): Update to use thread pointers.
1344 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1346 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1348 (mi_output_running): ... this new function.
1349 (mi_on_resume_1): Adjust to use it.
1350 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1351 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1353 (interrupt_thread_callback): : Adjust to use thread and inferior
1355 * proc-service.c: Include "gdbthread.h".
1356 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1357 * progspace-and-thread.c: Include "inferior.h".
1358 * progspace.c: Include "inferior.h".
1359 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1360 hold a reference to an inferior_object.
1361 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1363 * python/py-inferior.c (struct inferior_object): Give the type a
1364 tag name instead of a typedef.
1365 (python_on_normal_stop): No need to check if the current thread is
1367 (inferior_to_inferior_object): Change return type to
1368 inferior_object. All callers adjusted.
1369 (find_thread_object): Delete, bits factored out to ...
1370 (thread_to_thread_object): ... this new function.
1371 * python/py-infthread.c (create_thread_object): Use
1372 inferior_to_inferior_object.
1373 (thpy_is_stopped): Use thread pointer directly.
1374 (gdbpy_selected_thread): Use inferior_thread.
1375 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1376 field, replaced with ...
1377 <thread>: ... this new field. All users adjusted.
1378 (btpy_insn_or_gap_new): Drop const.
1379 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1381 * python/py-record.c: Include "gdbthread.h".
1382 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1383 a ptid_t. All callers adjusted.
1384 (gdbpy_current_recording): Use inferior_thread.
1385 * python/py-record.h (recpy_record_object) <ptid>: Delete
1386 field, replaced with ...
1387 <thread>: ... this new field. All users adjusted.
1388 (recpy_element_object) <ptid>: Delete
1389 field, replaced with ...
1390 <thread>: ... this new field. All users adjusted.
1391 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1392 a ptid_t. All callers adjusted.
1393 * python/py-threadevent.c: Include "gdbthread.h".
1394 (get_event_thread): Use thread_to_thread_object.
1395 * python/python-internal.h (struct inferior_object): Forward
1397 (find_thread_object, find_inferior_object): Delete declarations.
1398 (thread_to_thread_object, inferior_to_inferior_object): New
1400 * record-btrace.c: Include "inferior.h".
1401 (require_btrace_thread): Use inferior_thread.
1402 (record_btrace_frame_sniffer)
1403 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1404 (get_thread_current_frame): Use scoped_restore_current_thread and
1406 (get_thread_current_frame): Use thread pointer directly.
1407 (record_btrace_replay_at_breakpoint): Use thread's inferior
1409 * record-full.c: Include "inferior.h".
1410 * regcache.c: Include "gdbthread.h".
1411 (get_thread_arch_regcache): Use the inferior's address space
1413 (get_thread_regcache, registers_changed_thread): New.
1414 * regcache.h (get_thread_regcache(thread_info *thread)): New
1416 (registers_changed_thread): New.
1417 (remote_target) <remote_detach_1>: Swap order of parameters.
1418 (remote_add_thread): <remote_add_thread>: Return the new thread.
1419 (get_remote_thread_info(ptid_t)): New overload.
1420 (remote_target::remote_notice_new_inferior): Use thread pointers
1422 (remote_target::process_initial_stop_replies): Use
1423 thread_info::set_running.
1424 (remote_target::remote_detach_1, remote_target::detach)
1425 (extended_remote_target::detach): Adjust.
1426 * stack.c (frame_show_address): Use inferior_thread.
1427 * target-debug.h (target_debug_print_thread_info_pp): New.
1428 * target-delegates.c: Regenerate.
1429 * target.c (default_thread_address_space): Delete.
1430 (memory_xfer_partial_1): Use current_inferior.
1431 (target_detach): Use current_inferior.
1432 (target_thread_address_space): Delete.
1433 (generic_mourn_inferior): Use current_inferior.
1434 * target.h (struct target_ops) <thread_address_space>: Delete.
1435 (target_thread_address_space): Delete.
1436 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1438 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1439 thread pointer instead of a ptid_t. Adjust all callers.
1440 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1441 (first_thread_of_process): Delete, replaced by ...
1442 (first_thread_of_inferior): ... this new function. All callers
1444 (any_thread_of_process): Rename to ...
1445 (any_thread_of_inferior): ... this, and take an inferior pointer.
1446 (any_live_thread_of_process): Rename to ...
1447 (any_live_thread_of_inferior): ... this, and take an inferior
1449 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1450 (value_in_thread_stack_temporaries)
1451 (get_last_thread_stack_temporary): Take a thread pointer instead
1452 of a ptid_t. Adjust all callers.
1453 (thread_info::set_running): New.
1454 (validate_registers_access): Use inferior_thread.
1455 (can_access_registers_ptid): Rename to ...
1456 (can_access_registers_thread): ... this, and take a thread
1458 (print_thread_info_1): Adjust to compare thread pointers instead
1460 (switch_to_no_thread, switch_to_thread): Make extern.
1461 (scoped_restore_current_thread::~scoped_restore_current_thread):
1462 Use m_thread pointer directly.
1463 (scoped_restore_current_thread::scoped_restore_current_thread):
1464 Use inferior_thread.
1465 (thread_command): Use thread pointer directly.
1466 (thread_num_make_value_helper): Use inferior_thread.
1467 * top.c (execute_command): Use inferior_thread.
1468 * tui/tui-interp.c: Include "inferior.h".
1469 * varobj.c (varobj_create): Use inferior_thread.
1470 (value_of_root_1): Use find_thread_global_id instead of
1471 global_thread_id_to_ptid.
1473 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1475 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1477 (regcache::write_part): Likewise.
1478 (readable_regcache::cooked_read_part): Update comment.
1479 (readable_regcache::cooked_write_part): Likewise.
1480 * regcache.h: (readable_regcache::read_part): Likewise.
1481 (regcache::write_part): Likewise.
1483 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1484 Dirk Schubert <dirk.schubert@arm.com>
1486 * aarch64-linux-nat.c (post_attach): New.
1487 (aarch64_linux_nat_target::post_attach): Override post_attach to
1488 record the number of hardware debug registers.
1490 2018-06-20 Tom Tromey <tom@tromey.com>
1492 * python/py-param.c (add_setshow_generic): Make parameters const.
1493 (parmpy_init): Update.
1495 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1497 * regcache.h (regcache_cooked_read_ftype): Rename to...
1498 (register_read_ftype): ...this, change type to function_view.
1499 (class reg_buffer) <save>: Remove src parameter.
1500 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1501 parameter non-const in first overload. Remove src parameter in
1503 * regcache.c (do_cooked_read): Remove.
1504 (readonly_detached_regcache::readonly_detached_regcache): Make
1505 parameter non-const, adjust call to other constructor.
1506 (reg_buffer::save): Remove src parameter.
1507 * frame.c (do_frame_register_read): Remove.
1508 (frame_save_as_regcache): Use lambda function.
1509 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1510 parameter to ppu2spu_data *.
1511 (ppu2spu_sniffer): Use lambda function.
1513 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1515 * record-full.c (record_full_target::insert_breakpoint): Remove
1516 "struct" keyword, add const.
1518 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1520 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1521 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1522 * configure.ac: Remove AC_PREREQ, add missing quoting.
1523 * gnulib/configure.ac: Modernize usage of
1524 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1525 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1526 (AUTOMAKE_VERSION): Bump to 1.15.1.
1527 * configure: Re-generate.
1528 * config.in: Re-generate.
1529 * aclocal.m4: Re-generate.
1530 * gnulib/aclocal.m4: Re-generate.
1531 * gnulib/config.in: Re-generate.
1532 * gnulib/configure: Re-generate.
1533 * gnulib/import/Makefile.in: Re-generate.
1535 2018-06-19 Pedro Alves <palves@redhat.com>
1537 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1538 (lookup_minimal_symbol_by_pc_section): ... here with
1539 gdb_assert_not_reached added.
1541 2018-06-19 Pedro Alves <palves@redhat.com>
1543 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1544 parameter with a block parameter. Compare location's block symbol
1545 with the frame's block instead of addresses.
1546 (skip_inline_frames): Pass the current block instead of the
1547 frame's address. Break out as soon as we determine the frame
1548 should not be skipped.
1550 2018-06-18 Tom Tromey <tom@tromey.com>
1552 * solib-aix.c (solib_aix_get_section_offsets): Return
1554 (solib_aix_solib_create_inferior_hook): Update.
1556 2018-06-18 Tom Tromey <tom@tromey.com>
1558 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1560 2018-06-18 Tom Tromey <tom@tromey.com>
1562 * solib-frv.c (frv_relocate_main_executable): Use
1564 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1567 2018-06-18 Tom Tromey <tom@tromey.com>
1569 * objfiles.h (inhibit_section_map_updates): Update.
1570 (resume_section_map_updates, resume_section_map_updates_cleanup):
1572 * solib-svr4.c (svr4_handle_solib_event): Update.
1573 * objfiles.c (inhibit_section_map_updates): Return
1574 scoped_restore_tmpl<int>.
1575 (resume_section_map_updates, resume_section_map_updates_cleanup):
1578 2018-06-18 Tom Tromey <tom@tromey.com>
1580 * valprint.h (read_string): Update.
1581 * valprint.c (read_string): Change type of "buffer".
1582 (val_print_string): Update.
1583 * python/py-value.c (valpy_string): Update.
1584 * language.h (struct language_defn) <la_get_string>: Change
1586 (default_get_string, c_get_string): Update.
1587 * language.c (default_get_string): Change type of "buffer".
1588 * guile/scm-value.c (gdbscm_value_to_string): Update.
1589 * c-lang.c (c_get_string): Change type of "buffer".
1591 2018-06-18 Tom Tromey <tom@tromey.com>
1593 * ser-mingw.c (struct pipe_state_destroyer): New.
1594 (pipe_state_up): New typedef.
1595 (cleanup_pipe_state): Remove.
1596 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1598 2018-06-18 Tom Tromey <tom@tromey.com>
1600 * rust-lang.h (rust_yyerror): Don't declare.
1601 * rust-lang.c (rust_language_defn): Update.
1602 * rust-exp.y (yyerror): Now static.
1603 * parse.c (parse_exp_in_context_1): Update.
1604 * p-lang.h (p_yyerror): Don't declare.
1605 * p-lang.c (p_language_defn): Update.
1606 * p-exp.y (yyerror): Now static.
1607 * opencl-lang.c (opencl_language_defn): Update.
1608 * objc-lang.c (objc_language_defn): Update.
1609 * m2-lang.h (m2_yyerror): Don't declare.
1610 * m2-lang.c (m2_language_defn): Update.
1611 * m2-exp.y (yyerror): Now static.
1612 * language.h (struct language_defn) <la_error>: Remove.
1613 * language.c (unk_lang_error): Remove.
1614 (unknown_language_defn, auto_language_defn): Remove.
1615 * go-lang.h (go_yyerror): Don't declare.
1616 * go-lang.c (go_language_defn): Update.
1617 * go-exp.y (yyerror): Now static.
1618 * f-lang.h (f_yyerror): Don't declare.
1619 * f-lang.c (f_language_defn): Update.
1620 * f-exp.y (yyerror): Now static.
1621 * d-lang.h (d_yyerror): Don't declare.
1622 * d-lang.c (d_language_defn): Update.
1623 * d-exp.y (yyerror): Now static.
1624 * c-lang.h (c_yyerror): Don't declare.
1625 * c-lang.c (c_language_defn, cplus_language_defn)
1626 (asm_language_defn, minimal_language_defn): Update.
1627 * c-exp.y (yyerror): Now static.
1628 * ada-lang.h (ada_yyerror): Don't declare.
1629 * ada-lang.c (ada_language_defn): Update.
1630 * ada-exp.y (yyerror): Now static.
1632 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1634 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1635 (store_sveregs_to_thread): Likewise.
1636 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1637 (aarch64_linux_store_inferior_registers): Likewise.
1638 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1640 (aarch64_sve_regs_copy_to_regcache): Likewise.
1641 (aarch64_sve_regs_copy_from_regcache): Likewise.
1642 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1644 (aarch64_sve_regs_copy_to_regcache): Likewise.
1645 (aarch64_sve_regs_copy_from_regcache): Likewise.
1646 (sve_context): Structure from Linux headers.
1647 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1648 (SVE_SIG_ZREG_SIZE): Likewise.
1649 (SVE_SIG_PREG_SIZE): Likewise.
1650 (SVE_SIG_FFR_SIZE): Likewise.
1651 (SVE_SIG_REGS_OFFSET): Likewise.
1652 (SVE_SIG_ZREGS_OFFSET): Likewise.
1653 (SVE_SIG_ZREG_OFFSET): Likewise.
1654 (SVE_SIG_ZREGS_SIZE): Likewise.
1655 (SVE_SIG_PREGS_OFFSET): Likewise.
1656 (SVE_SIG_PREG_OFFSET): Likewise.
1657 (SVE_SIG_PREGS_SIZE): Likewise.
1658 (SVE_SIG_FFR_OFFSET): Likewise.
1659 (SVE_SIG_REGS_SIZE): Likewise.
1660 (SVE_SIG_CONTEXT_SIZE): Likewise.
1661 (SVE_PT_REGS_MASK): Likewise.
1662 (SVE_PT_REGS_FPSIMD): Likewise.
1663 (SVE_PT_REGS_SVE): Likewise.
1664 (SVE_PT_VL_INHERIT): Likewise.
1665 (SVE_PT_VL_ONEXEC): Likewise.
1666 (SVE_PT_REGS_OFFSET): Likewise.
1667 (SVE_PT_FPSIMD_OFFSET): Likewise.
1668 (SVE_PT_FPSIMD_SIZE): Likewise.
1669 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1670 (SVE_PT_SVE_PREG_SIZE): Likewise.
1671 (SVE_PT_SVE_FFR_SIZE): Likewise.
1672 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1673 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1674 (__SVE_SIG_TO_PT): Likewise.
1675 (SVE_PT_SVE_OFFSET): Likewise.
1676 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1677 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1678 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1679 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1680 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1681 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1682 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1683 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1684 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1685 (SVE_PT_SVE_SIZE): Likewise.
1686 (SVE_PT_SIZE): Likewise.
1687 (HAS_SVE_STATE): New define.
1689 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1691 * nat/aarch64-sve-linux-sigcontext.h: New file.
1692 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1694 (SVE_VQ_MIN): Likewise.
1695 (SVE_VQ_MAX): Likewise.
1696 (SVE_VL_MIN): Likewise.
1697 (SVE_VL_MAX): Likewise.
1698 (SVE_NUM_ZREGS): Likewise.
1699 (SVE_NUM_PREGS): Likewise.
1700 (sve_vl_valid): Likewise.
1701 (struct user_sve_header): Likewise.
1703 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1704 Richard Bunt <Richard.Bunt@arm.com>
1706 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1707 was requested by GDB.
1709 2018-06-15 Tom de Vries <tdevries@suse.de>
1711 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1713 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1715 * gnulib/update-gnulib.sh: Print expected versions of
1718 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1720 * arch-utils.c (default_type_align): Use type_length_units.
1721 * gdbtypes.c (type_align): Use type_length_units.
1723 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1725 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1726 of 'define' command.
1728 2018-06-14 Tom de Vries <tdevries@suse.de>
1731 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1732 get_no_prettyformat_print_options.
1734 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1736 * sparc-nat.h: Include target.h.
1737 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1738 <fetch_registers>: Remove this argument in function call.
1739 <store_registers>: Remove this argument in function call, remove
1741 <low_forget_process>: Call sparc64_forget_process instead of
1742 sparc_forget_process.
1744 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1746 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1747 (procfs_target::make_corefile_notes): Adjust to new
1748 target_read_alloc return type.
1750 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1751 Stephen Roberts <stephen.roberts@arm.com>
1754 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1755 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1756 Move should_notify_stop local into more inner scope.
1758 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1759 Stephen Roberts <stephen.roberts@arm.com>
1762 * infrun.c (resume_1): Add call to mark_async_event_handler.
1764 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1766 * infrun.c (do_target_wait): Change old version of $pc printed.
1768 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1770 * dwarf2read.c (read_index_from_section): Rename to...
1771 (read_gdb_index_from_section): ... this, update all callers.
1772 (dwarf2_read_index): Rename to...
1773 (dwarf2_read_gdb_index): ... this, update all callers.
1775 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1777 * gdb/hppa-linux-nat.c
1778 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1779 hppa_linux_nat_target::fetch_registers.
1781 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1783 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1784 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1785 (AARCH64_DWARF_SVE_FFR): Likewise.
1786 (AARCH64_DWARF_SVE_P0): Likewise.
1787 (AARCH64_DWARF_SVE_Z0): Likewise.
1789 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1791 * common/common-regcache.h (raw_compare): New function.
1792 * regcache.c (regcache::raw_compare): Likewise.
1793 * regcache.h (regcache::raw_compare): New declaration.
1795 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1797 * common/common-regcache.h (reg_buffer_common): New structure.
1798 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1799 (reg_buffer::raw_supply): Likewise.
1800 (reg_buffer::raw_supply_integer): Likewise.
1801 (reg_buffer::raw_supply_zeroed): Likewise.
1802 (reg_buffer::raw_collect): Likewise.
1803 (reg_buffer::raw_collect_integer): Likewise.
1804 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1805 (reg_buffer::raw_supply): Likewise.
1806 (reg_buffer::raw_supply_integer): Likewise.
1807 (reg_buffer::raw_supply_zeroed): Likewise.
1808 (reg_buffer::raw_collect): Likewise.
1809 (reg_buffer::raw_collect_integer): Likewise.
1811 2018-06-10 Tom Tromey <tom@tromey.com>
1813 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1814 (class remote_state) <stop_reply_queue>: Now std::vector.
1815 (remote_state::~remote_state)
1816 (remote_target::stop_reply_queue_length): Update.
1817 (struct queue_iter_param, remove_child_of_pending_fork)
1818 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1819 (check_pending_event_prevents_wildcard_vcont_callback)
1820 (remove_stop_reply_for_inferior)
1821 (remove_stop_reply_of_remote_state)
1822 (remote_notif_remove_once_on_match)
1823 (stop_reply_match_ptid_and_ws)
1824 (remote_kill_child_of_pending_fork): Remove.
1825 (remote_target::remove_new_fork_children)
1826 (remote_target::check_pending_events_prevent_wildcard_vcont)
1827 (remote_target::discard_pending_stop_replies)
1828 (remote_target::discard_pending_stop_replies_in_queue)
1829 (remote_target::remote_notif_remove_queued_reply)
1830 (remote_target::queued_stop_reply)
1831 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1832 (remote_target::wait, remote_target::kill_new_fork_children)
1833 (remote_target::async): Update.
1835 2018-06-10 Tom Tromey <tom@tromey.com>
1837 * record-full.c (record_full_arch_list_cleanups): Remove.
1838 (record_full_message): Use try/catch.
1839 (record_full_wait_cleanups): Remove.
1840 (record_full_wait_1): Use try/catch.
1841 (record_full_restore): Likewise.
1843 2018-06-10 Tom Tromey <tom@tromey.com>
1845 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1846 declare VEC. Add constructor.
1847 <in_target_beneath>: Now bool.
1848 (record_full_breakpoints): Now a std::vector, static.
1849 (record_full_sync_record_breakpoints)
1850 (record_full_init_record_breakpoints)
1851 (record_full_target::insert_breakpoint)
1852 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1854 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1856 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1857 * serial.c (serial_interface_lookup): Remove struct keyword.
1859 2018-06-10 Tom Tromey <tom@tromey.com>
1861 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1863 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1865 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1867 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1868 "beneath" as a method.
1869 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1870 Use "beneath" as a method.
1872 2018-06-10 Tom Tromey <tom@tromey.com>
1874 * tracefile.c (struct trace_file_writer_deleter): New.
1875 <operator()>: Rename from trace_file_writer_xfree.
1876 (trace_file_writer_up): New typedef.
1877 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1879 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1881 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1882 <m_registers, m_register_status>: Change type to
1884 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1887 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1889 * common/common-regcache.h (enum register_status): Add
1890 underlying type "signed char".
1891 * regcache.h (reg_buffer) <m_register_status>: Change type to
1893 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1894 register_status instead of signed char.
1895 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1896 (reg_buffer::get_register_status): Remove cast.
1897 (readable_regcache::raw_read): Remove cast.
1898 (readable_regcache::cooked_read): Remove cast.
1900 2018-06-09 Tom Tromey <tom@tromey.com>
1902 * source.c (reverse_search_command, forward_search_command): Use
1905 2018-06-09 Tom Tromey <tom@tromey.com>
1907 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1908 (serial_ops_list): Now static, std::vector.
1909 (serial_interface_lookup, serial_add_interface): Update.
1911 2018-06-09 Tom Tromey <tom@tromey.com>
1913 * dwarf2read.c (process_cu_includes): Update.
1914 (process_full_comp_unit): Update.
1915 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1918 2018-06-08 Paul Koning <paul_koning@dell.com>
1922 * python/python.c (do_start_initialization):
1923 Avoid call to internal Python API.
1924 (init__gdb_module): New function.
1926 2018-06-08 Gary Benson <gbenson@redhat.com>
1928 * linux-thread-db.c (valprint.h): New include.
1929 (struct check_thread_db_info): New structure.
1930 (check_thread_db_on_load, tdb_testinfo): New static globals.
1931 (check_thread_db, check_thread_db_callback): New functions.
1932 (try_thread_db_load_1): Run integrity checks if requested.
1933 (maintenance_check_libthread_db): New function.
1934 (_initialize_thread_db): Register "maint check libthread-db"
1935 and "maint set/show check-libthread-db".
1936 * NEWS: Mention the above new commands.
1938 2018-06-08 Tom Tromey <tom@tromey.com>
1940 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1943 2018-06-08 Tom Tromey <tom@tromey.com>
1945 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1947 2018-06-08 Tom Tromey <tom@tromey.com>
1949 * common/btrace-common.h (struct btrace_data): Add constructor,
1950 destructor, move assignment operator.
1951 <empty, clear, fini>: New methods.
1952 <format>: Initialize.
1953 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1954 (btrace_data_empty): Don't declare.
1955 * common/btrace-common.c (btrace_data_init): Remove.
1956 (btrace_data::fini): Rename from btrace_data_fini.
1957 (btrace_data::empty): Rename from btrace_data_empty.
1958 (btrace_data::clear): Rename from btrace_data_clear. Return
1960 * btrace.h (make_cleanup_btrace_data): Don't declare.
1961 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1962 (parse_xml_btrace): Update.
1963 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1964 (maint_btrace_clear_packet_history_cmd): Update.
1966 2018-06-07 Pedro Alves <palves@redhat.com>
1968 * target.h (target_ops) <beneath>: Now a method. All references
1970 (class target_stack): New.
1971 * target.c (g_target_stack): New.
1972 (g_current_top_target): Delete.
1973 (current_top_target): Get the top target out of g_target_stack.
1974 (target_stack::push, target_stack::unpush): New.
1975 (push_target, unpush_target): Reimplement.
1976 (target_is_pushed): Reimplement in terms of g_target_stack.
1977 (target_ops::beneath, target_stack::find_beneath): New.
1979 2018-06-07 Pedro Alves <palves@redhat.com>
1981 * target.h (find_target_beneath): Delete declaration.
1982 * target.c (find_target_beneath): Delete definition.
1983 * aix-thread.c: All callers of find_target_beneath adjusted to
1984 call target_ops::beneath instead.
1985 * bsd-uthread.c: Likewise.
1986 * linux-thread-db.c: Likewise.
1987 * ravenscar-thread.c: Likewise.
1988 * sol-thread.c: Likewise.
1989 * spu-multiarch.c: Likewise.
1991 2018-06-07 Pedro Alves <palves@redhat.com>
1993 * target.h (target_ops) <beneath>: Now a method. All references
1995 (target_ops) <m_beneath>: New.
1996 * target.c (target_ops::beneath): New.
1997 * corelow.c: Adjust all references to target_ops::beneath.
1998 * linux-thread-db.c: Likewise.
1999 * make-target-delegates: Likewise.
2000 * record-btrace.c: Likewise.
2001 * record-full.c: Likewise.
2002 * remote.c: Likewise.
2003 * target.c: Likewise.
2004 * target-delegates.c: Regenerate.
2006 2018-06-07 Pedro Alves <palves@redhat.com>
2008 * target.h (target_stack): Delete.
2009 (current_top_target): Declare function.
2010 * target.c (target_stack): Delete.
2011 (g_current_top_target): New.
2012 (current_top_target): New function.
2013 * auxv.c: Use current_top_target instead of target_stack
2015 * avr-tdep.c: Likewise.
2016 * breakpoint.c: Likewise.
2017 * corefile.c: Likewise.
2018 * elfread.c: Likewise.
2020 * exceptions.c: Likewise.
2021 * frame.c: Likewise.
2022 * gdbarch-selftests.c: Likewise.
2023 * gnu-v3-abi.c: Likewise.
2024 * ia64-tdep.c: Likewise.
2025 * ia64-vms-tdep.c: Likewise.
2026 * infcall.c: Likewise.
2027 * infcmd.c: Likewise.
2028 * infrun.c: Likewise.
2029 * linespec.c: Likewise.
2030 * linux-tdep.c: Likewise.
2031 * minsyms.c: Likewise.
2032 * ppc-linux-nat.c: Likewise.
2033 * ppc-linux-tdep.c: Likewise.
2034 * procfs.c: Likewise.
2035 * regcache.c: Likewise.
2036 * remote.c: Likewise.
2037 * rs6000-tdep.c: Likewise.
2038 * s390-linux-nat.c: Likewise.
2039 * s390-tdep.c: Likewise.
2040 * solib-aix.c: Likewise.
2041 * solib-darwin.c: Likewise.
2042 * solib-dsbt.c: Likewise.
2043 * solib-spu.c: Likewise.
2044 * solib-svr4.c: Likewise.
2045 * solib-target.c: Likewise.
2046 * sparc-tdep.c: Likewise.
2047 * sparc64-tdep.c: Likewise.
2048 * spu-tdep.c: Likewise.
2049 * symfile.c: Likewise.
2050 * symtab.c: Likewise.
2051 * target-descriptions.c: Likewise.
2052 * target-memory.c: Likewise.
2053 * target.c: Likewise.
2054 * target.h: Likewise.
2055 * tracefile-tfile.c: Likewise.
2056 * tracepoint.c: Likewise.
2057 * valops.c: Likewise.
2058 * valprint.c: Likewise.
2059 * value.c: Likewise.
2060 * windows-tdep.c: Likewise.
2061 * mi/mi-main.c: Likewise.
2063 2018-06-07 Tom Tromey <tom@tromey.com>
2065 * valprint.h (build_address_symbolic): Declare.
2066 * printcmd.c (print_address_symbolic): Update.
2067 (build_address_symbolic): Change "name" and "filename" to
2069 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2071 * defs.h (build_address_symbolic): Remove declaration.
2073 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2075 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2076 (aarch64_vnv_type): Add function.
2077 (aarch64_pseudo_register_name): Add V regs for SVE.
2078 (aarch64_pseudo_register_type): Likewise.
2079 (aarch64_pseudo_register_reggroup_p): Likewise.
2080 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2081 (aarch64_pseudo_read_value): Add V regs for SVE.
2082 (aarch64_pseudo_write_2): Use V0 offset for SVE
2083 (aarch64_pseudo_write): Add V regs for SVE.
2084 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2086 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2088 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2089 (sve_vl_from_vq): Likewise.
2091 2018-06-05 Tom Tromey <tom@tromey.com>
2093 * cli/cli-cmds.c (show_version): Update.
2094 * top.c (print_gdb_version): Add "interactive" parameter.
2096 * main.c (captured_main_1): Update.
2097 * top.h (print_gdb_version): Add "interactive" parameter and a
2100 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2102 * common/enum-flags.h: Add trailing semicolon to example in
2105 2018-06-05 Tom Tromey <tom@tromey.com>
2108 * NEWS: Add entry about pager.
2109 * utils.c (pagination_disabled_for_command): New global.
2110 (prompt_for_continue): Allow "c" response to prompt.
2111 (reinitialize_more_filter): Clear
2112 pagination_disabled_for_command.
2113 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2115 2018-06-04 Tom Tromey <tom@tromey.com>
2117 * ada-lang.h (ada_lookup_symbol_list): Update.
2118 * ada-lang.c (resolve_subexp): Update.
2119 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2121 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2122 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2123 results parameter to std::vector.
2124 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2126 * ada-exp.y (block_lookup): Update.
2127 (select_possible_type_sym): Change type of syms. Remove nsyms
2129 (write_var_or_type, write_name_assoc): Update.
2131 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2133 * windows-nat.c (windows_nat_target::xfer_partial): Return
2134 TARGET_XFER_E_IO if we need to delegate to the target beneath
2135 but BENEATH is NULL.
2137 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2139 * Makefile.in (config.status): Add configure.nat as a
2142 2018-06-04 Tom Tromey <tom@tromey.com>
2144 * cp-name-parser.y (cpname_state): Add method declarations.
2145 (HANDLE_QUAL): Update.
2146 (cpname_state::d_grab, cpname_state::fill_comp)
2147 (cpname_state::make_operator, cpname_state::make_dtor)
2148 (cpname_state::make_builtin_type, cpname_state::make_name)
2149 (cpname_state::d_qualify, cpname_state::d_int_type)
2150 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2151 (%union): Move earlier.
2153 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2155 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2157 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2159 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2160 (aarch64_pseudo_write_1): Likewise.
2161 (aarch64_pseudo_read_value): Use helper.
2162 (aarch64_pseudo_write): Likewise.
2164 2018-06-04 Pedro Alves <palves@redhat.com>
2166 * darwin-nat.c (darwin_ops): Delete.
2167 (darwin_attach_pid): Use get_native_target.
2169 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2171 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2172 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2174 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2176 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2177 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2178 (aarch64_gdbarch_init): Check for SVE.
2179 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2181 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2183 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2184 * aarch64-tdep.h (aarch64_read_description): Likewise.
2185 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2186 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2187 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2188 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2189 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2191 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2193 * value.c (value_fetch_lazy_bitfield): New.
2194 (value_fetch_lazy_memory): New.
2195 (value_fetch_lazy_register): New.
2196 (value_fetch_lazy): Factor out to smaller functions.
2198 2018-06-01 Tom Tromey <tom@tromey.com>
2200 * cp-name-parser.y (backslashable, represented): Now const.
2202 2018-06-01 Tom Tromey <tom@tromey.com>
2204 * cp-name-parser.y: Include parser-defs.h.
2205 (parser_fprintf): Remove declaration.
2207 2018-06-01 Tom Tromey <tom@tromey.com>
2209 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2211 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2212 (global_result): Remove globals.
2213 (struct cpname_state): New.
2214 (yyparse): Don't declare.
2215 (yylex, yyerror): Move declarations after %union.
2216 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2217 (make_name): Add state parameter.
2219 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2221 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2223 (yylex): Add lvalp, state parameters.
2224 (yyerror): Add state parameter.
2225 (cp_demangled_name_to_comp): Update.
2227 2018-06-01 Tom Tromey <tom@tromey.com>
2229 * cp-name-parser.y (parser_fprintf): Declare.
2230 (GDB_YY_REMAP_PREFIX): Define.
2231 Include yy-remap.h. Don't redefine yy* identifiers.
2233 2018-06-01 Tom Tromey <tom@tromey.com>
2235 * python/py-type.c (typy_legacy_template_argument): Update.
2236 * cp-support.h (cp_demangled_name_to_comp): Update.
2237 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2238 parameter to be a "std::string *".
2241 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2243 * ada-lex.l: Include "diagnostics.h" instead of
2244 "common/diagnostics.h".
2245 * unittests/environ-selftests.c: Likewise.
2246 * common/diagnostics.h: Moved to ../include.
2248 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2250 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2251 to language_mode_manual while calling breakpoint_re_set_one.
2253 2018-06-01 Tom Tromey <tom@tromey.com>
2255 * valops.c (value_cast_structs, destructor_name_p): Update.
2256 * symtab.c (gdb_mangle_name): Update.
2257 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2259 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2260 (pascal_object_print_value_fields, pascal_object_print_value):
2262 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2263 * linespec.c (find_methods): Update.
2264 * gdbtypes.h (type_name_no_tag): Remove.
2265 (type_name_or_error): Rename from type_name_no_tag_or_error.
2266 * gdbtypes.c (type_name_no_tag): Remove.
2267 (type_name_or_error): Rename from type_name_no_tag_or_error.
2268 (lookup_struct_elt_type, check_typedef): Update.
2269 * expprint.c (print_subexp_standard): Update.
2270 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2271 * d-namespace.c (d_lookup_nested_symbol): Update.
2272 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2273 (cp_print_class_member): Update.
2274 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2275 * completer.c (add_struct_fields): Update.
2276 * c-typeprint.c (cp_type_print_derivation_info)
2277 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2279 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2280 (ada_prefer_type, ada_is_exception_sym): Update.
2282 2018-06-01 Tom Tromey <tom@tromey.com>
2284 * valops.c (enum_constant_from_type, value_namespace_elt)
2285 (value_maybe_namespace_elt): Update.
2286 * valarith.c (find_size_for_pointer_math): Update.
2287 * target-descriptions.c (make_gdb_type): Update.
2288 * symmisc.c (print_symbol): Update.
2289 * stabsread.c (define_symbol, read_type)
2290 (complain_about_struct_wipeout, add_undefined_type)
2291 (cleanup_undefined_types_1): Update.
2292 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2293 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2294 (rust_internal_print_type, rust_composite_type)
2295 (rust_evaluate_funcall, rust_evaluate_subexp)
2296 (rust_inclusive_range_type_p): Update.
2297 * python/py-type.c (typy_get_tag): Update.
2298 * p-typeprint.c (pascal_type_print_base): Update.
2299 * mdebugread.c (parse_symbol, parse_type): Update.
2300 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2302 * guile/scm-type.c (gdbscm_type_tag): Update.
2303 * go-lang.c (sixg_string_p): Update.
2304 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2306 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2307 (TYPE_TAG_NAME): Remove.
2308 * gdbtypes.c (type_name_no_tag): Simplify.
2309 (check_typedef, check_types_equal, recursive_dump_type)
2310 (copy_type_recursive, arch_composite_type): Update.
2311 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2312 in summary mode when needed.
2313 * eval.c (evaluate_funcall): Update.
2314 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2315 (process_structure_scope, read_enumeration_type)
2316 (read_namespace_type, read_module_type, determine_prefix): Update.
2317 * cp-support.c (inspect_type): Update.
2318 * coffread.c (process_coff_symbol, decode_base_type): Update.
2319 * c-varobj.c (c_is_path_expr_parent): Update.
2320 * c-typeprint.c (c_type_print_base_struct_union): Update.
2321 (c_type_print_base_1): Update. Print struct/class/union/enum in
2322 summary when using C language.
2323 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2324 (gen_maybe_namespace_elt): Update.
2325 * ada-lang.c (ada_type_name): Simplify.
2326 (empty_record, ada_template_to_fixed_record_type_1)
2327 (template_to_static_fixed_type)
2328 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2330 2018-06-01 Tom Tromey <tom@tromey.com>
2332 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2334 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2335 (c_print_type): Update.
2336 (c_print_type): New overload.
2337 (c_type_print_varspec_prefix, c_type_print_args)
2338 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2339 (c_type_print_base_struct_union, c_type_print_base_1)
2340 (cp_type_print_method_args): Add "language" parameter.
2341 (c_type_print_base): Update.
2342 * c-lang.h (c_print_type): Add new overload.
2344 2018-06-01 Tom Tromey <tom@tromey.com>
2346 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2347 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2349 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2351 * aarch64-tdep.c (aarch64_sve_register_names): New const
2353 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2354 (AARCH64_SVE_Z_REGS_NUM): New define.
2355 (AARCH64_SVE_P_REGS_NUM): Likewise.
2356 (AARCH64_SVE_NUM_REGS): Likewise.
2358 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2360 * nat/linux-ptrace.h [__alpha__]
2361 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2364 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2366 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2367 the endianness selected.
2368 * NEWS: Document `set endian auto' mode operation update.
2370 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2372 * Makefile.in: Add new header.
2373 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2374 (sve_vl_from_vg): Likewise.
2375 (sve_vq_from_vl): Likewise.
2376 (sve_vl_from_vq): Likewise.
2377 (sve_vq_from_vg): Likewise.
2378 (sve_vg_from_vq): Likewise.
2379 * configure.nat: Add new c file.
2380 * nat/aarch64-sve-linux-ptrace.c: New file.
2381 * nat/aarch64-sve-linux-ptrace.h: New file.
2383 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2385 * aarch64-linux-nat.c (aarch64_linux_read_description):
2387 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2389 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2390 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2391 (aarch64_gdbarch_init): Add parmeter zero.
2392 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2393 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2394 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2396 * doc/gdb.texinfo: Describe SVE feature
2397 * features/aarch64-sve.c: New file.
2399 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2402 * gdbarch.sh (significant_addr_bit): Default to zero when
2403 not set by target architecture.
2404 * gdbarch.c: Re-generated.
2405 * utils.c (address_significant): Update.
2407 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2409 * stack.c (func_command): Remove trailing newline in call to error.
2411 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2413 * regcache.h (regcache_raw_collect): Remove, update callers to
2414 use regcache::raw_collect.
2415 * regcache.c (regcache_raw_collect): Remove.
2417 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2419 * regcache.h (regcache_raw_supply): Remove, update callers to
2420 use detached_regcache::raw_supply.
2421 * regcache.c (regcache_raw_supply): Remove.
2423 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2425 * regcache.h (regcache_cooked_write_part): Remove, update
2426 callers to use regcache::cooked_write_part.
2427 * regcache.c (regcache_cooked_write_part): Remove.
2429 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2431 * regcache.h (regcache_cooked_read_part): Remove, update callers
2432 to use readable_regcache::cooked_read_part.
2433 * regcache.c (regcache_cooked_read_part): Remove.
2435 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2437 * regcache.h (regcache_cooked_read_value): Remove, update
2438 callers to use readable_regcache::cooked_read_value.
2439 * regcache.c (regcache_cooked_read_value): Remove.
2441 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2443 * regcache.h (regcache_cooked_write): Remove, update callers to
2444 use regcache::cooked_write.
2445 * regcache.c (regcache_cooked_write): Remove.
2447 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2449 * regcache.h (regcache_invalidate): Remove, update callers to
2450 use detached_regcache::invalidate instead.
2451 * regcache.c (regcache_invalidate): Remove.
2453 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2455 * regcache.h (regcache_raw_write_part): Remove, update callers
2456 to use regcache::raw_write_part instead.
2457 * regcache.c (regcache_raw_write_part): Remove.
2459 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2461 * regcache.h (regcache_raw_read_part): Remove, update callers to
2462 use readable_regcache::raw_read_part instead.
2463 * regcache.c (regcache_raw_read_part): Remove.
2465 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2467 * regcache.h (regcache_cooked_read): Remove, update callers to
2468 use readable_regcache::cooked_read instead.
2469 * regcache.c (regcache_cooked_read): Remove.
2471 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2473 * regcache.h (regcache_raw_write): Remove, update callers to use
2474 regcache::raw_write instead.
2475 * regcache.c (regcache_raw_write): Remove.
2477 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2479 * regcache.h (regcache_raw_read): Remove, update callers to use
2480 readable_regcache::raw_read instead.
2481 * regcache.c (regcache_raw_read): Remove.
2483 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2485 * regcache.h (regcache_raw_update): Remove, update callers to
2486 use readable_regcache::raw_update instead.
2487 * regcache.c (regcache_raw_update): Remove.
2489 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2491 * regcache.h (regcache_register_status): Remove, update callers
2492 to use reg_buffer::get_register_status directly instead.
2493 * regcache.c (regcache_register_status): Remove.
2495 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2497 * regcache.h (regcache_get_ptid): Remove, update all callers to
2498 call regcache::ptid instead.
2499 * regcache.c (regcache_get_ptid): Remove.
2501 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2503 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2505 2018-05-30 Pedro Alves <palves@redhat.com>
2507 * common/common-exceptions.h (exception_rethrow): Use
2510 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2512 * breakpoint.c (print_solib_event, check_status_catch_solib):
2513 Remove struct keyword in range-based for loops.
2514 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2515 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2517 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2519 * symfile.c (addr_info_make_relative): Likewise.
2520 * thread.c (value_in_thread_stack_temporaries): Likewise.
2522 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2525 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2526 aggregate type to get its real type before accessing it.
2528 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2530 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2531 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2532 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2533 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2534 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2535 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2536 * printcmd.c (info_address_command): Likewise.
2538 2018-05-29 Tom Tromey <tom@tromey.com>
2540 * windows-nat.c (handle_exception): Update fall-through comment.
2542 2018-05-29 Tom Tromey <tom@tromey.com>
2544 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2545 (struct program_space) <added_solibs>: Now a std::vector.
2546 * breakpoint.c (print_solib_event): Update.
2547 (check_status_catch_solib): Update.
2548 * progspace.c (clear_program_space_solib_cache): Update.
2549 * solib.c (update_solib_list): Update.
2551 2018-05-29 Tom Tromey <tom@tromey.com>
2553 * python/py-type.c (typy_richcompare): Update.
2554 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2555 * gdbtypes.h (types_deeply_equal): Return bool.
2556 (types_equal): Likewise.
2557 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2559 (check_types_equal): Change worklist to std::vector. Return
2561 (struct type_equality_entry): Add constructor.
2562 (compare_maybe_null_strings): Return bool.
2563 (check_types_worklist): Return bool. Change worklist to
2565 (types_deeply_equal): Use std::vector.
2566 (types_equal): Return bool.
2567 (compare_maybe_null_strings): Simplify.
2569 2018-05-29 Tom Tromey <tom@tromey.com>
2571 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2573 2018-05-29 Tom Tromey <tom@tromey.com>
2575 * objc-lang.h: Don't include cp-support.h.
2576 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2579 2018-05-27 Tom Tromey <tom@tromey.com>
2581 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2583 2018-05-25 Tom Tromey <tom@tromey.com>
2585 * value.c (value::location): Initialize.
2587 2018-05-25 Tom Tromey <tom@tromey.com>
2589 * dbxread.c (init_bincl_list): Remove.
2590 (bincl_list): Now a std::vector.
2591 (bincls_allocated, next_bincl): Remove.
2592 (free_bincl_list, do_free_bincl_list_cleanup)
2593 (make_cleanup_free_bincl_list): Remove.
2594 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2596 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2597 (struct header_file_location): Add constructor.
2598 (add_bincl_to_list): Remove.
2600 2018-05-25 Tom Tromey <tom@tromey.com>
2602 * tui/tui.c (tui_enable): Update.
2603 * mi/mi-interp.c (mi_interp::init): Update.
2604 * interps.h (class interp) <name>: New method.
2605 <m_name>: Rename from name.
2606 (~scoped_restore_interp): Update.
2607 * interps.c (interp::interp): Update.
2608 (interp_add, interp_set, interp_lookup_existing)
2609 (current_interp_named_p): Update.
2611 2018-05-25 Tom Tromey <tom@tromey.com>
2613 * interps.c (interp_name): Remove.
2614 * mi/mi-interp.c (mi_interp::init): Update.
2615 * interps.h (interp_name): Remove.
2616 (~scoped_restore_interp): Update.
2617 * tui/tui.c (tui_enable): Update.
2619 2018-05-25 Tom Tromey <tom@tromey.com>
2621 * utils.c (fputs_maybe_filtered): Update.
2622 * linespec.c (decode_line_full): Update.
2623 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2624 (mi_print_breakpoint_for_event, mi_solib_loaded)
2625 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2626 (mi_user_selected_context_changed): Update.
2627 * mi/mi-main.c (mi_execute_command): Update.
2628 * cli/cli-script.c (execute_control_command): Update.
2629 * python/python.c (execute_gdb_command): Update.
2630 * solib.c (info_sharedlibrary_command): Update.
2631 * interps.c (interp_ui_out): Remove.
2632 * interps.h (interp_ui_out): Remove.
2634 2018-05-25 Tom Tromey <tom@tromey.com>
2636 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2637 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2638 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2640 2018-05-25 Tom Tromey <tom@tromey.com>
2642 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2643 * interps.c (interp_exec): Use scoped_restore.
2645 2018-05-25 Tom Tromey <tom@tromey.com>
2647 * remote.c (remote_target::remote_file_get): Use
2649 (remote_target::remote_file_put): Likewise.
2651 2018-05-25 Tom Tromey <tom@tromey.com>
2653 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2655 (get_pe_section_index, add_pe_exported_sym): Update.
2656 (read_pe_exported_syms): Use gdb::def_vector.
2658 2018-05-25 Tom Tromey <tom@tromey.com>
2660 * frame.c (remove_prev_frame): Remove.
2661 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2663 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2665 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2667 * mips-linux-nat.c (supply_fpregset): Always call
2668 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2669 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2670 `mips_fill_fpregset'.
2671 * mips-linux-tdep.c (mips_supply_fpregset)
2672 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2673 (mips_fill_fpregset_wrapper): Remove functions.
2674 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2675 (mips_linux_fpregset): Remove variable.
2676 (mips_linux_iterate_over_regset_sections): Use
2677 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2678 (mips_linux_o32_sigframe_init): Remove comment.
2680 2018-05-25 Pedro Alves <palves@redhat.com>
2682 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2683 (struct readahead_cache, struct packet_reg, struct
2684 remote_arch_state, class remote_state): Move higher up in the
2686 (remote_target::m_remote_state): Now an object instead of a pointer.
2687 (remote_target::get_remote_state): Adjust.
2689 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2691 * stack.c (select_and_print_frame): Delete.
2692 (struct function_bounds): Move struct within function.
2693 (func_command): Most content moved into new function
2694 find_frame_for_function, use new function, print result, add
2696 (find_frame_for_function): New function, now returns a result.
2698 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2700 * stack.c (iterate_over_block_arg_vars): Fix comment.
2701 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2703 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2707 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2709 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2711 * frame.h (class scoped_restore_selected_frame): New class.
2712 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2713 of any exception, use scoped_restore_selected_frame to restore the
2716 2018-05-24 Pedro Alves <palves@redhat.com>
2718 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2721 2018-05-23 Tom Tromey <tom@tromey.com>
2723 * complaints.c (struct complaints): Remove.
2724 (symfile_complaint_book): Remove.
2725 (series): New global.
2726 (complaint_internal): Update.
2727 (clear_complaints): Update.
2729 2018-05-23 Tom Tromey <tom@tromey.com>
2731 * complaints.c (counters): New global.
2732 (struct complain): Remove.
2733 (struct complaints) <root>: Remove.
2734 (complaint_sentinel): Remove.
2735 (symfile_complaint_book): Update.
2736 (find_complaint) Remove.
2737 (complaint_internal, clear_complaints): Update.
2739 2018-05-23 Tom Tromey <tom@tromey.com>
2741 * complaints.c (struct complain) <file, line>: Remove.
2742 (find_complaint): Remove file, line parameters.
2743 (complaint_internal): Update.
2745 2018-05-23 Tom Tromey <tom@tromey.com>
2747 * complaints.c (vcomplaint): Remove.
2748 (complaint_internal) Merge in contents of vcomplaint.
2750 2018-05-23 Tom Tromey <tom@tromey.com>
2752 * complaints.c (struct complaints) <explanation>: Remove.
2753 (symfile_explanations): Remove.
2754 (symfile_complaint_book): Update.
2755 (vcomplaint): Update.
2756 (struct explanation): Remove.
2758 2018-05-23 Tom Tromey <tom@tromey.com>
2760 * complaints.c (symfile_complaints): Remove.
2761 (complaint_internal): Remove "complaints" parameter.
2762 (clear_complaints, vcomplaint): Remove "c" parameter.
2763 (get_complaints): Remove.
2764 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2765 (dwarf2_debug_line_missing_file_complaint)
2766 (dwarf2_debug_line_missing_end_sequence_complaint)
2767 (dwarf2_complex_location_expr_complaint)
2768 (dwarf2_const_value_length_mismatch_complaint)
2769 (dwarf2_section_buffer_overflow_complaint)
2770 (dwarf2_macro_malformed_definition_complaint)
2771 (dwarf2_invalid_attrib_class_complaint)
2772 (create_addrmap_from_index, dw2_symtab_iter_next)
2773 (dw2_expand_marked_cus)
2774 (dw2_debug_names_iterator::find_vec_in_debug_names)
2775 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2776 (create_debug_type_hash_table, init_cutu_and_read_dies)
2777 (partial_die_parent_scope, add_partial_enumeration)
2778 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2779 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2780 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2781 (create_cus_hash_table, create_dwp_hash_table)
2782 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2783 (dwarf2_rnglists_process, dwarf2_ranges_process)
2784 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2785 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2786 (handle_struct_member_die, process_structure_scope)
2787 (read_array_type, read_common_block, read_module_type)
2788 (read_tag_pointer_type, read_typedef, read_base_type)
2789 (read_subrange_type, load_partial_dies, partial_die_info::read)
2790 (partial_die_info::read, partial_die_info::read)
2791 (partial_die_info::read, read_checked_initial_length_and_offset)
2792 (dwarf2_string_attr, read_formatted_entries)
2793 (dwarf_decode_line_header)
2794 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2795 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2796 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2797 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2798 (get_signatured_type, get_DW_AT_signature_type)
2799 (decode_locdesc, file_file_name, consume_improper_spaces)
2800 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2801 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2802 (dwarf2_symbol_mark_computed, set_die_type)
2803 (read_attribute_value): Update.
2804 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2806 * dbxread.c (unknown_symtype_complaint)
2807 (lbrac_mismatch_complaint, repeated_header_complaint)
2808 (set_namestring, function_outside_compilation_unit_complaint)
2809 (read_dbx_symtab, process_one_symbol): Update.
2810 * gdbtypes.c (stub_noname_complaint): Update.
2811 * windows-nat.c (handle_unload_dll): Update.
2812 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2813 (decode_base_type): Update.
2814 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2815 (eb_complaint, record_include_begin, record_include_end)
2816 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2817 (process_xcoff_symbol, read_symbol)
2818 (function_outside_compilation_unit_complaint)
2819 (scan_xcoff_symtab): Update.
2820 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2821 * buildsym.c (finish_block_internal, make_blockvector)
2822 (end_symtab_get_static_block, augment_type_symtab): Update.
2823 * dtrace-probe.c (dtrace_process_dof)
2824 (dtrace_static_probe_ops::get_probes): Update.
2825 * complaints.h (struct complaint): Don't declare.
2826 (symfile_complaints): Remove.
2827 (complaint_internal): Remove "complaints" parameter.
2828 (complaint): Likewise.
2829 (clear_complaints): Likewise.
2830 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2831 (reread_symbols): Update.
2832 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2833 (dwarf2_frame_cache, decode_frame_entry): Update.
2834 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2835 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2836 (info_selectors_command): Update.
2837 * macrotab.c (macro_include, check_for_redefinition)
2838 (macro_undef): Update.
2839 * objfiles.c (filter_overlapping_sections): Update.
2840 * stabsread.c (invalid_cpp_abbrev_complaint)
2841 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2842 (define_symbol, error_type, read_type, rs6000_builtin_type)
2843 (stabs_method_name_from_physname, read_member_functions)
2844 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2845 (attach_fields_to_type, complain_about_struct_wipeout)
2846 (read_range_type, read_args, common_block_start)
2847 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2849 * mdebugread.c (index_complaint, unknown_ext_complaint)
2850 (basic_type_complaint, bad_tag_guess_complaint)
2851 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2852 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2853 (parse_procedure, parse_lines)
2854 (function_outside_compilation_unit_complaint)
2855 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2856 (bad_tag_guess_complaint, reg_value_complaint): Update.
2857 * cp-support.c (demangled_name_complaint): Update.
2858 * macroscope.c (sal_macro_scope): Update.
2859 * dwarf-index-write.c (class debug_names): Update.
2861 2018-05-23 Tom Tromey <tom@tromey.com>
2863 * complaints.c (clear_complaints): Remove "noisy" parameter.
2864 * complaints.h (clear_complaints): Update.
2865 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2866 (reread_symbols): Update.
2868 2018-05-23 Tom Tromey <tom@tromey.com>
2870 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2872 (vcomplaint, clear_complaints): Update.
2873 (symfile_explanations): Remove some messages.
2875 2018-05-23 Tom Tromey <tom@tromey.com>
2877 * complaints.c (internal_complaint): Remove.
2878 * complaints.h (internal_complaint): Remove.
2880 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2882 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2884 2018-05-22 Pedro Alves <palves@redhat.com>
2886 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2887 (remote_fileio_badfd, remote_fileio_return_errno)
2888 (remote_fileio_return_success, remote_fileio_func_open)
2889 (remote_fileio_func_open, remote_fileio_func_close)
2890 (remote_fileio_func_read, remote_fileio_func_write)
2891 (remote_fileio_func_lseek, remote_fileio_func_rename)
2892 (remote_fileio_func_unlink, remote_fileio_func_stat)
2893 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2894 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2895 remote_target parameter.
2896 (remote_fio_func_map) <func>: Add remote_target parameter.
2897 (do_remote_fileio_request, remote_fileio_request):
2898 * remote-fileio.h (remote_fileio_request):
2899 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2900 remote_target parameter.
2901 (remote_notif_process, handle_notification): Adjust to pass down
2903 (remote_notif_state_allocate): Add remote_target parameter. Save
2905 * remote-notif.h (struct remote_target): Forward declare.
2906 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2907 remote_target parameter.
2908 (struct remote_notif_state) <remote>: New field.
2909 (remote_notif_ack, remote_notif_parse): Add remote_target
2911 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2912 remote_target parameter.
2913 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2914 (threads_listing_context, rmt_thread_action, protocol_feature)
2915 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2916 (packet_result, struct threads_listing_context, remote_state):
2917 Move definitions and declarations higher up.
2918 (remote_target) <~remote_target>: Declare.
2919 (remote_download_command_source, remote_file_put, remote_file_get)
2920 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2921 (remote_hostio_pread_vFile, remote_hostio_send_command)
2922 (remote_hostio_set_filesystem, remote_hostio_open)
2923 (remote_hostio_close, remote_hostio_unlink, remote_state)
2924 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2925 (get_memory_write_packet_size, get_memory_read_packet_size)
2926 (append_pending_thread_resumptions, remote_detach_1)
2927 (append_resumption, remote_resume_with_vcont)
2928 (add_current_inferior_and_thread, wait_ns, wait_as)
2929 (process_stop_reply, remote_notice_new_inferior)
2930 (process_initial_stop_replies, remote_add_thread)
2931 (btrace_sync_conf, remote_btrace_maybe_reopen)
2932 (remove_new_fork_children, kill_new_fork_children)
2933 (discard_pending_stop_replies, stop_reply_queue_length)
2934 (check_pending_events_prevent_wildcard_vcont)
2935 (discard_pending_stop_replies_in_queue, stop_reply)
2936 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2937 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2938 (remote_interrupt_as, remote_interrupt_ns)
2939 (remote_get_noisy_reply, remote_query_attached)
2940 (remote_add_inferior, remote_current_thread, get_current_thread)
2941 (set_thread, set_general_thread, set_continue_thread)
2942 (set_general_process, write_ptid)
2943 (remote_unpack_thread_info_response, remote_get_threadinfo)
2944 (parse_threadlist_response, remote_get_threadlist)
2945 (remote_threadlist_iterator, remote_get_threads_with_ql)
2946 (remote_get_threads_with_qxfer)
2947 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2948 (get_offsets, remote_check_symbols, remote_supported_packet)
2949 (remote_query_supported, remote_packet_size)
2950 (remote_serial_quit_handler, remote_detach_pid)
2951 (remote_vcont_probe, remote_resume_with_hc)
2952 (send_interrupt_sequence, interrupt_query)
2953 (remote_notif_get_pending_events, fetch_register_using_p)
2954 (send_g_packet, process_g_packet, fetch_registers_using_g)
2955 (store_register_using_P, store_registers_using_G)
2956 (set_remote_traceframe, check_binary_download)
2957 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2958 (remote_xfer_live_readonly_partial, remote_read_bytes)
2959 (remote_send_printf, remote_flash_write, readchar)
2960 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2961 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2962 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2963 (extended_remote_disable_randomization, extended_remote_run)
2964 (send_environment_packet, extended_remote_environment_support)
2965 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2966 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2967 (packet_command): Now methods of ...
2968 (remote_target): ... this class.
2969 (m_remote_state) <remote_target>: New field.
2970 (struct remote_state) <stop_reply_queue,
2971 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2973 (remote_state::remote_state): Allocate stop_reply_queue.
2974 (remote_state): Delete global.
2975 (get_remote_state_raw): Delete.
2976 (remote_target::get_remote_state): Allocate m_remote_state on
2978 (get_current_remote_target): New.
2979 (remote_ops, extended_remote_ops): Delete.
2980 (wait_forever_enabled_p, remote_async_inferior_event_token):
2981 Delete, moved to struct remote_state.
2982 (remote_target::close): Delete self. Destruction bits split to
2984 (remote_target::~remote_target): ... this.
2985 (show_memory_packet_size): Adjust to use
2986 get_current_remote_target.
2987 (struct protocol_feature) <func>: Add remote_target parameter.
2988 All callers adjusted.
2989 (curr_quit_handler_target): New.
2990 (remote_serial_quit_handler): Reimplement.
2991 (remote_target::open_1): Adjust to use get_current_remote_target.
2992 Heap-allocate remote_target/extended_remote_target instances.
2993 (vcont_builder::vcont_builder): Add remote_target parameter, and
2994 save it in m_remote. All callers adjusted.
2995 (vcont_builder::m_remote): New field.
2996 (vcont_builder::restart, vcont_builder::flush)
2997 (vcont_builder::push_action): Use it.
2998 (remote_target::commit_resume): Use it.
2999 (struct queue_iter_param) <remote>: New field.
3000 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3001 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3002 (check_pending_event_prevents_wildcard_vcont_callback)
3003 (remote_target::check_pending_events_prevent_wildcard_vcont)
3004 (remote_target::discard_pending_stop_replies)
3005 (remote_target::discard_pending_stop_replies_in_queue)
3006 (remote_target::remote_notif_remove_queued_reply): Fill in
3008 (remote_notif_get_pending_events): New.
3009 (remote_target::readchar, remote_target::remote_serial_write):
3010 Save/restore curr_quit_handler_target.
3012 (kill_new_fork_children): Fill in 'remote' field.
3013 (packet_command): Use get_current_remote_target, defer to
3014 remote_target method of same name.
3015 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3016 parameter, and save it in m_remote. All callers adjusted.
3017 (scoped_remote_fd::release): Use m_remote.
3018 (scoped_remote_fd::m_remote): New field.
3019 (remote_file_put, remote_file_get, remote_file_delete): Use
3020 get_current_remote_target, defer to remote_target method of same
3022 (remote_btrace_reset): Add remote_state paremeter. Update all
3024 (remote_async_inferior_event_handler). Pass down 'data'.
3025 (remote_new_objfile): Use get_current_remote_target.
3026 (remote_target::vcont_r_supported): New.
3027 (set_range_stepping): Use get_current_remote_target and
3028 remote_target::vcont_r_supported.
3029 (_initialize_remote): Don't allocate 'remote_state' and
3030 'stop_reply_queue' globals.
3031 * remote.h (struct remote_target): Forward declare.
3032 (getpkt, putpkt, remote_notif_get_pending_events): Add
3033 'remote_target' parameter.
3035 2018-05-22 Pedro Alves <palves@redhat.com>
3037 * remote.c (vcont_builder): Now a class. Make all data members
3039 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3041 (vcont_builder_restart): Rename to ...
3042 (vcont_builder::restart): ... this.
3043 (vcont_builder_flush): Rename to ...
3044 (vcont_builder::flush): ... this.
3045 (vcont_builder_push_action): Rename to ...
3046 (vcont_builder::push_action): ... this.
3047 (remote_target::commit_resume): Adjust.
3049 2018-05-22 Pedro Alves <palves@redhat.com>
3051 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3052 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3053 (get_fixed_memory_packet_size): New.
3054 (get_memory_packet_size): Use it.
3055 (set_memory_packet_size): Don't override the config size with
3056 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3057 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3058 Don't refer to get_memory_packet_size if not connected to a remote
3059 target. Show "(default)" if configured size is 0.
3061 2018-05-22 Pedro Alves <palves@redhat.com>
3063 * remote.c (remote_target::mourn_inferior): Move
3064 discard_pending_stop_replies call here from ...
3065 (_initialize_remote): ... here.
3067 2018-05-22 Pedro Alves <palves@redhat.com>
3069 * remote.c (compare_section_command): Remove set_general_process
3072 2018-05-22 Pedro Alves <palves@redhat.com>
3074 * remote.c (struct packet_reg, struct remote_arch_state):
3075 Move higher up in the file.
3076 (remote_state) <m_arch_states>: Store remote_arch_state values
3077 instead of remote_arch_state pointers.
3078 (remote_state::get_remote_arch_state): Adjust.
3080 2018-05-22 Pedro Alves <palves@redhat.com>
3082 * remote.c: Include <unordered_map>.
3083 (remote_state): Now a class.
3084 (remote_state) <get_remote_arch_state>: Declare method.
3085 <get_remote_arch_state>: New field.
3086 (remote_arch_state) <remote_arch_state>: Declare ctor.
3087 <regs>: Now a unique_ptr.
3088 (remote_gdbarch_data_handle): Delete.
3089 (get_remote_arch_state): Delete.
3090 (remote_state::get_remote_arch_state): New.
3091 (get_remote_state): Adjust to call remote_state's
3092 get_remote_arch_state method.
3093 (init_remote_state): Delete, bits factored out to ...
3094 (remote_arch_state::remote_arch_state): ... this new method.
3095 (get_remote_packet_size, get_memory_packet_size)
3096 (process_g_packet, remote_target::fetch_registers)
3097 (remote_target::prepare_to_store, store_registers_using_G)
3098 (remote_target::store_registers, remote_target::get_trace_status):
3099 Adjust to call remote_state's method.
3100 (_initialize_remote): Remove reference to
3101 remote_gdbarch_data_handle.
3103 2018-05-22 Pedro Alves <palves@redhat.com>
3105 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3106 pread>: New method declarations.
3107 (remote_target::open_1): Adjust.
3108 (readahead_cache_invalidate): Rename to ...
3109 (readahead_cache::invalidate): ... this, and adjust to be a class
3111 (readahead_cache_invalidate_fd): Rename to ...
3112 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3114 (remote_hostio_pwrite): Adjust.
3115 (remote_hostio_pread_from_cache): Rename to ...
3116 (readahead_cache::pread): ... this, and adjust to be a class
3118 (remote_hostio_close): Adjust.
3120 2018-05-22 Pedro Alves <palves@redhat.com>
3122 * remote.c (remote_hostio_close_cleanup): Delete.
3123 (class scoped_remote_fd): New.
3124 (remote_file_put, remote_file_get): Use it.
3126 2018-05-22 Pedro Alves <palves@redhat.com>
3128 (struct vCont_action_support): Use bool and initialize all fields.
3129 (struct readahead_cache): Initialize all fields.
3130 (remote_state): Use bool and initialize all fields.
3131 (remote_state::remote_state, remote_state::~remote_state): New.
3132 (new_remote_state): Delete.
3133 (_initialize_remote): Use new to allocate remote_state.
3135 2018-05-22 Pedro Alves <palves@redhat.com>
3139 * c-exp.y: Include "c-support.h".
3140 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3141 of tolower. Use c_ident_is_alpha to scan names.
3142 * c-lang.c: Include "c-support.h".
3143 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3144 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3145 * c-support.h: New file, with bits factored out from ...
3146 * cp-name-parser.y: ... this file.
3147 Include "c-support.h".
3148 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3149 c-support.h and renamed.
3150 (symbol_end, yylex): Adjust.
3152 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3154 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3155 parameter type to CORE_ADDR.
3156 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3157 parameter type in declaration to CORE_ADDR.
3158 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3159 target_auxv_search to get AT_HWCAP and use the result to get the
3161 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3162 to CORE_ADDR. Remove the cast of the return value to unsigned
3163 long. Fix error predicate of target_auxv_search.
3164 (ppc_linux_nat_target::read_description): Change the type of the
3165 hwcap variable to CORE_ADDR.
3167 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3169 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3170 if the size of fpscr is larger than 32 bits.
3172 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3174 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3175 (ppc32_linux_vsxregmap): New global.
3176 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3177 regcache_supply_regset, and regcache_collect_regset.
3178 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3179 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3180 (fetch_vsx_register, store_vsx_register): Remove.
3181 (fetch_vsx_registers): Add regno parameter. Get regset using
3182 ppc_linux_vsxregset. Use regset to supply registers.
3183 (store_vsx_registers): Add regno parameter. Get regset using
3184 ppc_linux_vsxregset. Use regset to collect registers.
3185 (fetch_register): Call fetch_vsx_registers instead of
3187 (store_register): Call store_vsx_registers instead of
3189 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3190 new regno parameter.
3191 (store_ppc_registers): Call store_vsx_registers with -1 for the
3192 new regno parameter.
3193 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3194 (ppc_collect_vsxregset): Remove.
3196 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3198 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3200 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3201 for vector register offset fields.
3202 (ppc64_fbsd_reg_offsets): Likewise.
3203 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3204 to vector register offset fields.
3205 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3206 to vector register offset fields.
3207 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3208 vector register offset fields.
3209 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3210 initializers for vector register offset fields.
3211 (rs6000_aix64_reg_offsets): Likewise.
3212 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3213 (ppc_supply_vrregset): Remove.
3214 (ppc_collect_vrregset): Remove.
3215 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3216 (ppc_linux_vrregset) : New function.
3217 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3218 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3219 (ppc32_linux_vrregset): Remove.
3220 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3221 and use result instead of ppc32_linux_vrregset.
3222 (ppc32_linux_reg_offsets): Remove initializers for vector register
3224 (ppc64_linux_reg_offsets): Likewise.
3225 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3226 * ppc-linux-nat.c: Include regset.h.
3227 (gdb_vrregset_t): Adjust comment to account for little-endian
3229 (supply_vrregset, fill_vrregset): Remove.
3230 (fetch_altivec_register, store_altivec_register): Remove.
3231 (fetch_altivec_registers): Add regno parameter. Get regset using
3232 ppc_linux_vrregset. Use regset to supply registers.
3233 (store_altivec_registers): Add regno parameter. Get regset using
3234 ppc_linux_vrregset. Use regset to collect registers.
3235 (fetch_register): Call fetch_altivec_registers instead of
3236 fetch_altivec_register.
3237 (store_register): Call store_altivec_registers instead of
3238 store_altivec_register.
3239 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3240 the new regno parameter.
3241 (store_ppc_registers): Call store_altivec_registers with -1 for
3242 the new regno parameter.
3244 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3246 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3247 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3248 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3249 (gdb_vrregset_t): Change array type size to
3250 PPC_LINUX_SIZEOF_VRREGSET.
3251 (gdb_vsxregset_t): Change array type size to
3252 PPC_LINUX_SIZEOF_VSXREGSET.
3253 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3254 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3255 PPC_LINUX_SIZEOF_VSXREGSET.
3257 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3259 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3260 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3262 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3263 ppc_linux_target_wordsize with tid.
3264 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3266 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3267 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3268 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3269 tid parameter. Remove static specifier.
3270 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3271 (ppc_linux_target_wordsize): New declaration.
3273 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3275 * arch/ppc-linux-common.c: New file.
3276 * arch/ppc-linux-common.h: New file.
3277 * arch/ppc-linux-tdesc.h: New file.
3278 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3279 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3280 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3281 arch/ppc-linux-tdesc.h.
3282 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3283 arch/ppc-linux-tdesc.h.
3284 (ppc_linux_nat_target::read_description): Remove target
3285 description matching code. Fill a ppc_linux_features struct and
3286 call ppc_linux_match_description with it. Move comment about ISA
3287 2.05 to ppc-linux-common.c.
3288 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3289 arch/ppc-linux-tdesc.h.
3290 (ppc_linux_core_read_description): Remove target description
3291 matching code. Fill a ppc_linux_features struct and call
3292 ppc_linux_match_description with it.
3293 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3294 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3295 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3296 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3297 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3298 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3299 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3300 (tdesc_powerpc_e500l): Remove.
3302 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3304 * ada-lang.c (catch_assert_command): Pass empty string instead
3305 of NULL for excep_string argument.
3307 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3309 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3310 the width of the requested register exceeds the width of the
3313 2018-05-21 Tom Tromey <tom@tromey.com>
3315 * printcmd.c (output_command): Remove.
3316 (output_command_const): Rename to output_command.
3317 * valprint.h (output_command): Rename from output_command_const.
3318 * tracepoint.c (trace_dump_actions): Call output_command.
3320 2018-05-21 Tom Tromey <tom@tromey.com>
3322 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3323 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3324 * ada-lang.h (create_ada_exception_catchpoint): Update.
3325 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3327 (create_excep_cond_exprs, ~ada_catchpoint)
3328 (should_stop_exception, print_one_exception)
3329 (print_mention_exception, print_recreate_exception): Update.
3330 (ada_get_next_arg): Remove.
3331 (catch_ada_exception_command_split): Use std::string. Change type
3332 of "excep_string", "cond_string".
3333 (catch_ada_exception_command): Update.
3334 (create_ada_exception_catchpoint): Change type of excep_string.
3335 (ada_exception_sal): Remove excep_string parameter.
3336 (~ada_catchpoint): Remove.
3338 2018-05-21 Tom Tromey <tom@tromey.com>
3340 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3343 2018-05-21 Tom Tromey <tom@tromey.com>
3345 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3346 Return unique_xmalloc_ptr.
3347 (print_it_exception): Update.
3349 2018-05-21 Tom Tromey <tom@tromey.com>
3351 * tracepoint.c (trace_dump_actions): Use std::string.
3353 2018-05-21 Tom Tromey <tom@tromey.com>
3355 * symfile.c (reread_symbols): Use std::string for original_name.
3357 2018-05-21 Tom Tromey <tom@tromey.com>
3359 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3360 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3363 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3365 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3367 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3368 * objfiles.c (get_objfile_bfd_data): Allocate
3369 objfile_per_bfd_storage with obstack_new when allocating on
3372 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3374 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3376 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3377 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3378 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3379 (add_pending): Likewise.
3380 (parse_symbol): Likewise.
3381 (parse_partial_symbols): Likewise.
3382 (psymtab_to_symtab_1): Likewise.
3383 (new_psymtab): Likewise.
3384 (elfmdebug_build_psymtabs): Likewise.
3385 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3386 * objfiles.c (get_objfile_bfd_data): Likewise.
3387 (objfile_register_static_link): Likewise.
3388 * psymtab.c (allocate_psymtab): Likewise.
3389 * stabsread.c (read_member_functions): Likewise.
3390 * xcoffread.c (xcoff_end_psymtab): Likewise.
3392 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3394 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3395 compiler supports std::is_trivially_constructible.
3396 * common/poison.h: Include obstack.h.
3397 (IsMallocable): Define to is_trivially_constructible if the
3398 compiler supports it, define to true_type otherwise.
3402 (XOBNEWVEC): Redefine.
3403 * gdb_obstack.h (obstack_zalloc): New.
3404 (OBSTACK_ZALLOC): Redefine.
3405 (obstack_calloc): New.
3406 (OBSTACK_CALLOC): Redefine.
3408 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3409 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3411 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3412 obstack_calloc/obstack_zalloc.
3413 (gdbarch_obstack_zalloc): Remove.
3414 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3416 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3418 * stack.c (backtrace_command_1): Remove useless variable int i.
3420 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3422 * stack.c (print_frame_info): Fix comment.
3424 2018-05-18 Tom Tromey <tom@tromey.com>
3426 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3427 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3428 (~dwarf2_per_objfile): Update
3429 (dwarf2_get_dwz_file): Use new.
3430 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3433 2018-05-18 Tom Tromey <tom@tromey.com>
3435 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3437 * dwarf2read.c (struct dwp_file): Add constructor and
3439 (open_and_init_dwp_file): Return a unique_ptr.
3440 (dwarf2_per_objfile, create_dwp_hash_table)
3441 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3442 (lookup_dwo_unit_in_dwp): Update.
3443 (open_and_init_dwp_file, get_dwp_file): Update.
3445 2018-05-18 Tom Tromey <tom@tromey.com>
3447 * dwarf2read.c (dwarf2_per_objfile): Update.
3448 (struct mapped_index): Add initializers.
3449 (dwarf2_read_index): Use new.
3450 (dw2_symtab_iter_init): Update.
3451 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3454 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3456 * dwarf2read.c (mapped_index) <total_size>: Remove.
3458 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3460 * unittests/format_pieces-selftests.c (test_format_specifier):
3463 2018-05-18 Tom Tromey <tom@tromey.com>
3465 * c-typeprint.c (maybe_print_hole): New function.
3466 (c_print_type_struct_field_offset): Update.
3467 (c_type_print_base_struct_union): Call maybe_print_hole.
3469 2018-05-17 Keith Seitz <keiths@redhat.com>
3471 * breakpoint.c (build_bpstat_chain): New function, moved from
3473 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3474 If no stop chain is passed, call build_bpstat_chain to build it.
3475 * breakpoint.h (build_bpstat_chain): Declare.
3476 (bpstat_stop_status): Move documentation here from breakpoint.c.
3477 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3478 build the stop chain and pass it to skip_inline_frames.
3479 Pass this stop chain to bpstat_stop_status.
3480 * inline-frame.c: Include breakpoint.h.
3481 (stopped_by_user_bp_inline_frame): New function.
3482 (skip_inline_frames): Add parameter `stop_chain'.
3483 Move documention to inline-frame.h.
3484 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3485 whether the frame should be elided.
3486 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3487 Add moved documentation and update for new parameter.
3489 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3492 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3493 unittests/format_pieces-selftests.c.
3494 * common/format.h (format_piece) <operator==>: New.
3495 (format_pieces) <operator[]>: Remove.
3496 * common/format.c (format_pieces::format_pieces): Handle \e.
3497 * unittests/format_pieces-selftests.c: New.
3499 2018-05-17 Tom Tromey <tom@tromey.com>
3502 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3503 (dw2_instantiate_symtab): Add skip_partial parameter.
3504 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3505 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3506 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3507 (dw2_expand_symtabs_matching_one)
3508 (dw2_find_pc_sect_compunit_symtab)
3509 (dw2_debug_names_lookup_symbol)
3510 (dw2_debug_names_expand_symtabs_for_function): Update.
3511 (init_cutu_and_read_dies): Add skip_partial parameter.
3512 (process_psymtab_comp_unit, build_type_psymtabs_1)
3513 (process_skeletonless_type_unit, load_partial_comp_unit)
3514 (psymtab_to_symtab_1): Update.
3515 (load_full_comp_unit): Add skip_partial parameter.
3516 (process_imported_unit_die, dwarf2_read_addr_index)
3517 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3518 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3519 (read_signatured_type): Update.
3521 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3523 * value.c (release_value): Remove unused variable.
3524 (record_latest_value): Likewise.
3525 (access_value_history): Likewise.
3526 (preserve_values): Likewise.
3528 2018-05-17 Tom Tromey <tom@tromey.com>
3530 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3533 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3536 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3537 Also handle registers whose width is not a multiple of
3539 (linux_nat_trad_target::store_register): Likewise.
3541 2018-05-16 Tom Tromey <tom@tromey.com>
3543 * gdbcore.h (core_bfd): Redefine.
3544 * corelow.c (core_target::close): Update.
3545 (core_target_open): Update.
3546 * progspace.h (struct program_space) <cbfd>: Now a
3549 2018-05-16 Tom Tromey <tom@tromey.com>
3552 * symfile-add-flags.h (enum symfile_add_flags)
3553 <SYMFILE_NOT_FILENAME>: New constant.
3554 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3555 objfile name from BFD.
3556 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3557 * minidebug.c (find_separate_debug_file_in_section): Put
3558 ".gnu_debugdata" into BFD's file name.
3560 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3562 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3565 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3568 * aarch64-tdep.c (aarch64_analyze_prologue,
3569 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3570 Indicate not interested in errors.
3572 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3574 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3575 Supply the MIPS_ZERO_REGNUM register.
3577 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3579 * mips-tdep.c (mask_address_var): Make variable static.
3581 2018-05-14 Tom Tromey <tom@tromey.com>
3583 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3585 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3587 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3588 FXSAVE_ADDR for the mxcsr register.
3590 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3592 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3594 2018-05-11 Pedro Alves <palves@redhat.com>
3596 * corelow.c (core_target) <core_target>: No longer inline.
3597 Initialize m_core_gdbarch, m_core_vec and build the section table
3599 <~core_target>: New.
3600 <core_gdbarch, get_core_register_section>: New methods.
3601 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3602 factored out from ...
3603 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3605 (sniff_core_bfd): Add gdbarch parameter.
3606 (core_close): Delete, merged into ...
3607 (core_target::close): ... here. Delete self.
3608 (core_close_cleanup): Delete.
3609 (core_target_open): Allocate a core_target on the heap. Use a
3610 unique_ptr instead of a cleanup. Bits moved into the core_target
3611 ctor. Adjust to use core_target methods instead of globals.
3612 (get_core_register_section): Rename to ...
3613 (core_target::get_core_register_section): ... this and adjust.
3614 (struct get_core_registers_cb_data): New.
3615 (get_core_registers_cb): Use it. Use bool.
3616 (core_target::fetch_registers, core_target::files_info)
3617 (core_target::xfer_partial, core_target::read_description)
3618 (core_target::pid_to, core_target::thread_name): Adjust to
3619 reference class fields instead of globals.
3620 * target.h (struct target_ops_deleter, target_ops_up): New.
3622 2018-05-11 Pedro Alves <palves@redhat.com>
3624 * corefile.c (core_file_command): Move to corelow.c.
3625 * corelow.c (the_core_target): Delete.
3626 (core_file_command): Moved from corefile.c. Check exec_bfd
3627 instead of the_core_target. Use target_detach instead of calling
3628 into the_core_target directly.
3629 (maybe_say_no_core_file_now): New.
3630 (core_target::detach): Use it.
3631 (_initialize_corelow): Remove references to the_core_target.
3632 * gdbcore.h (the_core_target): Delete.
3634 2018-05-11 Tom Tromey <tromey@redhat.com>
3635 Pedro Alves <palves@redhat.com>
3637 * corefile.c (core_bfd): Remove.
3638 * gdbcore.h (core_bfd): Now a macro.
3639 * progspace.h (struct program_space) <cbfd>: New field.
3641 2018-05-11 Tom Tromey <tom@tromey.com>
3643 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3646 2018-05-10 Tom Tromey <tom@tromey.com>
3648 * configure: Rebuild.
3649 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3651 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3654 * regformats/regdat.sh: Adjust script, following the addition
3655 of the new expedite_regs parameter to init_target_desc.
3657 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3660 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3661 set_gdbarch_significant_addr_bit.
3662 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3663 set_gdbarch_significant_addr_bit.
3664 * utils.c (address_significant): Update to sign extend addr.
3666 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3668 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3669 (xtensa_linux_init_abi): Limit tdep->num_regs by
3670 tdep->num_nopriv_regs.
3671 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3672 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3675 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3677 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3679 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3681 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3682 (I387_MXCSR_INIT_VAL): New constant.
3683 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3684 buffer if it was supplied by the inferior.
3685 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3686 (i387_xsave_get_clear_bv): New function.
3687 (i387_supply_xsave): Only read x87 control registers from the
3688 xsave buffer if the feature is enabled, and the state will have
3689 been written, otherwise, provide a suitable default.
3690 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3691 including x87 control registers. Update control registers if they
3692 have changed from the default value, and mark features as enabled
3694 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3696 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3698 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3700 2018-05-07 Tom Tromey <tom@tromey.com>
3702 * configure: Rebuild.
3703 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3705 2018-05-07 Tom Tromey <tom@tromey.com>
3708 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3709 bit. Use correct value for VDIV.
3711 2018-05-04 Tom Tromey <tom@tromey.com>
3713 * configure: Rebuild.
3714 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3716 2018-05-04 Tom Tromey <tom@tromey.com>
3718 * linux-record.c (record_linux_system_call) <case
3719 RECORD_SYS_RECVFROM>: Add "break".
3721 2018-05-04 Tom Tromey <tom@tromey.com>
3723 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3724 Add missing "break".
3725 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3726 Add missing "break".
3728 2018-05-04 Tom Tromey <tom@tromey.com>
3730 * rs6000-tdep.c (ppc_process_record_op4)
3731 (ppc_process_record_op63): Add fall-through comment.
3733 2018-05-04 Tom Tromey <tom@tromey.com>
3735 * i386-tdep.c (i386_process_record): Add fall-through comment.
3737 2018-05-04 Tom Tromey <tom@tromey.com>
3739 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3742 2018-05-04 Tom Tromey <tom@tromey.com>
3744 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3745 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3746 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3748 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3750 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3753 2018-05-04 Tom Tromey <tom@tromey.com>
3755 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3757 2018-05-04 Tom Tromey <tom@tromey.com>
3759 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3760 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3761 * symfile.c (section_is_mapped): Fix fall-through comment.
3762 * stabsread.c (define_symbol, read_member_functions): Fix
3763 fall-through comment.
3764 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3766 * remote.c (remote_wait_as): Fix fall-through comment.
3767 * p-exp.y (yylex): Fix fall-through comment.
3768 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3770 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3771 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3772 * jv-exp.y (yylex): Fix fall-through comment.
3773 * go-exp.y (lex_one_token): Fix fall-through comment.
3774 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3775 fall-through comment.
3776 * f-exp.y (yylex): Fix fall-through comment.
3777 * dwarf2read.c (process_die): Fix fall-through comments.
3778 * dbxread.c (process_one_symbol): Fix fall-through comment.
3779 * d-exp.y (lex_one_token): Fix fall-through comment.
3780 * cp-name-parser.y (yylex): Fix fall-through comment.
3781 * coffread.c (coff_symtab_read): Fix fall-through comment.
3782 * c-exp.y (lex_one_token): Fix fall-through comment.
3783 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3785 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3788 2018-05-04 Tom Tromey <tom@tromey.com>
3791 * NEWS: Mention gdb.execute change.
3792 * gdbcmd.h (execute_control_command): Don't declare.
3793 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3794 execute_control_commands, execute_control_commands_to_string.
3795 * cli/cli-script.h (execute_control_commands)
3796 (execute_control_commands_to_string): Declare.
3797 (execute_control_command): Add from_tty parameter.
3798 * cli/cli-script.c (execute_control_commands)
3799 (execute_control_commands_to_string): New functions.
3800 (execute_user_command): Use execute_control_commands.
3801 (execute_control_command_1): Add "from_tty" parameter. Update.
3802 (execute_control_command): Likewise.
3804 2018-05-04 Tom Tromey <tom@tromey.com>
3807 * NEWS: Mention that breakpoint commands are writable.
3808 * python/py-breakpoint.c (bppy_set_commands): New function.
3809 (breakpoint_object_getset) <"commands">: Use it.
3811 2018-05-04 Tom Tromey <tom@tromey.com>
3813 * tracepoint.c (actions_command): Update.
3814 * mi/mi-cmd-break.c (mi_command_line_array)
3815 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3816 (mi_read_next_line): Remove.
3817 (mi_cmd_break_commands): Update.
3818 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3820 * cli/cli-script.c (get_command_line): Update.
3821 (process_next_line): Use function_view. Constify.
3822 (recurse_read_control_structure, read_command_lines)
3823 (read_command_lines_1): Change argument types to function_view.
3824 (do_define_command, document_command): Update.
3825 * breakpoint.h (check_tracepoint_command): Don't declare.
3826 * breakpoint.c (check_tracepoint_command): Remove.
3827 (commands_command_1, create_tracepoint_from_upload): Update.
3829 2018-05-04 Tom Tromey <tom@tromey.com>
3832 * cli/cli-script.h (enum command_control_type) <define_control>:
3834 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3835 (build_command_line, execute_control_command_1)
3836 (process_next_line): Likewise.
3837 (do_define_command): New function, extracted from define_command.
3838 (define_command): Use it.
3840 2018-05-04 Tom Tromey <tom@tromey.com>
3842 * tracepoint.c (actions_command): Update.
3843 * cli/cli-script.h (read_command_lines): Update.
3844 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3845 (MAX_TMPBUF): Remove define.
3846 (define_command): Use string_printf.
3847 (document_command): Likewise.
3848 * breakpoint.c (commands_command_1): Update.
3850 2018-05-04 Tom Tromey <tom@tromey.com>
3852 * top.c (execute_command): Update.
3853 * cli/cli-script.h (print_command_lines): Now varargs.
3854 * cli/cli-script.c (print_command_lines): Now varargs.
3855 (execute_control_command_1) <case while_control, case if_control>:
3858 2018-05-04 Tom Tromey <tom@tromey.com>
3860 * tracepoint.c (all_tracepoint_actions): Rename from
3861 all_tracepoint_actions_and_cleanup. Change return type.
3862 (actions_command, encode_actions_1, encode_actions)
3863 (trace_dump_actions, tdump_command): Update.
3864 * remote.c (remote_download_command_source): Update.
3865 * python/python.c (gdbpy_eval_from_control_command)
3866 (python_command, python_interactive_command): Update.
3867 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3868 * guile/guile.c (guile_command)
3869 (gdbscm_eval_from_control_command, guile_command): Update.
3870 * compile/compile.c (compile_code_command)
3871 (compile_print_command, compile_to_object): Update.
3872 * cli/cli-script.h (struct command_lines_deleter): New.
3873 (counted_command_line): New typedef.
3874 (struct command_line): Add constructor, destructor.
3875 <body_list>: Remove.
3876 <body_list_0, body_list_1>: New members.
3877 (command_line_up): Remove typedef.
3878 (read_command_lines, read_command_lines_1, get_command_line):
3880 (copy_command_lines): Don't declare.
3881 * cli/cli-script.c (build_command_line): Use "new".
3882 (get_command_line): Return counted_command_line.
3883 (print_command_lines, execute_user_command)
3884 (execute_control_command_1, while_command, if_command): Update.
3885 (realloc_body_list): Remove.
3886 (process_next_line, recurse_read_control_structure): Update.
3887 (read_command_lines, read_command_lines_1): Return counted_command_line.
3888 (free_command_lines): Use "delete".
3889 (copy_command_lines): Remove.
3890 (define_command, document_command, show_user_1): Update.
3891 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3892 a counted_command_line.
3893 * breakpoint.h (counted_command_line): Remove typedef.
3894 (breakpoint_set_commands): Update.
3895 * breakpoint.c (check_no_tracepoint_commands)
3896 (validate_commands_for_breakpoint): Update.
3897 (breakpoint_set_commands): Change commands to be a
3898 counted_command_line.
3899 (commands_command_1, update_dprintf_command_list)
3900 (create_tracepoint_from_upload): Update.
3902 2018-05-04 Tom Tromey <tom@tromey.com>
3904 * cli/cli-decode.h (cmd_list_element): New constructor.
3905 (~cmd_list_element): New destructor.
3906 (struct cmd_list_element): Add initializers.
3907 * cli/cli-decode.c (do_add_cmd): Use "new".
3908 (delete_cmd): Use "delete".
3910 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3911 Pedro Alves <palves@redhat.com>
3913 PR breakpoints/19806 and support for PR external/20207.
3914 * NEWS: Mention Aarch64 watchpoint improvements.
3915 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3916 watchpoints and PR external/20207 watchpoints.
3917 * nat/aarch64-linux-hw-point.c
3918 (kernel_supports_any_contiguous_range): New.
3919 (aarch64_watchpoint_offset): New.
3920 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3921 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3922 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3923 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3924 next_addr_orig_p. Support PR external/20207 watchpoints.
3925 (aarch64_downgrade_regs): New.
3926 (aarch64_dr_state_insert_one_point): New parameters offset and
3928 (aarch64_dr_state_remove_one_point): Likewise.
3929 (aarch64_handle_breakpoint): Update caller.
3930 (aarch64_handle_aligned_watchpoint): Likewise.
3931 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3933 (aarch64_linux_set_debug_regs): Remove const from state. Call
3934 aarch64_downgrade_regs.
3935 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3936 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3937 (DR_CONTROL_MASK): ... this.
3938 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3939 (unsigned int aarch64_watchpoint_offset): New prototype.
3940 (aarch64_linux_set_debug_regs): Remove const from state.
3941 * utils.c (align_up, align_down): Move to ...
3942 * common/common-utils.c (align_up, align_down): ... here.
3943 * utils.h (align_up, align_down): Move to ...
3944 * common/common-utils.h (align_up, align_down): ... here.
3946 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3948 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3949 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3950 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3951 Re-implement to match the ABI as summarized in GCC's
3952 gcc/config/sparc/sparc.c. All callers updated.
3953 (sparc32_store_arguments): Remove assertion.
3955 2018-05-04 Tom Tromey <tom@tromey.com>
3957 * printcmd.c: Don't include tui.h.
3958 (decode_format): Use skip_spaces.
3960 2018-05-04 Tom Tromey <tom@tromey.com>
3963 * printcmd.c (last_count): New global.
3964 (x_command): Use saved count when repeating.
3966 2018-05-04 Tom Tromey <tom@tromey.com>
3968 * nto-procfs.c (do_closedir_cleanup): Remove.
3969 (procfs_pidlist): Use gdb_dir_up.
3970 * procfs.c (do_closedir_cleanup): Remove.
3971 (proc_update_threads): Use gdb_dir_up.
3972 * common/filestuff.h (struct gdb_dir_deleter): New.
3973 (gdb_dir_up): New typedef.
3975 2018-05-04 Tom Tromey <tom@tromey.com>
3977 * ada-lang.c (print_mention_exception): Use std::string.
3979 2018-05-04 Tom Tromey <tom@tromey.com>
3981 * ada-lang.c (create_excep_cond_exprs): Update.
3982 (ada_exception_catchpoint_cond_string): Use std::string.
3984 2018-05-04 Tom Tromey <tom@tromey.com>
3986 * ada-lang.c (xget_renaming_scope): Return std::string.
3987 (old_renaming_is_invisible): Update.
3989 2018-05-04 Tom Tromey <tom@tromey.com>
3991 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3992 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3994 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3996 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3998 2018-05-04 Tom Tromey <tom@tromey.com>
4000 * remote.c (remote_query_supported_append): Change type.
4001 (remote_check_symbols): Update.
4003 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4006 * configure.ac: Prepend libpython.
4007 * python/python-config.py: Likewise.
4008 * configure: Regenerate.
4010 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4012 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4014 2018-05-03 Pedro Alves <palves@redhat.com>
4017 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4018 override. Write 'true' instead of '1'.
4019 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4022 2018-05-02 Pedro Alves <palves@redhat.com>
4024 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4025 add_inf_child_target.
4026 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4027 add_inf_child_target.
4028 * aix-thread.c (aix_thread_target_info): New.
4029 (aix_thread_target) <shortname, longname, doc>: Delete.
4031 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4032 add_inf_child_target.
4033 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4034 add_inf_child_target.
4035 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4036 add_inf_child_target.
4037 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4038 add_inf_child_target.
4039 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4040 add_inf_child_target.
4041 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4042 add_inf_child_target.
4043 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4044 add_inf_child_target.
4045 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4046 add_inf_child_target.
4047 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4048 add_inf_child_target.
4049 * bfd-target.c (target_bfd_target_info): New.
4050 (target_bfd) <shortname, longname, doc>: Delete.
4052 * bsd-kvm.c (bsd_kvm_target_info): New.
4053 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4055 (bsd_kvm_target::open): Rename to ...
4056 (bsd_kvm_target_open): ... this. Adjust.
4057 * bsd-uthread.c (bsd_uthread_target_info): New.
4058 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4060 * corefile.c (core_file_command): Adjust.
4061 * corelow.c (core_target_info): New.
4062 (core_target) <shortname, longname, doc>: Delete.
4064 (core_target::open): Rename to ...
4065 (core_target_open): ... this. Adjust.
4066 * ctf.c (ctf_target_info): New.
4067 (ctf_target) <shortname, longname, doc>: Delete.
4069 (ctf_target::open): Rename to ...
4070 (ctf_target_open): ... this.
4071 (_initialize_ctf): Adjust.
4072 * exec.c (exec_target_info): New.
4073 (exec_target) <shortname, longname, doc>: Delete.
4075 (exec_target::open): Rename to ...
4076 (exec_target_open): ... this.
4077 * gdbcore.h (core_target_open): Declare.
4078 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4079 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4080 add_inf_child_target.
4081 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4082 add_inf_child_target.
4083 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4084 add_inf_child_target.
4085 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4086 add_inf_child_target.
4087 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4088 add_inf_child_target.
4089 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4090 add_inf_child_target.
4091 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4092 add_inf_child_target.
4093 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4094 add_inf_child_target.
4095 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4096 add_inf_child_target.
4097 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4098 add_inf_child_target.
4099 * inf-child.c (inf_child_target_info): New.
4100 (inf_child_target::info): New.
4101 (inf_child_open_target): Remove 'target' parameter. Use
4102 get_native_target instead.
4103 (inf_child_target::open): Delete.
4104 (add_inf_child_target): New.
4105 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4108 (add_inf_child_target): Declare.
4109 (inf_child_open_target): Declare.
4110 * linux-thread-db.c (thread_db_target_info): New.
4111 (thread_db_target) <shortname, longname, doc>: Delete.
4113 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4114 add_inf_child_target.
4115 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4116 add_inf_child_target.
4117 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4118 add_inf_child_target.
4119 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4120 add_inf_child_target.
4121 * make-target-delegates (print_class): Adjust.
4122 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4123 add_inf_child_target.
4124 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4125 add_inf_child_target.
4126 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4127 add_inf_child_target.
4128 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4129 add_inf_child_target.
4130 * nto-procfs.c (nto_native_target_info): New.
4131 (nto_procfs_target_native) <shortname, longname, doc>:
4134 (nto_procfs_target_info): New.
4135 (nto_procfs_target_procfs) <shortname, longname, doc>:
4138 (init_procfs_targets): Adjust.
4139 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4140 add_inf_child_target.
4141 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4142 add_inf_child_target.
4143 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4144 add_inf_child_target.
4145 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4146 add_inf_child_target.
4147 * ravenscar-thread.c (ravenscar_target_info): New.
4148 (ravenscar_thread_target) <shortname, longname, doc>:
4151 * record-btrace.c (record_btrace_target_info):
4152 (record_btrace_target) <shortname, longname, doc>: Delete.
4154 (record_btrace_target::open): Rename to ...
4155 (record_btrace_target_open): ... this. Adjust.
4156 * record-full.c (record_longname, record_doc): New.
4157 (record_full_base_target) <shortname, longname, doc>: Delete.
4159 (record_full_target_info): New.
4160 (record_full_target): <shortname>: Delete.
4162 (record_full_core_open_1, record_full_open_1): Update comments.
4163 (record_full_base_target::open): Rename to ...
4164 (record_full_open): ... this.
4165 (cmd_record_full_restore): Update.
4166 (_initialize_record_full): Update.
4167 * remote-sim.c (remote_sim_target_info): New.
4168 (gdbsim_target) <shortname, longname, doc>: Delete.
4170 (gdbsim_target::open): Rename to ...
4171 (gdbsim_target_open): ... this.
4172 (_initialize_remote_sim): Adjust.
4173 * remote.c (remote_doc): New.
4174 (remote_target_info): New.
4175 (remote_target) <shortname, longname, doc>: Delete.
4177 (extended_remote_target_info): New.
4178 (extended_remote_target) <shortname, longname, doc>: Delete.
4180 (remote_target::open_1): Make static. Adjust.
4181 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4182 * s390-linux-nat.c (_initialize_s390_nat): Use
4183 add_inf_child_target.
4184 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4185 add_inf_child_target.
4186 * sol-thread.c (thread_db_target_info): New.
4187 (sol_thread_target) <shortname, longname, doc>: Delete.
4189 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4190 add_inf_child_target.
4191 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4192 add_inf_child_target.
4193 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4194 add_inf_child_target.
4195 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4196 add_inf_child_target.
4197 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4198 add_inf_child_target.
4199 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4200 add_inf_child_target.
4201 * spu-linux-nat.c (_initialize_spu_nat): Use
4202 add_inf_child_target.
4203 * spu-multiarch.c (spu_multiarch_target_info): New.
4204 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4206 * target-delegates.c: Regenerate.
4207 * target.c: Include <unordered_map>.
4208 (target_ops_p): Delete.
4209 (DEF_VEC_P(target_ops_p)): Delete.
4210 (target_factories): New.
4211 (test_target_info): New.
4212 (test_target_ops::info): New.
4213 (open_target): Adjust to use target_factories.
4214 (add_target_with_completer): Rename to ...
4215 (add_target): ... this. Change prototype. Register target_info
4216 and open callback in target_factories. Register target_info in
4217 command context instead of target_ops.
4218 (add_target): Delete old implementation.
4219 (add_deprecated_target_alias): Change prototype. Adjust.
4220 (the_native_target): New.
4221 (set_native_target, get_native_target): New.
4222 (find_default_run_target): Use the_native_target.
4223 (find_attach_target, find_run_target): Simplify.
4224 (target_ops::open): Delete.
4225 (dummy_target_info): New.
4226 (dummy_target::shortname, dummy_target::longname)
4227 (dummy_target::doc): Delete.
4228 (dummy_target::info): New.
4229 (debug_target::shortname, debug_target::longname)
4230 (debug_target::doc): Delete.
4231 (debug_target::info): New.
4232 * target.h (struct target_info): New.
4233 (target_ops::~target_ops): Add comment.
4234 (target_ops::info): New.
4235 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4236 longer virtual. Implement in terms of target_info.
4237 (set_native_target, get_native_target): Declare.
4238 (target_open_ftype): New.
4239 (add_target, add_target_with_completer)
4240 (add_deprecated_target_alias): Change prototype.
4241 (test_target) <shortname, longname, doc>: Delete.
4243 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4244 add_inf_child_target.
4245 * tracefile-tfile.c (tfile_target_info): New.
4246 (tfile_target) <shortname, longname, doc>: Delete.
4248 (tfile_target::open): Rename to ...
4249 (tfile_target_open): ... this.
4250 (_initialize_tracefile_tfile): Adjust.
4251 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4252 add_inf_child_target.
4253 * windows-nat.c (_initialize_windows_nat): Use
4254 add_inf_child_target.
4255 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4256 add_inf_child_target.
4258 2018-05-02 Pedro Alves <palves@redhat.com>
4260 * linux-nat.h (linux_nat_target) <low_new_thread,
4261 low_delete_thread, low_new_fork, low_forget_process,
4262 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4263 New virtual methods.
4264 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4265 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4266 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4267 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4268 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4270 * linux-fork.c (delete_fork): Adjust to call low method.
4271 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4272 (linux_nat_new_fork, linux_nat_forget_process_hook)
4273 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4274 (linux_nat_status_is_event):
4275 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4276 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4278 (sigtrap_is_event): Rename to ...
4279 (linux_nat_target::low_status_is_event): ... this.
4280 (linux_nat_set_status_is_event): Delete.
4281 (save_stop_reason, linux_nat_wait_1)
4282 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4284 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4285 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4286 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4287 (linux_nat_set_prepare_to_resume): Delete.
4288 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4289 low virtual methods.
4290 * amd64-linux-nat.c: Likewise.
4291 * arm-linux-nat.c: Likewise.
4292 * i386-linux-nat.c: Likewise.
4293 * ia64-linux-nat.c: Likewise.
4294 * mips-linux-nat.c: Likewise.
4295 * ppc-linux-nat.c: Likewise.
4296 * s390-linux-nat.c: Likewise.
4297 * sparc64-linux-nat.c: Likewise.
4298 * x86-linux-nat.c: Likewise.
4299 * x86-linux-nat.h: Include "nat/x86-linux.h".
4300 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4301 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4304 2018-05-02 Pedro Alves <palves@redhat.com>
4306 * target.h (target_ops)
4307 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4308 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4309 stopped_by_watchpoint, have_continuable_watchpoint,
4310 stopped_data_address, watchpoint_addr_within_range,
4311 can_accel_watchpoint_condition, can_run, thread_alive,
4312 has_all_memory, has_memory, has_stack, has_registers,
4313 has_execution, can_async_p, is_async_p, supports_non_stop,
4314 always_non_stop_p, can_execute_reverse, supports_multi_process,
4315 supports_enable_disable_tracepoint,
4316 supports_disable_randomization, supports_string_tracing,
4317 supports_evaluation_of_breakpoint_conditions,
4318 can_run_breakpoint_commands, filesystem_is_local,
4319 can_download_tracepoint, get_trace_state_variable_value,
4320 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4321 record_is_replaying, record_will_replay,
4322 augmented_libraries_svr4_read>: Adjust to return bool.
4323 * aarch64-linux-nat.c: All implementations adjusted.
4324 * aix-thread.c: All implementations adjusted.
4325 * arm-linux-nat.c: All implementations adjusted.
4326 * breakpoint.c: All implementations adjusted.
4327 * bsd-kvm.c: All implementations adjusted.
4328 * bsd-uthread.c: All implementations adjusted.
4329 * corelow.c: All implementations adjusted.
4330 * ctf.c: All implementations adjusted.
4331 * darwin-nat.c: All implementations adjusted.
4332 * darwin-nat.h: All implementations adjusted.
4333 * exec.c: All implementations adjusted.
4334 * fbsd-nat.c: All implementations adjusted.
4335 * fbsd-nat.h: All implementations adjusted.
4336 * gnu-nat.c: All implementations adjusted.
4337 * gnu-nat.h: All implementations adjusted.
4338 * go32-nat.c: All implementations adjusted.
4339 * ia64-linux-nat.c: All implementations adjusted.
4340 * inf-child.c: All implementations adjusted.
4341 * inf-child.h: All implementations adjusted.
4342 * inf-ptrace.c: All implementations adjusted.
4343 * inf-ptrace.h: All implementations adjusted.
4344 * linux-nat.c: All implementations adjusted.
4345 * linux-nat.h: All implementations adjusted.
4346 * mips-linux-nat.c: All implementations adjusted.
4347 * nto-procfs.c: All implementations adjusted.
4348 * ppc-linux-nat.c: All implementations adjusted.
4349 * procfs.c: All implementations adjusted.
4350 * ravenscar-thread.c: All implementations adjusted.
4351 * record-btrace.c: All implementations adjusted.
4352 * record-full.c: All implementations adjusted.
4353 * remote-sim.c: All implementations adjusted.
4354 * remote.c: All implementations adjusted.
4355 * s390-linux-nat.c: All implementations adjusted.
4356 * sol-thread.c: All implementations adjusted.
4357 * spu-multiarch.c: All implementations adjusted.
4358 * target-delegates.c: All implementations adjusted.
4359 * target.c: All implementations adjusted.
4360 * target.h: All implementations adjusted.
4361 * tracefile-tfile.c: All implementations adjusted.
4362 * tracefile.c: All implementations adjusted.
4363 * tracefile.h: All implementations adjusted.
4364 * windows-nat.c: All implementations adjusted.
4365 * x86-linux-nat.h: All implementations adjusted.
4366 * x86-nat.h: All implementations adjusted.
4368 2018-05-02 Pedro Alves <palves@redhat.com>
4370 * make-target-delegates (scan_target_h): Don't trim lines here.
4371 Replace sequences of tabs and/or whitespace with a single
4373 (top level, parsing methods): Trim each line before processing it
4376 2018-05-02 Pedro Alves <palves@redhat.com>
4377 John Baldwin <jhb@freebsd.org>
4379 * target.h (enum strata) <debug_stratum>: New.
4380 (struct target_ops) <all delegation methods>: Replace by C++
4381 virtual methods, and drop "to_" prefix. All references updated
4383 <to_shortname, to_longname, to_doc, to_data,
4384 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4385 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4386 virtual methods. All references updated throughout.
4387 <can_attach, supports_terminal_ours, can_create_inferior,
4388 get_thread_control_capabilities, attach_no_wait>: New
4390 <insert_breakpoint, remove_breakpoint>: Now
4391 TARGET_DEFAULT_NORETURN methods.
4392 <info_proc>: Now returns bool.
4394 (OPS_MAGIC): Delete.
4395 (current_target): Delete. All references replaced by references
4397 (target_stack): ... this. New.
4398 (target_shortname, target_longname): Adjust.
4399 (target_can_run): Now a function declaration.
4400 (default_child_has_all_memory, default_child_has_memory)
4401 (default_child_has_stack, default_child_has_registers)
4402 (default_child_has_execution): Remove target_ops parameter.
4403 (complete_target_initialization): Delete.
4404 (memory_breakpoint_target): New template class.
4405 (test_target_ops): Refactor as a C++ class with virtual methods.
4406 * make-target-delegates (NAME_PART): Tighten.
4407 (POINTER_PART, CP_SYMBOL): New.
4408 (SIMPLE_RETURN_PART): Reimplement.
4409 (VEC_RETURN_PART): Expect less.
4410 (RETURN_PART, VIRTUAL_PART): New.
4411 (METHOD): Adjust to C++ virtual methods.
4412 (scan_target_h): Remove reference to C99.
4413 (dname): Output "target_ops::" prefix.
4414 (write_function_header): Adjust to output a C++ class method.
4415 (write_declaration): New.
4416 (write_delegator): Adjust to output a C++ class method.
4417 (tdname): Output "dummy_target::" prefix.
4418 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4420 (tdefault_names, debug_names): Delete.
4421 (return_types, tdefaults, styles, argtypes_array): New.
4422 (top level): All methods are delegators.
4424 (top level): Print dummy_target and debug_target classes.
4425 * target-delegates.c: Regenerate.
4426 * target-debug.h (target_debug_print_enum_info_proc_what)
4427 (target_debug_print_thread_control_capabilities)
4428 (target_debug_print_thread_info_p): New.
4429 * target.c (dummy_target): Delete.
4430 (the_dummy_target, the_debug_target): New.
4431 (target_stack): Now extern.
4432 (set_targetdebug): Push/unpush debug target.
4433 (default_child_has_all_memory, default_child_has_memory)
4434 (default_child_has_stack, default_child_has_registers)
4435 (default_child_has_execution): Remove target_ops parameter.
4436 (complete_target_initialization): Delete.
4437 (add_target_with_completer): No longer call
4438 complete_target_initialization.
4439 (target_supports_terminal_ours): Use regular delegation.
4440 (update_current_target): Delete.
4441 (push_target): No longer check magic number. Don't call
4442 update_current_target.
4443 (unpush_target): Don't call update_current_target.
4444 (target_is_pushed): No longer check magic number.
4445 (target_require_runnable): Skip for all stratums over
4447 (target_ops::info_proc): New.
4448 (target_info_proc): Use find_target_at and
4449 find_default_run_target.
4450 (target_supports_disable_randomization): Use regular delegation.
4451 (target_get_osdata): Use find_target_at.
4452 (target_ops::open, target_ops::close, target_ops::can_attach)
4453 (target_ops::attach, target_ops::can_create_inferior)
4454 (target_ops::create_inferior, target_ops::can_run)
4455 (target_can_run): New.
4456 (default_fileio_target): Use regular delegation.
4457 (target_ops::fileio_open, target_ops::fileio_pwrite)
4458 (target_ops::fileio_pread, target_ops::fileio_fstat)
4459 (target_ops::fileio_close, target_ops::fileio_unlink)
4460 (target_ops::fileio_readlink): New.
4461 (target_fileio_open_1, target_fileio_unlink)
4462 (target_fileio_readlink): Always call the target method. Handle
4464 (return_zero, return_zero_has_execution): Delete.
4465 (init_dummy_target): Delete.
4466 (dummy_target::dummy_target, dummy_target::shortname)
4467 (dummy_target::longname, dummy_target::doc)
4468 (debug_target::debug_target, debug_target::shortname)
4469 (debug_target::longname, debug_target::doc): New.
4470 (target_supports_delete_record): Use regular delegation.
4471 (setup_target_debug): Delete.
4472 (maintenance_print_target_stack): Skip debug_stratum.
4473 (initialize_targets): Instantiate the_dummy_target and
4475 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4477 (target_auxv_search, fprint_target_auxv): Adjust.
4478 (info_auxv_command): Adjust to use target_stack.
4479 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4480 * exceptions.c (print_flush): Handle a NULL target_stack.
4481 * regcache.c (target_ops_no_register): Refactor as class with
4484 * exec.c (exec_target): New class.
4485 (exec_ops): Now an exec_target.
4486 (exec_open, exec_close_1, exec_get_section_table)
4487 (exec_xfer_partial, exec_files_info, exec_has_memory)
4488 (exec_make_note_section): Refactor as exec_target methods.
4489 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4491 (exec_target::find_memory_regions): New.
4492 (_initialize_exec): Don't call init_exec_ops.
4493 * gdbcore.h (exec_file_clear): Delete.
4495 * corefile.c (core_target): Delete.
4496 (core_file_command): Adjust.
4497 * corelow.c (core_target): New class.
4498 (the_core_target): New.
4499 (core_close): Remove target_ops parameter.
4500 (core_close_cleanup): Adjust.
4501 (core_target::close): New.
4502 (core_open, core_detach, get_core_registers, core_files_info)
4503 (core_xfer_partial, core_thread_alive, core_read_description)
4504 (core_pid_to_str, core_thread_name, core_has_memory)
4505 (core_has_stack, core_has_registers, core_info_proc): Rework as
4506 core_target methods.
4507 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4508 (_initialize_corelow): Initialize the_core_target.
4509 * gdbcore.h (core_target): Delete.
4510 (the_core_target): New.
4512 * ctf.c: (ctf_target): New class.
4513 (ctf_ops): Now a ctf_target.
4514 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4515 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4516 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4518 (init_ctf_ops): Delete.
4519 (_initialize_ctf): Don't call it.
4520 * tracefile-tfile.c (tfile_target): New class.
4521 (tfile_ops): Now a tfile_target.
4522 (tfile_open, tfile_close, tfile_files_info)
4523 (tfile_get_tracepoint_status, tfile_trace_find)
4524 (tfile_fetch_registers, tfile_xfer_partial)
4525 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4526 Refactor as tfile_target methods.
4527 (tfile_xfer_partial_features): Remove target_ops parameter.
4528 (init_tfile_ops): Delete.
4529 (_initialize_tracefile_tfile): Don't call it.
4530 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4531 (tracefile_has_stack, tracefile_has_registers)
4532 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4533 tracefile_target methods.
4534 (init_tracefile_ops): Delete.
4535 (tracefile_target::tracefile_target): New.
4536 * tracefile.h: Include "target.h".
4537 (tracefile_target): New class.
4538 (init_tracefile_ops): Delete.
4540 * spu-multiarch.c (spu_multiarch_target): New class.
4541 (spu_ops): Now a spu_multiarch_target.
4542 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4543 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4544 (spu_search_memory, spu_mourn_inferior): Refactor as
4545 spu_multiarch_target methods.
4546 (init_spu_ops): Delete.
4547 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4548 complete_target_initialization.
4550 * ravenscar-thread.c (ravenscar_thread_target): New class.
4551 (ravenscar_ops): Now a ravenscar_thread_target.
4552 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4553 (ravenscar_thread_alive, ravenscar_pid_to_str)
4554 (ravenscar_fetch_registers, ravenscar_store_registers)
4555 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4556 (ravenscar_stopped_by_hw_breakpoint)
4557 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4558 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4559 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4561 (init_ravenscar_thread_ops): Delete.
4562 (_initialize_ravenscar): Remove references to
4563 init_ravenscar_thread_ops and complete_target_initialization.
4565 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4566 (bsd_uthread_target): New class.
4567 (bsd_uthread_ops): Now a bsd_uthread_target.
4568 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4569 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4570 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4571 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4572 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4573 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4574 (bsd_uthread_target): Delete function.
4575 (_initialize_bsd_uthread): Remove reference to
4576 complete_target_initialization.
4578 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4579 (target_bfd): ... this new class.
4580 (target_bfd_xfer_partial, target_bfd_get_section_table)
4581 (target_bfd_close): Refactor as target_bfd methods.
4582 (target_bfd::~target_bfd): New.
4583 (target_bfd_reopen): Adjust.
4584 (target_bfd::close): New.
4586 * record-btrace.c (record_btrace_target): New class.
4587 (record_btrace_ops): Now a record_btrace_target.
4588 (record_btrace_open, record_btrace_stop_recording)
4589 (record_btrace_disconnect, record_btrace_close)
4590 (record_btrace_async, record_btrace_info)
4591 (record_btrace_insn_history, record_btrace_insn_history_range)
4592 (record_btrace_insn_history_from, record_btrace_call_history)
4593 (record_btrace_call_history_range)
4594 (record_btrace_call_history_from, record_btrace_record_method)
4595 (record_btrace_is_replaying, record_btrace_will_replay)
4596 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4597 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4598 (record_btrace_store_registers, record_btrace_prepare_to_store)
4599 (record_btrace_to_get_unwinder)
4600 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4601 (record_btrace_commit_resume, record_btrace_wait)
4602 (record_btrace_stop, record_btrace_can_execute_reverse)
4603 (record_btrace_stopped_by_sw_breakpoint)
4604 (record_btrace_supports_stopped_by_sw_breakpoint)
4605 (record_btrace_stopped_by_hw_breakpoint)
4606 (record_btrace_supports_stopped_by_hw_breakpoint)
4607 (record_btrace_update_thread_list, record_btrace_thread_alive)
4608 (record_btrace_goto_begin, record_btrace_goto_end)
4609 (record_btrace_goto, record_btrace_stop_replaying_all)
4610 (record_btrace_execution_direction)
4611 (record_btrace_prepare_to_generate_core)
4612 (record_btrace_done_generating_core): Refactor as
4613 record_btrace_target methods.
4614 (init_record_btrace_ops): Delete.
4615 (_initialize_record_btrace): Remove reference to
4616 init_record_btrace_ops.
4617 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4618 the execution_direction global.
4619 (record_full_base_target, record_full_target)
4620 (record_full_core_target): New classes.
4621 (record_full_ops): Now a record_full_target.
4622 (record_full_core_ops): Now a record_full_core_target.
4623 (record_full_target::detach, record_full_target::disconnect)
4624 (record_full_core_target::disconnect)
4625 (record_full_target::mourn_inferior, record_full_target::kill):
4627 (record_full_open, record_full_close, record_full_async): Refactor
4628 as methods of the record_full_base_target class.
4629 (record_full_resume, record_full_commit_resume): Refactor
4630 as methods of the record_full_target class.
4631 (record_full_wait, record_full_stopped_by_watchpoint)
4632 (record_full_stopped_data_address)
4633 (record_full_stopped_by_sw_breakpoint)
4634 (record_full_supports_stopped_by_sw_breakpoint)
4635 (record_full_stopped_by_hw_breakpoint)
4636 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4637 methods of the record_full_base_target class.
4638 (record_full_store_registers, record_full_xfer_partial)
4639 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4640 Refactor as methods of the record_full_target class.
4641 (record_full_can_execute_reverse, record_full_get_bookmark)
4642 (record_full_goto_bookmark, record_full_execution_direction)
4643 (record_full_record_method, record_full_info, record_full_delete)
4644 (record_full_is_replaying, record_full_will_replay)
4645 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4646 (record_full_stop_replaying): Refactor as methods of the
4647 record_full_base_target class.
4648 (record_full_core_resume, record_full_core_kill)
4649 (record_full_core_fetch_registers)
4650 (record_full_core_prepare_to_store)
4651 (record_full_core_store_registers, record_full_core_xfer_partial)
4652 (record_full_core_insert_breakpoint)
4653 (record_full_core_remove_breakpoint)
4654 (record_full_core_has_execution): Refactor
4655 as methods of the record_full_core_target class.
4656 (record_full_base_target::supports_delete_record): New.
4657 (init_record_full_ops): Delete.
4658 (init_record_full_core_ops): Delete.
4659 (record_full_save): Refactor as method of the
4660 record_full_base_target class.
4661 (_initialize_record_full): Remove references to
4662 init_record_full_ops and init_record_full_core_ops.
4664 * remote.c (remote_target, extended_remote_target): New classes.
4665 (remote_ops): Now a remote_target.
4666 (extended_remote_ops): Now an extended_remote_target.
4667 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4668 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4669 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4670 (remote_pass_signals, remote_set_syscall_catchpoint)
4671 (remote_program_signals, )
4672 (remote_thread_always_alive): Remove target_ops parameter.
4673 (remote_thread_alive, remote_thread_name)
4674 (remote_update_thread_list, remote_threads_extra_info)
4675 (remote_static_tracepoint_marker_at)
4676 (remote_static_tracepoint_markers_by_strid)
4677 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4678 (remote_open): Refactor as methods of remote_target.
4679 (extended_remote_open, extended_remote_detach)
4680 (extended_remote_attach, extended_remote_post_attach):
4681 (extended_remote_supports_disable_randomization)
4682 (extended_remote_create_inferior): : Refactor as method of
4683 extended_remote_target.
4684 (remote_set_permissions, remote_open_1, remote_detach)
4685 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4686 (remote_resume, remote_commit_resume, remote_stop)
4687 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4688 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4689 (remote_prepare_to_store, remote_store_registers)
4690 (remote_flash_erase, remote_flash_done, remote_files_info)
4691 (remote_kill, remote_mourn, remote_insert_breakpoint)
4692 (remote_remove_breakpoint, remote_insert_watchpoint)
4693 (remote_watchpoint_addr_within_range)
4694 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4695 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4696 (remote_supports_stopped_by_sw_breakpoint)
4697 (remote_stopped_by_hw_breakpoint)
4698 (remote_supports_stopped_by_hw_breakpoint)
4699 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4700 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4701 (remote_verify_memory): Refactor as methods of remote_target.
4702 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4704 (remote_xfer_partial, remote_get_memory_xfer_limit)
4705 (remote_search_memory, remote_rcmd, remote_memory_map)
4706 (remote_pid_to_str, remote_get_thread_local_address)
4707 (remote_get_tib_address, remote_read_description): Refactor as
4708 methods of remote_target.
4709 (remote_target::fileio_open, remote_target::fileio_pwrite)
4710 (remote_target::fileio_pread, remote_target::fileio_close): New.
4711 (remote_hostio_readlink, remote_hostio_fstat)
4712 (remote_filesystem_is_local, remote_can_execute_reverse)
4713 (remote_supports_non_stop, remote_supports_disable_randomization)
4714 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4715 (remote_supports_enable_disable_tracepoint)
4716 (remote_supports_string_tracing)
4717 (remote_can_run_breakpoint_commands, remote_trace_init)
4718 (remote_download_tracepoint, remote_can_download_tracepoint)
4719 (remote_download_trace_state_variable, remote_enable_tracepoint)
4720 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4721 (remote_trace_start, remote_get_trace_status)
4722 (remote_get_tracepoint_status, remote_trace_stop)
4723 (remote_trace_find, remote_get_trace_state_variable_value)
4724 (remote_save_trace_data, remote_get_raw_trace_data)
4725 (remote_set_disconnected_tracing, remote_core_of_thread)
4726 (remote_set_circular_trace_buffer, remote_traceframe_info)
4727 (remote_get_min_fast_tracepoint_insn_len)
4728 (remote_set_trace_buffer_size, remote_set_trace_notes)
4729 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4730 (remote_disable_btrace, remote_teardown_btrace)
4731 (remote_read_btrace, remote_btrace_conf)
4732 (remote_augmented_libraries_svr4_read, remote_load)
4733 (remote_pid_to_exec_file, remote_can_do_single_step)
4734 (remote_execution_direction, remote_thread_handle_to_thread_info):
4735 Refactor as methods of remote_target.
4736 (init_remote_ops, init_extended_remote_ops): Delete.
4737 (remote_can_async_p, remote_is_async_p, remote_async)
4738 (remote_thread_events, remote_upload_tracepoints)
4739 (remote_upload_trace_state_variables): Refactor as methods of
4741 (_initialize_remote): Remove references to init_remote_ops and
4742 init_extended_remote_ops.
4744 * remote-sim.c (gdbsim_target): New class.
4745 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4746 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4747 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4748 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4749 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4750 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4751 Refactor as methods of gdbsim_target.
4752 (gdbsim_ops): Now a gdbsim_target.
4753 (init_gdbsim_ops): Delete.
4754 (gdbsim_cntrl_c): Adjust.
4755 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4757 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4758 (the_amd64_linux_nat_target): New.
4759 (amd64_linux_fetch_inferior_registers)
4760 (amd64_linux_store_inferior_registers): Refactor as methods of
4761 amd64_linux_nat_target.
4762 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4763 * i386-linux-nat.c: Don't include "linux-nat.h".
4764 (i386_linux_nat_target): New class.
4765 (the_i386_linux_nat_target): New.
4766 (i386_linux_fetch_inferior_registers)
4767 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4768 as methods of i386_linux_nat_target.
4769 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4770 * inf-child.c (inf_child_ops): Delete.
4771 (inf_child_fetch_inferior_registers)
4772 (inf_child_store_inferior_registers): Delete.
4773 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4774 methods of inf_child_target.
4775 (inf_child_target::supports_terminal_ours)
4776 (inf_child_target::terminal_init)
4777 (inf_child_target::terminal_inferior)
4778 (inf_child_target::terminal_ours_for_output)
4779 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4780 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4782 (inf_child_open, inf_child_disconnect, inf_child_close)
4783 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4784 (inf_child_post_startup_inferior, inf_child_can_run)
4785 (inf_child_pid_to_exec_file): Refactor as methods of
4787 (inf_child_follow_fork): Delete.
4788 (inf_child_target::can_create_inferior)
4789 (inf_child_target::can_attach): New.
4790 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4791 (inf_child_target::has_stack, inf_child_target::has_registers)
4792 (inf_child_target::has_execution): New.
4793 (inf_child_fileio_open, inf_child_fileio_pwrite)
4794 (inf_child_fileio_pread, inf_child_fileio_fstat)
4795 (inf_child_fileio_close, inf_child_fileio_unlink)
4796 (inf_child_fileio_readlink, inf_child_use_agent)
4797 (inf_child_can_use_agent): Refactor as methods of
4799 (return_zero, inf_child_target): Delete.
4800 (inf_child_target::inf_child_target): New.
4801 * inf-child.h: Include "target.h".
4802 (inf_child_target): Delete function prototype.
4803 (inf_child_target): New class.
4804 (inf_child_open_target, inf_child_mourn_inferior)
4805 (inf_child_maybe_unpush_target): Delete.
4806 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4807 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4808 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4809 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4810 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4811 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4812 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4813 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4814 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4815 methods of inf_ptrace_target.
4816 (inf_ptrace_target): Delete function.
4817 * inf-ptrace.h: Include "inf-child.h".
4818 (inf_ptrace_target): Delete function declaration.
4819 (inf_ptrace_target): New class.
4820 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4821 * linux-nat.c (linux_target): New.
4822 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4823 (linux_nat_target::~linux_nat_target): New.
4824 (linux_child_post_attach, linux_child_post_startup_inferior)
4825 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4826 (linux_child_remove_fork_catchpoint)
4827 (linux_child_insert_vfork_catchpoint)
4828 (linux_child_remove_vfork_catchpoint)
4829 (linux_child_insert_exec_catchpoint)
4830 (linux_child_remove_exec_catchpoint)
4831 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4832 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4833 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4834 (linux_nat_stopped_data_address)
4835 (linux_nat_stopped_by_sw_breakpoint)
4836 (linux_nat_supports_stopped_by_sw_breakpoint)
4837 (linux_nat_stopped_by_hw_breakpoint)
4838 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4839 (linux_nat_kill, linux_nat_mourn_inferior)
4840 (linux_nat_xfer_partial, linux_nat_thread_alive)
4841 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4842 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4843 (linux_child_static_tracepoint_markers_by_strid)
4844 (linux_nat_is_async_p, linux_nat_can_async_p)
4845 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4846 (linux_nat_supports_multi_process)
4847 (linux_nat_supports_disable_randomization, linux_nat_async)
4848 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4849 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4850 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4851 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4852 methods of linux_nat_target.
4853 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4854 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4856 (check_stopped_by_watchpoint): Adjust.
4857 (linux_xfer_partial): Delete.
4858 (linux_target_install_ops, linux_target, linux_nat_add_target):
4860 (linux_nat_target::linux_nat_target): New.
4861 * linux-nat.h: Include "inf-ptrace.h".
4862 (linux_nat_target): New.
4863 (linux_target, linux_target_install_ops, linux_nat_add_target):
4864 Delete function declarations.
4865 (linux_target): Declare global.
4866 * linux-thread-db.c (thread_db_target): New.
4867 (thread_db_target::thread_db_target): New.
4868 (thread_db_ops): Delete.
4869 (the_thread_db_target): New.
4870 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4871 (thread_db_update_thread_list, thread_db_pid_to_str)
4872 (thread_db_extra_thread_info)
4873 (thread_db_thread_handle_to_thread_info)
4874 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4875 (thread_db_resume): Refactor as methods of thread_db_target.
4876 (init_thread_db_ops): Delete.
4877 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4878 * x86-linux-nat.c: Don't include "linux-nat.h".
4879 (super_post_startup_inferior): Delete.
4880 (x86_linux_nat_target::~x86_linux_nat_target): New.
4881 (x86_linux_child_post_startup_inferior)
4882 (x86_linux_read_description, x86_linux_enable_btrace)
4883 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4884 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4885 methods of x86_linux_nat_target.
4886 (x86_linux_create_target): Delete. Bits folded ...
4887 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4889 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4890 (x86_linux_nat_target): New class.
4891 (x86_linux_create_target): Delete.
4892 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4893 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4894 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4895 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4896 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4897 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4899 (x86_use_watchpoints): Delete.
4900 * x86-nat.h: Include "breakpoint.h" and "target.h".
4901 (x86_use_watchpoints): Delete.
4902 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4903 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4904 (x86_insert_watchpoint, x86_remove_watchpoint)
4905 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4906 (x86_stopped_by_hw_breakpoint): New declarations.
4907 (x86_nat_target): New template class.
4909 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4910 (the_ppc_linux_nat_target): New.
4911 (ppc_linux_fetch_inferior_registers)
4912 (ppc_linux_can_use_hw_breakpoint)
4913 (ppc_linux_region_ok_for_hw_watchpoint)
4914 (ppc_linux_ranged_break_num_registers)
4915 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4916 (ppc_linux_insert_mask_watchpoint)
4917 (ppc_linux_remove_mask_watchpoint)
4918 (ppc_linux_can_accel_watchpoint_condition)
4919 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4920 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4921 (ppc_linux_watchpoint_addr_within_range)
4922 (ppc_linux_masked_watch_num_registers)
4923 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4924 (ppc_linux_read_description): Refactor as methods of
4925 ppc_linux_nat_target.
4926 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4928 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4929 (procfs_target): New class.
4930 (the_procfs_target): New.
4931 (procfs_target): Delete function.
4932 (procfs_auxv_parse, procfs_attach, procfs_detach)
4933 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4934 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4935 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4936 (procfs_create_inferior, procfs_update_thread_list)
4937 (procfs_thread_alive, procfs_pid_to_str)
4938 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4939 (procfs_stopped_data_address, procfs_insert_watchpoint)
4940 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4941 (proc_find_memory_regions, procfs_info_proc)
4942 (procfs_make_note_section): Refactor as methods of procfs_target.
4943 (_initialize_procfs): Adjust.
4944 * sol-thread.c (sol_thread_target): New class.
4945 (sol_thread_ops): Now a sol_thread_target.
4946 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4947 (sol_thread_fetch_registers, sol_thread_store_registers)
4948 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4949 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4950 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4951 (init_sol_thread_ops): Delete.
4952 (_initialize_sol_thread): Adjust. Remove references to
4953 init_sol_thread_ops and complete_target_initialization.
4955 * windows-nat.c (windows_nat_target): New class.
4956 (windows_fetch_inferior_registers)
4957 (windows_store_inferior_registers, windows_resume, windows_wait)
4958 (windows_attach, windows_detach, windows_pid_to_exec_file)
4959 (windows_files_info, windows_create_inferior)
4960 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4961 (windows_close, windows_pid_to_str, windows_xfer_partial)
4962 (windows_get_tib_address, windows_get_ada_task_ptid)
4963 (windows_thread_name, windows_thread_alive): Refactor as
4964 windows_nat_target methods.
4965 (do_initial_windows_stuff): Adjust.
4966 (windows_target): Delete function.
4967 (_initialize_windows_nat): Adjust.
4969 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4970 (darwin_mourn_inferior, darwin_kill_inferior)
4971 (darwin_create_inferior, darwin_attach, darwin_detach)
4972 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4973 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4974 (darwin_supports_multi_process): Refactor as darwin_nat_target
4976 (darwin_resume_to, darwin_files_info): Delete.
4977 (_initialize_darwin_inferior): Rename to ...
4978 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4979 * darwin-nat.h: Include "inf-child.h".
4980 (darwin_nat_target): New class.
4981 (darwin_complete_target): Delete.
4982 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4983 (darwin_target): New.
4984 (i386_darwin_fetch_inferior_registers)
4985 (i386_darwin_store_inferior_registers): Refactor as methods of
4987 (darwin_complete_target): Delete, with ...
4988 (_initialize_i386_darwin_nat): ... bits factored out here.
4990 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4991 (the_alpha_linux_nat_target): New.
4992 (alpha_linux_register_u_offset): Refactor as
4993 alpha_linux_nat_target method.
4994 (_initialize_alpha_linux_nat): Adjust.
4995 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4996 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4997 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4998 methods of linux_nat_trad_target.
4999 (linux_trad_target): Delete.
5000 * linux-nat-trad.h (linux_trad_target): Delete function.
5001 (linux_nat_trad_target): New class.
5002 * mips-linux-nat.c (mips_linux_nat_target): New class.
5003 (super_fetch_registers, super_store_registers, super_close):
5005 (the_mips_linux_nat_target): New.
5006 (mips64_linux_regsets_fetch_registers)
5007 (mips64_linux_regsets_store_registers)
5008 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5009 (mips_linux_register_u_offset, mips_linux_read_description)
5010 (mips_linux_can_use_hw_breakpoint)
5011 (mips_linux_stopped_by_watchpoint)
5012 (mips_linux_stopped_data_address)
5013 (mips_linux_region_ok_for_hw_watchpoint)
5014 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5015 (mips_linux_close): Refactor as methods of mips_linux_nat.
5016 (_initialize_mips_linux_nat): Adjust to C++ification.
5018 * aix-thread.c (aix_thread_target): New class.
5019 (aix_thread_ops): Now an aix_thread_target.
5020 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5021 (aix_thread_fetch_registers, aix_thread_store_registers)
5022 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5023 (aix_thread_thread_alive, aix_thread_pid_to_str)
5024 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5025 Refactor as methods of aix_thread_target.
5026 (init_aix_thread_ops): Delete.
5027 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5028 and complete_target_initialization.
5029 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5030 (rs6000_nat_target): New class.
5031 (the_rs6000_nat_target): New.
5032 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5033 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5034 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5035 (super_create_inferior): Delete.
5036 (_initialize_rs6000_nat): Adjust to C++ification.
5038 * arm-linux-nat.c (arm_linux_nat_target): New class.
5039 (the_arm_linux_nat_target): New.
5040 (arm_linux_fetch_inferior_registers)
5041 (arm_linux_store_inferior_registers, arm_linux_read_description)
5042 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5043 (arm_linux_remove_hw_breakpoint)
5044 (arm_linux_region_ok_for_hw_watchpoint)
5045 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5046 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5047 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5048 arm_linux_nat_target.
5049 (_initialize_arm_linux_nat): Adjust to C++ification.
5051 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5052 (the_aarch64_linux_nat_target): New.
5053 (aarch64_linux_fetch_inferior_registers)
5054 (aarch64_linux_store_inferior_registers)
5055 (aarch64_linux_child_post_startup_inferior)
5056 (aarch64_linux_read_description)
5057 (aarch64_linux_can_use_hw_breakpoint)
5058 (aarch64_linux_insert_hw_breakpoint)
5059 (aarch64_linux_remove_hw_breakpoint)
5060 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5061 (aarch64_linux_region_ok_for_hw_watchpoint)
5062 (aarch64_linux_stopped_data_address)
5063 (aarch64_linux_stopped_by_watchpoint)
5064 (aarch64_linux_watchpoint_addr_within_range)
5065 (aarch64_linux_can_do_single_step): Refactor as methods of
5066 aarch64_linux_nat_target.
5067 (super_post_startup_inferior): Delete.
5068 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5070 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5071 (the_hppa_linux_nat_target): New.
5072 (hppa_linux_fetch_inferior_registers)
5073 (hppa_linux_store_inferior_registers): Refactor as methods of
5074 hppa_linux_nat_target.
5075 (_initialize_hppa_linux_nat): Adjust to C++ification.
5077 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5078 (the_ia64_linux_nat_target): New.
5079 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5080 (ia64_linux_stopped_data_address)
5081 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5082 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5083 ia64_linux_nat_target methods.
5084 (super_xfer_partial): Delete.
5085 (_initialize_ia64_linux_nat): Adjust to C++ification.
5087 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5088 (the_m32r_linux_nat_target): New.
5089 (m32r_linux_fetch_inferior_registers)
5090 (m32r_linux_store_inferior_registers): Refactor as
5091 m32r_linux_nat_target methods.
5092 (_initialize_m32r_linux_nat): Adjust to C++ification.
5094 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5095 (the_m68k_linux_nat_target): New.
5096 (m68k_linux_fetch_inferior_registers)
5097 (m68k_linux_store_inferior_registers): Refactor as
5098 m68k_linux_nat_target methods.
5099 (_initialize_m68k_linux_nat): Adjust to C++ification.
5101 * s390-linux-nat.c (s390_linux_nat_target): New class.
5102 (the_s390_linux_nat_target): New.
5103 (s390_linux_fetch_inferior_registers)
5104 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5105 (s390_insert_watchpoint, s390_remove_watchpoint)
5106 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5107 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5108 (s390_auxv_parse, s390_read_description): Refactor as methods of
5109 s390_linux_nat_target.
5110 (_initialize_s390_nat): Adjust to C++ification.
5112 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5113 (the_sparc_linux_nat_target): New.
5114 (_initialize_sparc_linux_nat): Adjust to C++ification.
5115 * sparc-nat.c (sparc_fetch_inferior_registers)
5116 (sparc_store_inferior_registers): Remove target_ops parameter.
5117 * sparc-nat.h (sparc_fetch_inferior_registers)
5118 (sparc_store_inferior_registers): Remove target_ops parameter.
5119 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5120 (the_sparc64_linux_nat_target): New.
5121 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5123 * spu-linux-nat.c (spu_linux_nat_target): New class.
5124 (the_spu_linux_nat_target): New.
5125 (spu_child_post_startup_inferior, spu_child_post_attach)
5126 (spu_child_wait, spu_fetch_inferior_registers)
5127 (spu_store_inferior_registers, spu_xfer_partial)
5128 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5130 (_initialize_spu_nat): Adjust to C++ification.
5132 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5133 (the_tilegx_linux_nat_target): New.
5134 (fetch_inferior_registers, store_inferior_registers):
5135 Refactor as methods.
5136 (_initialize_tile_linux_nat): Adjust to C++ification.
5138 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5139 (the_xtensa_linux_nat_target): New.
5140 (xtensa_linux_fetch_inferior_registers)
5141 (xtensa_linux_store_inferior_registers): Refactor as
5142 xtensa_linux_nat_target methods.
5143 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5145 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5146 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5147 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5148 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5149 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5150 (fbsd_stopped_by_sw_breakpoint)
5151 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5152 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5153 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5154 (fbsd_post_startup_inferior, fbsd_post_attach)
5155 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5156 (fbsd_set_syscall_catchpoint)
5157 (super_xfer_partial, super_resume, super_wait)
5158 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5159 (fbsd_handle_debug_trap): Remove target_ops parameter.
5160 (fbsd_nat_add_target): Delete.
5161 * fbsd-nat.h: Include "inf-ptrace.h".
5162 (fbsd_nat_add_target): Delete.
5163 (USE_SIGTRAP_SIGINFO): Define.
5164 (fbsd_nat_target): New class.
5166 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5167 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5168 (amd64bsd_target): Delete.
5169 * amd64-bsd-nat.h: New file.
5170 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5172 (amd64_fbsd_nat_target): New class.
5173 (the_amd64_fbsd_nat_target): New.
5174 (amd64fbsd_read_description): Refactor as method of
5175 amd64_fbsd_nat_target.
5176 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5177 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5178 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5179 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5180 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5181 (i386bsd_target): Delete.
5182 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5183 (i386bsd_fetch_inferior_registers)
5184 (i386bsd_store_inferior_registers): Declare.
5185 (i386_bsd_nat_target): New class.
5186 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5187 (the_i386_fbsd_nat_target): New.
5188 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5189 i386_fbsd_nat_target methods.
5190 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5191 (_initialize_i386fbsd_nat): Adjust to C++ification.
5192 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5193 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5194 (_initialize_x86_bsd_nat): Adjust to C++ification.
5195 * x86-bsd-nat.h: Include "x86-nat.h".
5196 (x86bsd_target): Delete declaration.
5197 (x86bsd_nat_target): New class.
5199 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5200 (the_aarch64_fbsd_nat_target): New.
5201 (aarch64_fbsd_fetch_inferior_registers)
5202 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5203 aarch64_fbsd_nat_target.
5204 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5205 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5206 (the_alpha_bsd_nat_target): New.
5207 (alphabsd_fetch_inferior_registers)
5208 (alphabsd_store_inferior_registers): Refactor as
5209 alpha_bsd_nat_target methods.
5210 (_initialize_alphabsd_nat): Refactor as methods of
5211 alpha_bsd_nat_target.
5212 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5213 (the_amd64_nbsd_nat_target): New.
5214 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5215 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5216 (the_amd64_obsd_nat_target): New.
5217 (_initialize_amd64obsd_nat): Adjust to C++ification.
5218 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5219 (the_arm_fbsd_nat_target): New.
5220 (arm_fbsd_fetch_inferior_registers)
5221 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5222 (_initialize_arm_fbsd_nat): Refactor as methods of
5223 arm_fbsd_nat_target.
5224 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5225 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5226 (the_arm_netbsd_nat_target): New.
5227 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5228 arm_netbsd_nat_target.
5229 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5230 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5231 (the_hppa_nbsd_nat_target): New.
5232 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5233 hppa_nbsd_nat_target methods.
5234 (_initialize_hppanbsd_nat): Adjust to C++ification.
5235 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5236 (the_hppa_obsd_nat_target): New.
5237 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5238 methods of hppa_obsd_nat_target.
5239 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5241 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5242 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5244 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5245 (_initialize_i386obsd_nat): Use add_target.
5246 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5247 (the_m68k_bsd_nat_target): New.
5248 (m68kbsd_fetch_inferior_registers)
5249 (m68kbsd_store_inferior_registers): Refactor as methods of
5250 m68k_bsd_nat_target.
5251 (_initialize_m68kbsd_nat): Adjust to C++ification.
5252 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5253 (the_mips_fbsd_nat_target): New.
5254 (mips_fbsd_fetch_inferior_registers)
5255 (mips_fbsd_store_inferior_registers): Refactor as methods of
5256 mips_fbsd_nat_target.
5257 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5259 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5260 (the_mips_nbsd_nat_target): New.
5261 (mipsnbsd_fetch_inferior_registers)
5262 (mipsnbsd_store_inferior_registers): Refactor as methods of
5263 mips_nbsd_nat_target.
5264 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5265 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5266 (the_mips64_obsd_nat_target): New.
5267 (mips64obsd_fetch_inferior_registers)
5268 (mips64obsd_store_inferior_registers): Refactor as methods of
5269 mips64_obsd_nat_target.
5270 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5272 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5274 * nbsd-nat.h: Include "inf-ptrace.h".
5275 (nbsd_nat_target): New class.
5276 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5277 (obsd_wait): Refactor as methods of obsd_nat_target.
5278 (obsd_add_target): Delete.
5279 * obsd-nat.h: Include "inf-ptrace.h".
5280 (obsd_nat_target): New class.
5281 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5282 (the_ppc_fbsd_nat_target): New.
5283 (ppcfbsd_fetch_inferior_registers)
5284 (ppcfbsd_store_inferior_registers): Refactor as methods of
5285 ppc_fbsd_nat_target.
5286 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5288 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5289 (the_ppc_nbsd_nat_target): New.
5290 (ppcnbsd_fetch_inferior_registers)
5291 (ppcnbsd_store_inferior_registers): Refactor as methods of
5292 ppc_nbsd_nat_target.
5293 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5294 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5295 (the_ppc_obsd_nat_target): New.
5296 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5297 methods of ppc_obsd_nat_target.
5298 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5300 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5301 (the_sh_nbsd_nat_target): New.
5302 (shnbsd_fetch_inferior_registers)
5303 (shnbsd_store_inferior_registers): Refactor as methods of
5305 (_initialize_shnbsd_nat): Adjust to C++ification.
5306 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5307 (inf_ptrace_xfer_partial): Delete.
5308 (sparc_xfer_partial, sparc_target): Delete.
5309 * sparc-nat.h (sparc_fetch_inferior_registers)
5310 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5311 (sparc_target): Delete function declaration.
5312 (sparc_target): New template class.
5313 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5314 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5315 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5316 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5318 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5319 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5320 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5321 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5323 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5324 (the_vax_bsd_nat_target): New.
5325 (vaxbsd_fetch_inferior_registers)
5326 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5328 (_initialize_vaxbsd_nat): Adjust to C++ification.
5330 * bsd-kvm.c (bsd_kvm_target): New class.
5331 (bsd_kvm_ops): Now a bsd_kvm_target.
5332 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5333 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5334 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5336 (bsd_kvm_return_one): Delete.
5337 (bsd_kvm_add_target): Adjust to C++ification.
5339 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5340 (nto_procfs_target_procfs): New classes.
5341 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5342 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5343 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5344 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5345 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5346 (procfs_remove_hw_breakpoint, procfs_resume)
5347 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5348 (procfs_kill_inferior, procfs_store_registers)
5349 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5350 as methods of nto_procfs_target.
5351 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5352 (nto_native_ops): Delete.
5353 (procfs_open, procfs_native_open): Delete.
5354 (nto_native_ops): Now an nto_procfs_target_native.
5355 (init_procfs_targets): Adjust to C++ification.
5356 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5357 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5358 Refactor as methods of nto_procfs_target.
5360 * go32-nat.c (go32_nat_target): New class.
5361 (the_go32_nat_target): New.
5362 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5363 (go32_store_registers, go32_xfer_partial, go32_files_info)
5364 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5365 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5366 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5367 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5368 (go32_target): Delete.
5369 (_initialize_go32_nat): Adjust to C++ification.
5371 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5372 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5373 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5374 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5376 (gnu_target): Delete.
5377 * gnu-nat.h (gnu_target): Delete.
5378 (gnu_nat_target): New class.
5379 * i386-gnu-nat.c (gnu_base_target): New.
5380 (i386_gnu_nat_target): New class.
5381 (the_i386_gnu_nat_target): New.
5382 (_initialize_i386gnu_nat): Adjust to C++ification.
5384 2018-05-02 Pedro Alves <palves@redhat.com>
5386 * bfd-target.c (target_bfd_xclose): Rename to ...
5387 (target_bfd_close): ... this.
5388 (target_bfd_reopen): Adjust.
5389 * target.c (target_close): Remove references to to_xclose.
5390 * target.h (target_ops::to_xclose): Delete.
5391 (target_ops::to_close): Update comments.
5393 2018-05-02 Pedro Alves <palves@redhat.com>
5395 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5397 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5398 * inf-ptrace.c (inf_ptrace_register_u_offset)
5399 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5400 (inf_ptrace_store_register, inf_ptrace_store_registers)
5401 (inf_ptrace_trad_target): Move to ...
5402 * linux-nat-trad.c: ... this new file.
5403 * linux-nat-trad.h: New file.
5404 * linux-nat.c (linux_target_install_ops): Make extern.
5405 (linux_trad_target): Delete.
5406 * linux-nat.h (linux_trad_target): Delete declaration.
5407 (linux_target_install_ops): Declare.
5408 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5411 2018-05-02 Pedro Alves <palves@redhat.com>
5413 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5414 procfs_target/add_target here.
5415 * procfs.c (procfs_target): Make static.
5416 (_initialize_procfs): Call add_target here.
5417 * procfs.h (struct target_ops): Remove forward declaration.
5418 (procfs_target): Remove declaration.
5419 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5421 2018-05-02 Pedro Alves <palves@redhat.com>
5423 * procfs.c (procfs_stopped_by_watchpoint)
5424 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5425 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5427 (procfs_use_watchpoints): Delete, move contents...
5428 (procfs_target): ... here.
5429 * procfs.h (procfs_use_watchpoints): Delete declaration.
5430 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5431 procfs_use_watchpoints.
5432 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5433 procfs_use_watchpoints.
5435 2018-05-02 Tom Tromey <tom@tromey.com>
5438 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5439 and var_zuinteger_unlimited.
5440 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5441 and PARAM_ZUINTEGER_UNLIMITED.
5442 (set_parameter_value): Handle var_zuinteger and
5443 var_zuinteger_unlimited.
5444 (add_setshow_generic): Likewise.
5445 (parmpy_init): Likewise.
5447 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5450 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5451 pointer is not null before dereferencing it.
5453 2018-04-30 Tom Tromey <tom@tromey.com>
5455 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5458 2018-04-30 Tom Tromey <tom@tromey.com>
5460 * breakpoint.c (mention): Remove use of is_mi_like_p.
5461 (print_mention_ranged_breakpoint): Likewise.
5462 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5465 2018-04-30 Tom Tromey <tom@tromey.com>
5467 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5469 2018-04-30 Tom Tromey <tom@tromey.com>
5471 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5472 (info_spu_event_command): Remove some uses of is_mi_like_p.
5474 2018-04-30 Tom Tromey <tom@tromey.com>
5476 * python/py-framefilter.c (py_print_single_arg)
5477 (enumerate_locals, py_print_args, py_print_frame): Remove some
5478 uses of is_mi_like_p.
5480 2018-04-30 Tom Tromey <tom@tromey.com>
5483 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5484 * ui-out.h (ui_out::is_mi_like_p): Now const.
5485 (ui_out::do_is_mi_like_p): Now const.
5486 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5488 2018-04-30 Tom Tromey <tom@tromey.com>
5490 * varobj.c (varobj_set_visualizer): Use new_reference.
5491 * python/python.c (gdbpy_decode_line): Use new_reference.
5492 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5495 2018-04-30 Tom Tromey <tom@tromey.com>
5497 * varobj.c (install_new_value): Use new_reference.
5498 * value.h (value_incref): Return void. Swap intro comment with
5500 * value.c (set_value_parent): Use new_reference.
5501 (value_incref): Return void. Update intro comment.
5502 (release_value): Use new_reference.
5503 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5505 2018-04-30 Tom Tromey <tom@tromey.com>
5507 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5508 * gdb_bfd.h (new_bfd_ref): Remove.
5509 (gdb_bfd_open): Update comment.
5510 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5511 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5512 (gdb_bfd_fdopenr): Use new_reference.
5513 * exec.c (exec_file_attach): Use new_reference.
5515 2018-04-30 Tom Tromey <tom@tromey.com>
5517 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5520 2018-04-30 Tom Tromey <tom@tromey.com>
5522 * jit.c (jit_read_code_entry): Use type_align.
5523 * i386-tdep.c (i386_gdbarch_init): Don't call
5524 set_gdbarch_long_long_align_bit.
5525 * gdbarch.sh: Remove long_long_align_bit.
5526 * gdbarch.c, gdbarch.h: Rebuild.
5527 * arc-tdep.c (arc_type_align): New function.
5528 (arc_gdbarch_init): Use arc_type_align. Don't call
5529 set_gdbarch_long_long_align_bit.
5531 2018-04-30 Tom Tromey <tom@tromey.com>
5533 * rust-lang.c (rust_type_alignment): Remove.
5534 (rust_composite_type): Use type_align.
5536 2018-04-30 Tom Tromey <tom@tromey.com>
5538 * NEWS: Mention Type.align.
5539 * python/py-type.c (typy_get_alignof): New function.
5540 (type_object_getset): Add "alignof".
5542 2018-04-30 Tom Tromey <tom@tromey.com>
5546 * std-operator.def (UNOP_ALIGNOF): New operator.
5547 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5549 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5550 * c-lang.c (c_op_print_tab): Add alignof.
5551 * c-exp.y (ALIGNOF): New token.
5552 (exp): Add "ALIGNOF" production.
5553 (ident_tokens): Add _Alignof and alignof.
5555 2018-04-30 Tom Tromey <tom@tromey.com>
5557 * i386-tdep.c (i386_type_align): New function.
5558 (i386_gdbarch_init): Update.
5559 * gdbarch.sh (type_align): New method.
5560 * gdbarch.c, gdbarch.h: Rebuild.
5561 * arch-utils.h (default_type_align): Declare.
5562 * arch-utils.c (default_type_align): New function.
5563 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5564 (struct type) <align_log2>: New field.
5565 <instance_flags>: Now a bitfield.
5566 (TYPE_RAW_ALIGN): New macro.
5567 (type_align, type_raw_align, set_type_align): Declare.
5568 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5570 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5571 (get_alignment, maybe_set_alignment): New functions.
5572 (read_structure_type, read_enumeration_type, read_array_type)
5573 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5574 (read_subrange_type, read_base_type): Set type alignment.
5576 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5578 * dwarf2read.c (read_index_from_section): Use bool.
5580 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5583 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5586 2018-04-29 John Reiser <jreiser@BitWagon.com>
5589 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5590 last step, and do it atomically.
5592 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5594 * compile/compile-c-types.c (convert_int, convert_float):
5597 2018-04-27 Tom Tromey <tom@tromey.com>
5600 * rust-lang.c (rust_inclusive_range_type_p): New function.
5601 (rust_range): Handle inclusive ranges.
5602 (rust_compute_range): Likewise.
5603 * rust-exp.y (struct rust_op) <inclusive>: New field.
5604 (DOTDOTEQ): New constant.
5605 (range_expr): Add "..=" productions.
5606 (operator_tokens): Add "..=" token.
5607 (ast_range): Add "inclusive" parameter.
5608 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5610 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5612 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5613 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5615 * expprint.c (print_subexp_standard): Handle new bounds values.
5616 (dump_subexp_body_standard): Likewise.
5618 2018-04-27 Tom Tromey <tom@tromey.com>
5620 * configure: Rebuild.
5621 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5622 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5624 (class symbol_needs_eval_context): Likewise.
5625 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5626 (mock_mapped_index::symbol_name_at): Use "override". Remove
5628 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5630 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5631 * aarch64-tdep.c (instruction_reader::read): Use "override".
5632 (instruction_reader_test::read): Likewise.
5633 * arm-tdep.c (instruction_reader::read): Use "override".
5634 (instruction_reader_thumb::read): Likewise.
5636 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5639 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5640 instead of remote_send.
5641 (remote_send): Remove.
5643 2018-04-26 Pedro Alves <palves@redhat.com>
5645 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5646 find_function_start_sal instead of find_pc_line.
5648 2018-04-26 Pedro Alves <palves@redhat.com>
5650 * breakpoint.c (set_breakpoint_location_function): Handle
5652 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5653 * elfread.c (elf_symtab_read): Give data symbols with
5654 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5655 (elf_rel_plt_read): Update comment.
5656 * linespec.c (convert_linespec_to_sals): Handle
5658 (minsym_found): Handle mst_data_gnu_ifunc.
5659 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5660 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5661 * parse.c (find_minsym_type_and_address): Handle
5663 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5664 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5665 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5667 <mst_data_gnu_ifunc>: New enumerator.
5669 2018-04-26 Pedro Alves <palves@redhat.com>
5671 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5672 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5673 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5675 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5676 (lookup_minimal_symbol_by_pc): Adjust.
5677 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5678 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5679 * minsyms.h (lookup_msym_prefer): New enum.
5680 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5681 parameter by a lookup_msym_prefer parameter.
5683 2018-04-26 Pedro Alves <palves@redhat.com>
5685 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5686 ends in "@plt" instead of looking at the symbol's section.
5688 2018-04-26 Pedro Alves <palves@redhat.com>
5690 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5692 (find_pc_partial_function_gnu_ifunc): Rename to ...
5693 (find_pc_partial_function): ... this, and remove references to
5695 (find_pc_partial_function): Delete old implementation.
5696 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5698 2018-04-26 Pedro Alves <palves@redhat.com>
5700 * linespec.c (struct bound_minimal_symbol_search_key): New.
5701 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5702 skip first line if we found a GNU ifunc minimal symbol by name.
5703 (compare_msymbols): Change parameters to work with a destructured
5705 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5708 2018-04-26 Pedro Alves <palves@redhat.com>
5710 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5711 ifunc targets here. Instead, if we have an ifunc minsym, use its
5713 (add_location_to_breakpoint): Store the minsym and the objfile in
5714 the breakpoint location.
5715 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5716 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5717 Record the minsym in the sal.
5718 * symtab.h (symtab_and_line) <msymbol>: New field.
5720 2018-04-26 Pedro Alves <palves@redhat.com>
5722 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5723 unless we actually resolved the ifunc.
5725 2018-04-26 Pedro Alves <palves@redhat.com>
5727 * c-exp.y (variable production): Prefer ifunc minsyms over
5728 regular function symbols.
5729 * symtab.c (find_gnu_ifunc): New function.
5730 * minsyms.h (lookup_msym_prefer): New enum.
5731 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5732 parameter by a lookup_msym_prefer parameter.
5733 * symtab.h (find_gnu_ifunc): New declaration.
5735 2018-04-26 Pedro Alves <palves@redhat.com>
5737 * blockframe.c (find_gnu_ifunc_target_type): New function.
5738 (find_function_type): New.
5739 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5740 return a value with a memory address.
5741 (eval_call): For calls to GNU ifunc functions, try to find the
5742 type of the target function from the type that the resolver
5744 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5746 * infcall.c (find_function_return_type): Delete.
5747 (find_function_addr): Add 'function_type' parameter. For calls to
5748 GNU ifunc functions, try to find the type of the target function
5749 from the type that the resolver returns, and return it via
5751 (call_function_by_hand_dummy): Adjust to use the function type
5752 returned by find_function_addr.
5753 (find_function_addr): Add 'function_type' parameter and move
5755 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5758 2018-04-26 Pedro Alves <palves@redhat.com>
5760 * c-exp.y (variable production): Skip finding an alias for ifunc
5763 2018-04-26 Pedro Alves <palves@redhat.com>
5765 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5767 2018-04-25 Pedro Alves <palves@redhat.com>
5769 * infcmd.c (kill_command): Print the pid as string, not the whole
5770 thread's ptid. Add comment. s/has been killed/killed/ in output
5772 * remote.c (remote_detach_1): Print the pid as string, not the
5773 whole thread's ptid.
5775 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5776 Sergio Durigan Junior <sergiodj@redhat.com>
5777 Pedro Alves <palves@redhat.com>
5779 * infcmd.c (kill_command): Print message when inferior has
5781 * inferior.c (print_inferior_events): Remove 'static'. Set as
5783 (add_inferior): Improve message printed when
5784 'print_inferior_events' is on.
5785 (exit_inferior): Remove message printed when
5786 'print_inferior_events' is on.
5787 (detach_inferior): Improve message printed when
5788 'print_inferior_events' is on.
5789 (initialize_inferiors): Use 'add_inferior_silent' to set
5790 'current_inferior_'.
5791 * inferior.h (print_inferior_events): Declare here as
5793 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5794 '[Detaching...]' messages when 'print_inferior_events' is on.
5795 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5796 as prefix/suffix for messages. Remove periods. Fix erroneous
5797 'Detaching after fork from child...', replace it by '... from
5799 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5800 prefix/suffix when printing 'Detaching...' messages. Print
5801 them when 'print_inferior_events' is on.
5802 * remote.c (remote_detach_1): Print message when detaching
5803 from inferior and '!is_fork_parent'.
5805 2018-04-24 Tom Tromey <tom@tromey.com>
5807 * cli-out.h: Reindent.
5809 2018-04-24 Tom Tromey <tom@tromey.com>
5811 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5812 (cli_ui_out::do_field_string): Use fputs_filtered.
5813 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5815 2018-04-23 Tom Tromey <tom@tromey.com>
5817 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5818 gdb::unique_xmalloc_ptr.
5820 2018-04-23 Tom Tromey <tom@tromey.com>
5822 * configure: Rebuild.
5824 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5827 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5828 prepare_for_testing. Set normal_bp to r_debug_state if target
5831 2018-04-21 Pedro Alves <palves@redhat.com>
5832 Rajendra SY <rajendra.sy@gmail.com>
5834 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5835 * remote.c (extended_remote_attach): In all-stop mode, mark the
5836 thread as executing.
5838 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5840 * thread.c (thread_apply_all_command): Fix comment.
5841 (thread_command): Fix comment.
5843 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5845 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5847 * features/aarch64-core.c (create_feature_aarch64_core):
5849 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5851 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5853 * features/i386/32bit-avx512.c
5854 (create_feature_i386_32bit_avx512): Likewise.
5855 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5857 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5859 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5861 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5863 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5865 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5867 * features/i386/64bit-avx512.c
5868 (create_feature_i386_64bit_avx512): Likewise.
5869 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5871 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5873 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5875 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5877 * features/i386/64bit-segments.c
5878 (create_feature_i386_64bit_segments): Likewise.
5879 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5881 * features/i386/x32-core.c
5882 (create_feature_i386_x32_core): Likewise.
5883 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5884 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5885 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5886 * target-descriptions.c: In generated code, don't pass xml
5889 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5891 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5892 (print_xml_feature::visit_post): Likewise.
5893 (print_xml_feature::visit): Likewise.
5894 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5895 (print_xml_feature): Add new class.
5896 * regformats/regdat.sh: Null xmltarget on feature targets.
5897 * target-descriptions.c (struct target_desc): Add xmltarget.
5898 (maintenance_check_tdesc_xml_convert): Add unittest function.
5899 (tdesc_get_features_xml): Add function to get xml.
5900 (maintenance_check_xml_descriptions): Test xml generation.
5901 * xml-tdesc.c (string_read_description_xml): Add function.
5902 * xml-tdesc.h (string_read_description_xml): Add declaration.
5904 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5906 * features/Makefile: Add feature marker to targets with new style
5907 target descriptions.
5908 * regformats/aarch64.dat: Regenerate.
5909 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5910 * regformats/i386/amd64-avx-linux.dat: Likewise.
5911 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5912 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5913 * regformats/i386/amd64-linux.dat: Likewise.
5914 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5915 * regformats/i386/amd64.dat: Likewise.
5916 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5917 * regformats/i386/i386-avx-linux.dat: Likewise.
5918 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5919 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5920 * regformats/i386/i386-linux.dat: Likewise.
5921 * regformats/i386/i386-mmx-linux.dat: Likewise.
5922 * regformats/i386/i386-mpx-linux.dat: Likewise.
5923 * regformats/i386/i386.dat: Likewise.
5924 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5925 * regformats/i386/x32-avx-linux.dat: Likewise.
5926 * regformats/i386/x32-linux.dat: Likewise.
5927 * regformats/tic6x-c62x-linux.dat: Likewise.
5928 * regformats/tic6x-c64x-linux.dat: Likewise.
5929 * regformats/tic6x-c64xp-linux.dat: Likewise.
5930 * regformats/regdat.sh: Parse feature marker.
5932 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5934 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5935 (tdesc_osabi_name): Likewise.
5936 * target-descriptions.c (tdesc_architecture_name): Add new
5938 (tdesc_osabi_name): Likewise.
5940 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5942 * common/tdesc.c (tdesc_predefined_type): Move to here.
5943 (tdesc_named_type): Likewise.
5944 (tdesc_create_vector): Likewise.
5945 (tdesc_create_struct): Likewise.
5946 (tdesc_set_struct_size): Likewise.
5947 (tdesc_create_union): Likewise.
5948 (tdesc_create_flags): Likewise.
5949 (tdesc_create_enum): Likewise.
5950 (tdesc_add_field): Likewise.
5951 (tdesc_add_typed_bitfield): Likewise.
5952 (tdesc_add_bitfield): Likewise.
5953 (tdesc_add_flag): Likewise.
5954 (tdesc_add_enum_value): Likewise.
5955 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5956 (struct tdesc_type_vector): Likewise.
5957 (struct tdesc_type_field): Likewise.
5958 (struct tdesc_type_with_fields): Likewise.
5959 (tdesc_create_enum): Add declaration.
5960 (tdesc_add_typed_bitfield): Likewise.
5961 (tdesc_add_enum_value): Likewise.
5962 * target-descriptions.c (tdesc_type_field): Move from here.
5963 (tdesc_type_builtin): Likewise.
5964 (tdesc_type_vector): Likewise.
5965 (tdesc_type_with_fields): Likewise.
5966 (tdesc_predefined_types): Likewise.
5967 (tdesc_named_type): Likewise.
5968 (tdesc_create_vector): Likewise.
5969 (tdesc_create_struct): Likewise.
5970 (tdesc_set_struct_size): Likewise.
5971 (tdesc_create_union): Likewise.
5972 (tdesc_create_flags): Likewise.
5973 (tdesc_create_enum): Likewise.
5974 (tdesc_add_field): Likewise.
5975 (tdesc_add_typed_bitfield): Likewise.
5976 (tdesc_add_bitfield): Likewise.
5977 (tdesc_add_flag): Likewise.
5978 (tdesc_add_enum_value): Likewise.
5979 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5980 (tdesc_add_typed_bitfield): Likewise.
5981 (tdesc_add_enum_value): Likewise.
5983 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5985 * common/tdesc.c (tdesc_feature::accept): Move to here.
5986 (tdesc_feature::operator==): Likewise.
5987 (tdesc_create_reg): Likewise.
5988 * common/tdesc.h (tdesc_type_kind): Likewise.
5989 (struct tdesc_type): Likewise.
5990 (struct tdesc_feature): Likewise.
5991 * regformats/regdat.sh: Create a feature.
5992 * target-descriptions.c (tdesc_type_kind): Move from here.
5993 (tdesc_type): Likewise.
5994 (tdesc_type_up): Likewise.
5995 (tdesc_feature): Likewise.
5996 (tdesc_create_reg): Likewise.
5998 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6000 * Makefile.in: Add arch/tdesc.c
6001 * common/tdesc.c: New file.
6002 * common/tdesc.h (tdesc_element_visitor): Move to here.
6003 (tdesc_element): Likewise.
6004 (tdesc_reg): Likewise.
6005 (tdesc_reg_up): Likewise.
6006 * regformats/regdef.h (reg): Add offset to constructors.
6007 * target-descriptions.c (tdesc_element_visitor): Move from here.
6008 (tdesc_element): Likewise.
6009 (tdesc_reg): Likewise.
6010 (tdesc_reg_up): Likewise.
6012 2018-04-17 Tom Tromey <tom@tromey.com>
6014 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6017 2018-04-17 Tom Tromey <tom@tromey.com>
6019 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6021 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6023 * symtab.c (print_symbol_info): Skip printing filename and line
6024 number when `last' is NULL.
6025 (symtab_symbol_info): Use empty string instead of NULL for first
6026 invocation of print_symbol_info.
6027 (rbreak_command): Pass NULL to `last' parameter of
6030 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6032 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6035 2018-04-16 Pedro Alves <palves@redhat.com>
6037 * MAINTAINERS (sh): Remove.
6038 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6039 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6040 (ALLDEPFILES): Remove sh64-tdep.c.
6041 * NEWS: Mentions that support for SH-5/SH64 is removed.
6042 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6043 (sh*-*-openbsd*): Ditto.
6044 (sh64-*-elf*): Remove.
6046 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6047 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6048 * sh-tdep.c: No longer include "sh64-tdep.h".
6049 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6050 * sh64-tdep.c, sh64-tdep.h: Remove files.
6052 2018-04-16 Pedro Alves <palves@redhat.com>
6054 * MAINTAINERS: Remove m88k.
6055 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6056 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6057 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6058 * NEWS: Mention that support for m88k was removed.
6059 * configure.host (m88*-*-*): Remove support.
6060 * configure.nat (m88k-*-*): Remove support.
6061 * configure.tgt (m88*-*-openbsd*): Remove.
6062 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6064 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6066 * configure.tgt (x86_tobjs): New variable.
6067 (amd64_tobjs, i386_tobjs): Use it.
6069 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6071 * symtab.c (print_symbol_info): Precede the symbol definition by
6072 the line number when available.
6073 * NEWS: Advertise this enhancement.
6075 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6077 * NEWS (New options): announce set/show record btrace cpu.
6078 * btrace.c: Include record-btrace.h.
6079 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6080 the vendor is unknown.
6081 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6082 Maybe overwrite the btrace configuration's cpu.
6083 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6084 (btrace_fetch): Add cpu parameter. Update callers.
6085 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6086 Maybe overwrite the btrace configuration's cpu. Skip enabling
6087 errata workarounds if the vendor is unknown.
6088 * python/py-record-btrace.c: Include record-btrace.h.
6089 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6090 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6091 * record-btrace.c (record_btrace_cpu_state_kind): New.
6092 (record_btrace_cpu): New.
6093 (set_record_btrace_cpu_cmdlist): New.
6094 (record_btrace_get_cpu): New.
6095 (require_btrace_thread, record_btrace_info)
6096 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6097 (cmd_set_record_btrace_cpu_none): New.
6098 (cmd_set_record_btrace_cpu_auto): New.
6099 (cmd_set_record_btrace_cpu): New.
6100 (cmd_show_record_btrace_cpu): New.
6101 (_initialize_record_btrace): Initialize set/show record btrace cpu
6103 * record-btrace.h (record_btrace_get_cpu): New.
6105 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6107 * record.c (set_record_command): Fix typo in message.
6109 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6111 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6113 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6115 * infrun.c (process_event_stop_test): Call
6116 gdbarch_in_indirect_branch_thunk.
6117 * gdbarch.sh (in_indirect_branch_thunk): New.
6118 * gdbarch.c: Regenerated.
6119 * gdbarch.h: Regenerated.
6122 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6123 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6124 (ALLDEPFILES): Add x86-tdep.c.
6125 * arch-utils.h (default_in_indirect_branch_thunk): New.
6126 * arch-utils.c (default_in_indirect_branch_thunk): New.
6127 * i386-tdep: Include x86-tdep.h.
6128 (i386_in_indirect_branch_thunk): New.
6129 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6131 * amd64-tdep: Include x86-tdep.h.
6132 (amd64_in_indirect_branch_thunk): New.
6133 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6135 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6138 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6139 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6140 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6143 2018-04-12 Tom Tromey <tom@tromey.com>
6145 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6146 (rust_evaluate_subexp): Likewise.
6148 2018-04-12 Pedro Alves <palves@redhat.com>
6150 * procfs.c (procfs_detach): Make forward declaration's prototype
6151 match definition's protototype.
6152 (proc_get_LDT_entry): Remove stale do_cleanups call.
6154 2018-04-12 Pedro Alves <palves@redhat.com>
6156 * target.h (target_ops::to_has_exited): Delete.
6157 (target_has_exited): Delete.
6158 * target-delegates.c: Regenerate.
6160 2018-04-11 Pedro Alves <palves@redhat.com>
6162 * target.c (fileio_fh_t::t): Add comment.
6163 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6164 (target_fileio_close): Handle a NULL target.
6165 (invalidate_fileio_fh): New.
6166 (target_close): Call it.
6167 * remote.c (remote_hostio_send_command): No longer check whether
6168 remote_desc is open.
6170 2018-04-11 Pedro Alves <palves@redhat.com>
6172 * target.c (fileio_fh_t): Make it a named struct instead of a
6174 (fileio_fh_t::is_closed): New method.
6175 (DEF_VEC_O (fileio_fh_t)): Remove.
6176 (fileio_fhandles): Now a std::vector.
6177 (is_closed_fileio_fh): Delete.
6178 (acquire_fileio_fd): Adjust. Rename parameters.
6179 (release_fileio_fd): Adjust.
6180 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6181 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6182 (target_fileio_close): Adjust.
6184 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6186 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6189 2018-04-10 Pedro Alves <palves@redhat.com>
6191 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6192 (scoped_finish_thread_state): New class.
6193 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6195 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6196 (fetch_inferior_event, normal_stop): Likewise.
6197 * thread.c (finish_thread_state_cleanup): Delete.
6199 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6200 Pedro Alves <palves@redhat.com>
6202 * value.c: Include "selftest.h" and "common/array-view.h".
6203 (struct range) <operator ==>: New.
6204 (test_ranges_contain): New.
6205 (check_ranges_vector): New.
6206 (test_insert_into_bit_range_vector): New.
6207 (_initialize_values): Register selftests.
6208 * common/array-view.h (operator==, operator!=): New.
6210 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6212 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6214 * inline-frame.c: Include <algorithm>.
6215 (struct inline_state): Add constructor.
6216 (inline_state_s): Remove.
6217 (DEF_VEC_O(inline_state_s)): Remove.
6218 (inline_states): Change type to std::vector.
6219 (find_inline_frame_state): Adjust to std::vector.
6220 (allocate_inline_frame_state): Remove.
6221 (clear_inline_frame_state): Adjust to std::vector.
6222 (skip_inline_frames): Adjust to std::vector.
6224 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6226 * tracepoint.h (struct trace_state_variable): Add constructor.
6227 <name>: Change type to std::string.
6228 * tracepoint.c (tsv_s): Remove.
6229 (DEF_VEC_O(tsv_s)): Remove.
6230 (tvariables): Change to std::vector.
6231 (create_trace_state_variable): Adjust to std::vector.
6232 (find_trace_state_variable): Likewise.
6233 (find_trace_state_variable_by_number): Likewise.
6234 (delete_trace_state_variable): Likewise.
6235 (trace_variable_command): Adjust to std::string.
6236 (delete_trace_variable_command): Likewise.
6237 (tvariables_info_1): Adjust to std::vector.
6238 (save_trace_state_variables): Likewise.
6239 (start_tracing): Likewise.
6240 (merge_uploaded_trace_state_variables): Adjust to std::vector
6242 * target.h (struct target_ops)
6243 <to_download_trace_state_variable>: Pass reference to
6244 trace_state_variable.
6245 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6246 * target-delegates.c: Re-generate.
6247 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6248 (mi_tsv_deleted): Likewise.
6249 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6250 * remote.c (remote_download_trace_state_variable): Change
6251 pointer to reference and adjust.
6252 * make-target-delegates (parse_argtypes): Handle references.
6253 (write_function_header): Likewise.
6254 (munge_type): Likewise.
6256 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6258 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6259 string_view-selftests.c.
6260 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6262 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6263 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6264 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6265 * unittests/basic_string_view/element_access/char/1.cc:
6267 * unittests/basic_string_view/element_access/char/empty.cc:
6269 * unittests/basic_string_view/element_access/char/front_back.cc:
6271 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6272 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6274 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6276 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6278 * unittests/basic_string_view/operations/compare/char/1.cc:
6280 * unittests/basic_string_view/operations/compare/char/13650.cc:
6282 * unittests/basic_string_view/operations/copy/char/1.cc:
6284 * unittests/basic_string_view/operations/data/char/1.cc:
6286 * unittests/basic_string_view/operations/find/char/1.cc:
6288 * unittests/basic_string_view/operations/find/char/2.cc:
6290 * unittests/basic_string_view/operations/find/char/3.cc:
6292 * unittests/basic_string_view/operations/find/char/4.cc:
6294 * unittests/basic_string_view/operations/rfind/char/1.cc:
6296 * unittests/basic_string_view/operations/rfind/char/2.cc:
6298 * unittests/basic_string_view/operations/rfind/char/3.cc:
6300 * unittests/basic_string_view/operations/substr/char/1.cc:
6302 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6303 * unittests/string_view-selftests.c: New file.
6305 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6307 * unittests/basic_string_view/capacity/1.cc: New file.
6308 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6309 * unittests/basic_string_view/cons/char/1.cc: New file.
6310 * unittests/basic_string_view/cons/char/2.cc: New file.
6311 * unittests/basic_string_view/cons/char/3.cc: New file.
6312 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6313 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6314 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6315 * unittests/basic_string_view/element_access/char/1.cc: New file.
6316 * unittests/basic_string_view/element_access/char/2.cc: New file.
6317 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6318 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6319 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6320 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6321 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6322 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6323 * unittests/basic_string_view/include.cc: New file.
6324 * unittests/basic_string_view/inserters/char/1.cc: New file.
6325 * unittests/basic_string_view/inserters/char/2.cc: New file.
6326 * unittests/basic_string_view/inserters/char/3.cc: New file.
6327 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6328 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6329 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6330 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6331 * unittests/basic_string_view/literals/types.cc: New file.
6332 * unittests/basic_string_view/literals/values.cc: New file.
6333 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6334 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6335 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6336 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6337 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6338 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6339 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6340 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6341 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6342 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6343 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6344 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6345 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6346 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6347 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6348 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6349 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6350 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6351 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6352 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6353 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6354 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6355 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6356 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6357 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6358 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6359 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6360 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6361 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6362 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6363 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6364 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6365 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6366 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6367 * unittests/basic_string_view/operators/char/2.cc: New file.
6368 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6369 * unittests/basic_string_view/range_access/char/1.cc: New file.
6370 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6371 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6372 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6373 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6374 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6375 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6376 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6377 * unittests/basic_string_view/typedefs.cc: New file.
6378 * unittests/basic_string_view/types/1.cc: New file.
6380 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6382 * common/gdb_string_view.h: Remove libstdc++ implementation
6383 details, adjust to gdb reality.
6384 * common/gdb_string_view.tcc: Likewise.
6385 * cli/cli-script.c (struct string_view): Remove.
6386 (user_args) <m_args>: Change element type to gdb::string_view.
6387 (user_args::insert_args): Adjust.
6389 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6391 * common/gdb_string_view.h: New file.
6392 * common/gdb_string_view.tcc: New file.
6394 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6396 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6397 * configure: Re-generate.
6399 2018-04-09 Pedro Alves <palves@redhat.com>
6401 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6402 (set_target_gdbarch): Call
6403 gdb::observers::architecture_changed.notify instead of
6404 observer_notify_architecture_changed.
6406 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6408 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6409 (do_restore_current_traceframe_cleanup): Remove.
6410 (restore_current_traceframe_cleanup_dtor): Remove.
6411 (make_cleanup_restore_current_traceframe): Remove.
6412 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6414 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6415 * infrun.c (fetch_inferior_event): Use
6416 scoped_restore_current_traceframe.
6418 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6420 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6422 <n_allocated_type_units>: Remove.
6423 <all_type_units>: Change to std::vector.
6424 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6425 to std::vector change.
6426 (dwarf2_per_objfile::get_cutu): Likewise.
6427 (dwarf2_per_objfile::get_tu): Likewise.
6428 (create_signatured_type_table_from_index): Likewise.
6429 (create_signatured_type_table_from_debug_names): Likewise.
6430 (dw2_symtab_iter_next): Likewise.
6431 (dw2_print_stats): Likewise.
6432 (dw2_expand_all_symtabs): Likewise.
6433 (dw2_expand_marked_cus): Likewise.
6434 (dw2_debug_names_iterator::next): Likewise.
6435 (dwarf2_initialize_objfile): Likewise.
6436 (add_signatured_type_cu_to_table): Likewise.
6437 (create_all_type_units): Likewise.
6438 (add_type_unit): Likewise.
6439 (struct tu_abbrev_offset): Add constructor.
6440 (build_type_psymtabs_1): Adjust to std::vector change.
6441 (print_tu_stats): Likewise.
6442 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6443 (write_debug_names): Likewise.
6445 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6447 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6448 Make an std::vector.
6449 <n_comp_units>: Remove.
6450 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6451 to std::vector change.
6452 (dwarf2_per_objfile::get_cutu): Likewise.
6453 (dwarf2_per_objfile::get_cu): Likewise.
6454 (create_cus_from_index): Likewise.
6455 (create_addrmap_from_index): Likewise.
6456 (create_addrmap_from_aranges): Likewise.
6457 (dwarf2_read_index): Likewise.
6458 (dw2_find_last_source_symtab): Likewise.
6459 (dw2_map_symtabs_matching_filename): Likewise.
6460 (dw2_symtab_iter_next): Likewise.
6461 (dw2_print_stats): Likewise.
6462 (dw2_expand_all_symtabs): Likewise.
6463 (dw2_expand_symtabs_with_fullname): Likewise.
6464 (dw2_expand_marked_cus): Likewise.
6465 (dw2_map_symbol_filenames): Likewise.
6466 (create_cus_from_debug_names): Likewise.
6467 (dwarf2_read_debug_names): Likewise.
6468 (dw2_debug_names_iterator::next): Likewise.
6469 (dwarf2_initialize_objfile): Likewise.
6470 (set_partial_user): Likewise.
6471 (dwarf2_build_psymtabs_hard): Likewise.
6472 (read_comp_units_from_section): Remove arguments, adjust to
6474 (create_all_comp_units): Adjust to std::vector and
6475 read_comp_units_from_section changes.
6476 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6478 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6479 (psyms_seen_size): Likewise.
6480 (write_gdbindex): Likewise.
6481 (write_debug_names): Likewise.
6483 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6485 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6486 with dwarf2_per_objfile.
6487 (create_cus_from_index): Likewise.
6488 (create_signatured_type_table_from_index): Likewise.
6489 (dwarf2_read_index): Likewise.
6490 (dwarf2_initialize_objfile): Likewise.
6491 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6492 per_cu rather than get_dwarf2_per_objfile.
6494 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6496 * dwarf2read.h (struct signatured_type): Forward declare.
6497 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6499 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6500 (dw2_get_cutu): ...this.
6501 (dwarf2_per_objfile::get_cu): Rename from...
6502 (dw2_get_cu): ...this.
6503 (dwarf2_per_objfile::get_tu): New.
6504 (create_addrmap_from_index): Adjust.
6505 (create_addrmap_from_aranges): Adjust.
6506 (dw2_find_last_source_symtab): Adjust.
6507 (dw2_map_symtabs_matching_filename): Adjust.
6508 (dw2_symtab_iter_next): Adjust.
6509 (dw2_print_stats): Adjust.
6510 (dw2_expand_all_symtabs): Adjust.
6511 (dw2_expand_symtabs_with_fullname): Adjust.
6512 (dw2_expand_marked_cus): Adjust.
6513 (dw_expand_symtabs_matching_file_matcher): Adjust.
6514 (dw2_map_symbol_filenames): Adjust.
6515 (dw2_debug_names_iterator::next): Adjust.
6516 (dwarf2_initialize_objfile): Adjust.
6517 (set_partial_user): Adjust.
6518 (dwarf2_build_psymtabs_hard): Adjust.
6520 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6522 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6523 Remove unused variables.
6524 (dw2_map_symtabs_matching_filename): Likewise.
6525 (dwarf2_record_block_ranges): Likewise.
6526 (dwarf2_read_addr_index): Likewise.
6527 (follow_die_offset): Likewise.
6529 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6531 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6532 to symbol_file_add_main.
6534 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6537 * mi/mi-console.c (do_fputc_async_safe): New.
6538 (mi_console_file::write_async_safe): New.
6539 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6540 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6542 * ui-file.c (ui_file::putstrn): Adjust call to
6543 fputstrn_unfiltered.
6544 * utils.c (printchar): Replace do_fputs and do_fprintf
6545 parameters by do_fputc.
6546 (fputstr_filtered): Adjust call to printchar.
6547 (fputstr_unfiltered): Likewise.
6548 (fputstrn_filtered): Likewise.
6549 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6551 * utils.h (do_fputc_ftype): New typedef.
6552 (fputstrn_unfiltered): Add do_fputc parameter.
6554 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6556 * regformats/i386/i386-avx.dat: Remove.
6558 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6561 * amd64-tdep.c (amd64_none_init_abi): New function.
6562 (amd64_x32_none_init_abi): New function.
6563 (_initialize_amd64_tdep): Register handlers for x86-64 and
6564 x64_32 with GDB_OSABI_NONE.
6565 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6566 GDB_OSABI_NONE osabi.
6568 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6571 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6573 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6574 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6576 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6578 * common/byte-vector.h (char_vector): New type.
6579 * target.h (target_read_alloc): Return
6580 gdb::optional<byte_vector>.
6581 (target_read_stralloc): Return gdb::optional<char_vector>.
6582 (target_get_osdata): Return gdb::optional<char_vector>.
6583 * target.c (target_read_alloc_1): Templatize. Replacement
6584 manual memory management with vector.
6585 (target_read_alloc): Change return type, adjust.
6586 (target_read_stralloc): Change return type, adjust.
6587 (target_get_osdata): Change return type, adjust.
6588 * auxv.c (struct auxv_info) <length>: Remove.
6589 <data>: Change type to gdb::optional<byte_vector>.
6590 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6591 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6592 (target_auxv_search): Adjust.
6593 (fprint_target_auxv): Adjust.
6594 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6595 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6596 (linux_make_corefile_notes): Adjust.
6597 * osdata.c (get_osdata): Adjust.
6598 * remote.c (remote_get_threads_with_qxfer): Adjust.
6599 (remote_memory_map): Adjust.
6600 (remote_traceframe_info): Adjust.
6601 (btrace_read_config): Adjust.
6602 (remote_read_btrace): Adjust.
6603 (remote_pid_to_exec_file): Adjust.
6604 * solib-aix.c (solib_aix_get_library_list): Adjust.
6605 * solib-dsbt.c (decode_loadmap): Don't free buf.
6606 (dsbt_get_initial_loadmaps): Adjust.
6607 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6608 * solib-target.c (solib_target_current_sos): Adjust.
6609 * tracepoint.c (sdata_make_value): Adjust.
6610 * xml-support.c (xinclude_start_include): Adjust.
6611 (xml_fetch_content_from_file): Adjust.
6612 * xml-support.h (xml_fetch_another): Change return type.
6613 (xml_fetch_content_from_file): Change return type.
6614 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6615 * xml-tdesc.c (file_read_description_xml): Adjust.
6616 (fetch_available_features_from_target): Change return type.
6617 (target_fetch_description_xml): Adjust.
6618 (target_read_description_xml): Adjust.
6620 2018-04-06 Tom Tromey <tom@tromey.com>
6622 * value.c (~value): Update.
6623 (struct value) <contents>: Now unique_xmalloc_ptr.
6624 (value_contents_bits_eq, allocate_value_contents)
6625 (value_contents_raw, value_contents_all_raw)
6626 (value_contents_for_printing, value_contents_for_printing_const)
6627 (set_value_enclosing_type): Update.
6629 2018-04-06 Tom Tromey <tom@tromey.com>
6631 * value.c (range_s): Remove typedef, VEC.
6632 (struct range): Add operator<.
6633 (range_lessthan): Remove.
6634 (ranges_contain): Change type.
6636 (struct value) <unavailable, optimized_out>: Now std::vector.
6637 (value_entirely_available)
6638 (value_entirely_covered_by_range_vector)
6639 (value_entirely_unavailable, value_entirely_optimized_out):
6641 (insert_into_bit_range_vector): Change argument type.
6642 (find_first_range_overlap): Likewise.
6643 (struct ranges_and_idx, value_contents_bits_eq)
6644 (require_not_optimized_out, require_available): Update.
6645 (ranges_copy_adjusted): Change argument types.
6646 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6648 2018-04-06 Tom Tromey <tom@tromey.com>
6650 * value.c (~value): Update.
6651 (struct value) <parent>: Now a value_ref_ptr.
6652 (value_parent, set_value_parent, value_address, value_copy):
6655 2018-04-06 Tom Tromey <tom@tromey.com>
6657 * value.c (struct value): Add constructor, destructor, and member
6659 (allocate_value_lazy, value_decref): Update.
6661 2018-04-06 Tom Tromey <tom@tromey.com>
6663 * value.c (struct value) <released, next>: Remove.
6664 (all_values): Now a std::vector.
6665 (allocate_value_lazy): Update.
6666 (value_next): Remove.
6667 (value_mark, value_free_to_mark, release_value)
6668 (value_release_to_mark): Update.
6670 2018-04-06 Tom Tromey <tom@tromey.com>
6672 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6673 (free_value_chain): Remove.
6674 * value.c (free_value_chain): Remove.
6675 (value_release_to_mark): Return a std::vector.
6676 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6678 (check_condition): Update.
6679 * eval.c (fetch_subexp_value): Change "val_chain" to a
6681 * breakpoint.c (update_watchpoint): Update.
6682 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6684 2018-04-06 Tom Tromey <tom@tromey.com>
6686 * value.h (free_all_values): Remove.
6687 * value.c (free_all_values): Remove.
6689 2018-04-06 Tom Tromey <tom@tromey.com>
6691 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6692 (value_history_chain, value_history_count): Remove.
6693 (value_history): New global.
6694 (record_latest_value, access_value_history, show_values)
6695 (preserve_values): Update.
6697 2018-04-06 Tom Tromey <tom@tromey.com>
6699 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6700 * varobj.c (varobj_set_display_format, varobj_set_value)
6701 (install_default_visualizer, construct_visualizer)
6702 (install_new_value, ~varobj, varobj_get_value_type)
6703 (my_value_of_variable, varobj_editable_p): Update.
6704 * c-varobj.c (c_describe_child, c_value_of_variable)
6705 (cplus_number_of_children, cplus_describe_child): Update.
6706 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6707 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6708 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6710 2018-04-06 Tom Tromey <tom@tromey.com>
6712 * printcmd.c (last_examine_address): Change type to
6714 (do_examine, x_command): Update.
6716 2018-04-06 Tom Tromey <tom@tromey.com>
6718 * value.c (release_value): Update.
6719 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6720 (struct bpstats) <val>: Now a value_ref_ptr.
6721 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6722 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6723 (~watchpoint, print_it_watchpoint, watch_command_1)
6724 (invalidate_bp_value_on_memory_change): Update.
6726 2018-04-06 Tom Tromey <tom@tromey.com>
6728 * varobj.c (varobj_clear_saved_item)
6729 (update_dynamic_varobj_children, install_new_value, ~varobj):
6731 * value.h (value_incref): Move declaration earlier.
6732 (value_decref): Rename from value_free.
6733 (struct value_ref_policy): New.
6734 (value_ref_ptr): New typedef.
6735 (struct value_deleter): Remove.
6736 (gdb_value_up): Remove typedef.
6737 (release_value): Change return type.
6738 (release_value_or_incref): Remove.
6739 * value.c (set_value_parent): Update.
6740 (value_incref): Change return type.
6741 (value_decref): Rename from value_free.
6742 (value_free_to_mark, free_all_values, free_value_chain): Update.
6743 (release_value): Return value_ref_ptr.
6744 (release_value_or_incref): Remove.
6745 (record_latest_value, set_internalvar, clear_internalvar):
6747 * stack.c (info_frame_command): Don't call value_free.
6748 * python/py-value.c (valpy_dealloc, valpy_new)
6749 (value_to_value_object): Update.
6750 * printcmd.c (do_examine): Update.
6751 * opencl-lang.c (lval_func_free_closure): Update.
6752 * mi/mi-main.c (register_changed_p): Don't call value_free.
6753 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6754 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6755 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6757 * guile/scm-value.c (vlscm_free_value_smob)
6758 (vlscm_scm_from_value): Update.
6759 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6760 (frame_unwind_register_unsigned, get_frame_register_bytes)
6761 (put_frame_register_bytes): Don't call value_free.
6762 * findvar.c (address_from_register): Don't call value_free.
6763 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6764 * dwarf2loc.c (entry_data_value_free_closure)
6765 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6766 (dwarf2_evaluate_loc_desc_full): Update.
6767 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6768 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6769 (~watchpoint, watch_command_1)
6770 (invalidate_bp_value_on_memory_change): Update.
6771 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6773 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6776 * warning.m4: Add -Wno-error=deprecated-register.
6777 * configure: Re-generate.
6779 2018-04-05 Tom Tromey <tom@tromey.com>
6781 * linespec.h: Remove include of "vec.h".
6783 2018-04-05 Tom Tromey <tom@tromey.com>
6785 * linespec.c (typep): Remove typedef.
6786 (find_methods, find_superclass_methods): Take a std::vector.
6787 (find_method): Use std::vector.
6789 2018-04-05 Tom Tromey <tom@tromey.com>
6791 * utils.c (compare_strings): Remove.
6792 * utils.h (compare_strings): Remove.
6793 * objc-lang.h (find_imps): Update.
6794 * objc-lang.c (find_methods): Take a std::vector.
6795 (uniquify_strings, find_imps): Likewise.
6796 * linespec.c (find_methods): Take a std::vector.
6797 (decode_objc): Use std::vector.
6798 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6800 (find_method, find_function_symbols): Use std::vector.
6802 2018-04-05 Tom Tromey <tom@tromey.com>
6804 * completer.c (completion_tracker::completion_tracker): Remove
6806 (completion_tracker::discard_completions): Likewise.
6807 * breakpoint.c (ambiguous_names_p): Remove cast.
6808 * ada-lang.c (_initialize_ada_language): Remove cast.
6809 * utils.h (streq): Update.
6810 (streq_hash): Add new declaration.
6811 * utils.c (streq): Return bool.
6812 (streq_hash): New function.
6814 2018-04-05 Tom Tromey <tom@tromey.com>
6816 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6817 Remove a string copy.
6819 2018-04-05 Tom Tromey <tom@tromey.com>
6821 * linespec.c (filter_results): Use std::vector.
6822 (decode_line_2, decode_line_full): Update.
6824 2018-04-05 Tom Tromey <tom@tromey.com>
6826 * linespec.c (canonical_to_fullform): Return std::string.
6827 (filter_results): Update.
6828 (struct decode_line_2_item): Add constructor.
6829 <fullform, displayform>: Now std::string.
6830 (decode_line_2_compare_items): Now a std::sort comparator.
6831 (decode_line_2): Update.
6833 2018-04-05 Tom Tromey <tom@tromey.com>
6835 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6836 (unexpected_linespec_error): Update.
6837 (linespec_parse_basic, parse_linespec): Update.
6839 2018-04-05 Tom Tromey <tom@tromey.com>
6841 * linespec.c (linespec_parse_basic): Reindent.
6843 2018-04-05 Tom Tromey <tom@tromey.com>
6845 * minsyms.h (iterate_over_minimal_symbols): Update.
6846 * minsyms.c (iterate_over_minimal_symbols): Take a
6848 * linespec.c (struct collect_minsyms): Remove.
6849 (compare_msyms): Now a std::sort comparator.
6850 (add_minsym): Add parameters.
6851 (search_minsyms_for_name): Update. Use std::vector.
6853 2018-04-03 Tom Tromey <tom@tromey.com>
6855 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6858 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6860 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6862 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6865 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6866 printing static type.
6868 2018-04-01 Tom Tromey <tom@tromey.com>
6870 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6871 (rs6000_xfer_shared_libraries): Update.
6873 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6875 * common/gdb_vecs.h (char_ptr): Remove.
6876 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6878 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6880 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6882 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6884 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6886 * tracepoint.h (struct uploaded_tp): Initialize fields.
6887 <actions, step_actions, cmd_strings>: Change type to
6888 std::vector<char *>.
6889 * tracepoint.c (get_uploaded_tp): Allocate with new.
6890 (free_uploaded_tps): Free with delete.
6891 (parse_tracepoint_definition): Adjust to std::vector change.
6892 * breakpoint.c (read_uploaded_action): Likewise.
6893 (create_tracepoint_from_upload): Likewise.
6894 * ctf.c (ctf_write_uploaded_tp): Likewise.
6895 (SET_ARRAY_FIELD): Likewise.
6896 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6898 2018-03-30 Tom Tromey <tom@tromey.com>
6900 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6902 (svr4_keep_data_in_core): Update.
6903 (svr4_read_so_list): Update.
6905 2018-03-30 Tom Tromey <tom@tromey.com>
6907 * windows-nat.c (handle_output_debug_string, handle_exception):
6909 * target.h (target_read_string): Update.
6910 * target.c (target_read_string): Change "string" to
6912 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6914 * solib-frv.c (frv_current_sos): Update.
6915 * solib-dsbt.c (dsbt_current_sos): Update.
6916 * solib-darwin.c (darwin_current_sos): Update.
6917 * linux-thread-db.c (inferior_has_bug): Update.
6918 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6919 Update. Remove alloca.
6920 * ada-lang.c (ada_main_name): Update.
6922 2018-03-30 Tom Tromey <tom@tromey.com>
6924 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6925 (struct dwo_file_deleter): New.
6926 (dwo_file_up): New typedef.
6927 (open_and_init_dwo_file): Use dwo_file_up.
6928 (free_dwo_file_cleanup): Remove.
6930 2018-03-30 Tom Tromey <tom@tromey.com>
6932 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6933 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6935 2018-03-30 Tom Tromey <tom@tromey.com>
6937 * dwarf2read.c (class free_cached_comp_units): New class.
6938 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6939 (free_cached_comp_units): Remove function.
6941 2018-03-30 Tom Tromey <tom@tromey.com>
6943 * utils.h (make_cleanup_unpush_target): Remove.
6944 * inf-ptrace.c (struct target_unpusher): New.
6945 (target_unpush_up) New typedef.
6946 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6948 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6950 2018-03-27 Tom Tromey <tom@tromey.com>
6952 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6954 2018-03-27 Pedro Alves <palves@redhat.com>
6955 Tom Tromey <tom@tromey.com>
6957 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6958 destructor. Now a class.
6959 (gdb_readline_wrapper_cleanup): Remove function.
6960 (gdb_readline_wrapper): Remove cleanups.
6962 2018-03-27 Tom Tromey <tom@tromey.com>
6964 * typeprint.h (struct type_print_options) <local_typedefs,
6965 global_typedefs>: Remove "struct" keyword.
6966 (class typedef_hash_table): New class.
6967 (recursively_update_typedef_hash, add_template_parameters)
6968 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6969 (find_typedef_in_hash): Don't declare.
6970 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6971 (typedef_hash_table::recursively_update): Rename from
6972 recursively_update_typedef_hash. Now a member.
6973 (typedef_hash_table::add_template_parameters): Rename from
6974 add_template_parameters. Now a member.
6975 (typedef_hash_table::typedef_hash_table): Now a constructor;
6976 rename from create_typedef_hash.
6977 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6978 rename from free_typedef_hash.
6979 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6980 (do_free_global_table): Remove.
6981 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6982 from copy_type_recursive.
6983 (create_global_typedef_table): Remove.
6984 (typedef_hash_table::find_global_typedef): Now a member of
6986 (typedef_hash_table::find_typedef): Rename from
6987 find_typedef_in_hash; now a member.
6988 (whatis_exp): Update.
6989 * extension.h (struct ext_lang_type_printers): Add constructor and
6991 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6993 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6994 Now a constructor; rename from start_ext_lang_type_printers.
6995 (ext_lang_type_printers): Now a destructor; rename from
6996 free_ext_lang_type_printers.
6997 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6999 (c_type_print_base_struct_union): Update. Remove cleanups.
7001 2018-03-27 Tom Tromey <tom@tromey.com>
7003 * dwarf-index-write.c: Include <cmath>.
7005 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7007 * NEWS: Add entry describing new "set|show varsize-limit" command.
7008 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7010 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7013 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7015 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7017 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7018 * dwarf-index-common.c: New file.
7019 * dwarf-index-common.h: New file.
7020 * dwarf-index-write.c: New file.
7021 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7022 (struct dwarf2_section_info): Move from here.
7023 (dwarf2_section_info_def): Likewise.
7024 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7025 (offset_type): Likewise.
7026 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7027 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7028 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7029 (byte_swap): Likewise.
7030 (MAYBE_SWAP): Likewise.
7031 (dwarf2_per_cu_ptr): Likewise.
7032 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7033 (struct tu_stats): Likewise.
7034 (struct dwarf2_per_objfile): Likewise.
7035 (struct dwarf2_per_cu_data): Likewise.
7036 (struct signatured_type): Likewise.
7037 (sig_type_ptr): Likewise.
7038 (DEF_VEC_P (sig_type_ptr)): Likewise.
7039 (INDEX4_SUFFIX): Likewise.
7040 (INDEX5_SUFFIX): Likewise.
7041 (DEBUG_STR_SUFFIX): Likewise.
7042 (dwarf2_read_section): Make non-static.
7043 (mapped_index_string_hash): Move from here.
7044 (dwarf5_djb_hash): Likewise.
7045 (file_write): Likewise.
7046 (class data_buf): Likewise.
7047 (struct symtab_index_entry): Likewise.
7048 (struct mapped_symtab): Likewise.
7049 (find_slot): Likewise.
7050 (hash_expand): Likewise.
7051 (add_index_entry): Likewise.
7052 (uniquify_cu_indices): Likewise.
7053 (class c_str_view): Likewise.
7054 (class c_str_view_hasher): Likewise.
7055 (class vector_hasher): Likewise.
7056 (write_hash_table): Likewise.
7057 (psym_index_map): Likewise.
7058 (struct addrmap_index_data): Likewise.
7059 (add_address_entry): Likewise.
7060 (add_address_entry_worker): Likewise.
7061 (write_address_map): Likewise.
7062 (symbol_kind): Likewise.
7063 (write_psymbols): Likewise.
7064 (struct signatured_type_index_data): Likewise.
7065 (write_one_signatured_type): Likewise.
7066 (recursively_count_psymbols): Likewise.
7067 (recursively_write_psymbols): Likewise.
7068 (class debug_names): Likewise.
7069 (check_dwarf64_offsets): Likewise.
7070 (psyms_seen_size): Likewise.
7071 (write_gdbindex): Likewise.
7072 (write_debug_names): Likewise.
7073 (assert_file_size): Likewise.
7074 (write_psymtabs_to_index): Likewise.
7075 (save_gdb_index_command): Likewise.
7076 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7078 * dwarf2read.h: New file.
7080 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7083 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7084 symbol name if the CU's language stores symbol names in linkage
7086 * language.h (struct language_defn)
7087 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7088 all instances of this struct.
7090 2018-03-26 Tom Tromey <tom@tromey.com>
7092 * stack.c (backtrace_command_1): Remove verbose code.
7094 2018-03-26 Tom Tromey <tom@tromey.com>
7096 * python/py-framefilter.c (py_print_type): Don't catch
7097 exceptions. Return void.
7098 (py_print_value): Likewise.
7099 (py_print_single_arg): Likewise.
7100 (enumerate_args): Don't catch exceptions.
7101 (py_print_args): Likewise.
7102 (py_print_frame): Likewise.
7103 (gdbpy_apply_frame_filter): Catch exceptions here.
7105 2018-03-26 Tom Tromey <tom@tromey.com>
7107 * stack.c (_initialize_stack): Remove trailing newlines from help
7108 text. Add "Usage" line to "backtrace" help.
7110 2018-03-26 Tom Tromey <tom@tromey.com>
7113 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7115 2018-03-26 Tom Tromey <tom@tromey.com>
7117 * python/py-framefilter.c (py_print_single_arg): Return
7118 EXT_LANG_BT_ERROR from catch.
7120 2018-03-26 Tom Tromey <tom@tromey.com>
7123 * stack.c (backtrace_command_1): Move some code into no-filters
7126 2018-03-26 Tom Tromey <tom@tromey.com>
7128 * python/py-framefilter.c (throw_quit_or_print_exception): New
7130 (gdbpy_apply_frame_filter): Use it.
7132 2018-03-26 Tom Tromey <tom@tromey.com>
7135 * python/py-framefilter.c (py_print_type, py_print_value)
7136 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7139 2018-03-26 Tom Tromey <tom@tromey.com>
7141 * python/py-framefilter.c (enumerate_args): Use
7142 gdb::unique_xmalloc_ptr.
7144 2018-03-26 Tom Tromey <tom@tromey.com>
7146 * python/py-framefilter.c (py_print_frame): Return
7148 (gdbpy_apply_frame_filter): Update comment.
7149 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7151 <EXT_LANG_BT_NO_FILTERS>: Change value.
7153 2018-03-26 Tom Tromey <tom@tromey.com>
7156 * stack.c (backtrace_command): Parse "hide" argument.
7157 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7158 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7161 2018-03-26 Tom Tromey <tom@tromey.com>
7163 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7165 (backtrace_command): Remove "fulltrace", add "flags".
7167 2018-03-26 Tom Tromey <tom@tromey.com>
7169 * stack.c (backtrace_command): Rewrite command line parsing.
7171 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7173 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7175 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7177 * filename-seen-cache.h: Add include guard.
7179 2018-03-26 Keith Seitz <keiths@redhat.com>
7181 * symfile.c (place_section): Remove "struct" from section_addr_info
7183 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7184 "struct" keyword from section_addr_info.
7186 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7188 * regformats/regdef.h (reg): Add constructors.
7190 2018-03-25 Pedro Alves <palves@redhat.com>
7192 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7193 if then/else bodies in var_func_name extraction.
7195 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7197 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7198 lookup_minimal_symbol() to find symbol entry.
7199 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7201 2018-03-23 Keith Seitz <keiths@redhat.com>
7204 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7205 nested type definitions for C++, too.
7207 2018-03-23 Tom Tromey <tom@tromey.com>
7209 * machoread.c (struct oso_el): Add a constructor. Don't define as
7211 (macho_register_oso): Remove.
7212 (macho_symtab_read): Take a std::vector.
7213 (oso_el_compare_name): Now a std::sort comparator.
7214 (macho_symfile_read_all_oso): Take a std::vector.
7215 (macho_symfile_read): Use std::vector. Remove cleanups.
7217 2018-03-22 Tom Tromey <tom@tromey.com>
7219 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7220 (record_full_goto_bookmark): Use std::string.
7222 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7225 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7228 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7230 * rs6000-tdep.c (store_insn_p): New function.
7231 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7232 and cr_reg to their unshifted values. Use store_insn_p to
7233 match LR saves using either R1 or fdata->alloca_reg. Use
7234 store_insn_p to match CR saves. Set alloca_reg_offset
7235 when alloca_reg and framep are set. Remove lr_reg shift
7236 when assigning to fdata->lr_register.
7238 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7240 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7241 command line args instead of emitting a warning.
7243 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7245 * tracepoint.h (struct static_tracepoint_marker): Initialize
7246 fields, define default constructor, move constructor and move
7247 assignment, disable the rest.
7248 <str_id, extra>: Make std::string.
7249 (release_static_tracepoint_marker): Remove.
7250 (free_current_marker): Remove.
7251 * tracepoint.c (free_current_marker): Remove.
7252 (parse_static_tracepoint_marker_definition): Adjust to
7253 std::string, use new hex2str overload.
7254 (release_static_tracepoint_marker): Remove.
7255 (print_one_static_tracepoint_marker): Get marker by reference
7256 and adjust to std::string.
7257 (info_static_tracepoint_markers_command): Adjust to std::vector
7259 * target.h (static_tracepoint_marker_p): Remove typedef.
7260 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7261 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7263 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7265 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7266 (target_debug_print_std_vector_static_tracepoint_marker): New.
7267 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7269 (target_debug_print_static_tracepoint_marker_p): ... this.
7270 * target-delegates.c: Re-generate.
7271 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7273 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7274 (decode_static_tracepoint_spec): Adjust to std::vector.
7275 (tracepoint_print_one_detail): Adjust to std::string.
7276 (strace_marker_decode_location): Adjust to std::string.
7277 (update_static_tracepoint): Adjust to std::string, remove call
7278 to release_static_tracepoint_marker.
7279 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7280 Adjust to std::vector.
7281 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7282 (remote_static_tracepoint_markers_by_strid): Adjust to
7284 * common/rsp-low.h (hex2str): New overload with explicit count
7286 * common/rsp-low.c (hex2str): New overload with explicit count
7288 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7289 (_initialize_rsp_low_selftests): Add test_hex2str test.
7290 * unittests/tracepoint-selftests.c
7291 (test_parse_static_tracepoint_marker_definition): Adjust to
7294 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7296 * tracepoint.c (parse_static_tracepoint_marker_definition):
7297 Consider case where the definition is followed by more
7299 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7300 tracepoint-selftests.c.
7301 * unittests/tracepoint-selftests.c: New.
7303 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7305 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7308 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7310 * symtab.c (find_pc_sect_line): fixed indentation.
7312 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7314 * symtab.c (find_pc_sect_line): now uses binary search.
7316 2018-03-19 Tom Tromey <tom@tromey.com>
7318 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7321 2018-03-19 Pedro Alves <palves@redhat.com>
7322 Tom Tromey <tom@tromey.com>
7324 * unittests/observable-selftests.c: New file.
7325 * common/observable.h: New file.
7326 * observable.h: New file.
7327 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7328 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7329 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7330 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7331 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7332 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7333 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7334 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7335 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7336 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7337 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7338 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7339 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7340 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7341 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7342 tui/tui-interp.c, valops.c: Update all users.
7343 * tui/tui-hooks.c (tui_bp_created_observer)
7344 (tui_bp_deleted_observer, tui_bp_modified_observer)
7345 (tui_inferior_exit_observer, tui_before_prompt_observer)
7346 (tui_normal_stop_observer, tui_register_changed_observer):
7348 (tui_observers_token): New global.
7349 (attach_or_detach, tui_attach_detach_observers): New functions.
7350 (tui_install_hooks, tui_remove_hooks): Use
7351 tui_attach_detach_observers.
7352 * record-btrace.c (record_btrace_thread_observer): Remove.
7353 (record_btrace_thread_observer_token): New global.
7354 * observer.sh: Remove.
7355 * observer.c: Rename to observable.c.
7356 * observable.c (namespace gdb_observers): Define new objects.
7357 (observer_debug): Move into gdb_observers namespace.
7358 (struct observer, struct observer_list, xalloc_observer_list_node)
7359 (xfree_observer_list_node, generic_observer_attach)
7360 (generic_observer_detach, generic_observer_notify): Remove.
7361 (_initialize_observer): Update.
7362 Don't include observer.inc.
7363 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7364 (clean mostlyclean): Likewise.
7365 (observer.h, observer.inc): Remove targets.
7366 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7367 (COMMON_SFILES): Use observable.c, not observer.c.
7368 * .gitignore: Remove observer.h.
7370 2018-03-18 Tom Tromey <tom@tromey.com>
7372 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7374 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7376 2018-03-17 Tom Tromey <tom@tromey.com>
7378 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7380 2018-03-17 Tom Tromey <tom@tromey.com>
7382 * target.c (class scoped_target_fd): New.
7383 (target_fileio_close_cleanup): Remove.
7384 (target_fileio_read_alloc_1): Use scoped_target_fd.
7386 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7388 * silent-rules.mk: New.
7389 * Makefile.in: Include silent-rules.mk
7390 (srcdir, VPATH, top_srcdir): Move up.
7391 (COMPILE): Add ECHO_CXX.
7392 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7393 (init.c): Add ECHO_INIT_C.
7394 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7395 (version.c): Add ECHO_GEN.
7396 (printcmd.o): Add ECHO_CXX.
7397 (target-float.o): Add ECHO_CXX.
7398 (ada-exp.o): Add ECHO_CXX.
7399 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7400 (insight$(EXEEXT)): Add ECHO_CXXLD.
7401 * gnulib/configure.ac: Add AM_SILENT_RULES.
7402 * gnulib/aclocal.m4: Re-generate.
7403 * gnulib/configure: Re-generate.
7404 * gnulib/import/Makefile.in: Re-generate.
7406 2018-03-16 Tom Tromey <tom@tromey.com>
7408 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7409 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7410 * utils.c (do_free_section_addr_info)
7411 (make_cleanup_free_section_addr_info): Remove.
7412 * symfile.h (struct other_sections): Add constructor.
7413 (struct section_addr_info): Remove.
7414 (section_addr_info): New typedef.
7415 (struct sym_fns) <sym_offsets>: Change type of parameter.
7416 (build_section_addr_info_from_objfile)
7417 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7418 (default_symfile_offsets, symbol_file_add)
7419 (symbol_file_add_from_bfd)
7420 (build_section_addr_info_from_section_table): Update.
7421 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7422 * symfile.c (alloc_section_addr_info): Remove.
7423 (build_section_addr_info_from_section_table): Change return type.
7425 (build_section_addr_info_from_bfd)
7426 (build_section_addr_info_from_objfile): Likewise.
7427 (free_section_addr_info): Remove.
7428 (relative_addr_info_to_section_offsets): Change type of "addrs".
7429 (addrs_section_compar): Now a std::sort comparator.
7430 (addrs_section_sort): Change return type.
7431 (addr_info_make_relative): Change type of "addrs". Update.
7432 (default_symfile_offsets, syms_from_objfile_1)
7433 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7434 (symbol_file_add_separate): Update.
7435 (symbol_file_add): Change type of "addrs". Update.
7436 (add_symbol_file_command): Update. Remove cleanups.
7437 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7439 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7440 * solib.c (solib_read_symbols): Update.
7441 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7442 * machoread.c (macho_symfile_offsets): Update.
7443 * jit.c (jit_bfd_try_read_symtab): Update.
7445 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7447 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7448 unittests/utils-selftests.c.
7449 * unittests/utils-selftests.c: New file.
7451 2018-03-14 Tom Tromey <tom@tromey.com>
7454 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7457 2018-03-14 Tom Tromey <tom@tromey.com>
7460 * printcmd.c (printf_pointer): Allow "-" in format.
7462 2018-03-14 Tom Tromey <tom@tromey.com>
7464 * printcmd.c (_initialize_printcmd): Add usage to printf.
7466 2018-03-14 Yao Qi <qiyao@sourceware.org>
7468 * MAINTAINERS: Update my email address.
7470 2018-03-13 Tom Tromey <tom@tromey.com>
7472 * machoread.c (macho_check_dsym): Change filenamep to a
7474 (macho_symfile_read): Update.
7475 * symfile.c (load_command): Use std::string.
7477 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7479 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7480 to error message string.
7481 (riscv_register_name): Use xsnprintf instead of sprintf.
7482 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7484 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7486 (riscv_push_dummy_call): Likewise.
7488 2018-03-12 Tom Tromey <tom@tromey.com>
7490 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7491 Use gdb::byte_vector.
7492 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7494 2018-03-12 Yao Qi <yao.qi@linaro.org>
7496 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7497 parameter type to readable_regcache.
7498 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7501 2018-03-11 Tom Tromey <tom@tromey.com>
7503 * dwarf2read.c (struct nextfield): Add initializers.
7504 (struct nextfnfield): Remove.
7505 (struct fnfieldlist): Add initializers. Remove "length" and
7506 "head", use std::vector.
7507 (struct decl_field_list): Remove.
7508 (struct field_info): Add initializers.
7509 <fields, baseclasses>: Now std::vector.
7510 <nbaseclasses, nfnfields, typedef_field_list_count,
7511 nested_types_list_count>: Remove.
7512 (dwarf2_add_field, dwarf2_add_type_defn)
7513 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7514 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7515 (process_structure_scope): Update.
7517 2018-03-11 Tom Tromey <tom@tromey.com>
7519 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7520 for use by std::sort.
7521 (build_type_psymtabs_1): Use std::vector.
7523 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7525 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7526 and LIBMPFR in the printed configuration.
7528 2018-03-08 Tom Tromey <tom@tromey.com>
7530 * source.c (get_filename_and_charpos): Use scoped_fd.
7531 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7532 (procfs_pidlist): Likewise.
7533 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7534 (iterate_over_mappings): Likewise.
7536 2018-03-08 Tom Tromey <tom@tromey.com>
7538 * infcall.c (struct call_return_meta_info)
7539 <stack_temporaries_enabled>: Remove.
7540 (get_call_return_value, call_function_by_hand_dummy): Update.
7541 * thread.c (disable_thread_stack_temporaries): Remove.
7542 (enable_thread_stack_temporaries): Remove.
7543 (thread_stack_temporaries_enabled_p): Return bool.
7544 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7545 (get_last_thread_stack_temporary): Update.
7546 * eval.c (evaluate_subexp): Update.
7547 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7548 class, not a function.
7549 (value_ptr, value_vec): Remove typedefs.
7550 (class thread_info) <stack_temporaries_enabled>: Now bool.
7551 <stack_temporaries>: Now a std::vector.
7552 (thread_stack_temporaries_enabled_p)
7553 (value_in_thread_stack_temporaries): Return bool.
7555 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7557 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7558 (getpkt_or_notif_sane_1): Likewise.
7560 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7562 * build-id.c (build_id_to_debug_bfd): Use std::string.
7564 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7566 * build-id.c (find_separate_debug_file_by_buildid): Return
7568 * build-id.h (find_separate_debug_file_by_buildid): Return
7570 * coffread.c (coff_symfile_read): Adjust to std::string.
7571 * elfread.c (elf_symfile_read): Adjust to std::string.
7572 * symfile.c (separate_debug_file_exists): Change parameter to
7574 (find_separate_debug_file): Return std::string.
7575 (find_separate_debug_file_by_debuglink): Return std::string.
7576 * symfile.h (find_separate_debug_file_by_debuglink): Return
7579 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7581 * common/xml-utils.c (xml_escape_text): Move code to...
7582 (xml_escape_text_append): ... this new function.
7583 * common/xml-utils.h (xml_escape_text_append): New declaration.
7584 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7586 (_initialize_xml_utils): register test_xml_escape_text_append as
7589 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7591 * defs.h: Remove MAX_REGISTER_SIZE.
7592 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7594 * python/py-unwind.c (pyuw_sniffer): Likewise.
7596 2018-03-07 Tom Tromey <tom@tromey.com>
7598 * linux-tdep.c (linux_info_proc): Update.
7599 * target.h (struct target_ops) <to_fileio_readlink>: Return
7601 (target_fileio_readlink): Return optional<string>.
7602 * remote.c (remote_hostio_readlink): Return optional<string>.
7603 * inf-child.c (inf_child_fileio_readlink): Return
7605 * target.c (target_fileio_readlink): Return optional<string>.
7607 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7609 * regcache.c (cooked_read_test): Add riscv to the list of
7610 architectures that have a save_reggroup.
7612 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7614 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7615 value is not a dynamic class object.
7617 2018-03-06 Tom Tromey <tom@tromey.com>
7619 * rust-exp.y: Formatting fixes.
7621 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7623 * riscv-tdep.c (riscv_register_name): Remove target description
7625 (riscv_gdbarch_init): Remove target description check.
7627 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7629 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7631 * riscv-tdep.h: Likewise.
7633 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7635 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7636 (riscv_pseudo_register_write): Delete.
7637 (riscv_gdbarch_init): Remove all use of pseudo registers.
7639 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7641 * record-btrace.c (btrace_print_lines): Replace cleanup
7642 parameter with RAII equivalents.
7643 (btrace_insn_history): Replace cleanup with RAII equivalents.
7644 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7645 make_cleanup_ui_out_tuple_begin_end): Remove.
7646 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7647 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7648 make_cleanup_ui_out_list_begin_end): Remove.
7650 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7652 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7653 parameter types to std::vector. Use bool.
7654 (record_btrace_wait): Replace VEC(tp_t) with
7655 std::vector<thread_info *>.
7656 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7658 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7660 * record-btrace.c (record_btrace_disable_callback): Remove.
7661 (struct scoped_btrace_disable): New.
7662 (record_btrace_open): Use scoped_btrace_disable.
7664 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7666 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7667 reading values from registers.
7669 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7671 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7674 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7676 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7677 change parameter type. Use GDB's print functions, and use
7678 core_addr_to_string where appropriate.
7679 (riscv_push_dummy_call): Use core_addr_to_string where
7680 appropriate, update call to riscv_print_arg_location, and reindent
7682 (riscv_return_value): Update call to riscv_print_arg_location.
7684 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7685 Tim Newsome <tim@sifive.com>
7686 Albert Ou <a0u@eecs.berkeley.edu>
7687 Darius Rad <darius@bluespec.com>
7689 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7690 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7691 (ALLDEPFILES): Add riscv-tdep.c
7692 * configure.tgt: Add riscv support.
7693 * riscv-tdep.c: New file.
7694 * riscv-tdep.h: New file.
7695 * NEWS: Mention new target.
7696 * MAINTAINERS: Add entry for riscv.
7698 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7700 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7701 fields within aggregates.
7703 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7705 * record-btrace.c (btrace_print_lines): Change type of flags to
7706 gdb_disassembly_flags.
7708 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7710 * fbsd-nat.c: Include "inf-ptrace.h".
7711 (USE_SIGTRAP_SIGINFO): Conditionally define.
7712 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7713 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7714 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7716 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7718 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7720 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7721 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7722 "supports_stopped_by_hw_breakpoint" target methods.
7724 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7726 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7727 * fbsd-nat.c (debug_fbsd_nat): New variable.
7728 (show_fbsd_nat_debug): New function.
7729 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7730 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7732 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7734 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7735 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7737 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7738 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7741 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7743 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7744 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7746 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7748 * charset.c (struct charset_vector): New.
7749 (charsets): Change type to charset_vector.
7750 (find_charset_names): Adjust.
7752 (_initialize_charset): Adjust.
7754 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7756 * progspace.h (struct program_space) <deleted_solibs>: Change
7757 type to std::vector<std::string>.
7758 * progspace.c (clear_program_space_solib_cache): Adjust.
7759 * breakpoint.c (print_solib_event): Adjust.
7760 (check_status_catch_solib): Adjust.
7761 * solib.c (update_solib_list): Adjust.
7762 * ui-out.h (class ui_out) <field_string>: New overload.
7763 * ui-out.c (ui_out::field_string): New overload.
7765 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7767 * progspace.h (struct program_space): Add constructor and
7768 destructor, initialize fields.
7769 (add_program_space): Remove.
7770 * progspace.c (add_program_space): Rename to...
7771 (program_space::program_space): ... this.
7772 (release_program_space): Rename to...
7773 (program_space::~program_space): ... this.
7774 (delete_program_space): Use delete to delete program_space.
7775 (initialize_progspace): Use new to allocate program_space.
7776 * inferior.c (add_inferior_with_spaces): Likewise.
7777 (clone_inferior_command): Likewise.
7778 * infrun.c (follow_fork_inferior): Likewise.
7779 (handle_vfork_child_exec_or_exit): Likewise.
7781 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7783 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7784 (delim_string_to_char_ptr_vec): Return std::vector of
7785 gdb::unique_xmalloc_ptr.
7786 (dirnames_to_char_ptr_vec_append): Take std::vector of
7787 gdb::unique_xmalloc_ptr.
7788 (dirnames_to_char_ptr_vec): Return std::vector of
7789 gdb::unique_xmalloc_ptr.
7790 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7791 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7792 (delim_string_to_char_ptr_vec): Return an std::vector of
7793 gdb::unique_xmalloc_ptr, adjust the code.
7794 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7795 gdb::unique_xmalloc_ptr, adjust the code.
7796 (dirnames_to_char_ptr_vec): Return an std::vector of
7797 gdb::unique_xmalloc_ptr, adjust the code.
7798 * auto-load.c (auto_load_safe_path_vec): Change type to
7799 std::vector of gdb::unique_xmalloc_ptr.
7800 (auto_load_expand_dir_vars): Return an std::vector of
7801 gdb::unique_xmalloc_ptr, adjust the code.
7802 (auto_load_safe_path_vec_update): Adjust.
7803 (filename_is_in_auto_load_safe_path_vec): Adjust.
7804 (auto_load_objfile_script_1): Adjust.
7805 * build-id.c (build_id_to_debug_bfd): Adjust.
7806 * linux-thread-db.c (thread_db_load_search): Adjust.
7807 * source.c (add_path): Adjust.
7809 * symfile.c (find_separate_debug_file): Adjust.
7810 * utils.c (do_free_char_ptr_vec): Remove.
7811 (make_cleanup_free_char_ptr_vec): Remove.
7813 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7816 * common/pathstuff.c: Conditionally include "<windows.h>".
7818 2018-03-01 Georg Sauthoff <mail@georg.so>
7821 * gcore.in: Quote variables and switch interpreter to bash.
7823 2018-03-01 Tom Tromey <tom@tromey.com>
7825 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7826 assertion. Add assertion for discriminant_index.
7827 (quirk_rust_enum): Use correct base type name in univariant case.
7829 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7831 * record.c (get_call_history_modifiers): Return a
7833 (cmd_record_call_history): Adjust.
7834 * record-btrace.c (record_btrace_call_history): Adjust.
7835 (record_btrace_call_history_range): Adjust.
7836 (record_btrace_call_history_from): Adjust.
7837 * target-debug.h (target_debug_print_record_print_flags): New.
7838 * target-delegates.c: Re-generate.
7839 * target.c (target_call_history): Change flags type.
7840 (target_call_history_from): Likewise.
7841 (target_call_history_range): Likewise.
7842 * target.h (struct target_ops) <target_call_history>: Likewise.
7843 (target_call_history_from): Likewise.
7844 (target_call_history_range): Likewise.
7846 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7847 Simon Marchi <simon.marchi@polymtl.ca>
7849 * common/common-utils.c: Include "sys/stat.h".
7850 (is_regular_file): Move here from "source.c"; change return
7852 * common/common-utils.h (is_regular_file): New prototype.
7853 * common/pathstuff.c (contains_dir_separator): New function.
7854 * common/pathstuff.h (contains_dir_separator): New prototype.
7855 * source.c: Don't include "sys/stat.h".
7856 (is_regular_file): Move to "common/common-utils.c".
7858 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7860 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7861 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7862 * auto-load.c: Include "common/pathstuff.h".
7863 * common/common-def.h (current_directory): Move here.
7864 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7866 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7868 * common/pathstuff.c: New file.
7869 * common/pathstuff.h: New file.
7870 * compile/compile.c: Include "common/pathstuff.h".
7871 * defs.h (current_directory): Move to "common/common-defs.h".
7872 * dwarf2read.c: Include "common/pathstuff.h".
7874 * guile/scm-safe-call.c: Likewise.
7875 * linux-thread-db.c: Likewise.
7877 * nto-tdep.c: Likewise.
7878 * objfiles.c: Likewise.
7879 * source.c: Likewise.
7880 * symtab.c: Likewise.
7881 * utils.c: Include "common/pathstuff.h".
7882 (gdb_realpath): Move to "common/pathstuff.c".
7883 (gdb_realpath_keepfile): Likewise.
7884 (gdb_abspath): Likewise.
7885 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7886 (gdb_realpath_keepfile): Likewise.
7887 (gdb_abspath): Likewise.
7889 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7891 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7892 wildcard process pid for super_resume for kernels with a
7895 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7897 * compile/compile.c (get_args): Add additional comments
7898 explaining function.
7900 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7901 Tom Tromey <tom@tromey.com>
7903 * target.h (memory_write_request_s): Remove typedef. Don't define
7905 (target_write_memory_blocks): Change argument to std::vector.
7906 (struct memory_write_request): Add constructor.
7907 * target-memory.c (compare_block_starting_address): Return bool.
7908 Change argument types.
7909 (claim_memory): Change arguments to use std::vector.
7910 (split_regular_and_flash_blocks, blocks_to_erase)
7911 (compute_garbled_blocks): Likewise.
7912 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7913 (target_write_memory_blocks): Change argument to std::vector.
7914 * symfile.c (struct load_section_data): Add constructor and
7915 destructor. Use std::vector for "requests".
7916 (struct load_progress_data): Add initializers.
7917 (load_section_callback): Update. Use "new".
7918 (clear_memory_write_data): Remove.
7919 (generic_load): Update.
7921 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7923 * arch/aarch64.h: Use common/tdesc.h.
7925 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7927 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7928 architecture with a 64-bit ABI.
7930 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7932 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7933 ahead of target description loading.
7935 2018-02-26 Tom Tromey <tom@tromey.com>
7937 * stack.c (backtrace_command_1): Update.
7938 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7940 * python/py-framefilter.c (py_print_frame)
7941 (gdbpy_apply_frame_filter): Change type of "flags".
7942 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7944 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7945 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7946 * extension.h (enum frame_filter_flag): Rename from
7948 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7949 (apply_ext_lang_frame_filter): Change type of "flags".
7950 * extension.c (apply_ext_lang_frame_filter): Change type of
7952 * extension-priv.h (struct extension_language_ops)
7953 <apply_frame_filter>: Change type of "flags".
7955 2018-02-26 Tom Tromey <tom@tromey.com>
7958 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7959 off-by-one in py_end computation.
7960 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7962 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7965 2018-02-26 Tom Tromey <tom@tromey.com>
7967 * dwarf2read.c (struct variant_field): New.
7968 (struct nextfield) <variant>: New field.
7969 (dwarf2_add_field): Handle DW_TAG_variant_part.
7970 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7971 discriminated union.
7972 (read_structure_type): Handle DW_TAG_variant_part.
7973 (handle_struct_member_die): New function, extracted from
7974 process_structure_scope. Handle DW_TAG_variant.
7975 (process_structure_scope): Handle discriminated unions. Call
7976 handle_struct_member_die.
7978 2018-02-26 Tom Tromey <tom@tromey.com>
7980 * rust-lang.h (rust_last_path_segment): Declare.
7981 * rust-lang.c (rust_last_path_segment): Now public. Change
7983 (struct disr_info): Remove.
7984 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7985 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7986 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7987 (rust_enum_p, rust_enum_variant): New function.
7988 (rust_underscore_fields): Remove "offset" parameter.
7989 (rust_print_enum): New function.
7990 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7991 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7992 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7994 (rust_internal_print_type): New function, from rust_print_type.
7996 (rust_print_type): Call rust_internal_print_type.
7997 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7998 Update enum handling.
7999 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8000 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8001 (rust_union_quirks): New functions.
8002 (process_full_comp_unit, process_full_type_unit): Call
8004 (process_structure_scope): Update rust_unions if necessary.
8006 2018-02-26 Tom Tromey <tom@tromey.com>
8008 * value.h (value_union_variant): Declare.
8009 * valops.c (value_union_variant): New function.
8010 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8011 (struct discriminant_info): New.
8012 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8014 (struct main_type) <flag_discriminated_union>: New field.
8016 2018-02-26 Tom Tromey <tom@tromey.com>
8018 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8019 unittests/unpack-selftests.c.
8020 * unittests/unpack-selftests.c: New file.
8021 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8023 2018-02-26 Yao Qi <yao.qi@linaro.org>
8025 * dwarf2read.c (struct partial_die_info) <read>: New method.
8026 (read_partial_die): Remove the declaration.
8027 (load_partial_dies): Update.
8028 (partial_die_info::partial_die_info):
8029 (read_partial_die): Change it to partial_die_info::read.
8031 2018-02-26 Yao Qi <yao.qi@linaro.org>
8033 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8034 (fixup_partial_die): Remove declaration.
8035 (scan_partial_symbols): Update.
8036 (partial_die_parent_scope): Likewise.
8037 (partial_die_full_name): Likewise.
8038 (fixup_partial_die): Change it to partial_die_info::fixup.
8040 2018-02-26 Yao Qi <yao.qi@linaro.org>
8042 * dwarf2read.c (read_partial_die): Update the declaration.
8043 (load_partial_dies): Caller update.
8044 (read_partial_die): Remove one argument abbrev_len.
8046 2018-02-26 Yao Qi <yao.qi@linaro.org>
8048 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8049 assignment operator.
8050 (load_partial_dies): Use ctor and copy ctor.
8051 (read_partial_die): Update.
8052 (dwarf2_cu::find_partial_die): Use ctor.
8054 2018-02-26 Yao Qi <yao.qi@linaro.org>
8056 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8057 (find_partial_die_in_comp_unit): Change it to
8058 dwarf2_cu::find_partial_die.
8059 (find_partial_die): Update.
8061 2018-02-26 Yao Qi <yao.qi@linaro.org>
8063 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8066 2018-02-26 Yao Qi <yao.qi@linaro.org>
8068 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8070 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8072 * arch/amd64.h: Use common/tdesc.h.
8073 * arch/i386.c: Likewise.
8074 * arch/i386.h: Likewise.
8075 * arch/tic6x.c: Likewise.
8076 * arch/tdesc.h: Move file from here...
8077 * common/tdesc.h: ...to here.
8078 * features/aarch64-core.c: Regenerate.
8079 * features/aarch64-fpu.c: Regenerate.
8080 * features/i386/32bit-avx.c: Regenerate.
8081 * features/i386/32bit-avx512.c: Regenerate.
8082 * features/i386/32bit-core.c: Regenerate.
8083 * features/i386/32bit-linux.c: Regenerate.
8084 * features/i386/32bit-mpx.c: Regenerate.
8085 * features/i386/32bit-pkeys.c: Regenerate.
8086 * features/i386/32bit-sse.c: Regenerate.
8087 * features/i386/64bit-avx.c: Regenerate.
8088 * features/i386/64bit-avx512.c: Regenerate.
8089 * features/i386/64bit-core.c: Regenerate.
8090 * features/i386/64bit-linux.c: Regenerate.
8091 * features/i386/64bit-mpx.c: Regenerate.
8092 * features/i386/64bit-pkeys.c: Regenerate.
8093 * features/i386/64bit-segments.c: Regenerate.
8094 * features/i386/64bit-sse.c: Regenerate.
8095 * features/i386/x32-core.c: Regenerate.
8096 * features/tic6x-c6xp.c: Regenerate.
8097 * features/tic6x-core.c: Regenerate.
8098 * features/tic6x-gp.c: Regenerate.
8099 * target-descriptions.c: Use common/tdesc.h.
8100 * target-descriptions.h: Likewise.
8102 2018-02-24 Tom Tromey <tom@tromey.com>
8104 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8105 (try_thread_db_load_from_dir, thread_db_load_search): Use
8107 (info_auto_load_libthread_db_compare): Return bool. Change
8109 (info_auto_load_libthread_db): Use std::vector, std::string.
8112 2018-02-24 Tom Tromey <tom@tromey.com>
8114 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8116 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8118 * gdbarch.c: Rebuild.
8119 * gdbarch.h: Rebuild.
8120 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8121 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8122 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8125 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8127 * gdbtypes.h (sect_offset): Change type to uint64_t.
8128 (sect_offset_str): New function.
8129 * dwarf2read.c (create_addrmap_from_aranges): Use
8131 (error_check_comp_unit_head): Likewise.
8132 (create_debug_type_hash_table): Likewise.
8133 (read_cutu_die_from_dwo): Likewise.
8134 (init_cutu_and_read_dies): Likewise.
8135 (init_cutu_and_read_dies_no_follow): Likewise.
8136 (process_psymtab_comp_unit_reader): Likewise.
8137 (partial_die_parent_scope): Likewise.
8138 (peek_die_abbrev): Likewise.
8139 (process_queue): Likewise.
8140 (dwarf2_physname): Likewise.
8141 (read_namespace_alias): Likewise.
8142 (read_import_statement): Likewise.
8143 (create_dwo_cu_reader): Likewise.
8144 (create_cus_hash_table): Likewise.
8145 (lookup_dwo_cutu): Likewise.
8146 (inherit_abstract_dies): Likewise.
8147 (read_func_scope): Likewise.
8148 (read_call_site_scope): Likewise.
8149 (dwarf2_add_member_fn): Likewise.
8150 (read_common_block): Likewise.
8151 (read_module_type): Likewise.
8152 (read_typedef): Likewise.
8153 (read_subrange_type): Likewise.
8154 (load_partial_dies): Likewise.
8155 (read_partial_die): Likewise.
8156 (find_partial_die): Likewise.
8157 (read_str_index): Likewise.
8158 (dwarf2_string_attr): Likewise.
8159 (build_error_marker_type): Likewise.
8160 (lookup_die_type): Likewise.
8161 (dump_die_shallow): Likewise.
8162 (follow_die_ref): Likewise.
8163 (dwarf2_fetch_die_loc_sect_off): Likewise.
8164 (dwarf2_fetch_constant_bytes): Likewise.
8165 (follow_die_sig): Likewise.
8166 (get_signatured_type): Likewise.
8167 (get_DW_AT_signature_type): Likewise.
8168 (dwarf2_find_containing_comp_unit): Likewise.
8169 (set_die_type): Likewise.
8171 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8173 * arch/aarch64.c: Include "common-defs.h".
8174 * arch/amd64.c: Likewise.
8175 * arch/i386.c: Likewise.
8177 2018-02-21 Tom Tromey <tom@tromey.com>
8179 * value.h: (extract_field_op): Update.
8180 * eval.c (extract_field_op): Return a const char *.
8181 * expression.h (parse_expression_for_completion): Update.
8182 * completer.c (complete_expression): Update.
8183 (add_struct_fields): Make fieldname const.
8184 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8185 (mark_completion_tag, parse_exp_in_context_1): Update.
8186 (parse_expression_for_completion): Change "name" to
8187 unique_xmalloc_ptr*.
8189 2018-02-21 Tom Tromey <tom@tromey.com>
8191 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8193 2018-02-21 Yao Qi <yao.qi@linaro.org>
8195 * avr-tdep.c (avr_read_pc): Change parameter type to
8197 * gdbarch.sh (read_pc): Likewise.
8198 * gdbarch.c: Re-generated.
8199 * gdbarch.h: Re-generated.
8200 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8202 * ia64-tdep.c (ia64_read_pc): Likewise.
8203 * mips-tdep.c (mips_read_pc): Likewise.
8204 * spu-tdep.c (spu_read_pc): Likewise.
8206 2018-02-21 Yao Qi <yao.qi@linaro.org>
8208 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8209 * regcache-dump.c: New file.
8210 * regcache.c: Move register_dump to regcache-dump.c.
8211 (maintenance_print_registers): Likewise.
8212 (maintenance_print_raw_registers): Likewise.
8213 (maintenance_print_cooked_registers): Likewise.
8214 (maintenance_print_register_groups): Likewise.
8215 (maintenance_print_remote_registers): Likewise.
8216 (_initialize_regcache): Likewise.
8217 * regcache.h (register_dump): Moved from regcache.c.
8219 2018-02-21 Yao Qi <yao.qi@linaro.org>
8221 * regcache.c (regcache::regcache): Update.
8222 (regcache::invalidate): Move it to detached_regcache::invalidate.
8223 (get_thread_arch_aspace_regcache): Update.
8224 (regcache::raw_update): Update.
8225 (regcache::cooked_read): Remove some code.
8226 (regcache::cooked_read_value): Likewise.
8227 (regcache::raw_write): Remove assert on m_readonly_p.
8228 (regcache::raw_supply_integer): Move it to
8229 detached_regcache::raw_supply_integer.
8230 (regcache::raw_supply_zeroed): Likewise.
8231 * regcache.h (detached_regcache) <raw_supply_integer>: New
8233 <raw_supply_zeroed, invalidate>: Likewise.
8234 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8235 <invalidate>: Likewise.
8236 <m_readonly_p>: Removed.
8238 2018-02-21 Yao Qi <yao.qi@linaro.org>
8240 * infcmd.c (get_return_value): Let stop_regs point to
8241 get_current_regcache.
8242 * regcache.c (regcache::regcache): Remove.
8243 (register_dump_reg_buffer): New class.
8244 (regcache_print): Adjust.
8245 * regcache.h (regcache): Remove constructors.
8247 2018-02-21 Yao Qi <yao.qi@linaro.org>
8249 * regcache.c (class register_dump): New class.
8250 (register_dump_regcache, register_dump_none): New class.
8251 (register_dump_remote, register_dump_groups): New class.
8252 (regcache_print): Update.
8253 * regcache.h (regcache_dump_what): Move it to regcache.c.
8254 (regcache) <dump>: Remove.
8256 2018-02-21 Yao Qi <yao.qi@linaro.org>
8258 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8260 (jit_unwind_reg_set_impl): Call raw_supply.
8261 (jit_frame_sniffer): Use reg_buffer_rw.
8262 * record-full.c (record_full_core_regbuf): Change its type.
8263 (record_full_core_open_1): Use reg_buffer_rw.
8264 (record_full_close): Likewise.
8265 (record_full_core_fetch_registers): Use regcache->raw_supply.
8266 (record_full_core_store_registers): Likewise.
8267 * regcache.c (regcache::get_register_status): Move it to
8269 (regcache_raw_set_cached_value): Remove.
8270 (regcache::raw_set_cached_value): Remove.
8271 (regcache::raw_write): Call raw_supply.
8272 (regcache::raw_supply): Move it to reg_buffer_rw.
8273 * regcache.h (regcache_raw_set_cached_value): Remove.
8274 (reg_buffer_rw): New class.
8276 2018-02-21 Yao Qi <yao.qi@linaro.org>
8278 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8279 readonly_detached_regcache.
8280 (dummy_frame_prev_register): Use regcache->cooked_read.
8281 * frame.c (frame_save_as_regcache): Change return type.
8282 (frame_pop): Update.
8283 * frame.h (frame_save_as_regcache): Update declaration.
8284 * inferior.h (get_infcall_suspend_state_regcache): Update
8286 * infrun.c (infcall_suspend_state) <registers>: use
8287 readonly_detached_regcache.
8288 (save_infcall_suspend_state): Don't use regcache_dup.
8289 (get_infcall_suspend_state_regcache): Change return type.
8290 * linux-fork.c (struct fork_info) <savedregs>: Change to
8291 readonly_detached_regcache.
8293 (fork_save_infrun_state): Don't use regcache_dup.
8294 (info_checkpoints_command): Adjust.
8295 * mi/mi-main.c (register_changed_p): Update declaration.
8296 (mi_cmd_data_list_changed_registers): Use
8297 readonly_detached_regcache.
8298 (register_changed_p): Change parameter type to
8299 readonly_detached_regcache.
8300 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8301 readonly_detached_regcache.
8302 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8303 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8305 (regcache::save): Move it to reg_buffer.
8306 (regcache::restore): Change parameter type.
8307 (regcache_dup): Remove.
8308 * regcache.h (reg_buffer) <save>: New method.
8309 (readonly_detached_regcache): New class.
8310 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8311 readonly_detached_regcache.
8312 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8314 2018-02-21 Yao Qi <yao.qi@linaro.org>
8316 * frame.c (frame_save_as_regcache): Use regcache method save.
8317 (frame_pop): Use regcache method restore.
8318 * infrun.c (restore_infcall_suspend_state): Likewise.
8319 * linux-fork.c (fork_load_infrun_state): Likewise.
8320 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8322 * regcache.c (regcache_save): Remove.
8323 (regcache::restore): More asserts.
8324 (regcache_cpy): Remove.
8325 * regcache.h (regcache_save): Remove the declaration.
8326 (regcache::restore): Move from private to public.
8327 Remove the friend declaration of regcache_cpy.
8328 (regcache_cpy): Remove declaration.
8330 2018-02-21 Yao Qi <yao.qi@linaro.org>
8332 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8333 parameter type to 'readable_regcache *'.
8334 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8335 * arm-tdep.c (arm_neon_quad_read): Likewise.
8336 (arm_pseudo_read): Likewise.
8337 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8338 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8339 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8340 * gdbarch.c: Re-generated.
8341 * gdbarch.h: Re-generated.
8342 * gdbarch.sh (pseudo_register_read): Change parameter type to
8343 'readable_regcache *'.
8344 (pseudo_register_read_value): Likewise.
8345 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8346 (h8300_pseudo_register_read): Likewise.
8347 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8348 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8349 (i386_pseudo_register_read_into_value): Likewise.
8350 (i386_pseudo_register_read_value): Likewise.
8351 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8353 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8354 * m32c-tdep.c (m32c_raw_read): Likewise.
8355 (m32c_read_flg): Likewise.
8356 (m32c_banked_register): Likewise.
8357 (m32c_banked_read): Likewise.
8358 (m32c_sb_read): Likewise.
8359 (m32c_part_read): Likewise.
8360 (m32c_cat_read): Likewise.
8361 (m32c_r3r2r1r0_read): Likewise.
8362 (m32c_pseudo_register_read): Likewise.
8363 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8364 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8365 (mep_pseudo_cr64_read): Likewise.
8366 (mep_pseudo_register_read): Likewise.
8367 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8368 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8369 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8370 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8371 (regcache::cooked_read): Likewise.
8372 (regcache::cooked_read_value): Likewise.
8373 (regcache_cooked_read_signed):
8374 (regcache::cooked_read): Likewise.
8375 * regcache.h (readable_regcache): New class.
8376 (regcache): Inherit readable_regcache. Move some methods to
8378 * rl78-tdep.c (rl78_pseudo_register_read): Change
8379 parameter type to 'readable_regcache *'.
8380 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8381 (e500_pseudo_register_read): Change parameter type to
8382 'readable_regcache *'.
8383 (dfp_pseudo_register_read): Likewise.
8384 (vsx_pseudo_register_read): Likewise.
8385 (efpr_pseudo_register_read): Likewise.
8386 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8387 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8388 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8389 (sh64_pseudo_register_read): Likewise.
8390 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8391 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8392 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8393 (spu_pseudo_register_read): Likewise.
8394 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8395 (xtensa_pseudo_register_read): Likewise.
8397 2018-02-21 Yao Qi <yao.qi@linaro.org>
8399 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8400 (regcache::arch): Move it to reg_buffer::arch.
8401 (regcache::register_buffer): Likewise.
8402 (regcache::assert_regnum): Likewise.
8403 (regcache::num_raw_registers): Likewise.
8404 * regcache.h (reg_buffer): New class.
8405 (regcache): Inherit reg_buffer.
8407 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8409 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8410 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8412 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8414 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8416 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8418 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8419 (SFILES): Remove common/*.c files.
8420 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8421 * common/common.host: Add common reference.
8422 * configure.ac: Likewise.
8423 * configure: Regenerate.
8425 2018-02-16 Yao Qi <yao.qi@linaro.org>
8427 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8428 (block_initialize_namespace): Use new.
8429 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8430 (dwarf2_free_objfile): Use delete.
8431 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8432 (copy_type_recursive): Use new.
8433 * gdb_obstack.h (allocate_on_obstack): New.
8435 2018-02-15 Yao Qi <yao.qi@linaro.org>
8438 * inferior.c (exit_inferior_1): Reset inf->control.
8440 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8442 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8445 2018-02-14 Pedro Alves <palves@redhat.com>
8447 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8448 frame_cleanup_after_sniffer on exception.
8450 2018-02-14 Tom Tromey <tom@tromey.com>
8452 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8454 (solib_bfd_open): Make pathname const.
8455 * solib.c (solib_bfd_open): Make pathname const.
8456 * solib-spu.c (spu_bfd_fopen): Make name const.
8457 (spu_bfd_open): Make pathname const.
8458 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8459 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8461 2018-02-14 Tom Tromey <tom@tromey.com>
8463 * symfile.c (symfile_bfd_open): Update.
8464 * source.h (openp, source_full_path_of, find_and_open_source):
8465 Change argument type to unique_xmalloc_ptr.
8466 * source.c (openp): Take a unique_xmalloc_ptr.
8467 (source_full_path_of, find_and_open_source): Likewise.
8468 (open_source_file, symtab_to_fullname): Update.
8469 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8471 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8472 (exec_file_find): Update.
8473 * psymtab.c (psymtab_to_fullname): Update.
8474 * nto-tdep.h (nto_find_and_open_solib): Update.
8475 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8477 * exec.c (exec_file_attach): Update.
8478 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8479 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8481 2018-02-14 Tom Tromey <tom@tromey.com>
8483 * solib.c: Include source.h.
8484 * nto-tdep.c: Include source.h.
8485 * mi/mi-cmd-env.c: Include source.h.
8486 * infcmd.c: Include source.h.
8487 * exec.c: Include source.h.
8488 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8489 (add_path, directory_switch, source_path, init_source_path): Move
8491 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8492 (add_path, directory_switch, source_path, init_source_path):
8495 2018-02-14 Tom Tromey <tom@tromey.com>
8497 * solist.h (exec_file_find, solib_find): Return
8499 (solib_bfd_fopen): Take a const char *.
8500 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8501 (exec_file_find, solib_find): Likewise.
8502 (solib_bfd_fopen): Do not take ownership of "pathname".
8503 (solib_bfd_open): Use unique_xmalloc_ptr.
8504 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8505 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8506 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8507 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8509 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8511 * ada-lang.c (name_match_type_from_name): Remove reference to
8512 ada_name_for_lookup in function's documentation.
8513 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8515 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8517 * defs.h (enum openp_flags): New enum.
8518 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8519 Move to enum openp_flags.
8520 (openp_flags): New enum flags.
8521 (openp): Change parameter type to openp_flags.
8522 * source.c (openp): Change parameter type to openp_flags.
8523 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8524 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8526 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8528 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8531 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8533 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8535 (class dwarf2_queue_guard): ...the destructor of this new class.
8536 (dw2_do_instantiate_symtab): Create instance of the new class
8537 dwarf2_queue_guard, remove cleanup.
8539 2018-02-09 Tom Tromey <tom@tromey.com>
8541 * source.c (find_source_lines): Don't reference past the end of
8544 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8546 * remote.c (remote_btrace_maybe_reopen): Change error message.
8547 * btrace.c (btrace_enable): Likewise.
8548 (parse_xml_btrace): Likewise.
8549 (parse_xml_btrace_conf): Likewise.
8551 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8553 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8554 (linux_enable_pt, linux_enable_bts): Call
8555 diagnose_perf_event_open_fail.
8557 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8559 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8560 Remove parameter and change return type. Update callers. Move it.
8561 (linux_enable_bts, linux_enable_pt): Improve error message.
8562 (linux_enable_pt): Remove zero buffer size check.
8563 (linux_enable_btrace): Improve error messages. Remove NULL return
8566 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8568 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8569 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8570 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8571 (linux_supports_pt, linux_supports_btrace): Remove.
8572 (linux_enable_bts): Call cpu_supports_bts.
8573 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8574 * remote.c (remote_supports_btrace): Remove.
8575 (init_remote_ops): Remove remote_supports_btrace.
8576 * target-delegates.c: Regenerated.
8577 * target.c (target_supports_btrace): Remove.
8578 * target.h (target_ops) <to_supports_btrace>: Remove
8579 (target_supports_btrace): Remove.
8580 * x86-linux-nat.c (x86_linux_create_target): Remove
8581 linux_supports_btrace.
8583 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8585 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8587 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8588 exception and use message in own exception.
8590 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8592 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8593 (perf_event_pt_event_type): Use gdb_file_up.
8594 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8595 scoped_fd, and scoped_mmap.
8597 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8599 * common/scoped_mmap.h: New.
8600 * unittests/scoped_mmap-selftest.c: New.
8601 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8602 unittests/scoped_mmap-selftest.c.
8604 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8606 * common/scoped_fd.h: New.
8607 * unittests/scoped_fd-selftest.c: New.
8608 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8609 unittests/scoped_fd-selftest.c.
8611 2018-02-09 Tom Tromey <tom@tromey.com>
8613 * auto-load.c (auto_load_section_scripts): Use
8614 gdb::unique_xmalloc_ptr.
8616 2018-02-09 Tom Tromey <tom@tromey.com>
8618 * auto-load.c (execute_script_contents): Use std::string.
8620 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8622 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8623 Python function, rather than a new command.
8625 2018-02-08 Tom Tromey <tom@tromey.com>
8627 * solib.c (solib_find_1): Use std::string.
8628 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8630 2018-02-08 Tom Tromey <tom@tromey.com>
8632 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8634 2018-02-08 Tom Tromey <tom@tromey.com>
8636 * source.c (find_source_lines): Use gdb::def_vector.
8638 2018-02-08 Tom Tromey <tom@tromey.com>
8640 * macrocmd.c (struct temporary_macro_definition): New.
8641 (macro_define_command): Use temporary_macro_definition. Remove
8643 (free_macro_definition_ptr): Remove.
8645 2018-02-08 Tom Tromey <tom@tromey.com>
8647 * macroexp.c (maybe_expand): Use std::string.
8649 2018-02-08 Tom Tromey <tom@tromey.com>
8651 * macroexp.c (struct macro_buffer): Add initializers for some
8653 (init_buffer, init_shared_buffer, free_buffer)
8654 (free_buffer_return_text): Remove.
8655 (macro_buffer): New constructors.
8656 (~macro_buffer): New destructor.
8657 (macro_buffer::set_shared): New method.
8658 (macro_buffer::resize_buffer, macro_buffer::appendc)
8659 (macro_buffer::appendmem): Now methods, not free functions.
8660 (set_token, append_tokens_without_splicing, stringify)
8661 (macro_stringify): Update.
8662 (gather_arguments): Change return type. Remove argc_p argument,
8663 add args_ptr argument. Use std::vector.
8664 (substitute_args): Remove argc argument. Accept std::vector.
8665 (expand): Update. Use std::vector.
8666 (scan, macro_expand, macro_expand_next): Update.
8668 2018-02-08 Tom Tromey <tom@tromey.com>
8670 * symtab.c (default_collect_symbol_completion_matches_break_on):
8671 Use unique_xmalloc_ptr.
8672 * macroscope.h: (sal_macro_scope, user_macro_scope)
8673 (default_macro_scope): Return unique_xmalloc_ptr.
8674 * macroscope.c (sal_macro_scope, user_macro_scope)
8675 (default_macro_scope): Return unique_xmalloc_ptr.
8676 * macroexp.h (macro_expand, macro_expand_once): Return
8678 * macroexp.c (macro_expand, macro_expand_once): Return
8680 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8681 (info_macro_command, info_macros_command): Use
8683 * compile/compile-c-support.c (write_macro_definitions): Use
8685 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8687 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8689 * value.c (value_static_field): Assign field type instead of
8690 containing type when returning an optimized out value.
8692 2018-02-06 Yao Qi <yao.qi@linaro.org>
8694 * ft32-tdep.c (ft32_read_pc): Remove.
8695 (ft32_write_pc): Remove.
8696 (ft32_gdbarch_init): Update.
8697 * m32r-tdep.c (m32r_read_pc): Remove.
8698 (m32r_gdbarch_init): Update.
8699 * mep-tdep.c (mep_read_pc): Remove.
8700 (mep_gdbarch_init): Update.
8701 * microblaze-tdep.c (microblaze_write_pc): Remove.
8702 (microblaze_gdbarch_init): Update.
8703 * mn10300-tdep.c (mn10300_read_pc): Remove.
8704 (mn10300_write_pc): Remove.
8705 (mn10300_gdbarch_init): Update.
8706 * moxie-tdep.c (moxie_read_pc): Remove.
8707 (moxie_write_pc): Remove.
8708 (moxie_gdbarch_init): Update.
8710 2018-02-06 Yao Qi <yao.qi@linaro.org>
8712 * expprint.c (print_subexp_standard): Handle
8713 OP_F77_UNDETERMINED_ARGLIST.
8714 (dump_subexp_body_standard): Likewise.
8716 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8718 * target-descriptions.c (tdesc_element_visitor) Add empty
8720 (tdesc_type): Move make_gdb_type from here.
8721 (tdesc_type_builtin): Likewise.
8722 (tdesc_type_vector): Likewise.
8723 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8724 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8725 (make_gdb_type_union): Likewise.
8726 (make_gdb_type_flags): Likewise.
8727 (make_gdb_type_enum): Likewise.
8728 (make_gdb_type): New function.
8729 (tdesc_register_type): Use static make_gdb_type.
8731 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8733 * infcmd.c (default_print_one_register_info): Align natural-format
8734 column values consistently one under another.
8735 (pad_to_column): New function.
8737 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8739 * dwarf2read.c (dwarf2_physname): Move commment.
8741 2018-02-01 Leszek Swirski <leszeks@google.com>
8743 * varobj.c (varobj_formatted_print_options): Allow recursive
8744 pretty printing if pretty printing is enabled.
8746 2018-02-01 Leszek Swirski <leszeks@google.com>
8748 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8749 names after a structop as a filename.
8751 2018-02-01 Yao Qi <yao.qi@linaro.org>
8753 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8754 (arm_record_coproc_data_proc): Likewise.
8756 2018-02-01 Yao Qi <yao.qi@linaro.org>
8758 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8760 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8762 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8763 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8765 2018-01-31 Pedro Alves <palves@redhat.com>
8767 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8768 * inflow.c (child_terminal_save_inferior): Wrap reference to
8769 tcgetpgrp in HAVE_TERMIOS_H.
8770 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8772 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8773 always iterate over all inferiors.
8774 (gdbsim_cntrl_c): Adjust.
8775 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8777 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8779 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8780 index type is objfile-owned if the element type is as well.
8782 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8786 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8788 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8789 "features/s390x-linux64.c".
8790 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8791 s390_linux32 and s390x_linux64.
8792 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8794 * s390-tdep.c: Include "features/s390-linux32.c" and
8795 "features/s390x-linux64.c".
8796 (s390_tdesc_valid): Add check for tdesc_has_registers.
8797 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8798 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8799 tdesc_s390x_linux64.
8800 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8801 tdesc_s390x_linux64 to...
8802 * s390-tdep.h: ...here.
8804 2018-01-30 Pedro Alves <palves@redhat.com>
8807 * config.in, configure: Regenerate.
8808 * configure.ac: Check for getpgid.
8809 * go32-nat.c (go32_pass_ctrlc): New.
8810 (go32_target): Install it.
8811 * inf-child.c (inf_child_target): Install
8812 child_terminal_save_inferior, child_pass_ctrlc and
8814 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8815 (inf_ptrace_target): No longer install it.
8816 * infcmd.c (interrupt_target_1): Adjust.
8817 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8818 (child_interrupt): Declare.
8819 (inferior::terminal_state): New.
8820 * inflow.c (struct terminal_info): Update comments.
8821 (inferior_process_group): Delete.
8822 (terminal_is_ours): Delete.
8823 (gdb_tty_state): New.
8824 (child_terminal_init): Adjust.
8825 (is_gdb_terminal, sharing_input_terminal_1)
8826 (sharing_input_terminal): New functions.
8827 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8828 Set the process's actual process group in the foreground if
8829 possible. Handle is_ours_for_output/is_ours distinction. Don't
8830 mark terminal as the inferior's if not sharing GDB's terminal.
8831 Don't check attach_flag.
8832 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8833 pass down a target_terminal_state.
8834 (child_terminal_save_inferior): New, factored out from ...
8835 (child_terminal_ours_1): ... this. Handle
8836 target_terminal_state::is_ours_for_output.
8837 (child_interrupt, child_pass_ctrlc): New.
8838 (inflow_inferior_exit): Clear the inferior's terminal_state.
8839 (copy_terminal_info): Copy the inferior's terminal state.
8840 (_initialize_inflow): Remove reference to terminal_is_ours.
8841 * inflow.h (inferior_process_group): Delete.
8842 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8843 * procfs.c (procfs_target): Don't install procfs_interrupt.
8844 (procfs_interrupt): Delete.
8845 * remote.c (remote_serial_quit_handler): Adjust.
8846 (remote_interrupt): Remove ptid parameter. Adjust.
8847 * target-delegates.c: Regenerate.
8848 * target.c: Include "terminal.h".
8849 (target_terminal::terminal_state): Rename to ...
8850 (target_terminal::m_terminal_state): ... this.
8851 (target_terminal::init): Adjust.
8852 (target_terminal::inferior): Adjust to per-inferior
8854 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8855 (target_terminal::ours, target_terminal::ours_for_output): Use
8856 target_terminal_is_ours_kind.
8857 (target_interrupt): Remove ptid parameter. Adjust.
8858 (default_target_pass_ctrlc): Adjust.
8859 * target.h (target_ops::to_terminal_save_inferior): New field.
8860 (target_ops::to_interrupt): Remove ptid_t parameter.
8861 (target_interrupt): Remove ptid_t parameter. Update comment.
8862 (target_pass_ctrlc): Update comment.
8863 * target/target.h (target_terminal_state): New scoped enum,
8865 (target_terminal::terminal_state): ... here.
8866 (target_terminal::inferior): Update comments.
8867 (target_terminal::restore_inferior): New.
8868 (target_terminal::is_inferior, target_terminal::is_ours)
8869 (target_terminal::is_ours_for_output): Adjust.
8870 (target_terminal::scoped_restore_terminal_state): Adjust to
8871 rename, and call restore_inferior() instead of inferior().
8872 (target_terminal::scoped_restore_terminal_state::m_state): Change
8874 (target_terminal::terminal_state): Rename to ...
8875 (target_terminal::m_terminal_state): ... this and change type.
8877 2018-01-30 Pedro Alves <palves@redhat.com>
8879 * linux-nat.c (wait_for_signal): New function.
8880 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8882 (async_terminal_is_ours)
8883 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8884 (linux_nat_add_target): Don't override
8885 to_terminal_inferior/to_terminal_ours.
8887 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8889 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8891 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8893 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8894 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8895 dwarf2_per_objfile_free here.
8896 (dwarf2_per_objfile_free): Remove.
8897 (_initialize_dwarf2_read): Don't register
8898 dwarf2_per_objfile_free as a registry cleanup.
8900 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8902 Avoid compilation errors in MinGW native builds
8904 The error is triggered by including python-internal.h, and the
8907 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8908 from build-gnulib/import/math.h:27,
8909 from d:/usr/Python26/include/pyport.h:235,
8910 from d:/usr/Python26/include/Python.h:58,
8911 from python/python-internal.h:94,
8912 from python/py-arch.c:24:
8913 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8917 This happens because Python headers define 'hypot' to expand t
8918 '_hypot' in the Windows builds.
8919 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8920 'hypoth'. This avoids a compilation error.
8922 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8924 * MAINTAINERS (Write After Approval): Fix ordering.
8926 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8928 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8930 2018-01-26 Alan Modra <amodra@gmail.com>
8932 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8933 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8934 Remove nop. Make const. Comment.
8935 (powerpc32_plt_stub_so_2): New.
8936 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8937 Correct count. Update uses.
8938 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8939 Move common code reading PLT entry word. Correct
8940 powerpc32_plt_stub PLT address calculation.
8941 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8942 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8943 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8944 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8945 (ppc64_standard_linkage8): Likewise.
8946 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8947 Correct insns description.
8948 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8950 2018-01-24 Pedro Alves <palves@redhat.com>
8952 GCC PR libstdc++/83906
8953 * gdbtypes.c (operator==(const dynamic_prop &,
8954 const dynamic_prop &)): New.
8955 (operator==(const range_bounds &, const range_bounds &)): New.
8956 (check_types_equal): Use them instead of memcmp.
8957 * gdbtypes.h (operator==(const dynamic_prop &,
8958 const dynamic_prop &)): Declare.
8959 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8960 (operator==(const range_bounds &, const range_bounds &)): Declare.
8961 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8963 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8965 * s390-linux-tdep.c (s390_record_address_mask)
8966 (s390_record_calc_disp_common, s390_record_calc_disp)
8967 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8968 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8969 (s390_process_record): Move to s390-tdep.c.
8970 (s390_linux_init_abi_any): Adjust.
8971 * s390-tdep.c (s390_record_address_mask)
8972 (s390_record_calc_disp_common, s390_record_calc_disp)
8973 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8974 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8975 (s390_process_record): Moved from s390-linux-tdep.c
8976 (s390_gdbarch_init): Adjust.
8978 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8980 * s390-linux-nat.c (s390-tdep.h): New include.
8981 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8982 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8983 (ALLDEPFILES): Add s390-tdep.c.
8984 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8985 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8986 * s390-tdep.h: ...this. New file.
8987 * s390-linux-tdep.c (s390-tdep.h): New include.
8988 (_initialize_s390_tdep): Rename to...
8989 (_initialize_s390_linux_tdep): ...this and adjust.
8990 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8991 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8993 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8994 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8995 (s390_is_partial_instruction, s390_software_single_step)
8996 (is_non_branch_ril, s390_displaced_step_copy_insn)
8997 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8998 (s390_prologue_data, s390_addr, s390_store, s390_load)
8999 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9000 (s390_register_call_saved, s390_guess_tracepoint_registers)
9001 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9002 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9003 (s390_pseudo_register_name, s390_pseudo_register_type)
9004 (s390_pseudo_register_read, s390_pseudo_register_write)
9005 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9006 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9007 (s390_addr_bits_remove, s390_address_class_type_flags)
9008 (s390_address_class_type_flags_to_name)
9009 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9010 (s390_function_arg_float, s390_function_arg_vector)
9011 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9012 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9013 (s390_frame_align, s390_register_return_value, s390_return_value)
9014 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9015 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9016 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9017 (s390_trad_frame_prev_register, s390_unwind_cache)
9018 (s390_prologue_frame_unwind_cache)
9019 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9020 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9021 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9022 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9023 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9024 (s390_frame_base_address, s390_local_base_address)
9025 (s390_frame_base, s390_gcc_target_options)
9026 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9027 (s390_validate_reg_range, s390_tdesc_valid)
9028 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9029 * s390-tdep.c: ...this. New file.
9031 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9033 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9034 (s390_process_record, s390_gdbarch_tdep_alloc)
9035 (s390_linux_init_abi_any): Use/set new hook.
9037 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9039 * s390-linux-tdep.c (osabi.h): New include.
9040 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9041 (s390_linux_init_abi_any): New functions.
9042 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9044 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9046 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9047 tdesc_has_registers check
9049 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9051 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9052 (s390_validate_reg_range): New macro.
9053 (s390_gdbarch_init): Adjust.
9055 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9057 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9058 (s390_gdbarch_tdep_alloc): Adjust.
9059 (s390_gdbarch_init): Adjust.
9061 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9063 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9064 <have_tdb>: Change type to bool.
9065 (s390_gdbarch_tdep_alloc): Adjust.
9066 (s390_gdbarch_init): Adjust.
9068 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9070 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9071 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9072 (s390_gdbarch_tdep_alloc): New function.
9073 (s390_gdbarch_init): Allocate tdep at start and use its fields
9074 instead of separate variables.
9076 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9078 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9079 when looking for cached gdbarch and add comment for remaining.
9081 2018-01-22 Pedro Alves <palves@redhat.com>
9082 Sergio Durigan Junior <sergiodj@redhat.com>
9084 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9087 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9089 * MAINTAINERS: Update my company e-mail address.
9091 2018-01-22 Yao Qi <yao.qi@linaro.org>
9093 * regcache.c (cooked_write_test): New function.
9094 (_initialize_regcache): Register the test.
9096 2018-01-22 Yao Qi <yao.qi@linaro.org>
9098 * ia64-tdep.c (ia64_pseudo_register_read): Call
9099 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9100 * m32c-tdep.c (m32c_cat_read): Likewise.
9101 (m32c_r3r2r1r0_read): Likewise.
9102 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9103 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9105 2018-01-22 Yao Qi <yao.qi@linaro.org>
9107 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9108 method raw_read instead of regcache_raw_read.
9109 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9110 * arm-tdep.c (arm_neon_quad_read): Likewise.
9111 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9112 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9113 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9114 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9115 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9116 (i386_pseudo_register_read_into_value): Likewise.
9117 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9118 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9119 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9120 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9121 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9122 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9123 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9124 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9125 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9127 2018-01-22 Yao Qi <yao.qi@linaro.org>
9129 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9130 * configure.tgt: Remove target mt.
9131 * mt-tdep.c: Remove.
9132 * regcache.c (cooked_read_test): Remove the check for mt.
9134 2018-01-22 Yao Qi <yao.qi@linaro.org>
9136 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9137 instead of gdbarch_pseudo_register_read_value.
9139 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9141 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9144 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9146 * linespec.c (create_sals_line_offset): Remove code that preserved
9147 the symtab_and_line's line number.
9149 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9151 * varobj.c (varobj_create): Don't set valid_block when creating a
9154 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9156 * varobj.c (varobj_create): Remove out of date comment.
9158 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9161 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9162 updating innermost block.
9163 * parse.c (innermost_block_tracker::update): Take extra type
9164 parameter, and check types match before updating innermost block.
9165 (write_dollar_variable): Update innermost block for registers.
9166 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9167 (innermost_block_tracker::innermost_block_tracker): Initialise
9169 (innermost_block_tracker::reset): Take type parameter.
9170 (innermost_block_tracker::update): Take type parameter, and pass
9171 type through as needed.
9172 (innermost_block_tracker::m_types): New member.
9173 * varobj.c (varobj_create): Pass type when reseting innermost
9176 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9178 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9179 * ada-lang.c (resolve_subexp): Likewise.
9180 * breakpoint.c (set_breakpoint_condition) Likewise.
9181 (watch_command_1) Likewise.
9182 * c-exp.y (variable): Likewise.
9183 * d-exp.y (PrimaryExpression): Likewise.
9184 * f-exp.y (variable): Likewise.
9185 * go-exp.y (variable): Likewise.
9186 * m2-exp.y (variable): Likewise.
9187 * objfiles.c (objfile::~objfile): Likewise.
9188 * p-exp.y (variable): Likewise.
9189 * parse.c (innermost_block): Change type.
9190 * parser-defs.h (class innermost_block_tracker): New.
9191 (innermost_block): Change to innermost_block_tracker.
9192 * printcmd.c (display_command): Switch to innermost_block API.
9193 (do_one_display): Likewise.
9194 * rust-exp.y (do_one_display): Likewise.
9195 * symfile.c (clear_symtab_users): Likewise.
9196 * varobj.c (varobj_create): Switch to innermost_block API, replace
9197 use of innermost_block with block stored on varobj object.
9199 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9201 * expression.h (innermost_block): Remove declaration.
9202 * varobj.c: Add 'parser-defs.h' include.
9204 2018-01-19 Tom Tromey <tom@tromey.com>
9206 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9207 symbols in the static and global blocks.
9209 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9211 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9212 gdb_ptrace.h, and move including gdb_wait.h ...
9213 * nat/linux-ptrace.h: ... to here.
9215 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9217 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9218 inf_ptrace_detach_success.
9219 (inf_ptrace_detach_success): Add inferior parameter, use it
9220 instead of inferior_ptid, pass it to detach_inferior.
9221 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9223 * inferior.c (detach_inferior): Add overload that takes an
9225 * inferior.h (detach_inferior): Likewise.
9226 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9227 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9228 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9230 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9232 * target.h (struct target_ops) <to_detach>: Add inferior
9234 (target_detach): Likewise.
9235 * target.c (dispose_inferior): Pass inferior down.
9236 (target_detach): Pass inferior down. Assert that it is equal to
9237 the current inferior.
9238 * aix-thread.c (aix_thread_detach): Pass inferior down.
9239 * corefile.c (core_file_command): Pass current_inferior() down.
9240 * corelow.c (core_detach): Add inferior parameter.
9241 * darwin-nat.c (darwin_detach): Likewise.
9242 * gnu-nat.c (gnu_detach): Likewise.
9243 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9244 * infcmd.c (detach_command): Pass current_inferior() down to
9246 * infrun.c (follow_fork_inferior): Pass parent_inf to
9248 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9250 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9251 * linux-thread-db.c (thread_db_detach): Likewise.
9252 * nto-procfs.c (procfs_detach): Likewise.
9253 * procfs.c (procfs_detach): Likewise.
9254 * record.c (record_detach): Likewise.
9255 * record.h (struct inferior): Forward-declare.
9256 (record_detach): Add inferior parameter.
9257 * remote-sim.c (gdbsim_detach): Likewise.
9258 * remote.c (remote_detach_1): Likewise.
9259 (remote_detach): Likewise.
9260 (extended_remote_detach): Likewise.
9261 * sol-thread.c (sol_thread_detach): Likewise.
9262 * target-debug.h (target_debug_print_inferior_p): New macro.
9263 * target-delegates.c: Re-generate.
9264 * top.c (kill_or_detach): Pass inferior down to target_detach.
9265 * windows-nat.c (windows_detach): Add inferior parameter.
9267 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9269 * target.h (struct target_ops) <to_detach>: Remove args
9271 (target_detach): Likewise.
9272 * target.c (dispose_inferior): Adjust.
9273 (target_detach): Remove args parameter, adjust.
9274 * aix-thread.c (aix_thread_detach): Adjust.
9275 * corefile.c (core_file_command): Adjust.
9276 * corelow.c (core_detach): Adjust.
9277 * darwin-nat.c (darwin_detach): Adjust.
9278 * gnu-nat.c (gnu_detach): Adjust.
9279 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9280 * infcmd.c (detach_command): Adjust
9281 * infrun.c (follow_fork_inferior): Adjust.
9282 (handle_vfork_child_exec_or_exit): Adjust.
9283 * linux-fork.c (linux_fork_detach): Remove args parameter.
9284 * linux-fork.h (linux_fork_detach): Likewise.
9285 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9286 * linux-thread-db.c (thread_db_detach): Likewise.
9287 * nto-procfs.c (procfs_detach): Likewise.
9288 * procfs.c (procfs_detach): Likewise.
9289 (do_detach): Remove signo parameter.
9290 * record.c (record_detach): Remove args parameter.
9291 * record.h (record_detach): Likewise.
9292 * remote-sim.c (gdbsim_detach): Likewise.
9293 * remote.c (remote_detach_1): Likewise.
9294 (remote_detach): Likewise.
9295 (extended_remote_detach): Likewise.
9296 * sol-thread.c (sol_thread_detach): Likewise.
9297 * target-delegates.c: Re-generate.
9298 * top.c (struct qt_args) <args>: Remove field.
9299 (kill_or_detach): Don't pass args.
9300 (quit_force): Don't set args.
9301 * windows-nat.c (windows_detach): Remove args parameter.
9303 2018-01-19 Yao Qi <yao.qi@linaro.org>
9305 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9306 (arm_linux_init_abi): Install it.
9308 2018-01-19 Yao Qi <yao.qi@linaro.org>
9310 * osabi.c (gdb_osabi_names): Extend the regexp for
9311 arm-linux-gnueabihf.
9313 2018-01-18 Yao Qi <yao.qi@linaro.org>
9315 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9317 (abbrev_table::add_abbrev): Update.
9318 (abbrev_table::lookup_abbrev): Update.
9320 2018-01-18 Yao Qi <yao.qi@linaro.org>
9322 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9324 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9326 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9329 2018-01-17 Tom Tromey <tom@tromey.com>
9331 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9333 2018-01-17 Tom Tromey <tom@tromey.com>
9335 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9336 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9337 (create_array_type_with_stride): Update.
9338 * dwarf2read.c (set_die_type): Update.
9340 2018-01-17 Tom Tromey <tom@tromey.com>
9342 * dwarf2read.c (delayed_method_info): Remove typedef.
9343 (dwarf2_cu::method_info): Now a std::vector.
9344 (add_to_method_list): Update.
9345 (free_delayed_list): Remove.
9346 (compute_delayed_physnames): Update.
9347 (process_full_comp_unit, process_full_type_unit): Clear the method
9348 list. Remove cleanups.
9349 (psymtab_include_file_name): Add name_holder parameter. Use
9351 (dwarf_decode_lines): Update.
9353 2018-01-17 Tom Tromey <tom@tromey.com>
9354 Simon Marchi <simon.marchi@ericsson.com>
9356 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9357 (dwarf2_per_objfile::free_cached_comp_units)
9358 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9359 (init_cutu_and_read_dies_no_follow): Update.
9360 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9361 (dwarf2_cu::~dwarf2_cu): New.
9362 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9363 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9365 2018-01-17 Tom Tromey <tom@tromey.com>
9366 Simon Marchi <simon.marchi@ericsson.com>
9368 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9369 (struct die_reader_specs) <abbrev_table>: New member.
9370 (struct abbrev_table): Add constructor.
9371 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9372 <abbrev_obstack>: Now an auto_obstack.
9373 (abbrev_table_up): New typedef.
9374 (init_cu_die_reader): Add abbrev_table parameter.
9375 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9376 Add result_dwo_abbrev_table.
9377 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9378 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9380 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9382 (skip_children): Update.
9383 (abbrev_table::alloc_abbrev): Rename from
9384 abbrev_table_alloc_abbrev.
9385 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9386 (abbrev_table::lookup_abbrev): Rename from
9387 abbrev_table_lookup_abbrev.
9388 (abbrev_table_read_table): Return abbrev_table_up.
9389 (abbrev_table_free, abbrev_table_free_cleanup)
9390 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9391 (load_partial_dies): Update.
9393 2018-01-17 Tom Tromey <tom@tromey.com>
9395 * dwarf2read.c (dwarf2_compute_name): Update comment.
9396 (read_func_scope, read_variable): Update.
9397 (new_symbol): Remove.
9398 (new_symbol_full): Rename to new_symbol.
9400 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9403 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9404 a warning instead of throwing an error, set section size to 0 and return
9406 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9408 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9410 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9412 (linux_ptrace_attach_fail_reason_string): Likewise.
9413 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9415 (linux_ptrace_attach_fail_reason_string): Likewise.
9416 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9418 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9420 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9422 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9425 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9426 checking for fs_base/gs_base fields in struct user_regs_struct.
9427 * configure: Regenerate.
9429 2018-01-17 Yao Qi <yao.qi@linaro.org>
9431 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9433 (aarch64_linux_init_abi): Install it to gdbarch hook
9436 2018-01-15 Pedro Alves <palves@redhat.com>
9438 * common/signals-state-save-restore.c
9439 (save_original_signals_state): Fix typos.
9441 2017-01-12 Tom Tromey <tom@tromey.com>
9442 Sergio Durigan Junior <sergiodj@redhat.com>
9444 * Makefile.in (install-only): Install gdb-add-index.
9446 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9448 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9450 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9452 * infrun.c (keep_going_pass_signal): Clear step-over info when
9453 insert_breakpoints fails.
9455 2018-01-11 Pedro Alves <palves@redhat.com>
9458 * infrun.c (resume): Rename to ...
9459 (resume_1): ... this.
9460 (resume): Reimplement as wrapper around resume_1.
9462 2018-01-11 Pedro Alves <palves@redhat.com>
9465 * remote.c (remote_parse_stop_reply): Default to the last-set
9466 general thread instead of to 'magic_null_ptid'.
9468 2018-01-10 Pedro Alves <palves@redhat.com>
9470 * language.h (language_get_symbol_name_matcher): Rename ...
9471 (get_symbol_name_matcher): ... this.
9472 * language.c (language_get_symbol_name_matcher): Ditto.
9473 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9476 2018-01-10 Pedro Alves <palves@redhat.com>
9480 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9481 Adjust to use language_get_symbol_name_matcher instead of
9482 language_defn::la_get_symbol_name_matcher.
9483 * language.c (language_get_symbol_name_matcher): If in Ada mode
9484 and the lookup name is a verbatim match, return Ada's matcher.
9485 * language.h (language_get_symbol_name_matcher): Adjust comment.
9486 (ada_lookup_name_info::verbatim_p):: New method.
9488 2018-01-10 Pedro Alves <palves@redhat.com>
9491 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9492 minsym's language is language_auto or language_cplus, pass down
9493 language_ada instead.
9494 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9496 2018-01-10 Pedro Alves <palves@redhat.com>
9499 * minsyms.c (linkage_name_str): New function.
9500 (iterate_over_minimal_symbols): Use it.
9502 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9504 * NEWS: Document that 'info proc' now works on FreeBSD.
9506 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9508 * configure.ac: Check for kinfo_getfile in libutil.
9509 * configure: Regenerate.
9510 * config.in: Regenerate.
9511 * fbsd-nat.c: Include "fbsd-tdep.h".
9512 (fbsd_fetch_cmdline): New.
9513 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9514 rather than calling error.
9515 (fbsd_info_proc): New.
9516 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9517 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9518 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9520 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9522 * fbsd-nat.c (struct free_deleter): Remove.
9523 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9525 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9527 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9528 NULL for an empty pathname.
9530 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9532 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9533 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9534 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9535 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9536 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9537 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9538 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9539 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9540 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9541 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9542 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9543 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9544 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9545 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9546 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9548 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9550 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9551 (gnu_xfer_auxv): New function.
9552 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9555 2018-01-08 Yao Qi <yao.qi@linaro.org>
9556 Simon Marchi <simon.marchi@ericsson.com>
9558 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9560 (COMMON_OBS): Remove selftest.o.
9561 * configure.ac: Append selftest-arch.c and common/selftest.c to
9562 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9563 * configure: Re-generated.
9564 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9566 (maintenance_info_selftests): Likewise.
9568 2018-01-08 Xavier Roirand <roirand@adacore.com>
9570 * ada-valprint.c (val_print_packed_array_elements): Use
9571 proper number of elements when printing an array indexed
9572 by an enumeration type.
9574 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9576 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9577 (dw2_get_file_names_reader): Adjust.
9578 (lookup_dwo_signatured_type): Adjust.
9579 (lookup_dwp_signatured_type): Adjust.
9580 (lookup_signatured_type): Adjust.
9581 (create_type_unit_group): Adjust.
9582 (get_type_unit_group): Adjust.
9583 (process_psymtab_comp_unit_reader): Adjust.
9584 (build_type_psymtabs_reader): Adjust.
9585 (scan_partial_symbols): Adjust.
9586 (add_partial_symbol): Adjust.
9587 (add_partial_subprogram): Adjust.
9588 (peek_die_abbrev): Adjust.
9589 (fixup_go_packaging): Adjust.
9590 (process_imported_unit_die): Adjust.
9591 (dwarf2_compute_name): Adjust.
9592 (dwarf2_physname): Adjust.
9593 (read_import_statement): Adjust.
9594 (handle_DW_AT_stmt_list): Adjust.
9595 (read_file_scope): Adjust.
9596 (read_func_scope): Adjust.
9597 (read_lexical_block_scope): Adjust.
9598 (read_call_site_scope): Adjust.
9599 (read_variable): Adjust.
9600 (dwarf2_rnglists_process): Adjust.
9601 (dwarf2_ranges_process): Adjust.
9602 (dwarf2_ranges_read): Adjust.
9603 (dwarf2_get_pc_bounds): Adjust.
9604 (dwarf2_record_block_ranges): Adjust.
9605 (dwarf2_add_field): Adjust.
9606 (dwarf2_add_member_fn): Adjust.
9607 (read_structure_type): Adjust.
9608 (process_structure_scope): Adjust.
9609 (read_enumeration_type): Adjust.
9610 (read_array_type): Adjust.
9611 (mark_common_block_symbol_computed): Adjust.
9612 (read_common_block): Adjust.
9613 (read_namespace_type): Adjust.
9614 (read_namespace): Adjust.
9615 (read_module_type): Adjust.
9616 (read_tag_pointer_type): Adjust.
9617 (read_tag_ptr_to_member_type): Adjust.
9618 (read_tag_string_type): Adjust.
9619 (read_subroutine_type): Adjust.
9620 (read_typedef): Adjust.
9621 (read_base_type): Adjust.
9622 (attr_to_dynamic_prop): Adjust.
9623 (read_subrange_type): Adjust.
9624 (read_unspecified_type): Adjust.
9625 (dwarf2_read_abbrevs): Adjust.
9626 (load_partial_dies): Adjust.
9627 (read_partial_die): Adjust.
9628 (find_partial_die): Adjust.
9629 (guess_partial_die_structure_name): Adjust.
9630 (fixup_partial_die): Adjust.
9631 (read_attribute_value): Adjust.
9632 (read_addr_index): Adjust.
9633 (read_addr_index_from_leb128): Adjust.
9634 (read_str_index): Adjust.
9635 (dwarf2_string_attr): Adjust.
9636 (get_debug_line_section): Adjust.
9637 (dwarf_decode_line_header): Adjust.
9638 (lnp_state_machine::check_line_address): Adjust.
9639 (dwarf_decode_lines_1): Adjust.
9640 (dwarf_decode_lines): Adjust.
9641 (dwarf2_start_symtab): Adjust.
9642 (var_decode_location): Adjust.
9643 (new_symbol_full): Adjust.
9644 (dwarf2_const_value_data): Adjust.
9645 (dwarf2_const_value_attr): Adjust.
9646 (dwarf2_const_value): Adjust.
9648 (die_containing_type): Adjust.
9649 (build_error_marker_type): Adjust.
9650 (lookup_die_type): Adjust.
9651 (guess_full_die_structure_name): Adjust.
9652 (anonymous_struct_prefix): Adjust.
9653 (determine_prefix): Adjust.
9654 (dwarf2_name): Adjust.
9655 (follow_die_ref_or_sig): Adjust.
9656 (follow_die_offset): Adjust.
9657 (follow_die_ref): Adjust.
9658 (follow_die_sig_1): Adjust.
9659 (follow_die_sig): Adjust.
9660 (get_signatured_type): Adjust.
9661 (get_DW_AT_signature_type): Adjust.
9662 (decode_locdesc): Adjust.
9663 (dwarf_decode_macros): Adjust.
9664 (cu_debug_loc_section): Adjust.
9665 (fill_in_loclist_baton): Adjust.
9666 (dwarf2_symbol_mark_computed): Adjust.
9667 (init_one_comp_unit): Don't assign
9668 dwarf2_cu::dwarf2_per_objfile.
9669 (set_die_type): Adjust.
9671 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9673 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9674 <dwarf2_per_objfile>: New field.
9675 (dwarf2_per_objfile): Remove global.
9676 (get_dwarf2_per_objfile): New function.
9677 (set_dwarf2_per_objfile): New function.
9678 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9680 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9681 (read_abbrev_offset): Likewise.
9682 (read_indirect_string): Likewise.
9683 (read_indirect_line_string): Likewise.
9684 (read_indirect_string_at_offset): Likewise.
9685 (read_indirect_string_from_dwz): Likewise.
9686 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9688 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9689 (create_all_comp_units): Change objfile parameter to
9691 (create_all_type_units): Likewise.
9692 (process_queue): Add dwarf2_per_objfile parameter.
9693 (read_and_check_comp_unit_head): Likewise.
9694 (lookup_dwo_unit_in_dwp): Likewise.
9695 (get_dwp_file): Likewise.
9696 (process_cu_includes): Likewise.
9697 (struct free_dwo_file_cleanup_data): New struct.
9698 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9699 set_dwarf2_per_objfile.
9700 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9701 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9702 context, adjust calls.
9703 (dw2_instantiate_symtab): Likewise.
9704 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9705 (dw2_get_cu): Likewise.
9706 (create_cu_from_index_list): Change objfile parameter to
9708 (create_cus_from_index_list): Get dwarf2_per_objfile from
9709 context, adjust calls.
9710 (create_cus_from_index): Likewise.
9711 (create_signatured_type_table_from_index): Change objfile
9712 parameter to dwarf2_per_objfile.
9713 (create_signatured_type_table_from_debug_names): Change objfile
9714 parameter to dwarf2_per_objfile.
9715 (create_addrmap_from_index): Likewise.
9716 (create_addrmap_from_aranges): Likewise.
9717 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9718 (dw2_setup): Remove.
9719 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9721 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9722 get_dwarf2_per_objfile.
9723 (dw2_forget_cached_source_info): Likewise.
9724 (dw2_map_symtabs_matching_filename): Likewise.
9725 (struct dw2_symtab_iterator) <index>: Remove.
9726 <dwarf2_per_objfile>: New field.
9727 (dw2_symtab_iter_init): Replace index parameter with
9729 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9730 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9731 (dw2_print_stats): Likewise.
9732 (dw2_dump): Likewise.
9733 (dw2_expand_symtabs_for_function): Likewise.
9734 (dw2_expand_all_symtabs): Likewise.
9735 (dw2_expand_symtabs_with_fullname): Likewise.
9736 (dw2_expand_marked_cus): Replace index and objfile parameters
9737 with dwarf2_per_objfile.
9738 (dw_expand_symtabs_matching_file_matcher): Add
9739 dwarf2_per_objfile parameter and adjust calls.
9740 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9742 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9743 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9745 (create_cus_from_debug_names_list): Replace objfile parameter
9746 with dwarf2_per_objfile and adjust calls.
9747 (create_cus_from_debug_names): Likewise.
9748 (dwarf2_read_debug_names): Likewise.
9749 (mapped_debug_names::namei_to_name): Adjust call.
9750 (dw2_debug_names_iterator::next): Likewise.
9751 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9752 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9753 (dw2_debug_names_dump): Likewise.
9754 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9755 (dw2_debug_names_expand_symtabs_matching): Likewise.
9756 (dwarf2_initialize_objfile): Likewise.
9757 (dwarf2_build_psymtabs): Likewise.
9758 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9760 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9761 (read_and_check_comp_unit_head): Likewise.
9762 (read_abbrev_offset): Likewise.
9763 (create_debug_type_hash_table): Likewise.
9764 (create_debug_types_hash_table): Likewise.
9765 (create_all_type_units): Replace objfile parameter with
9767 (add_type_unit): Add dwarf2_per_objfile parameter.
9768 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9769 with dwarf2_per_objfile.
9770 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9771 (lookup_dwp_signatured_type): Likewise.
9772 (lookup_signatured_type): Likewise.
9773 (read_cutu_die_from_dwo): Likewise.
9774 (init_tu_and_read_dwo_dies): Likewise.
9775 (init_cutu_and_read_dies): Likewise.
9776 (init_cutu_and_read_dies_no_follow): Likewise.
9777 (allocate_type_unit_groups_table): Add objfile parameter.
9778 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9779 (get_type_unit_group): Likewise.
9780 (process_psymtab_comp_unit): Update call.
9781 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9782 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9783 (print_tu_stats): Likewise.
9784 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9786 (build_type_psymtabs): Change objfile parameter to
9788 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9789 passed in void* parameter.
9790 (process_skeletonless_type_units): Change objfile parameter to
9792 (set_partial_user): Likewise.
9793 (dwarf2_build_psymtabs_hard): Likewise.
9794 (read_comp_units_from_section): Likewise.
9795 (create_all_comp_units): Likewise.
9796 (scan_partial_symbols): Update calls.
9797 (add_partial_symbol): Likewise.
9798 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9799 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9800 (process_queue): Add dwarf2_per_objfile parameter.
9801 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9802 (compute_compunit_symtab_includes): Likewise.
9803 (process_cu_includes): Add dwarf2_per_objfile parameter.
9804 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9805 (process_full_type_unit): Likewise.
9806 (process_imported_unit_die): Update call.
9807 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9808 (read_file_scope): Likewise.
9809 (allocate_dwo_file_hash_table): Add objfile parameter.
9810 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9811 (create_cus_hash_table): Likewise.
9812 (create_dwp_hash_table): Likewise.
9813 (create_dwo_unit_in_dwp_v1): Likewise.
9814 (create_dwp_v2_section): Likewise.
9815 (create_dwo_unit_in_dwp_v2): Likewise.
9816 (lookup_dwo_unit_in_dwp): Likewise.
9817 (try_open_dwop_file): Likewise.
9818 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9819 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9820 cleanup to include a reference to dwarf2_per_objfile.
9821 (open_dwp_file): Add dwarf2_per_objfile parameter.
9822 (open_and_init_dwp_file): Likewise.
9823 (get_dwp_file): Likewise.
9824 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9825 (queue_and_load_all_dwo_tus): Update call.
9826 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9828 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9829 (dwarf2_ranges_process): Likewise.
9830 (dwarf2_get_pc_bounds): Likewise.
9831 (mark_common_block_symbol_computed): Likewise.
9832 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9833 (dwarf2_read_abbrevs): Update call.
9834 (read_partial_die): Use dwarf2_per_objfile from cu.
9835 (find_partial_die): Likewise.
9836 (fixup_partial_die): Likewise.
9837 (read_attribute_value): Likewise.
9838 (read_indirect_string_at_offset_from): Add objfile parameter.
9839 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9841 (read_indirect_string_from_dwz): Add objfile parameter.
9842 (read_indirect_string): Add objfile parameter.
9843 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9844 (read_addr_index): Use dwarf2_per_objfile from cu.
9845 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9847 (read_str_index): Use dwarf2_per_objfile from cu.
9848 (get_debug_line_section): Likewise.
9849 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9850 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9851 (new_symbol_full): Use dwarf2_per_objfile from cu.
9852 (build_error_marker_type): Likewise.
9853 (lookup_die_type): Likewise.
9854 (determine_prefix): Likewise.
9855 (follow_die_offset): Likewise.
9856 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9857 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9858 (dwarf2_fetch_die_type_sect_off): Likewise.
9859 (dwarf2_get_die_type): Likewise.
9860 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9861 (get_signatured_type): Likewise.
9862 (get_DW_AT_signature_type): Likewise.
9863 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9864 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9865 (cu_debug_loc_section): Likewise.
9866 (fill_in_loclist_baton): Likewise.
9867 (dwarf2_symbol_mark_computed): Likewise.
9868 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9870 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9872 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9873 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9874 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9875 (set_die_type): Use dwarf2_free_objfile from cu.
9876 (get_die_type_at_offset): Likewise.
9877 (dwarf2_per_objfile_free): Don't assign global variable.
9878 (debug_names) <constructor>: Add dwarf2_per_objfile
9879 parameter, update m_debugstrlookup construction.
9880 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9882 <m_dwarf2_per_objfile>: New field.
9883 <lookup>: Use m_dwarf2_per_objfile.
9884 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9885 (psyms_seen_size): Likewise.
9886 (write_gdbindex): Replace objfile parameter with
9888 (write_debug_names): Likewise.
9889 (write_psymtabs_to_index): Likewise.
9890 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9893 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9895 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9896 <dwarf2_per_objfile>: New field.
9897 (struct dwarf2_per_cu_data) <objfile>: Remove.
9898 <dwarf2_per_objfile>: New field.
9899 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9901 (create_signatured_type_table_from_index): Likewise.
9902 (create_debug_type_hash_table): Likewise.
9903 (fill_in_sig_entry_from_dwo_entry): Likewise.
9904 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9905 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9907 (create_partial_symtab): Access objfile through
9909 (process_psymtab_comp_unit_reader): Likewise.
9910 (read_comp_units_from_section): Likewise.
9911 (scan_partial_symbols): Likewise.
9912 (add_partial_symbol): Likewise.
9913 (add_partial_subprogram): Likewise.
9914 (peek_die_abbrev): Likewise.
9915 (fixup_go_packaging): Likewise.
9916 (process_full_comp_unit): Likewise.
9917 (process_full_type_unit): Likewise.
9918 (process_imported_unit_die): Likewise.
9919 (dwarf2_compute_name): Likewise.
9920 (dwarf2_physname): Likewise.
9921 (read_import_statement): Likewise.
9922 (create_cus_hash_table): Assign dwarf2_physname instead of
9924 (read_func_scope): Access objfile through dwarf2_per_objfile.
9925 (read_lexical_block_scope): Likewise.
9926 (read_call_site_scope): Likewise.
9927 (read_variable): Likewise.
9928 (dwarf2_rnglists_process): Likewise.
9929 (dwarf2_ranges_process): Likewise.
9930 (dwarf2_ranges_read): Likewise.
9931 (dwarf2_record_block_ranges): Likewise.
9932 (dwarf2_add_field): Likewise.
9933 (dwarf2_add_member_fn): Likewise.
9934 (read_structure_type): Likewise.
9935 (process_structure_scope): Likewise.
9936 (read_enumeration_type): Likewise.
9937 (read_array_type): Likewise.
9938 (read_common_block): Likewise.
9939 (read_namespace_type): Likewise.
9940 (read_namespace): Likewise.
9941 (read_module_type): Likewise.
9942 (read_tag_pointer_type): Likewise.
9943 (read_tag_ptr_to_member_type): Likewise.
9944 (read_tag_string_type): Likewise.
9945 (read_subroutine_type): Likewise.
9946 (read_typedef): Likewise.
9947 (read_base_type): Likewise.
9948 (attr_to_dynamic_prop): Likewise.
9949 (read_subrange_type): Likewise.
9950 (read_unspecified_type): Likewise.
9951 (load_partial_dies): Likewise.
9952 (read_partial_die): Likewise.
9953 (find_partial_die): Likewise.
9954 (guess_partial_die_structure_name): Likewise.
9955 (fixup_partial_die): Likewise.
9956 (read_attribute_value): Likewise.
9957 (read_addr_index_from_leb128): Likewise.
9958 (dwarf2_read_addr_index): Likewise.
9959 (dwarf2_string_attr): Likewise.
9960 (lnp_state_machine::check_line_address): Likewise.
9961 (dwarf_decode_lines_1): Likewise.
9962 (dwarf_decode_lines): Likewise.
9963 (dwarf2_start_symtab): Likewise.
9964 (var_decode_location): Likewise.
9965 (new_symbol_full): Likewise.
9966 (dwarf2_const_value_data): Likewise.
9967 (dwarf2_const_value_attr): Likewise.
9968 (dwarf2_const_value): Likewise.
9969 (die_type): Likewise.
9970 (die_containing_type): Likewise.
9971 (lookup_die_type): Likewise.
9972 (guess_full_die_structure_name): Likewise.
9973 (anonymous_struct_prefix): Likewise.
9974 (dwarf2_name): Likewise.
9975 (follow_die_ref_or_sig): Likewise.
9976 (follow_die_offset): Likewise.
9977 (follow_die_ref): Likewise.
9978 (dwarf2_fetch_die_loc_sect_off): Likewise.
9979 (dwarf2_fetch_constant_bytes): Likewise.
9980 (dwarf2_fetch_die_type_sect_off): Likewise.
9981 (dwarf2_get_die_type): Likewise.
9982 (follow_die_sig): Likewise.
9983 (decode_locdesc): Likewise.
9984 (dwarf2_per_cu_objfile): Likewise.
9985 (dwarf2_per_cu_text_offset): Likewise.
9986 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9988 (set_die_type): Access objfile through
9991 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9993 * valprint.c (converted_character_d): Remove typedef.
9994 (DEF_VEC_O (converted_character_d)): Remove.
9995 (count_next_character): Use std::vector.
9996 (print_converted_chars_to_obstack): Likewise.
9997 (generic_printstr): Likewise.
9999 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10001 * xml-support.h (struct gdb_xml_value): Add constructor.
10002 <value>: Change type to unique_xmalloc_ptr.
10003 (gdb_xml_value_s): Remove typedef.
10004 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10005 (gdb_xml_element_start_handler): Change parameter type to
10007 (xml_find_attribute): Likewise.
10008 * xml-support.c (xml_find_attribute): Change parameter type to
10009 std::vector and adjust.
10010 (gdb_xml_values_cleanup): Remove.
10011 (gdb_xml_parser::start_element): Adjust to std::vector.
10012 (xinclude_start_include): Change paraeter type to std::vector
10014 * btrace.c (check_xml_btrace_version): Likewise.
10015 (parse_xml_btrace_block): Likewise.
10016 (parse_xml_btrace_pt_config_cpu): Likewise.
10017 (parse_xml_btrace_pt): Likewise.
10018 (parse_xml_btrace_conf_bts): Likewise.
10019 (parse_xml_btrace_conf_pt): Likewise.
10020 * memory-map.c (memory_map_start_memory): Likewise.
10021 (memory_map_start_property): Likewise.
10022 * osdata.c (osdata_start_osdata): Likewise.
10023 (osdata_start_item): Likewise.
10024 (osdata_start_column): Likewise.
10025 * remote.c (start_thread): Likewise.
10026 * solib-aix.c (library_list_start_library): Likewise.
10027 (library_list_start_list): Likewise.
10028 * solib-svr4.c (library_list_start_library): Likewise.
10029 (svr4_library_list_start_list): Likewise.
10030 * solib-target.c (library_list_start_segment): Likewise.
10031 (library_list_start_section): Likewise.
10032 (library_list_start_library): Likewise.
10033 (library_list_start_list): Likewise.
10034 * tracepoint.c (traceframe_info_start_memory): Likewise.
10035 (traceframe_info_start_tvar): Likewise.
10036 * xml-syscall.c (syscall_start_syscall): Likewise.
10037 * xml-tdesc.c (tdesc_start_target): Likewise.
10038 (tdesc_start_feature): Likewise.
10039 (tdesc_start_reg): Likewise.
10040 (tdesc_start_union): Likewise.
10041 (tdesc_start_struct): Likewise.
10042 (tdesc_start_flags): Likewise.
10043 (tdesc_start_enum): Likewise.
10044 (tdesc_start_field): Likewise.
10045 (tdesc_start_enum_value): Likewise.
10046 (tdesc_start_vector): Likewise.
10048 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10050 * extension.h (struct xmethod_worker) <clone>: Remove.
10051 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10053 (python_xmethod_worker::clone): Remove.
10054 * valops.c (find_overload_match): Use std::move instead of
10057 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10059 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10060 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10061 <free_xmethod_worker_data>: Remove.
10062 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10063 <get_xmethod_arg_types>: Remove.
10064 <get_xmethod_result_type>: Remove.
10065 <invoke_xmethod>: Remove.
10066 * extension.c (new_xmethod_worker): Remove.
10067 (clone_xmethod_worker): Remove.
10068 (get_matching_xmethod_workers): Return void, pass std::vector by
10070 (get_xmethod_arg_types): Rename to...
10071 (xmethod_worker::get_arg_types): ... this, and adjust.
10072 (get_xmethod_result_type): Rename to...
10073 (xmethod_worker::get_result_type): ... this, and adjust.
10074 (invoke_xmethod): Remove.
10075 (free_xmethod_worker): Remove.
10076 (free_xmethod_worker_vec): Remove.
10077 * extension.h (enum ext_lang_rc): Move here from
10079 (struct xmethod_worker): Add constructor and destructor.
10082 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10083 virtual pure methods.
10084 <get_arg_types, get_result_type>: New methods.
10085 (xmethod_worker_ptr): Remove typedef.
10086 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10087 (xmethod_worker_vec): Remove typedef.
10088 (xmethod_worker_up): New typedef.
10089 (invoke_xmethod): Remove.
10090 (clone_xmethod_worker): Remove.
10091 (free_xmethod_worker): Remove.
10092 (free_xmethod_worker_vec): Remove.
10093 (get_xmethod_arg_types): Remove.
10094 (get_xmethod_result_type): Remove.
10095 * valops.c (find_method_list): Use std::vector, don't use
10096 intermediate vector.
10097 (value_find_oload_method_list): Use std::vector.
10098 (find_overload_match): Use std::vector.
10099 (find_oload_champ): Use std::vector.
10100 * value.c (value_free): Use operator delete.
10101 (value_of_xmethod): Rename to...
10102 (value_from_xmethod): ... this. Don't assign
10103 xmethod_worker::value, take rvalue-reference.
10104 (result_type_of_xmethod): Adjust.
10105 (call_xmethod): Adjust.
10106 * value.h: Include extension.h.
10107 (struct xmethod_worker): Don't forward-declare.
10108 (value_of_xmethod): Rename to...
10109 (value_from_xmethod): ... this, take rvalue-reference.
10110 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10111 (struct python_xmethod_worker): ... this, add constructor and
10113 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10114 (gdbpy_free_xmethod_worker_data): Rename to...
10115 (python_xmethod_worker::~python_xmethod_worker): ... this and
10117 (gdbpy_clone_xmethod_worker_data): Rename to...
10118 (python_xmethod_worker::clone): ... this and adjust.
10119 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10121 (gdbpy_get_xmethod_arg_types): Rename to...
10122 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10123 (gdbpy_get_xmethod_result_type): Rename to...
10124 (python_xmethod_worker::do_get_result_type): ... this and
10126 (gdbpy_invoke_xmethod): Rename to...
10127 (python_xmethod_worker::invoke): ... this and adjust.
10128 (new_python_xmethod_worker): Rename to...
10129 (python_xmethod_worker::python_xmethod_worker): ... this and
10131 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10133 (gdbpy_free_xmethod_worker_data): Remove.
10134 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10135 (gdbpy_get_xmethod_arg_types): Remove.
10136 (gdbpy_get_xmethod_result_type): Remove.
10137 (gdbpy_invoke_xmethod): Remove.
10138 * python/python.c (python_extension_ops): Remove obsolete
10141 2018-01-05 Pedro Alves <palves@redhat.com>
10144 * common/signals-state-save-restore.c
10145 (save_original_signals_state): New parameter 'quiet'. Warn if we
10146 find a custom handler preinstalled, instead of internal erroring.
10147 But only warn if !quiet.
10148 * common/signals-state-save-restore.h
10149 (save_original_signals_state): New parameter 'quiet'.
10150 * main.c (captured_main_1): Move save_original_signals_state call
10151 after option handling, and pass QUIET.
10153 2018-01-05 Pedro Alves <palves@redhat.com>
10155 * spu-tdep.c (spu_catch_start): Pass
10156 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10158 2018-01-05 Pedro Alves <palves@redhat.com>
10161 * ada-lang.c (literal_symbol_name_matcher): New function.
10162 (ada_get_symbol_name_matcher): Use it for
10163 symbol_name_match_type::SEARCH_NAME.
10164 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10165 it down instead of assuming symbol_name_match_type::FULL.
10166 * block.h (block_lookup_symbol): New parameter 'match_type'.
10167 * c-valprint.c (print_unpacked_pointer): Use
10168 lookup_symbol_search_name instead of lookup_symbol.
10169 * compile/compile-object-load.c (get_out_value_type): Pass down
10170 symbol_name_match_type::SEARCH_NAME.
10171 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10172 symbol_name_match_type::FULL.
10173 * cp-support.c (cp_get_symbol_name_matcher): Handle
10174 symbol_name_match_type::SEARCH_NAME.
10175 * infrun.c (insert_exception_resume_breakpoint): Use
10176 lookup_symbol_search_name.
10177 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10178 * psymtab.c (maintenance_check_psymtabs): Use
10179 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10180 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10181 SYMBOL_SEARCH_NAME.
10182 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10183 if symbol_name_match_type::SEARCH_NAME.
10184 (lookup_symbol_in_language): Pass down
10185 symbol_name_match_type::FULL.
10186 (lookup_symbol_search_name): New.
10187 (lookup_language_this): Pass down
10188 symbol_name_match_type::SEARCH_NAME.
10189 (lookup_symbol_aux, lookup_local_symbol): New parameter
10190 'match_type'. Pass it down.
10191 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10192 (lookup_symbol_search_name): New declaration.
10193 (lookup_symbol_in_block): New 'match_type' parameter.
10195 2018-01-05 Pedro Alves <palves@redhat.com>
10198 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10200 (ada_lookup_symbol): Reimplement in terms of
10201 ada_lookup_symbol_list, bits factored out from
10202 ada_lookup_encoded_symbol.
10204 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10206 * ada-exp.y (write_object_renaming): When subscripting an array
10207 using a symbol as the index, pass the block in call to
10208 ada_lookup_encoded_symbol when looking that symbol up.
10210 2018-01-05 Jerome Guitton <guitton@adacore.com>
10212 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10215 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10217 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10218 the case where VALUE_LVAL (val0) is not lval_memory.
10220 2018-01-05 Xavier Roirand <roirand@adacore.com>
10222 * ada-valprint.c (print_optional_low_bound): Handle
10223 character-indexed array printing like boolean-indexed array
10226 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10228 * NEWS: Create a new section for the next release branch.
10229 Rename the section of the current branch, now that it has
10232 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10234 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10235 * version.in: Bump version to 8.1.50.DATE-git.
10237 2018-01-03 Xavier Roirand <roirand@adacore.com>
10239 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10241 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10243 (default_exception_support_info) <catch_handlers_sym>: Add field.
10244 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10245 (ada_exception_name_addr_1): Add "catch handlers" handling.
10246 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10247 Update all callers.
10248 (create_excep_cond_exprs) <ex>: Add parameter.
10249 (re_set_exception): Update create_excep_cond_exprs call.
10250 (print_it_exception, print_one_exception, print_mention_exception)
10251 (print_recreate_exception): Add "catch handler" handling.
10252 (allocate_location_catch_handlers, re_set_catch_handlers)
10253 (check_status_catch_handlers, print_it_catch_handlers)
10254 (print_one_catch_handlers, print_mention_catch_handlers)
10255 (print_recreate_catch_handlers): New function.
10256 (catch_handlers_breakpoint_ops): New variable.
10257 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10258 Add parameter. Add "catch handler" handling.
10259 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10260 Add "catch handler" handling.
10261 (ada_exception_catchpoint_cond_string): Add "catch handler"
10263 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10265 (catch_ada_handlers_command): New function.
10266 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10267 operations structure.
10268 (_initialize_ada_language): Add "catch handlers" command entry.
10269 * NEWS: Document "catch handlers" feature.
10271 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10273 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10274 account when creating the array type of the slice.
10275 (ada_value_slice): Likewise.
10277 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10279 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10281 (create_array_type_with_stride): Add byte_stride_prop parameter.
10282 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10283 New parameter. Update all callers in this file.
10284 (array_type_has_dynamic_stride): New function.
10285 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10286 of arrays with dynamic byte strides.
10287 * dwarf2read.c (read_array_type): Add support for dynamic
10288 DW_AT_byte_stride attributes.
10290 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10292 * dwarf2read.c (read_unspecified_type): Treat
10293 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10295 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10297 Update copyright year range in all GDB files.
10299 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10301 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10302 and gdb/testsuite/gdb.base/step-line.c.
10304 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10306 * copyright.py (main): Dump the contents of
10307 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10308 even if BY_HAND is empty.
10310 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10312 * top.c (print_gdb_version): Update Copyright year in version
10315 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10317 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10319 For older changes see ChangeLog-2017.
10325 version-control: never