1 2018-07-17 Tom Tromey <tom@tromey.com>
3 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4 (compute_enum_list, pascm_set_param_value_x)
5 (gdbscm_parameter_value): Update.
6 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
7 (gdbscm_scm_to_host_string): Update.
8 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
10 * guile/scm-cmd.c (cmdscm_add_completion): Update.
11 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
12 * guile/scm-string.c (gdbscm_scm_to_string): Return
14 (gdbscm_scm_to_host_string): Likewise.
16 2018-07-17 Tom Tromey <tom@tromey.com>
18 * guile/guile.c (gdbscm_eval_from_control_command): Update.
19 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
20 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
21 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
24 2018-07-17 Tom Tromey <tom@tromey.com>
26 * guile/scm-param.c (pascm_signal_setshow_error): Update.
27 * guile/guile-internal.h (gdbscm_exception_message_to_string):
29 * guile/scm-cmd.c (cmdscm_function): Update.
30 * guile/scm-pretty-print.c
31 (ppscm_print_exception_unless_memory_error): Update.
32 * guile/scm-exception.c (gdbscm_exception_message_to_string):
33 Return unique_xmalloc_ptr.
35 2018-07-17 Tom Tromey <tom@tromey.com>
37 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
40 2018-07-17 Jim Wilson <jimw@sifive.com>
42 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
43 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
44 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
45 unecessary braces after EF_RISCV_RVC test. Delete call to
46 set_gdbarch_decr_pc_after_break.
48 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
49 RISCV_LAST_FP_REGNUM + 1.
50 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
52 2018-07-17 Tom Tromey <tom@tromey.com>
54 * configure.ac: Remove --disable-gdbcli.
56 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
57 (SUBDIR_CLI_CFLAGS): Remove.
58 (SFILES): Use SUBDIR_CLI_SRCS.
59 (COMMON_OBS): Use SUBDIR_CLI_OBS.
61 2018-07-17 Tom Tromey <tom@tromey.com>
64 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
66 2018-07-16 Jim Wilson <jimw@sifive.com>
68 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
70 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
72 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
74 (libunwind_frame_sniffer): Likewise.
75 (libunwind_frame_prev_register): Likewise.
76 (libunwind_sigtramp_frame_sniffer): Likewise.
77 * ia64-tdep.c (ia64_access_reg): Likewise.
78 (ia64_access_rse_reg): Likewise.
79 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
80 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
82 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
84 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
86 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
88 * remote-sim.c (gdbsim_target::close,
89 gdbsim_target::mourn_inferior): Remove unused variables.
91 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
93 * ia64-tdep.c (ktab_buf): New global.
94 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
95 (get_kernel_table): Adjust.
97 2018-07-16 Tom Tromey <tom@tromey.com>
99 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
100 * dwarf2read.c (using_directives, new_symbol): Use
102 * dbxread.c (process_one_symbol): Use outermost_context_p.
103 * coffread.c (coff_symtab_read): Use outermost_context_p.
105 2018-07-16 Tom Tromey <tom@tromey.com>
107 * dwarf2read.c (using_directives, read_func_scope)
108 (read_lexical_block_scope): Update.
109 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
110 * buildsym.h (local_using_directives, global_using_directives):
112 (get_local_using_directives, set_local_using_directives)
113 (get_global_using_directives): Declare.
114 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
115 m_global_using_directives>: New members.
116 (finish_block_internal, prepare_for_building)
117 (reset_symtab_globals, end_symtab_get_static_block)
118 (push_context): Update.
119 (get_local_using_directives, set_local_using_directives)
120 (get_global_using_directives): New functions.
121 (buildsym_init): Update.
123 2018-07-16 Tom Tromey <tom@tromey.com>
125 * xcoffread.c (xcoff_initial_scan): Don't call
127 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
128 * buildsym.h (class scoped_free_pendings): Add constructor.
129 (free_pending_blocks): Don't declare.
130 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
131 (free_pending_blocks): Now static.
133 2018-07-16 Tom Tromey <tom@tromey.com>
135 * buildsym.h (push_subfile, pop_subfile): Update declarations.
136 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
138 (struct subfile_stack): Remove.
139 (subfile_stack): Remove.
140 (push_subfile, pop_subfile, buildsym_init): Update.
142 2018-07-16 Tom Tromey <tom@tromey.com>
144 * buildsym.c (push_subfile): Use gdb_assert.
145 (pop_subfile): Use gdb_assert.
147 2018-07-16 Tom Tromey <tom@tromey.com>
149 * buildsym.h (merge_symbol_lists): Remove.
150 * buildsym.c (merge_symbol_lists): Remove.
152 2018-07-16 Tom Tromey <tom@tromey.com>
154 * stabsread.c (scan_file_globals): Update comment.
155 * stabsread.h (scan_file_globals): Move from buildsym.h.
156 * buildsym.h (scan_file_globals): Move to stabsread.h.
158 2018-07-16 Tom Tromey <tom@tromey.com>
160 * xcoffread.c (xcoff_new_init): Update.
161 * mipsread.c (mipscoff_new_init): Update.
162 * mdebugread.c (mdebug_build_psymtabs): Update.
163 * elfread.c (elf_new_init): Update.
164 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
165 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
166 * buildsym.h (buildsym_new_init): Don't declare.
167 * buildsym.c (buildsym_new_init): Remove.
169 2018-07-16 Tom Tromey <tom@tromey.com>
171 * stabsread.h (within_function): Move from buildsym.h.
172 * stabsread.c (start_stabs): Clear within_function.
173 * coffread.c (coff_start_symtab): Clear within_function.
174 * buildsym.h (within_function): Move to stabsread.h.
175 * buildsym.c (prepare_for_building): Update.
177 2018-07-16 Tom Tromey <tom@tromey.com>
179 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
180 * dwarf2read.c (dwarf2_start_symtab): Don't set
181 processing_gcc_compilation.
182 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
184 2018-07-16 Tom Tromey <tom@tromey.com>
186 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
187 (next_symbol_text_func): Move from buildsym.h.
188 * stabsread.c (hashname): Move from buildsym.c.
189 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
190 (next_symbol_text_func, hashname): Move to stabsread.h.
191 * buildsym.c: Don't include bcache.h
192 (hashname): Move to stasbread.c.
194 2018-07-16 Tom Tromey <tom@tromey.com>
196 * buildsym.h (context_stack_size): Don't declare.
197 * buildsym.c (context_stack_size): New global.
199 2018-07-16 Tom Tromey <tom@tromey.com>
201 * dbxread.c (processing_acc_compilation): New global.
202 * buildsym.h (processing_acc_compilation): Don't declare.
204 2018-07-16 Tom Tromey <tom@tromey.com>
206 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
207 * dbxread.c (read_ofile_symtab): Update.
208 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
209 * buildsym.h (last_source_start_addr): Remove.
210 (set_last_source_start_addr, get_last_source_start_addr):
212 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
214 (struct buildsym_compunit) <m_last_source_start_addr>: New
216 (prepare_for_building): Remove start_addr parameter.
217 (start_symtab, restart_symtab, end_symtab_get_static_block)
218 (end_symtab_with_blockvector): Update.
219 (set_last_source_start_addr, get_last_source_start_addr): New
222 2018-07-16 Tom Tromey <tom@tromey.com>
224 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
226 (have_line_numbers): Remove.
227 (record_line, prepare_for_building, end_symtab_get_static_block)
228 (augment_type_symtab): Update.
230 2018-07-16 Tom Tromey <tom@tromey.com>
232 * buildsym.c (~buildsym_compunit): Free the macro table.
233 (struct buildsym_compunit) <get_macro_table, release_macros>: New
235 <m_pending_macros>: New member.
236 (pending_macros): Remove.
237 (~scoped_free_pendings, get_macro_table, prepare_for_building)
238 (reset_symtab_globals, end_symtab_get_static_block)
239 (end_symtab_with_blockvector, augment_type_symtab)
240 (buildsym_init): Update.
242 2018-07-16 Tom Tromey <tom@tromey.com>
244 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
246 (buildsym_compunit::set_last_source_file): New method.
247 <m_last_source_file>: New member.
248 (prepare_for_building): Remove "name" parameter.
249 (start_symtab, restart_symtab, reset_symtab_globals): Update.
250 (last_source_file): Remove.
251 (set_last_source_file, get_last_source_file): Update.
253 2018-07-16 Tom Tromey <tom@tromey.com>
255 * buildsym.c (prepare_for_building): Add assert.
257 2018-07-16 Tom Tromey <tom@tromey.com>
259 * buildsym.c (~buildsym_compunit): Update.
260 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
261 (start_subfile, patch_subfile_names)
262 (end_symtab_with_blockvector): Update.
264 2018-07-16 Tom Tromey <tom@tromey.com>
266 * buildsym.c (struct buildsym_compunit): Add constructor,
267 destructor, initializers.
268 (start_buildsym_compunit): Remove.
269 (free_buildsym_compunit): Use "delete".
270 (start_symtab, restart_symtab): Use "new".
272 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
274 * symfile.c (set_objfile_default_section_offset): Remove struct
277 2018-07-14 Stafford Horne <shorne@gmail.com>
279 * (Responsible Maintainers): Add myself as or1k maintainer.
281 2018-07-13 Tom Tromey <tom@tromey.com>
283 * symfile.c (set_objfile_default_section_offset): Use extra braces
286 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
288 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
291 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
293 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
294 unittests/cli-utils-selftests.c
295 * unittests/cli-utils-selftests.c: New file.
297 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
299 * NEWS: Mention new commands. Mention change to 'thread apply'.
301 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
303 * thread.c (thr_try_catch_cmd): New function.
304 (thread_apply_all_command): Handle qcs flags.
305 (thread_apply_command): Handle qcs flags.
306 (taas_command): New function.
307 (tfaas_command): New function.
308 (_initialize_thread): Update to setup the new commands 'taas
309 and 'tfaas'. Change doc string for 'thread apply'.
311 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
313 * stack.c: (trailing_outermost_frame): New function, mostly
314 extracted from backtrace_command_1.
315 (leading_innermost_frame): New function.
316 (backtrace_command_1): Update to call trailing_outermost_frame.
317 (frame_apply_command_count): New function.
318 (frame_apply_level_command): New function.
319 (frame_apply_all_command): New function.
320 (frame_apply_command): New function.
321 (faas_command): New function.
322 (frame_cmd_list): New variable.
323 (_initialize_stack): Update to setup the new commands 'frame apply'
326 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
328 * cli-utils.c (number_or_range_parser::get_number): Only handle
329 numbers or convenience var as numbers.
330 (parse_flags): New function.
331 (parse_flags_qcs): New function.
332 (number_or_range_parser::finished): Ensure parsing end is detected
333 before end of string.
334 * cli-utils.h (parse_flags): New function.
335 (parse_flags_qcs): New function.
336 (number_or_range_parser): Remove m_finished bool.
337 (number_or_range_parser::skip_range): Set m_in_range to false.
339 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
341 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
344 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
345 Jan Kratochvil <jan.kratochvil@redhat.com>
346 Paul Fertser <fercerpav@gmail.com>
347 Tsutomu Seki <sekiriki@gmail.com>
348 Pedro Alves <palves@redhat.com>
350 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
351 'unittests/parse-connection-spec-selftests.c'.
352 (COMMON_SFILES): Add 'common/netstuff.c'.
353 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
354 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
355 * common/netstuff.c: New file.
356 * common/netstuff.h: New file.
357 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
358 (wait_for_connect): Update comment. New parameter
359 'gdb::optional<int> sock' instead of 'struct serial *scb'.
360 Use 'sock' directly instead of 'scb->fd'.
361 (try_connect): New function, with code from 'net_open'.
362 (net_open): Rewrite main loop to deal with multiple
363 sockets/addresses. Handle IPv6-style hostnames; implement
364 support for IPv6 connections.
365 * unittests/parse-connection-spec-selftests.c: New file.
367 2018-07-11 Pedro Alves <palves@redhat.com>
370 * remote.c (remote_target::remote_detach_pid): Call
373 2018-07-11 Pedro Alves <palves@redhat.com>
375 * h8300-tdep.c (h8300_gdbarch_init): Remove
376 set_gdbarch_ecoff_reg_to_regnum calls.
378 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
381 * c-typeprint.c (c_type_print_base_struct_union): Don't print
382 offsets/sizes for static members of a class/struct.
384 2018-07-11 Alan Hayward <alan.hayward@arm.com>
386 * target-descriptions.c (tdesc_register_bitsize): Rename.
387 * target-descriptions.h (tdesc_register_bitsize): Likewise.
388 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
389 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
391 2018-07-10 Tom Tromey <tom@tromey.com>
393 * breakpoint.c (moribund_locations): Now static and a
395 (breakpoint_init_inferior, moribund_breakpoint_here_p)
396 (build_bpstat_chain, update_global_location_list)
397 (breakpoint_retire_moribund): Update.
398 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
401 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
403 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
404 (riscv_register_reggroup_p): Use new function, remove unneeded
406 (riscv_push_dummy_call): Extend assert to compare against xlen or
407 flen based on register type.
409 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
411 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
413 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
415 * remote.c (show_hardware_watchpoint_limit): New function.
416 (show_hardware_watchpoint_length_limit): New function.
417 (show_hardware_breakpoint_limit): New function.
418 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
419 where appropriate, update help text.
421 2018-07-09 Tom Tromey <tom@tromey.com>
423 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
424 (CLIBS): Don't mention NAT_CLIBS.
426 2018-07-09 Tom Tromey <tom@tromey.com>
428 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
429 (LIBGDB_OBS, clean mostlyclean): Update.
430 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
432 2018-07-09 Tom Tromey <tom@tromey.com>
434 * Makefile.in (%.c: %.y): Use ECHO_YACC.
435 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
436 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
438 2018-07-09 Tom Tromey <tom@tromey.com>
440 * Makefile.in (ALLDEPFILES): Remove exec.c.
441 (COMMON_OBS): Remove exec.o.
442 (COMMON_SFILES): Add exec.c.
444 2018-07-09 Tom Tromey <tom@tromey.com>
446 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
448 2018-07-09 Tom Tromey <tom@tromey.com>
450 * Makefile.in (clean mostlyclean): Remove stamp-version.
451 (version.c): Depend on stamp-version.
452 (stamp-version): New rule, from version.c rule.
454 2018-07-09 Tom Tromey <tom@tromey.com>
456 * Makefile.in (init.c): Depend on stamp-init.
457 (stamp-init): New rule, from init.c rule.
458 (clean mostlyclean): Remove stamp-init.
460 2018-07-09 Tom Tromey <tom@tromey.com>
462 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
463 SUBDIR_GCC_COMPILE_SRCS.
465 2018-07-09 Tom Tromey <tom@tromey.com>
467 * Makefile.in (init.c): Remove some unused sed rules.
469 2018-07-09 Tom Tromey <tom@tromey.com>
471 * Makefile.in (TSOBS): Remove.
472 (INIT_FILES): Update.
473 (LIBGDB_OBS): Update.
474 (COMMON_SFILES): Add inflow.c.
475 (SFILES): Remove inflow.c.
477 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
479 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
481 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
483 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
484 get_saveloc_name, is_signal_frame_name, step_name,
485 init_remote_name, create_addr_space_name,
486 destroy_addr_space_name, search_unwind_table_name,
487 find_dyn_list_name): Constify.
489 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
491 * darwin-nat.c (darwin_pthread_kill): New function.
492 (darwin_resume_thread): Use darwin_pthread_kill.
494 2018-07-05 Tom de Vries <tdevries@suse.de>
496 * macroexp.c (macro_buffer) <operator=>: New member function.
498 2018-07-04 Tom Tromey <tom@tromey.com>
500 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
502 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
504 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
505 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
509 2018-07-04 Joel Brobecker <brobecker@adacore.com>
511 * NEWS: Create a new section for the next release branch.
512 Rename the section of the current branch, now that it has
515 2018-07-04 Joel Brobecker <brobecker@adacore.com>
517 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
518 * version.in: Bump version to 8.2.50.DATE-git.
520 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
521 Pedro Alves <palves@redhat.com>
523 * linux-nat.c (linux_init_ptrace): Rename to ...
524 (linux_init_ptrace_procfs): ... this. Call
525 linux_proc_init_warnings.
526 (linux_nat_target::post_attach)
527 (linux_nat_target::post_startup_inferior): Adjust.
528 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
529 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
531 2018-07-04 Tom de Vries <tdevries@suse.de>
533 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
535 (read_comp_unit_head): ... here.
537 2018-07-03 Tom Tromey <tom@tromey.com>
539 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
540 (stop_tracing, tstatus_command)
541 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
542 (print_one_static_tracepoint_marker): Update.
543 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
545 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
547 (all_tracepoints, static_tracepoints_here): Return std::vector.
549 2018-07-03 Tom Tromey <tom@tromey.com>
551 * common/ptid.c (ptid_equal): Remove.
552 * common/ptid.h (ptid_equal): Don't declare.
553 * ada-tasks.c: Update.
554 * breakpoint.c: Update.
555 * common/agent.c: Update.
557 * darwin-nat-info.c: Update.
558 * darwin-nat.c: Update.
560 * dtrace-probe.c: Update.
561 * dummy-frame.c: Update.
562 * fbsd-nat.c: Update.
564 * gdbthread.h: Update.
566 * go32-nat.c: Update.
567 * inf-loop.c: Update.
568 * inf-ptrace.c: Update.
573 * linux-fork.c: Update.
574 * linux-nat.c: Update.
575 * linux-thread-db.c: Update.
576 * mi/mi-cmd-var.c: Update.
577 * mi/mi-interp.c: Update.
578 * mi/mi-main.c: Update.
579 * nto-procfs.c: Update.
580 * ppc-linux-tdep.c: Update.
582 * python/py-inferior.c: Update.
583 * python/py-record-btrace.c: Update.
584 * python/py-record.c: Update.
585 * ravenscar-thread.c: Update.
586 * regcache.c: Update.
587 * remote-sim.c: Update.
589 * sol-thread.c: Update.
592 * tui/tui-stack.c: Update.
594 * windows-nat.c: Update.
595 * windows-tdep.c: Update.
597 2018-07-03 Tom Tromey <tom@tromey.com>
599 * common/ptid.c (ptid_match): Remove.
600 * common/ptid.h (ptid_match): Don't declare.
601 * fbsd-nat.c: Update.
604 * linux-nat.c: Update.
605 * record-btrace.c: Update.
606 * regcache.c: Update.
609 2018-07-03 Tom Tromey <tom@tromey.com>
611 * common/ptid.c (ptid_tid_p): Remove.
612 * common/ptid.h (ptid_tid_p): Don't declare.
613 * sol-thread.c: Update.
615 2018-07-03 Tom Tromey <tom@tromey.com>
617 * common/ptid.c (ptid_lwp_p): Remove.
618 * common/ptid.h (ptid_lwp_p): Don't declare.
619 * fbsd-nat.c: Update.
620 * linux-nat.c: Update.
621 * nat/linux-procfs.c: Update.
622 * nat/x86-linux-dregs.c: Update.
623 * sol-thread.c: Update.
625 2018-07-03 Tom Tromey <tom@tromey.com>
627 * common/ptid.c (ptid_is_pid): Remove.
628 * common/ptid.h (ptid_is_pid): Don't declare.
630 * linux-nat.c: Update.
631 * mi/mi-interp.c: Update.
635 2018-07-03 Tom Tromey <tom@tromey.com>
637 * common/ptid.c (ptid_get_tid): Remove.
638 * common/ptid.h (ptid_get_tid): Don't declare.
639 * ada-tasks.c: Update.
640 * aix-thread.c: Update.
641 * bsd-uthread.c: Update.
642 * darwin-nat.c: Update.
643 * fbsd-nat.c: Update.
644 * i386-darwin-nat.c: Update.
646 * linux-tdep.c: Update.
647 * nto-procfs.c: Update.
648 * ppc-ravenscar-thread.c: Update.
649 * python/py-infthread.c: Update.
650 * ravenscar-thread.c: Update.
651 * sol-thread.c: Update.
652 * sparc-ravenscar-thread.c: Update.
653 * windows-nat.c: Update.
655 2018-07-03 Tom Tromey <tom@tromey.com>
657 * common/ptid.c (ptid_get_lwp): Remove.
658 * common/ptid.h (ptid_get_lwp): Don't declare.
659 * aarch64-linux-nat.c: Update.
660 * ada-tasks.c: Update.
661 * aix-thread.c: Update.
662 * amd64-linux-nat.c: Update.
663 * arm-linux-nat.c: Update.
665 * fbsd-nat.c: Update.
666 * fbsd-tdep.c: Update.
668 * i386-cygwin-tdep.c: Update.
669 * i386-gnu-nat.c: Update.
670 * i386-linux-nat.c: Update.
671 * ia64-linux-nat.c: Update.
672 * inf-ptrace.c: Update.
674 * linux-fork.c: Update.
675 * linux-nat.c: Update.
676 * linux-tdep.c: Update.
677 * linux-thread-db.c: Update.
678 * mips-linux-nat.c: Update.
679 * nat/aarch64-linux-hw-point.c: Update.
680 * nat/aarch64-linux.c: Update.
681 * nat/linux-btrace.c: Update.
682 * nat/linux-osdata.c: Update.
683 * nat/linux-procfs.c: Update.
684 * nat/x86-linux-dregs.c: Update.
685 * obsd-nat.c: Update.
686 * ppc-fbsd-nat.c: Update.
687 * ppc-linux-nat.c: Update.
689 * python/py-infthread.c: Update.
690 * ravenscar-thread.c: Update.
692 * s390-linux-nat.c: Update.
693 * sol-thread.c: Update.
694 * sol2-tdep.c: Update.
695 * spu-linux-nat.c: Update.
696 * x86-linux-nat.c: Update.
697 * xtensa-linux-nat.c: Update.
699 2018-07-03 Tom Tromey <tom@tromey.com>
701 * common/ptid.c (ptid_get_pid): Remove.
702 * common/ptid.h (ptid_get_pid): Don't declare.
703 * aarch64-linux-nat.c: Update.
704 * ada-lang.c: Update.
705 * aix-thread.c: Update.
706 * alpha-bsd-nat.c: Update.
707 * amd64-fbsd-nat.c: Update.
708 * amd64-linux-nat.c: Update.
709 * arm-linux-nat.c: Update.
710 * arm-nbsd-nat.c: Update.
712 * break-catch-syscall.c: Update.
713 * breakpoint.c: Update.
714 * bsd-uthread.c: Update.
717 * darwin-nat.c: Update.
718 * fbsd-nat.c: Update.
719 * fbsd-tdep.c: Update.
722 * hppa-nbsd-nat.c: Update.
723 * hppa-obsd-nat.c: Update.
724 * i386-fbsd-nat.c: Update.
725 * ia64-linux-nat.c: Update.
726 * inf-ptrace.c: Update.
728 * inferior.c: Update.
729 * inferior.h: Update.
732 * linux-fork.c: Update.
733 * linux-nat.c: Update.
734 * linux-tdep.c: Update.
735 * linux-thread-db.c: Update.
736 * m68k-bsd-nat.c: Update.
737 * mi/mi-interp.c: Update.
738 * mi/mi-main.c: Update.
739 * mips-linux-nat.c: Update.
740 * mips-nbsd-nat.c: Update.
741 * mips64-obsd-nat.c: Update.
742 * nat/aarch64-linux-hw-point.c: Update.
743 * nat/aarch64-linux.c: Update.
744 * nat/linux-btrace.c: Update.
745 * nat/linux-osdata.c: Update.
746 * nat/linux-procfs.c: Update.
747 * nat/x86-linux-dregs.c: Update.
748 * nto-procfs.c: Update.
749 * obsd-nat.c: Update.
750 * ppc-linux-nat.c: Update.
751 * ppc-nbsd-nat.c: Update.
752 * ppc-obsd-nat.c: Update.
753 * proc-service.c: Update.
755 * python/py-inferior.c: Update.
756 * python/py-infthread.c: Update.
757 * ravenscar-thread.c: Update.
759 * remote-sim.c: Update.
761 * rs6000-nat.c: Update.
762 * s390-linux-nat.c: Update.
763 * sh-nbsd-nat.c: Update.
764 * sol-thread.c: Update.
765 * sparc-nat.c: Update.
766 * sparc64-tdep.c: Update.
767 * spu-linux-nat.c: Update.
768 * spu-tdep.c: Update.
769 * target-debug.h: Update.
772 * tid-parse.c: Update.
773 * tracefile-tfile.c: Update.
774 * vax-bsd-nat.c: Update.
775 * windows-nat.c: Update.
776 * x86-linux-nat.c: Update.
779 2018-07-03 Tom Tromey <tom@tromey.com>
781 * common/ptid.c (pid_to_ptid): Remove.
782 * common/ptid.h (pid_to_ptid): Don't declare.
783 * aix-thread.c: Update.
784 * arm-linux-nat.c: Update.
785 * common/ptid.c: Update.
786 * common/ptid.h: Update.
789 * darwin-nat.c: Update.
790 * fbsd-nat.c: Update.
791 * fork-child.c: Update.
793 * go32-nat.c: Update.
794 * inf-ptrace.c: Update.
796 * inferior.c: Update.
798 * linux-fork.c: Update.
799 * linux-nat.c: Update.
800 * nat/aarch64-linux-hw-point.c: Update.
801 * nat/fork-inferior.c: Update.
802 * nat/x86-linux-dregs.c: Update.
803 * nto-procfs.c: Update.
804 * obsd-nat.c: Update.
806 * progspace.c: Update.
808 * rs6000-nat.c: Update.
809 * s390-linux-nat.c: Update.
810 * sol-thread.c: Update.
811 * spu-linux-nat.c: Update.
814 * tracefile-tfile.c: Update.
815 * windows-nat.c: Update.
817 2018-07-03 Tom Tromey <tom@tromey.com>
819 * common/ptid.h (ptid_build): Don't declare.
820 * common/ptid.c (ptid_build): Remove.
821 * aix-thread.c: Update.
823 * bsd-uthread.c: Update.
824 * common/agent.c: Update.
825 * common/ptid.c: Update.
826 * common/ptid.h: Update.
828 * darwin-nat.c: Update.
829 * fbsd-nat.c: Update.
831 * linux-fork.c: Update.
832 * linux-nat.c: Update.
833 * linux-thread-db.c: Update.
834 * nat/linux-osdata.c: Update.
835 * nat/linux-procfs.c: Update.
836 * nto-procfs.c: Update.
837 * obsd-nat.c: Update.
838 * proc-service.c: Update.
840 * ravenscar-thread.c: Update.
841 * remote-sim.c: Update.
843 * sol-thread.c: Update.
845 * windows-nat.c: Update.
847 2018-07-03 Tom Tromey <tom@tromey.com>
849 * infrun.c (follow_exec): Use exit_inferior_silent.
850 * inferior.c (exit_inferior_num_silent): Remove.
851 * inferior.h (exit_inferior_num_silent): Don't declare.
853 2018-07-03 Tom Tromey <tom@tromey.com>
856 * darwin-nat.c (darwin_attach_pid): Reset inferior and
857 inferior_ptid on error.
859 2018-07-02 Maciej W. Rozycki <macro@mips.com>
860 Simon Marchi <simon.marchi@polymtl.ca>
863 * disasm.h (gdb_disassembler): Add
864 `m_disassembler_options_holder'. member
865 * disasm.c (get_all_disassembler_options): New function.
866 (gdb_disassembler::gdb_disassembler): Use it.
867 (gdb_buffered_insn_length_init_dis): Likewise.
868 (gdb_buffered_insn_length): Adjust accordingly.
869 (set_disassembler_options): Handle options with arguments.
870 (show_disassembler_options_sfunc): Likewise. Add a leading new
871 line if showing options with descriptions.
872 (disassembler_options_completer): Adapt to using the
873 `disasm_options_and_args_t' structure.
874 * mips-tdep.c (mips_disassembler_options): New variable.
875 (mips_disassembler_options_o32): Likewise.
876 (mips_disassembler_options_n32): Likewise.
877 (mips_disassembler_options_n64): Likewise.
878 (gdb_print_insn_mips): Don't set `disassembler_options'.
879 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
881 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
882 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
883 `gdbarch_disassembler_options_implicit' and
884 `gdbarch_valid_disassembler_options'.
885 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
886 `disasm_options_and_args_t' structure.
887 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
889 (valid_disassembler_options): Switch from `disasm_options_t' to
890 the `disasm_options_and_args_t' structure.
891 * NEWS: Document `set disassembler-options' support for the MIPS
893 * gdbarch.h: Regenerate.
894 * gdbarch.c: Regenerate.
896 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
898 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
900 2018-06-29 Joel Brobecker <brobecker@adacore.com>
902 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
903 parameter in call to amd64_target_description.
904 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
905 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
906 (amd64fbsd_init_abi): Likewise.
907 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
908 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
909 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
910 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
912 2018-06-29 Pedro Alves <palves@redhat.com>
914 * gdb/amd64-tdep.h (amd64_create_target_description): Add
915 "segments" parameter.
916 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
917 (_initialize_amd64_tdep): Update call to
918 amd64_create_target_description.
919 (amd64_target_description): Add "segments" parameter. Adjust
920 the implementation to use it.
921 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
922 call to amd64_create_target_description.
923 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
924 * gdb/arch/amd64.h (amd64_create_target_description): Add
926 * gdb/arch/amd64.c (amd64_create_target_description): Add
927 "segments" parameter. Call create_feature_i386_64bit_segments
928 only if SEGMENTS is true.
929 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
930 call to amd64_create_target_description.
932 2018-06-29 Pedro Alves <palves@redhat.com>
934 * thread.c (thread_target_id_str): New, factored out from ...
935 (print_thread_info_1): ... here. Use it to compute the max
936 "Target Id" column width.
938 2018-06-29 Pedro Alves <palves@redhat.com>
940 * remote.c (remote_target::extra_thread_info): Delete
941 'display_buf' and 'n' locals. from the cache, regardless of
942 packet mechanims is in use. Use cache for qThreadExtra and qP
945 2018-06-29 Pedro Alves <palves@redhat.com>
947 * blockframe.c (find_pc_sect_containing_function): New function.
948 * breakpoint.c (print_breakpoint_location): Don't call
949 find_pc_sect_function.
950 * linespec.c (create_sals_line_offset): Record the location's
952 * linespec.c (convert_address_location_to_sals): Fill in sal's
953 symbol with find_pc_sect_containing_function.
954 * symtab.c (find_function_start_sal): Rename to ...
955 (find_function_start_sal_1): ... this.
956 (find_function_start_sal): Reimplement as wrapper around
957 find_function_start_sal_1, and use
958 find_pc_sect_containing_function to fill in the sal's symbol.
959 (find_function_start_sal(symbol*, bool)): Adjust.
960 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
962 (find_pc_sect_containing_function): Declare.
964 2018-06-29 Pedro Alves <palves@redhat.com>
966 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
967 true if the the location has no symbol.
969 2018-06-28 Tom Tromey <tom@tromey.com>
971 * NEWS: Mention --enable-codesign.
972 * silent-rules.mk (ECHO_SIGN): New variable.
973 * configure.ac: Add --enable-codesign.
974 * configure: Rebuild.
975 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
976 (gdb$(EXEEXT)): Optionally invoke codesign.
978 2018-06-28 Pedro Alves <palves@redhat.com>
980 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
982 (switch_to_thread_no_regs): Adjust comment.
983 * infcmd.c (stop_pc): Delete.
984 (post_create_inferior, info_program_command): Replace references
985 to stop_pc with references to thread_info->suspend.stop_pc.
986 * inferior.h (stop_pc): Delete declaration.
987 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
988 (handle_inferior_event_1, handle_signal_stop)
989 (process_event_stop_test, keep_going_stepped_thread)
990 (handle_step_into_function, handle_step_into_function_backward)
991 (print_stop_location): Replace references to stop_pc with
992 references to thread_info->suspend.stop_pc.
993 (struct infcall_suspend_state) <stop_pc>: Delete field.
994 (save_infcall_suspend_state, restore_infcall_suspend_state):
995 Remove references to inf_stat->stop_pc.
996 * linux-fork.c (fork_load_infrun_state): Likewise.
997 * record-btrace.c (record_btrace_set_replay): Likewise.
998 * record-full.c (record_full_goto_entry): Likewise.
999 * remote.c (print_one_stopped_thread): Likewise.
1000 * target.c (target_resume): Extend comment.
1001 * thread.c (set_executing_thread): New.
1002 (set_executing): Use it.
1003 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1004 Remove references to stop_pc.
1006 2018-06-28 Pedro Alves <palves@redhat.com>
1008 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1009 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1011 2018-06-28 Tom Tromey <tom@tromey.com>
1013 * coffread.c (coff_symfile_finish): Update.
1014 * xcoffread.c (xcoff_symfile_finish): Update.
1015 * elfread.c (elf_symfile_finish): Update.
1016 * symfile.h (dwarf2_free_objfile): Don't declare.
1017 * dwarf2read.c (_initialize_dwarf2_read): Use
1018 register_objfile_data_with_cleanup.
1019 (dwarf2_free_objfile): Now static. Change signature.
1021 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1023 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1024 option "-o" to add-symbol-file-load to add an offset to each
1025 section's load address.
1026 * symfile.c (set_objfile_default_section_offset): New function.
1028 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1030 * symfile.c (add_symbol_file_command): Make sure that sections
1031 with the same name are sorted in the same order.
1033 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1035 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1036 require the second argument. If omitted, load sections at the
1037 addresses specified in the file.
1039 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1041 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1042 (_initialize_symfile): Add option "-o" to symbol-file to add an
1043 offset to each section of the symbol file.
1045 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1047 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1049 2018-06-27 Tom Tromey <tom@tromey.com>
1051 * stack.c (_initialize_stack): Update "func" help text.
1053 2018-06-27 Tom Tromey <tom@tromey.com>
1055 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1057 (unwind_infopy_str, pyuw_create_unwind_info)
1058 (unwind_infopy_add_saved_register, pyuw_sniffer)
1059 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1061 (struct saved_reg): Add constructor.
1062 <value>: Now a gdbpy_ref<>.
1064 2018-06-27 Tom Tromey <tom@tromey.com>
1066 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1068 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1070 * gdb-gdb.py.in: Format using autopep8.
1072 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1074 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1075 (type_lookup_function): Recognize CORE_ADDR values.
1077 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1079 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1082 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1084 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1087 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1089 * gdb-gdb.py: Move to...
1090 * gdb-gdb.py.in: ... here.
1091 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1092 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1094 (distclean): Remove gdb-gdb.py when cleaning.
1095 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1096 * configure: Re-generate.
1098 2018-06-27 Pedro Alves <palves@redhat.com>
1100 * proc-service.c (get_ps_regcache): New.
1101 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1102 (ps_lsetfpregs): Use it.
1104 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1107 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1108 (dwarf_decode_lines_1): Adjust.
1110 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1112 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1114 <info_proc>: Likewise.
1116 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1118 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1119 to windows_fetch_one_register, and only handle the case of
1120 fetching one register. Move the code that reloads the context
1121 and iterates over all registers if R is negative to...
1122 (windows_nat_target::fetch_registers): ... here.
1123 (do_windows_store_inferior_registers): Rename to
1124 windows_store_one_register, and only handle the case of storing
1125 one register. Move the code that handles the case where r is
1127 (windows_nat_target::store_registers) ... here.
1129 2018-06-26 Tom Tromey <tom@tromey.com>
1132 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1133 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1135 (rust_internal_print_type): Add podata parameter.
1136 (rust_print_type): Update.
1138 2018-06-26 Tom Tromey <tom@tromey.com>
1140 * typeprint.h (struct print_offset_data) <update, finish,
1141 maybe_print_hole>: New methods.
1142 <indentation>: New constant.
1143 * typeprint.c (print_offset_data::indentation): Define.
1144 (print_offset_data::maybe_print_hole, print_offset_data::update)
1145 (print_offset_data::finish): Move from c-typeprint.c and rename.
1146 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1147 (print_spaces_filtered_with_print_options): Update.
1148 (c_print_type_union_field_offset, maybe_print_hole)
1149 (c_print_type_struct_field_offset): Move to typeprint.c and
1151 (c_type_print_base_struct_union): Update.
1153 2018-06-25 Pedro Alves <palves@redhat.com>
1155 * gdbthread.h (thread_info_ref, delete_thread)
1156 (delete_thread_silent, first_thread_of_inferior)
1157 (any_thread_of_inferior, switch_to_thread)
1158 (enable_thread_stack_temporaries)
1159 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1160 (get_last_thread_stack_temporary)
1161 (value_in_thread_stack_temporaries, can_access_registers_thread):
1162 Spell out "struct thread_info" instead of just "thread_info".
1163 * inferior.h (notice_new_inferior): Likewise.
1165 2018-06-25 Pedro Alves <palves@redhat.com>
1167 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1168 pass thread_info pointer to delete_thread.
1169 (windows_nat_target::detach): Pass inferior pointer to
1171 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1173 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1174 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1175 and pass a thread_info pointer to delete_thread.
1176 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1177 pass thread_info pointer to delete_thread.
1178 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1179 delete_thread_silent call.
1180 * procfs.c (procfs_target::detach): Pass inferior pointer to
1182 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1183 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1184 delete_thread_silent call.
1185 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1186 pass thread_info pointer to delete_thread.
1187 (windows_nat_target::detach): Pass inferior pointer to
1190 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1192 * regcache.c (readable_regcache::read_part): Fix asserts.
1193 (reg_buffer::raw_collect_part): New function.
1194 (regcache::write_part): Fix asserts.
1195 (reg_buffer::raw_supply_part): New function.
1196 (regcache::transfer_regset_register): New helper function.
1197 (regcache::transfer_regset): Call new functions.
1198 (regcache_supply_regset): Use gdb_byte*.
1199 (regcache::supply_regset): Likewise.
1200 (regcache_collect_regset): Likewise.
1201 (regcache::collect_regset): Likewise.
1202 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1203 (reg_buffer::raw_supply_part): Likewise.
1204 (regcache::transfer_regset_register): Likewise.
1205 (regcache::transfer_regset): Use gdb_byte*.
1207 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1209 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1211 2018-06-21 Pedro Alves <palves@redhat.com>
1213 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1214 instead of a ptid_t. All callers adjusted.
1215 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1217 (print_ada_task_info, display_current_task_id, task_command_1):
1219 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1221 (breakpoint_kind): Adjust.
1222 (remove_breakpoints_pid): Rename to ...
1223 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1224 pointer. All callers adjusted.
1225 (bpstat_clear_actions): Use inferior_thread.
1226 (get_bpstat_thread): New.
1227 (bpstat_do_actions): Use it.
1228 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1229 to take a thread_info pointer. All callers adjusted.
1230 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1231 (breakpoint_re_set_thread): Use inferior_thread.
1232 * breakpoint.h (struct inferior): Forward declare.
1233 (bpstat_stop_status): Update.
1234 (remove_breakpoints_pid): Delete.
1235 (remove_breakpoints_inf): New.
1236 * bsd-uthread.c (bsd_uthread_target::wait)
1237 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1238 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1239 (maint_btrace_packet_history_cmd)
1240 (maint_btrace_clear_packet_history_cmd): Adjust.
1241 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1243 * cli/cli-interp.c: Include "inferior.h".
1244 * common/refcounted-object.h (struct
1245 refcounted_object_ref_policy): New.
1246 * compile/compile-object-load.c: Include gdbthread.h.
1247 (store_regs): Use inferior_thread.
1248 * corelow.c (core_target::close): Use current_inferior.
1249 (core_target_open): Adjust to use first_thread_of_inferior and use
1250 the current inferior.
1251 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1252 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1253 <thread>: ... this new field. All references adjusted.
1254 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1255 Take a thread_info pointer instead of a ptid_t.
1256 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1257 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1258 thread_info pointer instead of a ptid_t.
1259 * elfread.c: Include "inferior.h".
1260 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1261 Use inferior_thread.
1262 * eval.c (evaluate_subexp): Likewise.
1263 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1265 * gdb_proc_service.h (struct thread_info): Forward declare.
1266 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1267 <thread>: ... this new field. All references adjusted.
1268 * gdbarch.h, gdbarch.c: Regenerate.
1269 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1270 'thread' parameter. All implementations and callers adjusted.
1271 * gdbthread.h (thread_info) <set_running>: New method.
1272 (delete_thread, delete_thread_silent): Take a thread_info pointer
1274 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1275 (first_thread_of_process): Delete, replaced by ...
1276 (first_thread_of_inferior): ... this new function. All callers
1278 (any_live_thread_of_process): Delete, replaced by ...
1279 (any_live_thread_of_inferior): ... this new function. All callers
1281 (switch_to_thread, switch_to_no_thread): Declare.
1282 (is_executing): Delete.
1283 (enable_thread_stack_temporaries): Update comment.
1284 <enable_thread_stack_temporaries>: Take a thread_info pointer
1285 instead of a ptid_t. Incref the thread.
1286 <~enable_thread_stack_temporaries>: Decref the thread.
1289 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1290 (get_last_thread_stack_temporary)
1291 (value_in_thread_stack_temporaries, can_access_registers_thread):
1292 Take a thread_info pointer instead of a ptid_t. All callers
1294 * infcall.c (get_call_return_value): Use inferior_thread.
1295 (run_inferior_call): Work with thread pointers instead of ptid_t.
1296 (call_function_by_hand_dummy): Work with thread pointers instead
1297 of ptid_t. Use thread_info_ref.
1298 * infcmd.c (proceed_thread_callback): Access thread's state
1300 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1301 access thread's state directly.
1302 (continue_command): Use inferior_thread.
1303 (info_program_command): Use find_thread_ptid and access thread
1305 (proceed_after_attach_callback): Use thread state directly.
1306 (notice_new_inferior): Take a thread_info pointer instead of a
1307 ptid_t. All callers adjusted.
1308 (exit_inferior): Take an inferior pointer instead of a pid. All
1310 (exit_inferior_silent): New.
1311 (detach_inferior): Delete.
1312 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1313 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1314 (detach_inferior_command, kill_inferior_command): Use
1315 find_inferior_id instead of valid_gdb_inferior_id and
1316 gdb_inferior_id_to_pid.
1317 (inferior_command): Use inferior and thread pointers.
1318 * inferior.h (struct thread_info): Forward declare.
1319 (notice_new_inferior): Take a thread_info pointer instead of a
1320 ptid_t. All callers adjusted.
1321 (detach_inferior): Delete declaration.
1322 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1323 instead of a pid. All callers adjusted.
1324 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1325 (valid_gdb_inferior_id): Delete.
1326 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1327 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1328 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1330 <inf>: ... this new field.
1331 <step_ptid>: Delete, replaced by ...
1332 <step_thread>: ... this new field.
1333 (get_displaced_stepping_state): Take an inferior pointer instead
1334 of a pid. All callers adjusted.
1335 (displaced_step_in_progress_any_inferior): Adjust.
1336 (displaced_step_in_progress_thread): Take a thread pointer instead
1337 of a ptid_t. All callers adjusted.
1338 (displaced_step_in_progress, add_displaced_stepping_state): Take
1339 an inferior pointer instead of a pid. All callers adjusted.
1340 (get_displaced_step_closure_by_addr): Adjust.
1341 (remove_displaced_stepping_state): Take an inferior pointer
1342 instead of a pid. All callers adjusted.
1343 (displaced_step_prepare_throw, displaced_step_prepare)
1344 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1345 All callers adjusted.
1346 (start_step_over): Adjust.
1347 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1348 displaced step queue.
1349 (do_target_resume): Adjust.
1350 (fetch_inferior_event): Use inferior_thread.
1351 (context_switch, get_inferior_stop_soon): Take an
1352 execution_control_state pointer instead of a ptid_t. All callers
1354 (switch_to_thread_cleanup): Delete.
1355 (stop_all_threads): Use scoped_restore_current_thread.
1356 * inline-frame.c: Include "gdbthread.h".
1357 (inline_state) <inline_state>: Take a thread pointer instead of a
1358 ptid_t. All callers adjusted.
1359 <ptid>: Delete, replaced by ...
1360 <thread>: ... this new field.
1361 (find_inline_frame_state): Take a thread pointer instead of a
1362 ptid_t. All callers adjusted.
1363 (skip_inline_frames, step_into_inline_frame)
1364 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1365 pointer instead of a ptid_t. All callers adjusted.
1366 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1367 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1368 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1370 * linux-nat.c (get_detach_signal): Likewise.
1371 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1372 (thread_db_notice_clone): Adjust.
1373 (thread_db_find_new_threads_silently)
1374 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1375 a thread pointer instead of a ptid_t. All callers adjusted.
1376 * mi/mi-cmd-var.c: Include "inferior.h".
1377 (mi_cmd_var_update_iter): Update to use thread pointers.
1378 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1380 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1382 (mi_output_running): ... this new function.
1383 (mi_on_resume_1): Adjust to use it.
1384 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1385 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1387 (interrupt_thread_callback): : Adjust to use thread and inferior
1389 * proc-service.c: Include "gdbthread.h".
1390 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1391 * progspace-and-thread.c: Include "inferior.h".
1392 * progspace.c: Include "inferior.h".
1393 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1394 hold a reference to an inferior_object.
1395 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1397 * python/py-inferior.c (struct inferior_object): Give the type a
1398 tag name instead of a typedef.
1399 (python_on_normal_stop): No need to check if the current thread is
1401 (inferior_to_inferior_object): Change return type to
1402 inferior_object. All callers adjusted.
1403 (find_thread_object): Delete, bits factored out to ...
1404 (thread_to_thread_object): ... this new function.
1405 * python/py-infthread.c (create_thread_object): Use
1406 inferior_to_inferior_object.
1407 (thpy_is_stopped): Use thread pointer directly.
1408 (gdbpy_selected_thread): Use inferior_thread.
1409 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1410 field, replaced with ...
1411 <thread>: ... this new field. All users adjusted.
1412 (btpy_insn_or_gap_new): Drop const.
1413 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1415 * python/py-record.c: Include "gdbthread.h".
1416 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1417 a ptid_t. All callers adjusted.
1418 (gdbpy_current_recording): Use inferior_thread.
1419 * python/py-record.h (recpy_record_object) <ptid>: Delete
1420 field, replaced with ...
1421 <thread>: ... this new field. All users adjusted.
1422 (recpy_element_object) <ptid>: Delete
1423 field, replaced with ...
1424 <thread>: ... this new field. All users adjusted.
1425 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1426 a ptid_t. All callers adjusted.
1427 * python/py-threadevent.c: Include "gdbthread.h".
1428 (get_event_thread): Use thread_to_thread_object.
1429 * python/python-internal.h (struct inferior_object): Forward
1431 (find_thread_object, find_inferior_object): Delete declarations.
1432 (thread_to_thread_object, inferior_to_inferior_object): New
1434 * record-btrace.c: Include "inferior.h".
1435 (require_btrace_thread): Use inferior_thread.
1436 (record_btrace_frame_sniffer)
1437 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1438 (get_thread_current_frame): Use scoped_restore_current_thread and
1440 (get_thread_current_frame): Use thread pointer directly.
1441 (record_btrace_replay_at_breakpoint): Use thread's inferior
1443 * record-full.c: Include "inferior.h".
1444 * regcache.c: Include "gdbthread.h".
1445 (get_thread_arch_regcache): Use the inferior's address space
1447 (get_thread_regcache, registers_changed_thread): New.
1448 * regcache.h (get_thread_regcache(thread_info *thread)): New
1450 (registers_changed_thread): New.
1451 (remote_target) <remote_detach_1>: Swap order of parameters.
1452 (remote_add_thread): <remote_add_thread>: Return the new thread.
1453 (get_remote_thread_info(ptid_t)): New overload.
1454 (remote_target::remote_notice_new_inferior): Use thread pointers
1456 (remote_target::process_initial_stop_replies): Use
1457 thread_info::set_running.
1458 (remote_target::remote_detach_1, remote_target::detach)
1459 (extended_remote_target::detach): Adjust.
1460 * stack.c (frame_show_address): Use inferior_thread.
1461 * target-debug.h (target_debug_print_thread_info_pp): New.
1462 * target-delegates.c: Regenerate.
1463 * target.c (default_thread_address_space): Delete.
1464 (memory_xfer_partial_1): Use current_inferior.
1465 (target_detach): Use current_inferior.
1466 (target_thread_address_space): Delete.
1467 (generic_mourn_inferior): Use current_inferior.
1468 * target.h (struct target_ops) <thread_address_space>: Delete.
1469 (target_thread_address_space): Delete.
1470 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1472 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1473 thread pointer instead of a ptid_t. Adjust all callers.
1474 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1475 (first_thread_of_process): Delete, replaced by ...
1476 (first_thread_of_inferior): ... this new function. All callers
1478 (any_thread_of_process): Rename to ...
1479 (any_thread_of_inferior): ... this, and take an inferior pointer.
1480 (any_live_thread_of_process): Rename to ...
1481 (any_live_thread_of_inferior): ... this, and take an inferior
1483 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1484 (value_in_thread_stack_temporaries)
1485 (get_last_thread_stack_temporary): Take a thread pointer instead
1486 of a ptid_t. Adjust all callers.
1487 (thread_info::set_running): New.
1488 (validate_registers_access): Use inferior_thread.
1489 (can_access_registers_ptid): Rename to ...
1490 (can_access_registers_thread): ... this, and take a thread
1492 (print_thread_info_1): Adjust to compare thread pointers instead
1494 (switch_to_no_thread, switch_to_thread): Make extern.
1495 (scoped_restore_current_thread::~scoped_restore_current_thread):
1496 Use m_thread pointer directly.
1497 (scoped_restore_current_thread::scoped_restore_current_thread):
1498 Use inferior_thread.
1499 (thread_command): Use thread pointer directly.
1500 (thread_num_make_value_helper): Use inferior_thread.
1501 * top.c (execute_command): Use inferior_thread.
1502 * tui/tui-interp.c: Include "inferior.h".
1503 * varobj.c (varobj_create): Use inferior_thread.
1504 (value_of_root_1): Use find_thread_global_id instead of
1505 global_thread_id_to_ptid.
1507 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1509 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1511 (regcache::write_part): Likewise.
1512 (readable_regcache::cooked_read_part): Update comment.
1513 (readable_regcache::cooked_write_part): Likewise.
1514 * regcache.h: (readable_regcache::read_part): Likewise.
1515 (regcache::write_part): Likewise.
1517 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1518 Dirk Schubert <dirk.schubert@arm.com>
1520 * aarch64-linux-nat.c (post_attach): New.
1521 (aarch64_linux_nat_target::post_attach): Override post_attach to
1522 record the number of hardware debug registers.
1524 2018-06-20 Tom Tromey <tom@tromey.com>
1526 * python/py-param.c (add_setshow_generic): Make parameters const.
1527 (parmpy_init): Update.
1529 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1531 * regcache.h (regcache_cooked_read_ftype): Rename to...
1532 (register_read_ftype): ...this, change type to function_view.
1533 (class reg_buffer) <save>: Remove src parameter.
1534 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1535 parameter non-const in first overload. Remove src parameter in
1537 * regcache.c (do_cooked_read): Remove.
1538 (readonly_detached_regcache::readonly_detached_regcache): Make
1539 parameter non-const, adjust call to other constructor.
1540 (reg_buffer::save): Remove src parameter.
1541 * frame.c (do_frame_register_read): Remove.
1542 (frame_save_as_regcache): Use lambda function.
1543 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1544 parameter to ppu2spu_data *.
1545 (ppu2spu_sniffer): Use lambda function.
1547 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1549 * record-full.c (record_full_target::insert_breakpoint): Remove
1550 "struct" keyword, add const.
1552 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1554 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1555 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1556 * configure.ac: Remove AC_PREREQ, add missing quoting.
1557 * gnulib/configure.ac: Modernize usage of
1558 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1559 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1560 (AUTOMAKE_VERSION): Bump to 1.15.1.
1561 * configure: Re-generate.
1562 * config.in: Re-generate.
1563 * aclocal.m4: Re-generate.
1564 * gnulib/aclocal.m4: Re-generate.
1565 * gnulib/config.in: Re-generate.
1566 * gnulib/configure: Re-generate.
1567 * gnulib/import/Makefile.in: Re-generate.
1569 2018-06-19 Pedro Alves <palves@redhat.com>
1571 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1572 (lookup_minimal_symbol_by_pc_section): ... here with
1573 gdb_assert_not_reached added.
1575 2018-06-19 Pedro Alves <palves@redhat.com>
1577 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1578 parameter with a block parameter. Compare location's block symbol
1579 with the frame's block instead of addresses.
1580 (skip_inline_frames): Pass the current block instead of the
1581 frame's address. Break out as soon as we determine the frame
1582 should not be skipped.
1584 2018-06-18 Tom Tromey <tom@tromey.com>
1586 * solib-aix.c (solib_aix_get_section_offsets): Return
1588 (solib_aix_solib_create_inferior_hook): Update.
1590 2018-06-18 Tom Tromey <tom@tromey.com>
1592 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1594 2018-06-18 Tom Tromey <tom@tromey.com>
1596 * solib-frv.c (frv_relocate_main_executable): Use
1598 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1601 2018-06-18 Tom Tromey <tom@tromey.com>
1603 * objfiles.h (inhibit_section_map_updates): Update.
1604 (resume_section_map_updates, resume_section_map_updates_cleanup):
1606 * solib-svr4.c (svr4_handle_solib_event): Update.
1607 * objfiles.c (inhibit_section_map_updates): Return
1608 scoped_restore_tmpl<int>.
1609 (resume_section_map_updates, resume_section_map_updates_cleanup):
1612 2018-06-18 Tom Tromey <tom@tromey.com>
1614 * valprint.h (read_string): Update.
1615 * valprint.c (read_string): Change type of "buffer".
1616 (val_print_string): Update.
1617 * python/py-value.c (valpy_string): Update.
1618 * language.h (struct language_defn) <la_get_string>: Change
1620 (default_get_string, c_get_string): Update.
1621 * language.c (default_get_string): Change type of "buffer".
1622 * guile/scm-value.c (gdbscm_value_to_string): Update.
1623 * c-lang.c (c_get_string): Change type of "buffer".
1625 2018-06-18 Tom Tromey <tom@tromey.com>
1627 * ser-mingw.c (struct pipe_state_destroyer): New.
1628 (pipe_state_up): New typedef.
1629 (cleanup_pipe_state): Remove.
1630 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1632 2018-06-18 Tom Tromey <tom@tromey.com>
1634 * rust-lang.h (rust_yyerror): Don't declare.
1635 * rust-lang.c (rust_language_defn): Update.
1636 * rust-exp.y (yyerror): Now static.
1637 * parse.c (parse_exp_in_context_1): Update.
1638 * p-lang.h (p_yyerror): Don't declare.
1639 * p-lang.c (p_language_defn): Update.
1640 * p-exp.y (yyerror): Now static.
1641 * opencl-lang.c (opencl_language_defn): Update.
1642 * objc-lang.c (objc_language_defn): Update.
1643 * m2-lang.h (m2_yyerror): Don't declare.
1644 * m2-lang.c (m2_language_defn): Update.
1645 * m2-exp.y (yyerror): Now static.
1646 * language.h (struct language_defn) <la_error>: Remove.
1647 * language.c (unk_lang_error): Remove.
1648 (unknown_language_defn, auto_language_defn): Remove.
1649 * go-lang.h (go_yyerror): Don't declare.
1650 * go-lang.c (go_language_defn): Update.
1651 * go-exp.y (yyerror): Now static.
1652 * f-lang.h (f_yyerror): Don't declare.
1653 * f-lang.c (f_language_defn): Update.
1654 * f-exp.y (yyerror): Now static.
1655 * d-lang.h (d_yyerror): Don't declare.
1656 * d-lang.c (d_language_defn): Update.
1657 * d-exp.y (yyerror): Now static.
1658 * c-lang.h (c_yyerror): Don't declare.
1659 * c-lang.c (c_language_defn, cplus_language_defn)
1660 (asm_language_defn, minimal_language_defn): Update.
1661 * c-exp.y (yyerror): Now static.
1662 * ada-lang.h (ada_yyerror): Don't declare.
1663 * ada-lang.c (ada_language_defn): Update.
1664 * ada-exp.y (yyerror): Now static.
1666 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1668 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1669 (store_sveregs_to_thread): Likewise.
1670 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1671 (aarch64_linux_store_inferior_registers): Likewise.
1672 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1674 (aarch64_sve_regs_copy_to_regcache): Likewise.
1675 (aarch64_sve_regs_copy_from_regcache): Likewise.
1676 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1678 (aarch64_sve_regs_copy_to_regcache): Likewise.
1679 (aarch64_sve_regs_copy_from_regcache): Likewise.
1680 (sve_context): Structure from Linux headers.
1681 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1682 (SVE_SIG_ZREG_SIZE): Likewise.
1683 (SVE_SIG_PREG_SIZE): Likewise.
1684 (SVE_SIG_FFR_SIZE): Likewise.
1685 (SVE_SIG_REGS_OFFSET): Likewise.
1686 (SVE_SIG_ZREGS_OFFSET): Likewise.
1687 (SVE_SIG_ZREG_OFFSET): Likewise.
1688 (SVE_SIG_ZREGS_SIZE): Likewise.
1689 (SVE_SIG_PREGS_OFFSET): Likewise.
1690 (SVE_SIG_PREG_OFFSET): Likewise.
1691 (SVE_SIG_PREGS_SIZE): Likewise.
1692 (SVE_SIG_FFR_OFFSET): Likewise.
1693 (SVE_SIG_REGS_SIZE): Likewise.
1694 (SVE_SIG_CONTEXT_SIZE): Likewise.
1695 (SVE_PT_REGS_MASK): Likewise.
1696 (SVE_PT_REGS_FPSIMD): Likewise.
1697 (SVE_PT_REGS_SVE): Likewise.
1698 (SVE_PT_VL_INHERIT): Likewise.
1699 (SVE_PT_VL_ONEXEC): Likewise.
1700 (SVE_PT_REGS_OFFSET): Likewise.
1701 (SVE_PT_FPSIMD_OFFSET): Likewise.
1702 (SVE_PT_FPSIMD_SIZE): Likewise.
1703 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1704 (SVE_PT_SVE_PREG_SIZE): Likewise.
1705 (SVE_PT_SVE_FFR_SIZE): Likewise.
1706 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1707 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1708 (__SVE_SIG_TO_PT): Likewise.
1709 (SVE_PT_SVE_OFFSET): Likewise.
1710 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1711 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1712 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1713 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1714 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1715 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1716 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1717 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1718 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1719 (SVE_PT_SVE_SIZE): Likewise.
1720 (SVE_PT_SIZE): Likewise.
1721 (HAS_SVE_STATE): New define.
1723 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1725 * nat/aarch64-sve-linux-sigcontext.h: New file.
1726 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1728 (SVE_VQ_MIN): Likewise.
1729 (SVE_VQ_MAX): Likewise.
1730 (SVE_VL_MIN): Likewise.
1731 (SVE_VL_MAX): Likewise.
1732 (SVE_NUM_ZREGS): Likewise.
1733 (SVE_NUM_PREGS): Likewise.
1734 (sve_vl_valid): Likewise.
1735 (struct user_sve_header): Likewise.
1737 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1738 Richard Bunt <Richard.Bunt@arm.com>
1740 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1741 was requested by GDB.
1743 2018-06-15 Tom de Vries <tdevries@suse.de>
1745 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1747 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1749 * gnulib/update-gnulib.sh: Print expected versions of
1752 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1754 * arch-utils.c (default_type_align): Use type_length_units.
1755 * gdbtypes.c (type_align): Use type_length_units.
1757 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1759 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1760 of 'define' command.
1762 2018-06-14 Tom de Vries <tdevries@suse.de>
1765 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1766 get_no_prettyformat_print_options.
1768 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1770 * sparc-nat.h: Include target.h.
1771 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1772 <fetch_registers>: Remove this argument in function call.
1773 <store_registers>: Remove this argument in function call, remove
1775 <low_forget_process>: Call sparc64_forget_process instead of
1776 sparc_forget_process.
1778 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1780 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1781 (procfs_target::make_corefile_notes): Adjust to new
1782 target_read_alloc return type.
1784 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1785 Stephen Roberts <stephen.roberts@arm.com>
1788 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1789 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1790 Move should_notify_stop local into more inner scope.
1792 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1793 Stephen Roberts <stephen.roberts@arm.com>
1796 * infrun.c (resume_1): Add call to mark_async_event_handler.
1798 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1800 * infrun.c (do_target_wait): Change old version of $pc printed.
1802 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1804 * dwarf2read.c (read_index_from_section): Rename to...
1805 (read_gdb_index_from_section): ... this, update all callers.
1806 (dwarf2_read_index): Rename to...
1807 (dwarf2_read_gdb_index): ... this, update all callers.
1809 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1811 * gdb/hppa-linux-nat.c
1812 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1813 hppa_linux_nat_target::fetch_registers.
1815 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1817 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1818 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1819 (AARCH64_DWARF_SVE_FFR): Likewise.
1820 (AARCH64_DWARF_SVE_P0): Likewise.
1821 (AARCH64_DWARF_SVE_Z0): Likewise.
1823 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1825 * common/common-regcache.h (raw_compare): New function.
1826 * regcache.c (regcache::raw_compare): Likewise.
1827 * regcache.h (regcache::raw_compare): New declaration.
1829 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1831 * common/common-regcache.h (reg_buffer_common): New structure.
1832 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1833 (reg_buffer::raw_supply): Likewise.
1834 (reg_buffer::raw_supply_integer): Likewise.
1835 (reg_buffer::raw_supply_zeroed): Likewise.
1836 (reg_buffer::raw_collect): Likewise.
1837 (reg_buffer::raw_collect_integer): Likewise.
1838 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1839 (reg_buffer::raw_supply): Likewise.
1840 (reg_buffer::raw_supply_integer): Likewise.
1841 (reg_buffer::raw_supply_zeroed): Likewise.
1842 (reg_buffer::raw_collect): Likewise.
1843 (reg_buffer::raw_collect_integer): Likewise.
1845 2018-06-10 Tom Tromey <tom@tromey.com>
1847 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1848 (class remote_state) <stop_reply_queue>: Now std::vector.
1849 (remote_state::~remote_state)
1850 (remote_target::stop_reply_queue_length): Update.
1851 (struct queue_iter_param, remove_child_of_pending_fork)
1852 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1853 (check_pending_event_prevents_wildcard_vcont_callback)
1854 (remove_stop_reply_for_inferior)
1855 (remove_stop_reply_of_remote_state)
1856 (remote_notif_remove_once_on_match)
1857 (stop_reply_match_ptid_and_ws)
1858 (remote_kill_child_of_pending_fork): Remove.
1859 (remote_target::remove_new_fork_children)
1860 (remote_target::check_pending_events_prevent_wildcard_vcont)
1861 (remote_target::discard_pending_stop_replies)
1862 (remote_target::discard_pending_stop_replies_in_queue)
1863 (remote_target::remote_notif_remove_queued_reply)
1864 (remote_target::queued_stop_reply)
1865 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1866 (remote_target::wait, remote_target::kill_new_fork_children)
1867 (remote_target::async): Update.
1869 2018-06-10 Tom Tromey <tom@tromey.com>
1871 * record-full.c (record_full_arch_list_cleanups): Remove.
1872 (record_full_message): Use try/catch.
1873 (record_full_wait_cleanups): Remove.
1874 (record_full_wait_1): Use try/catch.
1875 (record_full_restore): Likewise.
1877 2018-06-10 Tom Tromey <tom@tromey.com>
1879 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1880 declare VEC. Add constructor.
1881 <in_target_beneath>: Now bool.
1882 (record_full_breakpoints): Now a std::vector, static.
1883 (record_full_sync_record_breakpoints)
1884 (record_full_init_record_breakpoints)
1885 (record_full_target::insert_breakpoint)
1886 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1888 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1890 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1891 * serial.c (serial_interface_lookup): Remove struct keyword.
1893 2018-06-10 Tom Tromey <tom@tromey.com>
1895 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1897 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1899 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1901 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1902 "beneath" as a method.
1903 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1904 Use "beneath" as a method.
1906 2018-06-10 Tom Tromey <tom@tromey.com>
1908 * tracefile.c (struct trace_file_writer_deleter): New.
1909 <operator()>: Rename from trace_file_writer_xfree.
1910 (trace_file_writer_up): New typedef.
1911 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1913 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1915 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1916 <m_registers, m_register_status>: Change type to
1918 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1921 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1923 * common/common-regcache.h (enum register_status): Add
1924 underlying type "signed char".
1925 * regcache.h (reg_buffer) <m_register_status>: Change type to
1927 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1928 register_status instead of signed char.
1929 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1930 (reg_buffer::get_register_status): Remove cast.
1931 (readable_regcache::raw_read): Remove cast.
1932 (readable_regcache::cooked_read): Remove cast.
1934 2018-06-09 Tom Tromey <tom@tromey.com>
1936 * source.c (reverse_search_command, forward_search_command): Use
1939 2018-06-09 Tom Tromey <tom@tromey.com>
1941 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1942 (serial_ops_list): Now static, std::vector.
1943 (serial_interface_lookup, serial_add_interface): Update.
1945 2018-06-09 Tom Tromey <tom@tromey.com>
1947 * dwarf2read.c (process_cu_includes): Update.
1948 (process_full_comp_unit): Update.
1949 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1952 2018-06-08 Paul Koning <paul_koning@dell.com>
1956 * python/python.c (do_start_initialization):
1957 Avoid call to internal Python API.
1958 (init__gdb_module): New function.
1960 2018-06-08 Gary Benson <gbenson@redhat.com>
1962 * linux-thread-db.c (valprint.h): New include.
1963 (struct check_thread_db_info): New structure.
1964 (check_thread_db_on_load, tdb_testinfo): New static globals.
1965 (check_thread_db, check_thread_db_callback): New functions.
1966 (try_thread_db_load_1): Run integrity checks if requested.
1967 (maintenance_check_libthread_db): New function.
1968 (_initialize_thread_db): Register "maint check libthread-db"
1969 and "maint set/show check-libthread-db".
1970 * NEWS: Mention the above new commands.
1972 2018-06-08 Tom Tromey <tom@tromey.com>
1974 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1977 2018-06-08 Tom Tromey <tom@tromey.com>
1979 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1981 2018-06-08 Tom Tromey <tom@tromey.com>
1983 * common/btrace-common.h (struct btrace_data): Add constructor,
1984 destructor, move assignment operator.
1985 <empty, clear, fini>: New methods.
1986 <format>: Initialize.
1987 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1988 (btrace_data_empty): Don't declare.
1989 * common/btrace-common.c (btrace_data_init): Remove.
1990 (btrace_data::fini): Rename from btrace_data_fini.
1991 (btrace_data::empty): Rename from btrace_data_empty.
1992 (btrace_data::clear): Rename from btrace_data_clear. Return
1994 * btrace.h (make_cleanup_btrace_data): Don't declare.
1995 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1996 (parse_xml_btrace): Update.
1997 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1998 (maint_btrace_clear_packet_history_cmd): Update.
2000 2018-06-07 Pedro Alves <palves@redhat.com>
2002 * target.h (target_ops) <beneath>: Now a method. All references
2004 (class target_stack): New.
2005 * target.c (g_target_stack): New.
2006 (g_current_top_target): Delete.
2007 (current_top_target): Get the top target out of g_target_stack.
2008 (target_stack::push, target_stack::unpush): New.
2009 (push_target, unpush_target): Reimplement.
2010 (target_is_pushed): Reimplement in terms of g_target_stack.
2011 (target_ops::beneath, target_stack::find_beneath): New.
2013 2018-06-07 Pedro Alves <palves@redhat.com>
2015 * target.h (find_target_beneath): Delete declaration.
2016 * target.c (find_target_beneath): Delete definition.
2017 * aix-thread.c: All callers of find_target_beneath adjusted to
2018 call target_ops::beneath instead.
2019 * bsd-uthread.c: Likewise.
2020 * linux-thread-db.c: Likewise.
2021 * ravenscar-thread.c: Likewise.
2022 * sol-thread.c: Likewise.
2023 * spu-multiarch.c: Likewise.
2025 2018-06-07 Pedro Alves <palves@redhat.com>
2027 * target.h (target_ops) <beneath>: Now a method. All references
2029 (target_ops) <m_beneath>: New.
2030 * target.c (target_ops::beneath): New.
2031 * corelow.c: Adjust all references to target_ops::beneath.
2032 * linux-thread-db.c: Likewise.
2033 * make-target-delegates: Likewise.
2034 * record-btrace.c: Likewise.
2035 * record-full.c: Likewise.
2036 * remote.c: Likewise.
2037 * target.c: Likewise.
2038 * target-delegates.c: Regenerate.
2040 2018-06-07 Pedro Alves <palves@redhat.com>
2042 * target.h (target_stack): Delete.
2043 (current_top_target): Declare function.
2044 * target.c (target_stack): Delete.
2045 (g_current_top_target): New.
2046 (current_top_target): New function.
2047 * auxv.c: Use current_top_target instead of target_stack
2049 * avr-tdep.c: Likewise.
2050 * breakpoint.c: Likewise.
2051 * corefile.c: Likewise.
2052 * elfread.c: Likewise.
2054 * exceptions.c: Likewise.
2055 * frame.c: Likewise.
2056 * gdbarch-selftests.c: Likewise.
2057 * gnu-v3-abi.c: Likewise.
2058 * ia64-tdep.c: Likewise.
2059 * ia64-vms-tdep.c: Likewise.
2060 * infcall.c: Likewise.
2061 * infcmd.c: Likewise.
2062 * infrun.c: Likewise.
2063 * linespec.c: Likewise.
2064 * linux-tdep.c: Likewise.
2065 * minsyms.c: Likewise.
2066 * ppc-linux-nat.c: Likewise.
2067 * ppc-linux-tdep.c: Likewise.
2068 * procfs.c: Likewise.
2069 * regcache.c: Likewise.
2070 * remote.c: Likewise.
2071 * rs6000-tdep.c: Likewise.
2072 * s390-linux-nat.c: Likewise.
2073 * s390-tdep.c: Likewise.
2074 * solib-aix.c: Likewise.
2075 * solib-darwin.c: Likewise.
2076 * solib-dsbt.c: Likewise.
2077 * solib-spu.c: Likewise.
2078 * solib-svr4.c: Likewise.
2079 * solib-target.c: Likewise.
2080 * sparc-tdep.c: Likewise.
2081 * sparc64-tdep.c: Likewise.
2082 * spu-tdep.c: Likewise.
2083 * symfile.c: Likewise.
2084 * symtab.c: Likewise.
2085 * target-descriptions.c: Likewise.
2086 * target-memory.c: Likewise.
2087 * target.c: Likewise.
2088 * target.h: Likewise.
2089 * tracefile-tfile.c: Likewise.
2090 * tracepoint.c: Likewise.
2091 * valops.c: Likewise.
2092 * valprint.c: Likewise.
2093 * value.c: Likewise.
2094 * windows-tdep.c: Likewise.
2095 * mi/mi-main.c: Likewise.
2097 2018-06-07 Tom Tromey <tom@tromey.com>
2099 * valprint.h (build_address_symbolic): Declare.
2100 * printcmd.c (print_address_symbolic): Update.
2101 (build_address_symbolic): Change "name" and "filename" to
2103 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2105 * defs.h (build_address_symbolic): Remove declaration.
2107 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2109 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2110 (aarch64_vnv_type): Add function.
2111 (aarch64_pseudo_register_name): Add V regs for SVE.
2112 (aarch64_pseudo_register_type): Likewise.
2113 (aarch64_pseudo_register_reggroup_p): Likewise.
2114 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2115 (aarch64_pseudo_read_value): Add V regs for SVE.
2116 (aarch64_pseudo_write_2): Use V0 offset for SVE
2117 (aarch64_pseudo_write): Add V regs for SVE.
2118 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2120 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2122 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2123 (sve_vl_from_vq): Likewise.
2125 2018-06-05 Tom Tromey <tom@tromey.com>
2127 * cli/cli-cmds.c (show_version): Update.
2128 * top.c (print_gdb_version): Add "interactive" parameter.
2130 * main.c (captured_main_1): Update.
2131 * top.h (print_gdb_version): Add "interactive" parameter and a
2134 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2136 * common/enum-flags.h: Add trailing semicolon to example in
2139 2018-06-05 Tom Tromey <tom@tromey.com>
2142 * NEWS: Add entry about pager.
2143 * utils.c (pagination_disabled_for_command): New global.
2144 (prompt_for_continue): Allow "c" response to prompt.
2145 (reinitialize_more_filter): Clear
2146 pagination_disabled_for_command.
2147 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2149 2018-06-04 Tom Tromey <tom@tromey.com>
2151 * ada-lang.h (ada_lookup_symbol_list): Update.
2152 * ada-lang.c (resolve_subexp): Update.
2153 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2155 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2156 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2157 results parameter to std::vector.
2158 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2160 * ada-exp.y (block_lookup): Update.
2161 (select_possible_type_sym): Change type of syms. Remove nsyms
2163 (write_var_or_type, write_name_assoc): Update.
2165 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2167 * windows-nat.c (windows_nat_target::xfer_partial): Return
2168 TARGET_XFER_E_IO if we need to delegate to the target beneath
2169 but BENEATH is NULL.
2171 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2173 * Makefile.in (config.status): Add configure.nat as a
2176 2018-06-04 Tom Tromey <tom@tromey.com>
2178 * cp-name-parser.y (cpname_state): Add method declarations.
2179 (HANDLE_QUAL): Update.
2180 (cpname_state::d_grab, cpname_state::fill_comp)
2181 (cpname_state::make_operator, cpname_state::make_dtor)
2182 (cpname_state::make_builtin_type, cpname_state::make_name)
2183 (cpname_state::d_qualify, cpname_state::d_int_type)
2184 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2185 (%union): Move earlier.
2187 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2189 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2191 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2193 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2194 (aarch64_pseudo_write_1): Likewise.
2195 (aarch64_pseudo_read_value): Use helper.
2196 (aarch64_pseudo_write): Likewise.
2198 2018-06-04 Pedro Alves <palves@redhat.com>
2200 * darwin-nat.c (darwin_ops): Delete.
2201 (darwin_attach_pid): Use get_native_target.
2203 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2205 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2206 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2208 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2210 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2211 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2212 (aarch64_gdbarch_init): Check for SVE.
2213 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2215 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2217 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2218 * aarch64-tdep.h (aarch64_read_description): Likewise.
2219 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2220 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2221 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2222 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2223 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2225 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2227 * value.c (value_fetch_lazy_bitfield): New.
2228 (value_fetch_lazy_memory): New.
2229 (value_fetch_lazy_register): New.
2230 (value_fetch_lazy): Factor out to smaller functions.
2232 2018-06-01 Tom Tromey <tom@tromey.com>
2234 * cp-name-parser.y (backslashable, represented): Now const.
2236 2018-06-01 Tom Tromey <tom@tromey.com>
2238 * cp-name-parser.y: Include parser-defs.h.
2239 (parser_fprintf): Remove declaration.
2241 2018-06-01 Tom Tromey <tom@tromey.com>
2243 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2245 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2246 (global_result): Remove globals.
2247 (struct cpname_state): New.
2248 (yyparse): Don't declare.
2249 (yylex, yyerror): Move declarations after %union.
2250 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2251 (make_name): Add state parameter.
2253 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2255 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2257 (yylex): Add lvalp, state parameters.
2258 (yyerror): Add state parameter.
2259 (cp_demangled_name_to_comp): Update.
2261 2018-06-01 Tom Tromey <tom@tromey.com>
2263 * cp-name-parser.y (parser_fprintf): Declare.
2264 (GDB_YY_REMAP_PREFIX): Define.
2265 Include yy-remap.h. Don't redefine yy* identifiers.
2267 2018-06-01 Tom Tromey <tom@tromey.com>
2269 * python/py-type.c (typy_legacy_template_argument): Update.
2270 * cp-support.h (cp_demangled_name_to_comp): Update.
2271 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2272 parameter to be a "std::string *".
2275 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2277 * ada-lex.l: Include "diagnostics.h" instead of
2278 "common/diagnostics.h".
2279 * unittests/environ-selftests.c: Likewise.
2280 * common/diagnostics.h: Moved to ../include.
2282 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2284 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2285 to language_mode_manual while calling breakpoint_re_set_one.
2287 2018-06-01 Tom Tromey <tom@tromey.com>
2289 * valops.c (value_cast_structs, destructor_name_p): Update.
2290 * symtab.c (gdb_mangle_name): Update.
2291 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2293 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2294 (pascal_object_print_value_fields, pascal_object_print_value):
2296 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2297 * linespec.c (find_methods): Update.
2298 * gdbtypes.h (type_name_no_tag): Remove.
2299 (type_name_or_error): Rename from type_name_no_tag_or_error.
2300 * gdbtypes.c (type_name_no_tag): Remove.
2301 (type_name_or_error): Rename from type_name_no_tag_or_error.
2302 (lookup_struct_elt_type, check_typedef): Update.
2303 * expprint.c (print_subexp_standard): Update.
2304 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2305 * d-namespace.c (d_lookup_nested_symbol): Update.
2306 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2307 (cp_print_class_member): Update.
2308 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2309 * completer.c (add_struct_fields): Update.
2310 * c-typeprint.c (cp_type_print_derivation_info)
2311 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2313 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2314 (ada_prefer_type, ada_is_exception_sym): Update.
2316 2018-06-01 Tom Tromey <tom@tromey.com>
2318 * valops.c (enum_constant_from_type, value_namespace_elt)
2319 (value_maybe_namespace_elt): Update.
2320 * valarith.c (find_size_for_pointer_math): Update.
2321 * target-descriptions.c (make_gdb_type): Update.
2322 * symmisc.c (print_symbol): Update.
2323 * stabsread.c (define_symbol, read_type)
2324 (complain_about_struct_wipeout, add_undefined_type)
2325 (cleanup_undefined_types_1): Update.
2326 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2327 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2328 (rust_internal_print_type, rust_composite_type)
2329 (rust_evaluate_funcall, rust_evaluate_subexp)
2330 (rust_inclusive_range_type_p): Update.
2331 * python/py-type.c (typy_get_tag): Update.
2332 * p-typeprint.c (pascal_type_print_base): Update.
2333 * mdebugread.c (parse_symbol, parse_type): Update.
2334 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2336 * guile/scm-type.c (gdbscm_type_tag): Update.
2337 * go-lang.c (sixg_string_p): Update.
2338 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2340 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2341 (TYPE_TAG_NAME): Remove.
2342 * gdbtypes.c (type_name_no_tag): Simplify.
2343 (check_typedef, check_types_equal, recursive_dump_type)
2344 (copy_type_recursive, arch_composite_type): Update.
2345 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2346 in summary mode when needed.
2347 * eval.c (evaluate_funcall): Update.
2348 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2349 (process_structure_scope, read_enumeration_type)
2350 (read_namespace_type, read_module_type, determine_prefix): Update.
2351 * cp-support.c (inspect_type): Update.
2352 * coffread.c (process_coff_symbol, decode_base_type): Update.
2353 * c-varobj.c (c_is_path_expr_parent): Update.
2354 * c-typeprint.c (c_type_print_base_struct_union): Update.
2355 (c_type_print_base_1): Update. Print struct/class/union/enum in
2356 summary when using C language.
2357 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2358 (gen_maybe_namespace_elt): Update.
2359 * ada-lang.c (ada_type_name): Simplify.
2360 (empty_record, ada_template_to_fixed_record_type_1)
2361 (template_to_static_fixed_type)
2362 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2364 2018-06-01 Tom Tromey <tom@tromey.com>
2366 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2368 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2369 (c_print_type): Update.
2370 (c_print_type): New overload.
2371 (c_type_print_varspec_prefix, c_type_print_args)
2372 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2373 (c_type_print_base_struct_union, c_type_print_base_1)
2374 (cp_type_print_method_args): Add "language" parameter.
2375 (c_type_print_base): Update.
2376 * c-lang.h (c_print_type): Add new overload.
2378 2018-06-01 Tom Tromey <tom@tromey.com>
2380 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2381 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2383 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2385 * aarch64-tdep.c (aarch64_sve_register_names): New const
2387 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2388 (AARCH64_SVE_Z_REGS_NUM): New define.
2389 (AARCH64_SVE_P_REGS_NUM): Likewise.
2390 (AARCH64_SVE_NUM_REGS): Likewise.
2392 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2394 * nat/linux-ptrace.h [__alpha__]
2395 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2398 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2400 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2401 the endianness selected.
2402 * NEWS: Document `set endian auto' mode operation update.
2404 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2406 * Makefile.in: Add new header.
2407 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2408 (sve_vl_from_vg): Likewise.
2409 (sve_vq_from_vl): Likewise.
2410 (sve_vl_from_vq): Likewise.
2411 (sve_vq_from_vg): Likewise.
2412 (sve_vg_from_vq): Likewise.
2413 * configure.nat: Add new c file.
2414 * nat/aarch64-sve-linux-ptrace.c: New file.
2415 * nat/aarch64-sve-linux-ptrace.h: New file.
2417 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2419 * aarch64-linux-nat.c (aarch64_linux_read_description):
2421 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2423 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2424 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2425 (aarch64_gdbarch_init): Add parmeter zero.
2426 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2427 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2428 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2430 * doc/gdb.texinfo: Describe SVE feature
2431 * features/aarch64-sve.c: New file.
2433 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2436 * gdbarch.sh (significant_addr_bit): Default to zero when
2437 not set by target architecture.
2438 * gdbarch.c: Re-generated.
2439 * utils.c (address_significant): Update.
2441 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2443 * stack.c (func_command): Remove trailing newline in call to error.
2445 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2447 * regcache.h (regcache_raw_collect): Remove, update callers to
2448 use regcache::raw_collect.
2449 * regcache.c (regcache_raw_collect): Remove.
2451 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2453 * regcache.h (regcache_raw_supply): Remove, update callers to
2454 use detached_regcache::raw_supply.
2455 * regcache.c (regcache_raw_supply): Remove.
2457 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2459 * regcache.h (regcache_cooked_write_part): Remove, update
2460 callers to use regcache::cooked_write_part.
2461 * regcache.c (regcache_cooked_write_part): Remove.
2463 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2465 * regcache.h (regcache_cooked_read_part): Remove, update callers
2466 to use readable_regcache::cooked_read_part.
2467 * regcache.c (regcache_cooked_read_part): Remove.
2469 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2471 * regcache.h (regcache_cooked_read_value): Remove, update
2472 callers to use readable_regcache::cooked_read_value.
2473 * regcache.c (regcache_cooked_read_value): Remove.
2475 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2477 * regcache.h (regcache_cooked_write): Remove, update callers to
2478 use regcache::cooked_write.
2479 * regcache.c (regcache_cooked_write): Remove.
2481 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2483 * regcache.h (regcache_invalidate): Remove, update callers to
2484 use detached_regcache::invalidate instead.
2485 * regcache.c (regcache_invalidate): Remove.
2487 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2489 * regcache.h (regcache_raw_write_part): Remove, update callers
2490 to use regcache::raw_write_part instead.
2491 * regcache.c (regcache_raw_write_part): Remove.
2493 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2495 * regcache.h (regcache_raw_read_part): Remove, update callers to
2496 use readable_regcache::raw_read_part instead.
2497 * regcache.c (regcache_raw_read_part): Remove.
2499 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2501 * regcache.h (regcache_cooked_read): Remove, update callers to
2502 use readable_regcache::cooked_read instead.
2503 * regcache.c (regcache_cooked_read): Remove.
2505 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2507 * regcache.h (regcache_raw_write): Remove, update callers to use
2508 regcache::raw_write instead.
2509 * regcache.c (regcache_raw_write): Remove.
2511 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2513 * regcache.h (regcache_raw_read): Remove, update callers to use
2514 readable_regcache::raw_read instead.
2515 * regcache.c (regcache_raw_read): Remove.
2517 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2519 * regcache.h (regcache_raw_update): Remove, update callers to
2520 use readable_regcache::raw_update instead.
2521 * regcache.c (regcache_raw_update): Remove.
2523 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2525 * regcache.h (regcache_register_status): Remove, update callers
2526 to use reg_buffer::get_register_status directly instead.
2527 * regcache.c (regcache_register_status): Remove.
2529 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2531 * regcache.h (regcache_get_ptid): Remove, update all callers to
2532 call regcache::ptid instead.
2533 * regcache.c (regcache_get_ptid): Remove.
2535 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2537 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2539 2018-05-30 Pedro Alves <palves@redhat.com>
2541 * common/common-exceptions.h (exception_rethrow): Use
2544 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2546 * breakpoint.c (print_solib_event, check_status_catch_solib):
2547 Remove struct keyword in range-based for loops.
2548 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2549 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2551 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2553 * symfile.c (addr_info_make_relative): Likewise.
2554 * thread.c (value_in_thread_stack_temporaries): Likewise.
2556 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2559 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2560 aggregate type to get its real type before accessing it.
2562 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2564 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2565 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2566 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2567 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2568 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2569 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2570 * printcmd.c (info_address_command): Likewise.
2572 2018-05-29 Tom Tromey <tom@tromey.com>
2574 * windows-nat.c (handle_exception): Update fall-through comment.
2576 2018-05-29 Tom Tromey <tom@tromey.com>
2578 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2579 (struct program_space) <added_solibs>: Now a std::vector.
2580 * breakpoint.c (print_solib_event): Update.
2581 (check_status_catch_solib): Update.
2582 * progspace.c (clear_program_space_solib_cache): Update.
2583 * solib.c (update_solib_list): Update.
2585 2018-05-29 Tom Tromey <tom@tromey.com>
2587 * python/py-type.c (typy_richcompare): Update.
2588 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2589 * gdbtypes.h (types_deeply_equal): Return bool.
2590 (types_equal): Likewise.
2591 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2593 (check_types_equal): Change worklist to std::vector. Return
2595 (struct type_equality_entry): Add constructor.
2596 (compare_maybe_null_strings): Return bool.
2597 (check_types_worklist): Return bool. Change worklist to
2599 (types_deeply_equal): Use std::vector.
2600 (types_equal): Return bool.
2601 (compare_maybe_null_strings): Simplify.
2603 2018-05-29 Tom Tromey <tom@tromey.com>
2605 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2607 2018-05-29 Tom Tromey <tom@tromey.com>
2609 * objc-lang.h: Don't include cp-support.h.
2610 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2613 2018-05-27 Tom Tromey <tom@tromey.com>
2615 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2617 2018-05-25 Tom Tromey <tom@tromey.com>
2619 * value.c (value::location): Initialize.
2621 2018-05-25 Tom Tromey <tom@tromey.com>
2623 * dbxread.c (init_bincl_list): Remove.
2624 (bincl_list): Now a std::vector.
2625 (bincls_allocated, next_bincl): Remove.
2626 (free_bincl_list, do_free_bincl_list_cleanup)
2627 (make_cleanup_free_bincl_list): Remove.
2628 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2630 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2631 (struct header_file_location): Add constructor.
2632 (add_bincl_to_list): Remove.
2634 2018-05-25 Tom Tromey <tom@tromey.com>
2636 * tui/tui.c (tui_enable): Update.
2637 * mi/mi-interp.c (mi_interp::init): Update.
2638 * interps.h (class interp) <name>: New method.
2639 <m_name>: Rename from name.
2640 (~scoped_restore_interp): Update.
2641 * interps.c (interp::interp): Update.
2642 (interp_add, interp_set, interp_lookup_existing)
2643 (current_interp_named_p): Update.
2645 2018-05-25 Tom Tromey <tom@tromey.com>
2647 * interps.c (interp_name): Remove.
2648 * mi/mi-interp.c (mi_interp::init): Update.
2649 * interps.h (interp_name): Remove.
2650 (~scoped_restore_interp): Update.
2651 * tui/tui.c (tui_enable): Update.
2653 2018-05-25 Tom Tromey <tom@tromey.com>
2655 * utils.c (fputs_maybe_filtered): Update.
2656 * linespec.c (decode_line_full): Update.
2657 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2658 (mi_print_breakpoint_for_event, mi_solib_loaded)
2659 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2660 (mi_user_selected_context_changed): Update.
2661 * mi/mi-main.c (mi_execute_command): Update.
2662 * cli/cli-script.c (execute_control_command): Update.
2663 * python/python.c (execute_gdb_command): Update.
2664 * solib.c (info_sharedlibrary_command): Update.
2665 * interps.c (interp_ui_out): Remove.
2666 * interps.h (interp_ui_out): Remove.
2668 2018-05-25 Tom Tromey <tom@tromey.com>
2670 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2671 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2672 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2674 2018-05-25 Tom Tromey <tom@tromey.com>
2676 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2677 * interps.c (interp_exec): Use scoped_restore.
2679 2018-05-25 Tom Tromey <tom@tromey.com>
2681 * remote.c (remote_target::remote_file_get): Use
2683 (remote_target::remote_file_put): Likewise.
2685 2018-05-25 Tom Tromey <tom@tromey.com>
2687 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2689 (get_pe_section_index, add_pe_exported_sym): Update.
2690 (read_pe_exported_syms): Use gdb::def_vector.
2692 2018-05-25 Tom Tromey <tom@tromey.com>
2694 * frame.c (remove_prev_frame): Remove.
2695 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2697 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2699 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2701 * mips-linux-nat.c (supply_fpregset): Always call
2702 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2703 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2704 `mips_fill_fpregset'.
2705 * mips-linux-tdep.c (mips_supply_fpregset)
2706 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2707 (mips_fill_fpregset_wrapper): Remove functions.
2708 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2709 (mips_linux_fpregset): Remove variable.
2710 (mips_linux_iterate_over_regset_sections): Use
2711 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2712 (mips_linux_o32_sigframe_init): Remove comment.
2714 2018-05-25 Pedro Alves <palves@redhat.com>
2716 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2717 (struct readahead_cache, struct packet_reg, struct
2718 remote_arch_state, class remote_state): Move higher up in the
2720 (remote_target::m_remote_state): Now an object instead of a pointer.
2721 (remote_target::get_remote_state): Adjust.
2723 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2725 * stack.c (select_and_print_frame): Delete.
2726 (struct function_bounds): Move struct within function.
2727 (func_command): Most content moved into new function
2728 find_frame_for_function, use new function, print result, add
2730 (find_frame_for_function): New function, now returns a result.
2732 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2734 * stack.c (iterate_over_block_arg_vars): Fix comment.
2735 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2737 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2741 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2743 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2745 * frame.h (class scoped_restore_selected_frame): New class.
2746 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2747 of any exception, use scoped_restore_selected_frame to restore the
2750 2018-05-24 Pedro Alves <palves@redhat.com>
2752 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2755 2018-05-23 Tom Tromey <tom@tromey.com>
2757 * complaints.c (struct complaints): Remove.
2758 (symfile_complaint_book): Remove.
2759 (series): New global.
2760 (complaint_internal): Update.
2761 (clear_complaints): Update.
2763 2018-05-23 Tom Tromey <tom@tromey.com>
2765 * complaints.c (counters): New global.
2766 (struct complain): Remove.
2767 (struct complaints) <root>: Remove.
2768 (complaint_sentinel): Remove.
2769 (symfile_complaint_book): Update.
2770 (find_complaint) Remove.
2771 (complaint_internal, clear_complaints): Update.
2773 2018-05-23 Tom Tromey <tom@tromey.com>
2775 * complaints.c (struct complain) <file, line>: Remove.
2776 (find_complaint): Remove file, line parameters.
2777 (complaint_internal): Update.
2779 2018-05-23 Tom Tromey <tom@tromey.com>
2781 * complaints.c (vcomplaint): Remove.
2782 (complaint_internal) Merge in contents of vcomplaint.
2784 2018-05-23 Tom Tromey <tom@tromey.com>
2786 * complaints.c (struct complaints) <explanation>: Remove.
2787 (symfile_explanations): Remove.
2788 (symfile_complaint_book): Update.
2789 (vcomplaint): Update.
2790 (struct explanation): Remove.
2792 2018-05-23 Tom Tromey <tom@tromey.com>
2794 * complaints.c (symfile_complaints): Remove.
2795 (complaint_internal): Remove "complaints" parameter.
2796 (clear_complaints, vcomplaint): Remove "c" parameter.
2797 (get_complaints): Remove.
2798 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2799 (dwarf2_debug_line_missing_file_complaint)
2800 (dwarf2_debug_line_missing_end_sequence_complaint)
2801 (dwarf2_complex_location_expr_complaint)
2802 (dwarf2_const_value_length_mismatch_complaint)
2803 (dwarf2_section_buffer_overflow_complaint)
2804 (dwarf2_macro_malformed_definition_complaint)
2805 (dwarf2_invalid_attrib_class_complaint)
2806 (create_addrmap_from_index, dw2_symtab_iter_next)
2807 (dw2_expand_marked_cus)
2808 (dw2_debug_names_iterator::find_vec_in_debug_names)
2809 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2810 (create_debug_type_hash_table, init_cutu_and_read_dies)
2811 (partial_die_parent_scope, add_partial_enumeration)
2812 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2813 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2814 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2815 (create_cus_hash_table, create_dwp_hash_table)
2816 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2817 (dwarf2_rnglists_process, dwarf2_ranges_process)
2818 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2819 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2820 (handle_struct_member_die, process_structure_scope)
2821 (read_array_type, read_common_block, read_module_type)
2822 (read_tag_pointer_type, read_typedef, read_base_type)
2823 (read_subrange_type, load_partial_dies, partial_die_info::read)
2824 (partial_die_info::read, partial_die_info::read)
2825 (partial_die_info::read, read_checked_initial_length_and_offset)
2826 (dwarf2_string_attr, read_formatted_entries)
2827 (dwarf_decode_line_header)
2828 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2829 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2830 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2831 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2832 (get_signatured_type, get_DW_AT_signature_type)
2833 (decode_locdesc, file_file_name, consume_improper_spaces)
2834 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2835 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2836 (dwarf2_symbol_mark_computed, set_die_type)
2837 (read_attribute_value): Update.
2838 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2840 * dbxread.c (unknown_symtype_complaint)
2841 (lbrac_mismatch_complaint, repeated_header_complaint)
2842 (set_namestring, function_outside_compilation_unit_complaint)
2843 (read_dbx_symtab, process_one_symbol): Update.
2844 * gdbtypes.c (stub_noname_complaint): Update.
2845 * windows-nat.c (handle_unload_dll): Update.
2846 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2847 (decode_base_type): Update.
2848 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2849 (eb_complaint, record_include_begin, record_include_end)
2850 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2851 (process_xcoff_symbol, read_symbol)
2852 (function_outside_compilation_unit_complaint)
2853 (scan_xcoff_symtab): Update.
2854 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2855 * buildsym.c (finish_block_internal, make_blockvector)
2856 (end_symtab_get_static_block, augment_type_symtab): Update.
2857 * dtrace-probe.c (dtrace_process_dof)
2858 (dtrace_static_probe_ops::get_probes): Update.
2859 * complaints.h (struct complaint): Don't declare.
2860 (symfile_complaints): Remove.
2861 (complaint_internal): Remove "complaints" parameter.
2862 (complaint): Likewise.
2863 (clear_complaints): Likewise.
2864 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2865 (reread_symbols): Update.
2866 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2867 (dwarf2_frame_cache, decode_frame_entry): Update.
2868 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2869 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2870 (info_selectors_command): Update.
2871 * macrotab.c (macro_include, check_for_redefinition)
2872 (macro_undef): Update.
2873 * objfiles.c (filter_overlapping_sections): Update.
2874 * stabsread.c (invalid_cpp_abbrev_complaint)
2875 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2876 (define_symbol, error_type, read_type, rs6000_builtin_type)
2877 (stabs_method_name_from_physname, read_member_functions)
2878 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2879 (attach_fields_to_type, complain_about_struct_wipeout)
2880 (read_range_type, read_args, common_block_start)
2881 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2883 * mdebugread.c (index_complaint, unknown_ext_complaint)
2884 (basic_type_complaint, bad_tag_guess_complaint)
2885 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2886 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2887 (parse_procedure, parse_lines)
2888 (function_outside_compilation_unit_complaint)
2889 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2890 (bad_tag_guess_complaint, reg_value_complaint): Update.
2891 * cp-support.c (demangled_name_complaint): Update.
2892 * macroscope.c (sal_macro_scope): Update.
2893 * dwarf-index-write.c (class debug_names): Update.
2895 2018-05-23 Tom Tromey <tom@tromey.com>
2897 * complaints.c (clear_complaints): Remove "noisy" parameter.
2898 * complaints.h (clear_complaints): Update.
2899 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2900 (reread_symbols): Update.
2902 2018-05-23 Tom Tromey <tom@tromey.com>
2904 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2906 (vcomplaint, clear_complaints): Update.
2907 (symfile_explanations): Remove some messages.
2909 2018-05-23 Tom Tromey <tom@tromey.com>
2911 * complaints.c (internal_complaint): Remove.
2912 * complaints.h (internal_complaint): Remove.
2914 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2916 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2918 2018-05-22 Pedro Alves <palves@redhat.com>
2920 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2921 (remote_fileio_badfd, remote_fileio_return_errno)
2922 (remote_fileio_return_success, remote_fileio_func_open)
2923 (remote_fileio_func_open, remote_fileio_func_close)
2924 (remote_fileio_func_read, remote_fileio_func_write)
2925 (remote_fileio_func_lseek, remote_fileio_func_rename)
2926 (remote_fileio_func_unlink, remote_fileio_func_stat)
2927 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2928 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2929 remote_target parameter.
2930 (remote_fio_func_map) <func>: Add remote_target parameter.
2931 (do_remote_fileio_request, remote_fileio_request):
2932 * remote-fileio.h (remote_fileio_request):
2933 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2934 remote_target parameter.
2935 (remote_notif_process, handle_notification): Adjust to pass down
2937 (remote_notif_state_allocate): Add remote_target parameter. Save
2939 * remote-notif.h (struct remote_target): Forward declare.
2940 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2941 remote_target parameter.
2942 (struct remote_notif_state) <remote>: New field.
2943 (remote_notif_ack, remote_notif_parse): Add remote_target
2945 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2946 remote_target parameter.
2947 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2948 (threads_listing_context, rmt_thread_action, protocol_feature)
2949 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2950 (packet_result, struct threads_listing_context, remote_state):
2951 Move definitions and declarations higher up.
2952 (remote_target) <~remote_target>: Declare.
2953 (remote_download_command_source, remote_file_put, remote_file_get)
2954 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2955 (remote_hostio_pread_vFile, remote_hostio_send_command)
2956 (remote_hostio_set_filesystem, remote_hostio_open)
2957 (remote_hostio_close, remote_hostio_unlink, remote_state)
2958 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2959 (get_memory_write_packet_size, get_memory_read_packet_size)
2960 (append_pending_thread_resumptions, remote_detach_1)
2961 (append_resumption, remote_resume_with_vcont)
2962 (add_current_inferior_and_thread, wait_ns, wait_as)
2963 (process_stop_reply, remote_notice_new_inferior)
2964 (process_initial_stop_replies, remote_add_thread)
2965 (btrace_sync_conf, remote_btrace_maybe_reopen)
2966 (remove_new_fork_children, kill_new_fork_children)
2967 (discard_pending_stop_replies, stop_reply_queue_length)
2968 (check_pending_events_prevent_wildcard_vcont)
2969 (discard_pending_stop_replies_in_queue, stop_reply)
2970 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2971 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2972 (remote_interrupt_as, remote_interrupt_ns)
2973 (remote_get_noisy_reply, remote_query_attached)
2974 (remote_add_inferior, remote_current_thread, get_current_thread)
2975 (set_thread, set_general_thread, set_continue_thread)
2976 (set_general_process, write_ptid)
2977 (remote_unpack_thread_info_response, remote_get_threadinfo)
2978 (parse_threadlist_response, remote_get_threadlist)
2979 (remote_threadlist_iterator, remote_get_threads_with_ql)
2980 (remote_get_threads_with_qxfer)
2981 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2982 (get_offsets, remote_check_symbols, remote_supported_packet)
2983 (remote_query_supported, remote_packet_size)
2984 (remote_serial_quit_handler, remote_detach_pid)
2985 (remote_vcont_probe, remote_resume_with_hc)
2986 (send_interrupt_sequence, interrupt_query)
2987 (remote_notif_get_pending_events, fetch_register_using_p)
2988 (send_g_packet, process_g_packet, fetch_registers_using_g)
2989 (store_register_using_P, store_registers_using_G)
2990 (set_remote_traceframe, check_binary_download)
2991 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2992 (remote_xfer_live_readonly_partial, remote_read_bytes)
2993 (remote_send_printf, remote_flash_write, readchar)
2994 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2995 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2996 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2997 (extended_remote_disable_randomization, extended_remote_run)
2998 (send_environment_packet, extended_remote_environment_support)
2999 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3000 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3001 (packet_command): Now methods of ...
3002 (remote_target): ... this class.
3003 (m_remote_state) <remote_target>: New field.
3004 (struct remote_state) <stop_reply_queue,
3005 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3007 (remote_state::remote_state): Allocate stop_reply_queue.
3008 (remote_state): Delete global.
3009 (get_remote_state_raw): Delete.
3010 (remote_target::get_remote_state): Allocate m_remote_state on
3012 (get_current_remote_target): New.
3013 (remote_ops, extended_remote_ops): Delete.
3014 (wait_forever_enabled_p, remote_async_inferior_event_token):
3015 Delete, moved to struct remote_state.
3016 (remote_target::close): Delete self. Destruction bits split to
3018 (remote_target::~remote_target): ... this.
3019 (show_memory_packet_size): Adjust to use
3020 get_current_remote_target.
3021 (struct protocol_feature) <func>: Add remote_target parameter.
3022 All callers adjusted.
3023 (curr_quit_handler_target): New.
3024 (remote_serial_quit_handler): Reimplement.
3025 (remote_target::open_1): Adjust to use get_current_remote_target.
3026 Heap-allocate remote_target/extended_remote_target instances.
3027 (vcont_builder::vcont_builder): Add remote_target parameter, and
3028 save it in m_remote. All callers adjusted.
3029 (vcont_builder::m_remote): New field.
3030 (vcont_builder::restart, vcont_builder::flush)
3031 (vcont_builder::push_action): Use it.
3032 (remote_target::commit_resume): Use it.
3033 (struct queue_iter_param) <remote>: New field.
3034 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3035 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3036 (check_pending_event_prevents_wildcard_vcont_callback)
3037 (remote_target::check_pending_events_prevent_wildcard_vcont)
3038 (remote_target::discard_pending_stop_replies)
3039 (remote_target::discard_pending_stop_replies_in_queue)
3040 (remote_target::remote_notif_remove_queued_reply): Fill in
3042 (remote_notif_get_pending_events): New.
3043 (remote_target::readchar, remote_target::remote_serial_write):
3044 Save/restore curr_quit_handler_target.
3046 (kill_new_fork_children): Fill in 'remote' field.
3047 (packet_command): Use get_current_remote_target, defer to
3048 remote_target method of same name.
3049 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3050 parameter, and save it in m_remote. All callers adjusted.
3051 (scoped_remote_fd::release): Use m_remote.
3052 (scoped_remote_fd::m_remote): New field.
3053 (remote_file_put, remote_file_get, remote_file_delete): Use
3054 get_current_remote_target, defer to remote_target method of same
3056 (remote_btrace_reset): Add remote_state paremeter. Update all
3058 (remote_async_inferior_event_handler). Pass down 'data'.
3059 (remote_new_objfile): Use get_current_remote_target.
3060 (remote_target::vcont_r_supported): New.
3061 (set_range_stepping): Use get_current_remote_target and
3062 remote_target::vcont_r_supported.
3063 (_initialize_remote): Don't allocate 'remote_state' and
3064 'stop_reply_queue' globals.
3065 * remote.h (struct remote_target): Forward declare.
3066 (getpkt, putpkt, remote_notif_get_pending_events): Add
3067 'remote_target' parameter.
3069 2018-05-22 Pedro Alves <palves@redhat.com>
3071 * remote.c (vcont_builder): Now a class. Make all data members
3073 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3075 (vcont_builder_restart): Rename to ...
3076 (vcont_builder::restart): ... this.
3077 (vcont_builder_flush): Rename to ...
3078 (vcont_builder::flush): ... this.
3079 (vcont_builder_push_action): Rename to ...
3080 (vcont_builder::push_action): ... this.
3081 (remote_target::commit_resume): Adjust.
3083 2018-05-22 Pedro Alves <palves@redhat.com>
3085 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3086 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3087 (get_fixed_memory_packet_size): New.
3088 (get_memory_packet_size): Use it.
3089 (set_memory_packet_size): Don't override the config size with
3090 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3091 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3092 Don't refer to get_memory_packet_size if not connected to a remote
3093 target. Show "(default)" if configured size is 0.
3095 2018-05-22 Pedro Alves <palves@redhat.com>
3097 * remote.c (remote_target::mourn_inferior): Move
3098 discard_pending_stop_replies call here from ...
3099 (_initialize_remote): ... here.
3101 2018-05-22 Pedro Alves <palves@redhat.com>
3103 * remote.c (compare_section_command): Remove set_general_process
3106 2018-05-22 Pedro Alves <palves@redhat.com>
3108 * remote.c (struct packet_reg, struct remote_arch_state):
3109 Move higher up in the file.
3110 (remote_state) <m_arch_states>: Store remote_arch_state values
3111 instead of remote_arch_state pointers.
3112 (remote_state::get_remote_arch_state): Adjust.
3114 2018-05-22 Pedro Alves <palves@redhat.com>
3116 * remote.c: Include <unordered_map>.
3117 (remote_state): Now a class.
3118 (remote_state) <get_remote_arch_state>: Declare method.
3119 <get_remote_arch_state>: New field.
3120 (remote_arch_state) <remote_arch_state>: Declare ctor.
3121 <regs>: Now a unique_ptr.
3122 (remote_gdbarch_data_handle): Delete.
3123 (get_remote_arch_state): Delete.
3124 (remote_state::get_remote_arch_state): New.
3125 (get_remote_state): Adjust to call remote_state's
3126 get_remote_arch_state method.
3127 (init_remote_state): Delete, bits factored out to ...
3128 (remote_arch_state::remote_arch_state): ... this new method.
3129 (get_remote_packet_size, get_memory_packet_size)
3130 (process_g_packet, remote_target::fetch_registers)
3131 (remote_target::prepare_to_store, store_registers_using_G)
3132 (remote_target::store_registers, remote_target::get_trace_status):
3133 Adjust to call remote_state's method.
3134 (_initialize_remote): Remove reference to
3135 remote_gdbarch_data_handle.
3137 2018-05-22 Pedro Alves <palves@redhat.com>
3139 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3140 pread>: New method declarations.
3141 (remote_target::open_1): Adjust.
3142 (readahead_cache_invalidate): Rename to ...
3143 (readahead_cache::invalidate): ... this, and adjust to be a class
3145 (readahead_cache_invalidate_fd): Rename to ...
3146 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3148 (remote_hostio_pwrite): Adjust.
3149 (remote_hostio_pread_from_cache): Rename to ...
3150 (readahead_cache::pread): ... this, and adjust to be a class
3152 (remote_hostio_close): Adjust.
3154 2018-05-22 Pedro Alves <palves@redhat.com>
3156 * remote.c (remote_hostio_close_cleanup): Delete.
3157 (class scoped_remote_fd): New.
3158 (remote_file_put, remote_file_get): Use it.
3160 2018-05-22 Pedro Alves <palves@redhat.com>
3162 (struct vCont_action_support): Use bool and initialize all fields.
3163 (struct readahead_cache): Initialize all fields.
3164 (remote_state): Use bool and initialize all fields.
3165 (remote_state::remote_state, remote_state::~remote_state): New.
3166 (new_remote_state): Delete.
3167 (_initialize_remote): Use new to allocate remote_state.
3169 2018-05-22 Pedro Alves <palves@redhat.com>
3173 * c-exp.y: Include "c-support.h".
3174 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3175 of tolower. Use c_ident_is_alpha to scan names.
3176 * c-lang.c: Include "c-support.h".
3177 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3178 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3179 * c-support.h: New file, with bits factored out from ...
3180 * cp-name-parser.y: ... this file.
3181 Include "c-support.h".
3182 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3183 c-support.h and renamed.
3184 (symbol_end, yylex): Adjust.
3186 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3188 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3189 parameter type to CORE_ADDR.
3190 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3191 parameter type in declaration to CORE_ADDR.
3192 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3193 target_auxv_search to get AT_HWCAP and use the result to get the
3195 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3196 to CORE_ADDR. Remove the cast of the return value to unsigned
3197 long. Fix error predicate of target_auxv_search.
3198 (ppc_linux_nat_target::read_description): Change the type of the
3199 hwcap variable to CORE_ADDR.
3201 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3203 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3204 if the size of fpscr is larger than 32 bits.
3206 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3208 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3209 (ppc32_linux_vsxregmap): New global.
3210 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3211 regcache_supply_regset, and regcache_collect_regset.
3212 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3213 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3214 (fetch_vsx_register, store_vsx_register): Remove.
3215 (fetch_vsx_registers): Add regno parameter. Get regset using
3216 ppc_linux_vsxregset. Use regset to supply registers.
3217 (store_vsx_registers): Add regno parameter. Get regset using
3218 ppc_linux_vsxregset. Use regset to collect registers.
3219 (fetch_register): Call fetch_vsx_registers instead of
3221 (store_register): Call store_vsx_registers instead of
3223 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3224 new regno parameter.
3225 (store_ppc_registers): Call store_vsx_registers with -1 for the
3226 new regno parameter.
3227 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3228 (ppc_collect_vsxregset): Remove.
3230 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3232 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3234 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3235 for vector register offset fields.
3236 (ppc64_fbsd_reg_offsets): Likewise.
3237 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3238 to vector register offset fields.
3239 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3240 to vector register offset fields.
3241 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3242 vector register offset fields.
3243 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3244 initializers for vector register offset fields.
3245 (rs6000_aix64_reg_offsets): Likewise.
3246 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3247 (ppc_supply_vrregset): Remove.
3248 (ppc_collect_vrregset): Remove.
3249 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3250 (ppc_linux_vrregset) : New function.
3251 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3252 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3253 (ppc32_linux_vrregset): Remove.
3254 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3255 and use result instead of ppc32_linux_vrregset.
3256 (ppc32_linux_reg_offsets): Remove initializers for vector register
3258 (ppc64_linux_reg_offsets): Likewise.
3259 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3260 * ppc-linux-nat.c: Include regset.h.
3261 (gdb_vrregset_t): Adjust comment to account for little-endian
3263 (supply_vrregset, fill_vrregset): Remove.
3264 (fetch_altivec_register, store_altivec_register): Remove.
3265 (fetch_altivec_registers): Add regno parameter. Get regset using
3266 ppc_linux_vrregset. Use regset to supply registers.
3267 (store_altivec_registers): Add regno parameter. Get regset using
3268 ppc_linux_vrregset. Use regset to collect registers.
3269 (fetch_register): Call fetch_altivec_registers instead of
3270 fetch_altivec_register.
3271 (store_register): Call store_altivec_registers instead of
3272 store_altivec_register.
3273 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3274 the new regno parameter.
3275 (store_ppc_registers): Call store_altivec_registers with -1 for
3276 the new regno parameter.
3278 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3280 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3281 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3282 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3283 (gdb_vrregset_t): Change array type size to
3284 PPC_LINUX_SIZEOF_VRREGSET.
3285 (gdb_vsxregset_t): Change array type size to
3286 PPC_LINUX_SIZEOF_VSXREGSET.
3287 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3288 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3289 PPC_LINUX_SIZEOF_VSXREGSET.
3291 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3293 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3294 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3296 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3297 ppc_linux_target_wordsize with tid.
3298 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3300 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3301 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3302 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3303 tid parameter. Remove static specifier.
3304 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3305 (ppc_linux_target_wordsize): New declaration.
3307 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3309 * arch/ppc-linux-common.c: New file.
3310 * arch/ppc-linux-common.h: New file.
3311 * arch/ppc-linux-tdesc.h: New file.
3312 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3313 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3314 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3315 arch/ppc-linux-tdesc.h.
3316 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3317 arch/ppc-linux-tdesc.h.
3318 (ppc_linux_nat_target::read_description): Remove target
3319 description matching code. Fill a ppc_linux_features struct and
3320 call ppc_linux_match_description with it. Move comment about ISA
3321 2.05 to ppc-linux-common.c.
3322 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3323 arch/ppc-linux-tdesc.h.
3324 (ppc_linux_core_read_description): Remove target description
3325 matching code. Fill a ppc_linux_features struct and call
3326 ppc_linux_match_description with it.
3327 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3328 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3329 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3330 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3331 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3332 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3333 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3334 (tdesc_powerpc_e500l): Remove.
3336 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3338 * ada-lang.c (catch_assert_command): Pass empty string instead
3339 of NULL for excep_string argument.
3341 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3343 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3344 the width of the requested register exceeds the width of the
3347 2018-05-21 Tom Tromey <tom@tromey.com>
3349 * printcmd.c (output_command): Remove.
3350 (output_command_const): Rename to output_command.
3351 * valprint.h (output_command): Rename from output_command_const.
3352 * tracepoint.c (trace_dump_actions): Call output_command.
3354 2018-05-21 Tom Tromey <tom@tromey.com>
3356 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3357 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3358 * ada-lang.h (create_ada_exception_catchpoint): Update.
3359 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3361 (create_excep_cond_exprs, ~ada_catchpoint)
3362 (should_stop_exception, print_one_exception)
3363 (print_mention_exception, print_recreate_exception): Update.
3364 (ada_get_next_arg): Remove.
3365 (catch_ada_exception_command_split): Use std::string. Change type
3366 of "excep_string", "cond_string".
3367 (catch_ada_exception_command): Update.
3368 (create_ada_exception_catchpoint): Change type of excep_string.
3369 (ada_exception_sal): Remove excep_string parameter.
3370 (~ada_catchpoint): Remove.
3372 2018-05-21 Tom Tromey <tom@tromey.com>
3374 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3377 2018-05-21 Tom Tromey <tom@tromey.com>
3379 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3380 Return unique_xmalloc_ptr.
3381 (print_it_exception): Update.
3383 2018-05-21 Tom Tromey <tom@tromey.com>
3385 * tracepoint.c (trace_dump_actions): Use std::string.
3387 2018-05-21 Tom Tromey <tom@tromey.com>
3389 * symfile.c (reread_symbols): Use std::string for original_name.
3391 2018-05-21 Tom Tromey <tom@tromey.com>
3393 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3394 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3397 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3399 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3401 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3402 * objfiles.c (get_objfile_bfd_data): Allocate
3403 objfile_per_bfd_storage with obstack_new when allocating on
3406 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3408 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3410 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3411 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3412 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3413 (add_pending): Likewise.
3414 (parse_symbol): Likewise.
3415 (parse_partial_symbols): Likewise.
3416 (psymtab_to_symtab_1): Likewise.
3417 (new_psymtab): Likewise.
3418 (elfmdebug_build_psymtabs): Likewise.
3419 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3420 * objfiles.c (get_objfile_bfd_data): Likewise.
3421 (objfile_register_static_link): Likewise.
3422 * psymtab.c (allocate_psymtab): Likewise.
3423 * stabsread.c (read_member_functions): Likewise.
3424 * xcoffread.c (xcoff_end_psymtab): Likewise.
3426 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3428 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3429 compiler supports std::is_trivially_constructible.
3430 * common/poison.h: Include obstack.h.
3431 (IsMallocable): Define to is_trivially_constructible if the
3432 compiler supports it, define to true_type otherwise.
3436 (XOBNEWVEC): Redefine.
3437 * gdb_obstack.h (obstack_zalloc): New.
3438 (OBSTACK_ZALLOC): Redefine.
3439 (obstack_calloc): New.
3440 (OBSTACK_CALLOC): Redefine.
3442 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3443 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3445 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3446 obstack_calloc/obstack_zalloc.
3447 (gdbarch_obstack_zalloc): Remove.
3448 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3450 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3452 * stack.c (backtrace_command_1): Remove useless variable int i.
3454 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3456 * stack.c (print_frame_info): Fix comment.
3458 2018-05-18 Tom Tromey <tom@tromey.com>
3460 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3461 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3462 (~dwarf2_per_objfile): Update
3463 (dwarf2_get_dwz_file): Use new.
3464 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3467 2018-05-18 Tom Tromey <tom@tromey.com>
3469 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3471 * dwarf2read.c (struct dwp_file): Add constructor and
3473 (open_and_init_dwp_file): Return a unique_ptr.
3474 (dwarf2_per_objfile, create_dwp_hash_table)
3475 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3476 (lookup_dwo_unit_in_dwp): Update.
3477 (open_and_init_dwp_file, get_dwp_file): Update.
3479 2018-05-18 Tom Tromey <tom@tromey.com>
3481 * dwarf2read.c (dwarf2_per_objfile): Update.
3482 (struct mapped_index): Add initializers.
3483 (dwarf2_read_index): Use new.
3484 (dw2_symtab_iter_init): Update.
3485 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3488 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3490 * dwarf2read.c (mapped_index) <total_size>: Remove.
3492 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3494 * unittests/format_pieces-selftests.c (test_format_specifier):
3497 2018-05-18 Tom Tromey <tom@tromey.com>
3499 * c-typeprint.c (maybe_print_hole): New function.
3500 (c_print_type_struct_field_offset): Update.
3501 (c_type_print_base_struct_union): Call maybe_print_hole.
3503 2018-05-17 Keith Seitz <keiths@redhat.com>
3505 * breakpoint.c (build_bpstat_chain): New function, moved from
3507 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3508 If no stop chain is passed, call build_bpstat_chain to build it.
3509 * breakpoint.h (build_bpstat_chain): Declare.
3510 (bpstat_stop_status): Move documentation here from breakpoint.c.
3511 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3512 build the stop chain and pass it to skip_inline_frames.
3513 Pass this stop chain to bpstat_stop_status.
3514 * inline-frame.c: Include breakpoint.h.
3515 (stopped_by_user_bp_inline_frame): New function.
3516 (skip_inline_frames): Add parameter `stop_chain'.
3517 Move documention to inline-frame.h.
3518 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3519 whether the frame should be elided.
3520 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3521 Add moved documentation and update for new parameter.
3523 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3526 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3527 unittests/format_pieces-selftests.c.
3528 * common/format.h (format_piece) <operator==>: New.
3529 (format_pieces) <operator[]>: Remove.
3530 * common/format.c (format_pieces::format_pieces): Handle \e.
3531 * unittests/format_pieces-selftests.c: New.
3533 2018-05-17 Tom Tromey <tom@tromey.com>
3536 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3537 (dw2_instantiate_symtab): Add skip_partial parameter.
3538 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3539 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3540 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3541 (dw2_expand_symtabs_matching_one)
3542 (dw2_find_pc_sect_compunit_symtab)
3543 (dw2_debug_names_lookup_symbol)
3544 (dw2_debug_names_expand_symtabs_for_function): Update.
3545 (init_cutu_and_read_dies): Add skip_partial parameter.
3546 (process_psymtab_comp_unit, build_type_psymtabs_1)
3547 (process_skeletonless_type_unit, load_partial_comp_unit)
3548 (psymtab_to_symtab_1): Update.
3549 (load_full_comp_unit): Add skip_partial parameter.
3550 (process_imported_unit_die, dwarf2_read_addr_index)
3551 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3552 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3553 (read_signatured_type): Update.
3555 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3557 * value.c (release_value): Remove unused variable.
3558 (record_latest_value): Likewise.
3559 (access_value_history): Likewise.
3560 (preserve_values): Likewise.
3562 2018-05-17 Tom Tromey <tom@tromey.com>
3564 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3567 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3570 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3571 Also handle registers whose width is not a multiple of
3573 (linux_nat_trad_target::store_register): Likewise.
3575 2018-05-16 Tom Tromey <tom@tromey.com>
3577 * gdbcore.h (core_bfd): Redefine.
3578 * corelow.c (core_target::close): Update.
3579 (core_target_open): Update.
3580 * progspace.h (struct program_space) <cbfd>: Now a
3583 2018-05-16 Tom Tromey <tom@tromey.com>
3586 * symfile-add-flags.h (enum symfile_add_flags)
3587 <SYMFILE_NOT_FILENAME>: New constant.
3588 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3589 objfile name from BFD.
3590 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3591 * minidebug.c (find_separate_debug_file_in_section): Put
3592 ".gnu_debugdata" into BFD's file name.
3594 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3596 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3599 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3602 * aarch64-tdep.c (aarch64_analyze_prologue,
3603 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3604 Indicate not interested in errors.
3606 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3608 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3609 Supply the MIPS_ZERO_REGNUM register.
3611 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3613 * mips-tdep.c (mask_address_var): Make variable static.
3615 2018-05-14 Tom Tromey <tom@tromey.com>
3617 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3619 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3621 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3622 FXSAVE_ADDR for the mxcsr register.
3624 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3626 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3628 2018-05-11 Pedro Alves <palves@redhat.com>
3630 * corelow.c (core_target) <core_target>: No longer inline.
3631 Initialize m_core_gdbarch, m_core_vec and build the section table
3633 <~core_target>: New.
3634 <core_gdbarch, get_core_register_section>: New methods.
3635 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3636 factored out from ...
3637 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3639 (sniff_core_bfd): Add gdbarch parameter.
3640 (core_close): Delete, merged into ...
3641 (core_target::close): ... here. Delete self.
3642 (core_close_cleanup): Delete.
3643 (core_target_open): Allocate a core_target on the heap. Use a
3644 unique_ptr instead of a cleanup. Bits moved into the core_target
3645 ctor. Adjust to use core_target methods instead of globals.
3646 (get_core_register_section): Rename to ...
3647 (core_target::get_core_register_section): ... this and adjust.
3648 (struct get_core_registers_cb_data): New.
3649 (get_core_registers_cb): Use it. Use bool.
3650 (core_target::fetch_registers, core_target::files_info)
3651 (core_target::xfer_partial, core_target::read_description)
3652 (core_target::pid_to, core_target::thread_name): Adjust to
3653 reference class fields instead of globals.
3654 * target.h (struct target_ops_deleter, target_ops_up): New.
3656 2018-05-11 Pedro Alves <palves@redhat.com>
3658 * corefile.c (core_file_command): Move to corelow.c.
3659 * corelow.c (the_core_target): Delete.
3660 (core_file_command): Moved from corefile.c. Check exec_bfd
3661 instead of the_core_target. Use target_detach instead of calling
3662 into the_core_target directly.
3663 (maybe_say_no_core_file_now): New.
3664 (core_target::detach): Use it.
3665 (_initialize_corelow): Remove references to the_core_target.
3666 * gdbcore.h (the_core_target): Delete.
3668 2018-05-11 Tom Tromey <tromey@redhat.com>
3669 Pedro Alves <palves@redhat.com>
3671 * corefile.c (core_bfd): Remove.
3672 * gdbcore.h (core_bfd): Now a macro.
3673 * progspace.h (struct program_space) <cbfd>: New field.
3675 2018-05-11 Tom Tromey <tom@tromey.com>
3677 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3680 2018-05-10 Tom Tromey <tom@tromey.com>
3682 * configure: Rebuild.
3683 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3685 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3688 * regformats/regdat.sh: Adjust script, following the addition
3689 of the new expedite_regs parameter to init_target_desc.
3691 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3694 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3695 set_gdbarch_significant_addr_bit.
3696 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3697 set_gdbarch_significant_addr_bit.
3698 * utils.c (address_significant): Update to sign extend addr.
3700 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3702 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3703 (xtensa_linux_init_abi): Limit tdep->num_regs by
3704 tdep->num_nopriv_regs.
3705 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3706 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3709 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3711 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3713 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3715 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3716 (I387_MXCSR_INIT_VAL): New constant.
3717 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3718 buffer if it was supplied by the inferior.
3719 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3720 (i387_xsave_get_clear_bv): New function.
3721 (i387_supply_xsave): Only read x87 control registers from the
3722 xsave buffer if the feature is enabled, and the state will have
3723 been written, otherwise, provide a suitable default.
3724 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3725 including x87 control registers. Update control registers if they
3726 have changed from the default value, and mark features as enabled
3728 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3730 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3732 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3734 2018-05-07 Tom Tromey <tom@tromey.com>
3736 * configure: Rebuild.
3737 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3739 2018-05-07 Tom Tromey <tom@tromey.com>
3742 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3743 bit. Use correct value for VDIV.
3745 2018-05-04 Tom Tromey <tom@tromey.com>
3747 * configure: Rebuild.
3748 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3750 2018-05-04 Tom Tromey <tom@tromey.com>
3752 * linux-record.c (record_linux_system_call) <case
3753 RECORD_SYS_RECVFROM>: Add "break".
3755 2018-05-04 Tom Tromey <tom@tromey.com>
3757 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3758 Add missing "break".
3759 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3760 Add missing "break".
3762 2018-05-04 Tom Tromey <tom@tromey.com>
3764 * rs6000-tdep.c (ppc_process_record_op4)
3765 (ppc_process_record_op63): Add fall-through comment.
3767 2018-05-04 Tom Tromey <tom@tromey.com>
3769 * i386-tdep.c (i386_process_record): Add fall-through comment.
3771 2018-05-04 Tom Tromey <tom@tromey.com>
3773 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3776 2018-05-04 Tom Tromey <tom@tromey.com>
3778 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3779 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3780 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3782 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3784 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3787 2018-05-04 Tom Tromey <tom@tromey.com>
3789 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3791 2018-05-04 Tom Tromey <tom@tromey.com>
3793 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3794 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3795 * symfile.c (section_is_mapped): Fix fall-through comment.
3796 * stabsread.c (define_symbol, read_member_functions): Fix
3797 fall-through comment.
3798 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3800 * remote.c (remote_wait_as): Fix fall-through comment.
3801 * p-exp.y (yylex): Fix fall-through comment.
3802 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3804 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3805 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3806 * jv-exp.y (yylex): Fix fall-through comment.
3807 * go-exp.y (lex_one_token): Fix fall-through comment.
3808 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3809 fall-through comment.
3810 * f-exp.y (yylex): Fix fall-through comment.
3811 * dwarf2read.c (process_die): Fix fall-through comments.
3812 * dbxread.c (process_one_symbol): Fix fall-through comment.
3813 * d-exp.y (lex_one_token): Fix fall-through comment.
3814 * cp-name-parser.y (yylex): Fix fall-through comment.
3815 * coffread.c (coff_symtab_read): Fix fall-through comment.
3816 * c-exp.y (lex_one_token): Fix fall-through comment.
3817 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3819 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3822 2018-05-04 Tom Tromey <tom@tromey.com>
3825 * NEWS: Mention gdb.execute change.
3826 * gdbcmd.h (execute_control_command): Don't declare.
3827 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3828 execute_control_commands, execute_control_commands_to_string.
3829 * cli/cli-script.h (execute_control_commands)
3830 (execute_control_commands_to_string): Declare.
3831 (execute_control_command): Add from_tty parameter.
3832 * cli/cli-script.c (execute_control_commands)
3833 (execute_control_commands_to_string): New functions.
3834 (execute_user_command): Use execute_control_commands.
3835 (execute_control_command_1): Add "from_tty" parameter. Update.
3836 (execute_control_command): Likewise.
3838 2018-05-04 Tom Tromey <tom@tromey.com>
3841 * NEWS: Mention that breakpoint commands are writable.
3842 * python/py-breakpoint.c (bppy_set_commands): New function.
3843 (breakpoint_object_getset) <"commands">: Use it.
3845 2018-05-04 Tom Tromey <tom@tromey.com>
3847 * tracepoint.c (actions_command): Update.
3848 * mi/mi-cmd-break.c (mi_command_line_array)
3849 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3850 (mi_read_next_line): Remove.
3851 (mi_cmd_break_commands): Update.
3852 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3854 * cli/cli-script.c (get_command_line): Update.
3855 (process_next_line): Use function_view. Constify.
3856 (recurse_read_control_structure, read_command_lines)
3857 (read_command_lines_1): Change argument types to function_view.
3858 (do_define_command, document_command): Update.
3859 * breakpoint.h (check_tracepoint_command): Don't declare.
3860 * breakpoint.c (check_tracepoint_command): Remove.
3861 (commands_command_1, create_tracepoint_from_upload): Update.
3863 2018-05-04 Tom Tromey <tom@tromey.com>
3866 * cli/cli-script.h (enum command_control_type) <define_control>:
3868 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3869 (build_command_line, execute_control_command_1)
3870 (process_next_line): Likewise.
3871 (do_define_command): New function, extracted from define_command.
3872 (define_command): Use it.
3874 2018-05-04 Tom Tromey <tom@tromey.com>
3876 * tracepoint.c (actions_command): Update.
3877 * cli/cli-script.h (read_command_lines): Update.
3878 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3879 (MAX_TMPBUF): Remove define.
3880 (define_command): Use string_printf.
3881 (document_command): Likewise.
3882 * breakpoint.c (commands_command_1): Update.
3884 2018-05-04 Tom Tromey <tom@tromey.com>
3886 * top.c (execute_command): Update.
3887 * cli/cli-script.h (print_command_lines): Now varargs.
3888 * cli/cli-script.c (print_command_lines): Now varargs.
3889 (execute_control_command_1) <case while_control, case if_control>:
3892 2018-05-04 Tom Tromey <tom@tromey.com>
3894 * tracepoint.c (all_tracepoint_actions): Rename from
3895 all_tracepoint_actions_and_cleanup. Change return type.
3896 (actions_command, encode_actions_1, encode_actions)
3897 (trace_dump_actions, tdump_command): Update.
3898 * remote.c (remote_download_command_source): Update.
3899 * python/python.c (gdbpy_eval_from_control_command)
3900 (python_command, python_interactive_command): Update.
3901 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3902 * guile/guile.c (guile_command)
3903 (gdbscm_eval_from_control_command, guile_command): Update.
3904 * compile/compile.c (compile_code_command)
3905 (compile_print_command, compile_to_object): Update.
3906 * cli/cli-script.h (struct command_lines_deleter): New.
3907 (counted_command_line): New typedef.
3908 (struct command_line): Add constructor, destructor.
3909 <body_list>: Remove.
3910 <body_list_0, body_list_1>: New members.
3911 (command_line_up): Remove typedef.
3912 (read_command_lines, read_command_lines_1, get_command_line):
3914 (copy_command_lines): Don't declare.
3915 * cli/cli-script.c (build_command_line): Use "new".
3916 (get_command_line): Return counted_command_line.
3917 (print_command_lines, execute_user_command)
3918 (execute_control_command_1, while_command, if_command): Update.
3919 (realloc_body_list): Remove.
3920 (process_next_line, recurse_read_control_structure): Update.
3921 (read_command_lines, read_command_lines_1): Return counted_command_line.
3922 (free_command_lines): Use "delete".
3923 (copy_command_lines): Remove.
3924 (define_command, document_command, show_user_1): Update.
3925 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3926 a counted_command_line.
3927 * breakpoint.h (counted_command_line): Remove typedef.
3928 (breakpoint_set_commands): Update.
3929 * breakpoint.c (check_no_tracepoint_commands)
3930 (validate_commands_for_breakpoint): Update.
3931 (breakpoint_set_commands): Change commands to be a
3932 counted_command_line.
3933 (commands_command_1, update_dprintf_command_list)
3934 (create_tracepoint_from_upload): Update.
3936 2018-05-04 Tom Tromey <tom@tromey.com>
3938 * cli/cli-decode.h (cmd_list_element): New constructor.
3939 (~cmd_list_element): New destructor.
3940 (struct cmd_list_element): Add initializers.
3941 * cli/cli-decode.c (do_add_cmd): Use "new".
3942 (delete_cmd): Use "delete".
3944 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3945 Pedro Alves <palves@redhat.com>
3947 PR breakpoints/19806 and support for PR external/20207.
3948 * NEWS: Mention Aarch64 watchpoint improvements.
3949 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3950 watchpoints and PR external/20207 watchpoints.
3951 * nat/aarch64-linux-hw-point.c
3952 (kernel_supports_any_contiguous_range): New.
3953 (aarch64_watchpoint_offset): New.
3954 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3955 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3956 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3957 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3958 next_addr_orig_p. Support PR external/20207 watchpoints.
3959 (aarch64_downgrade_regs): New.
3960 (aarch64_dr_state_insert_one_point): New parameters offset and
3962 (aarch64_dr_state_remove_one_point): Likewise.
3963 (aarch64_handle_breakpoint): Update caller.
3964 (aarch64_handle_aligned_watchpoint): Likewise.
3965 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3967 (aarch64_linux_set_debug_regs): Remove const from state. Call
3968 aarch64_downgrade_regs.
3969 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3970 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3971 (DR_CONTROL_MASK): ... this.
3972 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3973 (unsigned int aarch64_watchpoint_offset): New prototype.
3974 (aarch64_linux_set_debug_regs): Remove const from state.
3975 * utils.c (align_up, align_down): Move to ...
3976 * common/common-utils.c (align_up, align_down): ... here.
3977 * utils.h (align_up, align_down): Move to ...
3978 * common/common-utils.h (align_up, align_down): ... here.
3980 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3982 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3983 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3984 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3985 Re-implement to match the ABI as summarized in GCC's
3986 gcc/config/sparc/sparc.c. All callers updated.
3987 (sparc32_store_arguments): Remove assertion.
3989 2018-05-04 Tom Tromey <tom@tromey.com>
3991 * printcmd.c: Don't include tui.h.
3992 (decode_format): Use skip_spaces.
3994 2018-05-04 Tom Tromey <tom@tromey.com>
3997 * printcmd.c (last_count): New global.
3998 (x_command): Use saved count when repeating.
4000 2018-05-04 Tom Tromey <tom@tromey.com>
4002 * nto-procfs.c (do_closedir_cleanup): Remove.
4003 (procfs_pidlist): Use gdb_dir_up.
4004 * procfs.c (do_closedir_cleanup): Remove.
4005 (proc_update_threads): Use gdb_dir_up.
4006 * common/filestuff.h (struct gdb_dir_deleter): New.
4007 (gdb_dir_up): New typedef.
4009 2018-05-04 Tom Tromey <tom@tromey.com>
4011 * ada-lang.c (print_mention_exception): Use std::string.
4013 2018-05-04 Tom Tromey <tom@tromey.com>
4015 * ada-lang.c (create_excep_cond_exprs): Update.
4016 (ada_exception_catchpoint_cond_string): Use std::string.
4018 2018-05-04 Tom Tromey <tom@tromey.com>
4020 * ada-lang.c (xget_renaming_scope): Return std::string.
4021 (old_renaming_is_invisible): Update.
4023 2018-05-04 Tom Tromey <tom@tromey.com>
4025 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4026 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4028 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4030 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4032 2018-05-04 Tom Tromey <tom@tromey.com>
4034 * remote.c (remote_query_supported_append): Change type.
4035 (remote_check_symbols): Update.
4037 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4040 * configure.ac: Prepend libpython.
4041 * python/python-config.py: Likewise.
4042 * configure: Regenerate.
4044 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4046 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4048 2018-05-03 Pedro Alves <palves@redhat.com>
4051 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4052 override. Write 'true' instead of '1'.
4053 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4056 2018-05-02 Pedro Alves <palves@redhat.com>
4058 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4059 add_inf_child_target.
4060 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4061 add_inf_child_target.
4062 * aix-thread.c (aix_thread_target_info): New.
4063 (aix_thread_target) <shortname, longname, doc>: Delete.
4065 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4066 add_inf_child_target.
4067 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4068 add_inf_child_target.
4069 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4070 add_inf_child_target.
4071 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4072 add_inf_child_target.
4073 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4074 add_inf_child_target.
4075 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4076 add_inf_child_target.
4077 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4078 add_inf_child_target.
4079 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4080 add_inf_child_target.
4081 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4082 add_inf_child_target.
4083 * bfd-target.c (target_bfd_target_info): New.
4084 (target_bfd) <shortname, longname, doc>: Delete.
4086 * bsd-kvm.c (bsd_kvm_target_info): New.
4087 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4089 (bsd_kvm_target::open): Rename to ...
4090 (bsd_kvm_target_open): ... this. Adjust.
4091 * bsd-uthread.c (bsd_uthread_target_info): New.
4092 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4094 * corefile.c (core_file_command): Adjust.
4095 * corelow.c (core_target_info): New.
4096 (core_target) <shortname, longname, doc>: Delete.
4098 (core_target::open): Rename to ...
4099 (core_target_open): ... this. Adjust.
4100 * ctf.c (ctf_target_info): New.
4101 (ctf_target) <shortname, longname, doc>: Delete.
4103 (ctf_target::open): Rename to ...
4104 (ctf_target_open): ... this.
4105 (_initialize_ctf): Adjust.
4106 * exec.c (exec_target_info): New.
4107 (exec_target) <shortname, longname, doc>: Delete.
4109 (exec_target::open): Rename to ...
4110 (exec_target_open): ... this.
4111 * gdbcore.h (core_target_open): Declare.
4112 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4113 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4114 add_inf_child_target.
4115 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4116 add_inf_child_target.
4117 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4118 add_inf_child_target.
4119 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4120 add_inf_child_target.
4121 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4122 add_inf_child_target.
4123 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4124 add_inf_child_target.
4125 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4126 add_inf_child_target.
4127 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4128 add_inf_child_target.
4129 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4130 add_inf_child_target.
4131 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4132 add_inf_child_target.
4133 * inf-child.c (inf_child_target_info): New.
4134 (inf_child_target::info): New.
4135 (inf_child_open_target): Remove 'target' parameter. Use
4136 get_native_target instead.
4137 (inf_child_target::open): Delete.
4138 (add_inf_child_target): New.
4139 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4142 (add_inf_child_target): Declare.
4143 (inf_child_open_target): Declare.
4144 * linux-thread-db.c (thread_db_target_info): New.
4145 (thread_db_target) <shortname, longname, doc>: Delete.
4147 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4148 add_inf_child_target.
4149 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4150 add_inf_child_target.
4151 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4152 add_inf_child_target.
4153 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4154 add_inf_child_target.
4155 * make-target-delegates (print_class): Adjust.
4156 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4157 add_inf_child_target.
4158 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4159 add_inf_child_target.
4160 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4161 add_inf_child_target.
4162 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4163 add_inf_child_target.
4164 * nto-procfs.c (nto_native_target_info): New.
4165 (nto_procfs_target_native) <shortname, longname, doc>:
4168 (nto_procfs_target_info): New.
4169 (nto_procfs_target_procfs) <shortname, longname, doc>:
4172 (init_procfs_targets): Adjust.
4173 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4174 add_inf_child_target.
4175 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4176 add_inf_child_target.
4177 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4178 add_inf_child_target.
4179 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4180 add_inf_child_target.
4181 * ravenscar-thread.c (ravenscar_target_info): New.
4182 (ravenscar_thread_target) <shortname, longname, doc>:
4185 * record-btrace.c (record_btrace_target_info):
4186 (record_btrace_target) <shortname, longname, doc>: Delete.
4188 (record_btrace_target::open): Rename to ...
4189 (record_btrace_target_open): ... this. Adjust.
4190 * record-full.c (record_longname, record_doc): New.
4191 (record_full_base_target) <shortname, longname, doc>: Delete.
4193 (record_full_target_info): New.
4194 (record_full_target): <shortname>: Delete.
4196 (record_full_core_open_1, record_full_open_1): Update comments.
4197 (record_full_base_target::open): Rename to ...
4198 (record_full_open): ... this.
4199 (cmd_record_full_restore): Update.
4200 (_initialize_record_full): Update.
4201 * remote-sim.c (remote_sim_target_info): New.
4202 (gdbsim_target) <shortname, longname, doc>: Delete.
4204 (gdbsim_target::open): Rename to ...
4205 (gdbsim_target_open): ... this.
4206 (_initialize_remote_sim): Adjust.
4207 * remote.c (remote_doc): New.
4208 (remote_target_info): New.
4209 (remote_target) <shortname, longname, doc>: Delete.
4211 (extended_remote_target_info): New.
4212 (extended_remote_target) <shortname, longname, doc>: Delete.
4214 (remote_target::open_1): Make static. Adjust.
4215 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4216 * s390-linux-nat.c (_initialize_s390_nat): Use
4217 add_inf_child_target.
4218 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4219 add_inf_child_target.
4220 * sol-thread.c (thread_db_target_info): New.
4221 (sol_thread_target) <shortname, longname, doc>: Delete.
4223 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4224 add_inf_child_target.
4225 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4226 add_inf_child_target.
4227 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4228 add_inf_child_target.
4229 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4230 add_inf_child_target.
4231 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4232 add_inf_child_target.
4233 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4234 add_inf_child_target.
4235 * spu-linux-nat.c (_initialize_spu_nat): Use
4236 add_inf_child_target.
4237 * spu-multiarch.c (spu_multiarch_target_info): New.
4238 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4240 * target-delegates.c: Regenerate.
4241 * target.c: Include <unordered_map>.
4242 (target_ops_p): Delete.
4243 (DEF_VEC_P(target_ops_p)): Delete.
4244 (target_factories): New.
4245 (test_target_info): New.
4246 (test_target_ops::info): New.
4247 (open_target): Adjust to use target_factories.
4248 (add_target_with_completer): Rename to ...
4249 (add_target): ... this. Change prototype. Register target_info
4250 and open callback in target_factories. Register target_info in
4251 command context instead of target_ops.
4252 (add_target): Delete old implementation.
4253 (add_deprecated_target_alias): Change prototype. Adjust.
4254 (the_native_target): New.
4255 (set_native_target, get_native_target): New.
4256 (find_default_run_target): Use the_native_target.
4257 (find_attach_target, find_run_target): Simplify.
4258 (target_ops::open): Delete.
4259 (dummy_target_info): New.
4260 (dummy_target::shortname, dummy_target::longname)
4261 (dummy_target::doc): Delete.
4262 (dummy_target::info): New.
4263 (debug_target::shortname, debug_target::longname)
4264 (debug_target::doc): Delete.
4265 (debug_target::info): New.
4266 * target.h (struct target_info): New.
4267 (target_ops::~target_ops): Add comment.
4268 (target_ops::info): New.
4269 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4270 longer virtual. Implement in terms of target_info.
4271 (set_native_target, get_native_target): Declare.
4272 (target_open_ftype): New.
4273 (add_target, add_target_with_completer)
4274 (add_deprecated_target_alias): Change prototype.
4275 (test_target) <shortname, longname, doc>: Delete.
4277 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4278 add_inf_child_target.
4279 * tracefile-tfile.c (tfile_target_info): New.
4280 (tfile_target) <shortname, longname, doc>: Delete.
4282 (tfile_target::open): Rename to ...
4283 (tfile_target_open): ... this.
4284 (_initialize_tracefile_tfile): Adjust.
4285 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4286 add_inf_child_target.
4287 * windows-nat.c (_initialize_windows_nat): Use
4288 add_inf_child_target.
4289 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4290 add_inf_child_target.
4292 2018-05-02 Pedro Alves <palves@redhat.com>
4294 * linux-nat.h (linux_nat_target) <low_new_thread,
4295 low_delete_thread, low_new_fork, low_forget_process,
4296 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4297 New virtual methods.
4298 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4299 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4300 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4301 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4302 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4304 * linux-fork.c (delete_fork): Adjust to call low method.
4305 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4306 (linux_nat_new_fork, linux_nat_forget_process_hook)
4307 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4308 (linux_nat_status_is_event):
4309 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4310 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4312 (sigtrap_is_event): Rename to ...
4313 (linux_nat_target::low_status_is_event): ... this.
4314 (linux_nat_set_status_is_event): Delete.
4315 (save_stop_reason, linux_nat_wait_1)
4316 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4318 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4319 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4320 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4321 (linux_nat_set_prepare_to_resume): Delete.
4322 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4323 low virtual methods.
4324 * amd64-linux-nat.c: Likewise.
4325 * arm-linux-nat.c: Likewise.
4326 * i386-linux-nat.c: Likewise.
4327 * ia64-linux-nat.c: Likewise.
4328 * mips-linux-nat.c: Likewise.
4329 * ppc-linux-nat.c: Likewise.
4330 * s390-linux-nat.c: Likewise.
4331 * sparc64-linux-nat.c: Likewise.
4332 * x86-linux-nat.c: Likewise.
4333 * x86-linux-nat.h: Include "nat/x86-linux.h".
4334 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4335 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4338 2018-05-02 Pedro Alves <palves@redhat.com>
4340 * target.h (target_ops)
4341 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4342 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4343 stopped_by_watchpoint, have_continuable_watchpoint,
4344 stopped_data_address, watchpoint_addr_within_range,
4345 can_accel_watchpoint_condition, can_run, thread_alive,
4346 has_all_memory, has_memory, has_stack, has_registers,
4347 has_execution, can_async_p, is_async_p, supports_non_stop,
4348 always_non_stop_p, can_execute_reverse, supports_multi_process,
4349 supports_enable_disable_tracepoint,
4350 supports_disable_randomization, supports_string_tracing,
4351 supports_evaluation_of_breakpoint_conditions,
4352 can_run_breakpoint_commands, filesystem_is_local,
4353 can_download_tracepoint, get_trace_state_variable_value,
4354 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4355 record_is_replaying, record_will_replay,
4356 augmented_libraries_svr4_read>: Adjust to return bool.
4357 * aarch64-linux-nat.c: All implementations adjusted.
4358 * aix-thread.c: All implementations adjusted.
4359 * arm-linux-nat.c: All implementations adjusted.
4360 * breakpoint.c: All implementations adjusted.
4361 * bsd-kvm.c: All implementations adjusted.
4362 * bsd-uthread.c: All implementations adjusted.
4363 * corelow.c: All implementations adjusted.
4364 * ctf.c: All implementations adjusted.
4365 * darwin-nat.c: All implementations adjusted.
4366 * darwin-nat.h: All implementations adjusted.
4367 * exec.c: All implementations adjusted.
4368 * fbsd-nat.c: All implementations adjusted.
4369 * fbsd-nat.h: All implementations adjusted.
4370 * gnu-nat.c: All implementations adjusted.
4371 * gnu-nat.h: All implementations adjusted.
4372 * go32-nat.c: All implementations adjusted.
4373 * ia64-linux-nat.c: All implementations adjusted.
4374 * inf-child.c: All implementations adjusted.
4375 * inf-child.h: All implementations adjusted.
4376 * inf-ptrace.c: All implementations adjusted.
4377 * inf-ptrace.h: All implementations adjusted.
4378 * linux-nat.c: All implementations adjusted.
4379 * linux-nat.h: All implementations adjusted.
4380 * mips-linux-nat.c: All implementations adjusted.
4381 * nto-procfs.c: All implementations adjusted.
4382 * ppc-linux-nat.c: All implementations adjusted.
4383 * procfs.c: All implementations adjusted.
4384 * ravenscar-thread.c: All implementations adjusted.
4385 * record-btrace.c: All implementations adjusted.
4386 * record-full.c: All implementations adjusted.
4387 * remote-sim.c: All implementations adjusted.
4388 * remote.c: All implementations adjusted.
4389 * s390-linux-nat.c: All implementations adjusted.
4390 * sol-thread.c: All implementations adjusted.
4391 * spu-multiarch.c: All implementations adjusted.
4392 * target-delegates.c: All implementations adjusted.
4393 * target.c: All implementations adjusted.
4394 * target.h: All implementations adjusted.
4395 * tracefile-tfile.c: All implementations adjusted.
4396 * tracefile.c: All implementations adjusted.
4397 * tracefile.h: All implementations adjusted.
4398 * windows-nat.c: All implementations adjusted.
4399 * x86-linux-nat.h: All implementations adjusted.
4400 * x86-nat.h: All implementations adjusted.
4402 2018-05-02 Pedro Alves <palves@redhat.com>
4404 * make-target-delegates (scan_target_h): Don't trim lines here.
4405 Replace sequences of tabs and/or whitespace with a single
4407 (top level, parsing methods): Trim each line before processing it
4410 2018-05-02 Pedro Alves <palves@redhat.com>
4411 John Baldwin <jhb@freebsd.org>
4413 * target.h (enum strata) <debug_stratum>: New.
4414 (struct target_ops) <all delegation methods>: Replace by C++
4415 virtual methods, and drop "to_" prefix. All references updated
4417 <to_shortname, to_longname, to_doc, to_data,
4418 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4419 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4420 virtual methods. All references updated throughout.
4421 <can_attach, supports_terminal_ours, can_create_inferior,
4422 get_thread_control_capabilities, attach_no_wait>: New
4424 <insert_breakpoint, remove_breakpoint>: Now
4425 TARGET_DEFAULT_NORETURN methods.
4426 <info_proc>: Now returns bool.
4428 (OPS_MAGIC): Delete.
4429 (current_target): Delete. All references replaced by references
4431 (target_stack): ... this. New.
4432 (target_shortname, target_longname): Adjust.
4433 (target_can_run): Now a function declaration.
4434 (default_child_has_all_memory, default_child_has_memory)
4435 (default_child_has_stack, default_child_has_registers)
4436 (default_child_has_execution): Remove target_ops parameter.
4437 (complete_target_initialization): Delete.
4438 (memory_breakpoint_target): New template class.
4439 (test_target_ops): Refactor as a C++ class with virtual methods.
4440 * make-target-delegates (NAME_PART): Tighten.
4441 (POINTER_PART, CP_SYMBOL): New.
4442 (SIMPLE_RETURN_PART): Reimplement.
4443 (VEC_RETURN_PART): Expect less.
4444 (RETURN_PART, VIRTUAL_PART): New.
4445 (METHOD): Adjust to C++ virtual methods.
4446 (scan_target_h): Remove reference to C99.
4447 (dname): Output "target_ops::" prefix.
4448 (write_function_header): Adjust to output a C++ class method.
4449 (write_declaration): New.
4450 (write_delegator): Adjust to output a C++ class method.
4451 (tdname): Output "dummy_target::" prefix.
4452 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4454 (tdefault_names, debug_names): Delete.
4455 (return_types, tdefaults, styles, argtypes_array): New.
4456 (top level): All methods are delegators.
4458 (top level): Print dummy_target and debug_target classes.
4459 * target-delegates.c: Regenerate.
4460 * target-debug.h (target_debug_print_enum_info_proc_what)
4461 (target_debug_print_thread_control_capabilities)
4462 (target_debug_print_thread_info_p): New.
4463 * target.c (dummy_target): Delete.
4464 (the_dummy_target, the_debug_target): New.
4465 (target_stack): Now extern.
4466 (set_targetdebug): Push/unpush debug target.
4467 (default_child_has_all_memory, default_child_has_memory)
4468 (default_child_has_stack, default_child_has_registers)
4469 (default_child_has_execution): Remove target_ops parameter.
4470 (complete_target_initialization): Delete.
4471 (add_target_with_completer): No longer call
4472 complete_target_initialization.
4473 (target_supports_terminal_ours): Use regular delegation.
4474 (update_current_target): Delete.
4475 (push_target): No longer check magic number. Don't call
4476 update_current_target.
4477 (unpush_target): Don't call update_current_target.
4478 (target_is_pushed): No longer check magic number.
4479 (target_require_runnable): Skip for all stratums over
4481 (target_ops::info_proc): New.
4482 (target_info_proc): Use find_target_at and
4483 find_default_run_target.
4484 (target_supports_disable_randomization): Use regular delegation.
4485 (target_get_osdata): Use find_target_at.
4486 (target_ops::open, target_ops::close, target_ops::can_attach)
4487 (target_ops::attach, target_ops::can_create_inferior)
4488 (target_ops::create_inferior, target_ops::can_run)
4489 (target_can_run): New.
4490 (default_fileio_target): Use regular delegation.
4491 (target_ops::fileio_open, target_ops::fileio_pwrite)
4492 (target_ops::fileio_pread, target_ops::fileio_fstat)
4493 (target_ops::fileio_close, target_ops::fileio_unlink)
4494 (target_ops::fileio_readlink): New.
4495 (target_fileio_open_1, target_fileio_unlink)
4496 (target_fileio_readlink): Always call the target method. Handle
4498 (return_zero, return_zero_has_execution): Delete.
4499 (init_dummy_target): Delete.
4500 (dummy_target::dummy_target, dummy_target::shortname)
4501 (dummy_target::longname, dummy_target::doc)
4502 (debug_target::debug_target, debug_target::shortname)
4503 (debug_target::longname, debug_target::doc): New.
4504 (target_supports_delete_record): Use regular delegation.
4505 (setup_target_debug): Delete.
4506 (maintenance_print_target_stack): Skip debug_stratum.
4507 (initialize_targets): Instantiate the_dummy_target and
4509 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4511 (target_auxv_search, fprint_target_auxv): Adjust.
4512 (info_auxv_command): Adjust to use target_stack.
4513 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4514 * exceptions.c (print_flush): Handle a NULL target_stack.
4515 * regcache.c (target_ops_no_register): Refactor as class with
4518 * exec.c (exec_target): New class.
4519 (exec_ops): Now an exec_target.
4520 (exec_open, exec_close_1, exec_get_section_table)
4521 (exec_xfer_partial, exec_files_info, exec_has_memory)
4522 (exec_make_note_section): Refactor as exec_target methods.
4523 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4525 (exec_target::find_memory_regions): New.
4526 (_initialize_exec): Don't call init_exec_ops.
4527 * gdbcore.h (exec_file_clear): Delete.
4529 * corefile.c (core_target): Delete.
4530 (core_file_command): Adjust.
4531 * corelow.c (core_target): New class.
4532 (the_core_target): New.
4533 (core_close): Remove target_ops parameter.
4534 (core_close_cleanup): Adjust.
4535 (core_target::close): New.
4536 (core_open, core_detach, get_core_registers, core_files_info)
4537 (core_xfer_partial, core_thread_alive, core_read_description)
4538 (core_pid_to_str, core_thread_name, core_has_memory)
4539 (core_has_stack, core_has_registers, core_info_proc): Rework as
4540 core_target methods.
4541 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4542 (_initialize_corelow): Initialize the_core_target.
4543 * gdbcore.h (core_target): Delete.
4544 (the_core_target): New.
4546 * ctf.c: (ctf_target): New class.
4547 (ctf_ops): Now a ctf_target.
4548 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4549 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4550 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4552 (init_ctf_ops): Delete.
4553 (_initialize_ctf): Don't call it.
4554 * tracefile-tfile.c (tfile_target): New class.
4555 (tfile_ops): Now a tfile_target.
4556 (tfile_open, tfile_close, tfile_files_info)
4557 (tfile_get_tracepoint_status, tfile_trace_find)
4558 (tfile_fetch_registers, tfile_xfer_partial)
4559 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4560 Refactor as tfile_target methods.
4561 (tfile_xfer_partial_features): Remove target_ops parameter.
4562 (init_tfile_ops): Delete.
4563 (_initialize_tracefile_tfile): Don't call it.
4564 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4565 (tracefile_has_stack, tracefile_has_registers)
4566 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4567 tracefile_target methods.
4568 (init_tracefile_ops): Delete.
4569 (tracefile_target::tracefile_target): New.
4570 * tracefile.h: Include "target.h".
4571 (tracefile_target): New class.
4572 (init_tracefile_ops): Delete.
4574 * spu-multiarch.c (spu_multiarch_target): New class.
4575 (spu_ops): Now a spu_multiarch_target.
4576 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4577 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4578 (spu_search_memory, spu_mourn_inferior): Refactor as
4579 spu_multiarch_target methods.
4580 (init_spu_ops): Delete.
4581 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4582 complete_target_initialization.
4584 * ravenscar-thread.c (ravenscar_thread_target): New class.
4585 (ravenscar_ops): Now a ravenscar_thread_target.
4586 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4587 (ravenscar_thread_alive, ravenscar_pid_to_str)
4588 (ravenscar_fetch_registers, ravenscar_store_registers)
4589 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4590 (ravenscar_stopped_by_hw_breakpoint)
4591 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4592 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4593 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4595 (init_ravenscar_thread_ops): Delete.
4596 (_initialize_ravenscar): Remove references to
4597 init_ravenscar_thread_ops and complete_target_initialization.
4599 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4600 (bsd_uthread_target): New class.
4601 (bsd_uthread_ops): Now a bsd_uthread_target.
4602 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4603 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4604 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4605 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4606 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4607 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4608 (bsd_uthread_target): Delete function.
4609 (_initialize_bsd_uthread): Remove reference to
4610 complete_target_initialization.
4612 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4613 (target_bfd): ... this new class.
4614 (target_bfd_xfer_partial, target_bfd_get_section_table)
4615 (target_bfd_close): Refactor as target_bfd methods.
4616 (target_bfd::~target_bfd): New.
4617 (target_bfd_reopen): Adjust.
4618 (target_bfd::close): New.
4620 * record-btrace.c (record_btrace_target): New class.
4621 (record_btrace_ops): Now a record_btrace_target.
4622 (record_btrace_open, record_btrace_stop_recording)
4623 (record_btrace_disconnect, record_btrace_close)
4624 (record_btrace_async, record_btrace_info)
4625 (record_btrace_insn_history, record_btrace_insn_history_range)
4626 (record_btrace_insn_history_from, record_btrace_call_history)
4627 (record_btrace_call_history_range)
4628 (record_btrace_call_history_from, record_btrace_record_method)
4629 (record_btrace_is_replaying, record_btrace_will_replay)
4630 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4631 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4632 (record_btrace_store_registers, record_btrace_prepare_to_store)
4633 (record_btrace_to_get_unwinder)
4634 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4635 (record_btrace_commit_resume, record_btrace_wait)
4636 (record_btrace_stop, record_btrace_can_execute_reverse)
4637 (record_btrace_stopped_by_sw_breakpoint)
4638 (record_btrace_supports_stopped_by_sw_breakpoint)
4639 (record_btrace_stopped_by_hw_breakpoint)
4640 (record_btrace_supports_stopped_by_hw_breakpoint)
4641 (record_btrace_update_thread_list, record_btrace_thread_alive)
4642 (record_btrace_goto_begin, record_btrace_goto_end)
4643 (record_btrace_goto, record_btrace_stop_replaying_all)
4644 (record_btrace_execution_direction)
4645 (record_btrace_prepare_to_generate_core)
4646 (record_btrace_done_generating_core): Refactor as
4647 record_btrace_target methods.
4648 (init_record_btrace_ops): Delete.
4649 (_initialize_record_btrace): Remove reference to
4650 init_record_btrace_ops.
4651 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4652 the execution_direction global.
4653 (record_full_base_target, record_full_target)
4654 (record_full_core_target): New classes.
4655 (record_full_ops): Now a record_full_target.
4656 (record_full_core_ops): Now a record_full_core_target.
4657 (record_full_target::detach, record_full_target::disconnect)
4658 (record_full_core_target::disconnect)
4659 (record_full_target::mourn_inferior, record_full_target::kill):
4661 (record_full_open, record_full_close, record_full_async): Refactor
4662 as methods of the record_full_base_target class.
4663 (record_full_resume, record_full_commit_resume): Refactor
4664 as methods of the record_full_target class.
4665 (record_full_wait, record_full_stopped_by_watchpoint)
4666 (record_full_stopped_data_address)
4667 (record_full_stopped_by_sw_breakpoint)
4668 (record_full_supports_stopped_by_sw_breakpoint)
4669 (record_full_stopped_by_hw_breakpoint)
4670 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4671 methods of the record_full_base_target class.
4672 (record_full_store_registers, record_full_xfer_partial)
4673 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4674 Refactor as methods of the record_full_target class.
4675 (record_full_can_execute_reverse, record_full_get_bookmark)
4676 (record_full_goto_bookmark, record_full_execution_direction)
4677 (record_full_record_method, record_full_info, record_full_delete)
4678 (record_full_is_replaying, record_full_will_replay)
4679 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4680 (record_full_stop_replaying): Refactor as methods of the
4681 record_full_base_target class.
4682 (record_full_core_resume, record_full_core_kill)
4683 (record_full_core_fetch_registers)
4684 (record_full_core_prepare_to_store)
4685 (record_full_core_store_registers, record_full_core_xfer_partial)
4686 (record_full_core_insert_breakpoint)
4687 (record_full_core_remove_breakpoint)
4688 (record_full_core_has_execution): Refactor
4689 as methods of the record_full_core_target class.
4690 (record_full_base_target::supports_delete_record): New.
4691 (init_record_full_ops): Delete.
4692 (init_record_full_core_ops): Delete.
4693 (record_full_save): Refactor as method of the
4694 record_full_base_target class.
4695 (_initialize_record_full): Remove references to
4696 init_record_full_ops and init_record_full_core_ops.
4698 * remote.c (remote_target, extended_remote_target): New classes.
4699 (remote_ops): Now a remote_target.
4700 (extended_remote_ops): Now an extended_remote_target.
4701 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4702 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4703 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4704 (remote_pass_signals, remote_set_syscall_catchpoint)
4705 (remote_program_signals, )
4706 (remote_thread_always_alive): Remove target_ops parameter.
4707 (remote_thread_alive, remote_thread_name)
4708 (remote_update_thread_list, remote_threads_extra_info)
4709 (remote_static_tracepoint_marker_at)
4710 (remote_static_tracepoint_markers_by_strid)
4711 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4712 (remote_open): Refactor as methods of remote_target.
4713 (extended_remote_open, extended_remote_detach)
4714 (extended_remote_attach, extended_remote_post_attach):
4715 (extended_remote_supports_disable_randomization)
4716 (extended_remote_create_inferior): : Refactor as method of
4717 extended_remote_target.
4718 (remote_set_permissions, remote_open_1, remote_detach)
4719 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4720 (remote_resume, remote_commit_resume, remote_stop)
4721 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4722 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4723 (remote_prepare_to_store, remote_store_registers)
4724 (remote_flash_erase, remote_flash_done, remote_files_info)
4725 (remote_kill, remote_mourn, remote_insert_breakpoint)
4726 (remote_remove_breakpoint, remote_insert_watchpoint)
4727 (remote_watchpoint_addr_within_range)
4728 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4729 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4730 (remote_supports_stopped_by_sw_breakpoint)
4731 (remote_stopped_by_hw_breakpoint)
4732 (remote_supports_stopped_by_hw_breakpoint)
4733 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4734 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4735 (remote_verify_memory): Refactor as methods of remote_target.
4736 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4738 (remote_xfer_partial, remote_get_memory_xfer_limit)
4739 (remote_search_memory, remote_rcmd, remote_memory_map)
4740 (remote_pid_to_str, remote_get_thread_local_address)
4741 (remote_get_tib_address, remote_read_description): Refactor as
4742 methods of remote_target.
4743 (remote_target::fileio_open, remote_target::fileio_pwrite)
4744 (remote_target::fileio_pread, remote_target::fileio_close): New.
4745 (remote_hostio_readlink, remote_hostio_fstat)
4746 (remote_filesystem_is_local, remote_can_execute_reverse)
4747 (remote_supports_non_stop, remote_supports_disable_randomization)
4748 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4749 (remote_supports_enable_disable_tracepoint)
4750 (remote_supports_string_tracing)
4751 (remote_can_run_breakpoint_commands, remote_trace_init)
4752 (remote_download_tracepoint, remote_can_download_tracepoint)
4753 (remote_download_trace_state_variable, remote_enable_tracepoint)
4754 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4755 (remote_trace_start, remote_get_trace_status)
4756 (remote_get_tracepoint_status, remote_trace_stop)
4757 (remote_trace_find, remote_get_trace_state_variable_value)
4758 (remote_save_trace_data, remote_get_raw_trace_data)
4759 (remote_set_disconnected_tracing, remote_core_of_thread)
4760 (remote_set_circular_trace_buffer, remote_traceframe_info)
4761 (remote_get_min_fast_tracepoint_insn_len)
4762 (remote_set_trace_buffer_size, remote_set_trace_notes)
4763 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4764 (remote_disable_btrace, remote_teardown_btrace)
4765 (remote_read_btrace, remote_btrace_conf)
4766 (remote_augmented_libraries_svr4_read, remote_load)
4767 (remote_pid_to_exec_file, remote_can_do_single_step)
4768 (remote_execution_direction, remote_thread_handle_to_thread_info):
4769 Refactor as methods of remote_target.
4770 (init_remote_ops, init_extended_remote_ops): Delete.
4771 (remote_can_async_p, remote_is_async_p, remote_async)
4772 (remote_thread_events, remote_upload_tracepoints)
4773 (remote_upload_trace_state_variables): Refactor as methods of
4775 (_initialize_remote): Remove references to init_remote_ops and
4776 init_extended_remote_ops.
4778 * remote-sim.c (gdbsim_target): New class.
4779 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4780 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4781 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4782 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4783 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4784 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4785 Refactor as methods of gdbsim_target.
4786 (gdbsim_ops): Now a gdbsim_target.
4787 (init_gdbsim_ops): Delete.
4788 (gdbsim_cntrl_c): Adjust.
4789 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4791 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4792 (the_amd64_linux_nat_target): New.
4793 (amd64_linux_fetch_inferior_registers)
4794 (amd64_linux_store_inferior_registers): Refactor as methods of
4795 amd64_linux_nat_target.
4796 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4797 * i386-linux-nat.c: Don't include "linux-nat.h".
4798 (i386_linux_nat_target): New class.
4799 (the_i386_linux_nat_target): New.
4800 (i386_linux_fetch_inferior_registers)
4801 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4802 as methods of i386_linux_nat_target.
4803 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4804 * inf-child.c (inf_child_ops): Delete.
4805 (inf_child_fetch_inferior_registers)
4806 (inf_child_store_inferior_registers): Delete.
4807 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4808 methods of inf_child_target.
4809 (inf_child_target::supports_terminal_ours)
4810 (inf_child_target::terminal_init)
4811 (inf_child_target::terminal_inferior)
4812 (inf_child_target::terminal_ours_for_output)
4813 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4814 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4816 (inf_child_open, inf_child_disconnect, inf_child_close)
4817 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4818 (inf_child_post_startup_inferior, inf_child_can_run)
4819 (inf_child_pid_to_exec_file): Refactor as methods of
4821 (inf_child_follow_fork): Delete.
4822 (inf_child_target::can_create_inferior)
4823 (inf_child_target::can_attach): New.
4824 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4825 (inf_child_target::has_stack, inf_child_target::has_registers)
4826 (inf_child_target::has_execution): New.
4827 (inf_child_fileio_open, inf_child_fileio_pwrite)
4828 (inf_child_fileio_pread, inf_child_fileio_fstat)
4829 (inf_child_fileio_close, inf_child_fileio_unlink)
4830 (inf_child_fileio_readlink, inf_child_use_agent)
4831 (inf_child_can_use_agent): Refactor as methods of
4833 (return_zero, inf_child_target): Delete.
4834 (inf_child_target::inf_child_target): New.
4835 * inf-child.h: Include "target.h".
4836 (inf_child_target): Delete function prototype.
4837 (inf_child_target): New class.
4838 (inf_child_open_target, inf_child_mourn_inferior)
4839 (inf_child_maybe_unpush_target): Delete.
4840 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4841 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4842 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4843 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4844 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4845 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4846 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4847 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4848 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4849 methods of inf_ptrace_target.
4850 (inf_ptrace_target): Delete function.
4851 * inf-ptrace.h: Include "inf-child.h".
4852 (inf_ptrace_target): Delete function declaration.
4853 (inf_ptrace_target): New class.
4854 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4855 * linux-nat.c (linux_target): New.
4856 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4857 (linux_nat_target::~linux_nat_target): New.
4858 (linux_child_post_attach, linux_child_post_startup_inferior)
4859 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4860 (linux_child_remove_fork_catchpoint)
4861 (linux_child_insert_vfork_catchpoint)
4862 (linux_child_remove_vfork_catchpoint)
4863 (linux_child_insert_exec_catchpoint)
4864 (linux_child_remove_exec_catchpoint)
4865 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4866 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4867 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4868 (linux_nat_stopped_data_address)
4869 (linux_nat_stopped_by_sw_breakpoint)
4870 (linux_nat_supports_stopped_by_sw_breakpoint)
4871 (linux_nat_stopped_by_hw_breakpoint)
4872 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4873 (linux_nat_kill, linux_nat_mourn_inferior)
4874 (linux_nat_xfer_partial, linux_nat_thread_alive)
4875 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4876 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4877 (linux_child_static_tracepoint_markers_by_strid)
4878 (linux_nat_is_async_p, linux_nat_can_async_p)
4879 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4880 (linux_nat_supports_multi_process)
4881 (linux_nat_supports_disable_randomization, linux_nat_async)
4882 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4883 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4884 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4885 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4886 methods of linux_nat_target.
4887 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4888 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4890 (check_stopped_by_watchpoint): Adjust.
4891 (linux_xfer_partial): Delete.
4892 (linux_target_install_ops, linux_target, linux_nat_add_target):
4894 (linux_nat_target::linux_nat_target): New.
4895 * linux-nat.h: Include "inf-ptrace.h".
4896 (linux_nat_target): New.
4897 (linux_target, linux_target_install_ops, linux_nat_add_target):
4898 Delete function declarations.
4899 (linux_target): Declare global.
4900 * linux-thread-db.c (thread_db_target): New.
4901 (thread_db_target::thread_db_target): New.
4902 (thread_db_ops): Delete.
4903 (the_thread_db_target): New.
4904 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4905 (thread_db_update_thread_list, thread_db_pid_to_str)
4906 (thread_db_extra_thread_info)
4907 (thread_db_thread_handle_to_thread_info)
4908 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4909 (thread_db_resume): Refactor as methods of thread_db_target.
4910 (init_thread_db_ops): Delete.
4911 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4912 * x86-linux-nat.c: Don't include "linux-nat.h".
4913 (super_post_startup_inferior): Delete.
4914 (x86_linux_nat_target::~x86_linux_nat_target): New.
4915 (x86_linux_child_post_startup_inferior)
4916 (x86_linux_read_description, x86_linux_enable_btrace)
4917 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4918 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4919 methods of x86_linux_nat_target.
4920 (x86_linux_create_target): Delete. Bits folded ...
4921 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4923 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4924 (x86_linux_nat_target): New class.
4925 (x86_linux_create_target): Delete.
4926 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4927 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4928 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4929 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4930 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4931 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4933 (x86_use_watchpoints): Delete.
4934 * x86-nat.h: Include "breakpoint.h" and "target.h".
4935 (x86_use_watchpoints): Delete.
4936 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4937 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4938 (x86_insert_watchpoint, x86_remove_watchpoint)
4939 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4940 (x86_stopped_by_hw_breakpoint): New declarations.
4941 (x86_nat_target): New template class.
4943 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4944 (the_ppc_linux_nat_target): New.
4945 (ppc_linux_fetch_inferior_registers)
4946 (ppc_linux_can_use_hw_breakpoint)
4947 (ppc_linux_region_ok_for_hw_watchpoint)
4948 (ppc_linux_ranged_break_num_registers)
4949 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4950 (ppc_linux_insert_mask_watchpoint)
4951 (ppc_linux_remove_mask_watchpoint)
4952 (ppc_linux_can_accel_watchpoint_condition)
4953 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4954 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4955 (ppc_linux_watchpoint_addr_within_range)
4956 (ppc_linux_masked_watch_num_registers)
4957 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4958 (ppc_linux_read_description): Refactor as methods of
4959 ppc_linux_nat_target.
4960 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4962 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4963 (procfs_target): New class.
4964 (the_procfs_target): New.
4965 (procfs_target): Delete function.
4966 (procfs_auxv_parse, procfs_attach, procfs_detach)
4967 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4968 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4969 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4970 (procfs_create_inferior, procfs_update_thread_list)
4971 (procfs_thread_alive, procfs_pid_to_str)
4972 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4973 (procfs_stopped_data_address, procfs_insert_watchpoint)
4974 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4975 (proc_find_memory_regions, procfs_info_proc)
4976 (procfs_make_note_section): Refactor as methods of procfs_target.
4977 (_initialize_procfs): Adjust.
4978 * sol-thread.c (sol_thread_target): New class.
4979 (sol_thread_ops): Now a sol_thread_target.
4980 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4981 (sol_thread_fetch_registers, sol_thread_store_registers)
4982 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4983 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4984 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4985 (init_sol_thread_ops): Delete.
4986 (_initialize_sol_thread): Adjust. Remove references to
4987 init_sol_thread_ops and complete_target_initialization.
4989 * windows-nat.c (windows_nat_target): New class.
4990 (windows_fetch_inferior_registers)
4991 (windows_store_inferior_registers, windows_resume, windows_wait)
4992 (windows_attach, windows_detach, windows_pid_to_exec_file)
4993 (windows_files_info, windows_create_inferior)
4994 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4995 (windows_close, windows_pid_to_str, windows_xfer_partial)
4996 (windows_get_tib_address, windows_get_ada_task_ptid)
4997 (windows_thread_name, windows_thread_alive): Refactor as
4998 windows_nat_target methods.
4999 (do_initial_windows_stuff): Adjust.
5000 (windows_target): Delete function.
5001 (_initialize_windows_nat): Adjust.
5003 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5004 (darwin_mourn_inferior, darwin_kill_inferior)
5005 (darwin_create_inferior, darwin_attach, darwin_detach)
5006 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5007 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5008 (darwin_supports_multi_process): Refactor as darwin_nat_target
5010 (darwin_resume_to, darwin_files_info): Delete.
5011 (_initialize_darwin_inferior): Rename to ...
5012 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5013 * darwin-nat.h: Include "inf-child.h".
5014 (darwin_nat_target): New class.
5015 (darwin_complete_target): Delete.
5016 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5017 (darwin_target): New.
5018 (i386_darwin_fetch_inferior_registers)
5019 (i386_darwin_store_inferior_registers): Refactor as methods of
5021 (darwin_complete_target): Delete, with ...
5022 (_initialize_i386_darwin_nat): ... bits factored out here.
5024 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5025 (the_alpha_linux_nat_target): New.
5026 (alpha_linux_register_u_offset): Refactor as
5027 alpha_linux_nat_target method.
5028 (_initialize_alpha_linux_nat): Adjust.
5029 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5030 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5031 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5032 methods of linux_nat_trad_target.
5033 (linux_trad_target): Delete.
5034 * linux-nat-trad.h (linux_trad_target): Delete function.
5035 (linux_nat_trad_target): New class.
5036 * mips-linux-nat.c (mips_linux_nat_target): New class.
5037 (super_fetch_registers, super_store_registers, super_close):
5039 (the_mips_linux_nat_target): New.
5040 (mips64_linux_regsets_fetch_registers)
5041 (mips64_linux_regsets_store_registers)
5042 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5043 (mips_linux_register_u_offset, mips_linux_read_description)
5044 (mips_linux_can_use_hw_breakpoint)
5045 (mips_linux_stopped_by_watchpoint)
5046 (mips_linux_stopped_data_address)
5047 (mips_linux_region_ok_for_hw_watchpoint)
5048 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5049 (mips_linux_close): Refactor as methods of mips_linux_nat.
5050 (_initialize_mips_linux_nat): Adjust to C++ification.
5052 * aix-thread.c (aix_thread_target): New class.
5053 (aix_thread_ops): Now an aix_thread_target.
5054 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5055 (aix_thread_fetch_registers, aix_thread_store_registers)
5056 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5057 (aix_thread_thread_alive, aix_thread_pid_to_str)
5058 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5059 Refactor as methods of aix_thread_target.
5060 (init_aix_thread_ops): Delete.
5061 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5062 and complete_target_initialization.
5063 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5064 (rs6000_nat_target): New class.
5065 (the_rs6000_nat_target): New.
5066 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5067 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5068 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5069 (super_create_inferior): Delete.
5070 (_initialize_rs6000_nat): Adjust to C++ification.
5072 * arm-linux-nat.c (arm_linux_nat_target): New class.
5073 (the_arm_linux_nat_target): New.
5074 (arm_linux_fetch_inferior_registers)
5075 (arm_linux_store_inferior_registers, arm_linux_read_description)
5076 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5077 (arm_linux_remove_hw_breakpoint)
5078 (arm_linux_region_ok_for_hw_watchpoint)
5079 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5080 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5081 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5082 arm_linux_nat_target.
5083 (_initialize_arm_linux_nat): Adjust to C++ification.
5085 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5086 (the_aarch64_linux_nat_target): New.
5087 (aarch64_linux_fetch_inferior_registers)
5088 (aarch64_linux_store_inferior_registers)
5089 (aarch64_linux_child_post_startup_inferior)
5090 (aarch64_linux_read_description)
5091 (aarch64_linux_can_use_hw_breakpoint)
5092 (aarch64_linux_insert_hw_breakpoint)
5093 (aarch64_linux_remove_hw_breakpoint)
5094 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5095 (aarch64_linux_region_ok_for_hw_watchpoint)
5096 (aarch64_linux_stopped_data_address)
5097 (aarch64_linux_stopped_by_watchpoint)
5098 (aarch64_linux_watchpoint_addr_within_range)
5099 (aarch64_linux_can_do_single_step): Refactor as methods of
5100 aarch64_linux_nat_target.
5101 (super_post_startup_inferior): Delete.
5102 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5104 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5105 (the_hppa_linux_nat_target): New.
5106 (hppa_linux_fetch_inferior_registers)
5107 (hppa_linux_store_inferior_registers): Refactor as methods of
5108 hppa_linux_nat_target.
5109 (_initialize_hppa_linux_nat): Adjust to C++ification.
5111 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5112 (the_ia64_linux_nat_target): New.
5113 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5114 (ia64_linux_stopped_data_address)
5115 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5116 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5117 ia64_linux_nat_target methods.
5118 (super_xfer_partial): Delete.
5119 (_initialize_ia64_linux_nat): Adjust to C++ification.
5121 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5122 (the_m32r_linux_nat_target): New.
5123 (m32r_linux_fetch_inferior_registers)
5124 (m32r_linux_store_inferior_registers): Refactor as
5125 m32r_linux_nat_target methods.
5126 (_initialize_m32r_linux_nat): Adjust to C++ification.
5128 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5129 (the_m68k_linux_nat_target): New.
5130 (m68k_linux_fetch_inferior_registers)
5131 (m68k_linux_store_inferior_registers): Refactor as
5132 m68k_linux_nat_target methods.
5133 (_initialize_m68k_linux_nat): Adjust to C++ification.
5135 * s390-linux-nat.c (s390_linux_nat_target): New class.
5136 (the_s390_linux_nat_target): New.
5137 (s390_linux_fetch_inferior_registers)
5138 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5139 (s390_insert_watchpoint, s390_remove_watchpoint)
5140 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5141 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5142 (s390_auxv_parse, s390_read_description): Refactor as methods of
5143 s390_linux_nat_target.
5144 (_initialize_s390_nat): Adjust to C++ification.
5146 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5147 (the_sparc_linux_nat_target): New.
5148 (_initialize_sparc_linux_nat): Adjust to C++ification.
5149 * sparc-nat.c (sparc_fetch_inferior_registers)
5150 (sparc_store_inferior_registers): Remove target_ops parameter.
5151 * sparc-nat.h (sparc_fetch_inferior_registers)
5152 (sparc_store_inferior_registers): Remove target_ops parameter.
5153 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5154 (the_sparc64_linux_nat_target): New.
5155 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5157 * spu-linux-nat.c (spu_linux_nat_target): New class.
5158 (the_spu_linux_nat_target): New.
5159 (spu_child_post_startup_inferior, spu_child_post_attach)
5160 (spu_child_wait, spu_fetch_inferior_registers)
5161 (spu_store_inferior_registers, spu_xfer_partial)
5162 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5164 (_initialize_spu_nat): Adjust to C++ification.
5166 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5167 (the_tilegx_linux_nat_target): New.
5168 (fetch_inferior_registers, store_inferior_registers):
5169 Refactor as methods.
5170 (_initialize_tile_linux_nat): Adjust to C++ification.
5172 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5173 (the_xtensa_linux_nat_target): New.
5174 (xtensa_linux_fetch_inferior_registers)
5175 (xtensa_linux_store_inferior_registers): Refactor as
5176 xtensa_linux_nat_target methods.
5177 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5179 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5180 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5181 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5182 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5183 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5184 (fbsd_stopped_by_sw_breakpoint)
5185 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5186 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5187 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5188 (fbsd_post_startup_inferior, fbsd_post_attach)
5189 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5190 (fbsd_set_syscall_catchpoint)
5191 (super_xfer_partial, super_resume, super_wait)
5192 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5193 (fbsd_handle_debug_trap): Remove target_ops parameter.
5194 (fbsd_nat_add_target): Delete.
5195 * fbsd-nat.h: Include "inf-ptrace.h".
5196 (fbsd_nat_add_target): Delete.
5197 (USE_SIGTRAP_SIGINFO): Define.
5198 (fbsd_nat_target): New class.
5200 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5201 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5202 (amd64bsd_target): Delete.
5203 * amd64-bsd-nat.h: New file.
5204 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5206 (amd64_fbsd_nat_target): New class.
5207 (the_amd64_fbsd_nat_target): New.
5208 (amd64fbsd_read_description): Refactor as method of
5209 amd64_fbsd_nat_target.
5210 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5211 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5212 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5213 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5214 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5215 (i386bsd_target): Delete.
5216 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5217 (i386bsd_fetch_inferior_registers)
5218 (i386bsd_store_inferior_registers): Declare.
5219 (i386_bsd_nat_target): New class.
5220 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5221 (the_i386_fbsd_nat_target): New.
5222 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5223 i386_fbsd_nat_target methods.
5224 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5225 (_initialize_i386fbsd_nat): Adjust to C++ification.
5226 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5227 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5228 (_initialize_x86_bsd_nat): Adjust to C++ification.
5229 * x86-bsd-nat.h: Include "x86-nat.h".
5230 (x86bsd_target): Delete declaration.
5231 (x86bsd_nat_target): New class.
5233 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5234 (the_aarch64_fbsd_nat_target): New.
5235 (aarch64_fbsd_fetch_inferior_registers)
5236 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5237 aarch64_fbsd_nat_target.
5238 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5239 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5240 (the_alpha_bsd_nat_target): New.
5241 (alphabsd_fetch_inferior_registers)
5242 (alphabsd_store_inferior_registers): Refactor as
5243 alpha_bsd_nat_target methods.
5244 (_initialize_alphabsd_nat): Refactor as methods of
5245 alpha_bsd_nat_target.
5246 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5247 (the_amd64_nbsd_nat_target): New.
5248 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5249 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5250 (the_amd64_obsd_nat_target): New.
5251 (_initialize_amd64obsd_nat): Adjust to C++ification.
5252 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5253 (the_arm_fbsd_nat_target): New.
5254 (arm_fbsd_fetch_inferior_registers)
5255 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5256 (_initialize_arm_fbsd_nat): Refactor as methods of
5257 arm_fbsd_nat_target.
5258 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5259 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5260 (the_arm_netbsd_nat_target): New.
5261 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5262 arm_netbsd_nat_target.
5263 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5264 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5265 (the_hppa_nbsd_nat_target): New.
5266 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5267 hppa_nbsd_nat_target methods.
5268 (_initialize_hppanbsd_nat): Adjust to C++ification.
5269 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5270 (the_hppa_obsd_nat_target): New.
5271 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5272 methods of hppa_obsd_nat_target.
5273 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5275 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5276 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5278 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5279 (_initialize_i386obsd_nat): Use add_target.
5280 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5281 (the_m68k_bsd_nat_target): New.
5282 (m68kbsd_fetch_inferior_registers)
5283 (m68kbsd_store_inferior_registers): Refactor as methods of
5284 m68k_bsd_nat_target.
5285 (_initialize_m68kbsd_nat): Adjust to C++ification.
5286 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5287 (the_mips_fbsd_nat_target): New.
5288 (mips_fbsd_fetch_inferior_registers)
5289 (mips_fbsd_store_inferior_registers): Refactor as methods of
5290 mips_fbsd_nat_target.
5291 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5293 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5294 (the_mips_nbsd_nat_target): New.
5295 (mipsnbsd_fetch_inferior_registers)
5296 (mipsnbsd_store_inferior_registers): Refactor as methods of
5297 mips_nbsd_nat_target.
5298 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5299 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5300 (the_mips64_obsd_nat_target): New.
5301 (mips64obsd_fetch_inferior_registers)
5302 (mips64obsd_store_inferior_registers): Refactor as methods of
5303 mips64_obsd_nat_target.
5304 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5306 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5308 * nbsd-nat.h: Include "inf-ptrace.h".
5309 (nbsd_nat_target): New class.
5310 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5311 (obsd_wait): Refactor as methods of obsd_nat_target.
5312 (obsd_add_target): Delete.
5313 * obsd-nat.h: Include "inf-ptrace.h".
5314 (obsd_nat_target): New class.
5315 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5316 (the_ppc_fbsd_nat_target): New.
5317 (ppcfbsd_fetch_inferior_registers)
5318 (ppcfbsd_store_inferior_registers): Refactor as methods of
5319 ppc_fbsd_nat_target.
5320 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5322 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5323 (the_ppc_nbsd_nat_target): New.
5324 (ppcnbsd_fetch_inferior_registers)
5325 (ppcnbsd_store_inferior_registers): Refactor as methods of
5326 ppc_nbsd_nat_target.
5327 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5328 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5329 (the_ppc_obsd_nat_target): New.
5330 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5331 methods of ppc_obsd_nat_target.
5332 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5334 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5335 (the_sh_nbsd_nat_target): New.
5336 (shnbsd_fetch_inferior_registers)
5337 (shnbsd_store_inferior_registers): Refactor as methods of
5339 (_initialize_shnbsd_nat): Adjust to C++ification.
5340 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5341 (inf_ptrace_xfer_partial): Delete.
5342 (sparc_xfer_partial, sparc_target): Delete.
5343 * sparc-nat.h (sparc_fetch_inferior_registers)
5344 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5345 (sparc_target): Delete function declaration.
5346 (sparc_target): New template class.
5347 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5348 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5349 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5350 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5352 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5353 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5354 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5355 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5357 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5358 (the_vax_bsd_nat_target): New.
5359 (vaxbsd_fetch_inferior_registers)
5360 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5362 (_initialize_vaxbsd_nat): Adjust to C++ification.
5364 * bsd-kvm.c (bsd_kvm_target): New class.
5365 (bsd_kvm_ops): Now a bsd_kvm_target.
5366 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5367 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5368 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5370 (bsd_kvm_return_one): Delete.
5371 (bsd_kvm_add_target): Adjust to C++ification.
5373 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5374 (nto_procfs_target_procfs): New classes.
5375 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5376 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5377 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5378 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5379 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5380 (procfs_remove_hw_breakpoint, procfs_resume)
5381 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5382 (procfs_kill_inferior, procfs_store_registers)
5383 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5384 as methods of nto_procfs_target.
5385 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5386 (nto_native_ops): Delete.
5387 (procfs_open, procfs_native_open): Delete.
5388 (nto_native_ops): Now an nto_procfs_target_native.
5389 (init_procfs_targets): Adjust to C++ification.
5390 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5391 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5392 Refactor as methods of nto_procfs_target.
5394 * go32-nat.c (go32_nat_target): New class.
5395 (the_go32_nat_target): New.
5396 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5397 (go32_store_registers, go32_xfer_partial, go32_files_info)
5398 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5399 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5400 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5401 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5402 (go32_target): Delete.
5403 (_initialize_go32_nat): Adjust to C++ification.
5405 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5406 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5407 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5408 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5410 (gnu_target): Delete.
5411 * gnu-nat.h (gnu_target): Delete.
5412 (gnu_nat_target): New class.
5413 * i386-gnu-nat.c (gnu_base_target): New.
5414 (i386_gnu_nat_target): New class.
5415 (the_i386_gnu_nat_target): New.
5416 (_initialize_i386gnu_nat): Adjust to C++ification.
5418 2018-05-02 Pedro Alves <palves@redhat.com>
5420 * bfd-target.c (target_bfd_xclose): Rename to ...
5421 (target_bfd_close): ... this.
5422 (target_bfd_reopen): Adjust.
5423 * target.c (target_close): Remove references to to_xclose.
5424 * target.h (target_ops::to_xclose): Delete.
5425 (target_ops::to_close): Update comments.
5427 2018-05-02 Pedro Alves <palves@redhat.com>
5429 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5431 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5432 * inf-ptrace.c (inf_ptrace_register_u_offset)
5433 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5434 (inf_ptrace_store_register, inf_ptrace_store_registers)
5435 (inf_ptrace_trad_target): Move to ...
5436 * linux-nat-trad.c: ... this new file.
5437 * linux-nat-trad.h: New file.
5438 * linux-nat.c (linux_target_install_ops): Make extern.
5439 (linux_trad_target): Delete.
5440 * linux-nat.h (linux_trad_target): Delete declaration.
5441 (linux_target_install_ops): Declare.
5442 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5445 2018-05-02 Pedro Alves <palves@redhat.com>
5447 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5448 procfs_target/add_target here.
5449 * procfs.c (procfs_target): Make static.
5450 (_initialize_procfs): Call add_target here.
5451 * procfs.h (struct target_ops): Remove forward declaration.
5452 (procfs_target): Remove declaration.
5453 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5455 2018-05-02 Pedro Alves <palves@redhat.com>
5457 * procfs.c (procfs_stopped_by_watchpoint)
5458 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5459 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5461 (procfs_use_watchpoints): Delete, move contents...
5462 (procfs_target): ... here.
5463 * procfs.h (procfs_use_watchpoints): Delete declaration.
5464 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5465 procfs_use_watchpoints.
5466 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5467 procfs_use_watchpoints.
5469 2018-05-02 Tom Tromey <tom@tromey.com>
5472 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5473 and var_zuinteger_unlimited.
5474 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5475 and PARAM_ZUINTEGER_UNLIMITED.
5476 (set_parameter_value): Handle var_zuinteger and
5477 var_zuinteger_unlimited.
5478 (add_setshow_generic): Likewise.
5479 (parmpy_init): Likewise.
5481 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5484 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5485 pointer is not null before dereferencing it.
5487 2018-04-30 Tom Tromey <tom@tromey.com>
5489 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5492 2018-04-30 Tom Tromey <tom@tromey.com>
5494 * breakpoint.c (mention): Remove use of is_mi_like_p.
5495 (print_mention_ranged_breakpoint): Likewise.
5496 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5499 2018-04-30 Tom Tromey <tom@tromey.com>
5501 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5503 2018-04-30 Tom Tromey <tom@tromey.com>
5505 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5506 (info_spu_event_command): Remove some uses of is_mi_like_p.
5508 2018-04-30 Tom Tromey <tom@tromey.com>
5510 * python/py-framefilter.c (py_print_single_arg)
5511 (enumerate_locals, py_print_args, py_print_frame): Remove some
5512 uses of is_mi_like_p.
5514 2018-04-30 Tom Tromey <tom@tromey.com>
5517 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5518 * ui-out.h (ui_out::is_mi_like_p): Now const.
5519 (ui_out::do_is_mi_like_p): Now const.
5520 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5522 2018-04-30 Tom Tromey <tom@tromey.com>
5524 * varobj.c (varobj_set_visualizer): Use new_reference.
5525 * python/python.c (gdbpy_decode_line): Use new_reference.
5526 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5529 2018-04-30 Tom Tromey <tom@tromey.com>
5531 * varobj.c (install_new_value): Use new_reference.
5532 * value.h (value_incref): Return void. Swap intro comment with
5534 * value.c (set_value_parent): Use new_reference.
5535 (value_incref): Return void. Update intro comment.
5536 (release_value): Use new_reference.
5537 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5539 2018-04-30 Tom Tromey <tom@tromey.com>
5541 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5542 * gdb_bfd.h (new_bfd_ref): Remove.
5543 (gdb_bfd_open): Update comment.
5544 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5545 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5546 (gdb_bfd_fdopenr): Use new_reference.
5547 * exec.c (exec_file_attach): Use new_reference.
5549 2018-04-30 Tom Tromey <tom@tromey.com>
5551 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5554 2018-04-30 Tom Tromey <tom@tromey.com>
5556 * jit.c (jit_read_code_entry): Use type_align.
5557 * i386-tdep.c (i386_gdbarch_init): Don't call
5558 set_gdbarch_long_long_align_bit.
5559 * gdbarch.sh: Remove long_long_align_bit.
5560 * gdbarch.c, gdbarch.h: Rebuild.
5561 * arc-tdep.c (arc_type_align): New function.
5562 (arc_gdbarch_init): Use arc_type_align. Don't call
5563 set_gdbarch_long_long_align_bit.
5565 2018-04-30 Tom Tromey <tom@tromey.com>
5567 * rust-lang.c (rust_type_alignment): Remove.
5568 (rust_composite_type): Use type_align.
5570 2018-04-30 Tom Tromey <tom@tromey.com>
5572 * NEWS: Mention Type.align.
5573 * python/py-type.c (typy_get_alignof): New function.
5574 (type_object_getset): Add "alignof".
5576 2018-04-30 Tom Tromey <tom@tromey.com>
5580 * std-operator.def (UNOP_ALIGNOF): New operator.
5581 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5583 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5584 * c-lang.c (c_op_print_tab): Add alignof.
5585 * c-exp.y (ALIGNOF): New token.
5586 (exp): Add "ALIGNOF" production.
5587 (ident_tokens): Add _Alignof and alignof.
5589 2018-04-30 Tom Tromey <tom@tromey.com>
5591 * i386-tdep.c (i386_type_align): New function.
5592 (i386_gdbarch_init): Update.
5593 * gdbarch.sh (type_align): New method.
5594 * gdbarch.c, gdbarch.h: Rebuild.
5595 * arch-utils.h (default_type_align): Declare.
5596 * arch-utils.c (default_type_align): New function.
5597 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5598 (struct type) <align_log2>: New field.
5599 <instance_flags>: Now a bitfield.
5600 (TYPE_RAW_ALIGN): New macro.
5601 (type_align, type_raw_align, set_type_align): Declare.
5602 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5604 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5605 (get_alignment, maybe_set_alignment): New functions.
5606 (read_structure_type, read_enumeration_type, read_array_type)
5607 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5608 (read_subrange_type, read_base_type): Set type alignment.
5610 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5612 * dwarf2read.c (read_index_from_section): Use bool.
5614 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5617 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5620 2018-04-29 John Reiser <jreiser@BitWagon.com>
5623 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5624 last step, and do it atomically.
5626 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5628 * compile/compile-c-types.c (convert_int, convert_float):
5631 2018-04-27 Tom Tromey <tom@tromey.com>
5634 * rust-lang.c (rust_inclusive_range_type_p): New function.
5635 (rust_range): Handle inclusive ranges.
5636 (rust_compute_range): Likewise.
5637 * rust-exp.y (struct rust_op) <inclusive>: New field.
5638 (DOTDOTEQ): New constant.
5639 (range_expr): Add "..=" productions.
5640 (operator_tokens): Add "..=" token.
5641 (ast_range): Add "inclusive" parameter.
5642 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5644 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5646 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5647 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5649 * expprint.c (print_subexp_standard): Handle new bounds values.
5650 (dump_subexp_body_standard): Likewise.
5652 2018-04-27 Tom Tromey <tom@tromey.com>
5654 * configure: Rebuild.
5655 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5656 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5658 (class symbol_needs_eval_context): Likewise.
5659 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5660 (mock_mapped_index::symbol_name_at): Use "override". Remove
5662 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5664 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5665 * aarch64-tdep.c (instruction_reader::read): Use "override".
5666 (instruction_reader_test::read): Likewise.
5667 * arm-tdep.c (instruction_reader::read): Use "override".
5668 (instruction_reader_thumb::read): Likewise.
5670 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5673 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5674 instead of remote_send.
5675 (remote_send): Remove.
5677 2018-04-26 Pedro Alves <palves@redhat.com>
5679 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5680 find_function_start_sal instead of find_pc_line.
5682 2018-04-26 Pedro Alves <palves@redhat.com>
5684 * breakpoint.c (set_breakpoint_location_function): Handle
5686 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5687 * elfread.c (elf_symtab_read): Give data symbols with
5688 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5689 (elf_rel_plt_read): Update comment.
5690 * linespec.c (convert_linespec_to_sals): Handle
5692 (minsym_found): Handle mst_data_gnu_ifunc.
5693 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5694 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5695 * parse.c (find_minsym_type_and_address): Handle
5697 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5698 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5699 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5701 <mst_data_gnu_ifunc>: New enumerator.
5703 2018-04-26 Pedro Alves <palves@redhat.com>
5705 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5706 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5707 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5709 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5710 (lookup_minimal_symbol_by_pc): Adjust.
5711 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5712 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5713 * minsyms.h (lookup_msym_prefer): New enum.
5714 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5715 parameter by a lookup_msym_prefer parameter.
5717 2018-04-26 Pedro Alves <palves@redhat.com>
5719 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5720 ends in "@plt" instead of looking at the symbol's section.
5722 2018-04-26 Pedro Alves <palves@redhat.com>
5724 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5726 (find_pc_partial_function_gnu_ifunc): Rename to ...
5727 (find_pc_partial_function): ... this, and remove references to
5729 (find_pc_partial_function): Delete old implementation.
5730 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5732 2018-04-26 Pedro Alves <palves@redhat.com>
5734 * linespec.c (struct bound_minimal_symbol_search_key): New.
5735 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5736 skip first line if we found a GNU ifunc minimal symbol by name.
5737 (compare_msymbols): Change parameters to work with a destructured
5739 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5742 2018-04-26 Pedro Alves <palves@redhat.com>
5744 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5745 ifunc targets here. Instead, if we have an ifunc minsym, use its
5747 (add_location_to_breakpoint): Store the minsym and the objfile in
5748 the breakpoint location.
5749 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5750 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5751 Record the minsym in the sal.
5752 * symtab.h (symtab_and_line) <msymbol>: New field.
5754 2018-04-26 Pedro Alves <palves@redhat.com>
5756 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5757 unless we actually resolved the ifunc.
5759 2018-04-26 Pedro Alves <palves@redhat.com>
5761 * c-exp.y (variable production): Prefer ifunc minsyms over
5762 regular function symbols.
5763 * symtab.c (find_gnu_ifunc): New function.
5764 * minsyms.h (lookup_msym_prefer): New enum.
5765 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5766 parameter by a lookup_msym_prefer parameter.
5767 * symtab.h (find_gnu_ifunc): New declaration.
5769 2018-04-26 Pedro Alves <palves@redhat.com>
5771 * blockframe.c (find_gnu_ifunc_target_type): New function.
5772 (find_function_type): New.
5773 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5774 return a value with a memory address.
5775 (eval_call): For calls to GNU ifunc functions, try to find the
5776 type of the target function from the type that the resolver
5778 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5780 * infcall.c (find_function_return_type): Delete.
5781 (find_function_addr): Add 'function_type' parameter. For calls to
5782 GNU ifunc functions, try to find the type of the target function
5783 from the type that the resolver returns, and return it via
5785 (call_function_by_hand_dummy): Adjust to use the function type
5786 returned by find_function_addr.
5787 (find_function_addr): Add 'function_type' parameter and move
5789 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5792 2018-04-26 Pedro Alves <palves@redhat.com>
5794 * c-exp.y (variable production): Skip finding an alias for ifunc
5797 2018-04-26 Pedro Alves <palves@redhat.com>
5799 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5801 2018-04-25 Pedro Alves <palves@redhat.com>
5803 * infcmd.c (kill_command): Print the pid as string, not the whole
5804 thread's ptid. Add comment. s/has been killed/killed/ in output
5806 * remote.c (remote_detach_1): Print the pid as string, not the
5807 whole thread's ptid.
5809 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5810 Sergio Durigan Junior <sergiodj@redhat.com>
5811 Pedro Alves <palves@redhat.com>
5813 * infcmd.c (kill_command): Print message when inferior has
5815 * inferior.c (print_inferior_events): Remove 'static'. Set as
5817 (add_inferior): Improve message printed when
5818 'print_inferior_events' is on.
5819 (exit_inferior): Remove message printed when
5820 'print_inferior_events' is on.
5821 (detach_inferior): Improve message printed when
5822 'print_inferior_events' is on.
5823 (initialize_inferiors): Use 'add_inferior_silent' to set
5824 'current_inferior_'.
5825 * inferior.h (print_inferior_events): Declare here as
5827 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5828 '[Detaching...]' messages when 'print_inferior_events' is on.
5829 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5830 as prefix/suffix for messages. Remove periods. Fix erroneous
5831 'Detaching after fork from child...', replace it by '... from
5833 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5834 prefix/suffix when printing 'Detaching...' messages. Print
5835 them when 'print_inferior_events' is on.
5836 * remote.c (remote_detach_1): Print message when detaching
5837 from inferior and '!is_fork_parent'.
5839 2018-04-24 Tom Tromey <tom@tromey.com>
5841 * cli-out.h: Reindent.
5843 2018-04-24 Tom Tromey <tom@tromey.com>
5845 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5846 (cli_ui_out::do_field_string): Use fputs_filtered.
5847 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5849 2018-04-23 Tom Tromey <tom@tromey.com>
5851 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5852 gdb::unique_xmalloc_ptr.
5854 2018-04-23 Tom Tromey <tom@tromey.com>
5856 * configure: Rebuild.
5858 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5861 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5862 prepare_for_testing. Set normal_bp to r_debug_state if target
5865 2018-04-21 Pedro Alves <palves@redhat.com>
5866 Rajendra SY <rajendra.sy@gmail.com>
5868 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5869 * remote.c (extended_remote_attach): In all-stop mode, mark the
5870 thread as executing.
5872 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5874 * thread.c (thread_apply_all_command): Fix comment.
5875 (thread_command): Fix comment.
5877 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5879 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5881 * features/aarch64-core.c (create_feature_aarch64_core):
5883 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5885 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5887 * features/i386/32bit-avx512.c
5888 (create_feature_i386_32bit_avx512): Likewise.
5889 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5891 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5893 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5895 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5897 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5899 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5901 * features/i386/64bit-avx512.c
5902 (create_feature_i386_64bit_avx512): Likewise.
5903 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5905 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5907 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5909 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5911 * features/i386/64bit-segments.c
5912 (create_feature_i386_64bit_segments): Likewise.
5913 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5915 * features/i386/x32-core.c
5916 (create_feature_i386_x32_core): Likewise.
5917 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5918 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5919 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5920 * target-descriptions.c: In generated code, don't pass xml
5923 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5925 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5926 (print_xml_feature::visit_post): Likewise.
5927 (print_xml_feature::visit): Likewise.
5928 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5929 (print_xml_feature): Add new class.
5930 * regformats/regdat.sh: Null xmltarget on feature targets.
5931 * target-descriptions.c (struct target_desc): Add xmltarget.
5932 (maintenance_check_tdesc_xml_convert): Add unittest function.
5933 (tdesc_get_features_xml): Add function to get xml.
5934 (maintenance_check_xml_descriptions): Test xml generation.
5935 * xml-tdesc.c (string_read_description_xml): Add function.
5936 * xml-tdesc.h (string_read_description_xml): Add declaration.
5938 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5940 * features/Makefile: Add feature marker to targets with new style
5941 target descriptions.
5942 * regformats/aarch64.dat: Regenerate.
5943 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5944 * regformats/i386/amd64-avx-linux.dat: Likewise.
5945 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5946 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5947 * regformats/i386/amd64-linux.dat: Likewise.
5948 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5949 * regformats/i386/amd64.dat: Likewise.
5950 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5951 * regformats/i386/i386-avx-linux.dat: Likewise.
5952 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5953 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5954 * regformats/i386/i386-linux.dat: Likewise.
5955 * regformats/i386/i386-mmx-linux.dat: Likewise.
5956 * regformats/i386/i386-mpx-linux.dat: Likewise.
5957 * regformats/i386/i386.dat: Likewise.
5958 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5959 * regformats/i386/x32-avx-linux.dat: Likewise.
5960 * regformats/i386/x32-linux.dat: Likewise.
5961 * regformats/tic6x-c62x-linux.dat: Likewise.
5962 * regformats/tic6x-c64x-linux.dat: Likewise.
5963 * regformats/tic6x-c64xp-linux.dat: Likewise.
5964 * regformats/regdat.sh: Parse feature marker.
5966 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5968 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5969 (tdesc_osabi_name): Likewise.
5970 * target-descriptions.c (tdesc_architecture_name): Add new
5972 (tdesc_osabi_name): Likewise.
5974 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5976 * common/tdesc.c (tdesc_predefined_type): Move to here.
5977 (tdesc_named_type): Likewise.
5978 (tdesc_create_vector): Likewise.
5979 (tdesc_create_struct): Likewise.
5980 (tdesc_set_struct_size): Likewise.
5981 (tdesc_create_union): Likewise.
5982 (tdesc_create_flags): Likewise.
5983 (tdesc_create_enum): Likewise.
5984 (tdesc_add_field): Likewise.
5985 (tdesc_add_typed_bitfield): Likewise.
5986 (tdesc_add_bitfield): Likewise.
5987 (tdesc_add_flag): Likewise.
5988 (tdesc_add_enum_value): Likewise.
5989 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5990 (struct tdesc_type_vector): Likewise.
5991 (struct tdesc_type_field): Likewise.
5992 (struct tdesc_type_with_fields): Likewise.
5993 (tdesc_create_enum): Add declaration.
5994 (tdesc_add_typed_bitfield): Likewise.
5995 (tdesc_add_enum_value): Likewise.
5996 * target-descriptions.c (tdesc_type_field): Move from here.
5997 (tdesc_type_builtin): Likewise.
5998 (tdesc_type_vector): Likewise.
5999 (tdesc_type_with_fields): Likewise.
6000 (tdesc_predefined_types): Likewise.
6001 (tdesc_named_type): Likewise.
6002 (tdesc_create_vector): Likewise.
6003 (tdesc_create_struct): Likewise.
6004 (tdesc_set_struct_size): Likewise.
6005 (tdesc_create_union): Likewise.
6006 (tdesc_create_flags): Likewise.
6007 (tdesc_create_enum): Likewise.
6008 (tdesc_add_field): Likewise.
6009 (tdesc_add_typed_bitfield): Likewise.
6010 (tdesc_add_bitfield): Likewise.
6011 (tdesc_add_flag): Likewise.
6012 (tdesc_add_enum_value): Likewise.
6013 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6014 (tdesc_add_typed_bitfield): Likewise.
6015 (tdesc_add_enum_value): Likewise.
6017 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6019 * common/tdesc.c (tdesc_feature::accept): Move to here.
6020 (tdesc_feature::operator==): Likewise.
6021 (tdesc_create_reg): Likewise.
6022 * common/tdesc.h (tdesc_type_kind): Likewise.
6023 (struct tdesc_type): Likewise.
6024 (struct tdesc_feature): Likewise.
6025 * regformats/regdat.sh: Create a feature.
6026 * target-descriptions.c (tdesc_type_kind): Move from here.
6027 (tdesc_type): Likewise.
6028 (tdesc_type_up): Likewise.
6029 (tdesc_feature): Likewise.
6030 (tdesc_create_reg): Likewise.
6032 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6034 * Makefile.in: Add arch/tdesc.c
6035 * common/tdesc.c: New file.
6036 * common/tdesc.h (tdesc_element_visitor): Move to here.
6037 (tdesc_element): Likewise.
6038 (tdesc_reg): Likewise.
6039 (tdesc_reg_up): Likewise.
6040 * regformats/regdef.h (reg): Add offset to constructors.
6041 * target-descriptions.c (tdesc_element_visitor): Move from here.
6042 (tdesc_element): Likewise.
6043 (tdesc_reg): Likewise.
6044 (tdesc_reg_up): Likewise.
6046 2018-04-17 Tom Tromey <tom@tromey.com>
6048 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6051 2018-04-17 Tom Tromey <tom@tromey.com>
6053 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6055 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6057 * symtab.c (print_symbol_info): Skip printing filename and line
6058 number when `last' is NULL.
6059 (symtab_symbol_info): Use empty string instead of NULL for first
6060 invocation of print_symbol_info.
6061 (rbreak_command): Pass NULL to `last' parameter of
6064 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6066 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6069 2018-04-16 Pedro Alves <palves@redhat.com>
6071 * MAINTAINERS (sh): Remove.
6072 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6073 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6074 (ALLDEPFILES): Remove sh64-tdep.c.
6075 * NEWS: Mentions that support for SH-5/SH64 is removed.
6076 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6077 (sh*-*-openbsd*): Ditto.
6078 (sh64-*-elf*): Remove.
6080 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6081 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6082 * sh-tdep.c: No longer include "sh64-tdep.h".
6083 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6084 * sh64-tdep.c, sh64-tdep.h: Remove files.
6086 2018-04-16 Pedro Alves <palves@redhat.com>
6088 * MAINTAINERS: Remove m88k.
6089 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6090 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6091 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6092 * NEWS: Mention that support for m88k was removed.
6093 * configure.host (m88*-*-*): Remove support.
6094 * configure.nat (m88k-*-*): Remove support.
6095 * configure.tgt (m88*-*-openbsd*): Remove.
6096 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6098 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6100 * configure.tgt (x86_tobjs): New variable.
6101 (amd64_tobjs, i386_tobjs): Use it.
6103 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6105 * symtab.c (print_symbol_info): Precede the symbol definition by
6106 the line number when available.
6107 * NEWS: Advertise this enhancement.
6109 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6111 * NEWS (New options): announce set/show record btrace cpu.
6112 * btrace.c: Include record-btrace.h.
6113 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6114 the vendor is unknown.
6115 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6116 Maybe overwrite the btrace configuration's cpu.
6117 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6118 (btrace_fetch): Add cpu parameter. Update callers.
6119 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6120 Maybe overwrite the btrace configuration's cpu. Skip enabling
6121 errata workarounds if the vendor is unknown.
6122 * python/py-record-btrace.c: Include record-btrace.h.
6123 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6124 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6125 * record-btrace.c (record_btrace_cpu_state_kind): New.
6126 (record_btrace_cpu): New.
6127 (set_record_btrace_cpu_cmdlist): New.
6128 (record_btrace_get_cpu): New.
6129 (require_btrace_thread, record_btrace_info)
6130 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6131 (cmd_set_record_btrace_cpu_none): New.
6132 (cmd_set_record_btrace_cpu_auto): New.
6133 (cmd_set_record_btrace_cpu): New.
6134 (cmd_show_record_btrace_cpu): New.
6135 (_initialize_record_btrace): Initialize set/show record btrace cpu
6137 * record-btrace.h (record_btrace_get_cpu): New.
6139 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6141 * record.c (set_record_command): Fix typo in message.
6143 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6145 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6147 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6149 * infrun.c (process_event_stop_test): Call
6150 gdbarch_in_indirect_branch_thunk.
6151 * gdbarch.sh (in_indirect_branch_thunk): New.
6152 * gdbarch.c: Regenerated.
6153 * gdbarch.h: Regenerated.
6156 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6157 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6158 (ALLDEPFILES): Add x86-tdep.c.
6159 * arch-utils.h (default_in_indirect_branch_thunk): New.
6160 * arch-utils.c (default_in_indirect_branch_thunk): New.
6161 * i386-tdep: Include x86-tdep.h.
6162 (i386_in_indirect_branch_thunk): New.
6163 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6165 * amd64-tdep: Include x86-tdep.h.
6166 (amd64_in_indirect_branch_thunk): New.
6167 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6169 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6172 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6173 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6174 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6177 2018-04-12 Tom Tromey <tom@tromey.com>
6179 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6180 (rust_evaluate_subexp): Likewise.
6182 2018-04-12 Pedro Alves <palves@redhat.com>
6184 * procfs.c (procfs_detach): Make forward declaration's prototype
6185 match definition's protototype.
6186 (proc_get_LDT_entry): Remove stale do_cleanups call.
6188 2018-04-12 Pedro Alves <palves@redhat.com>
6190 * target.h (target_ops::to_has_exited): Delete.
6191 (target_has_exited): Delete.
6192 * target-delegates.c: Regenerate.
6194 2018-04-11 Pedro Alves <palves@redhat.com>
6196 * target.c (fileio_fh_t::t): Add comment.
6197 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6198 (target_fileio_close): Handle a NULL target.
6199 (invalidate_fileio_fh): New.
6200 (target_close): Call it.
6201 * remote.c (remote_hostio_send_command): No longer check whether
6202 remote_desc is open.
6204 2018-04-11 Pedro Alves <palves@redhat.com>
6206 * target.c (fileio_fh_t): Make it a named struct instead of a
6208 (fileio_fh_t::is_closed): New method.
6209 (DEF_VEC_O (fileio_fh_t)): Remove.
6210 (fileio_fhandles): Now a std::vector.
6211 (is_closed_fileio_fh): Delete.
6212 (acquire_fileio_fd): Adjust. Rename parameters.
6213 (release_fileio_fd): Adjust.
6214 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6215 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6216 (target_fileio_close): Adjust.
6218 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6220 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6223 2018-04-10 Pedro Alves <palves@redhat.com>
6225 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6226 (scoped_finish_thread_state): New class.
6227 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6229 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6230 (fetch_inferior_event, normal_stop): Likewise.
6231 * thread.c (finish_thread_state_cleanup): Delete.
6233 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6234 Pedro Alves <palves@redhat.com>
6236 * value.c: Include "selftest.h" and "common/array-view.h".
6237 (struct range) <operator ==>: New.
6238 (test_ranges_contain): New.
6239 (check_ranges_vector): New.
6240 (test_insert_into_bit_range_vector): New.
6241 (_initialize_values): Register selftests.
6242 * common/array-view.h (operator==, operator!=): New.
6244 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6246 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6248 * inline-frame.c: Include <algorithm>.
6249 (struct inline_state): Add constructor.
6250 (inline_state_s): Remove.
6251 (DEF_VEC_O(inline_state_s)): Remove.
6252 (inline_states): Change type to std::vector.
6253 (find_inline_frame_state): Adjust to std::vector.
6254 (allocate_inline_frame_state): Remove.
6255 (clear_inline_frame_state): Adjust to std::vector.
6256 (skip_inline_frames): Adjust to std::vector.
6258 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6260 * tracepoint.h (struct trace_state_variable): Add constructor.
6261 <name>: Change type to std::string.
6262 * tracepoint.c (tsv_s): Remove.
6263 (DEF_VEC_O(tsv_s)): Remove.
6264 (tvariables): Change to std::vector.
6265 (create_trace_state_variable): Adjust to std::vector.
6266 (find_trace_state_variable): Likewise.
6267 (find_trace_state_variable_by_number): Likewise.
6268 (delete_trace_state_variable): Likewise.
6269 (trace_variable_command): Adjust to std::string.
6270 (delete_trace_variable_command): Likewise.
6271 (tvariables_info_1): Adjust to std::vector.
6272 (save_trace_state_variables): Likewise.
6273 (start_tracing): Likewise.
6274 (merge_uploaded_trace_state_variables): Adjust to std::vector
6276 * target.h (struct target_ops)
6277 <to_download_trace_state_variable>: Pass reference to
6278 trace_state_variable.
6279 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6280 * target-delegates.c: Re-generate.
6281 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6282 (mi_tsv_deleted): Likewise.
6283 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6284 * remote.c (remote_download_trace_state_variable): Change
6285 pointer to reference and adjust.
6286 * make-target-delegates (parse_argtypes): Handle references.
6287 (write_function_header): Likewise.
6288 (munge_type): Likewise.
6290 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6292 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6293 string_view-selftests.c.
6294 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6296 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6297 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6298 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6299 * unittests/basic_string_view/element_access/char/1.cc:
6301 * unittests/basic_string_view/element_access/char/empty.cc:
6303 * unittests/basic_string_view/element_access/char/front_back.cc:
6305 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6306 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6308 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6310 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6312 * unittests/basic_string_view/operations/compare/char/1.cc:
6314 * unittests/basic_string_view/operations/compare/char/13650.cc:
6316 * unittests/basic_string_view/operations/copy/char/1.cc:
6318 * unittests/basic_string_view/operations/data/char/1.cc:
6320 * unittests/basic_string_view/operations/find/char/1.cc:
6322 * unittests/basic_string_view/operations/find/char/2.cc:
6324 * unittests/basic_string_view/operations/find/char/3.cc:
6326 * unittests/basic_string_view/operations/find/char/4.cc:
6328 * unittests/basic_string_view/operations/rfind/char/1.cc:
6330 * unittests/basic_string_view/operations/rfind/char/2.cc:
6332 * unittests/basic_string_view/operations/rfind/char/3.cc:
6334 * unittests/basic_string_view/operations/substr/char/1.cc:
6336 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6337 * unittests/string_view-selftests.c: New file.
6339 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6341 * unittests/basic_string_view/capacity/1.cc: New file.
6342 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6343 * unittests/basic_string_view/cons/char/1.cc: New file.
6344 * unittests/basic_string_view/cons/char/2.cc: New file.
6345 * unittests/basic_string_view/cons/char/3.cc: New file.
6346 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6347 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6348 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6349 * unittests/basic_string_view/element_access/char/1.cc: New file.
6350 * unittests/basic_string_view/element_access/char/2.cc: New file.
6351 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6352 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6353 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6354 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6355 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6356 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6357 * unittests/basic_string_view/include.cc: New file.
6358 * unittests/basic_string_view/inserters/char/1.cc: New file.
6359 * unittests/basic_string_view/inserters/char/2.cc: New file.
6360 * unittests/basic_string_view/inserters/char/3.cc: New file.
6361 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6362 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6363 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6364 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6365 * unittests/basic_string_view/literals/types.cc: New file.
6366 * unittests/basic_string_view/literals/values.cc: New file.
6367 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6368 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6369 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6370 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6371 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6372 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6373 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6374 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6375 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6376 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6377 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6378 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6379 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6380 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6381 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6382 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6383 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6384 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6385 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6386 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6387 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6388 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6389 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6390 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6391 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6392 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6393 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6394 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6395 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6396 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6397 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6398 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6399 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6400 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6401 * unittests/basic_string_view/operators/char/2.cc: New file.
6402 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6403 * unittests/basic_string_view/range_access/char/1.cc: New file.
6404 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6405 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6406 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6407 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6408 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6409 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6410 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6411 * unittests/basic_string_view/typedefs.cc: New file.
6412 * unittests/basic_string_view/types/1.cc: New file.
6414 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6416 * common/gdb_string_view.h: Remove libstdc++ implementation
6417 details, adjust to gdb reality.
6418 * common/gdb_string_view.tcc: Likewise.
6419 * cli/cli-script.c (struct string_view): Remove.
6420 (user_args) <m_args>: Change element type to gdb::string_view.
6421 (user_args::insert_args): Adjust.
6423 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6425 * common/gdb_string_view.h: New file.
6426 * common/gdb_string_view.tcc: New file.
6428 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6430 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6431 * configure: Re-generate.
6433 2018-04-09 Pedro Alves <palves@redhat.com>
6435 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6436 (set_target_gdbarch): Call
6437 gdb::observers::architecture_changed.notify instead of
6438 observer_notify_architecture_changed.
6440 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6442 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6443 (do_restore_current_traceframe_cleanup): Remove.
6444 (restore_current_traceframe_cleanup_dtor): Remove.
6445 (make_cleanup_restore_current_traceframe): Remove.
6446 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6448 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6449 * infrun.c (fetch_inferior_event): Use
6450 scoped_restore_current_traceframe.
6452 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6454 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6456 <n_allocated_type_units>: Remove.
6457 <all_type_units>: Change to std::vector.
6458 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6459 to std::vector change.
6460 (dwarf2_per_objfile::get_cutu): Likewise.
6461 (dwarf2_per_objfile::get_tu): Likewise.
6462 (create_signatured_type_table_from_index): Likewise.
6463 (create_signatured_type_table_from_debug_names): Likewise.
6464 (dw2_symtab_iter_next): Likewise.
6465 (dw2_print_stats): Likewise.
6466 (dw2_expand_all_symtabs): Likewise.
6467 (dw2_expand_marked_cus): Likewise.
6468 (dw2_debug_names_iterator::next): Likewise.
6469 (dwarf2_initialize_objfile): Likewise.
6470 (add_signatured_type_cu_to_table): Likewise.
6471 (create_all_type_units): Likewise.
6472 (add_type_unit): Likewise.
6473 (struct tu_abbrev_offset): Add constructor.
6474 (build_type_psymtabs_1): Adjust to std::vector change.
6475 (print_tu_stats): Likewise.
6476 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6477 (write_debug_names): Likewise.
6479 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6481 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6482 Make an std::vector.
6483 <n_comp_units>: Remove.
6484 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6485 to std::vector change.
6486 (dwarf2_per_objfile::get_cutu): Likewise.
6487 (dwarf2_per_objfile::get_cu): Likewise.
6488 (create_cus_from_index): Likewise.
6489 (create_addrmap_from_index): Likewise.
6490 (create_addrmap_from_aranges): Likewise.
6491 (dwarf2_read_index): Likewise.
6492 (dw2_find_last_source_symtab): Likewise.
6493 (dw2_map_symtabs_matching_filename): Likewise.
6494 (dw2_symtab_iter_next): Likewise.
6495 (dw2_print_stats): Likewise.
6496 (dw2_expand_all_symtabs): Likewise.
6497 (dw2_expand_symtabs_with_fullname): Likewise.
6498 (dw2_expand_marked_cus): Likewise.
6499 (dw2_map_symbol_filenames): Likewise.
6500 (create_cus_from_debug_names): Likewise.
6501 (dwarf2_read_debug_names): Likewise.
6502 (dw2_debug_names_iterator::next): Likewise.
6503 (dwarf2_initialize_objfile): Likewise.
6504 (set_partial_user): Likewise.
6505 (dwarf2_build_psymtabs_hard): Likewise.
6506 (read_comp_units_from_section): Remove arguments, adjust to
6508 (create_all_comp_units): Adjust to std::vector and
6509 read_comp_units_from_section changes.
6510 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6512 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6513 (psyms_seen_size): Likewise.
6514 (write_gdbindex): Likewise.
6515 (write_debug_names): Likewise.
6517 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6519 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6520 with dwarf2_per_objfile.
6521 (create_cus_from_index): Likewise.
6522 (create_signatured_type_table_from_index): Likewise.
6523 (dwarf2_read_index): Likewise.
6524 (dwarf2_initialize_objfile): Likewise.
6525 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6526 per_cu rather than get_dwarf2_per_objfile.
6528 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6530 * dwarf2read.h (struct signatured_type): Forward declare.
6531 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6533 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6534 (dw2_get_cutu): ...this.
6535 (dwarf2_per_objfile::get_cu): Rename from...
6536 (dw2_get_cu): ...this.
6537 (dwarf2_per_objfile::get_tu): New.
6538 (create_addrmap_from_index): Adjust.
6539 (create_addrmap_from_aranges): Adjust.
6540 (dw2_find_last_source_symtab): Adjust.
6541 (dw2_map_symtabs_matching_filename): Adjust.
6542 (dw2_symtab_iter_next): Adjust.
6543 (dw2_print_stats): Adjust.
6544 (dw2_expand_all_symtabs): Adjust.
6545 (dw2_expand_symtabs_with_fullname): Adjust.
6546 (dw2_expand_marked_cus): Adjust.
6547 (dw_expand_symtabs_matching_file_matcher): Adjust.
6548 (dw2_map_symbol_filenames): Adjust.
6549 (dw2_debug_names_iterator::next): Adjust.
6550 (dwarf2_initialize_objfile): Adjust.
6551 (set_partial_user): Adjust.
6552 (dwarf2_build_psymtabs_hard): Adjust.
6554 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6556 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6557 Remove unused variables.
6558 (dw2_map_symtabs_matching_filename): Likewise.
6559 (dwarf2_record_block_ranges): Likewise.
6560 (dwarf2_read_addr_index): Likewise.
6561 (follow_die_offset): Likewise.
6563 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6565 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6566 to symbol_file_add_main.
6568 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6571 * mi/mi-console.c (do_fputc_async_safe): New.
6572 (mi_console_file::write_async_safe): New.
6573 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6574 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6576 * ui-file.c (ui_file::putstrn): Adjust call to
6577 fputstrn_unfiltered.
6578 * utils.c (printchar): Replace do_fputs and do_fprintf
6579 parameters by do_fputc.
6580 (fputstr_filtered): Adjust call to printchar.
6581 (fputstr_unfiltered): Likewise.
6582 (fputstrn_filtered): Likewise.
6583 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6585 * utils.h (do_fputc_ftype): New typedef.
6586 (fputstrn_unfiltered): Add do_fputc parameter.
6588 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6590 * regformats/i386/i386-avx.dat: Remove.
6592 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6595 * amd64-tdep.c (amd64_none_init_abi): New function.
6596 (amd64_x32_none_init_abi): New function.
6597 (_initialize_amd64_tdep): Register handlers for x86-64 and
6598 x64_32 with GDB_OSABI_NONE.
6599 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6600 GDB_OSABI_NONE osabi.
6602 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6605 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6607 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6608 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6610 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6612 * common/byte-vector.h (char_vector): New type.
6613 * target.h (target_read_alloc): Return
6614 gdb::optional<byte_vector>.
6615 (target_read_stralloc): Return gdb::optional<char_vector>.
6616 (target_get_osdata): Return gdb::optional<char_vector>.
6617 * target.c (target_read_alloc_1): Templatize. Replacement
6618 manual memory management with vector.
6619 (target_read_alloc): Change return type, adjust.
6620 (target_read_stralloc): Change return type, adjust.
6621 (target_get_osdata): Change return type, adjust.
6622 * auxv.c (struct auxv_info) <length>: Remove.
6623 <data>: Change type to gdb::optional<byte_vector>.
6624 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6625 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6626 (target_auxv_search): Adjust.
6627 (fprint_target_auxv): Adjust.
6628 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6629 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6630 (linux_make_corefile_notes): Adjust.
6631 * osdata.c (get_osdata): Adjust.
6632 * remote.c (remote_get_threads_with_qxfer): Adjust.
6633 (remote_memory_map): Adjust.
6634 (remote_traceframe_info): Adjust.
6635 (btrace_read_config): Adjust.
6636 (remote_read_btrace): Adjust.
6637 (remote_pid_to_exec_file): Adjust.
6638 * solib-aix.c (solib_aix_get_library_list): Adjust.
6639 * solib-dsbt.c (decode_loadmap): Don't free buf.
6640 (dsbt_get_initial_loadmaps): Adjust.
6641 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6642 * solib-target.c (solib_target_current_sos): Adjust.
6643 * tracepoint.c (sdata_make_value): Adjust.
6644 * xml-support.c (xinclude_start_include): Adjust.
6645 (xml_fetch_content_from_file): Adjust.
6646 * xml-support.h (xml_fetch_another): Change return type.
6647 (xml_fetch_content_from_file): Change return type.
6648 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6649 * xml-tdesc.c (file_read_description_xml): Adjust.
6650 (fetch_available_features_from_target): Change return type.
6651 (target_fetch_description_xml): Adjust.
6652 (target_read_description_xml): Adjust.
6654 2018-04-06 Tom Tromey <tom@tromey.com>
6656 * value.c (~value): Update.
6657 (struct value) <contents>: Now unique_xmalloc_ptr.
6658 (value_contents_bits_eq, allocate_value_contents)
6659 (value_contents_raw, value_contents_all_raw)
6660 (value_contents_for_printing, value_contents_for_printing_const)
6661 (set_value_enclosing_type): Update.
6663 2018-04-06 Tom Tromey <tom@tromey.com>
6665 * value.c (range_s): Remove typedef, VEC.
6666 (struct range): Add operator<.
6667 (range_lessthan): Remove.
6668 (ranges_contain): Change type.
6670 (struct value) <unavailable, optimized_out>: Now std::vector.
6671 (value_entirely_available)
6672 (value_entirely_covered_by_range_vector)
6673 (value_entirely_unavailable, value_entirely_optimized_out):
6675 (insert_into_bit_range_vector): Change argument type.
6676 (find_first_range_overlap): Likewise.
6677 (struct ranges_and_idx, value_contents_bits_eq)
6678 (require_not_optimized_out, require_available): Update.
6679 (ranges_copy_adjusted): Change argument types.
6680 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6682 2018-04-06 Tom Tromey <tom@tromey.com>
6684 * value.c (~value): Update.
6685 (struct value) <parent>: Now a value_ref_ptr.
6686 (value_parent, set_value_parent, value_address, value_copy):
6689 2018-04-06 Tom Tromey <tom@tromey.com>
6691 * value.c (struct value): Add constructor, destructor, and member
6693 (allocate_value_lazy, value_decref): Update.
6695 2018-04-06 Tom Tromey <tom@tromey.com>
6697 * value.c (struct value) <released, next>: Remove.
6698 (all_values): Now a std::vector.
6699 (allocate_value_lazy): Update.
6700 (value_next): Remove.
6701 (value_mark, value_free_to_mark, release_value)
6702 (value_release_to_mark): Update.
6704 2018-04-06 Tom Tromey <tom@tromey.com>
6706 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6707 (free_value_chain): Remove.
6708 * value.c (free_value_chain): Remove.
6709 (value_release_to_mark): Return a std::vector.
6710 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6712 (check_condition): Update.
6713 * eval.c (fetch_subexp_value): Change "val_chain" to a
6715 * breakpoint.c (update_watchpoint): Update.
6716 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6718 2018-04-06 Tom Tromey <tom@tromey.com>
6720 * value.h (free_all_values): Remove.
6721 * value.c (free_all_values): Remove.
6723 2018-04-06 Tom Tromey <tom@tromey.com>
6725 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6726 (value_history_chain, value_history_count): Remove.
6727 (value_history): New global.
6728 (record_latest_value, access_value_history, show_values)
6729 (preserve_values): Update.
6731 2018-04-06 Tom Tromey <tom@tromey.com>
6733 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6734 * varobj.c (varobj_set_display_format, varobj_set_value)
6735 (install_default_visualizer, construct_visualizer)
6736 (install_new_value, ~varobj, varobj_get_value_type)
6737 (my_value_of_variable, varobj_editable_p): Update.
6738 * c-varobj.c (c_describe_child, c_value_of_variable)
6739 (cplus_number_of_children, cplus_describe_child): Update.
6740 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6741 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6742 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6744 2018-04-06 Tom Tromey <tom@tromey.com>
6746 * printcmd.c (last_examine_address): Change type to
6748 (do_examine, x_command): Update.
6750 2018-04-06 Tom Tromey <tom@tromey.com>
6752 * value.c (release_value): Update.
6753 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6754 (struct bpstats) <val>: Now a value_ref_ptr.
6755 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6756 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6757 (~watchpoint, print_it_watchpoint, watch_command_1)
6758 (invalidate_bp_value_on_memory_change): Update.
6760 2018-04-06 Tom Tromey <tom@tromey.com>
6762 * varobj.c (varobj_clear_saved_item)
6763 (update_dynamic_varobj_children, install_new_value, ~varobj):
6765 * value.h (value_incref): Move declaration earlier.
6766 (value_decref): Rename from value_free.
6767 (struct value_ref_policy): New.
6768 (value_ref_ptr): New typedef.
6769 (struct value_deleter): Remove.
6770 (gdb_value_up): Remove typedef.
6771 (release_value): Change return type.
6772 (release_value_or_incref): Remove.
6773 * value.c (set_value_parent): Update.
6774 (value_incref): Change return type.
6775 (value_decref): Rename from value_free.
6776 (value_free_to_mark, free_all_values, free_value_chain): Update.
6777 (release_value): Return value_ref_ptr.
6778 (release_value_or_incref): Remove.
6779 (record_latest_value, set_internalvar, clear_internalvar):
6781 * stack.c (info_frame_command): Don't call value_free.
6782 * python/py-value.c (valpy_dealloc, valpy_new)
6783 (value_to_value_object): Update.
6784 * printcmd.c (do_examine): Update.
6785 * opencl-lang.c (lval_func_free_closure): Update.
6786 * mi/mi-main.c (register_changed_p): Don't call value_free.
6787 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6788 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6789 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6791 * guile/scm-value.c (vlscm_free_value_smob)
6792 (vlscm_scm_from_value): Update.
6793 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6794 (frame_unwind_register_unsigned, get_frame_register_bytes)
6795 (put_frame_register_bytes): Don't call value_free.
6796 * findvar.c (address_from_register): Don't call value_free.
6797 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6798 * dwarf2loc.c (entry_data_value_free_closure)
6799 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6800 (dwarf2_evaluate_loc_desc_full): Update.
6801 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6802 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6803 (~watchpoint, watch_command_1)
6804 (invalidate_bp_value_on_memory_change): Update.
6805 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6807 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6810 * warning.m4: Add -Wno-error=deprecated-register.
6811 * configure: Re-generate.
6813 2018-04-05 Tom Tromey <tom@tromey.com>
6815 * linespec.h: Remove include of "vec.h".
6817 2018-04-05 Tom Tromey <tom@tromey.com>
6819 * linespec.c (typep): Remove typedef.
6820 (find_methods, find_superclass_methods): Take a std::vector.
6821 (find_method): Use std::vector.
6823 2018-04-05 Tom Tromey <tom@tromey.com>
6825 * utils.c (compare_strings): Remove.
6826 * utils.h (compare_strings): Remove.
6827 * objc-lang.h (find_imps): Update.
6828 * objc-lang.c (find_methods): Take a std::vector.
6829 (uniquify_strings, find_imps): Likewise.
6830 * linespec.c (find_methods): Take a std::vector.
6831 (decode_objc): Use std::vector.
6832 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6834 (find_method, find_function_symbols): Use std::vector.
6836 2018-04-05 Tom Tromey <tom@tromey.com>
6838 * completer.c (completion_tracker::completion_tracker): Remove
6840 (completion_tracker::discard_completions): Likewise.
6841 * breakpoint.c (ambiguous_names_p): Remove cast.
6842 * ada-lang.c (_initialize_ada_language): Remove cast.
6843 * utils.h (streq): Update.
6844 (streq_hash): Add new declaration.
6845 * utils.c (streq): Return bool.
6846 (streq_hash): New function.
6848 2018-04-05 Tom Tromey <tom@tromey.com>
6850 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6851 Remove a string copy.
6853 2018-04-05 Tom Tromey <tom@tromey.com>
6855 * linespec.c (filter_results): Use std::vector.
6856 (decode_line_2, decode_line_full): Update.
6858 2018-04-05 Tom Tromey <tom@tromey.com>
6860 * linespec.c (canonical_to_fullform): Return std::string.
6861 (filter_results): Update.
6862 (struct decode_line_2_item): Add constructor.
6863 <fullform, displayform>: Now std::string.
6864 (decode_line_2_compare_items): Now a std::sort comparator.
6865 (decode_line_2): Update.
6867 2018-04-05 Tom Tromey <tom@tromey.com>
6869 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6870 (unexpected_linespec_error): Update.
6871 (linespec_parse_basic, parse_linespec): Update.
6873 2018-04-05 Tom Tromey <tom@tromey.com>
6875 * linespec.c (linespec_parse_basic): Reindent.
6877 2018-04-05 Tom Tromey <tom@tromey.com>
6879 * minsyms.h (iterate_over_minimal_symbols): Update.
6880 * minsyms.c (iterate_over_minimal_symbols): Take a
6882 * linespec.c (struct collect_minsyms): Remove.
6883 (compare_msyms): Now a std::sort comparator.
6884 (add_minsym): Add parameters.
6885 (search_minsyms_for_name): Update. Use std::vector.
6887 2018-04-03 Tom Tromey <tom@tromey.com>
6889 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6892 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6894 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6896 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6899 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6900 printing static type.
6902 2018-04-01 Tom Tromey <tom@tromey.com>
6904 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6905 (rs6000_xfer_shared_libraries): Update.
6907 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6909 * common/gdb_vecs.h (char_ptr): Remove.
6910 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6912 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6914 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6916 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6918 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6920 * tracepoint.h (struct uploaded_tp): Initialize fields.
6921 <actions, step_actions, cmd_strings>: Change type to
6922 std::vector<char *>.
6923 * tracepoint.c (get_uploaded_tp): Allocate with new.
6924 (free_uploaded_tps): Free with delete.
6925 (parse_tracepoint_definition): Adjust to std::vector change.
6926 * breakpoint.c (read_uploaded_action): Likewise.
6927 (create_tracepoint_from_upload): Likewise.
6928 * ctf.c (ctf_write_uploaded_tp): Likewise.
6929 (SET_ARRAY_FIELD): Likewise.
6930 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6932 2018-03-30 Tom Tromey <tom@tromey.com>
6934 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6936 (svr4_keep_data_in_core): Update.
6937 (svr4_read_so_list): Update.
6939 2018-03-30 Tom Tromey <tom@tromey.com>
6941 * windows-nat.c (handle_output_debug_string, handle_exception):
6943 * target.h (target_read_string): Update.
6944 * target.c (target_read_string): Change "string" to
6946 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6948 * solib-frv.c (frv_current_sos): Update.
6949 * solib-dsbt.c (dsbt_current_sos): Update.
6950 * solib-darwin.c (darwin_current_sos): Update.
6951 * linux-thread-db.c (inferior_has_bug): Update.
6952 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6953 Update. Remove alloca.
6954 * ada-lang.c (ada_main_name): Update.
6956 2018-03-30 Tom Tromey <tom@tromey.com>
6958 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6959 (struct dwo_file_deleter): New.
6960 (dwo_file_up): New typedef.
6961 (open_and_init_dwo_file): Use dwo_file_up.
6962 (free_dwo_file_cleanup): Remove.
6964 2018-03-30 Tom Tromey <tom@tromey.com>
6966 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6967 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6969 2018-03-30 Tom Tromey <tom@tromey.com>
6971 * dwarf2read.c (class free_cached_comp_units): New class.
6972 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6973 (free_cached_comp_units): Remove function.
6975 2018-03-30 Tom Tromey <tom@tromey.com>
6977 * utils.h (make_cleanup_unpush_target): Remove.
6978 * inf-ptrace.c (struct target_unpusher): New.
6979 (target_unpush_up) New typedef.
6980 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6982 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6984 2018-03-27 Tom Tromey <tom@tromey.com>
6986 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6988 2018-03-27 Pedro Alves <palves@redhat.com>
6989 Tom Tromey <tom@tromey.com>
6991 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6992 destructor. Now a class.
6993 (gdb_readline_wrapper_cleanup): Remove function.
6994 (gdb_readline_wrapper): Remove cleanups.
6996 2018-03-27 Tom Tromey <tom@tromey.com>
6998 * typeprint.h (struct type_print_options) <local_typedefs,
6999 global_typedefs>: Remove "struct" keyword.
7000 (class typedef_hash_table): New class.
7001 (recursively_update_typedef_hash, add_template_parameters)
7002 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7003 (find_typedef_in_hash): Don't declare.
7004 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7005 (typedef_hash_table::recursively_update): Rename from
7006 recursively_update_typedef_hash. Now a member.
7007 (typedef_hash_table::add_template_parameters): Rename from
7008 add_template_parameters. Now a member.
7009 (typedef_hash_table::typedef_hash_table): Now a constructor;
7010 rename from create_typedef_hash.
7011 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7012 rename from free_typedef_hash.
7013 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7014 (do_free_global_table): Remove.
7015 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7016 from copy_type_recursive.
7017 (create_global_typedef_table): Remove.
7018 (typedef_hash_table::find_global_typedef): Now a member of
7020 (typedef_hash_table::find_typedef): Rename from
7021 find_typedef_in_hash; now a member.
7022 (whatis_exp): Update.
7023 * extension.h (struct ext_lang_type_printers): Add constructor and
7025 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7027 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7028 Now a constructor; rename from start_ext_lang_type_printers.
7029 (ext_lang_type_printers): Now a destructor; rename from
7030 free_ext_lang_type_printers.
7031 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7033 (c_type_print_base_struct_union): Update. Remove cleanups.
7035 2018-03-27 Tom Tromey <tom@tromey.com>
7037 * dwarf-index-write.c: Include <cmath>.
7039 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7041 * NEWS: Add entry describing new "set|show varsize-limit" command.
7042 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7044 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7047 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7049 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7051 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7052 * dwarf-index-common.c: New file.
7053 * dwarf-index-common.h: New file.
7054 * dwarf-index-write.c: New file.
7055 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7056 (struct dwarf2_section_info): Move from here.
7057 (dwarf2_section_info_def): Likewise.
7058 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7059 (offset_type): Likewise.
7060 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7061 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7062 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7063 (byte_swap): Likewise.
7064 (MAYBE_SWAP): Likewise.
7065 (dwarf2_per_cu_ptr): Likewise.
7066 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7067 (struct tu_stats): Likewise.
7068 (struct dwarf2_per_objfile): Likewise.
7069 (struct dwarf2_per_cu_data): Likewise.
7070 (struct signatured_type): Likewise.
7071 (sig_type_ptr): Likewise.
7072 (DEF_VEC_P (sig_type_ptr)): Likewise.
7073 (INDEX4_SUFFIX): Likewise.
7074 (INDEX5_SUFFIX): Likewise.
7075 (DEBUG_STR_SUFFIX): Likewise.
7076 (dwarf2_read_section): Make non-static.
7077 (mapped_index_string_hash): Move from here.
7078 (dwarf5_djb_hash): Likewise.
7079 (file_write): Likewise.
7080 (class data_buf): Likewise.
7081 (struct symtab_index_entry): Likewise.
7082 (struct mapped_symtab): Likewise.
7083 (find_slot): Likewise.
7084 (hash_expand): Likewise.
7085 (add_index_entry): Likewise.
7086 (uniquify_cu_indices): Likewise.
7087 (class c_str_view): Likewise.
7088 (class c_str_view_hasher): Likewise.
7089 (class vector_hasher): Likewise.
7090 (write_hash_table): Likewise.
7091 (psym_index_map): Likewise.
7092 (struct addrmap_index_data): Likewise.
7093 (add_address_entry): Likewise.
7094 (add_address_entry_worker): Likewise.
7095 (write_address_map): Likewise.
7096 (symbol_kind): Likewise.
7097 (write_psymbols): Likewise.
7098 (struct signatured_type_index_data): Likewise.
7099 (write_one_signatured_type): Likewise.
7100 (recursively_count_psymbols): Likewise.
7101 (recursively_write_psymbols): Likewise.
7102 (class debug_names): Likewise.
7103 (check_dwarf64_offsets): Likewise.
7104 (psyms_seen_size): Likewise.
7105 (write_gdbindex): Likewise.
7106 (write_debug_names): Likewise.
7107 (assert_file_size): Likewise.
7108 (write_psymtabs_to_index): Likewise.
7109 (save_gdb_index_command): Likewise.
7110 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7112 * dwarf2read.h: New file.
7114 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7117 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7118 symbol name if the CU's language stores symbol names in linkage
7120 * language.h (struct language_defn)
7121 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7122 all instances of this struct.
7124 2018-03-26 Tom Tromey <tom@tromey.com>
7126 * stack.c (backtrace_command_1): Remove verbose code.
7128 2018-03-26 Tom Tromey <tom@tromey.com>
7130 * python/py-framefilter.c (py_print_type): Don't catch
7131 exceptions. Return void.
7132 (py_print_value): Likewise.
7133 (py_print_single_arg): Likewise.
7134 (enumerate_args): Don't catch exceptions.
7135 (py_print_args): Likewise.
7136 (py_print_frame): Likewise.
7137 (gdbpy_apply_frame_filter): Catch exceptions here.
7139 2018-03-26 Tom Tromey <tom@tromey.com>
7141 * stack.c (_initialize_stack): Remove trailing newlines from help
7142 text. Add "Usage" line to "backtrace" help.
7144 2018-03-26 Tom Tromey <tom@tromey.com>
7147 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7149 2018-03-26 Tom Tromey <tom@tromey.com>
7151 * python/py-framefilter.c (py_print_single_arg): Return
7152 EXT_LANG_BT_ERROR from catch.
7154 2018-03-26 Tom Tromey <tom@tromey.com>
7157 * stack.c (backtrace_command_1): Move some code into no-filters
7160 2018-03-26 Tom Tromey <tom@tromey.com>
7162 * python/py-framefilter.c (throw_quit_or_print_exception): New
7164 (gdbpy_apply_frame_filter): Use it.
7166 2018-03-26 Tom Tromey <tom@tromey.com>
7169 * python/py-framefilter.c (py_print_type, py_print_value)
7170 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7173 2018-03-26 Tom Tromey <tom@tromey.com>
7175 * python/py-framefilter.c (enumerate_args): Use
7176 gdb::unique_xmalloc_ptr.
7178 2018-03-26 Tom Tromey <tom@tromey.com>
7180 * python/py-framefilter.c (py_print_frame): Return
7182 (gdbpy_apply_frame_filter): Update comment.
7183 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7185 <EXT_LANG_BT_NO_FILTERS>: Change value.
7187 2018-03-26 Tom Tromey <tom@tromey.com>
7190 * stack.c (backtrace_command): Parse "hide" argument.
7191 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7192 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7195 2018-03-26 Tom Tromey <tom@tromey.com>
7197 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7199 (backtrace_command): Remove "fulltrace", add "flags".
7201 2018-03-26 Tom Tromey <tom@tromey.com>
7203 * stack.c (backtrace_command): Rewrite command line parsing.
7205 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7207 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7209 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7211 * filename-seen-cache.h: Add include guard.
7213 2018-03-26 Keith Seitz <keiths@redhat.com>
7215 * symfile.c (place_section): Remove "struct" from section_addr_info
7217 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7218 "struct" keyword from section_addr_info.
7220 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7222 * regformats/regdef.h (reg): Add constructors.
7224 2018-03-25 Pedro Alves <palves@redhat.com>
7226 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7227 if then/else bodies in var_func_name extraction.
7229 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7231 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7232 lookup_minimal_symbol() to find symbol entry.
7233 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7235 2018-03-23 Keith Seitz <keiths@redhat.com>
7238 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7239 nested type definitions for C++, too.
7241 2018-03-23 Tom Tromey <tom@tromey.com>
7243 * machoread.c (struct oso_el): Add a constructor. Don't define as
7245 (macho_register_oso): Remove.
7246 (macho_symtab_read): Take a std::vector.
7247 (oso_el_compare_name): Now a std::sort comparator.
7248 (macho_symfile_read_all_oso): Take a std::vector.
7249 (macho_symfile_read): Use std::vector. Remove cleanups.
7251 2018-03-22 Tom Tromey <tom@tromey.com>
7253 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7254 (record_full_goto_bookmark): Use std::string.
7256 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7259 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7262 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7264 * rs6000-tdep.c (store_insn_p): New function.
7265 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7266 and cr_reg to their unshifted values. Use store_insn_p to
7267 match LR saves using either R1 or fdata->alloca_reg. Use
7268 store_insn_p to match CR saves. Set alloca_reg_offset
7269 when alloca_reg and framep are set. Remove lr_reg shift
7270 when assigning to fdata->lr_register.
7272 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7274 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7275 command line args instead of emitting a warning.
7277 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7279 * tracepoint.h (struct static_tracepoint_marker): Initialize
7280 fields, define default constructor, move constructor and move
7281 assignment, disable the rest.
7282 <str_id, extra>: Make std::string.
7283 (release_static_tracepoint_marker): Remove.
7284 (free_current_marker): Remove.
7285 * tracepoint.c (free_current_marker): Remove.
7286 (parse_static_tracepoint_marker_definition): Adjust to
7287 std::string, use new hex2str overload.
7288 (release_static_tracepoint_marker): Remove.
7289 (print_one_static_tracepoint_marker): Get marker by reference
7290 and adjust to std::string.
7291 (info_static_tracepoint_markers_command): Adjust to std::vector
7293 * target.h (static_tracepoint_marker_p): Remove typedef.
7294 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7295 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7297 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7299 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7300 (target_debug_print_std_vector_static_tracepoint_marker): New.
7301 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7303 (target_debug_print_static_tracepoint_marker_p): ... this.
7304 * target-delegates.c: Re-generate.
7305 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7307 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7308 (decode_static_tracepoint_spec): Adjust to std::vector.
7309 (tracepoint_print_one_detail): Adjust to std::string.
7310 (strace_marker_decode_location): Adjust to std::string.
7311 (update_static_tracepoint): Adjust to std::string, remove call
7312 to release_static_tracepoint_marker.
7313 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7314 Adjust to std::vector.
7315 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7316 (remote_static_tracepoint_markers_by_strid): Adjust to
7318 * common/rsp-low.h (hex2str): New overload with explicit count
7320 * common/rsp-low.c (hex2str): New overload with explicit count
7322 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7323 (_initialize_rsp_low_selftests): Add test_hex2str test.
7324 * unittests/tracepoint-selftests.c
7325 (test_parse_static_tracepoint_marker_definition): Adjust to
7328 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7330 * tracepoint.c (parse_static_tracepoint_marker_definition):
7331 Consider case where the definition is followed by more
7333 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7334 tracepoint-selftests.c.
7335 * unittests/tracepoint-selftests.c: New.
7337 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7339 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7342 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7344 * symtab.c (find_pc_sect_line): fixed indentation.
7346 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7348 * symtab.c (find_pc_sect_line): now uses binary search.
7350 2018-03-19 Tom Tromey <tom@tromey.com>
7352 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7355 2018-03-19 Pedro Alves <palves@redhat.com>
7356 Tom Tromey <tom@tromey.com>
7358 * unittests/observable-selftests.c: New file.
7359 * common/observable.h: New file.
7360 * observable.h: New file.
7361 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7362 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7363 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7364 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7365 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7366 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7367 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7368 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7369 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7370 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7371 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7372 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7373 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7374 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7375 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7376 tui/tui-interp.c, valops.c: Update all users.
7377 * tui/tui-hooks.c (tui_bp_created_observer)
7378 (tui_bp_deleted_observer, tui_bp_modified_observer)
7379 (tui_inferior_exit_observer, tui_before_prompt_observer)
7380 (tui_normal_stop_observer, tui_register_changed_observer):
7382 (tui_observers_token): New global.
7383 (attach_or_detach, tui_attach_detach_observers): New functions.
7384 (tui_install_hooks, tui_remove_hooks): Use
7385 tui_attach_detach_observers.
7386 * record-btrace.c (record_btrace_thread_observer): Remove.
7387 (record_btrace_thread_observer_token): New global.
7388 * observer.sh: Remove.
7389 * observer.c: Rename to observable.c.
7390 * observable.c (namespace gdb_observers): Define new objects.
7391 (observer_debug): Move into gdb_observers namespace.
7392 (struct observer, struct observer_list, xalloc_observer_list_node)
7393 (xfree_observer_list_node, generic_observer_attach)
7394 (generic_observer_detach, generic_observer_notify): Remove.
7395 (_initialize_observer): Update.
7396 Don't include observer.inc.
7397 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7398 (clean mostlyclean): Likewise.
7399 (observer.h, observer.inc): Remove targets.
7400 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7401 (COMMON_SFILES): Use observable.c, not observer.c.
7402 * .gitignore: Remove observer.h.
7404 2018-03-18 Tom Tromey <tom@tromey.com>
7406 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7408 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7410 2018-03-17 Tom Tromey <tom@tromey.com>
7412 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7414 2018-03-17 Tom Tromey <tom@tromey.com>
7416 * target.c (class scoped_target_fd): New.
7417 (target_fileio_close_cleanup): Remove.
7418 (target_fileio_read_alloc_1): Use scoped_target_fd.
7420 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7422 * silent-rules.mk: New.
7423 * Makefile.in: Include silent-rules.mk
7424 (srcdir, VPATH, top_srcdir): Move up.
7425 (COMPILE): Add ECHO_CXX.
7426 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7427 (init.c): Add ECHO_INIT_C.
7428 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7429 (version.c): Add ECHO_GEN.
7430 (printcmd.o): Add ECHO_CXX.
7431 (target-float.o): Add ECHO_CXX.
7432 (ada-exp.o): Add ECHO_CXX.
7433 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7434 (insight$(EXEEXT)): Add ECHO_CXXLD.
7435 * gnulib/configure.ac: Add AM_SILENT_RULES.
7436 * gnulib/aclocal.m4: Re-generate.
7437 * gnulib/configure: Re-generate.
7438 * gnulib/import/Makefile.in: Re-generate.
7440 2018-03-16 Tom Tromey <tom@tromey.com>
7442 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7443 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7444 * utils.c (do_free_section_addr_info)
7445 (make_cleanup_free_section_addr_info): Remove.
7446 * symfile.h (struct other_sections): Add constructor.
7447 (struct section_addr_info): Remove.
7448 (section_addr_info): New typedef.
7449 (struct sym_fns) <sym_offsets>: Change type of parameter.
7450 (build_section_addr_info_from_objfile)
7451 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7452 (default_symfile_offsets, symbol_file_add)
7453 (symbol_file_add_from_bfd)
7454 (build_section_addr_info_from_section_table): Update.
7455 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7456 * symfile.c (alloc_section_addr_info): Remove.
7457 (build_section_addr_info_from_section_table): Change return type.
7459 (build_section_addr_info_from_bfd)
7460 (build_section_addr_info_from_objfile): Likewise.
7461 (free_section_addr_info): Remove.
7462 (relative_addr_info_to_section_offsets): Change type of "addrs".
7463 (addrs_section_compar): Now a std::sort comparator.
7464 (addrs_section_sort): Change return type.
7465 (addr_info_make_relative): Change type of "addrs". Update.
7466 (default_symfile_offsets, syms_from_objfile_1)
7467 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7468 (symbol_file_add_separate): Update.
7469 (symbol_file_add): Change type of "addrs". Update.
7470 (add_symbol_file_command): Update. Remove cleanups.
7471 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7473 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7474 * solib.c (solib_read_symbols): Update.
7475 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7476 * machoread.c (macho_symfile_offsets): Update.
7477 * jit.c (jit_bfd_try_read_symtab): Update.
7479 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7481 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7482 unittests/utils-selftests.c.
7483 * unittests/utils-selftests.c: New file.
7485 2018-03-14 Tom Tromey <tom@tromey.com>
7488 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7491 2018-03-14 Tom Tromey <tom@tromey.com>
7494 * printcmd.c (printf_pointer): Allow "-" in format.
7496 2018-03-14 Tom Tromey <tom@tromey.com>
7498 * printcmd.c (_initialize_printcmd): Add usage to printf.
7500 2018-03-14 Yao Qi <qiyao@sourceware.org>
7502 * MAINTAINERS: Update my email address.
7504 2018-03-13 Tom Tromey <tom@tromey.com>
7506 * machoread.c (macho_check_dsym): Change filenamep to a
7508 (macho_symfile_read): Update.
7509 * symfile.c (load_command): Use std::string.
7511 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7513 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7514 to error message string.
7515 (riscv_register_name): Use xsnprintf instead of sprintf.
7516 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7518 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7520 (riscv_push_dummy_call): Likewise.
7522 2018-03-12 Tom Tromey <tom@tromey.com>
7524 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7525 Use gdb::byte_vector.
7526 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7528 2018-03-12 Yao Qi <yao.qi@linaro.org>
7530 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7531 parameter type to readable_regcache.
7532 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7535 2018-03-11 Tom Tromey <tom@tromey.com>
7537 * dwarf2read.c (struct nextfield): Add initializers.
7538 (struct nextfnfield): Remove.
7539 (struct fnfieldlist): Add initializers. Remove "length" and
7540 "head", use std::vector.
7541 (struct decl_field_list): Remove.
7542 (struct field_info): Add initializers.
7543 <fields, baseclasses>: Now std::vector.
7544 <nbaseclasses, nfnfields, typedef_field_list_count,
7545 nested_types_list_count>: Remove.
7546 (dwarf2_add_field, dwarf2_add_type_defn)
7547 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7548 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7549 (process_structure_scope): Update.
7551 2018-03-11 Tom Tromey <tom@tromey.com>
7553 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7554 for use by std::sort.
7555 (build_type_psymtabs_1): Use std::vector.
7557 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7559 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7560 and LIBMPFR in the printed configuration.
7562 2018-03-08 Tom Tromey <tom@tromey.com>
7564 * source.c (get_filename_and_charpos): Use scoped_fd.
7565 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7566 (procfs_pidlist): Likewise.
7567 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7568 (iterate_over_mappings): Likewise.
7570 2018-03-08 Tom Tromey <tom@tromey.com>
7572 * infcall.c (struct call_return_meta_info)
7573 <stack_temporaries_enabled>: Remove.
7574 (get_call_return_value, call_function_by_hand_dummy): Update.
7575 * thread.c (disable_thread_stack_temporaries): Remove.
7576 (enable_thread_stack_temporaries): Remove.
7577 (thread_stack_temporaries_enabled_p): Return bool.
7578 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7579 (get_last_thread_stack_temporary): Update.
7580 * eval.c (evaluate_subexp): Update.
7581 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7582 class, not a function.
7583 (value_ptr, value_vec): Remove typedefs.
7584 (class thread_info) <stack_temporaries_enabled>: Now bool.
7585 <stack_temporaries>: Now a std::vector.
7586 (thread_stack_temporaries_enabled_p)
7587 (value_in_thread_stack_temporaries): Return bool.
7589 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7591 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7592 (getpkt_or_notif_sane_1): Likewise.
7594 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7596 * build-id.c (build_id_to_debug_bfd): Use std::string.
7598 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7600 * build-id.c (find_separate_debug_file_by_buildid): Return
7602 * build-id.h (find_separate_debug_file_by_buildid): Return
7604 * coffread.c (coff_symfile_read): Adjust to std::string.
7605 * elfread.c (elf_symfile_read): Adjust to std::string.
7606 * symfile.c (separate_debug_file_exists): Change parameter to
7608 (find_separate_debug_file): Return std::string.
7609 (find_separate_debug_file_by_debuglink): Return std::string.
7610 * symfile.h (find_separate_debug_file_by_debuglink): Return
7613 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7615 * common/xml-utils.c (xml_escape_text): Move code to...
7616 (xml_escape_text_append): ... this new function.
7617 * common/xml-utils.h (xml_escape_text_append): New declaration.
7618 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7620 (_initialize_xml_utils): register test_xml_escape_text_append as
7623 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7625 * defs.h: Remove MAX_REGISTER_SIZE.
7626 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7628 * python/py-unwind.c (pyuw_sniffer): Likewise.
7630 2018-03-07 Tom Tromey <tom@tromey.com>
7632 * linux-tdep.c (linux_info_proc): Update.
7633 * target.h (struct target_ops) <to_fileio_readlink>: Return
7635 (target_fileio_readlink): Return optional<string>.
7636 * remote.c (remote_hostio_readlink): Return optional<string>.
7637 * inf-child.c (inf_child_fileio_readlink): Return
7639 * target.c (target_fileio_readlink): Return optional<string>.
7641 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7643 * regcache.c (cooked_read_test): Add riscv to the list of
7644 architectures that have a save_reggroup.
7646 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7648 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7649 value is not a dynamic class object.
7651 2018-03-06 Tom Tromey <tom@tromey.com>
7653 * rust-exp.y: Formatting fixes.
7655 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7657 * riscv-tdep.c (riscv_register_name): Remove target description
7659 (riscv_gdbarch_init): Remove target description check.
7661 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7663 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7665 * riscv-tdep.h: Likewise.
7667 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7669 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7670 (riscv_pseudo_register_write): Delete.
7671 (riscv_gdbarch_init): Remove all use of pseudo registers.
7673 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7675 * record-btrace.c (btrace_print_lines): Replace cleanup
7676 parameter with RAII equivalents.
7677 (btrace_insn_history): Replace cleanup with RAII equivalents.
7678 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7679 make_cleanup_ui_out_tuple_begin_end): Remove.
7680 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7681 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7682 make_cleanup_ui_out_list_begin_end): Remove.
7684 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7686 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7687 parameter types to std::vector. Use bool.
7688 (record_btrace_wait): Replace VEC(tp_t) with
7689 std::vector<thread_info *>.
7690 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7692 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7694 * record-btrace.c (record_btrace_disable_callback): Remove.
7695 (struct scoped_btrace_disable): New.
7696 (record_btrace_open): Use scoped_btrace_disable.
7698 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7700 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7701 reading values from registers.
7703 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7705 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7708 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7710 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7711 change parameter type. Use GDB's print functions, and use
7712 core_addr_to_string where appropriate.
7713 (riscv_push_dummy_call): Use core_addr_to_string where
7714 appropriate, update call to riscv_print_arg_location, and reindent
7716 (riscv_return_value): Update call to riscv_print_arg_location.
7718 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7719 Tim Newsome <tim@sifive.com>
7720 Albert Ou <a0u@eecs.berkeley.edu>
7721 Darius Rad <darius@bluespec.com>
7723 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7724 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7725 (ALLDEPFILES): Add riscv-tdep.c
7726 * configure.tgt: Add riscv support.
7727 * riscv-tdep.c: New file.
7728 * riscv-tdep.h: New file.
7729 * NEWS: Mention new target.
7730 * MAINTAINERS: Add entry for riscv.
7732 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7734 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7735 fields within aggregates.
7737 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7739 * record-btrace.c (btrace_print_lines): Change type of flags to
7740 gdb_disassembly_flags.
7742 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7744 * fbsd-nat.c: Include "inf-ptrace.h".
7745 (USE_SIGTRAP_SIGINFO): Conditionally define.
7746 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7747 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7748 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7750 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7752 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7754 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7755 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7756 "supports_stopped_by_hw_breakpoint" target methods.
7758 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7760 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7761 * fbsd-nat.c (debug_fbsd_nat): New variable.
7762 (show_fbsd_nat_debug): New function.
7763 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7764 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7766 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7768 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7769 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7771 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7772 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7775 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7777 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7778 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7780 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7782 * charset.c (struct charset_vector): New.
7783 (charsets): Change type to charset_vector.
7784 (find_charset_names): Adjust.
7786 (_initialize_charset): Adjust.
7788 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7790 * progspace.h (struct program_space) <deleted_solibs>: Change
7791 type to std::vector<std::string>.
7792 * progspace.c (clear_program_space_solib_cache): Adjust.
7793 * breakpoint.c (print_solib_event): Adjust.
7794 (check_status_catch_solib): Adjust.
7795 * solib.c (update_solib_list): Adjust.
7796 * ui-out.h (class ui_out) <field_string>: New overload.
7797 * ui-out.c (ui_out::field_string): New overload.
7799 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7801 * progspace.h (struct program_space): Add constructor and
7802 destructor, initialize fields.
7803 (add_program_space): Remove.
7804 * progspace.c (add_program_space): Rename to...
7805 (program_space::program_space): ... this.
7806 (release_program_space): Rename to...
7807 (program_space::~program_space): ... this.
7808 (delete_program_space): Use delete to delete program_space.
7809 (initialize_progspace): Use new to allocate program_space.
7810 * inferior.c (add_inferior_with_spaces): Likewise.
7811 (clone_inferior_command): Likewise.
7812 * infrun.c (follow_fork_inferior): Likewise.
7813 (handle_vfork_child_exec_or_exit): Likewise.
7815 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7817 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7818 (delim_string_to_char_ptr_vec): Return std::vector of
7819 gdb::unique_xmalloc_ptr.
7820 (dirnames_to_char_ptr_vec_append): Take std::vector of
7821 gdb::unique_xmalloc_ptr.
7822 (dirnames_to_char_ptr_vec): Return std::vector of
7823 gdb::unique_xmalloc_ptr.
7824 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7825 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7826 (delim_string_to_char_ptr_vec): Return an std::vector of
7827 gdb::unique_xmalloc_ptr, adjust the code.
7828 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7829 gdb::unique_xmalloc_ptr, adjust the code.
7830 (dirnames_to_char_ptr_vec): Return an std::vector of
7831 gdb::unique_xmalloc_ptr, adjust the code.
7832 * auto-load.c (auto_load_safe_path_vec): Change type to
7833 std::vector of gdb::unique_xmalloc_ptr.
7834 (auto_load_expand_dir_vars): Return an std::vector of
7835 gdb::unique_xmalloc_ptr, adjust the code.
7836 (auto_load_safe_path_vec_update): Adjust.
7837 (filename_is_in_auto_load_safe_path_vec): Adjust.
7838 (auto_load_objfile_script_1): Adjust.
7839 * build-id.c (build_id_to_debug_bfd): Adjust.
7840 * linux-thread-db.c (thread_db_load_search): Adjust.
7841 * source.c (add_path): Adjust.
7843 * symfile.c (find_separate_debug_file): Adjust.
7844 * utils.c (do_free_char_ptr_vec): Remove.
7845 (make_cleanup_free_char_ptr_vec): Remove.
7847 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7850 * common/pathstuff.c: Conditionally include "<windows.h>".
7852 2018-03-01 Georg Sauthoff <mail@georg.so>
7855 * gcore.in: Quote variables and switch interpreter to bash.
7857 2018-03-01 Tom Tromey <tom@tromey.com>
7859 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7860 assertion. Add assertion for discriminant_index.
7861 (quirk_rust_enum): Use correct base type name in univariant case.
7863 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7865 * record.c (get_call_history_modifiers): Return a
7867 (cmd_record_call_history): Adjust.
7868 * record-btrace.c (record_btrace_call_history): Adjust.
7869 (record_btrace_call_history_range): Adjust.
7870 (record_btrace_call_history_from): Adjust.
7871 * target-debug.h (target_debug_print_record_print_flags): New.
7872 * target-delegates.c: Re-generate.
7873 * target.c (target_call_history): Change flags type.
7874 (target_call_history_from): Likewise.
7875 (target_call_history_range): Likewise.
7876 * target.h (struct target_ops) <target_call_history>: Likewise.
7877 (target_call_history_from): Likewise.
7878 (target_call_history_range): Likewise.
7880 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7881 Simon Marchi <simon.marchi@polymtl.ca>
7883 * common/common-utils.c: Include "sys/stat.h".
7884 (is_regular_file): Move here from "source.c"; change return
7886 * common/common-utils.h (is_regular_file): New prototype.
7887 * common/pathstuff.c (contains_dir_separator): New function.
7888 * common/pathstuff.h (contains_dir_separator): New prototype.
7889 * source.c: Don't include "sys/stat.h".
7890 (is_regular_file): Move to "common/common-utils.c".
7892 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7894 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7895 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7896 * auto-load.c: Include "common/pathstuff.h".
7897 * common/common-def.h (current_directory): Move here.
7898 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7900 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7902 * common/pathstuff.c: New file.
7903 * common/pathstuff.h: New file.
7904 * compile/compile.c: Include "common/pathstuff.h".
7905 * defs.h (current_directory): Move to "common/common-defs.h".
7906 * dwarf2read.c: Include "common/pathstuff.h".
7908 * guile/scm-safe-call.c: Likewise.
7909 * linux-thread-db.c: Likewise.
7911 * nto-tdep.c: Likewise.
7912 * objfiles.c: Likewise.
7913 * source.c: Likewise.
7914 * symtab.c: Likewise.
7915 * utils.c: Include "common/pathstuff.h".
7916 (gdb_realpath): Move to "common/pathstuff.c".
7917 (gdb_realpath_keepfile): Likewise.
7918 (gdb_abspath): Likewise.
7919 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7920 (gdb_realpath_keepfile): Likewise.
7921 (gdb_abspath): Likewise.
7923 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7925 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7926 wildcard process pid for super_resume for kernels with a
7929 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7931 * compile/compile.c (get_args): Add additional comments
7932 explaining function.
7934 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7935 Tom Tromey <tom@tromey.com>
7937 * target.h (memory_write_request_s): Remove typedef. Don't define
7939 (target_write_memory_blocks): Change argument to std::vector.
7940 (struct memory_write_request): Add constructor.
7941 * target-memory.c (compare_block_starting_address): Return bool.
7942 Change argument types.
7943 (claim_memory): Change arguments to use std::vector.
7944 (split_regular_and_flash_blocks, blocks_to_erase)
7945 (compute_garbled_blocks): Likewise.
7946 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7947 (target_write_memory_blocks): Change argument to std::vector.
7948 * symfile.c (struct load_section_data): Add constructor and
7949 destructor. Use std::vector for "requests".
7950 (struct load_progress_data): Add initializers.
7951 (load_section_callback): Update. Use "new".
7952 (clear_memory_write_data): Remove.
7953 (generic_load): Update.
7955 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7957 * arch/aarch64.h: Use common/tdesc.h.
7959 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7961 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7962 architecture with a 64-bit ABI.
7964 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7966 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7967 ahead of target description loading.
7969 2018-02-26 Tom Tromey <tom@tromey.com>
7971 * stack.c (backtrace_command_1): Update.
7972 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7974 * python/py-framefilter.c (py_print_frame)
7975 (gdbpy_apply_frame_filter): Change type of "flags".
7976 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7978 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7979 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7980 * extension.h (enum frame_filter_flag): Rename from
7982 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7983 (apply_ext_lang_frame_filter): Change type of "flags".
7984 * extension.c (apply_ext_lang_frame_filter): Change type of
7986 * extension-priv.h (struct extension_language_ops)
7987 <apply_frame_filter>: Change type of "flags".
7989 2018-02-26 Tom Tromey <tom@tromey.com>
7992 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7993 off-by-one in py_end computation.
7994 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7996 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7999 2018-02-26 Tom Tromey <tom@tromey.com>
8001 * dwarf2read.c (struct variant_field): New.
8002 (struct nextfield) <variant>: New field.
8003 (dwarf2_add_field): Handle DW_TAG_variant_part.
8004 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8005 discriminated union.
8006 (read_structure_type): Handle DW_TAG_variant_part.
8007 (handle_struct_member_die): New function, extracted from
8008 process_structure_scope. Handle DW_TAG_variant.
8009 (process_structure_scope): Handle discriminated unions. Call
8010 handle_struct_member_die.
8012 2018-02-26 Tom Tromey <tom@tromey.com>
8014 * rust-lang.h (rust_last_path_segment): Declare.
8015 * rust-lang.c (rust_last_path_segment): Now public. Change
8017 (struct disr_info): Remove.
8018 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8019 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8020 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8021 (rust_enum_p, rust_enum_variant): New function.
8022 (rust_underscore_fields): Remove "offset" parameter.
8023 (rust_print_enum): New function.
8024 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8025 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8026 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8028 (rust_internal_print_type): New function, from rust_print_type.
8030 (rust_print_type): Call rust_internal_print_type.
8031 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8032 Update enum handling.
8033 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8034 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8035 (rust_union_quirks): New functions.
8036 (process_full_comp_unit, process_full_type_unit): Call
8038 (process_structure_scope): Update rust_unions if necessary.
8040 2018-02-26 Tom Tromey <tom@tromey.com>
8042 * value.h (value_union_variant): Declare.
8043 * valops.c (value_union_variant): New function.
8044 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8045 (struct discriminant_info): New.
8046 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8048 (struct main_type) <flag_discriminated_union>: New field.
8050 2018-02-26 Tom Tromey <tom@tromey.com>
8052 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8053 unittests/unpack-selftests.c.
8054 * unittests/unpack-selftests.c: New file.
8055 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8057 2018-02-26 Yao Qi <yao.qi@linaro.org>
8059 * dwarf2read.c (struct partial_die_info) <read>: New method.
8060 (read_partial_die): Remove the declaration.
8061 (load_partial_dies): Update.
8062 (partial_die_info::partial_die_info):
8063 (read_partial_die): Change it to partial_die_info::read.
8065 2018-02-26 Yao Qi <yao.qi@linaro.org>
8067 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8068 (fixup_partial_die): Remove declaration.
8069 (scan_partial_symbols): Update.
8070 (partial_die_parent_scope): Likewise.
8071 (partial_die_full_name): Likewise.
8072 (fixup_partial_die): Change it to partial_die_info::fixup.
8074 2018-02-26 Yao Qi <yao.qi@linaro.org>
8076 * dwarf2read.c (read_partial_die): Update the declaration.
8077 (load_partial_dies): Caller update.
8078 (read_partial_die): Remove one argument abbrev_len.
8080 2018-02-26 Yao Qi <yao.qi@linaro.org>
8082 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8083 assignment operator.
8084 (load_partial_dies): Use ctor and copy ctor.
8085 (read_partial_die): Update.
8086 (dwarf2_cu::find_partial_die): Use ctor.
8088 2018-02-26 Yao Qi <yao.qi@linaro.org>
8090 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8091 (find_partial_die_in_comp_unit): Change it to
8092 dwarf2_cu::find_partial_die.
8093 (find_partial_die): Update.
8095 2018-02-26 Yao Qi <yao.qi@linaro.org>
8097 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8100 2018-02-26 Yao Qi <yao.qi@linaro.org>
8102 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8104 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8106 * arch/amd64.h: Use common/tdesc.h.
8107 * arch/i386.c: Likewise.
8108 * arch/i386.h: Likewise.
8109 * arch/tic6x.c: Likewise.
8110 * arch/tdesc.h: Move file from here...
8111 * common/tdesc.h: ...to here.
8112 * features/aarch64-core.c: Regenerate.
8113 * features/aarch64-fpu.c: Regenerate.
8114 * features/i386/32bit-avx.c: Regenerate.
8115 * features/i386/32bit-avx512.c: Regenerate.
8116 * features/i386/32bit-core.c: Regenerate.
8117 * features/i386/32bit-linux.c: Regenerate.
8118 * features/i386/32bit-mpx.c: Regenerate.
8119 * features/i386/32bit-pkeys.c: Regenerate.
8120 * features/i386/32bit-sse.c: Regenerate.
8121 * features/i386/64bit-avx.c: Regenerate.
8122 * features/i386/64bit-avx512.c: Regenerate.
8123 * features/i386/64bit-core.c: Regenerate.
8124 * features/i386/64bit-linux.c: Regenerate.
8125 * features/i386/64bit-mpx.c: Regenerate.
8126 * features/i386/64bit-pkeys.c: Regenerate.
8127 * features/i386/64bit-segments.c: Regenerate.
8128 * features/i386/64bit-sse.c: Regenerate.
8129 * features/i386/x32-core.c: Regenerate.
8130 * features/tic6x-c6xp.c: Regenerate.
8131 * features/tic6x-core.c: Regenerate.
8132 * features/tic6x-gp.c: Regenerate.
8133 * target-descriptions.c: Use common/tdesc.h.
8134 * target-descriptions.h: Likewise.
8136 2018-02-24 Tom Tromey <tom@tromey.com>
8138 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8139 (try_thread_db_load_from_dir, thread_db_load_search): Use
8141 (info_auto_load_libthread_db_compare): Return bool. Change
8143 (info_auto_load_libthread_db): Use std::vector, std::string.
8146 2018-02-24 Tom Tromey <tom@tromey.com>
8148 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8150 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8152 * gdbarch.c: Rebuild.
8153 * gdbarch.h: Rebuild.
8154 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8155 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8156 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8159 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8161 * gdbtypes.h (sect_offset): Change type to uint64_t.
8162 (sect_offset_str): New function.
8163 * dwarf2read.c (create_addrmap_from_aranges): Use
8165 (error_check_comp_unit_head): Likewise.
8166 (create_debug_type_hash_table): Likewise.
8167 (read_cutu_die_from_dwo): Likewise.
8168 (init_cutu_and_read_dies): Likewise.
8169 (init_cutu_and_read_dies_no_follow): Likewise.
8170 (process_psymtab_comp_unit_reader): Likewise.
8171 (partial_die_parent_scope): Likewise.
8172 (peek_die_abbrev): Likewise.
8173 (process_queue): Likewise.
8174 (dwarf2_physname): Likewise.
8175 (read_namespace_alias): Likewise.
8176 (read_import_statement): Likewise.
8177 (create_dwo_cu_reader): Likewise.
8178 (create_cus_hash_table): Likewise.
8179 (lookup_dwo_cutu): Likewise.
8180 (inherit_abstract_dies): Likewise.
8181 (read_func_scope): Likewise.
8182 (read_call_site_scope): Likewise.
8183 (dwarf2_add_member_fn): Likewise.
8184 (read_common_block): Likewise.
8185 (read_module_type): Likewise.
8186 (read_typedef): Likewise.
8187 (read_subrange_type): Likewise.
8188 (load_partial_dies): Likewise.
8189 (read_partial_die): Likewise.
8190 (find_partial_die): Likewise.
8191 (read_str_index): Likewise.
8192 (dwarf2_string_attr): Likewise.
8193 (build_error_marker_type): Likewise.
8194 (lookup_die_type): Likewise.
8195 (dump_die_shallow): Likewise.
8196 (follow_die_ref): Likewise.
8197 (dwarf2_fetch_die_loc_sect_off): Likewise.
8198 (dwarf2_fetch_constant_bytes): Likewise.
8199 (follow_die_sig): Likewise.
8200 (get_signatured_type): Likewise.
8201 (get_DW_AT_signature_type): Likewise.
8202 (dwarf2_find_containing_comp_unit): Likewise.
8203 (set_die_type): Likewise.
8205 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8207 * arch/aarch64.c: Include "common-defs.h".
8208 * arch/amd64.c: Likewise.
8209 * arch/i386.c: Likewise.
8211 2018-02-21 Tom Tromey <tom@tromey.com>
8213 * value.h: (extract_field_op): Update.
8214 * eval.c (extract_field_op): Return a const char *.
8215 * expression.h (parse_expression_for_completion): Update.
8216 * completer.c (complete_expression): Update.
8217 (add_struct_fields): Make fieldname const.
8218 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8219 (mark_completion_tag, parse_exp_in_context_1): Update.
8220 (parse_expression_for_completion): Change "name" to
8221 unique_xmalloc_ptr*.
8223 2018-02-21 Tom Tromey <tom@tromey.com>
8225 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8227 2018-02-21 Yao Qi <yao.qi@linaro.org>
8229 * avr-tdep.c (avr_read_pc): Change parameter type to
8231 * gdbarch.sh (read_pc): Likewise.
8232 * gdbarch.c: Re-generated.
8233 * gdbarch.h: Re-generated.
8234 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8236 * ia64-tdep.c (ia64_read_pc): Likewise.
8237 * mips-tdep.c (mips_read_pc): Likewise.
8238 * spu-tdep.c (spu_read_pc): Likewise.
8240 2018-02-21 Yao Qi <yao.qi@linaro.org>
8242 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8243 * regcache-dump.c: New file.
8244 * regcache.c: Move register_dump to regcache-dump.c.
8245 (maintenance_print_registers): Likewise.
8246 (maintenance_print_raw_registers): Likewise.
8247 (maintenance_print_cooked_registers): Likewise.
8248 (maintenance_print_register_groups): Likewise.
8249 (maintenance_print_remote_registers): Likewise.
8250 (_initialize_regcache): Likewise.
8251 * regcache.h (register_dump): Moved from regcache.c.
8253 2018-02-21 Yao Qi <yao.qi@linaro.org>
8255 * regcache.c (regcache::regcache): Update.
8256 (regcache::invalidate): Move it to detached_regcache::invalidate.
8257 (get_thread_arch_aspace_regcache): Update.
8258 (regcache::raw_update): Update.
8259 (regcache::cooked_read): Remove some code.
8260 (regcache::cooked_read_value): Likewise.
8261 (regcache::raw_write): Remove assert on m_readonly_p.
8262 (regcache::raw_supply_integer): Move it to
8263 detached_regcache::raw_supply_integer.
8264 (regcache::raw_supply_zeroed): Likewise.
8265 * regcache.h (detached_regcache) <raw_supply_integer>: New
8267 <raw_supply_zeroed, invalidate>: Likewise.
8268 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8269 <invalidate>: Likewise.
8270 <m_readonly_p>: Removed.
8272 2018-02-21 Yao Qi <yao.qi@linaro.org>
8274 * infcmd.c (get_return_value): Let stop_regs point to
8275 get_current_regcache.
8276 * regcache.c (regcache::regcache): Remove.
8277 (register_dump_reg_buffer): New class.
8278 (regcache_print): Adjust.
8279 * regcache.h (regcache): Remove constructors.
8281 2018-02-21 Yao Qi <yao.qi@linaro.org>
8283 * regcache.c (class register_dump): New class.
8284 (register_dump_regcache, register_dump_none): New class.
8285 (register_dump_remote, register_dump_groups): New class.
8286 (regcache_print): Update.
8287 * regcache.h (regcache_dump_what): Move it to regcache.c.
8288 (regcache) <dump>: Remove.
8290 2018-02-21 Yao Qi <yao.qi@linaro.org>
8292 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8294 (jit_unwind_reg_set_impl): Call raw_supply.
8295 (jit_frame_sniffer): Use reg_buffer_rw.
8296 * record-full.c (record_full_core_regbuf): Change its type.
8297 (record_full_core_open_1): Use reg_buffer_rw.
8298 (record_full_close): Likewise.
8299 (record_full_core_fetch_registers): Use regcache->raw_supply.
8300 (record_full_core_store_registers): Likewise.
8301 * regcache.c (regcache::get_register_status): Move it to
8303 (regcache_raw_set_cached_value): Remove.
8304 (regcache::raw_set_cached_value): Remove.
8305 (regcache::raw_write): Call raw_supply.
8306 (regcache::raw_supply): Move it to reg_buffer_rw.
8307 * regcache.h (regcache_raw_set_cached_value): Remove.
8308 (reg_buffer_rw): New class.
8310 2018-02-21 Yao Qi <yao.qi@linaro.org>
8312 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8313 readonly_detached_regcache.
8314 (dummy_frame_prev_register): Use regcache->cooked_read.
8315 * frame.c (frame_save_as_regcache): Change return type.
8316 (frame_pop): Update.
8317 * frame.h (frame_save_as_regcache): Update declaration.
8318 * inferior.h (get_infcall_suspend_state_regcache): Update
8320 * infrun.c (infcall_suspend_state) <registers>: use
8321 readonly_detached_regcache.
8322 (save_infcall_suspend_state): Don't use regcache_dup.
8323 (get_infcall_suspend_state_regcache): Change return type.
8324 * linux-fork.c (struct fork_info) <savedregs>: Change to
8325 readonly_detached_regcache.
8327 (fork_save_infrun_state): Don't use regcache_dup.
8328 (info_checkpoints_command): Adjust.
8329 * mi/mi-main.c (register_changed_p): Update declaration.
8330 (mi_cmd_data_list_changed_registers): Use
8331 readonly_detached_regcache.
8332 (register_changed_p): Change parameter type to
8333 readonly_detached_regcache.
8334 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8335 readonly_detached_regcache.
8336 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8337 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8339 (regcache::save): Move it to reg_buffer.
8340 (regcache::restore): Change parameter type.
8341 (regcache_dup): Remove.
8342 * regcache.h (reg_buffer) <save>: New method.
8343 (readonly_detached_regcache): New class.
8344 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8345 readonly_detached_regcache.
8346 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8348 2018-02-21 Yao Qi <yao.qi@linaro.org>
8350 * frame.c (frame_save_as_regcache): Use regcache method save.
8351 (frame_pop): Use regcache method restore.
8352 * infrun.c (restore_infcall_suspend_state): Likewise.
8353 * linux-fork.c (fork_load_infrun_state): Likewise.
8354 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8356 * regcache.c (regcache_save): Remove.
8357 (regcache::restore): More asserts.
8358 (regcache_cpy): Remove.
8359 * regcache.h (regcache_save): Remove the declaration.
8360 (regcache::restore): Move from private to public.
8361 Remove the friend declaration of regcache_cpy.
8362 (regcache_cpy): Remove declaration.
8364 2018-02-21 Yao Qi <yao.qi@linaro.org>
8366 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8367 parameter type to 'readable_regcache *'.
8368 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8369 * arm-tdep.c (arm_neon_quad_read): Likewise.
8370 (arm_pseudo_read): Likewise.
8371 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8372 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8373 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8374 * gdbarch.c: Re-generated.
8375 * gdbarch.h: Re-generated.
8376 * gdbarch.sh (pseudo_register_read): Change parameter type to
8377 'readable_regcache *'.
8378 (pseudo_register_read_value): Likewise.
8379 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8380 (h8300_pseudo_register_read): Likewise.
8381 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8382 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8383 (i386_pseudo_register_read_into_value): Likewise.
8384 (i386_pseudo_register_read_value): Likewise.
8385 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8387 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8388 * m32c-tdep.c (m32c_raw_read): Likewise.
8389 (m32c_read_flg): Likewise.
8390 (m32c_banked_register): Likewise.
8391 (m32c_banked_read): Likewise.
8392 (m32c_sb_read): Likewise.
8393 (m32c_part_read): Likewise.
8394 (m32c_cat_read): Likewise.
8395 (m32c_r3r2r1r0_read): Likewise.
8396 (m32c_pseudo_register_read): Likewise.
8397 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8398 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8399 (mep_pseudo_cr64_read): Likewise.
8400 (mep_pseudo_register_read): Likewise.
8401 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8402 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8403 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8404 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8405 (regcache::cooked_read): Likewise.
8406 (regcache::cooked_read_value): Likewise.
8407 (regcache_cooked_read_signed):
8408 (regcache::cooked_read): Likewise.
8409 * regcache.h (readable_regcache): New class.
8410 (regcache): Inherit readable_regcache. Move some methods to
8412 * rl78-tdep.c (rl78_pseudo_register_read): Change
8413 parameter type to 'readable_regcache *'.
8414 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8415 (e500_pseudo_register_read): Change parameter type to
8416 'readable_regcache *'.
8417 (dfp_pseudo_register_read): Likewise.
8418 (vsx_pseudo_register_read): Likewise.
8419 (efpr_pseudo_register_read): Likewise.
8420 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8421 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8422 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8423 (sh64_pseudo_register_read): Likewise.
8424 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8425 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8426 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8427 (spu_pseudo_register_read): Likewise.
8428 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8429 (xtensa_pseudo_register_read): Likewise.
8431 2018-02-21 Yao Qi <yao.qi@linaro.org>
8433 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8434 (regcache::arch): Move it to reg_buffer::arch.
8435 (regcache::register_buffer): Likewise.
8436 (regcache::assert_regnum): Likewise.
8437 (regcache::num_raw_registers): Likewise.
8438 * regcache.h (reg_buffer): New class.
8439 (regcache): Inherit reg_buffer.
8441 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8443 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8444 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8446 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8448 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8450 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8452 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8453 (SFILES): Remove common/*.c files.
8454 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8455 * common/common.host: Add common reference.
8456 * configure.ac: Likewise.
8457 * configure: Regenerate.
8459 2018-02-16 Yao Qi <yao.qi@linaro.org>
8461 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8462 (block_initialize_namespace): Use new.
8463 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8464 (dwarf2_free_objfile): Use delete.
8465 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8466 (copy_type_recursive): Use new.
8467 * gdb_obstack.h (allocate_on_obstack): New.
8469 2018-02-15 Yao Qi <yao.qi@linaro.org>
8472 * inferior.c (exit_inferior_1): Reset inf->control.
8474 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8476 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8479 2018-02-14 Pedro Alves <palves@redhat.com>
8481 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8482 frame_cleanup_after_sniffer on exception.
8484 2018-02-14 Tom Tromey <tom@tromey.com>
8486 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8488 (solib_bfd_open): Make pathname const.
8489 * solib.c (solib_bfd_open): Make pathname const.
8490 * solib-spu.c (spu_bfd_fopen): Make name const.
8491 (spu_bfd_open): Make pathname const.
8492 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8493 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8495 2018-02-14 Tom Tromey <tom@tromey.com>
8497 * symfile.c (symfile_bfd_open): Update.
8498 * source.h (openp, source_full_path_of, find_and_open_source):
8499 Change argument type to unique_xmalloc_ptr.
8500 * source.c (openp): Take a unique_xmalloc_ptr.
8501 (source_full_path_of, find_and_open_source): Likewise.
8502 (open_source_file, symtab_to_fullname): Update.
8503 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8505 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8506 (exec_file_find): Update.
8507 * psymtab.c (psymtab_to_fullname): Update.
8508 * nto-tdep.h (nto_find_and_open_solib): Update.
8509 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8511 * exec.c (exec_file_attach): Update.
8512 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8513 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8515 2018-02-14 Tom Tromey <tom@tromey.com>
8517 * solib.c: Include source.h.
8518 * nto-tdep.c: Include source.h.
8519 * mi/mi-cmd-env.c: Include source.h.
8520 * infcmd.c: Include source.h.
8521 * exec.c: Include source.h.
8522 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8523 (add_path, directory_switch, source_path, init_source_path): Move
8525 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8526 (add_path, directory_switch, source_path, init_source_path):
8529 2018-02-14 Tom Tromey <tom@tromey.com>
8531 * solist.h (exec_file_find, solib_find): Return
8533 (solib_bfd_fopen): Take a const char *.
8534 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8535 (exec_file_find, solib_find): Likewise.
8536 (solib_bfd_fopen): Do not take ownership of "pathname".
8537 (solib_bfd_open): Use unique_xmalloc_ptr.
8538 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8539 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8540 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8541 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8543 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8545 * ada-lang.c (name_match_type_from_name): Remove reference to
8546 ada_name_for_lookup in function's documentation.
8547 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8549 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8551 * defs.h (enum openp_flags): New enum.
8552 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8553 Move to enum openp_flags.
8554 (openp_flags): New enum flags.
8555 (openp): Change parameter type to openp_flags.
8556 * source.c (openp): Change parameter type to openp_flags.
8557 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8558 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8560 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8562 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8565 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8567 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8569 (class dwarf2_queue_guard): ...the destructor of this new class.
8570 (dw2_do_instantiate_symtab): Create instance of the new class
8571 dwarf2_queue_guard, remove cleanup.
8573 2018-02-09 Tom Tromey <tom@tromey.com>
8575 * source.c (find_source_lines): Don't reference past the end of
8578 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8580 * remote.c (remote_btrace_maybe_reopen): Change error message.
8581 * btrace.c (btrace_enable): Likewise.
8582 (parse_xml_btrace): Likewise.
8583 (parse_xml_btrace_conf): Likewise.
8585 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8587 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8588 (linux_enable_pt, linux_enable_bts): Call
8589 diagnose_perf_event_open_fail.
8591 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8593 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8594 Remove parameter and change return type. Update callers. Move it.
8595 (linux_enable_bts, linux_enable_pt): Improve error message.
8596 (linux_enable_pt): Remove zero buffer size check.
8597 (linux_enable_btrace): Improve error messages. Remove NULL return
8600 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8602 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8603 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8604 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8605 (linux_supports_pt, linux_supports_btrace): Remove.
8606 (linux_enable_bts): Call cpu_supports_bts.
8607 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8608 * remote.c (remote_supports_btrace): Remove.
8609 (init_remote_ops): Remove remote_supports_btrace.
8610 * target-delegates.c: Regenerated.
8611 * target.c (target_supports_btrace): Remove.
8612 * target.h (target_ops) <to_supports_btrace>: Remove
8613 (target_supports_btrace): Remove.
8614 * x86-linux-nat.c (x86_linux_create_target): Remove
8615 linux_supports_btrace.
8617 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8619 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8621 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8622 exception and use message in own exception.
8624 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8626 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8627 (perf_event_pt_event_type): Use gdb_file_up.
8628 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8629 scoped_fd, and scoped_mmap.
8631 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8633 * common/scoped_mmap.h: New.
8634 * unittests/scoped_mmap-selftest.c: New.
8635 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8636 unittests/scoped_mmap-selftest.c.
8638 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8640 * common/scoped_fd.h: New.
8641 * unittests/scoped_fd-selftest.c: New.
8642 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8643 unittests/scoped_fd-selftest.c.
8645 2018-02-09 Tom Tromey <tom@tromey.com>
8647 * auto-load.c (auto_load_section_scripts): Use
8648 gdb::unique_xmalloc_ptr.
8650 2018-02-09 Tom Tromey <tom@tromey.com>
8652 * auto-load.c (execute_script_contents): Use std::string.
8654 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8656 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8657 Python function, rather than a new command.
8659 2018-02-08 Tom Tromey <tom@tromey.com>
8661 * solib.c (solib_find_1): Use std::string.
8662 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8664 2018-02-08 Tom Tromey <tom@tromey.com>
8666 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8668 2018-02-08 Tom Tromey <tom@tromey.com>
8670 * source.c (find_source_lines): Use gdb::def_vector.
8672 2018-02-08 Tom Tromey <tom@tromey.com>
8674 * macrocmd.c (struct temporary_macro_definition): New.
8675 (macro_define_command): Use temporary_macro_definition. Remove
8677 (free_macro_definition_ptr): Remove.
8679 2018-02-08 Tom Tromey <tom@tromey.com>
8681 * macroexp.c (maybe_expand): Use std::string.
8683 2018-02-08 Tom Tromey <tom@tromey.com>
8685 * macroexp.c (struct macro_buffer): Add initializers for some
8687 (init_buffer, init_shared_buffer, free_buffer)
8688 (free_buffer_return_text): Remove.
8689 (macro_buffer): New constructors.
8690 (~macro_buffer): New destructor.
8691 (macro_buffer::set_shared): New method.
8692 (macro_buffer::resize_buffer, macro_buffer::appendc)
8693 (macro_buffer::appendmem): Now methods, not free functions.
8694 (set_token, append_tokens_without_splicing, stringify)
8695 (macro_stringify): Update.
8696 (gather_arguments): Change return type. Remove argc_p argument,
8697 add args_ptr argument. Use std::vector.
8698 (substitute_args): Remove argc argument. Accept std::vector.
8699 (expand): Update. Use std::vector.
8700 (scan, macro_expand, macro_expand_next): Update.
8702 2018-02-08 Tom Tromey <tom@tromey.com>
8704 * symtab.c (default_collect_symbol_completion_matches_break_on):
8705 Use unique_xmalloc_ptr.
8706 * macroscope.h: (sal_macro_scope, user_macro_scope)
8707 (default_macro_scope): Return unique_xmalloc_ptr.
8708 * macroscope.c (sal_macro_scope, user_macro_scope)
8709 (default_macro_scope): Return unique_xmalloc_ptr.
8710 * macroexp.h (macro_expand, macro_expand_once): Return
8712 * macroexp.c (macro_expand, macro_expand_once): Return
8714 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8715 (info_macro_command, info_macros_command): Use
8717 * compile/compile-c-support.c (write_macro_definitions): Use
8719 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8721 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8723 * value.c (value_static_field): Assign field type instead of
8724 containing type when returning an optimized out value.
8726 2018-02-06 Yao Qi <yao.qi@linaro.org>
8728 * ft32-tdep.c (ft32_read_pc): Remove.
8729 (ft32_write_pc): Remove.
8730 (ft32_gdbarch_init): Update.
8731 * m32r-tdep.c (m32r_read_pc): Remove.
8732 (m32r_gdbarch_init): Update.
8733 * mep-tdep.c (mep_read_pc): Remove.
8734 (mep_gdbarch_init): Update.
8735 * microblaze-tdep.c (microblaze_write_pc): Remove.
8736 (microblaze_gdbarch_init): Update.
8737 * mn10300-tdep.c (mn10300_read_pc): Remove.
8738 (mn10300_write_pc): Remove.
8739 (mn10300_gdbarch_init): Update.
8740 * moxie-tdep.c (moxie_read_pc): Remove.
8741 (moxie_write_pc): Remove.
8742 (moxie_gdbarch_init): Update.
8744 2018-02-06 Yao Qi <yao.qi@linaro.org>
8746 * expprint.c (print_subexp_standard): Handle
8747 OP_F77_UNDETERMINED_ARGLIST.
8748 (dump_subexp_body_standard): Likewise.
8750 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8752 * target-descriptions.c (tdesc_element_visitor) Add empty
8754 (tdesc_type): Move make_gdb_type from here.
8755 (tdesc_type_builtin): Likewise.
8756 (tdesc_type_vector): Likewise.
8757 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8758 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8759 (make_gdb_type_union): Likewise.
8760 (make_gdb_type_flags): Likewise.
8761 (make_gdb_type_enum): Likewise.
8762 (make_gdb_type): New function.
8763 (tdesc_register_type): Use static make_gdb_type.
8765 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8767 * infcmd.c (default_print_one_register_info): Align natural-format
8768 column values consistently one under another.
8769 (pad_to_column): New function.
8771 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8773 * dwarf2read.c (dwarf2_physname): Move commment.
8775 2018-02-01 Leszek Swirski <leszeks@google.com>
8777 * varobj.c (varobj_formatted_print_options): Allow recursive
8778 pretty printing if pretty printing is enabled.
8780 2018-02-01 Leszek Swirski <leszeks@google.com>
8782 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8783 names after a structop as a filename.
8785 2018-02-01 Yao Qi <yao.qi@linaro.org>
8787 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8788 (arm_record_coproc_data_proc): Likewise.
8790 2018-02-01 Yao Qi <yao.qi@linaro.org>
8792 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8794 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8796 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8797 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8799 2018-01-31 Pedro Alves <palves@redhat.com>
8801 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8802 * inflow.c (child_terminal_save_inferior): Wrap reference to
8803 tcgetpgrp in HAVE_TERMIOS_H.
8804 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8806 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8807 always iterate over all inferiors.
8808 (gdbsim_cntrl_c): Adjust.
8809 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8811 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8813 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8814 index type is objfile-owned if the element type is as well.
8816 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8820 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8822 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8823 "features/s390x-linux64.c".
8824 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8825 s390_linux32 and s390x_linux64.
8826 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8828 * s390-tdep.c: Include "features/s390-linux32.c" and
8829 "features/s390x-linux64.c".
8830 (s390_tdesc_valid): Add check for tdesc_has_registers.
8831 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8832 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8833 tdesc_s390x_linux64.
8834 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8835 tdesc_s390x_linux64 to...
8836 * s390-tdep.h: ...here.
8838 2018-01-30 Pedro Alves <palves@redhat.com>
8841 * config.in, configure: Regenerate.
8842 * configure.ac: Check for getpgid.
8843 * go32-nat.c (go32_pass_ctrlc): New.
8844 (go32_target): Install it.
8845 * inf-child.c (inf_child_target): Install
8846 child_terminal_save_inferior, child_pass_ctrlc and
8848 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8849 (inf_ptrace_target): No longer install it.
8850 * infcmd.c (interrupt_target_1): Adjust.
8851 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8852 (child_interrupt): Declare.
8853 (inferior::terminal_state): New.
8854 * inflow.c (struct terminal_info): Update comments.
8855 (inferior_process_group): Delete.
8856 (terminal_is_ours): Delete.
8857 (gdb_tty_state): New.
8858 (child_terminal_init): Adjust.
8859 (is_gdb_terminal, sharing_input_terminal_1)
8860 (sharing_input_terminal): New functions.
8861 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8862 Set the process's actual process group in the foreground if
8863 possible. Handle is_ours_for_output/is_ours distinction. Don't
8864 mark terminal as the inferior's if not sharing GDB's terminal.
8865 Don't check attach_flag.
8866 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8867 pass down a target_terminal_state.
8868 (child_terminal_save_inferior): New, factored out from ...
8869 (child_terminal_ours_1): ... this. Handle
8870 target_terminal_state::is_ours_for_output.
8871 (child_interrupt, child_pass_ctrlc): New.
8872 (inflow_inferior_exit): Clear the inferior's terminal_state.
8873 (copy_terminal_info): Copy the inferior's terminal state.
8874 (_initialize_inflow): Remove reference to terminal_is_ours.
8875 * inflow.h (inferior_process_group): Delete.
8876 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8877 * procfs.c (procfs_target): Don't install procfs_interrupt.
8878 (procfs_interrupt): Delete.
8879 * remote.c (remote_serial_quit_handler): Adjust.
8880 (remote_interrupt): Remove ptid parameter. Adjust.
8881 * target-delegates.c: Regenerate.
8882 * target.c: Include "terminal.h".
8883 (target_terminal::terminal_state): Rename to ...
8884 (target_terminal::m_terminal_state): ... this.
8885 (target_terminal::init): Adjust.
8886 (target_terminal::inferior): Adjust to per-inferior
8888 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8889 (target_terminal::ours, target_terminal::ours_for_output): Use
8890 target_terminal_is_ours_kind.
8891 (target_interrupt): Remove ptid parameter. Adjust.
8892 (default_target_pass_ctrlc): Adjust.
8893 * target.h (target_ops::to_terminal_save_inferior): New field.
8894 (target_ops::to_interrupt): Remove ptid_t parameter.
8895 (target_interrupt): Remove ptid_t parameter. Update comment.
8896 (target_pass_ctrlc): Update comment.
8897 * target/target.h (target_terminal_state): New scoped enum,
8899 (target_terminal::terminal_state): ... here.
8900 (target_terminal::inferior): Update comments.
8901 (target_terminal::restore_inferior): New.
8902 (target_terminal::is_inferior, target_terminal::is_ours)
8903 (target_terminal::is_ours_for_output): Adjust.
8904 (target_terminal::scoped_restore_terminal_state): Adjust to
8905 rename, and call restore_inferior() instead of inferior().
8906 (target_terminal::scoped_restore_terminal_state::m_state): Change
8908 (target_terminal::terminal_state): Rename to ...
8909 (target_terminal::m_terminal_state): ... this and change type.
8911 2018-01-30 Pedro Alves <palves@redhat.com>
8913 * linux-nat.c (wait_for_signal): New function.
8914 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8916 (async_terminal_is_ours)
8917 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8918 (linux_nat_add_target): Don't override
8919 to_terminal_inferior/to_terminal_ours.
8921 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8923 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8925 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8927 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8928 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8929 dwarf2_per_objfile_free here.
8930 (dwarf2_per_objfile_free): Remove.
8931 (_initialize_dwarf2_read): Don't register
8932 dwarf2_per_objfile_free as a registry cleanup.
8934 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8936 Avoid compilation errors in MinGW native builds
8938 The error is triggered by including python-internal.h, and the
8941 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8942 from build-gnulib/import/math.h:27,
8943 from d:/usr/Python26/include/pyport.h:235,
8944 from d:/usr/Python26/include/Python.h:58,
8945 from python/python-internal.h:94,
8946 from python/py-arch.c:24:
8947 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8951 This happens because Python headers define 'hypot' to expand t
8952 '_hypot' in the Windows builds.
8953 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8954 'hypoth'. This avoids a compilation error.
8956 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8958 * MAINTAINERS (Write After Approval): Fix ordering.
8960 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8962 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8964 2018-01-26 Alan Modra <amodra@gmail.com>
8966 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8967 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8968 Remove nop. Make const. Comment.
8969 (powerpc32_plt_stub_so_2): New.
8970 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8971 Correct count. Update uses.
8972 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8973 Move common code reading PLT entry word. Correct
8974 powerpc32_plt_stub PLT address calculation.
8975 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8976 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8977 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8978 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8979 (ppc64_standard_linkage8): Likewise.
8980 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8981 Correct insns description.
8982 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8984 2018-01-24 Pedro Alves <palves@redhat.com>
8986 GCC PR libstdc++/83906
8987 * gdbtypes.c (operator==(const dynamic_prop &,
8988 const dynamic_prop &)): New.
8989 (operator==(const range_bounds &, const range_bounds &)): New.
8990 (check_types_equal): Use them instead of memcmp.
8991 * gdbtypes.h (operator==(const dynamic_prop &,
8992 const dynamic_prop &)): Declare.
8993 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8994 (operator==(const range_bounds &, const range_bounds &)): Declare.
8995 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8997 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8999 * s390-linux-tdep.c (s390_record_address_mask)
9000 (s390_record_calc_disp_common, s390_record_calc_disp)
9001 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9002 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9003 (s390_process_record): Move to s390-tdep.c.
9004 (s390_linux_init_abi_any): Adjust.
9005 * s390-tdep.c (s390_record_address_mask)
9006 (s390_record_calc_disp_common, s390_record_calc_disp)
9007 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9008 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9009 (s390_process_record): Moved from s390-linux-tdep.c
9010 (s390_gdbarch_init): Adjust.
9012 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9014 * s390-linux-nat.c (s390-tdep.h): New include.
9015 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9016 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9017 (ALLDEPFILES): Add s390-tdep.c.
9018 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9019 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9020 * s390-tdep.h: ...this. New file.
9021 * s390-linux-tdep.c (s390-tdep.h): New include.
9022 (_initialize_s390_tdep): Rename to...
9023 (_initialize_s390_linux_tdep): ...this and adjust.
9024 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9025 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9027 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9028 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9029 (s390_is_partial_instruction, s390_software_single_step)
9030 (is_non_branch_ril, s390_displaced_step_copy_insn)
9031 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9032 (s390_prologue_data, s390_addr, s390_store, s390_load)
9033 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9034 (s390_register_call_saved, s390_guess_tracepoint_registers)
9035 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9036 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9037 (s390_pseudo_register_name, s390_pseudo_register_type)
9038 (s390_pseudo_register_read, s390_pseudo_register_write)
9039 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9040 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9041 (s390_addr_bits_remove, s390_address_class_type_flags)
9042 (s390_address_class_type_flags_to_name)
9043 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9044 (s390_function_arg_float, s390_function_arg_vector)
9045 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9046 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9047 (s390_frame_align, s390_register_return_value, s390_return_value)
9048 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9049 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9050 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9051 (s390_trad_frame_prev_register, s390_unwind_cache)
9052 (s390_prologue_frame_unwind_cache)
9053 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9054 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9055 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9056 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9057 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9058 (s390_frame_base_address, s390_local_base_address)
9059 (s390_frame_base, s390_gcc_target_options)
9060 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9061 (s390_validate_reg_range, s390_tdesc_valid)
9062 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9063 * s390-tdep.c: ...this. New file.
9065 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9067 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9068 (s390_process_record, s390_gdbarch_tdep_alloc)
9069 (s390_linux_init_abi_any): Use/set new hook.
9071 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9073 * s390-linux-tdep.c (osabi.h): New include.
9074 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9075 (s390_linux_init_abi_any): New functions.
9076 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9078 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9080 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9081 tdesc_has_registers check
9083 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9085 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9086 (s390_validate_reg_range): New macro.
9087 (s390_gdbarch_init): Adjust.
9089 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9091 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9092 (s390_gdbarch_tdep_alloc): Adjust.
9093 (s390_gdbarch_init): Adjust.
9095 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9097 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9098 <have_tdb>: Change type to bool.
9099 (s390_gdbarch_tdep_alloc): Adjust.
9100 (s390_gdbarch_init): Adjust.
9102 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9104 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9105 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9106 (s390_gdbarch_tdep_alloc): New function.
9107 (s390_gdbarch_init): Allocate tdep at start and use its fields
9108 instead of separate variables.
9110 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9112 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9113 when looking for cached gdbarch and add comment for remaining.
9115 2018-01-22 Pedro Alves <palves@redhat.com>
9116 Sergio Durigan Junior <sergiodj@redhat.com>
9118 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9121 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9123 * MAINTAINERS: Update my company e-mail address.
9125 2018-01-22 Yao Qi <yao.qi@linaro.org>
9127 * regcache.c (cooked_write_test): New function.
9128 (_initialize_regcache): Register the test.
9130 2018-01-22 Yao Qi <yao.qi@linaro.org>
9132 * ia64-tdep.c (ia64_pseudo_register_read): Call
9133 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9134 * m32c-tdep.c (m32c_cat_read): Likewise.
9135 (m32c_r3r2r1r0_read): Likewise.
9136 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9137 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9139 2018-01-22 Yao Qi <yao.qi@linaro.org>
9141 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9142 method raw_read instead of regcache_raw_read.
9143 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9144 * arm-tdep.c (arm_neon_quad_read): Likewise.
9145 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9146 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9147 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9148 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9149 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9150 (i386_pseudo_register_read_into_value): Likewise.
9151 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9152 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9153 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9154 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9155 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9156 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9157 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9158 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9159 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9161 2018-01-22 Yao Qi <yao.qi@linaro.org>
9163 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9164 * configure.tgt: Remove target mt.
9165 * mt-tdep.c: Remove.
9166 * regcache.c (cooked_read_test): Remove the check for mt.
9168 2018-01-22 Yao Qi <yao.qi@linaro.org>
9170 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9171 instead of gdbarch_pseudo_register_read_value.
9173 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9175 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9178 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9180 * linespec.c (create_sals_line_offset): Remove code that preserved
9181 the symtab_and_line's line number.
9183 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9185 * varobj.c (varobj_create): Don't set valid_block when creating a
9188 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9190 * varobj.c (varobj_create): Remove out of date comment.
9192 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9195 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9196 updating innermost block.
9197 * parse.c (innermost_block_tracker::update): Take extra type
9198 parameter, and check types match before updating innermost block.
9199 (write_dollar_variable): Update innermost block for registers.
9200 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9201 (innermost_block_tracker::innermost_block_tracker): Initialise
9203 (innermost_block_tracker::reset): Take type parameter.
9204 (innermost_block_tracker::update): Take type parameter, and pass
9205 type through as needed.
9206 (innermost_block_tracker::m_types): New member.
9207 * varobj.c (varobj_create): Pass type when reseting innermost
9210 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9212 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9213 * ada-lang.c (resolve_subexp): Likewise.
9214 * breakpoint.c (set_breakpoint_condition) Likewise.
9215 (watch_command_1) Likewise.
9216 * c-exp.y (variable): Likewise.
9217 * d-exp.y (PrimaryExpression): Likewise.
9218 * f-exp.y (variable): Likewise.
9219 * go-exp.y (variable): Likewise.
9220 * m2-exp.y (variable): Likewise.
9221 * objfiles.c (objfile::~objfile): Likewise.
9222 * p-exp.y (variable): Likewise.
9223 * parse.c (innermost_block): Change type.
9224 * parser-defs.h (class innermost_block_tracker): New.
9225 (innermost_block): Change to innermost_block_tracker.
9226 * printcmd.c (display_command): Switch to innermost_block API.
9227 (do_one_display): Likewise.
9228 * rust-exp.y (do_one_display): Likewise.
9229 * symfile.c (clear_symtab_users): Likewise.
9230 * varobj.c (varobj_create): Switch to innermost_block API, replace
9231 use of innermost_block with block stored on varobj object.
9233 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9235 * expression.h (innermost_block): Remove declaration.
9236 * varobj.c: Add 'parser-defs.h' include.
9238 2018-01-19 Tom Tromey <tom@tromey.com>
9240 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9241 symbols in the static and global blocks.
9243 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9245 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9246 gdb_ptrace.h, and move including gdb_wait.h ...
9247 * nat/linux-ptrace.h: ... to here.
9249 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9251 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9252 inf_ptrace_detach_success.
9253 (inf_ptrace_detach_success): Add inferior parameter, use it
9254 instead of inferior_ptid, pass it to detach_inferior.
9255 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9257 * inferior.c (detach_inferior): Add overload that takes an
9259 * inferior.h (detach_inferior): Likewise.
9260 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9261 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9262 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9264 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9266 * target.h (struct target_ops) <to_detach>: Add inferior
9268 (target_detach): Likewise.
9269 * target.c (dispose_inferior): Pass inferior down.
9270 (target_detach): Pass inferior down. Assert that it is equal to
9271 the current inferior.
9272 * aix-thread.c (aix_thread_detach): Pass inferior down.
9273 * corefile.c (core_file_command): Pass current_inferior() down.
9274 * corelow.c (core_detach): Add inferior parameter.
9275 * darwin-nat.c (darwin_detach): Likewise.
9276 * gnu-nat.c (gnu_detach): Likewise.
9277 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9278 * infcmd.c (detach_command): Pass current_inferior() down to
9280 * infrun.c (follow_fork_inferior): Pass parent_inf to
9282 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9284 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9285 * linux-thread-db.c (thread_db_detach): Likewise.
9286 * nto-procfs.c (procfs_detach): Likewise.
9287 * procfs.c (procfs_detach): Likewise.
9288 * record.c (record_detach): Likewise.
9289 * record.h (struct inferior): Forward-declare.
9290 (record_detach): Add inferior parameter.
9291 * remote-sim.c (gdbsim_detach): Likewise.
9292 * remote.c (remote_detach_1): Likewise.
9293 (remote_detach): Likewise.
9294 (extended_remote_detach): Likewise.
9295 * sol-thread.c (sol_thread_detach): Likewise.
9296 * target-debug.h (target_debug_print_inferior_p): New macro.
9297 * target-delegates.c: Re-generate.
9298 * top.c (kill_or_detach): Pass inferior down to target_detach.
9299 * windows-nat.c (windows_detach): Add inferior parameter.
9301 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9303 * target.h (struct target_ops) <to_detach>: Remove args
9305 (target_detach): Likewise.
9306 * target.c (dispose_inferior): Adjust.
9307 (target_detach): Remove args parameter, adjust.
9308 * aix-thread.c (aix_thread_detach): Adjust.
9309 * corefile.c (core_file_command): Adjust.
9310 * corelow.c (core_detach): Adjust.
9311 * darwin-nat.c (darwin_detach): Adjust.
9312 * gnu-nat.c (gnu_detach): Adjust.
9313 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9314 * infcmd.c (detach_command): Adjust
9315 * infrun.c (follow_fork_inferior): Adjust.
9316 (handle_vfork_child_exec_or_exit): Adjust.
9317 * linux-fork.c (linux_fork_detach): Remove args parameter.
9318 * linux-fork.h (linux_fork_detach): Likewise.
9319 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9320 * linux-thread-db.c (thread_db_detach): Likewise.
9321 * nto-procfs.c (procfs_detach): Likewise.
9322 * procfs.c (procfs_detach): Likewise.
9323 (do_detach): Remove signo parameter.
9324 * record.c (record_detach): Remove args parameter.
9325 * record.h (record_detach): Likewise.
9326 * remote-sim.c (gdbsim_detach): Likewise.
9327 * remote.c (remote_detach_1): Likewise.
9328 (remote_detach): Likewise.
9329 (extended_remote_detach): Likewise.
9330 * sol-thread.c (sol_thread_detach): Likewise.
9331 * target-delegates.c: Re-generate.
9332 * top.c (struct qt_args) <args>: Remove field.
9333 (kill_or_detach): Don't pass args.
9334 (quit_force): Don't set args.
9335 * windows-nat.c (windows_detach): Remove args parameter.
9337 2018-01-19 Yao Qi <yao.qi@linaro.org>
9339 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9340 (arm_linux_init_abi): Install it.
9342 2018-01-19 Yao Qi <yao.qi@linaro.org>
9344 * osabi.c (gdb_osabi_names): Extend the regexp for
9345 arm-linux-gnueabihf.
9347 2018-01-18 Yao Qi <yao.qi@linaro.org>
9349 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9351 (abbrev_table::add_abbrev): Update.
9352 (abbrev_table::lookup_abbrev): Update.
9354 2018-01-18 Yao Qi <yao.qi@linaro.org>
9356 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9358 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9360 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9363 2018-01-17 Tom Tromey <tom@tromey.com>
9365 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9367 2018-01-17 Tom Tromey <tom@tromey.com>
9369 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9370 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9371 (create_array_type_with_stride): Update.
9372 * dwarf2read.c (set_die_type): Update.
9374 2018-01-17 Tom Tromey <tom@tromey.com>
9376 * dwarf2read.c (delayed_method_info): Remove typedef.
9377 (dwarf2_cu::method_info): Now a std::vector.
9378 (add_to_method_list): Update.
9379 (free_delayed_list): Remove.
9380 (compute_delayed_physnames): Update.
9381 (process_full_comp_unit, process_full_type_unit): Clear the method
9382 list. Remove cleanups.
9383 (psymtab_include_file_name): Add name_holder parameter. Use
9385 (dwarf_decode_lines): Update.
9387 2018-01-17 Tom Tromey <tom@tromey.com>
9388 Simon Marchi <simon.marchi@ericsson.com>
9390 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9391 (dwarf2_per_objfile::free_cached_comp_units)
9392 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9393 (init_cutu_and_read_dies_no_follow): Update.
9394 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9395 (dwarf2_cu::~dwarf2_cu): New.
9396 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9397 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9399 2018-01-17 Tom Tromey <tom@tromey.com>
9400 Simon Marchi <simon.marchi@ericsson.com>
9402 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9403 (struct die_reader_specs) <abbrev_table>: New member.
9404 (struct abbrev_table): Add constructor.
9405 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9406 <abbrev_obstack>: Now an auto_obstack.
9407 (abbrev_table_up): New typedef.
9408 (init_cu_die_reader): Add abbrev_table parameter.
9409 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9410 Add result_dwo_abbrev_table.
9411 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9412 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9414 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9416 (skip_children): Update.
9417 (abbrev_table::alloc_abbrev): Rename from
9418 abbrev_table_alloc_abbrev.
9419 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9420 (abbrev_table::lookup_abbrev): Rename from
9421 abbrev_table_lookup_abbrev.
9422 (abbrev_table_read_table): Return abbrev_table_up.
9423 (abbrev_table_free, abbrev_table_free_cleanup)
9424 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9425 (load_partial_dies): Update.
9427 2018-01-17 Tom Tromey <tom@tromey.com>
9429 * dwarf2read.c (dwarf2_compute_name): Update comment.
9430 (read_func_scope, read_variable): Update.
9431 (new_symbol): Remove.
9432 (new_symbol_full): Rename to new_symbol.
9434 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9437 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9438 a warning instead of throwing an error, set section size to 0 and return
9440 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9442 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9444 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9446 (linux_ptrace_attach_fail_reason_string): Likewise.
9447 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9449 (linux_ptrace_attach_fail_reason_string): Likewise.
9450 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9452 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9454 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9456 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9459 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9460 checking for fs_base/gs_base fields in struct user_regs_struct.
9461 * configure: Regenerate.
9463 2018-01-17 Yao Qi <yao.qi@linaro.org>
9465 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9467 (aarch64_linux_init_abi): Install it to gdbarch hook
9470 2018-01-15 Pedro Alves <palves@redhat.com>
9472 * common/signals-state-save-restore.c
9473 (save_original_signals_state): Fix typos.
9475 2017-01-12 Tom Tromey <tom@tromey.com>
9476 Sergio Durigan Junior <sergiodj@redhat.com>
9478 * Makefile.in (install-only): Install gdb-add-index.
9480 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9482 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9484 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9486 * infrun.c (keep_going_pass_signal): Clear step-over info when
9487 insert_breakpoints fails.
9489 2018-01-11 Pedro Alves <palves@redhat.com>
9492 * infrun.c (resume): Rename to ...
9493 (resume_1): ... this.
9494 (resume): Reimplement as wrapper around resume_1.
9496 2018-01-11 Pedro Alves <palves@redhat.com>
9499 * remote.c (remote_parse_stop_reply): Default to the last-set
9500 general thread instead of to 'magic_null_ptid'.
9502 2018-01-10 Pedro Alves <palves@redhat.com>
9504 * language.h (language_get_symbol_name_matcher): Rename ...
9505 (get_symbol_name_matcher): ... this.
9506 * language.c (language_get_symbol_name_matcher): Ditto.
9507 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9510 2018-01-10 Pedro Alves <palves@redhat.com>
9514 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9515 Adjust to use language_get_symbol_name_matcher instead of
9516 language_defn::la_get_symbol_name_matcher.
9517 * language.c (language_get_symbol_name_matcher): If in Ada mode
9518 and the lookup name is a verbatim match, return Ada's matcher.
9519 * language.h (language_get_symbol_name_matcher): Adjust comment.
9520 (ada_lookup_name_info::verbatim_p):: New method.
9522 2018-01-10 Pedro Alves <palves@redhat.com>
9525 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9526 minsym's language is language_auto or language_cplus, pass down
9527 language_ada instead.
9528 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9530 2018-01-10 Pedro Alves <palves@redhat.com>
9533 * minsyms.c (linkage_name_str): New function.
9534 (iterate_over_minimal_symbols): Use it.
9536 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9538 * NEWS: Document that 'info proc' now works on FreeBSD.
9540 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9542 * configure.ac: Check for kinfo_getfile in libutil.
9543 * configure: Regenerate.
9544 * config.in: Regenerate.
9545 * fbsd-nat.c: Include "fbsd-tdep.h".
9546 (fbsd_fetch_cmdline): New.
9547 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9548 rather than calling error.
9549 (fbsd_info_proc): New.
9550 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9551 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9552 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9554 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9556 * fbsd-nat.c (struct free_deleter): Remove.
9557 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9559 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9561 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9562 NULL for an empty pathname.
9564 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9566 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9567 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9568 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9569 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9570 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9571 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9572 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9573 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9574 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9575 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9576 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9577 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9578 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9579 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9580 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9582 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9584 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9585 (gnu_xfer_auxv): New function.
9586 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9589 2018-01-08 Yao Qi <yao.qi@linaro.org>
9590 Simon Marchi <simon.marchi@ericsson.com>
9592 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9594 (COMMON_OBS): Remove selftest.o.
9595 * configure.ac: Append selftest-arch.c and common/selftest.c to
9596 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9597 * configure: Re-generated.
9598 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9600 (maintenance_info_selftests): Likewise.
9602 2018-01-08 Xavier Roirand <roirand@adacore.com>
9604 * ada-valprint.c (val_print_packed_array_elements): Use
9605 proper number of elements when printing an array indexed
9606 by an enumeration type.
9608 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9610 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9611 (dw2_get_file_names_reader): Adjust.
9612 (lookup_dwo_signatured_type): Adjust.
9613 (lookup_dwp_signatured_type): Adjust.
9614 (lookup_signatured_type): Adjust.
9615 (create_type_unit_group): Adjust.
9616 (get_type_unit_group): Adjust.
9617 (process_psymtab_comp_unit_reader): Adjust.
9618 (build_type_psymtabs_reader): Adjust.
9619 (scan_partial_symbols): Adjust.
9620 (add_partial_symbol): Adjust.
9621 (add_partial_subprogram): Adjust.
9622 (peek_die_abbrev): Adjust.
9623 (fixup_go_packaging): Adjust.
9624 (process_imported_unit_die): Adjust.
9625 (dwarf2_compute_name): Adjust.
9626 (dwarf2_physname): Adjust.
9627 (read_import_statement): Adjust.
9628 (handle_DW_AT_stmt_list): Adjust.
9629 (read_file_scope): Adjust.
9630 (read_func_scope): Adjust.
9631 (read_lexical_block_scope): Adjust.
9632 (read_call_site_scope): Adjust.
9633 (read_variable): Adjust.
9634 (dwarf2_rnglists_process): Adjust.
9635 (dwarf2_ranges_process): Adjust.
9636 (dwarf2_ranges_read): Adjust.
9637 (dwarf2_get_pc_bounds): Adjust.
9638 (dwarf2_record_block_ranges): Adjust.
9639 (dwarf2_add_field): Adjust.
9640 (dwarf2_add_member_fn): Adjust.
9641 (read_structure_type): Adjust.
9642 (process_structure_scope): Adjust.
9643 (read_enumeration_type): Adjust.
9644 (read_array_type): Adjust.
9645 (mark_common_block_symbol_computed): Adjust.
9646 (read_common_block): Adjust.
9647 (read_namespace_type): Adjust.
9648 (read_namespace): Adjust.
9649 (read_module_type): Adjust.
9650 (read_tag_pointer_type): Adjust.
9651 (read_tag_ptr_to_member_type): Adjust.
9652 (read_tag_string_type): Adjust.
9653 (read_subroutine_type): Adjust.
9654 (read_typedef): Adjust.
9655 (read_base_type): Adjust.
9656 (attr_to_dynamic_prop): Adjust.
9657 (read_subrange_type): Adjust.
9658 (read_unspecified_type): Adjust.
9659 (dwarf2_read_abbrevs): Adjust.
9660 (load_partial_dies): Adjust.
9661 (read_partial_die): Adjust.
9662 (find_partial_die): Adjust.
9663 (guess_partial_die_structure_name): Adjust.
9664 (fixup_partial_die): Adjust.
9665 (read_attribute_value): Adjust.
9666 (read_addr_index): Adjust.
9667 (read_addr_index_from_leb128): Adjust.
9668 (read_str_index): Adjust.
9669 (dwarf2_string_attr): Adjust.
9670 (get_debug_line_section): Adjust.
9671 (dwarf_decode_line_header): Adjust.
9672 (lnp_state_machine::check_line_address): Adjust.
9673 (dwarf_decode_lines_1): Adjust.
9674 (dwarf_decode_lines): Adjust.
9675 (dwarf2_start_symtab): Adjust.
9676 (var_decode_location): Adjust.
9677 (new_symbol_full): Adjust.
9678 (dwarf2_const_value_data): Adjust.
9679 (dwarf2_const_value_attr): Adjust.
9680 (dwarf2_const_value): Adjust.
9682 (die_containing_type): Adjust.
9683 (build_error_marker_type): Adjust.
9684 (lookup_die_type): Adjust.
9685 (guess_full_die_structure_name): Adjust.
9686 (anonymous_struct_prefix): Adjust.
9687 (determine_prefix): Adjust.
9688 (dwarf2_name): Adjust.
9689 (follow_die_ref_or_sig): Adjust.
9690 (follow_die_offset): Adjust.
9691 (follow_die_ref): Adjust.
9692 (follow_die_sig_1): Adjust.
9693 (follow_die_sig): Adjust.
9694 (get_signatured_type): Adjust.
9695 (get_DW_AT_signature_type): Adjust.
9696 (decode_locdesc): Adjust.
9697 (dwarf_decode_macros): Adjust.
9698 (cu_debug_loc_section): Adjust.
9699 (fill_in_loclist_baton): Adjust.
9700 (dwarf2_symbol_mark_computed): Adjust.
9701 (init_one_comp_unit): Don't assign
9702 dwarf2_cu::dwarf2_per_objfile.
9703 (set_die_type): Adjust.
9705 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9707 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9708 <dwarf2_per_objfile>: New field.
9709 (dwarf2_per_objfile): Remove global.
9710 (get_dwarf2_per_objfile): New function.
9711 (set_dwarf2_per_objfile): New function.
9712 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9714 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9715 (read_abbrev_offset): Likewise.
9716 (read_indirect_string): Likewise.
9717 (read_indirect_line_string): Likewise.
9718 (read_indirect_string_at_offset): Likewise.
9719 (read_indirect_string_from_dwz): Likewise.
9720 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9722 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9723 (create_all_comp_units): Change objfile parameter to
9725 (create_all_type_units): Likewise.
9726 (process_queue): Add dwarf2_per_objfile parameter.
9727 (read_and_check_comp_unit_head): Likewise.
9728 (lookup_dwo_unit_in_dwp): Likewise.
9729 (get_dwp_file): Likewise.
9730 (process_cu_includes): Likewise.
9731 (struct free_dwo_file_cleanup_data): New struct.
9732 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9733 set_dwarf2_per_objfile.
9734 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9735 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9736 context, adjust calls.
9737 (dw2_instantiate_symtab): Likewise.
9738 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9739 (dw2_get_cu): Likewise.
9740 (create_cu_from_index_list): Change objfile parameter to
9742 (create_cus_from_index_list): Get dwarf2_per_objfile from
9743 context, adjust calls.
9744 (create_cus_from_index): Likewise.
9745 (create_signatured_type_table_from_index): Change objfile
9746 parameter to dwarf2_per_objfile.
9747 (create_signatured_type_table_from_debug_names): Change objfile
9748 parameter to dwarf2_per_objfile.
9749 (create_addrmap_from_index): Likewise.
9750 (create_addrmap_from_aranges): Likewise.
9751 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9752 (dw2_setup): Remove.
9753 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9755 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9756 get_dwarf2_per_objfile.
9757 (dw2_forget_cached_source_info): Likewise.
9758 (dw2_map_symtabs_matching_filename): Likewise.
9759 (struct dw2_symtab_iterator) <index>: Remove.
9760 <dwarf2_per_objfile>: New field.
9761 (dw2_symtab_iter_init): Replace index parameter with
9763 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9764 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9765 (dw2_print_stats): Likewise.
9766 (dw2_dump): Likewise.
9767 (dw2_expand_symtabs_for_function): Likewise.
9768 (dw2_expand_all_symtabs): Likewise.
9769 (dw2_expand_symtabs_with_fullname): Likewise.
9770 (dw2_expand_marked_cus): Replace index and objfile parameters
9771 with dwarf2_per_objfile.
9772 (dw_expand_symtabs_matching_file_matcher): Add
9773 dwarf2_per_objfile parameter and adjust calls.
9774 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9776 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9777 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9779 (create_cus_from_debug_names_list): Replace objfile parameter
9780 with dwarf2_per_objfile and adjust calls.
9781 (create_cus_from_debug_names): Likewise.
9782 (dwarf2_read_debug_names): Likewise.
9783 (mapped_debug_names::namei_to_name): Adjust call.
9784 (dw2_debug_names_iterator::next): Likewise.
9785 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9786 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9787 (dw2_debug_names_dump): Likewise.
9788 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9789 (dw2_debug_names_expand_symtabs_matching): Likewise.
9790 (dwarf2_initialize_objfile): Likewise.
9791 (dwarf2_build_psymtabs): Likewise.
9792 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9794 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9795 (read_and_check_comp_unit_head): Likewise.
9796 (read_abbrev_offset): Likewise.
9797 (create_debug_type_hash_table): Likewise.
9798 (create_debug_types_hash_table): Likewise.
9799 (create_all_type_units): Replace objfile parameter with
9801 (add_type_unit): Add dwarf2_per_objfile parameter.
9802 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9803 with dwarf2_per_objfile.
9804 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9805 (lookup_dwp_signatured_type): Likewise.
9806 (lookup_signatured_type): Likewise.
9807 (read_cutu_die_from_dwo): Likewise.
9808 (init_tu_and_read_dwo_dies): Likewise.
9809 (init_cutu_and_read_dies): Likewise.
9810 (init_cutu_and_read_dies_no_follow): Likewise.
9811 (allocate_type_unit_groups_table): Add objfile parameter.
9812 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9813 (get_type_unit_group): Likewise.
9814 (process_psymtab_comp_unit): Update call.
9815 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9816 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9817 (print_tu_stats): Likewise.
9818 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9820 (build_type_psymtabs): Change objfile parameter to
9822 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9823 passed in void* parameter.
9824 (process_skeletonless_type_units): Change objfile parameter to
9826 (set_partial_user): Likewise.
9827 (dwarf2_build_psymtabs_hard): Likewise.
9828 (read_comp_units_from_section): Likewise.
9829 (create_all_comp_units): Likewise.
9830 (scan_partial_symbols): Update calls.
9831 (add_partial_symbol): Likewise.
9832 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9833 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9834 (process_queue): Add dwarf2_per_objfile parameter.
9835 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9836 (compute_compunit_symtab_includes): Likewise.
9837 (process_cu_includes): Add dwarf2_per_objfile parameter.
9838 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9839 (process_full_type_unit): Likewise.
9840 (process_imported_unit_die): Update call.
9841 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9842 (read_file_scope): Likewise.
9843 (allocate_dwo_file_hash_table): Add objfile parameter.
9844 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9845 (create_cus_hash_table): Likewise.
9846 (create_dwp_hash_table): Likewise.
9847 (create_dwo_unit_in_dwp_v1): Likewise.
9848 (create_dwp_v2_section): Likewise.
9849 (create_dwo_unit_in_dwp_v2): Likewise.
9850 (lookup_dwo_unit_in_dwp): Likewise.
9851 (try_open_dwop_file): Likewise.
9852 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9853 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9854 cleanup to include a reference to dwarf2_per_objfile.
9855 (open_dwp_file): Add dwarf2_per_objfile parameter.
9856 (open_and_init_dwp_file): Likewise.
9857 (get_dwp_file): Likewise.
9858 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9859 (queue_and_load_all_dwo_tus): Update call.
9860 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9862 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9863 (dwarf2_ranges_process): Likewise.
9864 (dwarf2_get_pc_bounds): Likewise.
9865 (mark_common_block_symbol_computed): Likewise.
9866 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9867 (dwarf2_read_abbrevs): Update call.
9868 (read_partial_die): Use dwarf2_per_objfile from cu.
9869 (find_partial_die): Likewise.
9870 (fixup_partial_die): Likewise.
9871 (read_attribute_value): Likewise.
9872 (read_indirect_string_at_offset_from): Add objfile parameter.
9873 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9875 (read_indirect_string_from_dwz): Add objfile parameter.
9876 (read_indirect_string): Add objfile parameter.
9877 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9878 (read_addr_index): Use dwarf2_per_objfile from cu.
9879 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9881 (read_str_index): Use dwarf2_per_objfile from cu.
9882 (get_debug_line_section): Likewise.
9883 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9884 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9885 (new_symbol_full): Use dwarf2_per_objfile from cu.
9886 (build_error_marker_type): Likewise.
9887 (lookup_die_type): Likewise.
9888 (determine_prefix): Likewise.
9889 (follow_die_offset): Likewise.
9890 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9891 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9892 (dwarf2_fetch_die_type_sect_off): Likewise.
9893 (dwarf2_get_die_type): Likewise.
9894 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9895 (get_signatured_type): Likewise.
9896 (get_DW_AT_signature_type): Likewise.
9897 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9898 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9899 (cu_debug_loc_section): Likewise.
9900 (fill_in_loclist_baton): Likewise.
9901 (dwarf2_symbol_mark_computed): Likewise.
9902 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9904 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9906 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9907 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9908 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9909 (set_die_type): Use dwarf2_free_objfile from cu.
9910 (get_die_type_at_offset): Likewise.
9911 (dwarf2_per_objfile_free): Don't assign global variable.
9912 (debug_names) <constructor>: Add dwarf2_per_objfile
9913 parameter, update m_debugstrlookup construction.
9914 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9916 <m_dwarf2_per_objfile>: New field.
9917 <lookup>: Use m_dwarf2_per_objfile.
9918 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9919 (psyms_seen_size): Likewise.
9920 (write_gdbindex): Replace objfile parameter with
9922 (write_debug_names): Likewise.
9923 (write_psymtabs_to_index): Likewise.
9924 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9927 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9929 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9930 <dwarf2_per_objfile>: New field.
9931 (struct dwarf2_per_cu_data) <objfile>: Remove.
9932 <dwarf2_per_objfile>: New field.
9933 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9935 (create_signatured_type_table_from_index): Likewise.
9936 (create_debug_type_hash_table): Likewise.
9937 (fill_in_sig_entry_from_dwo_entry): Likewise.
9938 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9939 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9941 (create_partial_symtab): Access objfile through
9943 (process_psymtab_comp_unit_reader): Likewise.
9944 (read_comp_units_from_section): Likewise.
9945 (scan_partial_symbols): Likewise.
9946 (add_partial_symbol): Likewise.
9947 (add_partial_subprogram): Likewise.
9948 (peek_die_abbrev): Likewise.
9949 (fixup_go_packaging): Likewise.
9950 (process_full_comp_unit): Likewise.
9951 (process_full_type_unit): Likewise.
9952 (process_imported_unit_die): Likewise.
9953 (dwarf2_compute_name): Likewise.
9954 (dwarf2_physname): Likewise.
9955 (read_import_statement): Likewise.
9956 (create_cus_hash_table): Assign dwarf2_physname instead of
9958 (read_func_scope): Access objfile through dwarf2_per_objfile.
9959 (read_lexical_block_scope): Likewise.
9960 (read_call_site_scope): Likewise.
9961 (read_variable): Likewise.
9962 (dwarf2_rnglists_process): Likewise.
9963 (dwarf2_ranges_process): Likewise.
9964 (dwarf2_ranges_read): Likewise.
9965 (dwarf2_record_block_ranges): Likewise.
9966 (dwarf2_add_field): Likewise.
9967 (dwarf2_add_member_fn): Likewise.
9968 (read_structure_type): Likewise.
9969 (process_structure_scope): Likewise.
9970 (read_enumeration_type): Likewise.
9971 (read_array_type): Likewise.
9972 (read_common_block): Likewise.
9973 (read_namespace_type): Likewise.
9974 (read_namespace): Likewise.
9975 (read_module_type): Likewise.
9976 (read_tag_pointer_type): Likewise.
9977 (read_tag_ptr_to_member_type): Likewise.
9978 (read_tag_string_type): Likewise.
9979 (read_subroutine_type): Likewise.
9980 (read_typedef): Likewise.
9981 (read_base_type): Likewise.
9982 (attr_to_dynamic_prop): Likewise.
9983 (read_subrange_type): Likewise.
9984 (read_unspecified_type): Likewise.
9985 (load_partial_dies): Likewise.
9986 (read_partial_die): Likewise.
9987 (find_partial_die): Likewise.
9988 (guess_partial_die_structure_name): Likewise.
9989 (fixup_partial_die): Likewise.
9990 (read_attribute_value): Likewise.
9991 (read_addr_index_from_leb128): Likewise.
9992 (dwarf2_read_addr_index): Likewise.
9993 (dwarf2_string_attr): Likewise.
9994 (lnp_state_machine::check_line_address): Likewise.
9995 (dwarf_decode_lines_1): Likewise.
9996 (dwarf_decode_lines): Likewise.
9997 (dwarf2_start_symtab): Likewise.
9998 (var_decode_location): Likewise.
9999 (new_symbol_full): Likewise.
10000 (dwarf2_const_value_data): Likewise.
10001 (dwarf2_const_value_attr): Likewise.
10002 (dwarf2_const_value): Likewise.
10003 (die_type): Likewise.
10004 (die_containing_type): Likewise.
10005 (lookup_die_type): Likewise.
10006 (guess_full_die_structure_name): Likewise.
10007 (anonymous_struct_prefix): Likewise.
10008 (dwarf2_name): Likewise.
10009 (follow_die_ref_or_sig): Likewise.
10010 (follow_die_offset): Likewise.
10011 (follow_die_ref): Likewise.
10012 (dwarf2_fetch_die_loc_sect_off): Likewise.
10013 (dwarf2_fetch_constant_bytes): Likewise.
10014 (dwarf2_fetch_die_type_sect_off): Likewise.
10015 (dwarf2_get_die_type): Likewise.
10016 (follow_die_sig): Likewise.
10017 (decode_locdesc): Likewise.
10018 (dwarf2_per_cu_objfile): Likewise.
10019 (dwarf2_per_cu_text_offset): Likewise.
10020 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10022 (set_die_type): Access objfile through
10023 dwarf2_per_objfile.
10025 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10027 * valprint.c (converted_character_d): Remove typedef.
10028 (DEF_VEC_O (converted_character_d)): Remove.
10029 (count_next_character): Use std::vector.
10030 (print_converted_chars_to_obstack): Likewise.
10031 (generic_printstr): Likewise.
10033 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10035 * xml-support.h (struct gdb_xml_value): Add constructor.
10036 <value>: Change type to unique_xmalloc_ptr.
10037 (gdb_xml_value_s): Remove typedef.
10038 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10039 (gdb_xml_element_start_handler): Change parameter type to
10041 (xml_find_attribute): Likewise.
10042 * xml-support.c (xml_find_attribute): Change parameter type to
10043 std::vector and adjust.
10044 (gdb_xml_values_cleanup): Remove.
10045 (gdb_xml_parser::start_element): Adjust to std::vector.
10046 (xinclude_start_include): Change paraeter type to std::vector
10048 * btrace.c (check_xml_btrace_version): Likewise.
10049 (parse_xml_btrace_block): Likewise.
10050 (parse_xml_btrace_pt_config_cpu): Likewise.
10051 (parse_xml_btrace_pt): Likewise.
10052 (parse_xml_btrace_conf_bts): Likewise.
10053 (parse_xml_btrace_conf_pt): Likewise.
10054 * memory-map.c (memory_map_start_memory): Likewise.
10055 (memory_map_start_property): Likewise.
10056 * osdata.c (osdata_start_osdata): Likewise.
10057 (osdata_start_item): Likewise.
10058 (osdata_start_column): Likewise.
10059 * remote.c (start_thread): Likewise.
10060 * solib-aix.c (library_list_start_library): Likewise.
10061 (library_list_start_list): Likewise.
10062 * solib-svr4.c (library_list_start_library): Likewise.
10063 (svr4_library_list_start_list): Likewise.
10064 * solib-target.c (library_list_start_segment): Likewise.
10065 (library_list_start_section): Likewise.
10066 (library_list_start_library): Likewise.
10067 (library_list_start_list): Likewise.
10068 * tracepoint.c (traceframe_info_start_memory): Likewise.
10069 (traceframe_info_start_tvar): Likewise.
10070 * xml-syscall.c (syscall_start_syscall): Likewise.
10071 * xml-tdesc.c (tdesc_start_target): Likewise.
10072 (tdesc_start_feature): Likewise.
10073 (tdesc_start_reg): Likewise.
10074 (tdesc_start_union): Likewise.
10075 (tdesc_start_struct): Likewise.
10076 (tdesc_start_flags): Likewise.
10077 (tdesc_start_enum): Likewise.
10078 (tdesc_start_field): Likewise.
10079 (tdesc_start_enum_value): Likewise.
10080 (tdesc_start_vector): Likewise.
10082 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10084 * extension.h (struct xmethod_worker) <clone>: Remove.
10085 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10087 (python_xmethod_worker::clone): Remove.
10088 * valops.c (find_overload_match): Use std::move instead of
10091 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10093 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10094 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10095 <free_xmethod_worker_data>: Remove.
10096 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10097 <get_xmethod_arg_types>: Remove.
10098 <get_xmethod_result_type>: Remove.
10099 <invoke_xmethod>: Remove.
10100 * extension.c (new_xmethod_worker): Remove.
10101 (clone_xmethod_worker): Remove.
10102 (get_matching_xmethod_workers): Return void, pass std::vector by
10104 (get_xmethod_arg_types): Rename to...
10105 (xmethod_worker::get_arg_types): ... this, and adjust.
10106 (get_xmethod_result_type): Rename to...
10107 (xmethod_worker::get_result_type): ... this, and adjust.
10108 (invoke_xmethod): Remove.
10109 (free_xmethod_worker): Remove.
10110 (free_xmethod_worker_vec): Remove.
10111 * extension.h (enum ext_lang_rc): Move here from
10113 (struct xmethod_worker): Add constructor and destructor.
10116 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10117 virtual pure methods.
10118 <get_arg_types, get_result_type>: New methods.
10119 (xmethod_worker_ptr): Remove typedef.
10120 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10121 (xmethod_worker_vec): Remove typedef.
10122 (xmethod_worker_up): New typedef.
10123 (invoke_xmethod): Remove.
10124 (clone_xmethod_worker): Remove.
10125 (free_xmethod_worker): Remove.
10126 (free_xmethod_worker_vec): Remove.
10127 (get_xmethod_arg_types): Remove.
10128 (get_xmethod_result_type): Remove.
10129 * valops.c (find_method_list): Use std::vector, don't use
10130 intermediate vector.
10131 (value_find_oload_method_list): Use std::vector.
10132 (find_overload_match): Use std::vector.
10133 (find_oload_champ): Use std::vector.
10134 * value.c (value_free): Use operator delete.
10135 (value_of_xmethod): Rename to...
10136 (value_from_xmethod): ... this. Don't assign
10137 xmethod_worker::value, take rvalue-reference.
10138 (result_type_of_xmethod): Adjust.
10139 (call_xmethod): Adjust.
10140 * value.h: Include extension.h.
10141 (struct xmethod_worker): Don't forward-declare.
10142 (value_of_xmethod): Rename to...
10143 (value_from_xmethod): ... this, take rvalue-reference.
10144 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10145 (struct python_xmethod_worker): ... this, add constructor and
10147 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10148 (gdbpy_free_xmethod_worker_data): Rename to...
10149 (python_xmethod_worker::~python_xmethod_worker): ... this and
10151 (gdbpy_clone_xmethod_worker_data): Rename to...
10152 (python_xmethod_worker::clone): ... this and adjust.
10153 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10155 (gdbpy_get_xmethod_arg_types): Rename to...
10156 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10157 (gdbpy_get_xmethod_result_type): Rename to...
10158 (python_xmethod_worker::do_get_result_type): ... this and
10160 (gdbpy_invoke_xmethod): Rename to...
10161 (python_xmethod_worker::invoke): ... this and adjust.
10162 (new_python_xmethod_worker): Rename to...
10163 (python_xmethod_worker::python_xmethod_worker): ... this and
10165 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10167 (gdbpy_free_xmethod_worker_data): Remove.
10168 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10169 (gdbpy_get_xmethod_arg_types): Remove.
10170 (gdbpy_get_xmethod_result_type): Remove.
10171 (gdbpy_invoke_xmethod): Remove.
10172 * python/python.c (python_extension_ops): Remove obsolete
10175 2018-01-05 Pedro Alves <palves@redhat.com>
10178 * common/signals-state-save-restore.c
10179 (save_original_signals_state): New parameter 'quiet'. Warn if we
10180 find a custom handler preinstalled, instead of internal erroring.
10181 But only warn if !quiet.
10182 * common/signals-state-save-restore.h
10183 (save_original_signals_state): New parameter 'quiet'.
10184 * main.c (captured_main_1): Move save_original_signals_state call
10185 after option handling, and pass QUIET.
10187 2018-01-05 Pedro Alves <palves@redhat.com>
10189 * spu-tdep.c (spu_catch_start): Pass
10190 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10192 2018-01-05 Pedro Alves <palves@redhat.com>
10195 * ada-lang.c (literal_symbol_name_matcher): New function.
10196 (ada_get_symbol_name_matcher): Use it for
10197 symbol_name_match_type::SEARCH_NAME.
10198 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10199 it down instead of assuming symbol_name_match_type::FULL.
10200 * block.h (block_lookup_symbol): New parameter 'match_type'.
10201 * c-valprint.c (print_unpacked_pointer): Use
10202 lookup_symbol_search_name instead of lookup_symbol.
10203 * compile/compile-object-load.c (get_out_value_type): Pass down
10204 symbol_name_match_type::SEARCH_NAME.
10205 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10206 symbol_name_match_type::FULL.
10207 * cp-support.c (cp_get_symbol_name_matcher): Handle
10208 symbol_name_match_type::SEARCH_NAME.
10209 * infrun.c (insert_exception_resume_breakpoint): Use
10210 lookup_symbol_search_name.
10211 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10212 * psymtab.c (maintenance_check_psymtabs): Use
10213 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10214 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10215 SYMBOL_SEARCH_NAME.
10216 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10217 if symbol_name_match_type::SEARCH_NAME.
10218 (lookup_symbol_in_language): Pass down
10219 symbol_name_match_type::FULL.
10220 (lookup_symbol_search_name): New.
10221 (lookup_language_this): Pass down
10222 symbol_name_match_type::SEARCH_NAME.
10223 (lookup_symbol_aux, lookup_local_symbol): New parameter
10224 'match_type'. Pass it down.
10225 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10226 (lookup_symbol_search_name): New declaration.
10227 (lookup_symbol_in_block): New 'match_type' parameter.
10229 2018-01-05 Pedro Alves <palves@redhat.com>
10232 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10234 (ada_lookup_symbol): Reimplement in terms of
10235 ada_lookup_symbol_list, bits factored out from
10236 ada_lookup_encoded_symbol.
10238 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10240 * ada-exp.y (write_object_renaming): When subscripting an array
10241 using a symbol as the index, pass the block in call to
10242 ada_lookup_encoded_symbol when looking that symbol up.
10244 2018-01-05 Jerome Guitton <guitton@adacore.com>
10246 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10249 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10251 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10252 the case where VALUE_LVAL (val0) is not lval_memory.
10254 2018-01-05 Xavier Roirand <roirand@adacore.com>
10256 * ada-valprint.c (print_optional_low_bound): Handle
10257 character-indexed array printing like boolean-indexed array
10260 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10262 * NEWS: Create a new section for the next release branch.
10263 Rename the section of the current branch, now that it has
10266 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10268 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10269 * version.in: Bump version to 8.1.50.DATE-git.
10271 2018-01-03 Xavier Roirand <roirand@adacore.com>
10273 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10275 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10277 (default_exception_support_info) <catch_handlers_sym>: Add field.
10278 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10279 (ada_exception_name_addr_1): Add "catch handlers" handling.
10280 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10281 Update all callers.
10282 (create_excep_cond_exprs) <ex>: Add parameter.
10283 (re_set_exception): Update create_excep_cond_exprs call.
10284 (print_it_exception, print_one_exception, print_mention_exception)
10285 (print_recreate_exception): Add "catch handler" handling.
10286 (allocate_location_catch_handlers, re_set_catch_handlers)
10287 (check_status_catch_handlers, print_it_catch_handlers)
10288 (print_one_catch_handlers, print_mention_catch_handlers)
10289 (print_recreate_catch_handlers): New function.
10290 (catch_handlers_breakpoint_ops): New variable.
10291 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10292 Add parameter. Add "catch handler" handling.
10293 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10294 Add "catch handler" handling.
10295 (ada_exception_catchpoint_cond_string): Add "catch handler"
10297 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10299 (catch_ada_handlers_command): New function.
10300 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10301 operations structure.
10302 (_initialize_ada_language): Add "catch handlers" command entry.
10303 * NEWS: Document "catch handlers" feature.
10305 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10307 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10308 account when creating the array type of the slice.
10309 (ada_value_slice): Likewise.
10311 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10313 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10315 (create_array_type_with_stride): Add byte_stride_prop parameter.
10316 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10317 New parameter. Update all callers in this file.
10318 (array_type_has_dynamic_stride): New function.
10319 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10320 of arrays with dynamic byte strides.
10321 * dwarf2read.c (read_array_type): Add support for dynamic
10322 DW_AT_byte_stride attributes.
10324 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10326 * dwarf2read.c (read_unspecified_type): Treat
10327 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10329 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10331 Update copyright year range in all GDB files.
10333 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10335 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10336 and gdb/testsuite/gdb.base/step-line.c.
10338 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10340 * copyright.py (main): Dump the contents of
10341 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10342 even if BY_HAND is empty.
10344 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10346 * top.c (print_gdb_version): Update Copyright year in version
10349 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10351 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10353 For older changes see ChangeLog-2017.
10359 version-control: never