1 2018-07-19 Tom Tromey <tom@tromey.com>
3 * utils.c (do_value_free_to_mark)
4 (make_cleanup_value_free_to_mark): Remove.
5 * utils.h (make_cleanup_value_free_to_mark): Remove.
7 2018-07-19 Pedro Alves <palves@redhat.com>
9 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
12 2018-07-18 Pedro Alves <palves@redhat.com>
14 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
15 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
18 2018-07-18 Pedro Alves <palves@redhat.com>
20 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
22 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
24 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
25 directly instead of a cleanup.
26 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
27 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
28 (vlscm_binop_gdbthrow): New, factored out from ...
29 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
30 (vlscm_rich_compare): Use gdbscm_wrap.
31 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
33 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
35 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
36 Use xfree directly instead of a cleanup.
37 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
38 Adjust to use gdbscm_wrap and scoped_value_mark.
39 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
40 (gdbscm_value_address, gdbscm_value_dereference)
41 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
43 (gdbscm_value_dynamic_type): Use scoped_value_mark.
44 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
46 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
47 gdbscm_wrap and scoped_value_mark.
48 (gdbscm_value_to_string): Use xfree directly instead of a
49 cleanup. Move 'buffer' unique_ptr to TRY scope.
50 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
51 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
53 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
54 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
56 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
59 2018-07-18 Tom de Vries <tdevries@suse.de>
61 * findvar.c (default_read_var_value): Also resolve dynamic type for
62 LOC_OPTIMIZED_OUT vars.
64 2018-07-18 Maciej W. Rozycki <macro@mips.com>
66 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
69 2018-07-17 Tom Tromey <tom@tromey.com>
71 * guile/scm-param.c (pascm_set_func, pascm_show_func)
72 (compute_enum_list, pascm_set_param_value_x)
73 (gdbscm_parameter_value): Update.
74 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
75 (gdbscm_scm_to_host_string): Update.
76 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
78 * guile/scm-cmd.c (cmdscm_add_completion): Update.
79 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
80 * guile/scm-string.c (gdbscm_scm_to_string): Return
82 (gdbscm_scm_to_host_string): Likewise.
84 2018-07-17 Tom Tromey <tom@tromey.com>
86 * guile/guile.c (gdbscm_eval_from_control_command): Update.
87 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
88 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
89 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
92 2018-07-17 Tom Tromey <tom@tromey.com>
94 * guile/scm-param.c (pascm_signal_setshow_error): Update.
95 * guile/guile-internal.h (gdbscm_exception_message_to_string):
97 * guile/scm-cmd.c (cmdscm_function): Update.
98 * guile/scm-pretty-print.c
99 (ppscm_print_exception_unless_memory_error): Update.
100 * guile/scm-exception.c (gdbscm_exception_message_to_string):
101 Return unique_xmalloc_ptr.
103 2018-07-17 Tom Tromey <tom@tromey.com>
105 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
108 2018-07-17 Jim Wilson <jimw@sifive.com>
110 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
111 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
112 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
113 unecessary braces after EF_RISCV_RVC test. Delete call to
114 set_gdbarch_decr_pc_after_break.
116 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
117 RISCV_LAST_FP_REGNUM + 1.
118 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
120 2018-07-17 Tom Tromey <tom@tromey.com>
122 * configure.ac: Remove --disable-gdbcli.
123 * configure: Rebuild.
124 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
125 (SUBDIR_CLI_CFLAGS): Remove.
126 (SFILES): Use SUBDIR_CLI_SRCS.
127 (COMMON_OBS): Use SUBDIR_CLI_OBS.
129 2018-07-17 Tom Tromey <tom@tromey.com>
132 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
134 2018-07-16 Jim Wilson <jimw@sifive.com>
136 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
138 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
140 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
142 (libunwind_frame_sniffer): Likewise.
143 (libunwind_frame_prev_register): Likewise.
144 (libunwind_sigtramp_frame_sniffer): Likewise.
145 * ia64-tdep.c (ia64_access_reg): Likewise.
146 (ia64_access_rse_reg): Likewise.
147 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
148 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
150 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
152 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
154 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
156 * remote-sim.c (gdbsim_target::close,
157 gdbsim_target::mourn_inferior): Remove unused variables.
159 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
161 * ia64-tdep.c (ktab_buf): New global.
162 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
163 (get_kernel_table): Adjust.
165 2018-07-16 Tom Tromey <tom@tromey.com>
167 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
168 * dwarf2read.c (using_directives, new_symbol): Use
170 * dbxread.c (process_one_symbol): Use outermost_context_p.
171 * coffread.c (coff_symtab_read): Use outermost_context_p.
173 2018-07-16 Tom Tromey <tom@tromey.com>
175 * dwarf2read.c (using_directives, read_func_scope)
176 (read_lexical_block_scope): Update.
177 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
178 * buildsym.h (local_using_directives, global_using_directives):
180 (get_local_using_directives, set_local_using_directives)
181 (get_global_using_directives): Declare.
182 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
183 m_global_using_directives>: New members.
184 (finish_block_internal, prepare_for_building)
185 (reset_symtab_globals, end_symtab_get_static_block)
186 (push_context): Update.
187 (get_local_using_directives, set_local_using_directives)
188 (get_global_using_directives): New functions.
189 (buildsym_init): Update.
191 2018-07-16 Tom Tromey <tom@tromey.com>
193 * xcoffread.c (xcoff_initial_scan): Don't call
195 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
196 * buildsym.h (class scoped_free_pendings): Add constructor.
197 (free_pending_blocks): Don't declare.
198 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
199 (free_pending_blocks): Now static.
201 2018-07-16 Tom Tromey <tom@tromey.com>
203 * buildsym.h (push_subfile, pop_subfile): Update declarations.
204 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
206 (struct subfile_stack): Remove.
207 (subfile_stack): Remove.
208 (push_subfile, pop_subfile, buildsym_init): Update.
210 2018-07-16 Tom Tromey <tom@tromey.com>
212 * buildsym.c (push_subfile): Use gdb_assert.
213 (pop_subfile): Use gdb_assert.
215 2018-07-16 Tom Tromey <tom@tromey.com>
217 * buildsym.h (merge_symbol_lists): Remove.
218 * buildsym.c (merge_symbol_lists): Remove.
220 2018-07-16 Tom Tromey <tom@tromey.com>
222 * stabsread.c (scan_file_globals): Update comment.
223 * stabsread.h (scan_file_globals): Move from buildsym.h.
224 * buildsym.h (scan_file_globals): Move to stabsread.h.
226 2018-07-16 Tom Tromey <tom@tromey.com>
228 * xcoffread.c (xcoff_new_init): Update.
229 * mipsread.c (mipscoff_new_init): Update.
230 * mdebugread.c (mdebug_build_psymtabs): Update.
231 * elfread.c (elf_new_init): Update.
232 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
233 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
234 * buildsym.h (buildsym_new_init): Don't declare.
235 * buildsym.c (buildsym_new_init): Remove.
237 2018-07-16 Tom Tromey <tom@tromey.com>
239 * stabsread.h (within_function): Move from buildsym.h.
240 * stabsread.c (start_stabs): Clear within_function.
241 * coffread.c (coff_start_symtab): Clear within_function.
242 * buildsym.h (within_function): Move to stabsread.h.
243 * buildsym.c (prepare_for_building): Update.
245 2018-07-16 Tom Tromey <tom@tromey.com>
247 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
248 * dwarf2read.c (dwarf2_start_symtab): Don't set
249 processing_gcc_compilation.
250 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
252 2018-07-16 Tom Tromey <tom@tromey.com>
254 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
255 (next_symbol_text_func): Move from buildsym.h.
256 * stabsread.c (hashname): Move from buildsym.c.
257 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
258 (next_symbol_text_func, hashname): Move to stabsread.h.
259 * buildsym.c: Don't include bcache.h
260 (hashname): Move to stasbread.c.
262 2018-07-16 Tom Tromey <tom@tromey.com>
264 * buildsym.h (context_stack_size): Don't declare.
265 * buildsym.c (context_stack_size): New global.
267 2018-07-16 Tom Tromey <tom@tromey.com>
269 * dbxread.c (processing_acc_compilation): New global.
270 * buildsym.h (processing_acc_compilation): Don't declare.
272 2018-07-16 Tom Tromey <tom@tromey.com>
274 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
275 * dbxread.c (read_ofile_symtab): Update.
276 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
277 * buildsym.h (last_source_start_addr): Remove.
278 (set_last_source_start_addr, get_last_source_start_addr):
280 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
282 (struct buildsym_compunit) <m_last_source_start_addr>: New
284 (prepare_for_building): Remove start_addr parameter.
285 (start_symtab, restart_symtab, end_symtab_get_static_block)
286 (end_symtab_with_blockvector): Update.
287 (set_last_source_start_addr, get_last_source_start_addr): New
290 2018-07-16 Tom Tromey <tom@tromey.com>
292 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
294 (have_line_numbers): Remove.
295 (record_line, prepare_for_building, end_symtab_get_static_block)
296 (augment_type_symtab): Update.
298 2018-07-16 Tom Tromey <tom@tromey.com>
300 * buildsym.c (~buildsym_compunit): Free the macro table.
301 (struct buildsym_compunit) <get_macro_table, release_macros>: New
303 <m_pending_macros>: New member.
304 (pending_macros): Remove.
305 (~scoped_free_pendings, get_macro_table, prepare_for_building)
306 (reset_symtab_globals, end_symtab_get_static_block)
307 (end_symtab_with_blockvector, augment_type_symtab)
308 (buildsym_init): Update.
310 2018-07-16 Tom Tromey <tom@tromey.com>
312 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
314 (buildsym_compunit::set_last_source_file): New method.
315 <m_last_source_file>: New member.
316 (prepare_for_building): Remove "name" parameter.
317 (start_symtab, restart_symtab, reset_symtab_globals): Update.
318 (last_source_file): Remove.
319 (set_last_source_file, get_last_source_file): Update.
321 2018-07-16 Tom Tromey <tom@tromey.com>
323 * buildsym.c (prepare_for_building): Add assert.
325 2018-07-16 Tom Tromey <tom@tromey.com>
327 * buildsym.c (~buildsym_compunit): Update.
328 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
329 (start_subfile, patch_subfile_names)
330 (end_symtab_with_blockvector): Update.
332 2018-07-16 Tom Tromey <tom@tromey.com>
334 * buildsym.c (struct buildsym_compunit): Add constructor,
335 destructor, initializers.
336 (start_buildsym_compunit): Remove.
337 (free_buildsym_compunit): Use "delete".
338 (start_symtab, restart_symtab): Use "new".
340 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
342 * symfile.c (set_objfile_default_section_offset): Remove struct
345 2018-07-14 Stafford Horne <shorne@gmail.com>
347 * (Responsible Maintainers): Add myself as or1k maintainer.
349 2018-07-13 Tom Tromey <tom@tromey.com>
351 * symfile.c (set_objfile_default_section_offset): Use extra braces
354 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
356 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
359 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
361 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
362 unittests/cli-utils-selftests.c
363 * unittests/cli-utils-selftests.c: New file.
365 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
367 * NEWS: Mention new commands. Mention change to 'thread apply'.
369 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
371 * thread.c (thr_try_catch_cmd): New function.
372 (thread_apply_all_command): Handle qcs flags.
373 (thread_apply_command): Handle qcs flags.
374 (taas_command): New function.
375 (tfaas_command): New function.
376 (_initialize_thread): Update to setup the new commands 'taas
377 and 'tfaas'. Change doc string for 'thread apply'.
379 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
381 * stack.c: (trailing_outermost_frame): New function, mostly
382 extracted from backtrace_command_1.
383 (leading_innermost_frame): New function.
384 (backtrace_command_1): Update to call trailing_outermost_frame.
385 (frame_apply_command_count): New function.
386 (frame_apply_level_command): New function.
387 (frame_apply_all_command): New function.
388 (frame_apply_command): New function.
389 (faas_command): New function.
390 (frame_cmd_list): New variable.
391 (_initialize_stack): Update to setup the new commands 'frame apply'
394 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
396 * cli-utils.c (number_or_range_parser::get_number): Only handle
397 numbers or convenience var as numbers.
398 (parse_flags): New function.
399 (parse_flags_qcs): New function.
400 (number_or_range_parser::finished): Ensure parsing end is detected
401 before end of string.
402 * cli-utils.h (parse_flags): New function.
403 (parse_flags_qcs): New function.
404 (number_or_range_parser): Remove m_finished bool.
405 (number_or_range_parser::skip_range): Set m_in_range to false.
407 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
409 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
412 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
413 Jan Kratochvil <jan.kratochvil@redhat.com>
414 Paul Fertser <fercerpav@gmail.com>
415 Tsutomu Seki <sekiriki@gmail.com>
416 Pedro Alves <palves@redhat.com>
418 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
419 'unittests/parse-connection-spec-selftests.c'.
420 (COMMON_SFILES): Add 'common/netstuff.c'.
421 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
422 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
423 * common/netstuff.c: New file.
424 * common/netstuff.h: New file.
425 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
426 (wait_for_connect): Update comment. New parameter
427 'gdb::optional<int> sock' instead of 'struct serial *scb'.
428 Use 'sock' directly instead of 'scb->fd'.
429 (try_connect): New function, with code from 'net_open'.
430 (net_open): Rewrite main loop to deal with multiple
431 sockets/addresses. Handle IPv6-style hostnames; implement
432 support for IPv6 connections.
433 * unittests/parse-connection-spec-selftests.c: New file.
435 2018-07-11 Pedro Alves <palves@redhat.com>
438 * remote.c (remote_target::remote_detach_pid): Call
441 2018-07-11 Pedro Alves <palves@redhat.com>
443 * h8300-tdep.c (h8300_gdbarch_init): Remove
444 set_gdbarch_ecoff_reg_to_regnum calls.
446 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
449 * c-typeprint.c (c_type_print_base_struct_union): Don't print
450 offsets/sizes for static members of a class/struct.
452 2018-07-11 Alan Hayward <alan.hayward@arm.com>
454 * target-descriptions.c (tdesc_register_bitsize): Rename.
455 * target-descriptions.h (tdesc_register_bitsize): Likewise.
456 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
457 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
459 2018-07-10 Tom Tromey <tom@tromey.com>
461 * breakpoint.c (moribund_locations): Now static and a
463 (breakpoint_init_inferior, moribund_breakpoint_here_p)
464 (build_bpstat_chain, update_global_location_list)
465 (breakpoint_retire_moribund): Update.
466 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
469 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
471 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
472 (riscv_register_reggroup_p): Use new function, remove unneeded
474 (riscv_push_dummy_call): Extend assert to compare against xlen or
475 flen based on register type.
477 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
479 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
481 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
483 * remote.c (show_hardware_watchpoint_limit): New function.
484 (show_hardware_watchpoint_length_limit): New function.
485 (show_hardware_breakpoint_limit): New function.
486 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
487 where appropriate, update help text.
489 2018-07-09 Tom Tromey <tom@tromey.com>
491 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
492 (CLIBS): Don't mention NAT_CLIBS.
494 2018-07-09 Tom Tromey <tom@tromey.com>
496 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
497 (LIBGDB_OBS, clean mostlyclean): Update.
498 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
500 2018-07-09 Tom Tromey <tom@tromey.com>
502 * Makefile.in (%.c: %.y): Use ECHO_YACC.
503 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
504 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
506 2018-07-09 Tom Tromey <tom@tromey.com>
508 * Makefile.in (ALLDEPFILES): Remove exec.c.
509 (COMMON_OBS): Remove exec.o.
510 (COMMON_SFILES): Add exec.c.
512 2018-07-09 Tom Tromey <tom@tromey.com>
514 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
516 2018-07-09 Tom Tromey <tom@tromey.com>
518 * Makefile.in (clean mostlyclean): Remove stamp-version.
519 (version.c): Depend on stamp-version.
520 (stamp-version): New rule, from version.c rule.
522 2018-07-09 Tom Tromey <tom@tromey.com>
524 * Makefile.in (init.c): Depend on stamp-init.
525 (stamp-init): New rule, from init.c rule.
526 (clean mostlyclean): Remove stamp-init.
528 2018-07-09 Tom Tromey <tom@tromey.com>
530 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
531 SUBDIR_GCC_COMPILE_SRCS.
533 2018-07-09 Tom Tromey <tom@tromey.com>
535 * Makefile.in (init.c): Remove some unused sed rules.
537 2018-07-09 Tom Tromey <tom@tromey.com>
539 * Makefile.in (TSOBS): Remove.
540 (INIT_FILES): Update.
541 (LIBGDB_OBS): Update.
542 (COMMON_SFILES): Add inflow.c.
543 (SFILES): Remove inflow.c.
545 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
547 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
549 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
551 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
552 get_saveloc_name, is_signal_frame_name, step_name,
553 init_remote_name, create_addr_space_name,
554 destroy_addr_space_name, search_unwind_table_name,
555 find_dyn_list_name): Constify.
557 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
559 * darwin-nat.c (darwin_pthread_kill): New function.
560 (darwin_resume_thread): Use darwin_pthread_kill.
562 2018-07-05 Tom de Vries <tdevries@suse.de>
564 * macroexp.c (macro_buffer) <operator=>: New member function.
566 2018-07-04 Tom Tromey <tom@tromey.com>
568 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
570 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
572 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
573 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
577 2018-07-04 Joel Brobecker <brobecker@adacore.com>
579 * NEWS: Create a new section for the next release branch.
580 Rename the section of the current branch, now that it has
583 2018-07-04 Joel Brobecker <brobecker@adacore.com>
585 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
586 * version.in: Bump version to 8.2.50.DATE-git.
588 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
589 Pedro Alves <palves@redhat.com>
591 * linux-nat.c (linux_init_ptrace): Rename to ...
592 (linux_init_ptrace_procfs): ... this. Call
593 linux_proc_init_warnings.
594 (linux_nat_target::post_attach)
595 (linux_nat_target::post_startup_inferior): Adjust.
596 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
597 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
599 2018-07-04 Tom de Vries <tdevries@suse.de>
601 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
603 (read_comp_unit_head): ... here.
605 2018-07-03 Tom Tromey <tom@tromey.com>
607 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
608 (stop_tracing, tstatus_command)
609 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
610 (print_one_static_tracepoint_marker): Update.
611 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
613 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
615 (all_tracepoints, static_tracepoints_here): Return std::vector.
617 2018-07-03 Tom Tromey <tom@tromey.com>
619 * common/ptid.c (ptid_equal): Remove.
620 * common/ptid.h (ptid_equal): Don't declare.
621 * ada-tasks.c: Update.
622 * breakpoint.c: Update.
623 * common/agent.c: Update.
625 * darwin-nat-info.c: Update.
626 * darwin-nat.c: Update.
628 * dtrace-probe.c: Update.
629 * dummy-frame.c: Update.
630 * fbsd-nat.c: Update.
632 * gdbthread.h: Update.
634 * go32-nat.c: Update.
635 * inf-loop.c: Update.
636 * inf-ptrace.c: Update.
641 * linux-fork.c: Update.
642 * linux-nat.c: Update.
643 * linux-thread-db.c: Update.
644 * mi/mi-cmd-var.c: Update.
645 * mi/mi-interp.c: Update.
646 * mi/mi-main.c: Update.
647 * nto-procfs.c: Update.
648 * ppc-linux-tdep.c: Update.
650 * python/py-inferior.c: Update.
651 * python/py-record-btrace.c: Update.
652 * python/py-record.c: Update.
653 * ravenscar-thread.c: Update.
654 * regcache.c: Update.
655 * remote-sim.c: Update.
657 * sol-thread.c: Update.
660 * tui/tui-stack.c: Update.
662 * windows-nat.c: Update.
663 * windows-tdep.c: Update.
665 2018-07-03 Tom Tromey <tom@tromey.com>
667 * common/ptid.c (ptid_match): Remove.
668 * common/ptid.h (ptid_match): Don't declare.
669 * fbsd-nat.c: Update.
672 * linux-nat.c: Update.
673 * record-btrace.c: Update.
674 * regcache.c: Update.
677 2018-07-03 Tom Tromey <tom@tromey.com>
679 * common/ptid.c (ptid_tid_p): Remove.
680 * common/ptid.h (ptid_tid_p): Don't declare.
681 * sol-thread.c: Update.
683 2018-07-03 Tom Tromey <tom@tromey.com>
685 * common/ptid.c (ptid_lwp_p): Remove.
686 * common/ptid.h (ptid_lwp_p): Don't declare.
687 * fbsd-nat.c: Update.
688 * linux-nat.c: Update.
689 * nat/linux-procfs.c: Update.
690 * nat/x86-linux-dregs.c: Update.
691 * sol-thread.c: Update.
693 2018-07-03 Tom Tromey <tom@tromey.com>
695 * common/ptid.c (ptid_is_pid): Remove.
696 * common/ptid.h (ptid_is_pid): Don't declare.
698 * linux-nat.c: Update.
699 * mi/mi-interp.c: Update.
703 2018-07-03 Tom Tromey <tom@tromey.com>
705 * common/ptid.c (ptid_get_tid): Remove.
706 * common/ptid.h (ptid_get_tid): Don't declare.
707 * ada-tasks.c: Update.
708 * aix-thread.c: Update.
709 * bsd-uthread.c: Update.
710 * darwin-nat.c: Update.
711 * fbsd-nat.c: Update.
712 * i386-darwin-nat.c: Update.
714 * linux-tdep.c: Update.
715 * nto-procfs.c: Update.
716 * ppc-ravenscar-thread.c: Update.
717 * python/py-infthread.c: Update.
718 * ravenscar-thread.c: Update.
719 * sol-thread.c: Update.
720 * sparc-ravenscar-thread.c: Update.
721 * windows-nat.c: Update.
723 2018-07-03 Tom Tromey <tom@tromey.com>
725 * common/ptid.c (ptid_get_lwp): Remove.
726 * common/ptid.h (ptid_get_lwp): Don't declare.
727 * aarch64-linux-nat.c: Update.
728 * ada-tasks.c: Update.
729 * aix-thread.c: Update.
730 * amd64-linux-nat.c: Update.
731 * arm-linux-nat.c: Update.
733 * fbsd-nat.c: Update.
734 * fbsd-tdep.c: Update.
736 * i386-cygwin-tdep.c: Update.
737 * i386-gnu-nat.c: Update.
738 * i386-linux-nat.c: Update.
739 * ia64-linux-nat.c: Update.
740 * inf-ptrace.c: Update.
742 * linux-fork.c: Update.
743 * linux-nat.c: Update.
744 * linux-tdep.c: Update.
745 * linux-thread-db.c: Update.
746 * mips-linux-nat.c: Update.
747 * nat/aarch64-linux-hw-point.c: Update.
748 * nat/aarch64-linux.c: Update.
749 * nat/linux-btrace.c: Update.
750 * nat/linux-osdata.c: Update.
751 * nat/linux-procfs.c: Update.
752 * nat/x86-linux-dregs.c: Update.
753 * obsd-nat.c: Update.
754 * ppc-fbsd-nat.c: Update.
755 * ppc-linux-nat.c: Update.
757 * python/py-infthread.c: Update.
758 * ravenscar-thread.c: Update.
760 * s390-linux-nat.c: Update.
761 * sol-thread.c: Update.
762 * sol2-tdep.c: Update.
763 * spu-linux-nat.c: Update.
764 * x86-linux-nat.c: Update.
765 * xtensa-linux-nat.c: Update.
767 2018-07-03 Tom Tromey <tom@tromey.com>
769 * common/ptid.c (ptid_get_pid): Remove.
770 * common/ptid.h (ptid_get_pid): Don't declare.
771 * aarch64-linux-nat.c: Update.
772 * ada-lang.c: Update.
773 * aix-thread.c: Update.
774 * alpha-bsd-nat.c: Update.
775 * amd64-fbsd-nat.c: Update.
776 * amd64-linux-nat.c: Update.
777 * arm-linux-nat.c: Update.
778 * arm-nbsd-nat.c: Update.
780 * break-catch-syscall.c: Update.
781 * breakpoint.c: Update.
782 * bsd-uthread.c: Update.
785 * darwin-nat.c: Update.
786 * fbsd-nat.c: Update.
787 * fbsd-tdep.c: Update.
790 * hppa-nbsd-nat.c: Update.
791 * hppa-obsd-nat.c: Update.
792 * i386-fbsd-nat.c: Update.
793 * ia64-linux-nat.c: Update.
794 * inf-ptrace.c: Update.
796 * inferior.c: Update.
797 * inferior.h: Update.
800 * linux-fork.c: Update.
801 * linux-nat.c: Update.
802 * linux-tdep.c: Update.
803 * linux-thread-db.c: Update.
804 * m68k-bsd-nat.c: Update.
805 * mi/mi-interp.c: Update.
806 * mi/mi-main.c: Update.
807 * mips-linux-nat.c: Update.
808 * mips-nbsd-nat.c: Update.
809 * mips64-obsd-nat.c: Update.
810 * nat/aarch64-linux-hw-point.c: Update.
811 * nat/aarch64-linux.c: Update.
812 * nat/linux-btrace.c: Update.
813 * nat/linux-osdata.c: Update.
814 * nat/linux-procfs.c: Update.
815 * nat/x86-linux-dregs.c: Update.
816 * nto-procfs.c: Update.
817 * obsd-nat.c: Update.
818 * ppc-linux-nat.c: Update.
819 * ppc-nbsd-nat.c: Update.
820 * ppc-obsd-nat.c: Update.
821 * proc-service.c: Update.
823 * python/py-inferior.c: Update.
824 * python/py-infthread.c: Update.
825 * ravenscar-thread.c: Update.
827 * remote-sim.c: Update.
829 * rs6000-nat.c: Update.
830 * s390-linux-nat.c: Update.
831 * sh-nbsd-nat.c: Update.
832 * sol-thread.c: Update.
833 * sparc-nat.c: Update.
834 * sparc64-tdep.c: Update.
835 * spu-linux-nat.c: Update.
836 * spu-tdep.c: Update.
837 * target-debug.h: Update.
840 * tid-parse.c: Update.
841 * tracefile-tfile.c: Update.
842 * vax-bsd-nat.c: Update.
843 * windows-nat.c: Update.
844 * x86-linux-nat.c: Update.
847 2018-07-03 Tom Tromey <tom@tromey.com>
849 * common/ptid.c (pid_to_ptid): Remove.
850 * common/ptid.h (pid_to_ptid): Don't declare.
851 * aix-thread.c: Update.
852 * arm-linux-nat.c: Update.
853 * common/ptid.c: Update.
854 * common/ptid.h: Update.
857 * darwin-nat.c: Update.
858 * fbsd-nat.c: Update.
859 * fork-child.c: Update.
861 * go32-nat.c: Update.
862 * inf-ptrace.c: Update.
864 * inferior.c: Update.
866 * linux-fork.c: Update.
867 * linux-nat.c: Update.
868 * nat/aarch64-linux-hw-point.c: Update.
869 * nat/fork-inferior.c: Update.
870 * nat/x86-linux-dregs.c: Update.
871 * nto-procfs.c: Update.
872 * obsd-nat.c: Update.
874 * progspace.c: Update.
876 * rs6000-nat.c: Update.
877 * s390-linux-nat.c: Update.
878 * sol-thread.c: Update.
879 * spu-linux-nat.c: Update.
882 * tracefile-tfile.c: Update.
883 * windows-nat.c: Update.
885 2018-07-03 Tom Tromey <tom@tromey.com>
887 * common/ptid.h (ptid_build): Don't declare.
888 * common/ptid.c (ptid_build): Remove.
889 * aix-thread.c: Update.
891 * bsd-uthread.c: Update.
892 * common/agent.c: Update.
893 * common/ptid.c: Update.
894 * common/ptid.h: Update.
896 * darwin-nat.c: Update.
897 * fbsd-nat.c: Update.
899 * linux-fork.c: Update.
900 * linux-nat.c: Update.
901 * linux-thread-db.c: Update.
902 * nat/linux-osdata.c: Update.
903 * nat/linux-procfs.c: Update.
904 * nto-procfs.c: Update.
905 * obsd-nat.c: Update.
906 * proc-service.c: Update.
908 * ravenscar-thread.c: Update.
909 * remote-sim.c: Update.
911 * sol-thread.c: Update.
913 * windows-nat.c: Update.
915 2018-07-03 Tom Tromey <tom@tromey.com>
917 * infrun.c (follow_exec): Use exit_inferior_silent.
918 * inferior.c (exit_inferior_num_silent): Remove.
919 * inferior.h (exit_inferior_num_silent): Don't declare.
921 2018-07-03 Tom Tromey <tom@tromey.com>
924 * darwin-nat.c (darwin_attach_pid): Reset inferior and
925 inferior_ptid on error.
927 2018-07-02 Maciej W. Rozycki <macro@mips.com>
928 Simon Marchi <simon.marchi@polymtl.ca>
931 * disasm.h (gdb_disassembler): Add
932 `m_disassembler_options_holder'. member
933 * disasm.c (get_all_disassembler_options): New function.
934 (gdb_disassembler::gdb_disassembler): Use it.
935 (gdb_buffered_insn_length_init_dis): Likewise.
936 (gdb_buffered_insn_length): Adjust accordingly.
937 (set_disassembler_options): Handle options with arguments.
938 (show_disassembler_options_sfunc): Likewise. Add a leading new
939 line if showing options with descriptions.
940 (disassembler_options_completer): Adapt to using the
941 `disasm_options_and_args_t' structure.
942 * mips-tdep.c (mips_disassembler_options): New variable.
943 (mips_disassembler_options_o32): Likewise.
944 (mips_disassembler_options_n32): Likewise.
945 (mips_disassembler_options_n64): Likewise.
946 (gdb_print_insn_mips): Don't set `disassembler_options'.
947 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
949 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
950 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
951 `gdbarch_disassembler_options_implicit' and
952 `gdbarch_valid_disassembler_options'.
953 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
954 `disasm_options_and_args_t' structure.
955 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
957 (valid_disassembler_options): Switch from `disasm_options_t' to
958 the `disasm_options_and_args_t' structure.
959 * NEWS: Document `set disassembler-options' support for the MIPS
961 * gdbarch.h: Regenerate.
962 * gdbarch.c: Regenerate.
964 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
966 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
968 2018-06-29 Joel Brobecker <brobecker@adacore.com>
970 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
971 parameter in call to amd64_target_description.
972 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
973 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
974 (amd64fbsd_init_abi): Likewise.
975 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
976 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
977 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
978 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
980 2018-06-29 Pedro Alves <palves@redhat.com>
982 * gdb/amd64-tdep.h (amd64_create_target_description): Add
983 "segments" parameter.
984 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
985 (_initialize_amd64_tdep): Update call to
986 amd64_create_target_description.
987 (amd64_target_description): Add "segments" parameter. Adjust
988 the implementation to use it.
989 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
990 call to amd64_create_target_description.
991 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
992 * gdb/arch/amd64.h (amd64_create_target_description): Add
994 * gdb/arch/amd64.c (amd64_create_target_description): Add
995 "segments" parameter. Call create_feature_i386_64bit_segments
996 only if SEGMENTS is true.
997 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
998 call to amd64_create_target_description.
1000 2018-06-29 Pedro Alves <palves@redhat.com>
1002 * thread.c (thread_target_id_str): New, factored out from ...
1003 (print_thread_info_1): ... here. Use it to compute the max
1004 "Target Id" column width.
1006 2018-06-29 Pedro Alves <palves@redhat.com>
1008 * remote.c (remote_target::extra_thread_info): Delete
1009 'display_buf' and 'n' locals. from the cache, regardless of
1010 packet mechanims is in use. Use cache for qThreadExtra and qP
1013 2018-06-29 Pedro Alves <palves@redhat.com>
1015 * blockframe.c (find_pc_sect_containing_function): New function.
1016 * breakpoint.c (print_breakpoint_location): Don't call
1017 find_pc_sect_function.
1018 * linespec.c (create_sals_line_offset): Record the location's
1020 * linespec.c (convert_address_location_to_sals): Fill in sal's
1021 symbol with find_pc_sect_containing_function.
1022 * symtab.c (find_function_start_sal): Rename to ...
1023 (find_function_start_sal_1): ... this.
1024 (find_function_start_sal): Reimplement as wrapper around
1025 find_function_start_sal_1, and use
1026 find_pc_sect_containing_function to fill in the sal's symbol.
1027 (find_function_start_sal(symbol*, bool)): Adjust.
1028 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1030 (find_pc_sect_containing_function): Declare.
1032 2018-06-29 Pedro Alves <palves@redhat.com>
1034 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1035 true if the the location has no symbol.
1037 2018-06-28 Tom Tromey <tom@tromey.com>
1039 * NEWS: Mention --enable-codesign.
1040 * silent-rules.mk (ECHO_SIGN): New variable.
1041 * configure.ac: Add --enable-codesign.
1042 * configure: Rebuild.
1043 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1044 (gdb$(EXEEXT)): Optionally invoke codesign.
1046 2018-06-28 Pedro Alves <palves@redhat.com>
1048 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1050 (switch_to_thread_no_regs): Adjust comment.
1051 * infcmd.c (stop_pc): Delete.
1052 (post_create_inferior, info_program_command): Replace references
1053 to stop_pc with references to thread_info->suspend.stop_pc.
1054 * inferior.h (stop_pc): Delete declaration.
1055 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1056 (handle_inferior_event_1, handle_signal_stop)
1057 (process_event_stop_test, keep_going_stepped_thread)
1058 (handle_step_into_function, handle_step_into_function_backward)
1059 (print_stop_location): Replace references to stop_pc with
1060 references to thread_info->suspend.stop_pc.
1061 (struct infcall_suspend_state) <stop_pc>: Delete field.
1062 (save_infcall_suspend_state, restore_infcall_suspend_state):
1063 Remove references to inf_stat->stop_pc.
1064 * linux-fork.c (fork_load_infrun_state): Likewise.
1065 * record-btrace.c (record_btrace_set_replay): Likewise.
1066 * record-full.c (record_full_goto_entry): Likewise.
1067 * remote.c (print_one_stopped_thread): Likewise.
1068 * target.c (target_resume): Extend comment.
1069 * thread.c (set_executing_thread): New.
1070 (set_executing): Use it.
1071 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1072 Remove references to stop_pc.
1074 2018-06-28 Pedro Alves <palves@redhat.com>
1076 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1077 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1079 2018-06-28 Tom Tromey <tom@tromey.com>
1081 * coffread.c (coff_symfile_finish): Update.
1082 * xcoffread.c (xcoff_symfile_finish): Update.
1083 * elfread.c (elf_symfile_finish): Update.
1084 * symfile.h (dwarf2_free_objfile): Don't declare.
1085 * dwarf2read.c (_initialize_dwarf2_read): Use
1086 register_objfile_data_with_cleanup.
1087 (dwarf2_free_objfile): Now static. Change signature.
1089 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1091 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1092 option "-o" to add-symbol-file-load to add an offset to each
1093 section's load address.
1094 * symfile.c (set_objfile_default_section_offset): New function.
1096 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1098 * symfile.c (add_symbol_file_command): Make sure that sections
1099 with the same name are sorted in the same order.
1101 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1103 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1104 require the second argument. If omitted, load sections at the
1105 addresses specified in the file.
1107 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1109 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1110 (_initialize_symfile): Add option "-o" to symbol-file to add an
1111 offset to each section of the symbol file.
1113 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1115 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1117 2018-06-27 Tom Tromey <tom@tromey.com>
1119 * stack.c (_initialize_stack): Update "func" help text.
1121 2018-06-27 Tom Tromey <tom@tromey.com>
1123 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1125 (unwind_infopy_str, pyuw_create_unwind_info)
1126 (unwind_infopy_add_saved_register, pyuw_sniffer)
1127 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1129 (struct saved_reg): Add constructor.
1130 <value>: Now a gdbpy_ref<>.
1132 2018-06-27 Tom Tromey <tom@tromey.com>
1134 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1136 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1138 * gdb-gdb.py.in: Format using autopep8.
1140 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1142 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1143 (type_lookup_function): Recognize CORE_ADDR values.
1145 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1147 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1150 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1152 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1155 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1157 * gdb-gdb.py: Move to...
1158 * gdb-gdb.py.in: ... here.
1159 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1160 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1162 (distclean): Remove gdb-gdb.py when cleaning.
1163 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1164 * configure: Re-generate.
1166 2018-06-27 Pedro Alves <palves@redhat.com>
1168 * proc-service.c (get_ps_regcache): New.
1169 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1170 (ps_lsetfpregs): Use it.
1172 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1175 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1176 (dwarf_decode_lines_1): Adjust.
1178 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1180 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1182 <info_proc>: Likewise.
1184 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1186 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1187 to windows_fetch_one_register, and only handle the case of
1188 fetching one register. Move the code that reloads the context
1189 and iterates over all registers if R is negative to...
1190 (windows_nat_target::fetch_registers): ... here.
1191 (do_windows_store_inferior_registers): Rename to
1192 windows_store_one_register, and only handle the case of storing
1193 one register. Move the code that handles the case where r is
1195 (windows_nat_target::store_registers) ... here.
1197 2018-06-26 Tom Tromey <tom@tromey.com>
1200 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1201 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1203 (rust_internal_print_type): Add podata parameter.
1204 (rust_print_type): Update.
1206 2018-06-26 Tom Tromey <tom@tromey.com>
1208 * typeprint.h (struct print_offset_data) <update, finish,
1209 maybe_print_hole>: New methods.
1210 <indentation>: New constant.
1211 * typeprint.c (print_offset_data::indentation): Define.
1212 (print_offset_data::maybe_print_hole, print_offset_data::update)
1213 (print_offset_data::finish): Move from c-typeprint.c and rename.
1214 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1215 (print_spaces_filtered_with_print_options): Update.
1216 (c_print_type_union_field_offset, maybe_print_hole)
1217 (c_print_type_struct_field_offset): Move to typeprint.c and
1219 (c_type_print_base_struct_union): Update.
1221 2018-06-25 Pedro Alves <palves@redhat.com>
1223 * gdbthread.h (thread_info_ref, delete_thread)
1224 (delete_thread_silent, first_thread_of_inferior)
1225 (any_thread_of_inferior, switch_to_thread)
1226 (enable_thread_stack_temporaries)
1227 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1228 (get_last_thread_stack_temporary)
1229 (value_in_thread_stack_temporaries, can_access_registers_thread):
1230 Spell out "struct thread_info" instead of just "thread_info".
1231 * inferior.h (notice_new_inferior): Likewise.
1233 2018-06-25 Pedro Alves <palves@redhat.com>
1235 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1236 pass thread_info pointer to delete_thread.
1237 (windows_nat_target::detach): Pass inferior pointer to
1239 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1241 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1242 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1243 and pass a thread_info pointer to delete_thread.
1244 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1245 pass thread_info pointer to delete_thread.
1246 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1247 delete_thread_silent call.
1248 * procfs.c (procfs_target::detach): Pass inferior pointer to
1250 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1251 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1252 delete_thread_silent call.
1253 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1254 pass thread_info pointer to delete_thread.
1255 (windows_nat_target::detach): Pass inferior pointer to
1258 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1260 * regcache.c (readable_regcache::read_part): Fix asserts.
1261 (reg_buffer::raw_collect_part): New function.
1262 (regcache::write_part): Fix asserts.
1263 (reg_buffer::raw_supply_part): New function.
1264 (regcache::transfer_regset_register): New helper function.
1265 (regcache::transfer_regset): Call new functions.
1266 (regcache_supply_regset): Use gdb_byte*.
1267 (regcache::supply_regset): Likewise.
1268 (regcache_collect_regset): Likewise.
1269 (regcache::collect_regset): Likewise.
1270 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1271 (reg_buffer::raw_supply_part): Likewise.
1272 (regcache::transfer_regset_register): Likewise.
1273 (regcache::transfer_regset): Use gdb_byte*.
1275 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1277 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1279 2018-06-21 Pedro Alves <palves@redhat.com>
1281 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1282 instead of a ptid_t. All callers adjusted.
1283 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1285 (print_ada_task_info, display_current_task_id, task_command_1):
1287 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1289 (breakpoint_kind): Adjust.
1290 (remove_breakpoints_pid): Rename to ...
1291 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1292 pointer. All callers adjusted.
1293 (bpstat_clear_actions): Use inferior_thread.
1294 (get_bpstat_thread): New.
1295 (bpstat_do_actions): Use it.
1296 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1297 to take a thread_info pointer. All callers adjusted.
1298 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1299 (breakpoint_re_set_thread): Use inferior_thread.
1300 * breakpoint.h (struct inferior): Forward declare.
1301 (bpstat_stop_status): Update.
1302 (remove_breakpoints_pid): Delete.
1303 (remove_breakpoints_inf): New.
1304 * bsd-uthread.c (bsd_uthread_target::wait)
1305 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1306 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1307 (maint_btrace_packet_history_cmd)
1308 (maint_btrace_clear_packet_history_cmd): Adjust.
1309 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1311 * cli/cli-interp.c: Include "inferior.h".
1312 * common/refcounted-object.h (struct
1313 refcounted_object_ref_policy): New.
1314 * compile/compile-object-load.c: Include gdbthread.h.
1315 (store_regs): Use inferior_thread.
1316 * corelow.c (core_target::close): Use current_inferior.
1317 (core_target_open): Adjust to use first_thread_of_inferior and use
1318 the current inferior.
1319 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1320 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1321 <thread>: ... this new field. All references adjusted.
1322 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1323 Take a thread_info pointer instead of a ptid_t.
1324 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1325 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1326 thread_info pointer instead of a ptid_t.
1327 * elfread.c: Include "inferior.h".
1328 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1329 Use inferior_thread.
1330 * eval.c (evaluate_subexp): Likewise.
1331 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1333 * gdb_proc_service.h (struct thread_info): Forward declare.
1334 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1335 <thread>: ... this new field. All references adjusted.
1336 * gdbarch.h, gdbarch.c: Regenerate.
1337 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1338 'thread' parameter. All implementations and callers adjusted.
1339 * gdbthread.h (thread_info) <set_running>: New method.
1340 (delete_thread, delete_thread_silent): Take a thread_info pointer
1342 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1343 (first_thread_of_process): Delete, replaced by ...
1344 (first_thread_of_inferior): ... this new function. All callers
1346 (any_live_thread_of_process): Delete, replaced by ...
1347 (any_live_thread_of_inferior): ... this new function. All callers
1349 (switch_to_thread, switch_to_no_thread): Declare.
1350 (is_executing): Delete.
1351 (enable_thread_stack_temporaries): Update comment.
1352 <enable_thread_stack_temporaries>: Take a thread_info pointer
1353 instead of a ptid_t. Incref the thread.
1354 <~enable_thread_stack_temporaries>: Decref the thread.
1357 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1358 (get_last_thread_stack_temporary)
1359 (value_in_thread_stack_temporaries, can_access_registers_thread):
1360 Take a thread_info pointer instead of a ptid_t. All callers
1362 * infcall.c (get_call_return_value): Use inferior_thread.
1363 (run_inferior_call): Work with thread pointers instead of ptid_t.
1364 (call_function_by_hand_dummy): Work with thread pointers instead
1365 of ptid_t. Use thread_info_ref.
1366 * infcmd.c (proceed_thread_callback): Access thread's state
1368 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1369 access thread's state directly.
1370 (continue_command): Use inferior_thread.
1371 (info_program_command): Use find_thread_ptid and access thread
1373 (proceed_after_attach_callback): Use thread state directly.
1374 (notice_new_inferior): Take a thread_info pointer instead of a
1375 ptid_t. All callers adjusted.
1376 (exit_inferior): Take an inferior pointer instead of a pid. All
1378 (exit_inferior_silent): New.
1379 (detach_inferior): Delete.
1380 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1381 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1382 (detach_inferior_command, kill_inferior_command): Use
1383 find_inferior_id instead of valid_gdb_inferior_id and
1384 gdb_inferior_id_to_pid.
1385 (inferior_command): Use inferior and thread pointers.
1386 * inferior.h (struct thread_info): Forward declare.
1387 (notice_new_inferior): Take a thread_info pointer instead of a
1388 ptid_t. All callers adjusted.
1389 (detach_inferior): Delete declaration.
1390 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1391 instead of a pid. All callers adjusted.
1392 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1393 (valid_gdb_inferior_id): Delete.
1394 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1395 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1396 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1398 <inf>: ... this new field.
1399 <step_ptid>: Delete, replaced by ...
1400 <step_thread>: ... this new field.
1401 (get_displaced_stepping_state): Take an inferior pointer instead
1402 of a pid. All callers adjusted.
1403 (displaced_step_in_progress_any_inferior): Adjust.
1404 (displaced_step_in_progress_thread): Take a thread pointer instead
1405 of a ptid_t. All callers adjusted.
1406 (displaced_step_in_progress, add_displaced_stepping_state): Take
1407 an inferior pointer instead of a pid. All callers adjusted.
1408 (get_displaced_step_closure_by_addr): Adjust.
1409 (remove_displaced_stepping_state): Take an inferior pointer
1410 instead of a pid. All callers adjusted.
1411 (displaced_step_prepare_throw, displaced_step_prepare)
1412 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1413 All callers adjusted.
1414 (start_step_over): Adjust.
1415 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1416 displaced step queue.
1417 (do_target_resume): Adjust.
1418 (fetch_inferior_event): Use inferior_thread.
1419 (context_switch, get_inferior_stop_soon): Take an
1420 execution_control_state pointer instead of a ptid_t. All callers
1422 (switch_to_thread_cleanup): Delete.
1423 (stop_all_threads): Use scoped_restore_current_thread.
1424 * inline-frame.c: Include "gdbthread.h".
1425 (inline_state) <inline_state>: Take a thread pointer instead of a
1426 ptid_t. All callers adjusted.
1427 <ptid>: Delete, replaced by ...
1428 <thread>: ... this new field.
1429 (find_inline_frame_state): Take a thread pointer instead of a
1430 ptid_t. All callers adjusted.
1431 (skip_inline_frames, step_into_inline_frame)
1432 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1433 pointer instead of a ptid_t. All callers adjusted.
1434 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1435 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1436 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1438 * linux-nat.c (get_detach_signal): Likewise.
1439 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1440 (thread_db_notice_clone): Adjust.
1441 (thread_db_find_new_threads_silently)
1442 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1443 a thread pointer instead of a ptid_t. All callers adjusted.
1444 * mi/mi-cmd-var.c: Include "inferior.h".
1445 (mi_cmd_var_update_iter): Update to use thread pointers.
1446 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1448 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1450 (mi_output_running): ... this new function.
1451 (mi_on_resume_1): Adjust to use it.
1452 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1453 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1455 (interrupt_thread_callback): : Adjust to use thread and inferior
1457 * proc-service.c: Include "gdbthread.h".
1458 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1459 * progspace-and-thread.c: Include "inferior.h".
1460 * progspace.c: Include "inferior.h".
1461 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1462 hold a reference to an inferior_object.
1463 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1465 * python/py-inferior.c (struct inferior_object): Give the type a
1466 tag name instead of a typedef.
1467 (python_on_normal_stop): No need to check if the current thread is
1469 (inferior_to_inferior_object): Change return type to
1470 inferior_object. All callers adjusted.
1471 (find_thread_object): Delete, bits factored out to ...
1472 (thread_to_thread_object): ... this new function.
1473 * python/py-infthread.c (create_thread_object): Use
1474 inferior_to_inferior_object.
1475 (thpy_is_stopped): Use thread pointer directly.
1476 (gdbpy_selected_thread): Use inferior_thread.
1477 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1478 field, replaced with ...
1479 <thread>: ... this new field. All users adjusted.
1480 (btpy_insn_or_gap_new): Drop const.
1481 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1483 * python/py-record.c: Include "gdbthread.h".
1484 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1485 a ptid_t. All callers adjusted.
1486 (gdbpy_current_recording): Use inferior_thread.
1487 * python/py-record.h (recpy_record_object) <ptid>: Delete
1488 field, replaced with ...
1489 <thread>: ... this new field. All users adjusted.
1490 (recpy_element_object) <ptid>: Delete
1491 field, replaced with ...
1492 <thread>: ... this new field. All users adjusted.
1493 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1494 a ptid_t. All callers adjusted.
1495 * python/py-threadevent.c: Include "gdbthread.h".
1496 (get_event_thread): Use thread_to_thread_object.
1497 * python/python-internal.h (struct inferior_object): Forward
1499 (find_thread_object, find_inferior_object): Delete declarations.
1500 (thread_to_thread_object, inferior_to_inferior_object): New
1502 * record-btrace.c: Include "inferior.h".
1503 (require_btrace_thread): Use inferior_thread.
1504 (record_btrace_frame_sniffer)
1505 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1506 (get_thread_current_frame): Use scoped_restore_current_thread and
1508 (get_thread_current_frame): Use thread pointer directly.
1509 (record_btrace_replay_at_breakpoint): Use thread's inferior
1511 * record-full.c: Include "inferior.h".
1512 * regcache.c: Include "gdbthread.h".
1513 (get_thread_arch_regcache): Use the inferior's address space
1515 (get_thread_regcache, registers_changed_thread): New.
1516 * regcache.h (get_thread_regcache(thread_info *thread)): New
1518 (registers_changed_thread): New.
1519 (remote_target) <remote_detach_1>: Swap order of parameters.
1520 (remote_add_thread): <remote_add_thread>: Return the new thread.
1521 (get_remote_thread_info(ptid_t)): New overload.
1522 (remote_target::remote_notice_new_inferior): Use thread pointers
1524 (remote_target::process_initial_stop_replies): Use
1525 thread_info::set_running.
1526 (remote_target::remote_detach_1, remote_target::detach)
1527 (extended_remote_target::detach): Adjust.
1528 * stack.c (frame_show_address): Use inferior_thread.
1529 * target-debug.h (target_debug_print_thread_info_pp): New.
1530 * target-delegates.c: Regenerate.
1531 * target.c (default_thread_address_space): Delete.
1532 (memory_xfer_partial_1): Use current_inferior.
1533 (target_detach): Use current_inferior.
1534 (target_thread_address_space): Delete.
1535 (generic_mourn_inferior): Use current_inferior.
1536 * target.h (struct target_ops) <thread_address_space>: Delete.
1537 (target_thread_address_space): Delete.
1538 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1540 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1541 thread pointer instead of a ptid_t. Adjust all callers.
1542 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1543 (first_thread_of_process): Delete, replaced by ...
1544 (first_thread_of_inferior): ... this new function. All callers
1546 (any_thread_of_process): Rename to ...
1547 (any_thread_of_inferior): ... this, and take an inferior pointer.
1548 (any_live_thread_of_process): Rename to ...
1549 (any_live_thread_of_inferior): ... this, and take an inferior
1551 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1552 (value_in_thread_stack_temporaries)
1553 (get_last_thread_stack_temporary): Take a thread pointer instead
1554 of a ptid_t. Adjust all callers.
1555 (thread_info::set_running): New.
1556 (validate_registers_access): Use inferior_thread.
1557 (can_access_registers_ptid): Rename to ...
1558 (can_access_registers_thread): ... this, and take a thread
1560 (print_thread_info_1): Adjust to compare thread pointers instead
1562 (switch_to_no_thread, switch_to_thread): Make extern.
1563 (scoped_restore_current_thread::~scoped_restore_current_thread):
1564 Use m_thread pointer directly.
1565 (scoped_restore_current_thread::scoped_restore_current_thread):
1566 Use inferior_thread.
1567 (thread_command): Use thread pointer directly.
1568 (thread_num_make_value_helper): Use inferior_thread.
1569 * top.c (execute_command): Use inferior_thread.
1570 * tui/tui-interp.c: Include "inferior.h".
1571 * varobj.c (varobj_create): Use inferior_thread.
1572 (value_of_root_1): Use find_thread_global_id instead of
1573 global_thread_id_to_ptid.
1575 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1577 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1579 (regcache::write_part): Likewise.
1580 (readable_regcache::cooked_read_part): Update comment.
1581 (readable_regcache::cooked_write_part): Likewise.
1582 * regcache.h: (readable_regcache::read_part): Likewise.
1583 (regcache::write_part): Likewise.
1585 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1586 Dirk Schubert <dirk.schubert@arm.com>
1588 * aarch64-linux-nat.c (post_attach): New.
1589 (aarch64_linux_nat_target::post_attach): Override post_attach to
1590 record the number of hardware debug registers.
1592 2018-06-20 Tom Tromey <tom@tromey.com>
1594 * python/py-param.c (add_setshow_generic): Make parameters const.
1595 (parmpy_init): Update.
1597 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1599 * regcache.h (regcache_cooked_read_ftype): Rename to...
1600 (register_read_ftype): ...this, change type to function_view.
1601 (class reg_buffer) <save>: Remove src parameter.
1602 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1603 parameter non-const in first overload. Remove src parameter in
1605 * regcache.c (do_cooked_read): Remove.
1606 (readonly_detached_regcache::readonly_detached_regcache): Make
1607 parameter non-const, adjust call to other constructor.
1608 (reg_buffer::save): Remove src parameter.
1609 * frame.c (do_frame_register_read): Remove.
1610 (frame_save_as_regcache): Use lambda function.
1611 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1612 parameter to ppu2spu_data *.
1613 (ppu2spu_sniffer): Use lambda function.
1615 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1617 * record-full.c (record_full_target::insert_breakpoint): Remove
1618 "struct" keyword, add const.
1620 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1622 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1623 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1624 * configure.ac: Remove AC_PREREQ, add missing quoting.
1625 * gnulib/configure.ac: Modernize usage of
1626 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1627 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1628 (AUTOMAKE_VERSION): Bump to 1.15.1.
1629 * configure: Re-generate.
1630 * config.in: Re-generate.
1631 * aclocal.m4: Re-generate.
1632 * gnulib/aclocal.m4: Re-generate.
1633 * gnulib/config.in: Re-generate.
1634 * gnulib/configure: Re-generate.
1635 * gnulib/import/Makefile.in: Re-generate.
1637 2018-06-19 Pedro Alves <palves@redhat.com>
1639 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1640 (lookup_minimal_symbol_by_pc_section): ... here with
1641 gdb_assert_not_reached added.
1643 2018-06-19 Pedro Alves <palves@redhat.com>
1645 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1646 parameter with a block parameter. Compare location's block symbol
1647 with the frame's block instead of addresses.
1648 (skip_inline_frames): Pass the current block instead of the
1649 frame's address. Break out as soon as we determine the frame
1650 should not be skipped.
1652 2018-06-18 Tom Tromey <tom@tromey.com>
1654 * solib-aix.c (solib_aix_get_section_offsets): Return
1656 (solib_aix_solib_create_inferior_hook): Update.
1658 2018-06-18 Tom Tromey <tom@tromey.com>
1660 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1662 2018-06-18 Tom Tromey <tom@tromey.com>
1664 * solib-frv.c (frv_relocate_main_executable): Use
1666 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1669 2018-06-18 Tom Tromey <tom@tromey.com>
1671 * objfiles.h (inhibit_section_map_updates): Update.
1672 (resume_section_map_updates, resume_section_map_updates_cleanup):
1674 * solib-svr4.c (svr4_handle_solib_event): Update.
1675 * objfiles.c (inhibit_section_map_updates): Return
1676 scoped_restore_tmpl<int>.
1677 (resume_section_map_updates, resume_section_map_updates_cleanup):
1680 2018-06-18 Tom Tromey <tom@tromey.com>
1682 * valprint.h (read_string): Update.
1683 * valprint.c (read_string): Change type of "buffer".
1684 (val_print_string): Update.
1685 * python/py-value.c (valpy_string): Update.
1686 * language.h (struct language_defn) <la_get_string>: Change
1688 (default_get_string, c_get_string): Update.
1689 * language.c (default_get_string): Change type of "buffer".
1690 * guile/scm-value.c (gdbscm_value_to_string): Update.
1691 * c-lang.c (c_get_string): Change type of "buffer".
1693 2018-06-18 Tom Tromey <tom@tromey.com>
1695 * ser-mingw.c (struct pipe_state_destroyer): New.
1696 (pipe_state_up): New typedef.
1697 (cleanup_pipe_state): Remove.
1698 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1700 2018-06-18 Tom Tromey <tom@tromey.com>
1702 * rust-lang.h (rust_yyerror): Don't declare.
1703 * rust-lang.c (rust_language_defn): Update.
1704 * rust-exp.y (yyerror): Now static.
1705 * parse.c (parse_exp_in_context_1): Update.
1706 * p-lang.h (p_yyerror): Don't declare.
1707 * p-lang.c (p_language_defn): Update.
1708 * p-exp.y (yyerror): Now static.
1709 * opencl-lang.c (opencl_language_defn): Update.
1710 * objc-lang.c (objc_language_defn): Update.
1711 * m2-lang.h (m2_yyerror): Don't declare.
1712 * m2-lang.c (m2_language_defn): Update.
1713 * m2-exp.y (yyerror): Now static.
1714 * language.h (struct language_defn) <la_error>: Remove.
1715 * language.c (unk_lang_error): Remove.
1716 (unknown_language_defn, auto_language_defn): Remove.
1717 * go-lang.h (go_yyerror): Don't declare.
1718 * go-lang.c (go_language_defn): Update.
1719 * go-exp.y (yyerror): Now static.
1720 * f-lang.h (f_yyerror): Don't declare.
1721 * f-lang.c (f_language_defn): Update.
1722 * f-exp.y (yyerror): Now static.
1723 * d-lang.h (d_yyerror): Don't declare.
1724 * d-lang.c (d_language_defn): Update.
1725 * d-exp.y (yyerror): Now static.
1726 * c-lang.h (c_yyerror): Don't declare.
1727 * c-lang.c (c_language_defn, cplus_language_defn)
1728 (asm_language_defn, minimal_language_defn): Update.
1729 * c-exp.y (yyerror): Now static.
1730 * ada-lang.h (ada_yyerror): Don't declare.
1731 * ada-lang.c (ada_language_defn): Update.
1732 * ada-exp.y (yyerror): Now static.
1734 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1736 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1737 (store_sveregs_to_thread): Likewise.
1738 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1739 (aarch64_linux_store_inferior_registers): Likewise.
1740 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1742 (aarch64_sve_regs_copy_to_regcache): Likewise.
1743 (aarch64_sve_regs_copy_from_regcache): Likewise.
1744 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1746 (aarch64_sve_regs_copy_to_regcache): Likewise.
1747 (aarch64_sve_regs_copy_from_regcache): Likewise.
1748 (sve_context): Structure from Linux headers.
1749 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1750 (SVE_SIG_ZREG_SIZE): Likewise.
1751 (SVE_SIG_PREG_SIZE): Likewise.
1752 (SVE_SIG_FFR_SIZE): Likewise.
1753 (SVE_SIG_REGS_OFFSET): Likewise.
1754 (SVE_SIG_ZREGS_OFFSET): Likewise.
1755 (SVE_SIG_ZREG_OFFSET): Likewise.
1756 (SVE_SIG_ZREGS_SIZE): Likewise.
1757 (SVE_SIG_PREGS_OFFSET): Likewise.
1758 (SVE_SIG_PREG_OFFSET): Likewise.
1759 (SVE_SIG_PREGS_SIZE): Likewise.
1760 (SVE_SIG_FFR_OFFSET): Likewise.
1761 (SVE_SIG_REGS_SIZE): Likewise.
1762 (SVE_SIG_CONTEXT_SIZE): Likewise.
1763 (SVE_PT_REGS_MASK): Likewise.
1764 (SVE_PT_REGS_FPSIMD): Likewise.
1765 (SVE_PT_REGS_SVE): Likewise.
1766 (SVE_PT_VL_INHERIT): Likewise.
1767 (SVE_PT_VL_ONEXEC): Likewise.
1768 (SVE_PT_REGS_OFFSET): Likewise.
1769 (SVE_PT_FPSIMD_OFFSET): Likewise.
1770 (SVE_PT_FPSIMD_SIZE): Likewise.
1771 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1772 (SVE_PT_SVE_PREG_SIZE): Likewise.
1773 (SVE_PT_SVE_FFR_SIZE): Likewise.
1774 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1775 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1776 (__SVE_SIG_TO_PT): Likewise.
1777 (SVE_PT_SVE_OFFSET): Likewise.
1778 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1779 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1780 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1781 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1782 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1783 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1784 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1785 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1786 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1787 (SVE_PT_SVE_SIZE): Likewise.
1788 (SVE_PT_SIZE): Likewise.
1789 (HAS_SVE_STATE): New define.
1791 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1793 * nat/aarch64-sve-linux-sigcontext.h: New file.
1794 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1796 (SVE_VQ_MIN): Likewise.
1797 (SVE_VQ_MAX): Likewise.
1798 (SVE_VL_MIN): Likewise.
1799 (SVE_VL_MAX): Likewise.
1800 (SVE_NUM_ZREGS): Likewise.
1801 (SVE_NUM_PREGS): Likewise.
1802 (sve_vl_valid): Likewise.
1803 (struct user_sve_header): Likewise.
1805 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1806 Richard Bunt <Richard.Bunt@arm.com>
1808 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1809 was requested by GDB.
1811 2018-06-15 Tom de Vries <tdevries@suse.de>
1813 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1815 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1817 * gnulib/update-gnulib.sh: Print expected versions of
1820 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1822 * arch-utils.c (default_type_align): Use type_length_units.
1823 * gdbtypes.c (type_align): Use type_length_units.
1825 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1827 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1828 of 'define' command.
1830 2018-06-14 Tom de Vries <tdevries@suse.de>
1833 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1834 get_no_prettyformat_print_options.
1836 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1838 * sparc-nat.h: Include target.h.
1839 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1840 <fetch_registers>: Remove this argument in function call.
1841 <store_registers>: Remove this argument in function call, remove
1843 <low_forget_process>: Call sparc64_forget_process instead of
1844 sparc_forget_process.
1846 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1848 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1849 (procfs_target::make_corefile_notes): Adjust to new
1850 target_read_alloc return type.
1852 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1853 Stephen Roberts <stephen.roberts@arm.com>
1856 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1857 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1858 Move should_notify_stop local into more inner scope.
1860 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1861 Stephen Roberts <stephen.roberts@arm.com>
1864 * infrun.c (resume_1): Add call to mark_async_event_handler.
1866 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1868 * infrun.c (do_target_wait): Change old version of $pc printed.
1870 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1872 * dwarf2read.c (read_index_from_section): Rename to...
1873 (read_gdb_index_from_section): ... this, update all callers.
1874 (dwarf2_read_index): Rename to...
1875 (dwarf2_read_gdb_index): ... this, update all callers.
1877 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1879 * gdb/hppa-linux-nat.c
1880 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1881 hppa_linux_nat_target::fetch_registers.
1883 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1885 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1886 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1887 (AARCH64_DWARF_SVE_FFR): Likewise.
1888 (AARCH64_DWARF_SVE_P0): Likewise.
1889 (AARCH64_DWARF_SVE_Z0): Likewise.
1891 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1893 * common/common-regcache.h (raw_compare): New function.
1894 * regcache.c (regcache::raw_compare): Likewise.
1895 * regcache.h (regcache::raw_compare): New declaration.
1897 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1899 * common/common-regcache.h (reg_buffer_common): New structure.
1900 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1901 (reg_buffer::raw_supply): Likewise.
1902 (reg_buffer::raw_supply_integer): Likewise.
1903 (reg_buffer::raw_supply_zeroed): Likewise.
1904 (reg_buffer::raw_collect): Likewise.
1905 (reg_buffer::raw_collect_integer): Likewise.
1906 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1907 (reg_buffer::raw_supply): Likewise.
1908 (reg_buffer::raw_supply_integer): Likewise.
1909 (reg_buffer::raw_supply_zeroed): Likewise.
1910 (reg_buffer::raw_collect): Likewise.
1911 (reg_buffer::raw_collect_integer): Likewise.
1913 2018-06-10 Tom Tromey <tom@tromey.com>
1915 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1916 (class remote_state) <stop_reply_queue>: Now std::vector.
1917 (remote_state::~remote_state)
1918 (remote_target::stop_reply_queue_length): Update.
1919 (struct queue_iter_param, remove_child_of_pending_fork)
1920 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1921 (check_pending_event_prevents_wildcard_vcont_callback)
1922 (remove_stop_reply_for_inferior)
1923 (remove_stop_reply_of_remote_state)
1924 (remote_notif_remove_once_on_match)
1925 (stop_reply_match_ptid_and_ws)
1926 (remote_kill_child_of_pending_fork): Remove.
1927 (remote_target::remove_new_fork_children)
1928 (remote_target::check_pending_events_prevent_wildcard_vcont)
1929 (remote_target::discard_pending_stop_replies)
1930 (remote_target::discard_pending_stop_replies_in_queue)
1931 (remote_target::remote_notif_remove_queued_reply)
1932 (remote_target::queued_stop_reply)
1933 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1934 (remote_target::wait, remote_target::kill_new_fork_children)
1935 (remote_target::async): Update.
1937 2018-06-10 Tom Tromey <tom@tromey.com>
1939 * record-full.c (record_full_arch_list_cleanups): Remove.
1940 (record_full_message): Use try/catch.
1941 (record_full_wait_cleanups): Remove.
1942 (record_full_wait_1): Use try/catch.
1943 (record_full_restore): Likewise.
1945 2018-06-10 Tom Tromey <tom@tromey.com>
1947 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1948 declare VEC. Add constructor.
1949 <in_target_beneath>: Now bool.
1950 (record_full_breakpoints): Now a std::vector, static.
1951 (record_full_sync_record_breakpoints)
1952 (record_full_init_record_breakpoints)
1953 (record_full_target::insert_breakpoint)
1954 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1956 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1958 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1959 * serial.c (serial_interface_lookup): Remove struct keyword.
1961 2018-06-10 Tom Tromey <tom@tromey.com>
1963 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1965 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1967 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1969 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1970 "beneath" as a method.
1971 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1972 Use "beneath" as a method.
1974 2018-06-10 Tom Tromey <tom@tromey.com>
1976 * tracefile.c (struct trace_file_writer_deleter): New.
1977 <operator()>: Rename from trace_file_writer_xfree.
1978 (trace_file_writer_up): New typedef.
1979 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1981 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1983 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1984 <m_registers, m_register_status>: Change type to
1986 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1989 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1991 * common/common-regcache.h (enum register_status): Add
1992 underlying type "signed char".
1993 * regcache.h (reg_buffer) <m_register_status>: Change type to
1995 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1996 register_status instead of signed char.
1997 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1998 (reg_buffer::get_register_status): Remove cast.
1999 (readable_regcache::raw_read): Remove cast.
2000 (readable_regcache::cooked_read): Remove cast.
2002 2018-06-09 Tom Tromey <tom@tromey.com>
2004 * source.c (reverse_search_command, forward_search_command): Use
2007 2018-06-09 Tom Tromey <tom@tromey.com>
2009 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2010 (serial_ops_list): Now static, std::vector.
2011 (serial_interface_lookup, serial_add_interface): Update.
2013 2018-06-09 Tom Tromey <tom@tromey.com>
2015 * dwarf2read.c (process_cu_includes): Update.
2016 (process_full_comp_unit): Update.
2017 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2020 2018-06-08 Paul Koning <paul_koning@dell.com>
2024 * python/python.c (do_start_initialization):
2025 Avoid call to internal Python API.
2026 (init__gdb_module): New function.
2028 2018-06-08 Gary Benson <gbenson@redhat.com>
2030 * linux-thread-db.c (valprint.h): New include.
2031 (struct check_thread_db_info): New structure.
2032 (check_thread_db_on_load, tdb_testinfo): New static globals.
2033 (check_thread_db, check_thread_db_callback): New functions.
2034 (try_thread_db_load_1): Run integrity checks if requested.
2035 (maintenance_check_libthread_db): New function.
2036 (_initialize_thread_db): Register "maint check libthread-db"
2037 and "maint set/show check-libthread-db".
2038 * NEWS: Mention the above new commands.
2040 2018-06-08 Tom Tromey <tom@tromey.com>
2042 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2045 2018-06-08 Tom Tromey <tom@tromey.com>
2047 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2049 2018-06-08 Tom Tromey <tom@tromey.com>
2051 * common/btrace-common.h (struct btrace_data): Add constructor,
2052 destructor, move assignment operator.
2053 <empty, clear, fini>: New methods.
2054 <format>: Initialize.
2055 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2056 (btrace_data_empty): Don't declare.
2057 * common/btrace-common.c (btrace_data_init): Remove.
2058 (btrace_data::fini): Rename from btrace_data_fini.
2059 (btrace_data::empty): Rename from btrace_data_empty.
2060 (btrace_data::clear): Rename from btrace_data_clear. Return
2062 * btrace.h (make_cleanup_btrace_data): Don't declare.
2063 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2064 (parse_xml_btrace): Update.
2065 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2066 (maint_btrace_clear_packet_history_cmd): Update.
2068 2018-06-07 Pedro Alves <palves@redhat.com>
2070 * target.h (target_ops) <beneath>: Now a method. All references
2072 (class target_stack): New.
2073 * target.c (g_target_stack): New.
2074 (g_current_top_target): Delete.
2075 (current_top_target): Get the top target out of g_target_stack.
2076 (target_stack::push, target_stack::unpush): New.
2077 (push_target, unpush_target): Reimplement.
2078 (target_is_pushed): Reimplement in terms of g_target_stack.
2079 (target_ops::beneath, target_stack::find_beneath): New.
2081 2018-06-07 Pedro Alves <palves@redhat.com>
2083 * target.h (find_target_beneath): Delete declaration.
2084 * target.c (find_target_beneath): Delete definition.
2085 * aix-thread.c: All callers of find_target_beneath adjusted to
2086 call target_ops::beneath instead.
2087 * bsd-uthread.c: Likewise.
2088 * linux-thread-db.c: Likewise.
2089 * ravenscar-thread.c: Likewise.
2090 * sol-thread.c: Likewise.
2091 * spu-multiarch.c: Likewise.
2093 2018-06-07 Pedro Alves <palves@redhat.com>
2095 * target.h (target_ops) <beneath>: Now a method. All references
2097 (target_ops) <m_beneath>: New.
2098 * target.c (target_ops::beneath): New.
2099 * corelow.c: Adjust all references to target_ops::beneath.
2100 * linux-thread-db.c: Likewise.
2101 * make-target-delegates: Likewise.
2102 * record-btrace.c: Likewise.
2103 * record-full.c: Likewise.
2104 * remote.c: Likewise.
2105 * target.c: Likewise.
2106 * target-delegates.c: Regenerate.
2108 2018-06-07 Pedro Alves <palves@redhat.com>
2110 * target.h (target_stack): Delete.
2111 (current_top_target): Declare function.
2112 * target.c (target_stack): Delete.
2113 (g_current_top_target): New.
2114 (current_top_target): New function.
2115 * auxv.c: Use current_top_target instead of target_stack
2117 * avr-tdep.c: Likewise.
2118 * breakpoint.c: Likewise.
2119 * corefile.c: Likewise.
2120 * elfread.c: Likewise.
2122 * exceptions.c: Likewise.
2123 * frame.c: Likewise.
2124 * gdbarch-selftests.c: Likewise.
2125 * gnu-v3-abi.c: Likewise.
2126 * ia64-tdep.c: Likewise.
2127 * ia64-vms-tdep.c: Likewise.
2128 * infcall.c: Likewise.
2129 * infcmd.c: Likewise.
2130 * infrun.c: Likewise.
2131 * linespec.c: Likewise.
2132 * linux-tdep.c: Likewise.
2133 * minsyms.c: Likewise.
2134 * ppc-linux-nat.c: Likewise.
2135 * ppc-linux-tdep.c: Likewise.
2136 * procfs.c: Likewise.
2137 * regcache.c: Likewise.
2138 * remote.c: Likewise.
2139 * rs6000-tdep.c: Likewise.
2140 * s390-linux-nat.c: Likewise.
2141 * s390-tdep.c: Likewise.
2142 * solib-aix.c: Likewise.
2143 * solib-darwin.c: Likewise.
2144 * solib-dsbt.c: Likewise.
2145 * solib-spu.c: Likewise.
2146 * solib-svr4.c: Likewise.
2147 * solib-target.c: Likewise.
2148 * sparc-tdep.c: Likewise.
2149 * sparc64-tdep.c: Likewise.
2150 * spu-tdep.c: Likewise.
2151 * symfile.c: Likewise.
2152 * symtab.c: Likewise.
2153 * target-descriptions.c: Likewise.
2154 * target-memory.c: Likewise.
2155 * target.c: Likewise.
2156 * target.h: Likewise.
2157 * tracefile-tfile.c: Likewise.
2158 * tracepoint.c: Likewise.
2159 * valops.c: Likewise.
2160 * valprint.c: Likewise.
2161 * value.c: Likewise.
2162 * windows-tdep.c: Likewise.
2163 * mi/mi-main.c: Likewise.
2165 2018-06-07 Tom Tromey <tom@tromey.com>
2167 * valprint.h (build_address_symbolic): Declare.
2168 * printcmd.c (print_address_symbolic): Update.
2169 (build_address_symbolic): Change "name" and "filename" to
2171 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2173 * defs.h (build_address_symbolic): Remove declaration.
2175 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2177 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2178 (aarch64_vnv_type): Add function.
2179 (aarch64_pseudo_register_name): Add V regs for SVE.
2180 (aarch64_pseudo_register_type): Likewise.
2181 (aarch64_pseudo_register_reggroup_p): Likewise.
2182 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2183 (aarch64_pseudo_read_value): Add V regs for SVE.
2184 (aarch64_pseudo_write_2): Use V0 offset for SVE
2185 (aarch64_pseudo_write): Add V regs for SVE.
2186 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2188 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2190 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2191 (sve_vl_from_vq): Likewise.
2193 2018-06-05 Tom Tromey <tom@tromey.com>
2195 * cli/cli-cmds.c (show_version): Update.
2196 * top.c (print_gdb_version): Add "interactive" parameter.
2198 * main.c (captured_main_1): Update.
2199 * top.h (print_gdb_version): Add "interactive" parameter and a
2202 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2204 * common/enum-flags.h: Add trailing semicolon to example in
2207 2018-06-05 Tom Tromey <tom@tromey.com>
2210 * NEWS: Add entry about pager.
2211 * utils.c (pagination_disabled_for_command): New global.
2212 (prompt_for_continue): Allow "c" response to prompt.
2213 (reinitialize_more_filter): Clear
2214 pagination_disabled_for_command.
2215 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2217 2018-06-04 Tom Tromey <tom@tromey.com>
2219 * ada-lang.h (ada_lookup_symbol_list): Update.
2220 * ada-lang.c (resolve_subexp): Update.
2221 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2223 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2224 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2225 results parameter to std::vector.
2226 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2228 * ada-exp.y (block_lookup): Update.
2229 (select_possible_type_sym): Change type of syms. Remove nsyms
2231 (write_var_or_type, write_name_assoc): Update.
2233 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2235 * windows-nat.c (windows_nat_target::xfer_partial): Return
2236 TARGET_XFER_E_IO if we need to delegate to the target beneath
2237 but BENEATH is NULL.
2239 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2241 * Makefile.in (config.status): Add configure.nat as a
2244 2018-06-04 Tom Tromey <tom@tromey.com>
2246 * cp-name-parser.y (cpname_state): Add method declarations.
2247 (HANDLE_QUAL): Update.
2248 (cpname_state::d_grab, cpname_state::fill_comp)
2249 (cpname_state::make_operator, cpname_state::make_dtor)
2250 (cpname_state::make_builtin_type, cpname_state::make_name)
2251 (cpname_state::d_qualify, cpname_state::d_int_type)
2252 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2253 (%union): Move earlier.
2255 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2257 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2259 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2261 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2262 (aarch64_pseudo_write_1): Likewise.
2263 (aarch64_pseudo_read_value): Use helper.
2264 (aarch64_pseudo_write): Likewise.
2266 2018-06-04 Pedro Alves <palves@redhat.com>
2268 * darwin-nat.c (darwin_ops): Delete.
2269 (darwin_attach_pid): Use get_native_target.
2271 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2273 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2274 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2276 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2278 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2279 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2280 (aarch64_gdbarch_init): Check for SVE.
2281 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2283 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2285 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2286 * aarch64-tdep.h (aarch64_read_description): Likewise.
2287 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2288 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2289 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2290 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2291 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2293 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2295 * value.c (value_fetch_lazy_bitfield): New.
2296 (value_fetch_lazy_memory): New.
2297 (value_fetch_lazy_register): New.
2298 (value_fetch_lazy): Factor out to smaller functions.
2300 2018-06-01 Tom Tromey <tom@tromey.com>
2302 * cp-name-parser.y (backslashable, represented): Now const.
2304 2018-06-01 Tom Tromey <tom@tromey.com>
2306 * cp-name-parser.y: Include parser-defs.h.
2307 (parser_fprintf): Remove declaration.
2309 2018-06-01 Tom Tromey <tom@tromey.com>
2311 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2313 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2314 (global_result): Remove globals.
2315 (struct cpname_state): New.
2316 (yyparse): Don't declare.
2317 (yylex, yyerror): Move declarations after %union.
2318 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2319 (make_name): Add state parameter.
2321 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2323 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2325 (yylex): Add lvalp, state parameters.
2326 (yyerror): Add state parameter.
2327 (cp_demangled_name_to_comp): Update.
2329 2018-06-01 Tom Tromey <tom@tromey.com>
2331 * cp-name-parser.y (parser_fprintf): Declare.
2332 (GDB_YY_REMAP_PREFIX): Define.
2333 Include yy-remap.h. Don't redefine yy* identifiers.
2335 2018-06-01 Tom Tromey <tom@tromey.com>
2337 * python/py-type.c (typy_legacy_template_argument): Update.
2338 * cp-support.h (cp_demangled_name_to_comp): Update.
2339 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2340 parameter to be a "std::string *".
2343 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2345 * ada-lex.l: Include "diagnostics.h" instead of
2346 "common/diagnostics.h".
2347 * unittests/environ-selftests.c: Likewise.
2348 * common/diagnostics.h: Moved to ../include.
2350 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2352 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2353 to language_mode_manual while calling breakpoint_re_set_one.
2355 2018-06-01 Tom Tromey <tom@tromey.com>
2357 * valops.c (value_cast_structs, destructor_name_p): Update.
2358 * symtab.c (gdb_mangle_name): Update.
2359 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2361 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2362 (pascal_object_print_value_fields, pascal_object_print_value):
2364 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2365 * linespec.c (find_methods): Update.
2366 * gdbtypes.h (type_name_no_tag): Remove.
2367 (type_name_or_error): Rename from type_name_no_tag_or_error.
2368 * gdbtypes.c (type_name_no_tag): Remove.
2369 (type_name_or_error): Rename from type_name_no_tag_or_error.
2370 (lookup_struct_elt_type, check_typedef): Update.
2371 * expprint.c (print_subexp_standard): Update.
2372 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2373 * d-namespace.c (d_lookup_nested_symbol): Update.
2374 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2375 (cp_print_class_member): Update.
2376 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2377 * completer.c (add_struct_fields): Update.
2378 * c-typeprint.c (cp_type_print_derivation_info)
2379 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2381 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2382 (ada_prefer_type, ada_is_exception_sym): Update.
2384 2018-06-01 Tom Tromey <tom@tromey.com>
2386 * valops.c (enum_constant_from_type, value_namespace_elt)
2387 (value_maybe_namespace_elt): Update.
2388 * valarith.c (find_size_for_pointer_math): Update.
2389 * target-descriptions.c (make_gdb_type): Update.
2390 * symmisc.c (print_symbol): Update.
2391 * stabsread.c (define_symbol, read_type)
2392 (complain_about_struct_wipeout, add_undefined_type)
2393 (cleanup_undefined_types_1): Update.
2394 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2395 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2396 (rust_internal_print_type, rust_composite_type)
2397 (rust_evaluate_funcall, rust_evaluate_subexp)
2398 (rust_inclusive_range_type_p): Update.
2399 * python/py-type.c (typy_get_tag): Update.
2400 * p-typeprint.c (pascal_type_print_base): Update.
2401 * mdebugread.c (parse_symbol, parse_type): Update.
2402 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2404 * guile/scm-type.c (gdbscm_type_tag): Update.
2405 * go-lang.c (sixg_string_p): Update.
2406 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2408 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2409 (TYPE_TAG_NAME): Remove.
2410 * gdbtypes.c (type_name_no_tag): Simplify.
2411 (check_typedef, check_types_equal, recursive_dump_type)
2412 (copy_type_recursive, arch_composite_type): Update.
2413 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2414 in summary mode when needed.
2415 * eval.c (evaluate_funcall): Update.
2416 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2417 (process_structure_scope, read_enumeration_type)
2418 (read_namespace_type, read_module_type, determine_prefix): Update.
2419 * cp-support.c (inspect_type): Update.
2420 * coffread.c (process_coff_symbol, decode_base_type): Update.
2421 * c-varobj.c (c_is_path_expr_parent): Update.
2422 * c-typeprint.c (c_type_print_base_struct_union): Update.
2423 (c_type_print_base_1): Update. Print struct/class/union/enum in
2424 summary when using C language.
2425 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2426 (gen_maybe_namespace_elt): Update.
2427 * ada-lang.c (ada_type_name): Simplify.
2428 (empty_record, ada_template_to_fixed_record_type_1)
2429 (template_to_static_fixed_type)
2430 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2432 2018-06-01 Tom Tromey <tom@tromey.com>
2434 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2436 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2437 (c_print_type): Update.
2438 (c_print_type): New overload.
2439 (c_type_print_varspec_prefix, c_type_print_args)
2440 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2441 (c_type_print_base_struct_union, c_type_print_base_1)
2442 (cp_type_print_method_args): Add "language" parameter.
2443 (c_type_print_base): Update.
2444 * c-lang.h (c_print_type): Add new overload.
2446 2018-06-01 Tom Tromey <tom@tromey.com>
2448 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2449 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2451 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2453 * aarch64-tdep.c (aarch64_sve_register_names): New const
2455 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2456 (AARCH64_SVE_Z_REGS_NUM): New define.
2457 (AARCH64_SVE_P_REGS_NUM): Likewise.
2458 (AARCH64_SVE_NUM_REGS): Likewise.
2460 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2462 * nat/linux-ptrace.h [__alpha__]
2463 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2466 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2468 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2469 the endianness selected.
2470 * NEWS: Document `set endian auto' mode operation update.
2472 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2474 * Makefile.in: Add new header.
2475 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2476 (sve_vl_from_vg): Likewise.
2477 (sve_vq_from_vl): Likewise.
2478 (sve_vl_from_vq): Likewise.
2479 (sve_vq_from_vg): Likewise.
2480 (sve_vg_from_vq): Likewise.
2481 * configure.nat: Add new c file.
2482 * nat/aarch64-sve-linux-ptrace.c: New file.
2483 * nat/aarch64-sve-linux-ptrace.h: New file.
2485 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2487 * aarch64-linux-nat.c (aarch64_linux_read_description):
2489 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2491 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2492 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2493 (aarch64_gdbarch_init): Add parmeter zero.
2494 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2495 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2496 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2498 * doc/gdb.texinfo: Describe SVE feature
2499 * features/aarch64-sve.c: New file.
2501 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2504 * gdbarch.sh (significant_addr_bit): Default to zero when
2505 not set by target architecture.
2506 * gdbarch.c: Re-generated.
2507 * utils.c (address_significant): Update.
2509 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2511 * stack.c (func_command): Remove trailing newline in call to error.
2513 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2515 * regcache.h (regcache_raw_collect): Remove, update callers to
2516 use regcache::raw_collect.
2517 * regcache.c (regcache_raw_collect): Remove.
2519 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2521 * regcache.h (regcache_raw_supply): Remove, update callers to
2522 use detached_regcache::raw_supply.
2523 * regcache.c (regcache_raw_supply): Remove.
2525 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2527 * regcache.h (regcache_cooked_write_part): Remove, update
2528 callers to use regcache::cooked_write_part.
2529 * regcache.c (regcache_cooked_write_part): Remove.
2531 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2533 * regcache.h (regcache_cooked_read_part): Remove, update callers
2534 to use readable_regcache::cooked_read_part.
2535 * regcache.c (regcache_cooked_read_part): Remove.
2537 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2539 * regcache.h (regcache_cooked_read_value): Remove, update
2540 callers to use readable_regcache::cooked_read_value.
2541 * regcache.c (regcache_cooked_read_value): Remove.
2543 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2545 * regcache.h (regcache_cooked_write): Remove, update callers to
2546 use regcache::cooked_write.
2547 * regcache.c (regcache_cooked_write): Remove.
2549 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2551 * regcache.h (regcache_invalidate): Remove, update callers to
2552 use detached_regcache::invalidate instead.
2553 * regcache.c (regcache_invalidate): Remove.
2555 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2557 * regcache.h (regcache_raw_write_part): Remove, update callers
2558 to use regcache::raw_write_part instead.
2559 * regcache.c (regcache_raw_write_part): Remove.
2561 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2563 * regcache.h (regcache_raw_read_part): Remove, update callers to
2564 use readable_regcache::raw_read_part instead.
2565 * regcache.c (regcache_raw_read_part): Remove.
2567 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2569 * regcache.h (regcache_cooked_read): Remove, update callers to
2570 use readable_regcache::cooked_read instead.
2571 * regcache.c (regcache_cooked_read): Remove.
2573 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2575 * regcache.h (regcache_raw_write): Remove, update callers to use
2576 regcache::raw_write instead.
2577 * regcache.c (regcache_raw_write): Remove.
2579 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2581 * regcache.h (regcache_raw_read): Remove, update callers to use
2582 readable_regcache::raw_read instead.
2583 * regcache.c (regcache_raw_read): Remove.
2585 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2587 * regcache.h (regcache_raw_update): Remove, update callers to
2588 use readable_regcache::raw_update instead.
2589 * regcache.c (regcache_raw_update): Remove.
2591 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2593 * regcache.h (regcache_register_status): Remove, update callers
2594 to use reg_buffer::get_register_status directly instead.
2595 * regcache.c (regcache_register_status): Remove.
2597 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2599 * regcache.h (regcache_get_ptid): Remove, update all callers to
2600 call regcache::ptid instead.
2601 * regcache.c (regcache_get_ptid): Remove.
2603 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2605 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2607 2018-05-30 Pedro Alves <palves@redhat.com>
2609 * common/common-exceptions.h (exception_rethrow): Use
2612 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2614 * breakpoint.c (print_solib_event, check_status_catch_solib):
2615 Remove struct keyword in range-based for loops.
2616 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2617 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2619 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2621 * symfile.c (addr_info_make_relative): Likewise.
2622 * thread.c (value_in_thread_stack_temporaries): Likewise.
2624 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2627 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2628 aggregate type to get its real type before accessing it.
2630 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2632 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2633 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2634 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2635 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2636 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2637 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2638 * printcmd.c (info_address_command): Likewise.
2640 2018-05-29 Tom Tromey <tom@tromey.com>
2642 * windows-nat.c (handle_exception): Update fall-through comment.
2644 2018-05-29 Tom Tromey <tom@tromey.com>
2646 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2647 (struct program_space) <added_solibs>: Now a std::vector.
2648 * breakpoint.c (print_solib_event): Update.
2649 (check_status_catch_solib): Update.
2650 * progspace.c (clear_program_space_solib_cache): Update.
2651 * solib.c (update_solib_list): Update.
2653 2018-05-29 Tom Tromey <tom@tromey.com>
2655 * python/py-type.c (typy_richcompare): Update.
2656 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2657 * gdbtypes.h (types_deeply_equal): Return bool.
2658 (types_equal): Likewise.
2659 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2661 (check_types_equal): Change worklist to std::vector. Return
2663 (struct type_equality_entry): Add constructor.
2664 (compare_maybe_null_strings): Return bool.
2665 (check_types_worklist): Return bool. Change worklist to
2667 (types_deeply_equal): Use std::vector.
2668 (types_equal): Return bool.
2669 (compare_maybe_null_strings): Simplify.
2671 2018-05-29 Tom Tromey <tom@tromey.com>
2673 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2675 2018-05-29 Tom Tromey <tom@tromey.com>
2677 * objc-lang.h: Don't include cp-support.h.
2678 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2681 2018-05-27 Tom Tromey <tom@tromey.com>
2683 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2685 2018-05-25 Tom Tromey <tom@tromey.com>
2687 * value.c (value::location): Initialize.
2689 2018-05-25 Tom Tromey <tom@tromey.com>
2691 * dbxread.c (init_bincl_list): Remove.
2692 (bincl_list): Now a std::vector.
2693 (bincls_allocated, next_bincl): Remove.
2694 (free_bincl_list, do_free_bincl_list_cleanup)
2695 (make_cleanup_free_bincl_list): Remove.
2696 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2698 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2699 (struct header_file_location): Add constructor.
2700 (add_bincl_to_list): Remove.
2702 2018-05-25 Tom Tromey <tom@tromey.com>
2704 * tui/tui.c (tui_enable): Update.
2705 * mi/mi-interp.c (mi_interp::init): Update.
2706 * interps.h (class interp) <name>: New method.
2707 <m_name>: Rename from name.
2708 (~scoped_restore_interp): Update.
2709 * interps.c (interp::interp): Update.
2710 (interp_add, interp_set, interp_lookup_existing)
2711 (current_interp_named_p): Update.
2713 2018-05-25 Tom Tromey <tom@tromey.com>
2715 * interps.c (interp_name): Remove.
2716 * mi/mi-interp.c (mi_interp::init): Update.
2717 * interps.h (interp_name): Remove.
2718 (~scoped_restore_interp): Update.
2719 * tui/tui.c (tui_enable): Update.
2721 2018-05-25 Tom Tromey <tom@tromey.com>
2723 * utils.c (fputs_maybe_filtered): Update.
2724 * linespec.c (decode_line_full): Update.
2725 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2726 (mi_print_breakpoint_for_event, mi_solib_loaded)
2727 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2728 (mi_user_selected_context_changed): Update.
2729 * mi/mi-main.c (mi_execute_command): Update.
2730 * cli/cli-script.c (execute_control_command): Update.
2731 * python/python.c (execute_gdb_command): Update.
2732 * solib.c (info_sharedlibrary_command): Update.
2733 * interps.c (interp_ui_out): Remove.
2734 * interps.h (interp_ui_out): Remove.
2736 2018-05-25 Tom Tromey <tom@tromey.com>
2738 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2739 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2740 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2742 2018-05-25 Tom Tromey <tom@tromey.com>
2744 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2745 * interps.c (interp_exec): Use scoped_restore.
2747 2018-05-25 Tom Tromey <tom@tromey.com>
2749 * remote.c (remote_target::remote_file_get): Use
2751 (remote_target::remote_file_put): Likewise.
2753 2018-05-25 Tom Tromey <tom@tromey.com>
2755 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2757 (get_pe_section_index, add_pe_exported_sym): Update.
2758 (read_pe_exported_syms): Use gdb::def_vector.
2760 2018-05-25 Tom Tromey <tom@tromey.com>
2762 * frame.c (remove_prev_frame): Remove.
2763 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2765 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2767 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2769 * mips-linux-nat.c (supply_fpregset): Always call
2770 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2771 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2772 `mips_fill_fpregset'.
2773 * mips-linux-tdep.c (mips_supply_fpregset)
2774 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2775 (mips_fill_fpregset_wrapper): Remove functions.
2776 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2777 (mips_linux_fpregset): Remove variable.
2778 (mips_linux_iterate_over_regset_sections): Use
2779 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2780 (mips_linux_o32_sigframe_init): Remove comment.
2782 2018-05-25 Pedro Alves <palves@redhat.com>
2784 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2785 (struct readahead_cache, struct packet_reg, struct
2786 remote_arch_state, class remote_state): Move higher up in the
2788 (remote_target::m_remote_state): Now an object instead of a pointer.
2789 (remote_target::get_remote_state): Adjust.
2791 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2793 * stack.c (select_and_print_frame): Delete.
2794 (struct function_bounds): Move struct within function.
2795 (func_command): Most content moved into new function
2796 find_frame_for_function, use new function, print result, add
2798 (find_frame_for_function): New function, now returns a result.
2800 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2802 * stack.c (iterate_over_block_arg_vars): Fix comment.
2803 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2805 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2809 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2811 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2813 * frame.h (class scoped_restore_selected_frame): New class.
2814 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2815 of any exception, use scoped_restore_selected_frame to restore the
2818 2018-05-24 Pedro Alves <palves@redhat.com>
2820 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2823 2018-05-23 Tom Tromey <tom@tromey.com>
2825 * complaints.c (struct complaints): Remove.
2826 (symfile_complaint_book): Remove.
2827 (series): New global.
2828 (complaint_internal): Update.
2829 (clear_complaints): Update.
2831 2018-05-23 Tom Tromey <tom@tromey.com>
2833 * complaints.c (counters): New global.
2834 (struct complain): Remove.
2835 (struct complaints) <root>: Remove.
2836 (complaint_sentinel): Remove.
2837 (symfile_complaint_book): Update.
2838 (find_complaint) Remove.
2839 (complaint_internal, clear_complaints): Update.
2841 2018-05-23 Tom Tromey <tom@tromey.com>
2843 * complaints.c (struct complain) <file, line>: Remove.
2844 (find_complaint): Remove file, line parameters.
2845 (complaint_internal): Update.
2847 2018-05-23 Tom Tromey <tom@tromey.com>
2849 * complaints.c (vcomplaint): Remove.
2850 (complaint_internal) Merge in contents of vcomplaint.
2852 2018-05-23 Tom Tromey <tom@tromey.com>
2854 * complaints.c (struct complaints) <explanation>: Remove.
2855 (symfile_explanations): Remove.
2856 (symfile_complaint_book): Update.
2857 (vcomplaint): Update.
2858 (struct explanation): Remove.
2860 2018-05-23 Tom Tromey <tom@tromey.com>
2862 * complaints.c (symfile_complaints): Remove.
2863 (complaint_internal): Remove "complaints" parameter.
2864 (clear_complaints, vcomplaint): Remove "c" parameter.
2865 (get_complaints): Remove.
2866 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2867 (dwarf2_debug_line_missing_file_complaint)
2868 (dwarf2_debug_line_missing_end_sequence_complaint)
2869 (dwarf2_complex_location_expr_complaint)
2870 (dwarf2_const_value_length_mismatch_complaint)
2871 (dwarf2_section_buffer_overflow_complaint)
2872 (dwarf2_macro_malformed_definition_complaint)
2873 (dwarf2_invalid_attrib_class_complaint)
2874 (create_addrmap_from_index, dw2_symtab_iter_next)
2875 (dw2_expand_marked_cus)
2876 (dw2_debug_names_iterator::find_vec_in_debug_names)
2877 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2878 (create_debug_type_hash_table, init_cutu_and_read_dies)
2879 (partial_die_parent_scope, add_partial_enumeration)
2880 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2881 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2882 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2883 (create_cus_hash_table, create_dwp_hash_table)
2884 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2885 (dwarf2_rnglists_process, dwarf2_ranges_process)
2886 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2887 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2888 (handle_struct_member_die, process_structure_scope)
2889 (read_array_type, read_common_block, read_module_type)
2890 (read_tag_pointer_type, read_typedef, read_base_type)
2891 (read_subrange_type, load_partial_dies, partial_die_info::read)
2892 (partial_die_info::read, partial_die_info::read)
2893 (partial_die_info::read, read_checked_initial_length_and_offset)
2894 (dwarf2_string_attr, read_formatted_entries)
2895 (dwarf_decode_line_header)
2896 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2897 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2898 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2899 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2900 (get_signatured_type, get_DW_AT_signature_type)
2901 (decode_locdesc, file_file_name, consume_improper_spaces)
2902 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2903 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2904 (dwarf2_symbol_mark_computed, set_die_type)
2905 (read_attribute_value): Update.
2906 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2908 * dbxread.c (unknown_symtype_complaint)
2909 (lbrac_mismatch_complaint, repeated_header_complaint)
2910 (set_namestring, function_outside_compilation_unit_complaint)
2911 (read_dbx_symtab, process_one_symbol): Update.
2912 * gdbtypes.c (stub_noname_complaint): Update.
2913 * windows-nat.c (handle_unload_dll): Update.
2914 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2915 (decode_base_type): Update.
2916 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2917 (eb_complaint, record_include_begin, record_include_end)
2918 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2919 (process_xcoff_symbol, read_symbol)
2920 (function_outside_compilation_unit_complaint)
2921 (scan_xcoff_symtab): Update.
2922 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2923 * buildsym.c (finish_block_internal, make_blockvector)
2924 (end_symtab_get_static_block, augment_type_symtab): Update.
2925 * dtrace-probe.c (dtrace_process_dof)
2926 (dtrace_static_probe_ops::get_probes): Update.
2927 * complaints.h (struct complaint): Don't declare.
2928 (symfile_complaints): Remove.
2929 (complaint_internal): Remove "complaints" parameter.
2930 (complaint): Likewise.
2931 (clear_complaints): Likewise.
2932 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2933 (reread_symbols): Update.
2934 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2935 (dwarf2_frame_cache, decode_frame_entry): Update.
2936 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2937 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2938 (info_selectors_command): Update.
2939 * macrotab.c (macro_include, check_for_redefinition)
2940 (macro_undef): Update.
2941 * objfiles.c (filter_overlapping_sections): Update.
2942 * stabsread.c (invalid_cpp_abbrev_complaint)
2943 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2944 (define_symbol, error_type, read_type, rs6000_builtin_type)
2945 (stabs_method_name_from_physname, read_member_functions)
2946 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2947 (attach_fields_to_type, complain_about_struct_wipeout)
2948 (read_range_type, read_args, common_block_start)
2949 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2951 * mdebugread.c (index_complaint, unknown_ext_complaint)
2952 (basic_type_complaint, bad_tag_guess_complaint)
2953 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2954 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2955 (parse_procedure, parse_lines)
2956 (function_outside_compilation_unit_complaint)
2957 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2958 (bad_tag_guess_complaint, reg_value_complaint): Update.
2959 * cp-support.c (demangled_name_complaint): Update.
2960 * macroscope.c (sal_macro_scope): Update.
2961 * dwarf-index-write.c (class debug_names): Update.
2963 2018-05-23 Tom Tromey <tom@tromey.com>
2965 * complaints.c (clear_complaints): Remove "noisy" parameter.
2966 * complaints.h (clear_complaints): Update.
2967 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2968 (reread_symbols): Update.
2970 2018-05-23 Tom Tromey <tom@tromey.com>
2972 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2974 (vcomplaint, clear_complaints): Update.
2975 (symfile_explanations): Remove some messages.
2977 2018-05-23 Tom Tromey <tom@tromey.com>
2979 * complaints.c (internal_complaint): Remove.
2980 * complaints.h (internal_complaint): Remove.
2982 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2984 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2986 2018-05-22 Pedro Alves <palves@redhat.com>
2988 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2989 (remote_fileio_badfd, remote_fileio_return_errno)
2990 (remote_fileio_return_success, remote_fileio_func_open)
2991 (remote_fileio_func_open, remote_fileio_func_close)
2992 (remote_fileio_func_read, remote_fileio_func_write)
2993 (remote_fileio_func_lseek, remote_fileio_func_rename)
2994 (remote_fileio_func_unlink, remote_fileio_func_stat)
2995 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2996 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2997 remote_target parameter.
2998 (remote_fio_func_map) <func>: Add remote_target parameter.
2999 (do_remote_fileio_request, remote_fileio_request):
3000 * remote-fileio.h (remote_fileio_request):
3001 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3002 remote_target parameter.
3003 (remote_notif_process, handle_notification): Adjust to pass down
3005 (remote_notif_state_allocate): Add remote_target parameter. Save
3007 * remote-notif.h (struct remote_target): Forward declare.
3008 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3009 remote_target parameter.
3010 (struct remote_notif_state) <remote>: New field.
3011 (remote_notif_ack, remote_notif_parse): Add remote_target
3013 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3014 remote_target parameter.
3015 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3016 (threads_listing_context, rmt_thread_action, protocol_feature)
3017 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3018 (packet_result, struct threads_listing_context, remote_state):
3019 Move definitions and declarations higher up.
3020 (remote_target) <~remote_target>: Declare.
3021 (remote_download_command_source, remote_file_put, remote_file_get)
3022 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3023 (remote_hostio_pread_vFile, remote_hostio_send_command)
3024 (remote_hostio_set_filesystem, remote_hostio_open)
3025 (remote_hostio_close, remote_hostio_unlink, remote_state)
3026 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3027 (get_memory_write_packet_size, get_memory_read_packet_size)
3028 (append_pending_thread_resumptions, remote_detach_1)
3029 (append_resumption, remote_resume_with_vcont)
3030 (add_current_inferior_and_thread, wait_ns, wait_as)
3031 (process_stop_reply, remote_notice_new_inferior)
3032 (process_initial_stop_replies, remote_add_thread)
3033 (btrace_sync_conf, remote_btrace_maybe_reopen)
3034 (remove_new_fork_children, kill_new_fork_children)
3035 (discard_pending_stop_replies, stop_reply_queue_length)
3036 (check_pending_events_prevent_wildcard_vcont)
3037 (discard_pending_stop_replies_in_queue, stop_reply)
3038 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3039 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3040 (remote_interrupt_as, remote_interrupt_ns)
3041 (remote_get_noisy_reply, remote_query_attached)
3042 (remote_add_inferior, remote_current_thread, get_current_thread)
3043 (set_thread, set_general_thread, set_continue_thread)
3044 (set_general_process, write_ptid)
3045 (remote_unpack_thread_info_response, remote_get_threadinfo)
3046 (parse_threadlist_response, remote_get_threadlist)
3047 (remote_threadlist_iterator, remote_get_threads_with_ql)
3048 (remote_get_threads_with_qxfer)
3049 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3050 (get_offsets, remote_check_symbols, remote_supported_packet)
3051 (remote_query_supported, remote_packet_size)
3052 (remote_serial_quit_handler, remote_detach_pid)
3053 (remote_vcont_probe, remote_resume_with_hc)
3054 (send_interrupt_sequence, interrupt_query)
3055 (remote_notif_get_pending_events, fetch_register_using_p)
3056 (send_g_packet, process_g_packet, fetch_registers_using_g)
3057 (store_register_using_P, store_registers_using_G)
3058 (set_remote_traceframe, check_binary_download)
3059 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3060 (remote_xfer_live_readonly_partial, remote_read_bytes)
3061 (remote_send_printf, remote_flash_write, readchar)
3062 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3063 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3064 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3065 (extended_remote_disable_randomization, extended_remote_run)
3066 (send_environment_packet, extended_remote_environment_support)
3067 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3068 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3069 (packet_command): Now methods of ...
3070 (remote_target): ... this class.
3071 (m_remote_state) <remote_target>: New field.
3072 (struct remote_state) <stop_reply_queue,
3073 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3075 (remote_state::remote_state): Allocate stop_reply_queue.
3076 (remote_state): Delete global.
3077 (get_remote_state_raw): Delete.
3078 (remote_target::get_remote_state): Allocate m_remote_state on
3080 (get_current_remote_target): New.
3081 (remote_ops, extended_remote_ops): Delete.
3082 (wait_forever_enabled_p, remote_async_inferior_event_token):
3083 Delete, moved to struct remote_state.
3084 (remote_target::close): Delete self. Destruction bits split to
3086 (remote_target::~remote_target): ... this.
3087 (show_memory_packet_size): Adjust to use
3088 get_current_remote_target.
3089 (struct protocol_feature) <func>: Add remote_target parameter.
3090 All callers adjusted.
3091 (curr_quit_handler_target): New.
3092 (remote_serial_quit_handler): Reimplement.
3093 (remote_target::open_1): Adjust to use get_current_remote_target.
3094 Heap-allocate remote_target/extended_remote_target instances.
3095 (vcont_builder::vcont_builder): Add remote_target parameter, and
3096 save it in m_remote. All callers adjusted.
3097 (vcont_builder::m_remote): New field.
3098 (vcont_builder::restart, vcont_builder::flush)
3099 (vcont_builder::push_action): Use it.
3100 (remote_target::commit_resume): Use it.
3101 (struct queue_iter_param) <remote>: New field.
3102 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3103 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3104 (check_pending_event_prevents_wildcard_vcont_callback)
3105 (remote_target::check_pending_events_prevent_wildcard_vcont)
3106 (remote_target::discard_pending_stop_replies)
3107 (remote_target::discard_pending_stop_replies_in_queue)
3108 (remote_target::remote_notif_remove_queued_reply): Fill in
3110 (remote_notif_get_pending_events): New.
3111 (remote_target::readchar, remote_target::remote_serial_write):
3112 Save/restore curr_quit_handler_target.
3114 (kill_new_fork_children): Fill in 'remote' field.
3115 (packet_command): Use get_current_remote_target, defer to
3116 remote_target method of same name.
3117 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3118 parameter, and save it in m_remote. All callers adjusted.
3119 (scoped_remote_fd::release): Use m_remote.
3120 (scoped_remote_fd::m_remote): New field.
3121 (remote_file_put, remote_file_get, remote_file_delete): Use
3122 get_current_remote_target, defer to remote_target method of same
3124 (remote_btrace_reset): Add remote_state paremeter. Update all
3126 (remote_async_inferior_event_handler). Pass down 'data'.
3127 (remote_new_objfile): Use get_current_remote_target.
3128 (remote_target::vcont_r_supported): New.
3129 (set_range_stepping): Use get_current_remote_target and
3130 remote_target::vcont_r_supported.
3131 (_initialize_remote): Don't allocate 'remote_state' and
3132 'stop_reply_queue' globals.
3133 * remote.h (struct remote_target): Forward declare.
3134 (getpkt, putpkt, remote_notif_get_pending_events): Add
3135 'remote_target' parameter.
3137 2018-05-22 Pedro Alves <palves@redhat.com>
3139 * remote.c (vcont_builder): Now a class. Make all data members
3141 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3143 (vcont_builder_restart): Rename to ...
3144 (vcont_builder::restart): ... this.
3145 (vcont_builder_flush): Rename to ...
3146 (vcont_builder::flush): ... this.
3147 (vcont_builder_push_action): Rename to ...
3148 (vcont_builder::push_action): ... this.
3149 (remote_target::commit_resume): Adjust.
3151 2018-05-22 Pedro Alves <palves@redhat.com>
3153 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3154 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3155 (get_fixed_memory_packet_size): New.
3156 (get_memory_packet_size): Use it.
3157 (set_memory_packet_size): Don't override the config size with
3158 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3159 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3160 Don't refer to get_memory_packet_size if not connected to a remote
3161 target. Show "(default)" if configured size is 0.
3163 2018-05-22 Pedro Alves <palves@redhat.com>
3165 * remote.c (remote_target::mourn_inferior): Move
3166 discard_pending_stop_replies call here from ...
3167 (_initialize_remote): ... here.
3169 2018-05-22 Pedro Alves <palves@redhat.com>
3171 * remote.c (compare_section_command): Remove set_general_process
3174 2018-05-22 Pedro Alves <palves@redhat.com>
3176 * remote.c (struct packet_reg, struct remote_arch_state):
3177 Move higher up in the file.
3178 (remote_state) <m_arch_states>: Store remote_arch_state values
3179 instead of remote_arch_state pointers.
3180 (remote_state::get_remote_arch_state): Adjust.
3182 2018-05-22 Pedro Alves <palves@redhat.com>
3184 * remote.c: Include <unordered_map>.
3185 (remote_state): Now a class.
3186 (remote_state) <get_remote_arch_state>: Declare method.
3187 <get_remote_arch_state>: New field.
3188 (remote_arch_state) <remote_arch_state>: Declare ctor.
3189 <regs>: Now a unique_ptr.
3190 (remote_gdbarch_data_handle): Delete.
3191 (get_remote_arch_state): Delete.
3192 (remote_state::get_remote_arch_state): New.
3193 (get_remote_state): Adjust to call remote_state's
3194 get_remote_arch_state method.
3195 (init_remote_state): Delete, bits factored out to ...
3196 (remote_arch_state::remote_arch_state): ... this new method.
3197 (get_remote_packet_size, get_memory_packet_size)
3198 (process_g_packet, remote_target::fetch_registers)
3199 (remote_target::prepare_to_store, store_registers_using_G)
3200 (remote_target::store_registers, remote_target::get_trace_status):
3201 Adjust to call remote_state's method.
3202 (_initialize_remote): Remove reference to
3203 remote_gdbarch_data_handle.
3205 2018-05-22 Pedro Alves <palves@redhat.com>
3207 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3208 pread>: New method declarations.
3209 (remote_target::open_1): Adjust.
3210 (readahead_cache_invalidate): Rename to ...
3211 (readahead_cache::invalidate): ... this, and adjust to be a class
3213 (readahead_cache_invalidate_fd): Rename to ...
3214 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3216 (remote_hostio_pwrite): Adjust.
3217 (remote_hostio_pread_from_cache): Rename to ...
3218 (readahead_cache::pread): ... this, and adjust to be a class
3220 (remote_hostio_close): Adjust.
3222 2018-05-22 Pedro Alves <palves@redhat.com>
3224 * remote.c (remote_hostio_close_cleanup): Delete.
3225 (class scoped_remote_fd): New.
3226 (remote_file_put, remote_file_get): Use it.
3228 2018-05-22 Pedro Alves <palves@redhat.com>
3230 (struct vCont_action_support): Use bool and initialize all fields.
3231 (struct readahead_cache): Initialize all fields.
3232 (remote_state): Use bool and initialize all fields.
3233 (remote_state::remote_state, remote_state::~remote_state): New.
3234 (new_remote_state): Delete.
3235 (_initialize_remote): Use new to allocate remote_state.
3237 2018-05-22 Pedro Alves <palves@redhat.com>
3241 * c-exp.y: Include "c-support.h".
3242 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3243 of tolower. Use c_ident_is_alpha to scan names.
3244 * c-lang.c: Include "c-support.h".
3245 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3246 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3247 * c-support.h: New file, with bits factored out from ...
3248 * cp-name-parser.y: ... this file.
3249 Include "c-support.h".
3250 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3251 c-support.h and renamed.
3252 (symbol_end, yylex): Adjust.
3254 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3256 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3257 parameter type to CORE_ADDR.
3258 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3259 parameter type in declaration to CORE_ADDR.
3260 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3261 target_auxv_search to get AT_HWCAP and use the result to get the
3263 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3264 to CORE_ADDR. Remove the cast of the return value to unsigned
3265 long. Fix error predicate of target_auxv_search.
3266 (ppc_linux_nat_target::read_description): Change the type of the
3267 hwcap variable to CORE_ADDR.
3269 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3271 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3272 if the size of fpscr is larger than 32 bits.
3274 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3276 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3277 (ppc32_linux_vsxregmap): New global.
3278 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3279 regcache_supply_regset, and regcache_collect_regset.
3280 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3281 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3282 (fetch_vsx_register, store_vsx_register): Remove.
3283 (fetch_vsx_registers): Add regno parameter. Get regset using
3284 ppc_linux_vsxregset. Use regset to supply registers.
3285 (store_vsx_registers): Add regno parameter. Get regset using
3286 ppc_linux_vsxregset. Use regset to collect registers.
3287 (fetch_register): Call fetch_vsx_registers instead of
3289 (store_register): Call store_vsx_registers instead of
3291 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3292 new regno parameter.
3293 (store_ppc_registers): Call store_vsx_registers with -1 for the
3294 new regno parameter.
3295 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3296 (ppc_collect_vsxregset): Remove.
3298 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3300 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3302 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3303 for vector register offset fields.
3304 (ppc64_fbsd_reg_offsets): Likewise.
3305 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3306 to vector register offset fields.
3307 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3308 to vector register offset fields.
3309 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3310 vector register offset fields.
3311 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3312 initializers for vector register offset fields.
3313 (rs6000_aix64_reg_offsets): Likewise.
3314 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3315 (ppc_supply_vrregset): Remove.
3316 (ppc_collect_vrregset): Remove.
3317 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3318 (ppc_linux_vrregset) : New function.
3319 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3320 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3321 (ppc32_linux_vrregset): Remove.
3322 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3323 and use result instead of ppc32_linux_vrregset.
3324 (ppc32_linux_reg_offsets): Remove initializers for vector register
3326 (ppc64_linux_reg_offsets): Likewise.
3327 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3328 * ppc-linux-nat.c: Include regset.h.
3329 (gdb_vrregset_t): Adjust comment to account for little-endian
3331 (supply_vrregset, fill_vrregset): Remove.
3332 (fetch_altivec_register, store_altivec_register): Remove.
3333 (fetch_altivec_registers): Add regno parameter. Get regset using
3334 ppc_linux_vrregset. Use regset to supply registers.
3335 (store_altivec_registers): Add regno parameter. Get regset using
3336 ppc_linux_vrregset. Use regset to collect registers.
3337 (fetch_register): Call fetch_altivec_registers instead of
3338 fetch_altivec_register.
3339 (store_register): Call store_altivec_registers instead of
3340 store_altivec_register.
3341 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3342 the new regno parameter.
3343 (store_ppc_registers): Call store_altivec_registers with -1 for
3344 the new regno parameter.
3346 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3348 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3349 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3350 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3351 (gdb_vrregset_t): Change array type size to
3352 PPC_LINUX_SIZEOF_VRREGSET.
3353 (gdb_vsxregset_t): Change array type size to
3354 PPC_LINUX_SIZEOF_VSXREGSET.
3355 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3356 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3357 PPC_LINUX_SIZEOF_VSXREGSET.
3359 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3361 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3362 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3364 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3365 ppc_linux_target_wordsize with tid.
3366 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3368 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3369 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3370 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3371 tid parameter. Remove static specifier.
3372 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3373 (ppc_linux_target_wordsize): New declaration.
3375 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3377 * arch/ppc-linux-common.c: New file.
3378 * arch/ppc-linux-common.h: New file.
3379 * arch/ppc-linux-tdesc.h: New file.
3380 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3381 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3382 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3383 arch/ppc-linux-tdesc.h.
3384 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3385 arch/ppc-linux-tdesc.h.
3386 (ppc_linux_nat_target::read_description): Remove target
3387 description matching code. Fill a ppc_linux_features struct and
3388 call ppc_linux_match_description with it. Move comment about ISA
3389 2.05 to ppc-linux-common.c.
3390 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3391 arch/ppc-linux-tdesc.h.
3392 (ppc_linux_core_read_description): Remove target description
3393 matching code. Fill a ppc_linux_features struct and call
3394 ppc_linux_match_description with it.
3395 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3396 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3397 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3398 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3399 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3400 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3401 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3402 (tdesc_powerpc_e500l): Remove.
3404 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3406 * ada-lang.c (catch_assert_command): Pass empty string instead
3407 of NULL for excep_string argument.
3409 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3411 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3412 the width of the requested register exceeds the width of the
3415 2018-05-21 Tom Tromey <tom@tromey.com>
3417 * printcmd.c (output_command): Remove.
3418 (output_command_const): Rename to output_command.
3419 * valprint.h (output_command): Rename from output_command_const.
3420 * tracepoint.c (trace_dump_actions): Call output_command.
3422 2018-05-21 Tom Tromey <tom@tromey.com>
3424 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3425 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3426 * ada-lang.h (create_ada_exception_catchpoint): Update.
3427 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3429 (create_excep_cond_exprs, ~ada_catchpoint)
3430 (should_stop_exception, print_one_exception)
3431 (print_mention_exception, print_recreate_exception): Update.
3432 (ada_get_next_arg): Remove.
3433 (catch_ada_exception_command_split): Use std::string. Change type
3434 of "excep_string", "cond_string".
3435 (catch_ada_exception_command): Update.
3436 (create_ada_exception_catchpoint): Change type of excep_string.
3437 (ada_exception_sal): Remove excep_string parameter.
3438 (~ada_catchpoint): Remove.
3440 2018-05-21 Tom Tromey <tom@tromey.com>
3442 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3445 2018-05-21 Tom Tromey <tom@tromey.com>
3447 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3448 Return unique_xmalloc_ptr.
3449 (print_it_exception): Update.
3451 2018-05-21 Tom Tromey <tom@tromey.com>
3453 * tracepoint.c (trace_dump_actions): Use std::string.
3455 2018-05-21 Tom Tromey <tom@tromey.com>
3457 * symfile.c (reread_symbols): Use std::string for original_name.
3459 2018-05-21 Tom Tromey <tom@tromey.com>
3461 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3462 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3465 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3467 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3469 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3470 * objfiles.c (get_objfile_bfd_data): Allocate
3471 objfile_per_bfd_storage with obstack_new when allocating on
3474 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3476 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3478 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3479 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3480 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3481 (add_pending): Likewise.
3482 (parse_symbol): Likewise.
3483 (parse_partial_symbols): Likewise.
3484 (psymtab_to_symtab_1): Likewise.
3485 (new_psymtab): Likewise.
3486 (elfmdebug_build_psymtabs): Likewise.
3487 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3488 * objfiles.c (get_objfile_bfd_data): Likewise.
3489 (objfile_register_static_link): Likewise.
3490 * psymtab.c (allocate_psymtab): Likewise.
3491 * stabsread.c (read_member_functions): Likewise.
3492 * xcoffread.c (xcoff_end_psymtab): Likewise.
3494 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3496 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3497 compiler supports std::is_trivially_constructible.
3498 * common/poison.h: Include obstack.h.
3499 (IsMallocable): Define to is_trivially_constructible if the
3500 compiler supports it, define to true_type otherwise.
3504 (XOBNEWVEC): Redefine.
3505 * gdb_obstack.h (obstack_zalloc): New.
3506 (OBSTACK_ZALLOC): Redefine.
3507 (obstack_calloc): New.
3508 (OBSTACK_CALLOC): Redefine.
3510 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3511 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3513 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3514 obstack_calloc/obstack_zalloc.
3515 (gdbarch_obstack_zalloc): Remove.
3516 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3518 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3520 * stack.c (backtrace_command_1): Remove useless variable int i.
3522 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3524 * stack.c (print_frame_info): Fix comment.
3526 2018-05-18 Tom Tromey <tom@tromey.com>
3528 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3529 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3530 (~dwarf2_per_objfile): Update
3531 (dwarf2_get_dwz_file): Use new.
3532 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3535 2018-05-18 Tom Tromey <tom@tromey.com>
3537 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3539 * dwarf2read.c (struct dwp_file): Add constructor and
3541 (open_and_init_dwp_file): Return a unique_ptr.
3542 (dwarf2_per_objfile, create_dwp_hash_table)
3543 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3544 (lookup_dwo_unit_in_dwp): Update.
3545 (open_and_init_dwp_file, get_dwp_file): Update.
3547 2018-05-18 Tom Tromey <tom@tromey.com>
3549 * dwarf2read.c (dwarf2_per_objfile): Update.
3550 (struct mapped_index): Add initializers.
3551 (dwarf2_read_index): Use new.
3552 (dw2_symtab_iter_init): Update.
3553 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3556 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3558 * dwarf2read.c (mapped_index) <total_size>: Remove.
3560 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3562 * unittests/format_pieces-selftests.c (test_format_specifier):
3565 2018-05-18 Tom Tromey <tom@tromey.com>
3567 * c-typeprint.c (maybe_print_hole): New function.
3568 (c_print_type_struct_field_offset): Update.
3569 (c_type_print_base_struct_union): Call maybe_print_hole.
3571 2018-05-17 Keith Seitz <keiths@redhat.com>
3573 * breakpoint.c (build_bpstat_chain): New function, moved from
3575 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3576 If no stop chain is passed, call build_bpstat_chain to build it.
3577 * breakpoint.h (build_bpstat_chain): Declare.
3578 (bpstat_stop_status): Move documentation here from breakpoint.c.
3579 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3580 build the stop chain and pass it to skip_inline_frames.
3581 Pass this stop chain to bpstat_stop_status.
3582 * inline-frame.c: Include breakpoint.h.
3583 (stopped_by_user_bp_inline_frame): New function.
3584 (skip_inline_frames): Add parameter `stop_chain'.
3585 Move documention to inline-frame.h.
3586 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3587 whether the frame should be elided.
3588 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3589 Add moved documentation and update for new parameter.
3591 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3594 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3595 unittests/format_pieces-selftests.c.
3596 * common/format.h (format_piece) <operator==>: New.
3597 (format_pieces) <operator[]>: Remove.
3598 * common/format.c (format_pieces::format_pieces): Handle \e.
3599 * unittests/format_pieces-selftests.c: New.
3601 2018-05-17 Tom Tromey <tom@tromey.com>
3604 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3605 (dw2_instantiate_symtab): Add skip_partial parameter.
3606 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3607 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3608 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3609 (dw2_expand_symtabs_matching_one)
3610 (dw2_find_pc_sect_compunit_symtab)
3611 (dw2_debug_names_lookup_symbol)
3612 (dw2_debug_names_expand_symtabs_for_function): Update.
3613 (init_cutu_and_read_dies): Add skip_partial parameter.
3614 (process_psymtab_comp_unit, build_type_psymtabs_1)
3615 (process_skeletonless_type_unit, load_partial_comp_unit)
3616 (psymtab_to_symtab_1): Update.
3617 (load_full_comp_unit): Add skip_partial parameter.
3618 (process_imported_unit_die, dwarf2_read_addr_index)
3619 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3620 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3621 (read_signatured_type): Update.
3623 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3625 * value.c (release_value): Remove unused variable.
3626 (record_latest_value): Likewise.
3627 (access_value_history): Likewise.
3628 (preserve_values): Likewise.
3630 2018-05-17 Tom Tromey <tom@tromey.com>
3632 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3635 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3638 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3639 Also handle registers whose width is not a multiple of
3641 (linux_nat_trad_target::store_register): Likewise.
3643 2018-05-16 Tom Tromey <tom@tromey.com>
3645 * gdbcore.h (core_bfd): Redefine.
3646 * corelow.c (core_target::close): Update.
3647 (core_target_open): Update.
3648 * progspace.h (struct program_space) <cbfd>: Now a
3651 2018-05-16 Tom Tromey <tom@tromey.com>
3654 * symfile-add-flags.h (enum symfile_add_flags)
3655 <SYMFILE_NOT_FILENAME>: New constant.
3656 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3657 objfile name from BFD.
3658 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3659 * minidebug.c (find_separate_debug_file_in_section): Put
3660 ".gnu_debugdata" into BFD's file name.
3662 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3664 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3667 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3670 * aarch64-tdep.c (aarch64_analyze_prologue,
3671 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3672 Indicate not interested in errors.
3674 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3676 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3677 Supply the MIPS_ZERO_REGNUM register.
3679 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3681 * mips-tdep.c (mask_address_var): Make variable static.
3683 2018-05-14 Tom Tromey <tom@tromey.com>
3685 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3687 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3689 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3690 FXSAVE_ADDR for the mxcsr register.
3692 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3694 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3696 2018-05-11 Pedro Alves <palves@redhat.com>
3698 * corelow.c (core_target) <core_target>: No longer inline.
3699 Initialize m_core_gdbarch, m_core_vec and build the section table
3701 <~core_target>: New.
3702 <core_gdbarch, get_core_register_section>: New methods.
3703 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3704 factored out from ...
3705 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3707 (sniff_core_bfd): Add gdbarch parameter.
3708 (core_close): Delete, merged into ...
3709 (core_target::close): ... here. Delete self.
3710 (core_close_cleanup): Delete.
3711 (core_target_open): Allocate a core_target on the heap. Use a
3712 unique_ptr instead of a cleanup. Bits moved into the core_target
3713 ctor. Adjust to use core_target methods instead of globals.
3714 (get_core_register_section): Rename to ...
3715 (core_target::get_core_register_section): ... this and adjust.
3716 (struct get_core_registers_cb_data): New.
3717 (get_core_registers_cb): Use it. Use bool.
3718 (core_target::fetch_registers, core_target::files_info)
3719 (core_target::xfer_partial, core_target::read_description)
3720 (core_target::pid_to, core_target::thread_name): Adjust to
3721 reference class fields instead of globals.
3722 * target.h (struct target_ops_deleter, target_ops_up): New.
3724 2018-05-11 Pedro Alves <palves@redhat.com>
3726 * corefile.c (core_file_command): Move to corelow.c.
3727 * corelow.c (the_core_target): Delete.
3728 (core_file_command): Moved from corefile.c. Check exec_bfd
3729 instead of the_core_target. Use target_detach instead of calling
3730 into the_core_target directly.
3731 (maybe_say_no_core_file_now): New.
3732 (core_target::detach): Use it.
3733 (_initialize_corelow): Remove references to the_core_target.
3734 * gdbcore.h (the_core_target): Delete.
3736 2018-05-11 Tom Tromey <tromey@redhat.com>
3737 Pedro Alves <palves@redhat.com>
3739 * corefile.c (core_bfd): Remove.
3740 * gdbcore.h (core_bfd): Now a macro.
3741 * progspace.h (struct program_space) <cbfd>: New field.
3743 2018-05-11 Tom Tromey <tom@tromey.com>
3745 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3748 2018-05-10 Tom Tromey <tom@tromey.com>
3750 * configure: Rebuild.
3751 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3753 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3756 * regformats/regdat.sh: Adjust script, following the addition
3757 of the new expedite_regs parameter to init_target_desc.
3759 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3762 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3763 set_gdbarch_significant_addr_bit.
3764 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3765 set_gdbarch_significant_addr_bit.
3766 * utils.c (address_significant): Update to sign extend addr.
3768 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3770 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3771 (xtensa_linux_init_abi): Limit tdep->num_regs by
3772 tdep->num_nopriv_regs.
3773 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3774 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3777 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3779 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3781 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3783 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3784 (I387_MXCSR_INIT_VAL): New constant.
3785 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3786 buffer if it was supplied by the inferior.
3787 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3788 (i387_xsave_get_clear_bv): New function.
3789 (i387_supply_xsave): Only read x87 control registers from the
3790 xsave buffer if the feature is enabled, and the state will have
3791 been written, otherwise, provide a suitable default.
3792 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3793 including x87 control registers. Update control registers if they
3794 have changed from the default value, and mark features as enabled
3796 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3798 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3800 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3802 2018-05-07 Tom Tromey <tom@tromey.com>
3804 * configure: Rebuild.
3805 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3807 2018-05-07 Tom Tromey <tom@tromey.com>
3810 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3811 bit. Use correct value for VDIV.
3813 2018-05-04 Tom Tromey <tom@tromey.com>
3815 * configure: Rebuild.
3816 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3818 2018-05-04 Tom Tromey <tom@tromey.com>
3820 * linux-record.c (record_linux_system_call) <case
3821 RECORD_SYS_RECVFROM>: Add "break".
3823 2018-05-04 Tom Tromey <tom@tromey.com>
3825 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3826 Add missing "break".
3827 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3828 Add missing "break".
3830 2018-05-04 Tom Tromey <tom@tromey.com>
3832 * rs6000-tdep.c (ppc_process_record_op4)
3833 (ppc_process_record_op63): Add fall-through comment.
3835 2018-05-04 Tom Tromey <tom@tromey.com>
3837 * i386-tdep.c (i386_process_record): Add fall-through comment.
3839 2018-05-04 Tom Tromey <tom@tromey.com>
3841 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3844 2018-05-04 Tom Tromey <tom@tromey.com>
3846 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3847 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3848 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3850 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3852 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3855 2018-05-04 Tom Tromey <tom@tromey.com>
3857 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3859 2018-05-04 Tom Tromey <tom@tromey.com>
3861 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3862 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3863 * symfile.c (section_is_mapped): Fix fall-through comment.
3864 * stabsread.c (define_symbol, read_member_functions): Fix
3865 fall-through comment.
3866 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3868 * remote.c (remote_wait_as): Fix fall-through comment.
3869 * p-exp.y (yylex): Fix fall-through comment.
3870 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3872 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3873 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3874 * jv-exp.y (yylex): Fix fall-through comment.
3875 * go-exp.y (lex_one_token): Fix fall-through comment.
3876 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3877 fall-through comment.
3878 * f-exp.y (yylex): Fix fall-through comment.
3879 * dwarf2read.c (process_die): Fix fall-through comments.
3880 * dbxread.c (process_one_symbol): Fix fall-through comment.
3881 * d-exp.y (lex_one_token): Fix fall-through comment.
3882 * cp-name-parser.y (yylex): Fix fall-through comment.
3883 * coffread.c (coff_symtab_read): Fix fall-through comment.
3884 * c-exp.y (lex_one_token): Fix fall-through comment.
3885 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3887 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3890 2018-05-04 Tom Tromey <tom@tromey.com>
3893 * NEWS: Mention gdb.execute change.
3894 * gdbcmd.h (execute_control_command): Don't declare.
3895 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3896 execute_control_commands, execute_control_commands_to_string.
3897 * cli/cli-script.h (execute_control_commands)
3898 (execute_control_commands_to_string): Declare.
3899 (execute_control_command): Add from_tty parameter.
3900 * cli/cli-script.c (execute_control_commands)
3901 (execute_control_commands_to_string): New functions.
3902 (execute_user_command): Use execute_control_commands.
3903 (execute_control_command_1): Add "from_tty" parameter. Update.
3904 (execute_control_command): Likewise.
3906 2018-05-04 Tom Tromey <tom@tromey.com>
3909 * NEWS: Mention that breakpoint commands are writable.
3910 * python/py-breakpoint.c (bppy_set_commands): New function.
3911 (breakpoint_object_getset) <"commands">: Use it.
3913 2018-05-04 Tom Tromey <tom@tromey.com>
3915 * tracepoint.c (actions_command): Update.
3916 * mi/mi-cmd-break.c (mi_command_line_array)
3917 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3918 (mi_read_next_line): Remove.
3919 (mi_cmd_break_commands): Update.
3920 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3922 * cli/cli-script.c (get_command_line): Update.
3923 (process_next_line): Use function_view. Constify.
3924 (recurse_read_control_structure, read_command_lines)
3925 (read_command_lines_1): Change argument types to function_view.
3926 (do_define_command, document_command): Update.
3927 * breakpoint.h (check_tracepoint_command): Don't declare.
3928 * breakpoint.c (check_tracepoint_command): Remove.
3929 (commands_command_1, create_tracepoint_from_upload): Update.
3931 2018-05-04 Tom Tromey <tom@tromey.com>
3934 * cli/cli-script.h (enum command_control_type) <define_control>:
3936 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3937 (build_command_line, execute_control_command_1)
3938 (process_next_line): Likewise.
3939 (do_define_command): New function, extracted from define_command.
3940 (define_command): Use it.
3942 2018-05-04 Tom Tromey <tom@tromey.com>
3944 * tracepoint.c (actions_command): Update.
3945 * cli/cli-script.h (read_command_lines): Update.
3946 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3947 (MAX_TMPBUF): Remove define.
3948 (define_command): Use string_printf.
3949 (document_command): Likewise.
3950 * breakpoint.c (commands_command_1): Update.
3952 2018-05-04 Tom Tromey <tom@tromey.com>
3954 * top.c (execute_command): Update.
3955 * cli/cli-script.h (print_command_lines): Now varargs.
3956 * cli/cli-script.c (print_command_lines): Now varargs.
3957 (execute_control_command_1) <case while_control, case if_control>:
3960 2018-05-04 Tom Tromey <tom@tromey.com>
3962 * tracepoint.c (all_tracepoint_actions): Rename from
3963 all_tracepoint_actions_and_cleanup. Change return type.
3964 (actions_command, encode_actions_1, encode_actions)
3965 (trace_dump_actions, tdump_command): Update.
3966 * remote.c (remote_download_command_source): Update.
3967 * python/python.c (gdbpy_eval_from_control_command)
3968 (python_command, python_interactive_command): Update.
3969 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3970 * guile/guile.c (guile_command)
3971 (gdbscm_eval_from_control_command, guile_command): Update.
3972 * compile/compile.c (compile_code_command)
3973 (compile_print_command, compile_to_object): Update.
3974 * cli/cli-script.h (struct command_lines_deleter): New.
3975 (counted_command_line): New typedef.
3976 (struct command_line): Add constructor, destructor.
3977 <body_list>: Remove.
3978 <body_list_0, body_list_1>: New members.
3979 (command_line_up): Remove typedef.
3980 (read_command_lines, read_command_lines_1, get_command_line):
3982 (copy_command_lines): Don't declare.
3983 * cli/cli-script.c (build_command_line): Use "new".
3984 (get_command_line): Return counted_command_line.
3985 (print_command_lines, execute_user_command)
3986 (execute_control_command_1, while_command, if_command): Update.
3987 (realloc_body_list): Remove.
3988 (process_next_line, recurse_read_control_structure): Update.
3989 (read_command_lines, read_command_lines_1): Return counted_command_line.
3990 (free_command_lines): Use "delete".
3991 (copy_command_lines): Remove.
3992 (define_command, document_command, show_user_1): Update.
3993 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3994 a counted_command_line.
3995 * breakpoint.h (counted_command_line): Remove typedef.
3996 (breakpoint_set_commands): Update.
3997 * breakpoint.c (check_no_tracepoint_commands)
3998 (validate_commands_for_breakpoint): Update.
3999 (breakpoint_set_commands): Change commands to be a
4000 counted_command_line.
4001 (commands_command_1, update_dprintf_command_list)
4002 (create_tracepoint_from_upload): Update.
4004 2018-05-04 Tom Tromey <tom@tromey.com>
4006 * cli/cli-decode.h (cmd_list_element): New constructor.
4007 (~cmd_list_element): New destructor.
4008 (struct cmd_list_element): Add initializers.
4009 * cli/cli-decode.c (do_add_cmd): Use "new".
4010 (delete_cmd): Use "delete".
4012 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4013 Pedro Alves <palves@redhat.com>
4015 PR breakpoints/19806 and support for PR external/20207.
4016 * NEWS: Mention Aarch64 watchpoint improvements.
4017 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4018 watchpoints and PR external/20207 watchpoints.
4019 * nat/aarch64-linux-hw-point.c
4020 (kernel_supports_any_contiguous_range): New.
4021 (aarch64_watchpoint_offset): New.
4022 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4023 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4024 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4025 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4026 next_addr_orig_p. Support PR external/20207 watchpoints.
4027 (aarch64_downgrade_regs): New.
4028 (aarch64_dr_state_insert_one_point): New parameters offset and
4030 (aarch64_dr_state_remove_one_point): Likewise.
4031 (aarch64_handle_breakpoint): Update caller.
4032 (aarch64_handle_aligned_watchpoint): Likewise.
4033 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4035 (aarch64_linux_set_debug_regs): Remove const from state. Call
4036 aarch64_downgrade_regs.
4037 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4038 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4039 (DR_CONTROL_MASK): ... this.
4040 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4041 (unsigned int aarch64_watchpoint_offset): New prototype.
4042 (aarch64_linux_set_debug_regs): Remove const from state.
4043 * utils.c (align_up, align_down): Move to ...
4044 * common/common-utils.c (align_up, align_down): ... here.
4045 * utils.h (align_up, align_down): Move to ...
4046 * common/common-utils.h (align_up, align_down): ... here.
4048 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4050 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4051 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4052 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4053 Re-implement to match the ABI as summarized in GCC's
4054 gcc/config/sparc/sparc.c. All callers updated.
4055 (sparc32_store_arguments): Remove assertion.
4057 2018-05-04 Tom Tromey <tom@tromey.com>
4059 * printcmd.c: Don't include tui.h.
4060 (decode_format): Use skip_spaces.
4062 2018-05-04 Tom Tromey <tom@tromey.com>
4065 * printcmd.c (last_count): New global.
4066 (x_command): Use saved count when repeating.
4068 2018-05-04 Tom Tromey <tom@tromey.com>
4070 * nto-procfs.c (do_closedir_cleanup): Remove.
4071 (procfs_pidlist): Use gdb_dir_up.
4072 * procfs.c (do_closedir_cleanup): Remove.
4073 (proc_update_threads): Use gdb_dir_up.
4074 * common/filestuff.h (struct gdb_dir_deleter): New.
4075 (gdb_dir_up): New typedef.
4077 2018-05-04 Tom Tromey <tom@tromey.com>
4079 * ada-lang.c (print_mention_exception): Use std::string.
4081 2018-05-04 Tom Tromey <tom@tromey.com>
4083 * ada-lang.c (create_excep_cond_exprs): Update.
4084 (ada_exception_catchpoint_cond_string): Use std::string.
4086 2018-05-04 Tom Tromey <tom@tromey.com>
4088 * ada-lang.c (xget_renaming_scope): Return std::string.
4089 (old_renaming_is_invisible): Update.
4091 2018-05-04 Tom Tromey <tom@tromey.com>
4093 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4094 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4096 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4098 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4100 2018-05-04 Tom Tromey <tom@tromey.com>
4102 * remote.c (remote_query_supported_append): Change type.
4103 (remote_check_symbols): Update.
4105 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4108 * configure.ac: Prepend libpython.
4109 * python/python-config.py: Likewise.
4110 * configure: Regenerate.
4112 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4114 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4116 2018-05-03 Pedro Alves <palves@redhat.com>
4119 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4120 override. Write 'true' instead of '1'.
4121 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4124 2018-05-02 Pedro Alves <palves@redhat.com>
4126 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4127 add_inf_child_target.
4128 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4129 add_inf_child_target.
4130 * aix-thread.c (aix_thread_target_info): New.
4131 (aix_thread_target) <shortname, longname, doc>: Delete.
4133 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4134 add_inf_child_target.
4135 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4136 add_inf_child_target.
4137 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4138 add_inf_child_target.
4139 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4140 add_inf_child_target.
4141 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4142 add_inf_child_target.
4143 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4144 add_inf_child_target.
4145 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4146 add_inf_child_target.
4147 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4148 add_inf_child_target.
4149 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4150 add_inf_child_target.
4151 * bfd-target.c (target_bfd_target_info): New.
4152 (target_bfd) <shortname, longname, doc>: Delete.
4154 * bsd-kvm.c (bsd_kvm_target_info): New.
4155 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4157 (bsd_kvm_target::open): Rename to ...
4158 (bsd_kvm_target_open): ... this. Adjust.
4159 * bsd-uthread.c (bsd_uthread_target_info): New.
4160 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4162 * corefile.c (core_file_command): Adjust.
4163 * corelow.c (core_target_info): New.
4164 (core_target) <shortname, longname, doc>: Delete.
4166 (core_target::open): Rename to ...
4167 (core_target_open): ... this. Adjust.
4168 * ctf.c (ctf_target_info): New.
4169 (ctf_target) <shortname, longname, doc>: Delete.
4171 (ctf_target::open): Rename to ...
4172 (ctf_target_open): ... this.
4173 (_initialize_ctf): Adjust.
4174 * exec.c (exec_target_info): New.
4175 (exec_target) <shortname, longname, doc>: Delete.
4177 (exec_target::open): Rename to ...
4178 (exec_target_open): ... this.
4179 * gdbcore.h (core_target_open): Declare.
4180 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4181 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4182 add_inf_child_target.
4183 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4184 add_inf_child_target.
4185 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4186 add_inf_child_target.
4187 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4188 add_inf_child_target.
4189 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4190 add_inf_child_target.
4191 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4192 add_inf_child_target.
4193 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4194 add_inf_child_target.
4195 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4196 add_inf_child_target.
4197 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4198 add_inf_child_target.
4199 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4200 add_inf_child_target.
4201 * inf-child.c (inf_child_target_info): New.
4202 (inf_child_target::info): New.
4203 (inf_child_open_target): Remove 'target' parameter. Use
4204 get_native_target instead.
4205 (inf_child_target::open): Delete.
4206 (add_inf_child_target): New.
4207 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4210 (add_inf_child_target): Declare.
4211 (inf_child_open_target): Declare.
4212 * linux-thread-db.c (thread_db_target_info): New.
4213 (thread_db_target) <shortname, longname, doc>: Delete.
4215 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4216 add_inf_child_target.
4217 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4218 add_inf_child_target.
4219 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4220 add_inf_child_target.
4221 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4222 add_inf_child_target.
4223 * make-target-delegates (print_class): Adjust.
4224 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4225 add_inf_child_target.
4226 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4227 add_inf_child_target.
4228 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4229 add_inf_child_target.
4230 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4231 add_inf_child_target.
4232 * nto-procfs.c (nto_native_target_info): New.
4233 (nto_procfs_target_native) <shortname, longname, doc>:
4236 (nto_procfs_target_info): New.
4237 (nto_procfs_target_procfs) <shortname, longname, doc>:
4240 (init_procfs_targets): Adjust.
4241 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4242 add_inf_child_target.
4243 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4244 add_inf_child_target.
4245 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4246 add_inf_child_target.
4247 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4248 add_inf_child_target.
4249 * ravenscar-thread.c (ravenscar_target_info): New.
4250 (ravenscar_thread_target) <shortname, longname, doc>:
4253 * record-btrace.c (record_btrace_target_info):
4254 (record_btrace_target) <shortname, longname, doc>: Delete.
4256 (record_btrace_target::open): Rename to ...
4257 (record_btrace_target_open): ... this. Adjust.
4258 * record-full.c (record_longname, record_doc): New.
4259 (record_full_base_target) <shortname, longname, doc>: Delete.
4261 (record_full_target_info): New.
4262 (record_full_target): <shortname>: Delete.
4264 (record_full_core_open_1, record_full_open_1): Update comments.
4265 (record_full_base_target::open): Rename to ...
4266 (record_full_open): ... this.
4267 (cmd_record_full_restore): Update.
4268 (_initialize_record_full): Update.
4269 * remote-sim.c (remote_sim_target_info): New.
4270 (gdbsim_target) <shortname, longname, doc>: Delete.
4272 (gdbsim_target::open): Rename to ...
4273 (gdbsim_target_open): ... this.
4274 (_initialize_remote_sim): Adjust.
4275 * remote.c (remote_doc): New.
4276 (remote_target_info): New.
4277 (remote_target) <shortname, longname, doc>: Delete.
4279 (extended_remote_target_info): New.
4280 (extended_remote_target) <shortname, longname, doc>: Delete.
4282 (remote_target::open_1): Make static. Adjust.
4283 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4284 * s390-linux-nat.c (_initialize_s390_nat): Use
4285 add_inf_child_target.
4286 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4287 add_inf_child_target.
4288 * sol-thread.c (thread_db_target_info): New.
4289 (sol_thread_target) <shortname, longname, doc>: Delete.
4291 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4292 add_inf_child_target.
4293 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4294 add_inf_child_target.
4295 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4296 add_inf_child_target.
4297 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4298 add_inf_child_target.
4299 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4300 add_inf_child_target.
4301 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4302 add_inf_child_target.
4303 * spu-linux-nat.c (_initialize_spu_nat): Use
4304 add_inf_child_target.
4305 * spu-multiarch.c (spu_multiarch_target_info): New.
4306 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4308 * target-delegates.c: Regenerate.
4309 * target.c: Include <unordered_map>.
4310 (target_ops_p): Delete.
4311 (DEF_VEC_P(target_ops_p)): Delete.
4312 (target_factories): New.
4313 (test_target_info): New.
4314 (test_target_ops::info): New.
4315 (open_target): Adjust to use target_factories.
4316 (add_target_with_completer): Rename to ...
4317 (add_target): ... this. Change prototype. Register target_info
4318 and open callback in target_factories. Register target_info in
4319 command context instead of target_ops.
4320 (add_target): Delete old implementation.
4321 (add_deprecated_target_alias): Change prototype. Adjust.
4322 (the_native_target): New.
4323 (set_native_target, get_native_target): New.
4324 (find_default_run_target): Use the_native_target.
4325 (find_attach_target, find_run_target): Simplify.
4326 (target_ops::open): Delete.
4327 (dummy_target_info): New.
4328 (dummy_target::shortname, dummy_target::longname)
4329 (dummy_target::doc): Delete.
4330 (dummy_target::info): New.
4331 (debug_target::shortname, debug_target::longname)
4332 (debug_target::doc): Delete.
4333 (debug_target::info): New.
4334 * target.h (struct target_info): New.
4335 (target_ops::~target_ops): Add comment.
4336 (target_ops::info): New.
4337 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4338 longer virtual. Implement in terms of target_info.
4339 (set_native_target, get_native_target): Declare.
4340 (target_open_ftype): New.
4341 (add_target, add_target_with_completer)
4342 (add_deprecated_target_alias): Change prototype.
4343 (test_target) <shortname, longname, doc>: Delete.
4345 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4346 add_inf_child_target.
4347 * tracefile-tfile.c (tfile_target_info): New.
4348 (tfile_target) <shortname, longname, doc>: Delete.
4350 (tfile_target::open): Rename to ...
4351 (tfile_target_open): ... this.
4352 (_initialize_tracefile_tfile): Adjust.
4353 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4354 add_inf_child_target.
4355 * windows-nat.c (_initialize_windows_nat): Use
4356 add_inf_child_target.
4357 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4358 add_inf_child_target.
4360 2018-05-02 Pedro Alves <palves@redhat.com>
4362 * linux-nat.h (linux_nat_target) <low_new_thread,
4363 low_delete_thread, low_new_fork, low_forget_process,
4364 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4365 New virtual methods.
4366 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4367 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4368 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4369 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4370 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4372 * linux-fork.c (delete_fork): Adjust to call low method.
4373 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4374 (linux_nat_new_fork, linux_nat_forget_process_hook)
4375 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4376 (linux_nat_status_is_event):
4377 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4378 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4380 (sigtrap_is_event): Rename to ...
4381 (linux_nat_target::low_status_is_event): ... this.
4382 (linux_nat_set_status_is_event): Delete.
4383 (save_stop_reason, linux_nat_wait_1)
4384 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4386 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4387 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4388 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4389 (linux_nat_set_prepare_to_resume): Delete.
4390 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4391 low virtual methods.
4392 * amd64-linux-nat.c: Likewise.
4393 * arm-linux-nat.c: Likewise.
4394 * i386-linux-nat.c: Likewise.
4395 * ia64-linux-nat.c: Likewise.
4396 * mips-linux-nat.c: Likewise.
4397 * ppc-linux-nat.c: Likewise.
4398 * s390-linux-nat.c: Likewise.
4399 * sparc64-linux-nat.c: Likewise.
4400 * x86-linux-nat.c: Likewise.
4401 * x86-linux-nat.h: Include "nat/x86-linux.h".
4402 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4403 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4406 2018-05-02 Pedro Alves <palves@redhat.com>
4408 * target.h (target_ops)
4409 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4410 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4411 stopped_by_watchpoint, have_continuable_watchpoint,
4412 stopped_data_address, watchpoint_addr_within_range,
4413 can_accel_watchpoint_condition, can_run, thread_alive,
4414 has_all_memory, has_memory, has_stack, has_registers,
4415 has_execution, can_async_p, is_async_p, supports_non_stop,
4416 always_non_stop_p, can_execute_reverse, supports_multi_process,
4417 supports_enable_disable_tracepoint,
4418 supports_disable_randomization, supports_string_tracing,
4419 supports_evaluation_of_breakpoint_conditions,
4420 can_run_breakpoint_commands, filesystem_is_local,
4421 can_download_tracepoint, get_trace_state_variable_value,
4422 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4423 record_is_replaying, record_will_replay,
4424 augmented_libraries_svr4_read>: Adjust to return bool.
4425 * aarch64-linux-nat.c: All implementations adjusted.
4426 * aix-thread.c: All implementations adjusted.
4427 * arm-linux-nat.c: All implementations adjusted.
4428 * breakpoint.c: All implementations adjusted.
4429 * bsd-kvm.c: All implementations adjusted.
4430 * bsd-uthread.c: All implementations adjusted.
4431 * corelow.c: All implementations adjusted.
4432 * ctf.c: All implementations adjusted.
4433 * darwin-nat.c: All implementations adjusted.
4434 * darwin-nat.h: All implementations adjusted.
4435 * exec.c: All implementations adjusted.
4436 * fbsd-nat.c: All implementations adjusted.
4437 * fbsd-nat.h: All implementations adjusted.
4438 * gnu-nat.c: All implementations adjusted.
4439 * gnu-nat.h: All implementations adjusted.
4440 * go32-nat.c: All implementations adjusted.
4441 * ia64-linux-nat.c: All implementations adjusted.
4442 * inf-child.c: All implementations adjusted.
4443 * inf-child.h: All implementations adjusted.
4444 * inf-ptrace.c: All implementations adjusted.
4445 * inf-ptrace.h: All implementations adjusted.
4446 * linux-nat.c: All implementations adjusted.
4447 * linux-nat.h: All implementations adjusted.
4448 * mips-linux-nat.c: All implementations adjusted.
4449 * nto-procfs.c: All implementations adjusted.
4450 * ppc-linux-nat.c: All implementations adjusted.
4451 * procfs.c: All implementations adjusted.
4452 * ravenscar-thread.c: All implementations adjusted.
4453 * record-btrace.c: All implementations adjusted.
4454 * record-full.c: All implementations adjusted.
4455 * remote-sim.c: All implementations adjusted.
4456 * remote.c: All implementations adjusted.
4457 * s390-linux-nat.c: All implementations adjusted.
4458 * sol-thread.c: All implementations adjusted.
4459 * spu-multiarch.c: All implementations adjusted.
4460 * target-delegates.c: All implementations adjusted.
4461 * target.c: All implementations adjusted.
4462 * target.h: All implementations adjusted.
4463 * tracefile-tfile.c: All implementations adjusted.
4464 * tracefile.c: All implementations adjusted.
4465 * tracefile.h: All implementations adjusted.
4466 * windows-nat.c: All implementations adjusted.
4467 * x86-linux-nat.h: All implementations adjusted.
4468 * x86-nat.h: All implementations adjusted.
4470 2018-05-02 Pedro Alves <palves@redhat.com>
4472 * make-target-delegates (scan_target_h): Don't trim lines here.
4473 Replace sequences of tabs and/or whitespace with a single
4475 (top level, parsing methods): Trim each line before processing it
4478 2018-05-02 Pedro Alves <palves@redhat.com>
4479 John Baldwin <jhb@freebsd.org>
4481 * target.h (enum strata) <debug_stratum>: New.
4482 (struct target_ops) <all delegation methods>: Replace by C++
4483 virtual methods, and drop "to_" prefix. All references updated
4485 <to_shortname, to_longname, to_doc, to_data,
4486 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4487 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4488 virtual methods. All references updated throughout.
4489 <can_attach, supports_terminal_ours, can_create_inferior,
4490 get_thread_control_capabilities, attach_no_wait>: New
4492 <insert_breakpoint, remove_breakpoint>: Now
4493 TARGET_DEFAULT_NORETURN methods.
4494 <info_proc>: Now returns bool.
4496 (OPS_MAGIC): Delete.
4497 (current_target): Delete. All references replaced by references
4499 (target_stack): ... this. New.
4500 (target_shortname, target_longname): Adjust.
4501 (target_can_run): Now a function declaration.
4502 (default_child_has_all_memory, default_child_has_memory)
4503 (default_child_has_stack, default_child_has_registers)
4504 (default_child_has_execution): Remove target_ops parameter.
4505 (complete_target_initialization): Delete.
4506 (memory_breakpoint_target): New template class.
4507 (test_target_ops): Refactor as a C++ class with virtual methods.
4508 * make-target-delegates (NAME_PART): Tighten.
4509 (POINTER_PART, CP_SYMBOL): New.
4510 (SIMPLE_RETURN_PART): Reimplement.
4511 (VEC_RETURN_PART): Expect less.
4512 (RETURN_PART, VIRTUAL_PART): New.
4513 (METHOD): Adjust to C++ virtual methods.
4514 (scan_target_h): Remove reference to C99.
4515 (dname): Output "target_ops::" prefix.
4516 (write_function_header): Adjust to output a C++ class method.
4517 (write_declaration): New.
4518 (write_delegator): Adjust to output a C++ class method.
4519 (tdname): Output "dummy_target::" prefix.
4520 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4522 (tdefault_names, debug_names): Delete.
4523 (return_types, tdefaults, styles, argtypes_array): New.
4524 (top level): All methods are delegators.
4526 (top level): Print dummy_target and debug_target classes.
4527 * target-delegates.c: Regenerate.
4528 * target-debug.h (target_debug_print_enum_info_proc_what)
4529 (target_debug_print_thread_control_capabilities)
4530 (target_debug_print_thread_info_p): New.
4531 * target.c (dummy_target): Delete.
4532 (the_dummy_target, the_debug_target): New.
4533 (target_stack): Now extern.
4534 (set_targetdebug): Push/unpush debug target.
4535 (default_child_has_all_memory, default_child_has_memory)
4536 (default_child_has_stack, default_child_has_registers)
4537 (default_child_has_execution): Remove target_ops parameter.
4538 (complete_target_initialization): Delete.
4539 (add_target_with_completer): No longer call
4540 complete_target_initialization.
4541 (target_supports_terminal_ours): Use regular delegation.
4542 (update_current_target): Delete.
4543 (push_target): No longer check magic number. Don't call
4544 update_current_target.
4545 (unpush_target): Don't call update_current_target.
4546 (target_is_pushed): No longer check magic number.
4547 (target_require_runnable): Skip for all stratums over
4549 (target_ops::info_proc): New.
4550 (target_info_proc): Use find_target_at and
4551 find_default_run_target.
4552 (target_supports_disable_randomization): Use regular delegation.
4553 (target_get_osdata): Use find_target_at.
4554 (target_ops::open, target_ops::close, target_ops::can_attach)
4555 (target_ops::attach, target_ops::can_create_inferior)
4556 (target_ops::create_inferior, target_ops::can_run)
4557 (target_can_run): New.
4558 (default_fileio_target): Use regular delegation.
4559 (target_ops::fileio_open, target_ops::fileio_pwrite)
4560 (target_ops::fileio_pread, target_ops::fileio_fstat)
4561 (target_ops::fileio_close, target_ops::fileio_unlink)
4562 (target_ops::fileio_readlink): New.
4563 (target_fileio_open_1, target_fileio_unlink)
4564 (target_fileio_readlink): Always call the target method. Handle
4566 (return_zero, return_zero_has_execution): Delete.
4567 (init_dummy_target): Delete.
4568 (dummy_target::dummy_target, dummy_target::shortname)
4569 (dummy_target::longname, dummy_target::doc)
4570 (debug_target::debug_target, debug_target::shortname)
4571 (debug_target::longname, debug_target::doc): New.
4572 (target_supports_delete_record): Use regular delegation.
4573 (setup_target_debug): Delete.
4574 (maintenance_print_target_stack): Skip debug_stratum.
4575 (initialize_targets): Instantiate the_dummy_target and
4577 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4579 (target_auxv_search, fprint_target_auxv): Adjust.
4580 (info_auxv_command): Adjust to use target_stack.
4581 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4582 * exceptions.c (print_flush): Handle a NULL target_stack.
4583 * regcache.c (target_ops_no_register): Refactor as class with
4586 * exec.c (exec_target): New class.
4587 (exec_ops): Now an exec_target.
4588 (exec_open, exec_close_1, exec_get_section_table)
4589 (exec_xfer_partial, exec_files_info, exec_has_memory)
4590 (exec_make_note_section): Refactor as exec_target methods.
4591 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4593 (exec_target::find_memory_regions): New.
4594 (_initialize_exec): Don't call init_exec_ops.
4595 * gdbcore.h (exec_file_clear): Delete.
4597 * corefile.c (core_target): Delete.
4598 (core_file_command): Adjust.
4599 * corelow.c (core_target): New class.
4600 (the_core_target): New.
4601 (core_close): Remove target_ops parameter.
4602 (core_close_cleanup): Adjust.
4603 (core_target::close): New.
4604 (core_open, core_detach, get_core_registers, core_files_info)
4605 (core_xfer_partial, core_thread_alive, core_read_description)
4606 (core_pid_to_str, core_thread_name, core_has_memory)
4607 (core_has_stack, core_has_registers, core_info_proc): Rework as
4608 core_target methods.
4609 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4610 (_initialize_corelow): Initialize the_core_target.
4611 * gdbcore.h (core_target): Delete.
4612 (the_core_target): New.
4614 * ctf.c: (ctf_target): New class.
4615 (ctf_ops): Now a ctf_target.
4616 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4617 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4618 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4620 (init_ctf_ops): Delete.
4621 (_initialize_ctf): Don't call it.
4622 * tracefile-tfile.c (tfile_target): New class.
4623 (tfile_ops): Now a tfile_target.
4624 (tfile_open, tfile_close, tfile_files_info)
4625 (tfile_get_tracepoint_status, tfile_trace_find)
4626 (tfile_fetch_registers, tfile_xfer_partial)
4627 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4628 Refactor as tfile_target methods.
4629 (tfile_xfer_partial_features): Remove target_ops parameter.
4630 (init_tfile_ops): Delete.
4631 (_initialize_tracefile_tfile): Don't call it.
4632 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4633 (tracefile_has_stack, tracefile_has_registers)
4634 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4635 tracefile_target methods.
4636 (init_tracefile_ops): Delete.
4637 (tracefile_target::tracefile_target): New.
4638 * tracefile.h: Include "target.h".
4639 (tracefile_target): New class.
4640 (init_tracefile_ops): Delete.
4642 * spu-multiarch.c (spu_multiarch_target): New class.
4643 (spu_ops): Now a spu_multiarch_target.
4644 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4645 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4646 (spu_search_memory, spu_mourn_inferior): Refactor as
4647 spu_multiarch_target methods.
4648 (init_spu_ops): Delete.
4649 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4650 complete_target_initialization.
4652 * ravenscar-thread.c (ravenscar_thread_target): New class.
4653 (ravenscar_ops): Now a ravenscar_thread_target.
4654 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4655 (ravenscar_thread_alive, ravenscar_pid_to_str)
4656 (ravenscar_fetch_registers, ravenscar_store_registers)
4657 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4658 (ravenscar_stopped_by_hw_breakpoint)
4659 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4660 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4661 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4663 (init_ravenscar_thread_ops): Delete.
4664 (_initialize_ravenscar): Remove references to
4665 init_ravenscar_thread_ops and complete_target_initialization.
4667 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4668 (bsd_uthread_target): New class.
4669 (bsd_uthread_ops): Now a bsd_uthread_target.
4670 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4671 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4672 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4673 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4674 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4675 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4676 (bsd_uthread_target): Delete function.
4677 (_initialize_bsd_uthread): Remove reference to
4678 complete_target_initialization.
4680 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4681 (target_bfd): ... this new class.
4682 (target_bfd_xfer_partial, target_bfd_get_section_table)
4683 (target_bfd_close): Refactor as target_bfd methods.
4684 (target_bfd::~target_bfd): New.
4685 (target_bfd_reopen): Adjust.
4686 (target_bfd::close): New.
4688 * record-btrace.c (record_btrace_target): New class.
4689 (record_btrace_ops): Now a record_btrace_target.
4690 (record_btrace_open, record_btrace_stop_recording)
4691 (record_btrace_disconnect, record_btrace_close)
4692 (record_btrace_async, record_btrace_info)
4693 (record_btrace_insn_history, record_btrace_insn_history_range)
4694 (record_btrace_insn_history_from, record_btrace_call_history)
4695 (record_btrace_call_history_range)
4696 (record_btrace_call_history_from, record_btrace_record_method)
4697 (record_btrace_is_replaying, record_btrace_will_replay)
4698 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4699 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4700 (record_btrace_store_registers, record_btrace_prepare_to_store)
4701 (record_btrace_to_get_unwinder)
4702 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4703 (record_btrace_commit_resume, record_btrace_wait)
4704 (record_btrace_stop, record_btrace_can_execute_reverse)
4705 (record_btrace_stopped_by_sw_breakpoint)
4706 (record_btrace_supports_stopped_by_sw_breakpoint)
4707 (record_btrace_stopped_by_hw_breakpoint)
4708 (record_btrace_supports_stopped_by_hw_breakpoint)
4709 (record_btrace_update_thread_list, record_btrace_thread_alive)
4710 (record_btrace_goto_begin, record_btrace_goto_end)
4711 (record_btrace_goto, record_btrace_stop_replaying_all)
4712 (record_btrace_execution_direction)
4713 (record_btrace_prepare_to_generate_core)
4714 (record_btrace_done_generating_core): Refactor as
4715 record_btrace_target methods.
4716 (init_record_btrace_ops): Delete.
4717 (_initialize_record_btrace): Remove reference to
4718 init_record_btrace_ops.
4719 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4720 the execution_direction global.
4721 (record_full_base_target, record_full_target)
4722 (record_full_core_target): New classes.
4723 (record_full_ops): Now a record_full_target.
4724 (record_full_core_ops): Now a record_full_core_target.
4725 (record_full_target::detach, record_full_target::disconnect)
4726 (record_full_core_target::disconnect)
4727 (record_full_target::mourn_inferior, record_full_target::kill):
4729 (record_full_open, record_full_close, record_full_async): Refactor
4730 as methods of the record_full_base_target class.
4731 (record_full_resume, record_full_commit_resume): Refactor
4732 as methods of the record_full_target class.
4733 (record_full_wait, record_full_stopped_by_watchpoint)
4734 (record_full_stopped_data_address)
4735 (record_full_stopped_by_sw_breakpoint)
4736 (record_full_supports_stopped_by_sw_breakpoint)
4737 (record_full_stopped_by_hw_breakpoint)
4738 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4739 methods of the record_full_base_target class.
4740 (record_full_store_registers, record_full_xfer_partial)
4741 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4742 Refactor as methods of the record_full_target class.
4743 (record_full_can_execute_reverse, record_full_get_bookmark)
4744 (record_full_goto_bookmark, record_full_execution_direction)
4745 (record_full_record_method, record_full_info, record_full_delete)
4746 (record_full_is_replaying, record_full_will_replay)
4747 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4748 (record_full_stop_replaying): Refactor as methods of the
4749 record_full_base_target class.
4750 (record_full_core_resume, record_full_core_kill)
4751 (record_full_core_fetch_registers)
4752 (record_full_core_prepare_to_store)
4753 (record_full_core_store_registers, record_full_core_xfer_partial)
4754 (record_full_core_insert_breakpoint)
4755 (record_full_core_remove_breakpoint)
4756 (record_full_core_has_execution): Refactor
4757 as methods of the record_full_core_target class.
4758 (record_full_base_target::supports_delete_record): New.
4759 (init_record_full_ops): Delete.
4760 (init_record_full_core_ops): Delete.
4761 (record_full_save): Refactor as method of the
4762 record_full_base_target class.
4763 (_initialize_record_full): Remove references to
4764 init_record_full_ops and init_record_full_core_ops.
4766 * remote.c (remote_target, extended_remote_target): New classes.
4767 (remote_ops): Now a remote_target.
4768 (extended_remote_ops): Now an extended_remote_target.
4769 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4770 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4771 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4772 (remote_pass_signals, remote_set_syscall_catchpoint)
4773 (remote_program_signals, )
4774 (remote_thread_always_alive): Remove target_ops parameter.
4775 (remote_thread_alive, remote_thread_name)
4776 (remote_update_thread_list, remote_threads_extra_info)
4777 (remote_static_tracepoint_marker_at)
4778 (remote_static_tracepoint_markers_by_strid)
4779 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4780 (remote_open): Refactor as methods of remote_target.
4781 (extended_remote_open, extended_remote_detach)
4782 (extended_remote_attach, extended_remote_post_attach):
4783 (extended_remote_supports_disable_randomization)
4784 (extended_remote_create_inferior): : Refactor as method of
4785 extended_remote_target.
4786 (remote_set_permissions, remote_open_1, remote_detach)
4787 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4788 (remote_resume, remote_commit_resume, remote_stop)
4789 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4790 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4791 (remote_prepare_to_store, remote_store_registers)
4792 (remote_flash_erase, remote_flash_done, remote_files_info)
4793 (remote_kill, remote_mourn, remote_insert_breakpoint)
4794 (remote_remove_breakpoint, remote_insert_watchpoint)
4795 (remote_watchpoint_addr_within_range)
4796 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4797 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4798 (remote_supports_stopped_by_sw_breakpoint)
4799 (remote_stopped_by_hw_breakpoint)
4800 (remote_supports_stopped_by_hw_breakpoint)
4801 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4802 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4803 (remote_verify_memory): Refactor as methods of remote_target.
4804 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4806 (remote_xfer_partial, remote_get_memory_xfer_limit)
4807 (remote_search_memory, remote_rcmd, remote_memory_map)
4808 (remote_pid_to_str, remote_get_thread_local_address)
4809 (remote_get_tib_address, remote_read_description): Refactor as
4810 methods of remote_target.
4811 (remote_target::fileio_open, remote_target::fileio_pwrite)
4812 (remote_target::fileio_pread, remote_target::fileio_close): New.
4813 (remote_hostio_readlink, remote_hostio_fstat)
4814 (remote_filesystem_is_local, remote_can_execute_reverse)
4815 (remote_supports_non_stop, remote_supports_disable_randomization)
4816 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4817 (remote_supports_enable_disable_tracepoint)
4818 (remote_supports_string_tracing)
4819 (remote_can_run_breakpoint_commands, remote_trace_init)
4820 (remote_download_tracepoint, remote_can_download_tracepoint)
4821 (remote_download_trace_state_variable, remote_enable_tracepoint)
4822 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4823 (remote_trace_start, remote_get_trace_status)
4824 (remote_get_tracepoint_status, remote_trace_stop)
4825 (remote_trace_find, remote_get_trace_state_variable_value)
4826 (remote_save_trace_data, remote_get_raw_trace_data)
4827 (remote_set_disconnected_tracing, remote_core_of_thread)
4828 (remote_set_circular_trace_buffer, remote_traceframe_info)
4829 (remote_get_min_fast_tracepoint_insn_len)
4830 (remote_set_trace_buffer_size, remote_set_trace_notes)
4831 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4832 (remote_disable_btrace, remote_teardown_btrace)
4833 (remote_read_btrace, remote_btrace_conf)
4834 (remote_augmented_libraries_svr4_read, remote_load)
4835 (remote_pid_to_exec_file, remote_can_do_single_step)
4836 (remote_execution_direction, remote_thread_handle_to_thread_info):
4837 Refactor as methods of remote_target.
4838 (init_remote_ops, init_extended_remote_ops): Delete.
4839 (remote_can_async_p, remote_is_async_p, remote_async)
4840 (remote_thread_events, remote_upload_tracepoints)
4841 (remote_upload_trace_state_variables): Refactor as methods of
4843 (_initialize_remote): Remove references to init_remote_ops and
4844 init_extended_remote_ops.
4846 * remote-sim.c (gdbsim_target): New class.
4847 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4848 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4849 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4850 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4851 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4852 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4853 Refactor as methods of gdbsim_target.
4854 (gdbsim_ops): Now a gdbsim_target.
4855 (init_gdbsim_ops): Delete.
4856 (gdbsim_cntrl_c): Adjust.
4857 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4859 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4860 (the_amd64_linux_nat_target): New.
4861 (amd64_linux_fetch_inferior_registers)
4862 (amd64_linux_store_inferior_registers): Refactor as methods of
4863 amd64_linux_nat_target.
4864 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4865 * i386-linux-nat.c: Don't include "linux-nat.h".
4866 (i386_linux_nat_target): New class.
4867 (the_i386_linux_nat_target): New.
4868 (i386_linux_fetch_inferior_registers)
4869 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4870 as methods of i386_linux_nat_target.
4871 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4872 * inf-child.c (inf_child_ops): Delete.
4873 (inf_child_fetch_inferior_registers)
4874 (inf_child_store_inferior_registers): Delete.
4875 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4876 methods of inf_child_target.
4877 (inf_child_target::supports_terminal_ours)
4878 (inf_child_target::terminal_init)
4879 (inf_child_target::terminal_inferior)
4880 (inf_child_target::terminal_ours_for_output)
4881 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4882 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4884 (inf_child_open, inf_child_disconnect, inf_child_close)
4885 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4886 (inf_child_post_startup_inferior, inf_child_can_run)
4887 (inf_child_pid_to_exec_file): Refactor as methods of
4889 (inf_child_follow_fork): Delete.
4890 (inf_child_target::can_create_inferior)
4891 (inf_child_target::can_attach): New.
4892 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4893 (inf_child_target::has_stack, inf_child_target::has_registers)
4894 (inf_child_target::has_execution): New.
4895 (inf_child_fileio_open, inf_child_fileio_pwrite)
4896 (inf_child_fileio_pread, inf_child_fileio_fstat)
4897 (inf_child_fileio_close, inf_child_fileio_unlink)
4898 (inf_child_fileio_readlink, inf_child_use_agent)
4899 (inf_child_can_use_agent): Refactor as methods of
4901 (return_zero, inf_child_target): Delete.
4902 (inf_child_target::inf_child_target): New.
4903 * inf-child.h: Include "target.h".
4904 (inf_child_target): Delete function prototype.
4905 (inf_child_target): New class.
4906 (inf_child_open_target, inf_child_mourn_inferior)
4907 (inf_child_maybe_unpush_target): Delete.
4908 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4909 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4910 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4911 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4912 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4913 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4914 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4915 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4916 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4917 methods of inf_ptrace_target.
4918 (inf_ptrace_target): Delete function.
4919 * inf-ptrace.h: Include "inf-child.h".
4920 (inf_ptrace_target): Delete function declaration.
4921 (inf_ptrace_target): New class.
4922 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4923 * linux-nat.c (linux_target): New.
4924 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4925 (linux_nat_target::~linux_nat_target): New.
4926 (linux_child_post_attach, linux_child_post_startup_inferior)
4927 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4928 (linux_child_remove_fork_catchpoint)
4929 (linux_child_insert_vfork_catchpoint)
4930 (linux_child_remove_vfork_catchpoint)
4931 (linux_child_insert_exec_catchpoint)
4932 (linux_child_remove_exec_catchpoint)
4933 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4934 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4935 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4936 (linux_nat_stopped_data_address)
4937 (linux_nat_stopped_by_sw_breakpoint)
4938 (linux_nat_supports_stopped_by_sw_breakpoint)
4939 (linux_nat_stopped_by_hw_breakpoint)
4940 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4941 (linux_nat_kill, linux_nat_mourn_inferior)
4942 (linux_nat_xfer_partial, linux_nat_thread_alive)
4943 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4944 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4945 (linux_child_static_tracepoint_markers_by_strid)
4946 (linux_nat_is_async_p, linux_nat_can_async_p)
4947 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4948 (linux_nat_supports_multi_process)
4949 (linux_nat_supports_disable_randomization, linux_nat_async)
4950 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4951 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4952 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4953 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4954 methods of linux_nat_target.
4955 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4956 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4958 (check_stopped_by_watchpoint): Adjust.
4959 (linux_xfer_partial): Delete.
4960 (linux_target_install_ops, linux_target, linux_nat_add_target):
4962 (linux_nat_target::linux_nat_target): New.
4963 * linux-nat.h: Include "inf-ptrace.h".
4964 (linux_nat_target): New.
4965 (linux_target, linux_target_install_ops, linux_nat_add_target):
4966 Delete function declarations.
4967 (linux_target): Declare global.
4968 * linux-thread-db.c (thread_db_target): New.
4969 (thread_db_target::thread_db_target): New.
4970 (thread_db_ops): Delete.
4971 (the_thread_db_target): New.
4972 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4973 (thread_db_update_thread_list, thread_db_pid_to_str)
4974 (thread_db_extra_thread_info)
4975 (thread_db_thread_handle_to_thread_info)
4976 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4977 (thread_db_resume): Refactor as methods of thread_db_target.
4978 (init_thread_db_ops): Delete.
4979 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4980 * x86-linux-nat.c: Don't include "linux-nat.h".
4981 (super_post_startup_inferior): Delete.
4982 (x86_linux_nat_target::~x86_linux_nat_target): New.
4983 (x86_linux_child_post_startup_inferior)
4984 (x86_linux_read_description, x86_linux_enable_btrace)
4985 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4986 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4987 methods of x86_linux_nat_target.
4988 (x86_linux_create_target): Delete. Bits folded ...
4989 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4991 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4992 (x86_linux_nat_target): New class.
4993 (x86_linux_create_target): Delete.
4994 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4995 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4996 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4997 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4998 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4999 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5001 (x86_use_watchpoints): Delete.
5002 * x86-nat.h: Include "breakpoint.h" and "target.h".
5003 (x86_use_watchpoints): Delete.
5004 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5005 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5006 (x86_insert_watchpoint, x86_remove_watchpoint)
5007 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5008 (x86_stopped_by_hw_breakpoint): New declarations.
5009 (x86_nat_target): New template class.
5011 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5012 (the_ppc_linux_nat_target): New.
5013 (ppc_linux_fetch_inferior_registers)
5014 (ppc_linux_can_use_hw_breakpoint)
5015 (ppc_linux_region_ok_for_hw_watchpoint)
5016 (ppc_linux_ranged_break_num_registers)
5017 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5018 (ppc_linux_insert_mask_watchpoint)
5019 (ppc_linux_remove_mask_watchpoint)
5020 (ppc_linux_can_accel_watchpoint_condition)
5021 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5022 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5023 (ppc_linux_watchpoint_addr_within_range)
5024 (ppc_linux_masked_watch_num_registers)
5025 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5026 (ppc_linux_read_description): Refactor as methods of
5027 ppc_linux_nat_target.
5028 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5030 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5031 (procfs_target): New class.
5032 (the_procfs_target): New.
5033 (procfs_target): Delete function.
5034 (procfs_auxv_parse, procfs_attach, procfs_detach)
5035 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5036 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5037 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5038 (procfs_create_inferior, procfs_update_thread_list)
5039 (procfs_thread_alive, procfs_pid_to_str)
5040 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5041 (procfs_stopped_data_address, procfs_insert_watchpoint)
5042 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5043 (proc_find_memory_regions, procfs_info_proc)
5044 (procfs_make_note_section): Refactor as methods of procfs_target.
5045 (_initialize_procfs): Adjust.
5046 * sol-thread.c (sol_thread_target): New class.
5047 (sol_thread_ops): Now a sol_thread_target.
5048 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5049 (sol_thread_fetch_registers, sol_thread_store_registers)
5050 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5051 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5052 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5053 (init_sol_thread_ops): Delete.
5054 (_initialize_sol_thread): Adjust. Remove references to
5055 init_sol_thread_ops and complete_target_initialization.
5057 * windows-nat.c (windows_nat_target): New class.
5058 (windows_fetch_inferior_registers)
5059 (windows_store_inferior_registers, windows_resume, windows_wait)
5060 (windows_attach, windows_detach, windows_pid_to_exec_file)
5061 (windows_files_info, windows_create_inferior)
5062 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5063 (windows_close, windows_pid_to_str, windows_xfer_partial)
5064 (windows_get_tib_address, windows_get_ada_task_ptid)
5065 (windows_thread_name, windows_thread_alive): Refactor as
5066 windows_nat_target methods.
5067 (do_initial_windows_stuff): Adjust.
5068 (windows_target): Delete function.
5069 (_initialize_windows_nat): Adjust.
5071 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5072 (darwin_mourn_inferior, darwin_kill_inferior)
5073 (darwin_create_inferior, darwin_attach, darwin_detach)
5074 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5075 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5076 (darwin_supports_multi_process): Refactor as darwin_nat_target
5078 (darwin_resume_to, darwin_files_info): Delete.
5079 (_initialize_darwin_inferior): Rename to ...
5080 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5081 * darwin-nat.h: Include "inf-child.h".
5082 (darwin_nat_target): New class.
5083 (darwin_complete_target): Delete.
5084 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5085 (darwin_target): New.
5086 (i386_darwin_fetch_inferior_registers)
5087 (i386_darwin_store_inferior_registers): Refactor as methods of
5089 (darwin_complete_target): Delete, with ...
5090 (_initialize_i386_darwin_nat): ... bits factored out here.
5092 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5093 (the_alpha_linux_nat_target): New.
5094 (alpha_linux_register_u_offset): Refactor as
5095 alpha_linux_nat_target method.
5096 (_initialize_alpha_linux_nat): Adjust.
5097 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5098 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5099 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5100 methods of linux_nat_trad_target.
5101 (linux_trad_target): Delete.
5102 * linux-nat-trad.h (linux_trad_target): Delete function.
5103 (linux_nat_trad_target): New class.
5104 * mips-linux-nat.c (mips_linux_nat_target): New class.
5105 (super_fetch_registers, super_store_registers, super_close):
5107 (the_mips_linux_nat_target): New.
5108 (mips64_linux_regsets_fetch_registers)
5109 (mips64_linux_regsets_store_registers)
5110 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5111 (mips_linux_register_u_offset, mips_linux_read_description)
5112 (mips_linux_can_use_hw_breakpoint)
5113 (mips_linux_stopped_by_watchpoint)
5114 (mips_linux_stopped_data_address)
5115 (mips_linux_region_ok_for_hw_watchpoint)
5116 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5117 (mips_linux_close): Refactor as methods of mips_linux_nat.
5118 (_initialize_mips_linux_nat): Adjust to C++ification.
5120 * aix-thread.c (aix_thread_target): New class.
5121 (aix_thread_ops): Now an aix_thread_target.
5122 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5123 (aix_thread_fetch_registers, aix_thread_store_registers)
5124 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5125 (aix_thread_thread_alive, aix_thread_pid_to_str)
5126 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5127 Refactor as methods of aix_thread_target.
5128 (init_aix_thread_ops): Delete.
5129 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5130 and complete_target_initialization.
5131 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5132 (rs6000_nat_target): New class.
5133 (the_rs6000_nat_target): New.
5134 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5135 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5136 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5137 (super_create_inferior): Delete.
5138 (_initialize_rs6000_nat): Adjust to C++ification.
5140 * arm-linux-nat.c (arm_linux_nat_target): New class.
5141 (the_arm_linux_nat_target): New.
5142 (arm_linux_fetch_inferior_registers)
5143 (arm_linux_store_inferior_registers, arm_linux_read_description)
5144 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5145 (arm_linux_remove_hw_breakpoint)
5146 (arm_linux_region_ok_for_hw_watchpoint)
5147 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5148 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5149 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5150 arm_linux_nat_target.
5151 (_initialize_arm_linux_nat): Adjust to C++ification.
5153 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5154 (the_aarch64_linux_nat_target): New.
5155 (aarch64_linux_fetch_inferior_registers)
5156 (aarch64_linux_store_inferior_registers)
5157 (aarch64_linux_child_post_startup_inferior)
5158 (aarch64_linux_read_description)
5159 (aarch64_linux_can_use_hw_breakpoint)
5160 (aarch64_linux_insert_hw_breakpoint)
5161 (aarch64_linux_remove_hw_breakpoint)
5162 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5163 (aarch64_linux_region_ok_for_hw_watchpoint)
5164 (aarch64_linux_stopped_data_address)
5165 (aarch64_linux_stopped_by_watchpoint)
5166 (aarch64_linux_watchpoint_addr_within_range)
5167 (aarch64_linux_can_do_single_step): Refactor as methods of
5168 aarch64_linux_nat_target.
5169 (super_post_startup_inferior): Delete.
5170 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5172 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5173 (the_hppa_linux_nat_target): New.
5174 (hppa_linux_fetch_inferior_registers)
5175 (hppa_linux_store_inferior_registers): Refactor as methods of
5176 hppa_linux_nat_target.
5177 (_initialize_hppa_linux_nat): Adjust to C++ification.
5179 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5180 (the_ia64_linux_nat_target): New.
5181 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5182 (ia64_linux_stopped_data_address)
5183 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5184 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5185 ia64_linux_nat_target methods.
5186 (super_xfer_partial): Delete.
5187 (_initialize_ia64_linux_nat): Adjust to C++ification.
5189 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5190 (the_m32r_linux_nat_target): New.
5191 (m32r_linux_fetch_inferior_registers)
5192 (m32r_linux_store_inferior_registers): Refactor as
5193 m32r_linux_nat_target methods.
5194 (_initialize_m32r_linux_nat): Adjust to C++ification.
5196 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5197 (the_m68k_linux_nat_target): New.
5198 (m68k_linux_fetch_inferior_registers)
5199 (m68k_linux_store_inferior_registers): Refactor as
5200 m68k_linux_nat_target methods.
5201 (_initialize_m68k_linux_nat): Adjust to C++ification.
5203 * s390-linux-nat.c (s390_linux_nat_target): New class.
5204 (the_s390_linux_nat_target): New.
5205 (s390_linux_fetch_inferior_registers)
5206 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5207 (s390_insert_watchpoint, s390_remove_watchpoint)
5208 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5209 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5210 (s390_auxv_parse, s390_read_description): Refactor as methods of
5211 s390_linux_nat_target.
5212 (_initialize_s390_nat): Adjust to C++ification.
5214 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5215 (the_sparc_linux_nat_target): New.
5216 (_initialize_sparc_linux_nat): Adjust to C++ification.
5217 * sparc-nat.c (sparc_fetch_inferior_registers)
5218 (sparc_store_inferior_registers): Remove target_ops parameter.
5219 * sparc-nat.h (sparc_fetch_inferior_registers)
5220 (sparc_store_inferior_registers): Remove target_ops parameter.
5221 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5222 (the_sparc64_linux_nat_target): New.
5223 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5225 * spu-linux-nat.c (spu_linux_nat_target): New class.
5226 (the_spu_linux_nat_target): New.
5227 (spu_child_post_startup_inferior, spu_child_post_attach)
5228 (spu_child_wait, spu_fetch_inferior_registers)
5229 (spu_store_inferior_registers, spu_xfer_partial)
5230 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5232 (_initialize_spu_nat): Adjust to C++ification.
5234 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5235 (the_tilegx_linux_nat_target): New.
5236 (fetch_inferior_registers, store_inferior_registers):
5237 Refactor as methods.
5238 (_initialize_tile_linux_nat): Adjust to C++ification.
5240 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5241 (the_xtensa_linux_nat_target): New.
5242 (xtensa_linux_fetch_inferior_registers)
5243 (xtensa_linux_store_inferior_registers): Refactor as
5244 xtensa_linux_nat_target methods.
5245 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5247 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5248 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5249 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5250 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5251 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5252 (fbsd_stopped_by_sw_breakpoint)
5253 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5254 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5255 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5256 (fbsd_post_startup_inferior, fbsd_post_attach)
5257 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5258 (fbsd_set_syscall_catchpoint)
5259 (super_xfer_partial, super_resume, super_wait)
5260 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5261 (fbsd_handle_debug_trap): Remove target_ops parameter.
5262 (fbsd_nat_add_target): Delete.
5263 * fbsd-nat.h: Include "inf-ptrace.h".
5264 (fbsd_nat_add_target): Delete.
5265 (USE_SIGTRAP_SIGINFO): Define.
5266 (fbsd_nat_target): New class.
5268 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5269 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5270 (amd64bsd_target): Delete.
5271 * amd64-bsd-nat.h: New file.
5272 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5274 (amd64_fbsd_nat_target): New class.
5275 (the_amd64_fbsd_nat_target): New.
5276 (amd64fbsd_read_description): Refactor as method of
5277 amd64_fbsd_nat_target.
5278 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5279 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5280 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5281 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5282 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5283 (i386bsd_target): Delete.
5284 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5285 (i386bsd_fetch_inferior_registers)
5286 (i386bsd_store_inferior_registers): Declare.
5287 (i386_bsd_nat_target): New class.
5288 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5289 (the_i386_fbsd_nat_target): New.
5290 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5291 i386_fbsd_nat_target methods.
5292 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5293 (_initialize_i386fbsd_nat): Adjust to C++ification.
5294 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5295 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5296 (_initialize_x86_bsd_nat): Adjust to C++ification.
5297 * x86-bsd-nat.h: Include "x86-nat.h".
5298 (x86bsd_target): Delete declaration.
5299 (x86bsd_nat_target): New class.
5301 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5302 (the_aarch64_fbsd_nat_target): New.
5303 (aarch64_fbsd_fetch_inferior_registers)
5304 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5305 aarch64_fbsd_nat_target.
5306 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5307 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5308 (the_alpha_bsd_nat_target): New.
5309 (alphabsd_fetch_inferior_registers)
5310 (alphabsd_store_inferior_registers): Refactor as
5311 alpha_bsd_nat_target methods.
5312 (_initialize_alphabsd_nat): Refactor as methods of
5313 alpha_bsd_nat_target.
5314 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5315 (the_amd64_nbsd_nat_target): New.
5316 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5317 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5318 (the_amd64_obsd_nat_target): New.
5319 (_initialize_amd64obsd_nat): Adjust to C++ification.
5320 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5321 (the_arm_fbsd_nat_target): New.
5322 (arm_fbsd_fetch_inferior_registers)
5323 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5324 (_initialize_arm_fbsd_nat): Refactor as methods of
5325 arm_fbsd_nat_target.
5326 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5327 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5328 (the_arm_netbsd_nat_target): New.
5329 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5330 arm_netbsd_nat_target.
5331 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5332 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5333 (the_hppa_nbsd_nat_target): New.
5334 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5335 hppa_nbsd_nat_target methods.
5336 (_initialize_hppanbsd_nat): Adjust to C++ification.
5337 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5338 (the_hppa_obsd_nat_target): New.
5339 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5340 methods of hppa_obsd_nat_target.
5341 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5343 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5344 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5346 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5347 (_initialize_i386obsd_nat): Use add_target.
5348 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5349 (the_m68k_bsd_nat_target): New.
5350 (m68kbsd_fetch_inferior_registers)
5351 (m68kbsd_store_inferior_registers): Refactor as methods of
5352 m68k_bsd_nat_target.
5353 (_initialize_m68kbsd_nat): Adjust to C++ification.
5354 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5355 (the_mips_fbsd_nat_target): New.
5356 (mips_fbsd_fetch_inferior_registers)
5357 (mips_fbsd_store_inferior_registers): Refactor as methods of
5358 mips_fbsd_nat_target.
5359 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5361 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5362 (the_mips_nbsd_nat_target): New.
5363 (mipsnbsd_fetch_inferior_registers)
5364 (mipsnbsd_store_inferior_registers): Refactor as methods of
5365 mips_nbsd_nat_target.
5366 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5367 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5368 (the_mips64_obsd_nat_target): New.
5369 (mips64obsd_fetch_inferior_registers)
5370 (mips64obsd_store_inferior_registers): Refactor as methods of
5371 mips64_obsd_nat_target.
5372 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5374 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5376 * nbsd-nat.h: Include "inf-ptrace.h".
5377 (nbsd_nat_target): New class.
5378 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5379 (obsd_wait): Refactor as methods of obsd_nat_target.
5380 (obsd_add_target): Delete.
5381 * obsd-nat.h: Include "inf-ptrace.h".
5382 (obsd_nat_target): New class.
5383 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5384 (the_ppc_fbsd_nat_target): New.
5385 (ppcfbsd_fetch_inferior_registers)
5386 (ppcfbsd_store_inferior_registers): Refactor as methods of
5387 ppc_fbsd_nat_target.
5388 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5390 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5391 (the_ppc_nbsd_nat_target): New.
5392 (ppcnbsd_fetch_inferior_registers)
5393 (ppcnbsd_store_inferior_registers): Refactor as methods of
5394 ppc_nbsd_nat_target.
5395 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5396 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5397 (the_ppc_obsd_nat_target): New.
5398 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5399 methods of ppc_obsd_nat_target.
5400 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5402 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5403 (the_sh_nbsd_nat_target): New.
5404 (shnbsd_fetch_inferior_registers)
5405 (shnbsd_store_inferior_registers): Refactor as methods of
5407 (_initialize_shnbsd_nat): Adjust to C++ification.
5408 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5409 (inf_ptrace_xfer_partial): Delete.
5410 (sparc_xfer_partial, sparc_target): Delete.
5411 * sparc-nat.h (sparc_fetch_inferior_registers)
5412 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5413 (sparc_target): Delete function declaration.
5414 (sparc_target): New template class.
5415 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5416 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5417 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5418 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5420 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5421 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5422 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5423 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5425 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5426 (the_vax_bsd_nat_target): New.
5427 (vaxbsd_fetch_inferior_registers)
5428 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5430 (_initialize_vaxbsd_nat): Adjust to C++ification.
5432 * bsd-kvm.c (bsd_kvm_target): New class.
5433 (bsd_kvm_ops): Now a bsd_kvm_target.
5434 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5435 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5436 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5438 (bsd_kvm_return_one): Delete.
5439 (bsd_kvm_add_target): Adjust to C++ification.
5441 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5442 (nto_procfs_target_procfs): New classes.
5443 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5444 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5445 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5446 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5447 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5448 (procfs_remove_hw_breakpoint, procfs_resume)
5449 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5450 (procfs_kill_inferior, procfs_store_registers)
5451 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5452 as methods of nto_procfs_target.
5453 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5454 (nto_native_ops): Delete.
5455 (procfs_open, procfs_native_open): Delete.
5456 (nto_native_ops): Now an nto_procfs_target_native.
5457 (init_procfs_targets): Adjust to C++ification.
5458 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5459 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5460 Refactor as methods of nto_procfs_target.
5462 * go32-nat.c (go32_nat_target): New class.
5463 (the_go32_nat_target): New.
5464 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5465 (go32_store_registers, go32_xfer_partial, go32_files_info)
5466 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5467 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5468 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5469 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5470 (go32_target): Delete.
5471 (_initialize_go32_nat): Adjust to C++ification.
5473 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5474 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5475 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5476 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5478 (gnu_target): Delete.
5479 * gnu-nat.h (gnu_target): Delete.
5480 (gnu_nat_target): New class.
5481 * i386-gnu-nat.c (gnu_base_target): New.
5482 (i386_gnu_nat_target): New class.
5483 (the_i386_gnu_nat_target): New.
5484 (_initialize_i386gnu_nat): Adjust to C++ification.
5486 2018-05-02 Pedro Alves <palves@redhat.com>
5488 * bfd-target.c (target_bfd_xclose): Rename to ...
5489 (target_bfd_close): ... this.
5490 (target_bfd_reopen): Adjust.
5491 * target.c (target_close): Remove references to to_xclose.
5492 * target.h (target_ops::to_xclose): Delete.
5493 (target_ops::to_close): Update comments.
5495 2018-05-02 Pedro Alves <palves@redhat.com>
5497 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5499 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5500 * inf-ptrace.c (inf_ptrace_register_u_offset)
5501 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5502 (inf_ptrace_store_register, inf_ptrace_store_registers)
5503 (inf_ptrace_trad_target): Move to ...
5504 * linux-nat-trad.c: ... this new file.
5505 * linux-nat-trad.h: New file.
5506 * linux-nat.c (linux_target_install_ops): Make extern.
5507 (linux_trad_target): Delete.
5508 * linux-nat.h (linux_trad_target): Delete declaration.
5509 (linux_target_install_ops): Declare.
5510 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5513 2018-05-02 Pedro Alves <palves@redhat.com>
5515 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5516 procfs_target/add_target here.
5517 * procfs.c (procfs_target): Make static.
5518 (_initialize_procfs): Call add_target here.
5519 * procfs.h (struct target_ops): Remove forward declaration.
5520 (procfs_target): Remove declaration.
5521 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5523 2018-05-02 Pedro Alves <palves@redhat.com>
5525 * procfs.c (procfs_stopped_by_watchpoint)
5526 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5527 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5529 (procfs_use_watchpoints): Delete, move contents...
5530 (procfs_target): ... here.
5531 * procfs.h (procfs_use_watchpoints): Delete declaration.
5532 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5533 procfs_use_watchpoints.
5534 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5535 procfs_use_watchpoints.
5537 2018-05-02 Tom Tromey <tom@tromey.com>
5540 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5541 and var_zuinteger_unlimited.
5542 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5543 and PARAM_ZUINTEGER_UNLIMITED.
5544 (set_parameter_value): Handle var_zuinteger and
5545 var_zuinteger_unlimited.
5546 (add_setshow_generic): Likewise.
5547 (parmpy_init): Likewise.
5549 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5552 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5553 pointer is not null before dereferencing it.
5555 2018-04-30 Tom Tromey <tom@tromey.com>
5557 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5560 2018-04-30 Tom Tromey <tom@tromey.com>
5562 * breakpoint.c (mention): Remove use of is_mi_like_p.
5563 (print_mention_ranged_breakpoint): Likewise.
5564 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5567 2018-04-30 Tom Tromey <tom@tromey.com>
5569 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5571 2018-04-30 Tom Tromey <tom@tromey.com>
5573 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5574 (info_spu_event_command): Remove some uses of is_mi_like_p.
5576 2018-04-30 Tom Tromey <tom@tromey.com>
5578 * python/py-framefilter.c (py_print_single_arg)
5579 (enumerate_locals, py_print_args, py_print_frame): Remove some
5580 uses of is_mi_like_p.
5582 2018-04-30 Tom Tromey <tom@tromey.com>
5585 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5586 * ui-out.h (ui_out::is_mi_like_p): Now const.
5587 (ui_out::do_is_mi_like_p): Now const.
5588 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5590 2018-04-30 Tom Tromey <tom@tromey.com>
5592 * varobj.c (varobj_set_visualizer): Use new_reference.
5593 * python/python.c (gdbpy_decode_line): Use new_reference.
5594 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5597 2018-04-30 Tom Tromey <tom@tromey.com>
5599 * varobj.c (install_new_value): Use new_reference.
5600 * value.h (value_incref): Return void. Swap intro comment with
5602 * value.c (set_value_parent): Use new_reference.
5603 (value_incref): Return void. Update intro comment.
5604 (release_value): Use new_reference.
5605 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5607 2018-04-30 Tom Tromey <tom@tromey.com>
5609 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5610 * gdb_bfd.h (new_bfd_ref): Remove.
5611 (gdb_bfd_open): Update comment.
5612 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5613 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5614 (gdb_bfd_fdopenr): Use new_reference.
5615 * exec.c (exec_file_attach): Use new_reference.
5617 2018-04-30 Tom Tromey <tom@tromey.com>
5619 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5622 2018-04-30 Tom Tromey <tom@tromey.com>
5624 * jit.c (jit_read_code_entry): Use type_align.
5625 * i386-tdep.c (i386_gdbarch_init): Don't call
5626 set_gdbarch_long_long_align_bit.
5627 * gdbarch.sh: Remove long_long_align_bit.
5628 * gdbarch.c, gdbarch.h: Rebuild.
5629 * arc-tdep.c (arc_type_align): New function.
5630 (arc_gdbarch_init): Use arc_type_align. Don't call
5631 set_gdbarch_long_long_align_bit.
5633 2018-04-30 Tom Tromey <tom@tromey.com>
5635 * rust-lang.c (rust_type_alignment): Remove.
5636 (rust_composite_type): Use type_align.
5638 2018-04-30 Tom Tromey <tom@tromey.com>
5640 * NEWS: Mention Type.align.
5641 * python/py-type.c (typy_get_alignof): New function.
5642 (type_object_getset): Add "alignof".
5644 2018-04-30 Tom Tromey <tom@tromey.com>
5648 * std-operator.def (UNOP_ALIGNOF): New operator.
5649 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5651 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5652 * c-lang.c (c_op_print_tab): Add alignof.
5653 * c-exp.y (ALIGNOF): New token.
5654 (exp): Add "ALIGNOF" production.
5655 (ident_tokens): Add _Alignof and alignof.
5657 2018-04-30 Tom Tromey <tom@tromey.com>
5659 * i386-tdep.c (i386_type_align): New function.
5660 (i386_gdbarch_init): Update.
5661 * gdbarch.sh (type_align): New method.
5662 * gdbarch.c, gdbarch.h: Rebuild.
5663 * arch-utils.h (default_type_align): Declare.
5664 * arch-utils.c (default_type_align): New function.
5665 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5666 (struct type) <align_log2>: New field.
5667 <instance_flags>: Now a bitfield.
5668 (TYPE_RAW_ALIGN): New macro.
5669 (type_align, type_raw_align, set_type_align): Declare.
5670 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5672 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5673 (get_alignment, maybe_set_alignment): New functions.
5674 (read_structure_type, read_enumeration_type, read_array_type)
5675 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5676 (read_subrange_type, read_base_type): Set type alignment.
5678 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5680 * dwarf2read.c (read_index_from_section): Use bool.
5682 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5685 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5688 2018-04-29 John Reiser <jreiser@BitWagon.com>
5691 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5692 last step, and do it atomically.
5694 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5696 * compile/compile-c-types.c (convert_int, convert_float):
5699 2018-04-27 Tom Tromey <tom@tromey.com>
5702 * rust-lang.c (rust_inclusive_range_type_p): New function.
5703 (rust_range): Handle inclusive ranges.
5704 (rust_compute_range): Likewise.
5705 * rust-exp.y (struct rust_op) <inclusive>: New field.
5706 (DOTDOTEQ): New constant.
5707 (range_expr): Add "..=" productions.
5708 (operator_tokens): Add "..=" token.
5709 (ast_range): Add "inclusive" parameter.
5710 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5712 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5714 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5715 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5717 * expprint.c (print_subexp_standard): Handle new bounds values.
5718 (dump_subexp_body_standard): Likewise.
5720 2018-04-27 Tom Tromey <tom@tromey.com>
5722 * configure: Rebuild.
5723 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5724 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5726 (class symbol_needs_eval_context): Likewise.
5727 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5728 (mock_mapped_index::symbol_name_at): Use "override". Remove
5730 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5732 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5733 * aarch64-tdep.c (instruction_reader::read): Use "override".
5734 (instruction_reader_test::read): Likewise.
5735 * arm-tdep.c (instruction_reader::read): Use "override".
5736 (instruction_reader_thumb::read): Likewise.
5738 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5741 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5742 instead of remote_send.
5743 (remote_send): Remove.
5745 2018-04-26 Pedro Alves <palves@redhat.com>
5747 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5748 find_function_start_sal instead of find_pc_line.
5750 2018-04-26 Pedro Alves <palves@redhat.com>
5752 * breakpoint.c (set_breakpoint_location_function): Handle
5754 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5755 * elfread.c (elf_symtab_read): Give data symbols with
5756 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5757 (elf_rel_plt_read): Update comment.
5758 * linespec.c (convert_linespec_to_sals): Handle
5760 (minsym_found): Handle mst_data_gnu_ifunc.
5761 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5762 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5763 * parse.c (find_minsym_type_and_address): Handle
5765 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5766 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5767 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5769 <mst_data_gnu_ifunc>: New enumerator.
5771 2018-04-26 Pedro Alves <palves@redhat.com>
5773 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5774 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5775 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5777 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5778 (lookup_minimal_symbol_by_pc): Adjust.
5779 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5780 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5781 * minsyms.h (lookup_msym_prefer): New enum.
5782 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5783 parameter by a lookup_msym_prefer parameter.
5785 2018-04-26 Pedro Alves <palves@redhat.com>
5787 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5788 ends in "@plt" instead of looking at the symbol's section.
5790 2018-04-26 Pedro Alves <palves@redhat.com>
5792 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5794 (find_pc_partial_function_gnu_ifunc): Rename to ...
5795 (find_pc_partial_function): ... this, and remove references to
5797 (find_pc_partial_function): Delete old implementation.
5798 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5800 2018-04-26 Pedro Alves <palves@redhat.com>
5802 * linespec.c (struct bound_minimal_symbol_search_key): New.
5803 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5804 skip first line if we found a GNU ifunc minimal symbol by name.
5805 (compare_msymbols): Change parameters to work with a destructured
5807 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5810 2018-04-26 Pedro Alves <palves@redhat.com>
5812 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5813 ifunc targets here. Instead, if we have an ifunc minsym, use its
5815 (add_location_to_breakpoint): Store the minsym and the objfile in
5816 the breakpoint location.
5817 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5818 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5819 Record the minsym in the sal.
5820 * symtab.h (symtab_and_line) <msymbol>: New field.
5822 2018-04-26 Pedro Alves <palves@redhat.com>
5824 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5825 unless we actually resolved the ifunc.
5827 2018-04-26 Pedro Alves <palves@redhat.com>
5829 * c-exp.y (variable production): Prefer ifunc minsyms over
5830 regular function symbols.
5831 * symtab.c (find_gnu_ifunc): New function.
5832 * minsyms.h (lookup_msym_prefer): New enum.
5833 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5834 parameter by a lookup_msym_prefer parameter.
5835 * symtab.h (find_gnu_ifunc): New declaration.
5837 2018-04-26 Pedro Alves <palves@redhat.com>
5839 * blockframe.c (find_gnu_ifunc_target_type): New function.
5840 (find_function_type): New.
5841 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5842 return a value with a memory address.
5843 (eval_call): For calls to GNU ifunc functions, try to find the
5844 type of the target function from the type that the resolver
5846 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5848 * infcall.c (find_function_return_type): Delete.
5849 (find_function_addr): Add 'function_type' parameter. For calls to
5850 GNU ifunc functions, try to find the type of the target function
5851 from the type that the resolver returns, and return it via
5853 (call_function_by_hand_dummy): Adjust to use the function type
5854 returned by find_function_addr.
5855 (find_function_addr): Add 'function_type' parameter and move
5857 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5860 2018-04-26 Pedro Alves <palves@redhat.com>
5862 * c-exp.y (variable production): Skip finding an alias for ifunc
5865 2018-04-26 Pedro Alves <palves@redhat.com>
5867 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5869 2018-04-25 Pedro Alves <palves@redhat.com>
5871 * infcmd.c (kill_command): Print the pid as string, not the whole
5872 thread's ptid. Add comment. s/has been killed/killed/ in output
5874 * remote.c (remote_detach_1): Print the pid as string, not the
5875 whole thread's ptid.
5877 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5878 Sergio Durigan Junior <sergiodj@redhat.com>
5879 Pedro Alves <palves@redhat.com>
5881 * infcmd.c (kill_command): Print message when inferior has
5883 * inferior.c (print_inferior_events): Remove 'static'. Set as
5885 (add_inferior): Improve message printed when
5886 'print_inferior_events' is on.
5887 (exit_inferior): Remove message printed when
5888 'print_inferior_events' is on.
5889 (detach_inferior): Improve message printed when
5890 'print_inferior_events' is on.
5891 (initialize_inferiors): Use 'add_inferior_silent' to set
5892 'current_inferior_'.
5893 * inferior.h (print_inferior_events): Declare here as
5895 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5896 '[Detaching...]' messages when 'print_inferior_events' is on.
5897 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5898 as prefix/suffix for messages. Remove periods. Fix erroneous
5899 'Detaching after fork from child...', replace it by '... from
5901 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5902 prefix/suffix when printing 'Detaching...' messages. Print
5903 them when 'print_inferior_events' is on.
5904 * remote.c (remote_detach_1): Print message when detaching
5905 from inferior and '!is_fork_parent'.
5907 2018-04-24 Tom Tromey <tom@tromey.com>
5909 * cli-out.h: Reindent.
5911 2018-04-24 Tom Tromey <tom@tromey.com>
5913 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5914 (cli_ui_out::do_field_string): Use fputs_filtered.
5915 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5917 2018-04-23 Tom Tromey <tom@tromey.com>
5919 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5920 gdb::unique_xmalloc_ptr.
5922 2018-04-23 Tom Tromey <tom@tromey.com>
5924 * configure: Rebuild.
5926 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5929 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5930 prepare_for_testing. Set normal_bp to r_debug_state if target
5933 2018-04-21 Pedro Alves <palves@redhat.com>
5934 Rajendra SY <rajendra.sy@gmail.com>
5936 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5937 * remote.c (extended_remote_attach): In all-stop mode, mark the
5938 thread as executing.
5940 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5942 * thread.c (thread_apply_all_command): Fix comment.
5943 (thread_command): Fix comment.
5945 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5947 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5949 * features/aarch64-core.c (create_feature_aarch64_core):
5951 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5953 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5955 * features/i386/32bit-avx512.c
5956 (create_feature_i386_32bit_avx512): Likewise.
5957 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5959 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5961 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5963 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5965 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5967 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5969 * features/i386/64bit-avx512.c
5970 (create_feature_i386_64bit_avx512): Likewise.
5971 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5973 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5975 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5977 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5979 * features/i386/64bit-segments.c
5980 (create_feature_i386_64bit_segments): Likewise.
5981 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5983 * features/i386/x32-core.c
5984 (create_feature_i386_x32_core): Likewise.
5985 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5986 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5987 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5988 * target-descriptions.c: In generated code, don't pass xml
5991 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5993 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5994 (print_xml_feature::visit_post): Likewise.
5995 (print_xml_feature::visit): Likewise.
5996 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5997 (print_xml_feature): Add new class.
5998 * regformats/regdat.sh: Null xmltarget on feature targets.
5999 * target-descriptions.c (struct target_desc): Add xmltarget.
6000 (maintenance_check_tdesc_xml_convert): Add unittest function.
6001 (tdesc_get_features_xml): Add function to get xml.
6002 (maintenance_check_xml_descriptions): Test xml generation.
6003 * xml-tdesc.c (string_read_description_xml): Add function.
6004 * xml-tdesc.h (string_read_description_xml): Add declaration.
6006 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6008 * features/Makefile: Add feature marker to targets with new style
6009 target descriptions.
6010 * regformats/aarch64.dat: Regenerate.
6011 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6012 * regformats/i386/amd64-avx-linux.dat: Likewise.
6013 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6014 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6015 * regformats/i386/amd64-linux.dat: Likewise.
6016 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6017 * regformats/i386/amd64.dat: Likewise.
6018 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6019 * regformats/i386/i386-avx-linux.dat: Likewise.
6020 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6021 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6022 * regformats/i386/i386-linux.dat: Likewise.
6023 * regformats/i386/i386-mmx-linux.dat: Likewise.
6024 * regformats/i386/i386-mpx-linux.dat: Likewise.
6025 * regformats/i386/i386.dat: Likewise.
6026 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6027 * regformats/i386/x32-avx-linux.dat: Likewise.
6028 * regformats/i386/x32-linux.dat: Likewise.
6029 * regformats/tic6x-c62x-linux.dat: Likewise.
6030 * regformats/tic6x-c64x-linux.dat: Likewise.
6031 * regformats/tic6x-c64xp-linux.dat: Likewise.
6032 * regformats/regdat.sh: Parse feature marker.
6034 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6036 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6037 (tdesc_osabi_name): Likewise.
6038 * target-descriptions.c (tdesc_architecture_name): Add new
6040 (tdesc_osabi_name): Likewise.
6042 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6044 * common/tdesc.c (tdesc_predefined_type): Move to here.
6045 (tdesc_named_type): Likewise.
6046 (tdesc_create_vector): Likewise.
6047 (tdesc_create_struct): Likewise.
6048 (tdesc_set_struct_size): Likewise.
6049 (tdesc_create_union): Likewise.
6050 (tdesc_create_flags): Likewise.
6051 (tdesc_create_enum): Likewise.
6052 (tdesc_add_field): Likewise.
6053 (tdesc_add_typed_bitfield): Likewise.
6054 (tdesc_add_bitfield): Likewise.
6055 (tdesc_add_flag): Likewise.
6056 (tdesc_add_enum_value): Likewise.
6057 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6058 (struct tdesc_type_vector): Likewise.
6059 (struct tdesc_type_field): Likewise.
6060 (struct tdesc_type_with_fields): Likewise.
6061 (tdesc_create_enum): Add declaration.
6062 (tdesc_add_typed_bitfield): Likewise.
6063 (tdesc_add_enum_value): Likewise.
6064 * target-descriptions.c (tdesc_type_field): Move from here.
6065 (tdesc_type_builtin): Likewise.
6066 (tdesc_type_vector): Likewise.
6067 (tdesc_type_with_fields): Likewise.
6068 (tdesc_predefined_types): Likewise.
6069 (tdesc_named_type): Likewise.
6070 (tdesc_create_vector): Likewise.
6071 (tdesc_create_struct): Likewise.
6072 (tdesc_set_struct_size): Likewise.
6073 (tdesc_create_union): Likewise.
6074 (tdesc_create_flags): Likewise.
6075 (tdesc_create_enum): Likewise.
6076 (tdesc_add_field): Likewise.
6077 (tdesc_add_typed_bitfield): Likewise.
6078 (tdesc_add_bitfield): Likewise.
6079 (tdesc_add_flag): Likewise.
6080 (tdesc_add_enum_value): Likewise.
6081 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6082 (tdesc_add_typed_bitfield): Likewise.
6083 (tdesc_add_enum_value): Likewise.
6085 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6087 * common/tdesc.c (tdesc_feature::accept): Move to here.
6088 (tdesc_feature::operator==): Likewise.
6089 (tdesc_create_reg): Likewise.
6090 * common/tdesc.h (tdesc_type_kind): Likewise.
6091 (struct tdesc_type): Likewise.
6092 (struct tdesc_feature): Likewise.
6093 * regformats/regdat.sh: Create a feature.
6094 * target-descriptions.c (tdesc_type_kind): Move from here.
6095 (tdesc_type): Likewise.
6096 (tdesc_type_up): Likewise.
6097 (tdesc_feature): Likewise.
6098 (tdesc_create_reg): Likewise.
6100 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6102 * Makefile.in: Add arch/tdesc.c
6103 * common/tdesc.c: New file.
6104 * common/tdesc.h (tdesc_element_visitor): Move to here.
6105 (tdesc_element): Likewise.
6106 (tdesc_reg): Likewise.
6107 (tdesc_reg_up): Likewise.
6108 * regformats/regdef.h (reg): Add offset to constructors.
6109 * target-descriptions.c (tdesc_element_visitor): Move from here.
6110 (tdesc_element): Likewise.
6111 (tdesc_reg): Likewise.
6112 (tdesc_reg_up): Likewise.
6114 2018-04-17 Tom Tromey <tom@tromey.com>
6116 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6119 2018-04-17 Tom Tromey <tom@tromey.com>
6121 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6123 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6125 * symtab.c (print_symbol_info): Skip printing filename and line
6126 number when `last' is NULL.
6127 (symtab_symbol_info): Use empty string instead of NULL for first
6128 invocation of print_symbol_info.
6129 (rbreak_command): Pass NULL to `last' parameter of
6132 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6134 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6137 2018-04-16 Pedro Alves <palves@redhat.com>
6139 * MAINTAINERS (sh): Remove.
6140 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6141 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6142 (ALLDEPFILES): Remove sh64-tdep.c.
6143 * NEWS: Mentions that support for SH-5/SH64 is removed.
6144 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6145 (sh*-*-openbsd*): Ditto.
6146 (sh64-*-elf*): Remove.
6148 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6149 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6150 * sh-tdep.c: No longer include "sh64-tdep.h".
6151 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6152 * sh64-tdep.c, sh64-tdep.h: Remove files.
6154 2018-04-16 Pedro Alves <palves@redhat.com>
6156 * MAINTAINERS: Remove m88k.
6157 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6158 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6159 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6160 * NEWS: Mention that support for m88k was removed.
6161 * configure.host (m88*-*-*): Remove support.
6162 * configure.nat (m88k-*-*): Remove support.
6163 * configure.tgt (m88*-*-openbsd*): Remove.
6164 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6166 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6168 * configure.tgt (x86_tobjs): New variable.
6169 (amd64_tobjs, i386_tobjs): Use it.
6171 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6173 * symtab.c (print_symbol_info): Precede the symbol definition by
6174 the line number when available.
6175 * NEWS: Advertise this enhancement.
6177 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6179 * NEWS (New options): announce set/show record btrace cpu.
6180 * btrace.c: Include record-btrace.h.
6181 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6182 the vendor is unknown.
6183 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6184 Maybe overwrite the btrace configuration's cpu.
6185 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6186 (btrace_fetch): Add cpu parameter. Update callers.
6187 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6188 Maybe overwrite the btrace configuration's cpu. Skip enabling
6189 errata workarounds if the vendor is unknown.
6190 * python/py-record-btrace.c: Include record-btrace.h.
6191 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6192 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6193 * record-btrace.c (record_btrace_cpu_state_kind): New.
6194 (record_btrace_cpu): New.
6195 (set_record_btrace_cpu_cmdlist): New.
6196 (record_btrace_get_cpu): New.
6197 (require_btrace_thread, record_btrace_info)
6198 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6199 (cmd_set_record_btrace_cpu_none): New.
6200 (cmd_set_record_btrace_cpu_auto): New.
6201 (cmd_set_record_btrace_cpu): New.
6202 (cmd_show_record_btrace_cpu): New.
6203 (_initialize_record_btrace): Initialize set/show record btrace cpu
6205 * record-btrace.h (record_btrace_get_cpu): New.
6207 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6209 * record.c (set_record_command): Fix typo in message.
6211 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6213 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6215 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6217 * infrun.c (process_event_stop_test): Call
6218 gdbarch_in_indirect_branch_thunk.
6219 * gdbarch.sh (in_indirect_branch_thunk): New.
6220 * gdbarch.c: Regenerated.
6221 * gdbarch.h: Regenerated.
6224 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6225 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6226 (ALLDEPFILES): Add x86-tdep.c.
6227 * arch-utils.h (default_in_indirect_branch_thunk): New.
6228 * arch-utils.c (default_in_indirect_branch_thunk): New.
6229 * i386-tdep: Include x86-tdep.h.
6230 (i386_in_indirect_branch_thunk): New.
6231 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6233 * amd64-tdep: Include x86-tdep.h.
6234 (amd64_in_indirect_branch_thunk): New.
6235 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6237 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6240 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6241 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6242 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6245 2018-04-12 Tom Tromey <tom@tromey.com>
6247 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6248 (rust_evaluate_subexp): Likewise.
6250 2018-04-12 Pedro Alves <palves@redhat.com>
6252 * procfs.c (procfs_detach): Make forward declaration's prototype
6253 match definition's protototype.
6254 (proc_get_LDT_entry): Remove stale do_cleanups call.
6256 2018-04-12 Pedro Alves <palves@redhat.com>
6258 * target.h (target_ops::to_has_exited): Delete.
6259 (target_has_exited): Delete.
6260 * target-delegates.c: Regenerate.
6262 2018-04-11 Pedro Alves <palves@redhat.com>
6264 * target.c (fileio_fh_t::t): Add comment.
6265 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6266 (target_fileio_close): Handle a NULL target.
6267 (invalidate_fileio_fh): New.
6268 (target_close): Call it.
6269 * remote.c (remote_hostio_send_command): No longer check whether
6270 remote_desc is open.
6272 2018-04-11 Pedro Alves <palves@redhat.com>
6274 * target.c (fileio_fh_t): Make it a named struct instead of a
6276 (fileio_fh_t::is_closed): New method.
6277 (DEF_VEC_O (fileio_fh_t)): Remove.
6278 (fileio_fhandles): Now a std::vector.
6279 (is_closed_fileio_fh): Delete.
6280 (acquire_fileio_fd): Adjust. Rename parameters.
6281 (release_fileio_fd): Adjust.
6282 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6283 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6284 (target_fileio_close): Adjust.
6286 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6288 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6291 2018-04-10 Pedro Alves <palves@redhat.com>
6293 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6294 (scoped_finish_thread_state): New class.
6295 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6297 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6298 (fetch_inferior_event, normal_stop): Likewise.
6299 * thread.c (finish_thread_state_cleanup): Delete.
6301 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6302 Pedro Alves <palves@redhat.com>
6304 * value.c: Include "selftest.h" and "common/array-view.h".
6305 (struct range) <operator ==>: New.
6306 (test_ranges_contain): New.
6307 (check_ranges_vector): New.
6308 (test_insert_into_bit_range_vector): New.
6309 (_initialize_values): Register selftests.
6310 * common/array-view.h (operator==, operator!=): New.
6312 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6314 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6316 * inline-frame.c: Include <algorithm>.
6317 (struct inline_state): Add constructor.
6318 (inline_state_s): Remove.
6319 (DEF_VEC_O(inline_state_s)): Remove.
6320 (inline_states): Change type to std::vector.
6321 (find_inline_frame_state): Adjust to std::vector.
6322 (allocate_inline_frame_state): Remove.
6323 (clear_inline_frame_state): Adjust to std::vector.
6324 (skip_inline_frames): Adjust to std::vector.
6326 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6328 * tracepoint.h (struct trace_state_variable): Add constructor.
6329 <name>: Change type to std::string.
6330 * tracepoint.c (tsv_s): Remove.
6331 (DEF_VEC_O(tsv_s)): Remove.
6332 (tvariables): Change to std::vector.
6333 (create_trace_state_variable): Adjust to std::vector.
6334 (find_trace_state_variable): Likewise.
6335 (find_trace_state_variable_by_number): Likewise.
6336 (delete_trace_state_variable): Likewise.
6337 (trace_variable_command): Adjust to std::string.
6338 (delete_trace_variable_command): Likewise.
6339 (tvariables_info_1): Adjust to std::vector.
6340 (save_trace_state_variables): Likewise.
6341 (start_tracing): Likewise.
6342 (merge_uploaded_trace_state_variables): Adjust to std::vector
6344 * target.h (struct target_ops)
6345 <to_download_trace_state_variable>: Pass reference to
6346 trace_state_variable.
6347 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6348 * target-delegates.c: Re-generate.
6349 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6350 (mi_tsv_deleted): Likewise.
6351 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6352 * remote.c (remote_download_trace_state_variable): Change
6353 pointer to reference and adjust.
6354 * make-target-delegates (parse_argtypes): Handle references.
6355 (write_function_header): Likewise.
6356 (munge_type): Likewise.
6358 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6360 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6361 string_view-selftests.c.
6362 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6364 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6365 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6366 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6367 * unittests/basic_string_view/element_access/char/1.cc:
6369 * unittests/basic_string_view/element_access/char/empty.cc:
6371 * unittests/basic_string_view/element_access/char/front_back.cc:
6373 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6374 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6376 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6378 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6380 * unittests/basic_string_view/operations/compare/char/1.cc:
6382 * unittests/basic_string_view/operations/compare/char/13650.cc:
6384 * unittests/basic_string_view/operations/copy/char/1.cc:
6386 * unittests/basic_string_view/operations/data/char/1.cc:
6388 * unittests/basic_string_view/operations/find/char/1.cc:
6390 * unittests/basic_string_view/operations/find/char/2.cc:
6392 * unittests/basic_string_view/operations/find/char/3.cc:
6394 * unittests/basic_string_view/operations/find/char/4.cc:
6396 * unittests/basic_string_view/operations/rfind/char/1.cc:
6398 * unittests/basic_string_view/operations/rfind/char/2.cc:
6400 * unittests/basic_string_view/operations/rfind/char/3.cc:
6402 * unittests/basic_string_view/operations/substr/char/1.cc:
6404 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6405 * unittests/string_view-selftests.c: New file.
6407 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6409 * unittests/basic_string_view/capacity/1.cc: New file.
6410 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6411 * unittests/basic_string_view/cons/char/1.cc: New file.
6412 * unittests/basic_string_view/cons/char/2.cc: New file.
6413 * unittests/basic_string_view/cons/char/3.cc: New file.
6414 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6415 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6416 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6417 * unittests/basic_string_view/element_access/char/1.cc: New file.
6418 * unittests/basic_string_view/element_access/char/2.cc: New file.
6419 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6420 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6421 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6422 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6423 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6424 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6425 * unittests/basic_string_view/include.cc: New file.
6426 * unittests/basic_string_view/inserters/char/1.cc: New file.
6427 * unittests/basic_string_view/inserters/char/2.cc: New file.
6428 * unittests/basic_string_view/inserters/char/3.cc: New file.
6429 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6430 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6431 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6432 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6433 * unittests/basic_string_view/literals/types.cc: New file.
6434 * unittests/basic_string_view/literals/values.cc: New file.
6435 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6436 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6437 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6438 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6439 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6440 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6441 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6442 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6443 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6444 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6445 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6446 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6447 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6448 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6449 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6450 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6451 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6452 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6453 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6454 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6455 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6456 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6457 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6458 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6459 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6460 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6461 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6462 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6463 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6464 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6465 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6466 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6467 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6468 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6469 * unittests/basic_string_view/operators/char/2.cc: New file.
6470 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6471 * unittests/basic_string_view/range_access/char/1.cc: New file.
6472 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6473 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6474 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6475 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6476 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6477 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6478 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6479 * unittests/basic_string_view/typedefs.cc: New file.
6480 * unittests/basic_string_view/types/1.cc: New file.
6482 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6484 * common/gdb_string_view.h: Remove libstdc++ implementation
6485 details, adjust to gdb reality.
6486 * common/gdb_string_view.tcc: Likewise.
6487 * cli/cli-script.c (struct string_view): Remove.
6488 (user_args) <m_args>: Change element type to gdb::string_view.
6489 (user_args::insert_args): Adjust.
6491 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6493 * common/gdb_string_view.h: New file.
6494 * common/gdb_string_view.tcc: New file.
6496 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6498 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6499 * configure: Re-generate.
6501 2018-04-09 Pedro Alves <palves@redhat.com>
6503 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6504 (set_target_gdbarch): Call
6505 gdb::observers::architecture_changed.notify instead of
6506 observer_notify_architecture_changed.
6508 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6510 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6511 (do_restore_current_traceframe_cleanup): Remove.
6512 (restore_current_traceframe_cleanup_dtor): Remove.
6513 (make_cleanup_restore_current_traceframe): Remove.
6514 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6516 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6517 * infrun.c (fetch_inferior_event): Use
6518 scoped_restore_current_traceframe.
6520 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6522 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6524 <n_allocated_type_units>: Remove.
6525 <all_type_units>: Change to std::vector.
6526 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6527 to std::vector change.
6528 (dwarf2_per_objfile::get_cutu): Likewise.
6529 (dwarf2_per_objfile::get_tu): Likewise.
6530 (create_signatured_type_table_from_index): Likewise.
6531 (create_signatured_type_table_from_debug_names): Likewise.
6532 (dw2_symtab_iter_next): Likewise.
6533 (dw2_print_stats): Likewise.
6534 (dw2_expand_all_symtabs): Likewise.
6535 (dw2_expand_marked_cus): Likewise.
6536 (dw2_debug_names_iterator::next): Likewise.
6537 (dwarf2_initialize_objfile): Likewise.
6538 (add_signatured_type_cu_to_table): Likewise.
6539 (create_all_type_units): Likewise.
6540 (add_type_unit): Likewise.
6541 (struct tu_abbrev_offset): Add constructor.
6542 (build_type_psymtabs_1): Adjust to std::vector change.
6543 (print_tu_stats): Likewise.
6544 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6545 (write_debug_names): Likewise.
6547 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6549 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6550 Make an std::vector.
6551 <n_comp_units>: Remove.
6552 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6553 to std::vector change.
6554 (dwarf2_per_objfile::get_cutu): Likewise.
6555 (dwarf2_per_objfile::get_cu): Likewise.
6556 (create_cus_from_index): Likewise.
6557 (create_addrmap_from_index): Likewise.
6558 (create_addrmap_from_aranges): Likewise.
6559 (dwarf2_read_index): Likewise.
6560 (dw2_find_last_source_symtab): Likewise.
6561 (dw2_map_symtabs_matching_filename): Likewise.
6562 (dw2_symtab_iter_next): Likewise.
6563 (dw2_print_stats): Likewise.
6564 (dw2_expand_all_symtabs): Likewise.
6565 (dw2_expand_symtabs_with_fullname): Likewise.
6566 (dw2_expand_marked_cus): Likewise.
6567 (dw2_map_symbol_filenames): Likewise.
6568 (create_cus_from_debug_names): Likewise.
6569 (dwarf2_read_debug_names): Likewise.
6570 (dw2_debug_names_iterator::next): Likewise.
6571 (dwarf2_initialize_objfile): Likewise.
6572 (set_partial_user): Likewise.
6573 (dwarf2_build_psymtabs_hard): Likewise.
6574 (read_comp_units_from_section): Remove arguments, adjust to
6576 (create_all_comp_units): Adjust to std::vector and
6577 read_comp_units_from_section changes.
6578 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6580 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6581 (psyms_seen_size): Likewise.
6582 (write_gdbindex): Likewise.
6583 (write_debug_names): Likewise.
6585 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6587 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6588 with dwarf2_per_objfile.
6589 (create_cus_from_index): Likewise.
6590 (create_signatured_type_table_from_index): Likewise.
6591 (dwarf2_read_index): Likewise.
6592 (dwarf2_initialize_objfile): Likewise.
6593 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6594 per_cu rather than get_dwarf2_per_objfile.
6596 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6598 * dwarf2read.h (struct signatured_type): Forward declare.
6599 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6601 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6602 (dw2_get_cutu): ...this.
6603 (dwarf2_per_objfile::get_cu): Rename from...
6604 (dw2_get_cu): ...this.
6605 (dwarf2_per_objfile::get_tu): New.
6606 (create_addrmap_from_index): Adjust.
6607 (create_addrmap_from_aranges): Adjust.
6608 (dw2_find_last_source_symtab): Adjust.
6609 (dw2_map_symtabs_matching_filename): Adjust.
6610 (dw2_symtab_iter_next): Adjust.
6611 (dw2_print_stats): Adjust.
6612 (dw2_expand_all_symtabs): Adjust.
6613 (dw2_expand_symtabs_with_fullname): Adjust.
6614 (dw2_expand_marked_cus): Adjust.
6615 (dw_expand_symtabs_matching_file_matcher): Adjust.
6616 (dw2_map_symbol_filenames): Adjust.
6617 (dw2_debug_names_iterator::next): Adjust.
6618 (dwarf2_initialize_objfile): Adjust.
6619 (set_partial_user): Adjust.
6620 (dwarf2_build_psymtabs_hard): Adjust.
6622 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6624 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6625 Remove unused variables.
6626 (dw2_map_symtabs_matching_filename): Likewise.
6627 (dwarf2_record_block_ranges): Likewise.
6628 (dwarf2_read_addr_index): Likewise.
6629 (follow_die_offset): Likewise.
6631 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6633 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6634 to symbol_file_add_main.
6636 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6639 * mi/mi-console.c (do_fputc_async_safe): New.
6640 (mi_console_file::write_async_safe): New.
6641 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6642 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6644 * ui-file.c (ui_file::putstrn): Adjust call to
6645 fputstrn_unfiltered.
6646 * utils.c (printchar): Replace do_fputs and do_fprintf
6647 parameters by do_fputc.
6648 (fputstr_filtered): Adjust call to printchar.
6649 (fputstr_unfiltered): Likewise.
6650 (fputstrn_filtered): Likewise.
6651 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6653 * utils.h (do_fputc_ftype): New typedef.
6654 (fputstrn_unfiltered): Add do_fputc parameter.
6656 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6658 * regformats/i386/i386-avx.dat: Remove.
6660 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6663 * amd64-tdep.c (amd64_none_init_abi): New function.
6664 (amd64_x32_none_init_abi): New function.
6665 (_initialize_amd64_tdep): Register handlers for x86-64 and
6666 x64_32 with GDB_OSABI_NONE.
6667 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6668 GDB_OSABI_NONE osabi.
6670 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6673 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6675 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6676 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6678 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6680 * common/byte-vector.h (char_vector): New type.
6681 * target.h (target_read_alloc): Return
6682 gdb::optional<byte_vector>.
6683 (target_read_stralloc): Return gdb::optional<char_vector>.
6684 (target_get_osdata): Return gdb::optional<char_vector>.
6685 * target.c (target_read_alloc_1): Templatize. Replacement
6686 manual memory management with vector.
6687 (target_read_alloc): Change return type, adjust.
6688 (target_read_stralloc): Change return type, adjust.
6689 (target_get_osdata): Change return type, adjust.
6690 * auxv.c (struct auxv_info) <length>: Remove.
6691 <data>: Change type to gdb::optional<byte_vector>.
6692 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6693 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6694 (target_auxv_search): Adjust.
6695 (fprint_target_auxv): Adjust.
6696 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6697 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6698 (linux_make_corefile_notes): Adjust.
6699 * osdata.c (get_osdata): Adjust.
6700 * remote.c (remote_get_threads_with_qxfer): Adjust.
6701 (remote_memory_map): Adjust.
6702 (remote_traceframe_info): Adjust.
6703 (btrace_read_config): Adjust.
6704 (remote_read_btrace): Adjust.
6705 (remote_pid_to_exec_file): Adjust.
6706 * solib-aix.c (solib_aix_get_library_list): Adjust.
6707 * solib-dsbt.c (decode_loadmap): Don't free buf.
6708 (dsbt_get_initial_loadmaps): Adjust.
6709 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6710 * solib-target.c (solib_target_current_sos): Adjust.
6711 * tracepoint.c (sdata_make_value): Adjust.
6712 * xml-support.c (xinclude_start_include): Adjust.
6713 (xml_fetch_content_from_file): Adjust.
6714 * xml-support.h (xml_fetch_another): Change return type.
6715 (xml_fetch_content_from_file): Change return type.
6716 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6717 * xml-tdesc.c (file_read_description_xml): Adjust.
6718 (fetch_available_features_from_target): Change return type.
6719 (target_fetch_description_xml): Adjust.
6720 (target_read_description_xml): Adjust.
6722 2018-04-06 Tom Tromey <tom@tromey.com>
6724 * value.c (~value): Update.
6725 (struct value) <contents>: Now unique_xmalloc_ptr.
6726 (value_contents_bits_eq, allocate_value_contents)
6727 (value_contents_raw, value_contents_all_raw)
6728 (value_contents_for_printing, value_contents_for_printing_const)
6729 (set_value_enclosing_type): Update.
6731 2018-04-06 Tom Tromey <tom@tromey.com>
6733 * value.c (range_s): Remove typedef, VEC.
6734 (struct range): Add operator<.
6735 (range_lessthan): Remove.
6736 (ranges_contain): Change type.
6738 (struct value) <unavailable, optimized_out>: Now std::vector.
6739 (value_entirely_available)
6740 (value_entirely_covered_by_range_vector)
6741 (value_entirely_unavailable, value_entirely_optimized_out):
6743 (insert_into_bit_range_vector): Change argument type.
6744 (find_first_range_overlap): Likewise.
6745 (struct ranges_and_idx, value_contents_bits_eq)
6746 (require_not_optimized_out, require_available): Update.
6747 (ranges_copy_adjusted): Change argument types.
6748 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6750 2018-04-06 Tom Tromey <tom@tromey.com>
6752 * value.c (~value): Update.
6753 (struct value) <parent>: Now a value_ref_ptr.
6754 (value_parent, set_value_parent, value_address, value_copy):
6757 2018-04-06 Tom Tromey <tom@tromey.com>
6759 * value.c (struct value): Add constructor, destructor, and member
6761 (allocate_value_lazy, value_decref): Update.
6763 2018-04-06 Tom Tromey <tom@tromey.com>
6765 * value.c (struct value) <released, next>: Remove.
6766 (all_values): Now a std::vector.
6767 (allocate_value_lazy): Update.
6768 (value_next): Remove.
6769 (value_mark, value_free_to_mark, release_value)
6770 (value_release_to_mark): Update.
6772 2018-04-06 Tom Tromey <tom@tromey.com>
6774 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6775 (free_value_chain): Remove.
6776 * value.c (free_value_chain): Remove.
6777 (value_release_to_mark): Return a std::vector.
6778 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6780 (check_condition): Update.
6781 * eval.c (fetch_subexp_value): Change "val_chain" to a
6783 * breakpoint.c (update_watchpoint): Update.
6784 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6786 2018-04-06 Tom Tromey <tom@tromey.com>
6788 * value.h (free_all_values): Remove.
6789 * value.c (free_all_values): Remove.
6791 2018-04-06 Tom Tromey <tom@tromey.com>
6793 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6794 (value_history_chain, value_history_count): Remove.
6795 (value_history): New global.
6796 (record_latest_value, access_value_history, show_values)
6797 (preserve_values): Update.
6799 2018-04-06 Tom Tromey <tom@tromey.com>
6801 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6802 * varobj.c (varobj_set_display_format, varobj_set_value)
6803 (install_default_visualizer, construct_visualizer)
6804 (install_new_value, ~varobj, varobj_get_value_type)
6805 (my_value_of_variable, varobj_editable_p): Update.
6806 * c-varobj.c (c_describe_child, c_value_of_variable)
6807 (cplus_number_of_children, cplus_describe_child): Update.
6808 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6809 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6810 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6812 2018-04-06 Tom Tromey <tom@tromey.com>
6814 * printcmd.c (last_examine_address): Change type to
6816 (do_examine, x_command): Update.
6818 2018-04-06 Tom Tromey <tom@tromey.com>
6820 * value.c (release_value): Update.
6821 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6822 (struct bpstats) <val>: Now a value_ref_ptr.
6823 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6824 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6825 (~watchpoint, print_it_watchpoint, watch_command_1)
6826 (invalidate_bp_value_on_memory_change): Update.
6828 2018-04-06 Tom Tromey <tom@tromey.com>
6830 * varobj.c (varobj_clear_saved_item)
6831 (update_dynamic_varobj_children, install_new_value, ~varobj):
6833 * value.h (value_incref): Move declaration earlier.
6834 (value_decref): Rename from value_free.
6835 (struct value_ref_policy): New.
6836 (value_ref_ptr): New typedef.
6837 (struct value_deleter): Remove.
6838 (gdb_value_up): Remove typedef.
6839 (release_value): Change return type.
6840 (release_value_or_incref): Remove.
6841 * value.c (set_value_parent): Update.
6842 (value_incref): Change return type.
6843 (value_decref): Rename from value_free.
6844 (value_free_to_mark, free_all_values, free_value_chain): Update.
6845 (release_value): Return value_ref_ptr.
6846 (release_value_or_incref): Remove.
6847 (record_latest_value, set_internalvar, clear_internalvar):
6849 * stack.c (info_frame_command): Don't call value_free.
6850 * python/py-value.c (valpy_dealloc, valpy_new)
6851 (value_to_value_object): Update.
6852 * printcmd.c (do_examine): Update.
6853 * opencl-lang.c (lval_func_free_closure): Update.
6854 * mi/mi-main.c (register_changed_p): Don't call value_free.
6855 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6856 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6857 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6859 * guile/scm-value.c (vlscm_free_value_smob)
6860 (vlscm_scm_from_value): Update.
6861 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6862 (frame_unwind_register_unsigned, get_frame_register_bytes)
6863 (put_frame_register_bytes): Don't call value_free.
6864 * findvar.c (address_from_register): Don't call value_free.
6865 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6866 * dwarf2loc.c (entry_data_value_free_closure)
6867 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6868 (dwarf2_evaluate_loc_desc_full): Update.
6869 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6870 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6871 (~watchpoint, watch_command_1)
6872 (invalidate_bp_value_on_memory_change): Update.
6873 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6875 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6878 * warning.m4: Add -Wno-error=deprecated-register.
6879 * configure: Re-generate.
6881 2018-04-05 Tom Tromey <tom@tromey.com>
6883 * linespec.h: Remove include of "vec.h".
6885 2018-04-05 Tom Tromey <tom@tromey.com>
6887 * linespec.c (typep): Remove typedef.
6888 (find_methods, find_superclass_methods): Take a std::vector.
6889 (find_method): Use std::vector.
6891 2018-04-05 Tom Tromey <tom@tromey.com>
6893 * utils.c (compare_strings): Remove.
6894 * utils.h (compare_strings): Remove.
6895 * objc-lang.h (find_imps): Update.
6896 * objc-lang.c (find_methods): Take a std::vector.
6897 (uniquify_strings, find_imps): Likewise.
6898 * linespec.c (find_methods): Take a std::vector.
6899 (decode_objc): Use std::vector.
6900 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6902 (find_method, find_function_symbols): Use std::vector.
6904 2018-04-05 Tom Tromey <tom@tromey.com>
6906 * completer.c (completion_tracker::completion_tracker): Remove
6908 (completion_tracker::discard_completions): Likewise.
6909 * breakpoint.c (ambiguous_names_p): Remove cast.
6910 * ada-lang.c (_initialize_ada_language): Remove cast.
6911 * utils.h (streq): Update.
6912 (streq_hash): Add new declaration.
6913 * utils.c (streq): Return bool.
6914 (streq_hash): New function.
6916 2018-04-05 Tom Tromey <tom@tromey.com>
6918 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6919 Remove a string copy.
6921 2018-04-05 Tom Tromey <tom@tromey.com>
6923 * linespec.c (filter_results): Use std::vector.
6924 (decode_line_2, decode_line_full): Update.
6926 2018-04-05 Tom Tromey <tom@tromey.com>
6928 * linespec.c (canonical_to_fullform): Return std::string.
6929 (filter_results): Update.
6930 (struct decode_line_2_item): Add constructor.
6931 <fullform, displayform>: Now std::string.
6932 (decode_line_2_compare_items): Now a std::sort comparator.
6933 (decode_line_2): Update.
6935 2018-04-05 Tom Tromey <tom@tromey.com>
6937 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6938 (unexpected_linespec_error): Update.
6939 (linespec_parse_basic, parse_linespec): Update.
6941 2018-04-05 Tom Tromey <tom@tromey.com>
6943 * linespec.c (linespec_parse_basic): Reindent.
6945 2018-04-05 Tom Tromey <tom@tromey.com>
6947 * minsyms.h (iterate_over_minimal_symbols): Update.
6948 * minsyms.c (iterate_over_minimal_symbols): Take a
6950 * linespec.c (struct collect_minsyms): Remove.
6951 (compare_msyms): Now a std::sort comparator.
6952 (add_minsym): Add parameters.
6953 (search_minsyms_for_name): Update. Use std::vector.
6955 2018-04-03 Tom Tromey <tom@tromey.com>
6957 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6960 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6962 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6964 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6967 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6968 printing static type.
6970 2018-04-01 Tom Tromey <tom@tromey.com>
6972 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6973 (rs6000_xfer_shared_libraries): Update.
6975 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6977 * common/gdb_vecs.h (char_ptr): Remove.
6978 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6980 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6982 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6984 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6986 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6988 * tracepoint.h (struct uploaded_tp): Initialize fields.
6989 <actions, step_actions, cmd_strings>: Change type to
6990 std::vector<char *>.
6991 * tracepoint.c (get_uploaded_tp): Allocate with new.
6992 (free_uploaded_tps): Free with delete.
6993 (parse_tracepoint_definition): Adjust to std::vector change.
6994 * breakpoint.c (read_uploaded_action): Likewise.
6995 (create_tracepoint_from_upload): Likewise.
6996 * ctf.c (ctf_write_uploaded_tp): Likewise.
6997 (SET_ARRAY_FIELD): Likewise.
6998 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7000 2018-03-30 Tom Tromey <tom@tromey.com>
7002 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7004 (svr4_keep_data_in_core): Update.
7005 (svr4_read_so_list): Update.
7007 2018-03-30 Tom Tromey <tom@tromey.com>
7009 * windows-nat.c (handle_output_debug_string, handle_exception):
7011 * target.h (target_read_string): Update.
7012 * target.c (target_read_string): Change "string" to
7014 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7016 * solib-frv.c (frv_current_sos): Update.
7017 * solib-dsbt.c (dsbt_current_sos): Update.
7018 * solib-darwin.c (darwin_current_sos): Update.
7019 * linux-thread-db.c (inferior_has_bug): Update.
7020 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7021 Update. Remove alloca.
7022 * ada-lang.c (ada_main_name): Update.
7024 2018-03-30 Tom Tromey <tom@tromey.com>
7026 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7027 (struct dwo_file_deleter): New.
7028 (dwo_file_up): New typedef.
7029 (open_and_init_dwo_file): Use dwo_file_up.
7030 (free_dwo_file_cleanup): Remove.
7032 2018-03-30 Tom Tromey <tom@tromey.com>
7034 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7035 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7037 2018-03-30 Tom Tromey <tom@tromey.com>
7039 * dwarf2read.c (class free_cached_comp_units): New class.
7040 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7041 (free_cached_comp_units): Remove function.
7043 2018-03-30 Tom Tromey <tom@tromey.com>
7045 * utils.h (make_cleanup_unpush_target): Remove.
7046 * inf-ptrace.c (struct target_unpusher): New.
7047 (target_unpush_up) New typedef.
7048 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7050 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7052 2018-03-27 Tom Tromey <tom@tromey.com>
7054 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7056 2018-03-27 Pedro Alves <palves@redhat.com>
7057 Tom Tromey <tom@tromey.com>
7059 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7060 destructor. Now a class.
7061 (gdb_readline_wrapper_cleanup): Remove function.
7062 (gdb_readline_wrapper): Remove cleanups.
7064 2018-03-27 Tom Tromey <tom@tromey.com>
7066 * typeprint.h (struct type_print_options) <local_typedefs,
7067 global_typedefs>: Remove "struct" keyword.
7068 (class typedef_hash_table): New class.
7069 (recursively_update_typedef_hash, add_template_parameters)
7070 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7071 (find_typedef_in_hash): Don't declare.
7072 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7073 (typedef_hash_table::recursively_update): Rename from
7074 recursively_update_typedef_hash. Now a member.
7075 (typedef_hash_table::add_template_parameters): Rename from
7076 add_template_parameters. Now a member.
7077 (typedef_hash_table::typedef_hash_table): Now a constructor;
7078 rename from create_typedef_hash.
7079 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7080 rename from free_typedef_hash.
7081 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7082 (do_free_global_table): Remove.
7083 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7084 from copy_type_recursive.
7085 (create_global_typedef_table): Remove.
7086 (typedef_hash_table::find_global_typedef): Now a member of
7088 (typedef_hash_table::find_typedef): Rename from
7089 find_typedef_in_hash; now a member.
7090 (whatis_exp): Update.
7091 * extension.h (struct ext_lang_type_printers): Add constructor and
7093 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7095 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7096 Now a constructor; rename from start_ext_lang_type_printers.
7097 (ext_lang_type_printers): Now a destructor; rename from
7098 free_ext_lang_type_printers.
7099 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7101 (c_type_print_base_struct_union): Update. Remove cleanups.
7103 2018-03-27 Tom Tromey <tom@tromey.com>
7105 * dwarf-index-write.c: Include <cmath>.
7107 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7109 * NEWS: Add entry describing new "set|show varsize-limit" command.
7110 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7112 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7115 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7117 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7119 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7120 * dwarf-index-common.c: New file.
7121 * dwarf-index-common.h: New file.
7122 * dwarf-index-write.c: New file.
7123 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7124 (struct dwarf2_section_info): Move from here.
7125 (dwarf2_section_info_def): Likewise.
7126 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7127 (offset_type): Likewise.
7128 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7129 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7130 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7131 (byte_swap): Likewise.
7132 (MAYBE_SWAP): Likewise.
7133 (dwarf2_per_cu_ptr): Likewise.
7134 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7135 (struct tu_stats): Likewise.
7136 (struct dwarf2_per_objfile): Likewise.
7137 (struct dwarf2_per_cu_data): Likewise.
7138 (struct signatured_type): Likewise.
7139 (sig_type_ptr): Likewise.
7140 (DEF_VEC_P (sig_type_ptr)): Likewise.
7141 (INDEX4_SUFFIX): Likewise.
7142 (INDEX5_SUFFIX): Likewise.
7143 (DEBUG_STR_SUFFIX): Likewise.
7144 (dwarf2_read_section): Make non-static.
7145 (mapped_index_string_hash): Move from here.
7146 (dwarf5_djb_hash): Likewise.
7147 (file_write): Likewise.
7148 (class data_buf): Likewise.
7149 (struct symtab_index_entry): Likewise.
7150 (struct mapped_symtab): Likewise.
7151 (find_slot): Likewise.
7152 (hash_expand): Likewise.
7153 (add_index_entry): Likewise.
7154 (uniquify_cu_indices): Likewise.
7155 (class c_str_view): Likewise.
7156 (class c_str_view_hasher): Likewise.
7157 (class vector_hasher): Likewise.
7158 (write_hash_table): Likewise.
7159 (psym_index_map): Likewise.
7160 (struct addrmap_index_data): Likewise.
7161 (add_address_entry): Likewise.
7162 (add_address_entry_worker): Likewise.
7163 (write_address_map): Likewise.
7164 (symbol_kind): Likewise.
7165 (write_psymbols): Likewise.
7166 (struct signatured_type_index_data): Likewise.
7167 (write_one_signatured_type): Likewise.
7168 (recursively_count_psymbols): Likewise.
7169 (recursively_write_psymbols): Likewise.
7170 (class debug_names): Likewise.
7171 (check_dwarf64_offsets): Likewise.
7172 (psyms_seen_size): Likewise.
7173 (write_gdbindex): Likewise.
7174 (write_debug_names): Likewise.
7175 (assert_file_size): Likewise.
7176 (write_psymtabs_to_index): Likewise.
7177 (save_gdb_index_command): Likewise.
7178 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7180 * dwarf2read.h: New file.
7182 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7185 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7186 symbol name if the CU's language stores symbol names in linkage
7188 * language.h (struct language_defn)
7189 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7190 all instances of this struct.
7192 2018-03-26 Tom Tromey <tom@tromey.com>
7194 * stack.c (backtrace_command_1): Remove verbose code.
7196 2018-03-26 Tom Tromey <tom@tromey.com>
7198 * python/py-framefilter.c (py_print_type): Don't catch
7199 exceptions. Return void.
7200 (py_print_value): Likewise.
7201 (py_print_single_arg): Likewise.
7202 (enumerate_args): Don't catch exceptions.
7203 (py_print_args): Likewise.
7204 (py_print_frame): Likewise.
7205 (gdbpy_apply_frame_filter): Catch exceptions here.
7207 2018-03-26 Tom Tromey <tom@tromey.com>
7209 * stack.c (_initialize_stack): Remove trailing newlines from help
7210 text. Add "Usage" line to "backtrace" help.
7212 2018-03-26 Tom Tromey <tom@tromey.com>
7215 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7217 2018-03-26 Tom Tromey <tom@tromey.com>
7219 * python/py-framefilter.c (py_print_single_arg): Return
7220 EXT_LANG_BT_ERROR from catch.
7222 2018-03-26 Tom Tromey <tom@tromey.com>
7225 * stack.c (backtrace_command_1): Move some code into no-filters
7228 2018-03-26 Tom Tromey <tom@tromey.com>
7230 * python/py-framefilter.c (throw_quit_or_print_exception): New
7232 (gdbpy_apply_frame_filter): Use it.
7234 2018-03-26 Tom Tromey <tom@tromey.com>
7237 * python/py-framefilter.c (py_print_type, py_print_value)
7238 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7241 2018-03-26 Tom Tromey <tom@tromey.com>
7243 * python/py-framefilter.c (enumerate_args): Use
7244 gdb::unique_xmalloc_ptr.
7246 2018-03-26 Tom Tromey <tom@tromey.com>
7248 * python/py-framefilter.c (py_print_frame): Return
7250 (gdbpy_apply_frame_filter): Update comment.
7251 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7253 <EXT_LANG_BT_NO_FILTERS>: Change value.
7255 2018-03-26 Tom Tromey <tom@tromey.com>
7258 * stack.c (backtrace_command): Parse "hide" argument.
7259 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7260 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7263 2018-03-26 Tom Tromey <tom@tromey.com>
7265 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7267 (backtrace_command): Remove "fulltrace", add "flags".
7269 2018-03-26 Tom Tromey <tom@tromey.com>
7271 * stack.c (backtrace_command): Rewrite command line parsing.
7273 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7275 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7277 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7279 * filename-seen-cache.h: Add include guard.
7281 2018-03-26 Keith Seitz <keiths@redhat.com>
7283 * symfile.c (place_section): Remove "struct" from section_addr_info
7285 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7286 "struct" keyword from section_addr_info.
7288 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7290 * regformats/regdef.h (reg): Add constructors.
7292 2018-03-25 Pedro Alves <palves@redhat.com>
7294 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7295 if then/else bodies in var_func_name extraction.
7297 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7299 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7300 lookup_minimal_symbol() to find symbol entry.
7301 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7303 2018-03-23 Keith Seitz <keiths@redhat.com>
7306 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7307 nested type definitions for C++, too.
7309 2018-03-23 Tom Tromey <tom@tromey.com>
7311 * machoread.c (struct oso_el): Add a constructor. Don't define as
7313 (macho_register_oso): Remove.
7314 (macho_symtab_read): Take a std::vector.
7315 (oso_el_compare_name): Now a std::sort comparator.
7316 (macho_symfile_read_all_oso): Take a std::vector.
7317 (macho_symfile_read): Use std::vector. Remove cleanups.
7319 2018-03-22 Tom Tromey <tom@tromey.com>
7321 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7322 (record_full_goto_bookmark): Use std::string.
7324 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7327 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7330 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7332 * rs6000-tdep.c (store_insn_p): New function.
7333 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7334 and cr_reg to their unshifted values. Use store_insn_p to
7335 match LR saves using either R1 or fdata->alloca_reg. Use
7336 store_insn_p to match CR saves. Set alloca_reg_offset
7337 when alloca_reg and framep are set. Remove lr_reg shift
7338 when assigning to fdata->lr_register.
7340 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7342 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7343 command line args instead of emitting a warning.
7345 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7347 * tracepoint.h (struct static_tracepoint_marker): Initialize
7348 fields, define default constructor, move constructor and move
7349 assignment, disable the rest.
7350 <str_id, extra>: Make std::string.
7351 (release_static_tracepoint_marker): Remove.
7352 (free_current_marker): Remove.
7353 * tracepoint.c (free_current_marker): Remove.
7354 (parse_static_tracepoint_marker_definition): Adjust to
7355 std::string, use new hex2str overload.
7356 (release_static_tracepoint_marker): Remove.
7357 (print_one_static_tracepoint_marker): Get marker by reference
7358 and adjust to std::string.
7359 (info_static_tracepoint_markers_command): Adjust to std::vector
7361 * target.h (static_tracepoint_marker_p): Remove typedef.
7362 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7363 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7365 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7367 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7368 (target_debug_print_std_vector_static_tracepoint_marker): New.
7369 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7371 (target_debug_print_static_tracepoint_marker_p): ... this.
7372 * target-delegates.c: Re-generate.
7373 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7375 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7376 (decode_static_tracepoint_spec): Adjust to std::vector.
7377 (tracepoint_print_one_detail): Adjust to std::string.
7378 (strace_marker_decode_location): Adjust to std::string.
7379 (update_static_tracepoint): Adjust to std::string, remove call
7380 to release_static_tracepoint_marker.
7381 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7382 Adjust to std::vector.
7383 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7384 (remote_static_tracepoint_markers_by_strid): Adjust to
7386 * common/rsp-low.h (hex2str): New overload with explicit count
7388 * common/rsp-low.c (hex2str): New overload with explicit count
7390 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7391 (_initialize_rsp_low_selftests): Add test_hex2str test.
7392 * unittests/tracepoint-selftests.c
7393 (test_parse_static_tracepoint_marker_definition): Adjust to
7396 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7398 * tracepoint.c (parse_static_tracepoint_marker_definition):
7399 Consider case where the definition is followed by more
7401 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7402 tracepoint-selftests.c.
7403 * unittests/tracepoint-selftests.c: New.
7405 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7407 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7410 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7412 * symtab.c (find_pc_sect_line): fixed indentation.
7414 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7416 * symtab.c (find_pc_sect_line): now uses binary search.
7418 2018-03-19 Tom Tromey <tom@tromey.com>
7420 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7423 2018-03-19 Pedro Alves <palves@redhat.com>
7424 Tom Tromey <tom@tromey.com>
7426 * unittests/observable-selftests.c: New file.
7427 * common/observable.h: New file.
7428 * observable.h: New file.
7429 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7430 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7431 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7432 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7433 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7434 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7435 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7436 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7437 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7438 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7439 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7440 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7441 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7442 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7443 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7444 tui/tui-interp.c, valops.c: Update all users.
7445 * tui/tui-hooks.c (tui_bp_created_observer)
7446 (tui_bp_deleted_observer, tui_bp_modified_observer)
7447 (tui_inferior_exit_observer, tui_before_prompt_observer)
7448 (tui_normal_stop_observer, tui_register_changed_observer):
7450 (tui_observers_token): New global.
7451 (attach_or_detach, tui_attach_detach_observers): New functions.
7452 (tui_install_hooks, tui_remove_hooks): Use
7453 tui_attach_detach_observers.
7454 * record-btrace.c (record_btrace_thread_observer): Remove.
7455 (record_btrace_thread_observer_token): New global.
7456 * observer.sh: Remove.
7457 * observer.c: Rename to observable.c.
7458 * observable.c (namespace gdb_observers): Define new objects.
7459 (observer_debug): Move into gdb_observers namespace.
7460 (struct observer, struct observer_list, xalloc_observer_list_node)
7461 (xfree_observer_list_node, generic_observer_attach)
7462 (generic_observer_detach, generic_observer_notify): Remove.
7463 (_initialize_observer): Update.
7464 Don't include observer.inc.
7465 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7466 (clean mostlyclean): Likewise.
7467 (observer.h, observer.inc): Remove targets.
7468 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7469 (COMMON_SFILES): Use observable.c, not observer.c.
7470 * .gitignore: Remove observer.h.
7472 2018-03-18 Tom Tromey <tom@tromey.com>
7474 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7476 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7478 2018-03-17 Tom Tromey <tom@tromey.com>
7480 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7482 2018-03-17 Tom Tromey <tom@tromey.com>
7484 * target.c (class scoped_target_fd): New.
7485 (target_fileio_close_cleanup): Remove.
7486 (target_fileio_read_alloc_1): Use scoped_target_fd.
7488 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7490 * silent-rules.mk: New.
7491 * Makefile.in: Include silent-rules.mk
7492 (srcdir, VPATH, top_srcdir): Move up.
7493 (COMPILE): Add ECHO_CXX.
7494 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7495 (init.c): Add ECHO_INIT_C.
7496 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7497 (version.c): Add ECHO_GEN.
7498 (printcmd.o): Add ECHO_CXX.
7499 (target-float.o): Add ECHO_CXX.
7500 (ada-exp.o): Add ECHO_CXX.
7501 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7502 (insight$(EXEEXT)): Add ECHO_CXXLD.
7503 * gnulib/configure.ac: Add AM_SILENT_RULES.
7504 * gnulib/aclocal.m4: Re-generate.
7505 * gnulib/configure: Re-generate.
7506 * gnulib/import/Makefile.in: Re-generate.
7508 2018-03-16 Tom Tromey <tom@tromey.com>
7510 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7511 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7512 * utils.c (do_free_section_addr_info)
7513 (make_cleanup_free_section_addr_info): Remove.
7514 * symfile.h (struct other_sections): Add constructor.
7515 (struct section_addr_info): Remove.
7516 (section_addr_info): New typedef.
7517 (struct sym_fns) <sym_offsets>: Change type of parameter.
7518 (build_section_addr_info_from_objfile)
7519 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7520 (default_symfile_offsets, symbol_file_add)
7521 (symbol_file_add_from_bfd)
7522 (build_section_addr_info_from_section_table): Update.
7523 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7524 * symfile.c (alloc_section_addr_info): Remove.
7525 (build_section_addr_info_from_section_table): Change return type.
7527 (build_section_addr_info_from_bfd)
7528 (build_section_addr_info_from_objfile): Likewise.
7529 (free_section_addr_info): Remove.
7530 (relative_addr_info_to_section_offsets): Change type of "addrs".
7531 (addrs_section_compar): Now a std::sort comparator.
7532 (addrs_section_sort): Change return type.
7533 (addr_info_make_relative): Change type of "addrs". Update.
7534 (default_symfile_offsets, syms_from_objfile_1)
7535 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7536 (symbol_file_add_separate): Update.
7537 (symbol_file_add): Change type of "addrs". Update.
7538 (add_symbol_file_command): Update. Remove cleanups.
7539 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7541 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7542 * solib.c (solib_read_symbols): Update.
7543 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7544 * machoread.c (macho_symfile_offsets): Update.
7545 * jit.c (jit_bfd_try_read_symtab): Update.
7547 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7549 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7550 unittests/utils-selftests.c.
7551 * unittests/utils-selftests.c: New file.
7553 2018-03-14 Tom Tromey <tom@tromey.com>
7556 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7559 2018-03-14 Tom Tromey <tom@tromey.com>
7562 * printcmd.c (printf_pointer): Allow "-" in format.
7564 2018-03-14 Tom Tromey <tom@tromey.com>
7566 * printcmd.c (_initialize_printcmd): Add usage to printf.
7568 2018-03-14 Yao Qi <qiyao@sourceware.org>
7570 * MAINTAINERS: Update my email address.
7572 2018-03-13 Tom Tromey <tom@tromey.com>
7574 * machoread.c (macho_check_dsym): Change filenamep to a
7576 (macho_symfile_read): Update.
7577 * symfile.c (load_command): Use std::string.
7579 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7581 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7582 to error message string.
7583 (riscv_register_name): Use xsnprintf instead of sprintf.
7584 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7586 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7588 (riscv_push_dummy_call): Likewise.
7590 2018-03-12 Tom Tromey <tom@tromey.com>
7592 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7593 Use gdb::byte_vector.
7594 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7596 2018-03-12 Yao Qi <yao.qi@linaro.org>
7598 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7599 parameter type to readable_regcache.
7600 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7603 2018-03-11 Tom Tromey <tom@tromey.com>
7605 * dwarf2read.c (struct nextfield): Add initializers.
7606 (struct nextfnfield): Remove.
7607 (struct fnfieldlist): Add initializers. Remove "length" and
7608 "head", use std::vector.
7609 (struct decl_field_list): Remove.
7610 (struct field_info): Add initializers.
7611 <fields, baseclasses>: Now std::vector.
7612 <nbaseclasses, nfnfields, typedef_field_list_count,
7613 nested_types_list_count>: Remove.
7614 (dwarf2_add_field, dwarf2_add_type_defn)
7615 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7616 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7617 (process_structure_scope): Update.
7619 2018-03-11 Tom Tromey <tom@tromey.com>
7621 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7622 for use by std::sort.
7623 (build_type_psymtabs_1): Use std::vector.
7625 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7627 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7628 and LIBMPFR in the printed configuration.
7630 2018-03-08 Tom Tromey <tom@tromey.com>
7632 * source.c (get_filename_and_charpos): Use scoped_fd.
7633 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7634 (procfs_pidlist): Likewise.
7635 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7636 (iterate_over_mappings): Likewise.
7638 2018-03-08 Tom Tromey <tom@tromey.com>
7640 * infcall.c (struct call_return_meta_info)
7641 <stack_temporaries_enabled>: Remove.
7642 (get_call_return_value, call_function_by_hand_dummy): Update.
7643 * thread.c (disable_thread_stack_temporaries): Remove.
7644 (enable_thread_stack_temporaries): Remove.
7645 (thread_stack_temporaries_enabled_p): Return bool.
7646 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7647 (get_last_thread_stack_temporary): Update.
7648 * eval.c (evaluate_subexp): Update.
7649 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7650 class, not a function.
7651 (value_ptr, value_vec): Remove typedefs.
7652 (class thread_info) <stack_temporaries_enabled>: Now bool.
7653 <stack_temporaries>: Now a std::vector.
7654 (thread_stack_temporaries_enabled_p)
7655 (value_in_thread_stack_temporaries): Return bool.
7657 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7659 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7660 (getpkt_or_notif_sane_1): Likewise.
7662 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7664 * build-id.c (build_id_to_debug_bfd): Use std::string.
7666 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7668 * build-id.c (find_separate_debug_file_by_buildid): Return
7670 * build-id.h (find_separate_debug_file_by_buildid): Return
7672 * coffread.c (coff_symfile_read): Adjust to std::string.
7673 * elfread.c (elf_symfile_read): Adjust to std::string.
7674 * symfile.c (separate_debug_file_exists): Change parameter to
7676 (find_separate_debug_file): Return std::string.
7677 (find_separate_debug_file_by_debuglink): Return std::string.
7678 * symfile.h (find_separate_debug_file_by_debuglink): Return
7681 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7683 * common/xml-utils.c (xml_escape_text): Move code to...
7684 (xml_escape_text_append): ... this new function.
7685 * common/xml-utils.h (xml_escape_text_append): New declaration.
7686 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7688 (_initialize_xml_utils): register test_xml_escape_text_append as
7691 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7693 * defs.h: Remove MAX_REGISTER_SIZE.
7694 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7696 * python/py-unwind.c (pyuw_sniffer): Likewise.
7698 2018-03-07 Tom Tromey <tom@tromey.com>
7700 * linux-tdep.c (linux_info_proc): Update.
7701 * target.h (struct target_ops) <to_fileio_readlink>: Return
7703 (target_fileio_readlink): Return optional<string>.
7704 * remote.c (remote_hostio_readlink): Return optional<string>.
7705 * inf-child.c (inf_child_fileio_readlink): Return
7707 * target.c (target_fileio_readlink): Return optional<string>.
7709 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7711 * regcache.c (cooked_read_test): Add riscv to the list of
7712 architectures that have a save_reggroup.
7714 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7716 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7717 value is not a dynamic class object.
7719 2018-03-06 Tom Tromey <tom@tromey.com>
7721 * rust-exp.y: Formatting fixes.
7723 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7725 * riscv-tdep.c (riscv_register_name): Remove target description
7727 (riscv_gdbarch_init): Remove target description check.
7729 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7731 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7733 * riscv-tdep.h: Likewise.
7735 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7737 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7738 (riscv_pseudo_register_write): Delete.
7739 (riscv_gdbarch_init): Remove all use of pseudo registers.
7741 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7743 * record-btrace.c (btrace_print_lines): Replace cleanup
7744 parameter with RAII equivalents.
7745 (btrace_insn_history): Replace cleanup with RAII equivalents.
7746 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7747 make_cleanup_ui_out_tuple_begin_end): Remove.
7748 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7749 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7750 make_cleanup_ui_out_list_begin_end): Remove.
7752 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7754 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7755 parameter types to std::vector. Use bool.
7756 (record_btrace_wait): Replace VEC(tp_t) with
7757 std::vector<thread_info *>.
7758 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7760 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7762 * record-btrace.c (record_btrace_disable_callback): Remove.
7763 (struct scoped_btrace_disable): New.
7764 (record_btrace_open): Use scoped_btrace_disable.
7766 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7768 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7769 reading values from registers.
7771 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7773 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7776 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7778 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7779 change parameter type. Use GDB's print functions, and use
7780 core_addr_to_string where appropriate.
7781 (riscv_push_dummy_call): Use core_addr_to_string where
7782 appropriate, update call to riscv_print_arg_location, and reindent
7784 (riscv_return_value): Update call to riscv_print_arg_location.
7786 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7787 Tim Newsome <tim@sifive.com>
7788 Albert Ou <a0u@eecs.berkeley.edu>
7789 Darius Rad <darius@bluespec.com>
7791 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7792 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7793 (ALLDEPFILES): Add riscv-tdep.c
7794 * configure.tgt: Add riscv support.
7795 * riscv-tdep.c: New file.
7796 * riscv-tdep.h: New file.
7797 * NEWS: Mention new target.
7798 * MAINTAINERS: Add entry for riscv.
7800 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7802 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7803 fields within aggregates.
7805 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7807 * record-btrace.c (btrace_print_lines): Change type of flags to
7808 gdb_disassembly_flags.
7810 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7812 * fbsd-nat.c: Include "inf-ptrace.h".
7813 (USE_SIGTRAP_SIGINFO): Conditionally define.
7814 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7815 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7816 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7818 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7820 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7822 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7823 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7824 "supports_stopped_by_hw_breakpoint" target methods.
7826 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7828 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7829 * fbsd-nat.c (debug_fbsd_nat): New variable.
7830 (show_fbsd_nat_debug): New function.
7831 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7832 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7834 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7836 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7837 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7839 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7840 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7843 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7845 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7846 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7848 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7850 * charset.c (struct charset_vector): New.
7851 (charsets): Change type to charset_vector.
7852 (find_charset_names): Adjust.
7854 (_initialize_charset): Adjust.
7856 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7858 * progspace.h (struct program_space) <deleted_solibs>: Change
7859 type to std::vector<std::string>.
7860 * progspace.c (clear_program_space_solib_cache): Adjust.
7861 * breakpoint.c (print_solib_event): Adjust.
7862 (check_status_catch_solib): Adjust.
7863 * solib.c (update_solib_list): Adjust.
7864 * ui-out.h (class ui_out) <field_string>: New overload.
7865 * ui-out.c (ui_out::field_string): New overload.
7867 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7869 * progspace.h (struct program_space): Add constructor and
7870 destructor, initialize fields.
7871 (add_program_space): Remove.
7872 * progspace.c (add_program_space): Rename to...
7873 (program_space::program_space): ... this.
7874 (release_program_space): Rename to...
7875 (program_space::~program_space): ... this.
7876 (delete_program_space): Use delete to delete program_space.
7877 (initialize_progspace): Use new to allocate program_space.
7878 * inferior.c (add_inferior_with_spaces): Likewise.
7879 (clone_inferior_command): Likewise.
7880 * infrun.c (follow_fork_inferior): Likewise.
7881 (handle_vfork_child_exec_or_exit): Likewise.
7883 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7885 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7886 (delim_string_to_char_ptr_vec): Return std::vector of
7887 gdb::unique_xmalloc_ptr.
7888 (dirnames_to_char_ptr_vec_append): Take std::vector of
7889 gdb::unique_xmalloc_ptr.
7890 (dirnames_to_char_ptr_vec): Return std::vector of
7891 gdb::unique_xmalloc_ptr.
7892 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7893 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7894 (delim_string_to_char_ptr_vec): Return an std::vector of
7895 gdb::unique_xmalloc_ptr, adjust the code.
7896 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7897 gdb::unique_xmalloc_ptr, adjust the code.
7898 (dirnames_to_char_ptr_vec): Return an std::vector of
7899 gdb::unique_xmalloc_ptr, adjust the code.
7900 * auto-load.c (auto_load_safe_path_vec): Change type to
7901 std::vector of gdb::unique_xmalloc_ptr.
7902 (auto_load_expand_dir_vars): Return an std::vector of
7903 gdb::unique_xmalloc_ptr, adjust the code.
7904 (auto_load_safe_path_vec_update): Adjust.
7905 (filename_is_in_auto_load_safe_path_vec): Adjust.
7906 (auto_load_objfile_script_1): Adjust.
7907 * build-id.c (build_id_to_debug_bfd): Adjust.
7908 * linux-thread-db.c (thread_db_load_search): Adjust.
7909 * source.c (add_path): Adjust.
7911 * symfile.c (find_separate_debug_file): Adjust.
7912 * utils.c (do_free_char_ptr_vec): Remove.
7913 (make_cleanup_free_char_ptr_vec): Remove.
7915 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7918 * common/pathstuff.c: Conditionally include "<windows.h>".
7920 2018-03-01 Georg Sauthoff <mail@georg.so>
7923 * gcore.in: Quote variables and switch interpreter to bash.
7925 2018-03-01 Tom Tromey <tom@tromey.com>
7927 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7928 assertion. Add assertion for discriminant_index.
7929 (quirk_rust_enum): Use correct base type name in univariant case.
7931 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7933 * record.c (get_call_history_modifiers): Return a
7935 (cmd_record_call_history): Adjust.
7936 * record-btrace.c (record_btrace_call_history): Adjust.
7937 (record_btrace_call_history_range): Adjust.
7938 (record_btrace_call_history_from): Adjust.
7939 * target-debug.h (target_debug_print_record_print_flags): New.
7940 * target-delegates.c: Re-generate.
7941 * target.c (target_call_history): Change flags type.
7942 (target_call_history_from): Likewise.
7943 (target_call_history_range): Likewise.
7944 * target.h (struct target_ops) <target_call_history>: Likewise.
7945 (target_call_history_from): Likewise.
7946 (target_call_history_range): Likewise.
7948 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7949 Simon Marchi <simon.marchi@polymtl.ca>
7951 * common/common-utils.c: Include "sys/stat.h".
7952 (is_regular_file): Move here from "source.c"; change return
7954 * common/common-utils.h (is_regular_file): New prototype.
7955 * common/pathstuff.c (contains_dir_separator): New function.
7956 * common/pathstuff.h (contains_dir_separator): New prototype.
7957 * source.c: Don't include "sys/stat.h".
7958 (is_regular_file): Move to "common/common-utils.c".
7960 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7962 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7963 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7964 * auto-load.c: Include "common/pathstuff.h".
7965 * common/common-def.h (current_directory): Move here.
7966 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7968 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7970 * common/pathstuff.c: New file.
7971 * common/pathstuff.h: New file.
7972 * compile/compile.c: Include "common/pathstuff.h".
7973 * defs.h (current_directory): Move to "common/common-defs.h".
7974 * dwarf2read.c: Include "common/pathstuff.h".
7976 * guile/scm-safe-call.c: Likewise.
7977 * linux-thread-db.c: Likewise.
7979 * nto-tdep.c: Likewise.
7980 * objfiles.c: Likewise.
7981 * source.c: Likewise.
7982 * symtab.c: Likewise.
7983 * utils.c: Include "common/pathstuff.h".
7984 (gdb_realpath): Move to "common/pathstuff.c".
7985 (gdb_realpath_keepfile): Likewise.
7986 (gdb_abspath): Likewise.
7987 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7988 (gdb_realpath_keepfile): Likewise.
7989 (gdb_abspath): Likewise.
7991 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7993 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7994 wildcard process pid for super_resume for kernels with a
7997 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7999 * compile/compile.c (get_args): Add additional comments
8000 explaining function.
8002 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8003 Tom Tromey <tom@tromey.com>
8005 * target.h (memory_write_request_s): Remove typedef. Don't define
8007 (target_write_memory_blocks): Change argument to std::vector.
8008 (struct memory_write_request): Add constructor.
8009 * target-memory.c (compare_block_starting_address): Return bool.
8010 Change argument types.
8011 (claim_memory): Change arguments to use std::vector.
8012 (split_regular_and_flash_blocks, blocks_to_erase)
8013 (compute_garbled_blocks): Likewise.
8014 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8015 (target_write_memory_blocks): Change argument to std::vector.
8016 * symfile.c (struct load_section_data): Add constructor and
8017 destructor. Use std::vector for "requests".
8018 (struct load_progress_data): Add initializers.
8019 (load_section_callback): Update. Use "new".
8020 (clear_memory_write_data): Remove.
8021 (generic_load): Update.
8023 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8025 * arch/aarch64.h: Use common/tdesc.h.
8027 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8029 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8030 architecture with a 64-bit ABI.
8032 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8034 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8035 ahead of target description loading.
8037 2018-02-26 Tom Tromey <tom@tromey.com>
8039 * stack.c (backtrace_command_1): Update.
8040 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8042 * python/py-framefilter.c (py_print_frame)
8043 (gdbpy_apply_frame_filter): Change type of "flags".
8044 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8046 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8047 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8048 * extension.h (enum frame_filter_flag): Rename from
8050 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8051 (apply_ext_lang_frame_filter): Change type of "flags".
8052 * extension.c (apply_ext_lang_frame_filter): Change type of
8054 * extension-priv.h (struct extension_language_ops)
8055 <apply_frame_filter>: Change type of "flags".
8057 2018-02-26 Tom Tromey <tom@tromey.com>
8060 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8061 off-by-one in py_end computation.
8062 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8064 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8067 2018-02-26 Tom Tromey <tom@tromey.com>
8069 * dwarf2read.c (struct variant_field): New.
8070 (struct nextfield) <variant>: New field.
8071 (dwarf2_add_field): Handle DW_TAG_variant_part.
8072 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8073 discriminated union.
8074 (read_structure_type): Handle DW_TAG_variant_part.
8075 (handle_struct_member_die): New function, extracted from
8076 process_structure_scope. Handle DW_TAG_variant.
8077 (process_structure_scope): Handle discriminated unions. Call
8078 handle_struct_member_die.
8080 2018-02-26 Tom Tromey <tom@tromey.com>
8082 * rust-lang.h (rust_last_path_segment): Declare.
8083 * rust-lang.c (rust_last_path_segment): Now public. Change
8085 (struct disr_info): Remove.
8086 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8087 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8088 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8089 (rust_enum_p, rust_enum_variant): New function.
8090 (rust_underscore_fields): Remove "offset" parameter.
8091 (rust_print_enum): New function.
8092 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8093 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8094 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8096 (rust_internal_print_type): New function, from rust_print_type.
8098 (rust_print_type): Call rust_internal_print_type.
8099 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8100 Update enum handling.
8101 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8102 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8103 (rust_union_quirks): New functions.
8104 (process_full_comp_unit, process_full_type_unit): Call
8106 (process_structure_scope): Update rust_unions if necessary.
8108 2018-02-26 Tom Tromey <tom@tromey.com>
8110 * value.h (value_union_variant): Declare.
8111 * valops.c (value_union_variant): New function.
8112 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8113 (struct discriminant_info): New.
8114 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8116 (struct main_type) <flag_discriminated_union>: New field.
8118 2018-02-26 Tom Tromey <tom@tromey.com>
8120 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8121 unittests/unpack-selftests.c.
8122 * unittests/unpack-selftests.c: New file.
8123 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8125 2018-02-26 Yao Qi <yao.qi@linaro.org>
8127 * dwarf2read.c (struct partial_die_info) <read>: New method.
8128 (read_partial_die): Remove the declaration.
8129 (load_partial_dies): Update.
8130 (partial_die_info::partial_die_info):
8131 (read_partial_die): Change it to partial_die_info::read.
8133 2018-02-26 Yao Qi <yao.qi@linaro.org>
8135 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8136 (fixup_partial_die): Remove declaration.
8137 (scan_partial_symbols): Update.
8138 (partial_die_parent_scope): Likewise.
8139 (partial_die_full_name): Likewise.
8140 (fixup_partial_die): Change it to partial_die_info::fixup.
8142 2018-02-26 Yao Qi <yao.qi@linaro.org>
8144 * dwarf2read.c (read_partial_die): Update the declaration.
8145 (load_partial_dies): Caller update.
8146 (read_partial_die): Remove one argument abbrev_len.
8148 2018-02-26 Yao Qi <yao.qi@linaro.org>
8150 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8151 assignment operator.
8152 (load_partial_dies): Use ctor and copy ctor.
8153 (read_partial_die): Update.
8154 (dwarf2_cu::find_partial_die): Use ctor.
8156 2018-02-26 Yao Qi <yao.qi@linaro.org>
8158 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8159 (find_partial_die_in_comp_unit): Change it to
8160 dwarf2_cu::find_partial_die.
8161 (find_partial_die): Update.
8163 2018-02-26 Yao Qi <yao.qi@linaro.org>
8165 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8168 2018-02-26 Yao Qi <yao.qi@linaro.org>
8170 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8172 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8174 * arch/amd64.h: Use common/tdesc.h.
8175 * arch/i386.c: Likewise.
8176 * arch/i386.h: Likewise.
8177 * arch/tic6x.c: Likewise.
8178 * arch/tdesc.h: Move file from here...
8179 * common/tdesc.h: ...to here.
8180 * features/aarch64-core.c: Regenerate.
8181 * features/aarch64-fpu.c: Regenerate.
8182 * features/i386/32bit-avx.c: Regenerate.
8183 * features/i386/32bit-avx512.c: Regenerate.
8184 * features/i386/32bit-core.c: Regenerate.
8185 * features/i386/32bit-linux.c: Regenerate.
8186 * features/i386/32bit-mpx.c: Regenerate.
8187 * features/i386/32bit-pkeys.c: Regenerate.
8188 * features/i386/32bit-sse.c: Regenerate.
8189 * features/i386/64bit-avx.c: Regenerate.
8190 * features/i386/64bit-avx512.c: Regenerate.
8191 * features/i386/64bit-core.c: Regenerate.
8192 * features/i386/64bit-linux.c: Regenerate.
8193 * features/i386/64bit-mpx.c: Regenerate.
8194 * features/i386/64bit-pkeys.c: Regenerate.
8195 * features/i386/64bit-segments.c: Regenerate.
8196 * features/i386/64bit-sse.c: Regenerate.
8197 * features/i386/x32-core.c: Regenerate.
8198 * features/tic6x-c6xp.c: Regenerate.
8199 * features/tic6x-core.c: Regenerate.
8200 * features/tic6x-gp.c: Regenerate.
8201 * target-descriptions.c: Use common/tdesc.h.
8202 * target-descriptions.h: Likewise.
8204 2018-02-24 Tom Tromey <tom@tromey.com>
8206 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8207 (try_thread_db_load_from_dir, thread_db_load_search): Use
8209 (info_auto_load_libthread_db_compare): Return bool. Change
8211 (info_auto_load_libthread_db): Use std::vector, std::string.
8214 2018-02-24 Tom Tromey <tom@tromey.com>
8216 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8218 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8220 * gdbarch.c: Rebuild.
8221 * gdbarch.h: Rebuild.
8222 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8223 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8224 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8227 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8229 * gdbtypes.h (sect_offset): Change type to uint64_t.
8230 (sect_offset_str): New function.
8231 * dwarf2read.c (create_addrmap_from_aranges): Use
8233 (error_check_comp_unit_head): Likewise.
8234 (create_debug_type_hash_table): Likewise.
8235 (read_cutu_die_from_dwo): Likewise.
8236 (init_cutu_and_read_dies): Likewise.
8237 (init_cutu_and_read_dies_no_follow): Likewise.
8238 (process_psymtab_comp_unit_reader): Likewise.
8239 (partial_die_parent_scope): Likewise.
8240 (peek_die_abbrev): Likewise.
8241 (process_queue): Likewise.
8242 (dwarf2_physname): Likewise.
8243 (read_namespace_alias): Likewise.
8244 (read_import_statement): Likewise.
8245 (create_dwo_cu_reader): Likewise.
8246 (create_cus_hash_table): Likewise.
8247 (lookup_dwo_cutu): Likewise.
8248 (inherit_abstract_dies): Likewise.
8249 (read_func_scope): Likewise.
8250 (read_call_site_scope): Likewise.
8251 (dwarf2_add_member_fn): Likewise.
8252 (read_common_block): Likewise.
8253 (read_module_type): Likewise.
8254 (read_typedef): Likewise.
8255 (read_subrange_type): Likewise.
8256 (load_partial_dies): Likewise.
8257 (read_partial_die): Likewise.
8258 (find_partial_die): Likewise.
8259 (read_str_index): Likewise.
8260 (dwarf2_string_attr): Likewise.
8261 (build_error_marker_type): Likewise.
8262 (lookup_die_type): Likewise.
8263 (dump_die_shallow): Likewise.
8264 (follow_die_ref): Likewise.
8265 (dwarf2_fetch_die_loc_sect_off): Likewise.
8266 (dwarf2_fetch_constant_bytes): Likewise.
8267 (follow_die_sig): Likewise.
8268 (get_signatured_type): Likewise.
8269 (get_DW_AT_signature_type): Likewise.
8270 (dwarf2_find_containing_comp_unit): Likewise.
8271 (set_die_type): Likewise.
8273 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8275 * arch/aarch64.c: Include "common-defs.h".
8276 * arch/amd64.c: Likewise.
8277 * arch/i386.c: Likewise.
8279 2018-02-21 Tom Tromey <tom@tromey.com>
8281 * value.h: (extract_field_op): Update.
8282 * eval.c (extract_field_op): Return a const char *.
8283 * expression.h (parse_expression_for_completion): Update.
8284 * completer.c (complete_expression): Update.
8285 (add_struct_fields): Make fieldname const.
8286 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8287 (mark_completion_tag, parse_exp_in_context_1): Update.
8288 (parse_expression_for_completion): Change "name" to
8289 unique_xmalloc_ptr*.
8291 2018-02-21 Tom Tromey <tom@tromey.com>
8293 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8295 2018-02-21 Yao Qi <yao.qi@linaro.org>
8297 * avr-tdep.c (avr_read_pc): Change parameter type to
8299 * gdbarch.sh (read_pc): Likewise.
8300 * gdbarch.c: Re-generated.
8301 * gdbarch.h: Re-generated.
8302 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8304 * ia64-tdep.c (ia64_read_pc): Likewise.
8305 * mips-tdep.c (mips_read_pc): Likewise.
8306 * spu-tdep.c (spu_read_pc): Likewise.
8308 2018-02-21 Yao Qi <yao.qi@linaro.org>
8310 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8311 * regcache-dump.c: New file.
8312 * regcache.c: Move register_dump to regcache-dump.c.
8313 (maintenance_print_registers): Likewise.
8314 (maintenance_print_raw_registers): Likewise.
8315 (maintenance_print_cooked_registers): Likewise.
8316 (maintenance_print_register_groups): Likewise.
8317 (maintenance_print_remote_registers): Likewise.
8318 (_initialize_regcache): Likewise.
8319 * regcache.h (register_dump): Moved from regcache.c.
8321 2018-02-21 Yao Qi <yao.qi@linaro.org>
8323 * regcache.c (regcache::regcache): Update.
8324 (regcache::invalidate): Move it to detached_regcache::invalidate.
8325 (get_thread_arch_aspace_regcache): Update.
8326 (regcache::raw_update): Update.
8327 (regcache::cooked_read): Remove some code.
8328 (regcache::cooked_read_value): Likewise.
8329 (regcache::raw_write): Remove assert on m_readonly_p.
8330 (regcache::raw_supply_integer): Move it to
8331 detached_regcache::raw_supply_integer.
8332 (regcache::raw_supply_zeroed): Likewise.
8333 * regcache.h (detached_regcache) <raw_supply_integer>: New
8335 <raw_supply_zeroed, invalidate>: Likewise.
8336 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8337 <invalidate>: Likewise.
8338 <m_readonly_p>: Removed.
8340 2018-02-21 Yao Qi <yao.qi@linaro.org>
8342 * infcmd.c (get_return_value): Let stop_regs point to
8343 get_current_regcache.
8344 * regcache.c (regcache::regcache): Remove.
8345 (register_dump_reg_buffer): New class.
8346 (regcache_print): Adjust.
8347 * regcache.h (regcache): Remove constructors.
8349 2018-02-21 Yao Qi <yao.qi@linaro.org>
8351 * regcache.c (class register_dump): New class.
8352 (register_dump_regcache, register_dump_none): New class.
8353 (register_dump_remote, register_dump_groups): New class.
8354 (regcache_print): Update.
8355 * regcache.h (regcache_dump_what): Move it to regcache.c.
8356 (regcache) <dump>: Remove.
8358 2018-02-21 Yao Qi <yao.qi@linaro.org>
8360 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8362 (jit_unwind_reg_set_impl): Call raw_supply.
8363 (jit_frame_sniffer): Use reg_buffer_rw.
8364 * record-full.c (record_full_core_regbuf): Change its type.
8365 (record_full_core_open_1): Use reg_buffer_rw.
8366 (record_full_close): Likewise.
8367 (record_full_core_fetch_registers): Use regcache->raw_supply.
8368 (record_full_core_store_registers): Likewise.
8369 * regcache.c (regcache::get_register_status): Move it to
8371 (regcache_raw_set_cached_value): Remove.
8372 (regcache::raw_set_cached_value): Remove.
8373 (regcache::raw_write): Call raw_supply.
8374 (regcache::raw_supply): Move it to reg_buffer_rw.
8375 * regcache.h (regcache_raw_set_cached_value): Remove.
8376 (reg_buffer_rw): New class.
8378 2018-02-21 Yao Qi <yao.qi@linaro.org>
8380 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8381 readonly_detached_regcache.
8382 (dummy_frame_prev_register): Use regcache->cooked_read.
8383 * frame.c (frame_save_as_regcache): Change return type.
8384 (frame_pop): Update.
8385 * frame.h (frame_save_as_regcache): Update declaration.
8386 * inferior.h (get_infcall_suspend_state_regcache): Update
8388 * infrun.c (infcall_suspend_state) <registers>: use
8389 readonly_detached_regcache.
8390 (save_infcall_suspend_state): Don't use regcache_dup.
8391 (get_infcall_suspend_state_regcache): Change return type.
8392 * linux-fork.c (struct fork_info) <savedregs>: Change to
8393 readonly_detached_regcache.
8395 (fork_save_infrun_state): Don't use regcache_dup.
8396 (info_checkpoints_command): Adjust.
8397 * mi/mi-main.c (register_changed_p): Update declaration.
8398 (mi_cmd_data_list_changed_registers): Use
8399 readonly_detached_regcache.
8400 (register_changed_p): Change parameter type to
8401 readonly_detached_regcache.
8402 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8403 readonly_detached_regcache.
8404 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8405 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8407 (regcache::save): Move it to reg_buffer.
8408 (regcache::restore): Change parameter type.
8409 (regcache_dup): Remove.
8410 * regcache.h (reg_buffer) <save>: New method.
8411 (readonly_detached_regcache): New class.
8412 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8413 readonly_detached_regcache.
8414 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8416 2018-02-21 Yao Qi <yao.qi@linaro.org>
8418 * frame.c (frame_save_as_regcache): Use regcache method save.
8419 (frame_pop): Use regcache method restore.
8420 * infrun.c (restore_infcall_suspend_state): Likewise.
8421 * linux-fork.c (fork_load_infrun_state): Likewise.
8422 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8424 * regcache.c (regcache_save): Remove.
8425 (regcache::restore): More asserts.
8426 (regcache_cpy): Remove.
8427 * regcache.h (regcache_save): Remove the declaration.
8428 (regcache::restore): Move from private to public.
8429 Remove the friend declaration of regcache_cpy.
8430 (regcache_cpy): Remove declaration.
8432 2018-02-21 Yao Qi <yao.qi@linaro.org>
8434 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8435 parameter type to 'readable_regcache *'.
8436 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8437 * arm-tdep.c (arm_neon_quad_read): Likewise.
8438 (arm_pseudo_read): Likewise.
8439 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8440 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8441 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8442 * gdbarch.c: Re-generated.
8443 * gdbarch.h: Re-generated.
8444 * gdbarch.sh (pseudo_register_read): Change parameter type to
8445 'readable_regcache *'.
8446 (pseudo_register_read_value): Likewise.
8447 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8448 (h8300_pseudo_register_read): Likewise.
8449 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8450 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8451 (i386_pseudo_register_read_into_value): Likewise.
8452 (i386_pseudo_register_read_value): Likewise.
8453 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8455 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8456 * m32c-tdep.c (m32c_raw_read): Likewise.
8457 (m32c_read_flg): Likewise.
8458 (m32c_banked_register): Likewise.
8459 (m32c_banked_read): Likewise.
8460 (m32c_sb_read): Likewise.
8461 (m32c_part_read): Likewise.
8462 (m32c_cat_read): Likewise.
8463 (m32c_r3r2r1r0_read): Likewise.
8464 (m32c_pseudo_register_read): Likewise.
8465 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8466 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8467 (mep_pseudo_cr64_read): Likewise.
8468 (mep_pseudo_register_read): Likewise.
8469 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8470 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8471 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8472 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8473 (regcache::cooked_read): Likewise.
8474 (regcache::cooked_read_value): Likewise.
8475 (regcache_cooked_read_signed):
8476 (regcache::cooked_read): Likewise.
8477 * regcache.h (readable_regcache): New class.
8478 (regcache): Inherit readable_regcache. Move some methods to
8480 * rl78-tdep.c (rl78_pseudo_register_read): Change
8481 parameter type to 'readable_regcache *'.
8482 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8483 (e500_pseudo_register_read): Change parameter type to
8484 'readable_regcache *'.
8485 (dfp_pseudo_register_read): Likewise.
8486 (vsx_pseudo_register_read): Likewise.
8487 (efpr_pseudo_register_read): Likewise.
8488 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8489 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8490 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8491 (sh64_pseudo_register_read): Likewise.
8492 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8493 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8494 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8495 (spu_pseudo_register_read): Likewise.
8496 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8497 (xtensa_pseudo_register_read): Likewise.
8499 2018-02-21 Yao Qi <yao.qi@linaro.org>
8501 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8502 (regcache::arch): Move it to reg_buffer::arch.
8503 (regcache::register_buffer): Likewise.
8504 (regcache::assert_regnum): Likewise.
8505 (regcache::num_raw_registers): Likewise.
8506 * regcache.h (reg_buffer): New class.
8507 (regcache): Inherit reg_buffer.
8509 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8511 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8512 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8514 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8516 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8518 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8520 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8521 (SFILES): Remove common/*.c files.
8522 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8523 * common/common.host: Add common reference.
8524 * configure.ac: Likewise.
8525 * configure: Regenerate.
8527 2018-02-16 Yao Qi <yao.qi@linaro.org>
8529 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8530 (block_initialize_namespace): Use new.
8531 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8532 (dwarf2_free_objfile): Use delete.
8533 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8534 (copy_type_recursive): Use new.
8535 * gdb_obstack.h (allocate_on_obstack): New.
8537 2018-02-15 Yao Qi <yao.qi@linaro.org>
8540 * inferior.c (exit_inferior_1): Reset inf->control.
8542 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8544 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8547 2018-02-14 Pedro Alves <palves@redhat.com>
8549 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8550 frame_cleanup_after_sniffer on exception.
8552 2018-02-14 Tom Tromey <tom@tromey.com>
8554 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8556 (solib_bfd_open): Make pathname const.
8557 * solib.c (solib_bfd_open): Make pathname const.
8558 * solib-spu.c (spu_bfd_fopen): Make name const.
8559 (spu_bfd_open): Make pathname const.
8560 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8561 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8563 2018-02-14 Tom Tromey <tom@tromey.com>
8565 * symfile.c (symfile_bfd_open): Update.
8566 * source.h (openp, source_full_path_of, find_and_open_source):
8567 Change argument type to unique_xmalloc_ptr.
8568 * source.c (openp): Take a unique_xmalloc_ptr.
8569 (source_full_path_of, find_and_open_source): Likewise.
8570 (open_source_file, symtab_to_fullname): Update.
8571 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8573 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8574 (exec_file_find): Update.
8575 * psymtab.c (psymtab_to_fullname): Update.
8576 * nto-tdep.h (nto_find_and_open_solib): Update.
8577 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8579 * exec.c (exec_file_attach): Update.
8580 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8581 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8583 2018-02-14 Tom Tromey <tom@tromey.com>
8585 * solib.c: Include source.h.
8586 * nto-tdep.c: Include source.h.
8587 * mi/mi-cmd-env.c: Include source.h.
8588 * infcmd.c: Include source.h.
8589 * exec.c: Include source.h.
8590 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8591 (add_path, directory_switch, source_path, init_source_path): Move
8593 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8594 (add_path, directory_switch, source_path, init_source_path):
8597 2018-02-14 Tom Tromey <tom@tromey.com>
8599 * solist.h (exec_file_find, solib_find): Return
8601 (solib_bfd_fopen): Take a const char *.
8602 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8603 (exec_file_find, solib_find): Likewise.
8604 (solib_bfd_fopen): Do not take ownership of "pathname".
8605 (solib_bfd_open): Use unique_xmalloc_ptr.
8606 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8607 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8608 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8609 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8611 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8613 * ada-lang.c (name_match_type_from_name): Remove reference to
8614 ada_name_for_lookup in function's documentation.
8615 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8617 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8619 * defs.h (enum openp_flags): New enum.
8620 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8621 Move to enum openp_flags.
8622 (openp_flags): New enum flags.
8623 (openp): Change parameter type to openp_flags.
8624 * source.c (openp): Change parameter type to openp_flags.
8625 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8626 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8628 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8630 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8633 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8635 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8637 (class dwarf2_queue_guard): ...the destructor of this new class.
8638 (dw2_do_instantiate_symtab): Create instance of the new class
8639 dwarf2_queue_guard, remove cleanup.
8641 2018-02-09 Tom Tromey <tom@tromey.com>
8643 * source.c (find_source_lines): Don't reference past the end of
8646 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8648 * remote.c (remote_btrace_maybe_reopen): Change error message.
8649 * btrace.c (btrace_enable): Likewise.
8650 (parse_xml_btrace): Likewise.
8651 (parse_xml_btrace_conf): Likewise.
8653 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8655 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8656 (linux_enable_pt, linux_enable_bts): Call
8657 diagnose_perf_event_open_fail.
8659 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8661 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8662 Remove parameter and change return type. Update callers. Move it.
8663 (linux_enable_bts, linux_enable_pt): Improve error message.
8664 (linux_enable_pt): Remove zero buffer size check.
8665 (linux_enable_btrace): Improve error messages. Remove NULL return
8668 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8670 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8671 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8672 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8673 (linux_supports_pt, linux_supports_btrace): Remove.
8674 (linux_enable_bts): Call cpu_supports_bts.
8675 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8676 * remote.c (remote_supports_btrace): Remove.
8677 (init_remote_ops): Remove remote_supports_btrace.
8678 * target-delegates.c: Regenerated.
8679 * target.c (target_supports_btrace): Remove.
8680 * target.h (target_ops) <to_supports_btrace>: Remove
8681 (target_supports_btrace): Remove.
8682 * x86-linux-nat.c (x86_linux_create_target): Remove
8683 linux_supports_btrace.
8685 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8687 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8689 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8690 exception and use message in own exception.
8692 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8694 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8695 (perf_event_pt_event_type): Use gdb_file_up.
8696 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8697 scoped_fd, and scoped_mmap.
8699 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8701 * common/scoped_mmap.h: New.
8702 * unittests/scoped_mmap-selftest.c: New.
8703 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8704 unittests/scoped_mmap-selftest.c.
8706 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8708 * common/scoped_fd.h: New.
8709 * unittests/scoped_fd-selftest.c: New.
8710 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8711 unittests/scoped_fd-selftest.c.
8713 2018-02-09 Tom Tromey <tom@tromey.com>
8715 * auto-load.c (auto_load_section_scripts): Use
8716 gdb::unique_xmalloc_ptr.
8718 2018-02-09 Tom Tromey <tom@tromey.com>
8720 * auto-load.c (execute_script_contents): Use std::string.
8722 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8724 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8725 Python function, rather than a new command.
8727 2018-02-08 Tom Tromey <tom@tromey.com>
8729 * solib.c (solib_find_1): Use std::string.
8730 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8732 2018-02-08 Tom Tromey <tom@tromey.com>
8734 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8736 2018-02-08 Tom Tromey <tom@tromey.com>
8738 * source.c (find_source_lines): Use gdb::def_vector.
8740 2018-02-08 Tom Tromey <tom@tromey.com>
8742 * macrocmd.c (struct temporary_macro_definition): New.
8743 (macro_define_command): Use temporary_macro_definition. Remove
8745 (free_macro_definition_ptr): Remove.
8747 2018-02-08 Tom Tromey <tom@tromey.com>
8749 * macroexp.c (maybe_expand): Use std::string.
8751 2018-02-08 Tom Tromey <tom@tromey.com>
8753 * macroexp.c (struct macro_buffer): Add initializers for some
8755 (init_buffer, init_shared_buffer, free_buffer)
8756 (free_buffer_return_text): Remove.
8757 (macro_buffer): New constructors.
8758 (~macro_buffer): New destructor.
8759 (macro_buffer::set_shared): New method.
8760 (macro_buffer::resize_buffer, macro_buffer::appendc)
8761 (macro_buffer::appendmem): Now methods, not free functions.
8762 (set_token, append_tokens_without_splicing, stringify)
8763 (macro_stringify): Update.
8764 (gather_arguments): Change return type. Remove argc_p argument,
8765 add args_ptr argument. Use std::vector.
8766 (substitute_args): Remove argc argument. Accept std::vector.
8767 (expand): Update. Use std::vector.
8768 (scan, macro_expand, macro_expand_next): Update.
8770 2018-02-08 Tom Tromey <tom@tromey.com>
8772 * symtab.c (default_collect_symbol_completion_matches_break_on):
8773 Use unique_xmalloc_ptr.
8774 * macroscope.h: (sal_macro_scope, user_macro_scope)
8775 (default_macro_scope): Return unique_xmalloc_ptr.
8776 * macroscope.c (sal_macro_scope, user_macro_scope)
8777 (default_macro_scope): Return unique_xmalloc_ptr.
8778 * macroexp.h (macro_expand, macro_expand_once): Return
8780 * macroexp.c (macro_expand, macro_expand_once): Return
8782 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8783 (info_macro_command, info_macros_command): Use
8785 * compile/compile-c-support.c (write_macro_definitions): Use
8787 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8789 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8791 * value.c (value_static_field): Assign field type instead of
8792 containing type when returning an optimized out value.
8794 2018-02-06 Yao Qi <yao.qi@linaro.org>
8796 * ft32-tdep.c (ft32_read_pc): Remove.
8797 (ft32_write_pc): Remove.
8798 (ft32_gdbarch_init): Update.
8799 * m32r-tdep.c (m32r_read_pc): Remove.
8800 (m32r_gdbarch_init): Update.
8801 * mep-tdep.c (mep_read_pc): Remove.
8802 (mep_gdbarch_init): Update.
8803 * microblaze-tdep.c (microblaze_write_pc): Remove.
8804 (microblaze_gdbarch_init): Update.
8805 * mn10300-tdep.c (mn10300_read_pc): Remove.
8806 (mn10300_write_pc): Remove.
8807 (mn10300_gdbarch_init): Update.
8808 * moxie-tdep.c (moxie_read_pc): Remove.
8809 (moxie_write_pc): Remove.
8810 (moxie_gdbarch_init): Update.
8812 2018-02-06 Yao Qi <yao.qi@linaro.org>
8814 * expprint.c (print_subexp_standard): Handle
8815 OP_F77_UNDETERMINED_ARGLIST.
8816 (dump_subexp_body_standard): Likewise.
8818 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8820 * target-descriptions.c (tdesc_element_visitor) Add empty
8822 (tdesc_type): Move make_gdb_type from here.
8823 (tdesc_type_builtin): Likewise.
8824 (tdesc_type_vector): Likewise.
8825 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8826 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8827 (make_gdb_type_union): Likewise.
8828 (make_gdb_type_flags): Likewise.
8829 (make_gdb_type_enum): Likewise.
8830 (make_gdb_type): New function.
8831 (tdesc_register_type): Use static make_gdb_type.
8833 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8835 * infcmd.c (default_print_one_register_info): Align natural-format
8836 column values consistently one under another.
8837 (pad_to_column): New function.
8839 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8841 * dwarf2read.c (dwarf2_physname): Move commment.
8843 2018-02-01 Leszek Swirski <leszeks@google.com>
8845 * varobj.c (varobj_formatted_print_options): Allow recursive
8846 pretty printing if pretty printing is enabled.
8848 2018-02-01 Leszek Swirski <leszeks@google.com>
8850 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8851 names after a structop as a filename.
8853 2018-02-01 Yao Qi <yao.qi@linaro.org>
8855 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8856 (arm_record_coproc_data_proc): Likewise.
8858 2018-02-01 Yao Qi <yao.qi@linaro.org>
8860 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8862 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8864 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8865 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8867 2018-01-31 Pedro Alves <palves@redhat.com>
8869 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8870 * inflow.c (child_terminal_save_inferior): Wrap reference to
8871 tcgetpgrp in HAVE_TERMIOS_H.
8872 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8874 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8875 always iterate over all inferiors.
8876 (gdbsim_cntrl_c): Adjust.
8877 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8879 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8881 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8882 index type is objfile-owned if the element type is as well.
8884 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8888 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8890 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8891 "features/s390x-linux64.c".
8892 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8893 s390_linux32 and s390x_linux64.
8894 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8896 * s390-tdep.c: Include "features/s390-linux32.c" and
8897 "features/s390x-linux64.c".
8898 (s390_tdesc_valid): Add check for tdesc_has_registers.
8899 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8900 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8901 tdesc_s390x_linux64.
8902 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8903 tdesc_s390x_linux64 to...
8904 * s390-tdep.h: ...here.
8906 2018-01-30 Pedro Alves <palves@redhat.com>
8909 * config.in, configure: Regenerate.
8910 * configure.ac: Check for getpgid.
8911 * go32-nat.c (go32_pass_ctrlc): New.
8912 (go32_target): Install it.
8913 * inf-child.c (inf_child_target): Install
8914 child_terminal_save_inferior, child_pass_ctrlc and
8916 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8917 (inf_ptrace_target): No longer install it.
8918 * infcmd.c (interrupt_target_1): Adjust.
8919 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8920 (child_interrupt): Declare.
8921 (inferior::terminal_state): New.
8922 * inflow.c (struct terminal_info): Update comments.
8923 (inferior_process_group): Delete.
8924 (terminal_is_ours): Delete.
8925 (gdb_tty_state): New.
8926 (child_terminal_init): Adjust.
8927 (is_gdb_terminal, sharing_input_terminal_1)
8928 (sharing_input_terminal): New functions.
8929 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8930 Set the process's actual process group in the foreground if
8931 possible. Handle is_ours_for_output/is_ours distinction. Don't
8932 mark terminal as the inferior's if not sharing GDB's terminal.
8933 Don't check attach_flag.
8934 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8935 pass down a target_terminal_state.
8936 (child_terminal_save_inferior): New, factored out from ...
8937 (child_terminal_ours_1): ... this. Handle
8938 target_terminal_state::is_ours_for_output.
8939 (child_interrupt, child_pass_ctrlc): New.
8940 (inflow_inferior_exit): Clear the inferior's terminal_state.
8941 (copy_terminal_info): Copy the inferior's terminal state.
8942 (_initialize_inflow): Remove reference to terminal_is_ours.
8943 * inflow.h (inferior_process_group): Delete.
8944 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8945 * procfs.c (procfs_target): Don't install procfs_interrupt.
8946 (procfs_interrupt): Delete.
8947 * remote.c (remote_serial_quit_handler): Adjust.
8948 (remote_interrupt): Remove ptid parameter. Adjust.
8949 * target-delegates.c: Regenerate.
8950 * target.c: Include "terminal.h".
8951 (target_terminal::terminal_state): Rename to ...
8952 (target_terminal::m_terminal_state): ... this.
8953 (target_terminal::init): Adjust.
8954 (target_terminal::inferior): Adjust to per-inferior
8956 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8957 (target_terminal::ours, target_terminal::ours_for_output): Use
8958 target_terminal_is_ours_kind.
8959 (target_interrupt): Remove ptid parameter. Adjust.
8960 (default_target_pass_ctrlc): Adjust.
8961 * target.h (target_ops::to_terminal_save_inferior): New field.
8962 (target_ops::to_interrupt): Remove ptid_t parameter.
8963 (target_interrupt): Remove ptid_t parameter. Update comment.
8964 (target_pass_ctrlc): Update comment.
8965 * target/target.h (target_terminal_state): New scoped enum,
8967 (target_terminal::terminal_state): ... here.
8968 (target_terminal::inferior): Update comments.
8969 (target_terminal::restore_inferior): New.
8970 (target_terminal::is_inferior, target_terminal::is_ours)
8971 (target_terminal::is_ours_for_output): Adjust.
8972 (target_terminal::scoped_restore_terminal_state): Adjust to
8973 rename, and call restore_inferior() instead of inferior().
8974 (target_terminal::scoped_restore_terminal_state::m_state): Change
8976 (target_terminal::terminal_state): Rename to ...
8977 (target_terminal::m_terminal_state): ... this and change type.
8979 2018-01-30 Pedro Alves <palves@redhat.com>
8981 * linux-nat.c (wait_for_signal): New function.
8982 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8984 (async_terminal_is_ours)
8985 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8986 (linux_nat_add_target): Don't override
8987 to_terminal_inferior/to_terminal_ours.
8989 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8991 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8993 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8995 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8996 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8997 dwarf2_per_objfile_free here.
8998 (dwarf2_per_objfile_free): Remove.
8999 (_initialize_dwarf2_read): Don't register
9000 dwarf2_per_objfile_free as a registry cleanup.
9002 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9004 Avoid compilation errors in MinGW native builds
9006 The error is triggered by including python-internal.h, and the
9009 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9010 from build-gnulib/import/math.h:27,
9011 from d:/usr/Python26/include/pyport.h:235,
9012 from d:/usr/Python26/include/Python.h:58,
9013 from python/python-internal.h:94,
9014 from python/py-arch.c:24:
9015 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9019 This happens because Python headers define 'hypot' to expand t
9020 '_hypot' in the Windows builds.
9021 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9022 'hypoth'. This avoids a compilation error.
9024 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9026 * MAINTAINERS (Write After Approval): Fix ordering.
9028 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9030 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9032 2018-01-26 Alan Modra <amodra@gmail.com>
9034 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9035 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9036 Remove nop. Make const. Comment.
9037 (powerpc32_plt_stub_so_2): New.
9038 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9039 Correct count. Update uses.
9040 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9041 Move common code reading PLT entry word. Correct
9042 powerpc32_plt_stub PLT address calculation.
9043 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9044 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9045 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9046 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9047 (ppc64_standard_linkage8): Likewise.
9048 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9049 Correct insns description.
9050 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9052 2018-01-24 Pedro Alves <palves@redhat.com>
9054 GCC PR libstdc++/83906
9055 * gdbtypes.c (operator==(const dynamic_prop &,
9056 const dynamic_prop &)): New.
9057 (operator==(const range_bounds &, const range_bounds &)): New.
9058 (check_types_equal): Use them instead of memcmp.
9059 * gdbtypes.h (operator==(const dynamic_prop &,
9060 const dynamic_prop &)): Declare.
9061 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9062 (operator==(const range_bounds &, const range_bounds &)): Declare.
9063 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9065 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9067 * s390-linux-tdep.c (s390_record_address_mask)
9068 (s390_record_calc_disp_common, s390_record_calc_disp)
9069 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9070 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9071 (s390_process_record): Move to s390-tdep.c.
9072 (s390_linux_init_abi_any): Adjust.
9073 * s390-tdep.c (s390_record_address_mask)
9074 (s390_record_calc_disp_common, s390_record_calc_disp)
9075 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9076 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9077 (s390_process_record): Moved from s390-linux-tdep.c
9078 (s390_gdbarch_init): Adjust.
9080 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9082 * s390-linux-nat.c (s390-tdep.h): New include.
9083 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9084 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9085 (ALLDEPFILES): Add s390-tdep.c.
9086 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9087 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9088 * s390-tdep.h: ...this. New file.
9089 * s390-linux-tdep.c (s390-tdep.h): New include.
9090 (_initialize_s390_tdep): Rename to...
9091 (_initialize_s390_linux_tdep): ...this and adjust.
9092 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9093 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9095 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9096 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9097 (s390_is_partial_instruction, s390_software_single_step)
9098 (is_non_branch_ril, s390_displaced_step_copy_insn)
9099 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9100 (s390_prologue_data, s390_addr, s390_store, s390_load)
9101 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9102 (s390_register_call_saved, s390_guess_tracepoint_registers)
9103 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9104 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9105 (s390_pseudo_register_name, s390_pseudo_register_type)
9106 (s390_pseudo_register_read, s390_pseudo_register_write)
9107 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9108 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9109 (s390_addr_bits_remove, s390_address_class_type_flags)
9110 (s390_address_class_type_flags_to_name)
9111 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9112 (s390_function_arg_float, s390_function_arg_vector)
9113 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9114 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9115 (s390_frame_align, s390_register_return_value, s390_return_value)
9116 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9117 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9118 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9119 (s390_trad_frame_prev_register, s390_unwind_cache)
9120 (s390_prologue_frame_unwind_cache)
9121 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9122 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9123 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9124 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9125 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9126 (s390_frame_base_address, s390_local_base_address)
9127 (s390_frame_base, s390_gcc_target_options)
9128 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9129 (s390_validate_reg_range, s390_tdesc_valid)
9130 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9131 * s390-tdep.c: ...this. New file.
9133 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9135 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9136 (s390_process_record, s390_gdbarch_tdep_alloc)
9137 (s390_linux_init_abi_any): Use/set new hook.
9139 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9141 * s390-linux-tdep.c (osabi.h): New include.
9142 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9143 (s390_linux_init_abi_any): New functions.
9144 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9146 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9148 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9149 tdesc_has_registers check
9151 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9153 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9154 (s390_validate_reg_range): New macro.
9155 (s390_gdbarch_init): Adjust.
9157 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9159 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9160 (s390_gdbarch_tdep_alloc): Adjust.
9161 (s390_gdbarch_init): Adjust.
9163 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9165 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9166 <have_tdb>: Change type to bool.
9167 (s390_gdbarch_tdep_alloc): Adjust.
9168 (s390_gdbarch_init): Adjust.
9170 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9172 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9173 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9174 (s390_gdbarch_tdep_alloc): New function.
9175 (s390_gdbarch_init): Allocate tdep at start and use its fields
9176 instead of separate variables.
9178 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9180 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9181 when looking for cached gdbarch and add comment for remaining.
9183 2018-01-22 Pedro Alves <palves@redhat.com>
9184 Sergio Durigan Junior <sergiodj@redhat.com>
9186 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9189 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9191 * MAINTAINERS: Update my company e-mail address.
9193 2018-01-22 Yao Qi <yao.qi@linaro.org>
9195 * regcache.c (cooked_write_test): New function.
9196 (_initialize_regcache): Register the test.
9198 2018-01-22 Yao Qi <yao.qi@linaro.org>
9200 * ia64-tdep.c (ia64_pseudo_register_read): Call
9201 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9202 * m32c-tdep.c (m32c_cat_read): Likewise.
9203 (m32c_r3r2r1r0_read): Likewise.
9204 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9205 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9207 2018-01-22 Yao Qi <yao.qi@linaro.org>
9209 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9210 method raw_read instead of regcache_raw_read.
9211 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9212 * arm-tdep.c (arm_neon_quad_read): Likewise.
9213 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9214 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9215 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9216 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9217 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9218 (i386_pseudo_register_read_into_value): Likewise.
9219 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9220 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9221 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9222 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9223 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9224 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9225 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9226 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9227 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9229 2018-01-22 Yao Qi <yao.qi@linaro.org>
9231 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9232 * configure.tgt: Remove target mt.
9233 * mt-tdep.c: Remove.
9234 * regcache.c (cooked_read_test): Remove the check for mt.
9236 2018-01-22 Yao Qi <yao.qi@linaro.org>
9238 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9239 instead of gdbarch_pseudo_register_read_value.
9241 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9243 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9246 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9248 * linespec.c (create_sals_line_offset): Remove code that preserved
9249 the symtab_and_line's line number.
9251 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9253 * varobj.c (varobj_create): Don't set valid_block when creating a
9256 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9258 * varobj.c (varobj_create): Remove out of date comment.
9260 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9263 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9264 updating innermost block.
9265 * parse.c (innermost_block_tracker::update): Take extra type
9266 parameter, and check types match before updating innermost block.
9267 (write_dollar_variable): Update innermost block for registers.
9268 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9269 (innermost_block_tracker::innermost_block_tracker): Initialise
9271 (innermost_block_tracker::reset): Take type parameter.
9272 (innermost_block_tracker::update): Take type parameter, and pass
9273 type through as needed.
9274 (innermost_block_tracker::m_types): New member.
9275 * varobj.c (varobj_create): Pass type when reseting innermost
9278 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9280 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9281 * ada-lang.c (resolve_subexp): Likewise.
9282 * breakpoint.c (set_breakpoint_condition) Likewise.
9283 (watch_command_1) Likewise.
9284 * c-exp.y (variable): Likewise.
9285 * d-exp.y (PrimaryExpression): Likewise.
9286 * f-exp.y (variable): Likewise.
9287 * go-exp.y (variable): Likewise.
9288 * m2-exp.y (variable): Likewise.
9289 * objfiles.c (objfile::~objfile): Likewise.
9290 * p-exp.y (variable): Likewise.
9291 * parse.c (innermost_block): Change type.
9292 * parser-defs.h (class innermost_block_tracker): New.
9293 (innermost_block): Change to innermost_block_tracker.
9294 * printcmd.c (display_command): Switch to innermost_block API.
9295 (do_one_display): Likewise.
9296 * rust-exp.y (do_one_display): Likewise.
9297 * symfile.c (clear_symtab_users): Likewise.
9298 * varobj.c (varobj_create): Switch to innermost_block API, replace
9299 use of innermost_block with block stored on varobj object.
9301 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9303 * expression.h (innermost_block): Remove declaration.
9304 * varobj.c: Add 'parser-defs.h' include.
9306 2018-01-19 Tom Tromey <tom@tromey.com>
9308 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9309 symbols in the static and global blocks.
9311 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9313 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9314 gdb_ptrace.h, and move including gdb_wait.h ...
9315 * nat/linux-ptrace.h: ... to here.
9317 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9319 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9320 inf_ptrace_detach_success.
9321 (inf_ptrace_detach_success): Add inferior parameter, use it
9322 instead of inferior_ptid, pass it to detach_inferior.
9323 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9325 * inferior.c (detach_inferior): Add overload that takes an
9327 * inferior.h (detach_inferior): Likewise.
9328 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9329 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9330 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9332 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9334 * target.h (struct target_ops) <to_detach>: Add inferior
9336 (target_detach): Likewise.
9337 * target.c (dispose_inferior): Pass inferior down.
9338 (target_detach): Pass inferior down. Assert that it is equal to
9339 the current inferior.
9340 * aix-thread.c (aix_thread_detach): Pass inferior down.
9341 * corefile.c (core_file_command): Pass current_inferior() down.
9342 * corelow.c (core_detach): Add inferior parameter.
9343 * darwin-nat.c (darwin_detach): Likewise.
9344 * gnu-nat.c (gnu_detach): Likewise.
9345 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9346 * infcmd.c (detach_command): Pass current_inferior() down to
9348 * infrun.c (follow_fork_inferior): Pass parent_inf to
9350 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9352 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9353 * linux-thread-db.c (thread_db_detach): Likewise.
9354 * nto-procfs.c (procfs_detach): Likewise.
9355 * procfs.c (procfs_detach): Likewise.
9356 * record.c (record_detach): Likewise.
9357 * record.h (struct inferior): Forward-declare.
9358 (record_detach): Add inferior parameter.
9359 * remote-sim.c (gdbsim_detach): Likewise.
9360 * remote.c (remote_detach_1): Likewise.
9361 (remote_detach): Likewise.
9362 (extended_remote_detach): Likewise.
9363 * sol-thread.c (sol_thread_detach): Likewise.
9364 * target-debug.h (target_debug_print_inferior_p): New macro.
9365 * target-delegates.c: Re-generate.
9366 * top.c (kill_or_detach): Pass inferior down to target_detach.
9367 * windows-nat.c (windows_detach): Add inferior parameter.
9369 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9371 * target.h (struct target_ops) <to_detach>: Remove args
9373 (target_detach): Likewise.
9374 * target.c (dispose_inferior): Adjust.
9375 (target_detach): Remove args parameter, adjust.
9376 * aix-thread.c (aix_thread_detach): Adjust.
9377 * corefile.c (core_file_command): Adjust.
9378 * corelow.c (core_detach): Adjust.
9379 * darwin-nat.c (darwin_detach): Adjust.
9380 * gnu-nat.c (gnu_detach): Adjust.
9381 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9382 * infcmd.c (detach_command): Adjust
9383 * infrun.c (follow_fork_inferior): Adjust.
9384 (handle_vfork_child_exec_or_exit): Adjust.
9385 * linux-fork.c (linux_fork_detach): Remove args parameter.
9386 * linux-fork.h (linux_fork_detach): Likewise.
9387 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9388 * linux-thread-db.c (thread_db_detach): Likewise.
9389 * nto-procfs.c (procfs_detach): Likewise.
9390 * procfs.c (procfs_detach): Likewise.
9391 (do_detach): Remove signo parameter.
9392 * record.c (record_detach): Remove args parameter.
9393 * record.h (record_detach): Likewise.
9394 * remote-sim.c (gdbsim_detach): Likewise.
9395 * remote.c (remote_detach_1): Likewise.
9396 (remote_detach): Likewise.
9397 (extended_remote_detach): Likewise.
9398 * sol-thread.c (sol_thread_detach): Likewise.
9399 * target-delegates.c: Re-generate.
9400 * top.c (struct qt_args) <args>: Remove field.
9401 (kill_or_detach): Don't pass args.
9402 (quit_force): Don't set args.
9403 * windows-nat.c (windows_detach): Remove args parameter.
9405 2018-01-19 Yao Qi <yao.qi@linaro.org>
9407 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9408 (arm_linux_init_abi): Install it.
9410 2018-01-19 Yao Qi <yao.qi@linaro.org>
9412 * osabi.c (gdb_osabi_names): Extend the regexp for
9413 arm-linux-gnueabihf.
9415 2018-01-18 Yao Qi <yao.qi@linaro.org>
9417 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9419 (abbrev_table::add_abbrev): Update.
9420 (abbrev_table::lookup_abbrev): Update.
9422 2018-01-18 Yao Qi <yao.qi@linaro.org>
9424 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9426 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9428 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9431 2018-01-17 Tom Tromey <tom@tromey.com>
9433 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9435 2018-01-17 Tom Tromey <tom@tromey.com>
9437 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9438 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9439 (create_array_type_with_stride): Update.
9440 * dwarf2read.c (set_die_type): Update.
9442 2018-01-17 Tom Tromey <tom@tromey.com>
9444 * dwarf2read.c (delayed_method_info): Remove typedef.
9445 (dwarf2_cu::method_info): Now a std::vector.
9446 (add_to_method_list): Update.
9447 (free_delayed_list): Remove.
9448 (compute_delayed_physnames): Update.
9449 (process_full_comp_unit, process_full_type_unit): Clear the method
9450 list. Remove cleanups.
9451 (psymtab_include_file_name): Add name_holder parameter. Use
9453 (dwarf_decode_lines): Update.
9455 2018-01-17 Tom Tromey <tom@tromey.com>
9456 Simon Marchi <simon.marchi@ericsson.com>
9458 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9459 (dwarf2_per_objfile::free_cached_comp_units)
9460 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9461 (init_cutu_and_read_dies_no_follow): Update.
9462 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9463 (dwarf2_cu::~dwarf2_cu): New.
9464 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9465 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9467 2018-01-17 Tom Tromey <tom@tromey.com>
9468 Simon Marchi <simon.marchi@ericsson.com>
9470 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9471 (struct die_reader_specs) <abbrev_table>: New member.
9472 (struct abbrev_table): Add constructor.
9473 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9474 <abbrev_obstack>: Now an auto_obstack.
9475 (abbrev_table_up): New typedef.
9476 (init_cu_die_reader): Add abbrev_table parameter.
9477 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9478 Add result_dwo_abbrev_table.
9479 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9480 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9482 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9484 (skip_children): Update.
9485 (abbrev_table::alloc_abbrev): Rename from
9486 abbrev_table_alloc_abbrev.
9487 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9488 (abbrev_table::lookup_abbrev): Rename from
9489 abbrev_table_lookup_abbrev.
9490 (abbrev_table_read_table): Return abbrev_table_up.
9491 (abbrev_table_free, abbrev_table_free_cleanup)
9492 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9493 (load_partial_dies): Update.
9495 2018-01-17 Tom Tromey <tom@tromey.com>
9497 * dwarf2read.c (dwarf2_compute_name): Update comment.
9498 (read_func_scope, read_variable): Update.
9499 (new_symbol): Remove.
9500 (new_symbol_full): Rename to new_symbol.
9502 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9505 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9506 a warning instead of throwing an error, set section size to 0 and return
9508 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9510 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9512 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9514 (linux_ptrace_attach_fail_reason_string): Likewise.
9515 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9517 (linux_ptrace_attach_fail_reason_string): Likewise.
9518 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9520 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9522 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9524 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9527 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9528 checking for fs_base/gs_base fields in struct user_regs_struct.
9529 * configure: Regenerate.
9531 2018-01-17 Yao Qi <yao.qi@linaro.org>
9533 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9535 (aarch64_linux_init_abi): Install it to gdbarch hook
9538 2018-01-15 Pedro Alves <palves@redhat.com>
9540 * common/signals-state-save-restore.c
9541 (save_original_signals_state): Fix typos.
9543 2017-01-12 Tom Tromey <tom@tromey.com>
9544 Sergio Durigan Junior <sergiodj@redhat.com>
9546 * Makefile.in (install-only): Install gdb-add-index.
9548 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9550 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9552 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9554 * infrun.c (keep_going_pass_signal): Clear step-over info when
9555 insert_breakpoints fails.
9557 2018-01-11 Pedro Alves <palves@redhat.com>
9560 * infrun.c (resume): Rename to ...
9561 (resume_1): ... this.
9562 (resume): Reimplement as wrapper around resume_1.
9564 2018-01-11 Pedro Alves <palves@redhat.com>
9567 * remote.c (remote_parse_stop_reply): Default to the last-set
9568 general thread instead of to 'magic_null_ptid'.
9570 2018-01-10 Pedro Alves <palves@redhat.com>
9572 * language.h (language_get_symbol_name_matcher): Rename ...
9573 (get_symbol_name_matcher): ... this.
9574 * language.c (language_get_symbol_name_matcher): Ditto.
9575 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9578 2018-01-10 Pedro Alves <palves@redhat.com>
9582 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9583 Adjust to use language_get_symbol_name_matcher instead of
9584 language_defn::la_get_symbol_name_matcher.
9585 * language.c (language_get_symbol_name_matcher): If in Ada mode
9586 and the lookup name is a verbatim match, return Ada's matcher.
9587 * language.h (language_get_symbol_name_matcher): Adjust comment.
9588 (ada_lookup_name_info::verbatim_p):: New method.
9590 2018-01-10 Pedro Alves <palves@redhat.com>
9593 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9594 minsym's language is language_auto or language_cplus, pass down
9595 language_ada instead.
9596 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9598 2018-01-10 Pedro Alves <palves@redhat.com>
9601 * minsyms.c (linkage_name_str): New function.
9602 (iterate_over_minimal_symbols): Use it.
9604 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9606 * NEWS: Document that 'info proc' now works on FreeBSD.
9608 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9610 * configure.ac: Check for kinfo_getfile in libutil.
9611 * configure: Regenerate.
9612 * config.in: Regenerate.
9613 * fbsd-nat.c: Include "fbsd-tdep.h".
9614 (fbsd_fetch_cmdline): New.
9615 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9616 rather than calling error.
9617 (fbsd_info_proc): New.
9618 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9619 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9620 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9622 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9624 * fbsd-nat.c (struct free_deleter): Remove.
9625 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9627 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9629 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9630 NULL for an empty pathname.
9632 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9634 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9635 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9636 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9637 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9638 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9639 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9640 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9641 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9642 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9643 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9644 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9645 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9646 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9647 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9648 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9650 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9652 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9653 (gnu_xfer_auxv): New function.
9654 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9657 2018-01-08 Yao Qi <yao.qi@linaro.org>
9658 Simon Marchi <simon.marchi@ericsson.com>
9660 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9662 (COMMON_OBS): Remove selftest.o.
9663 * configure.ac: Append selftest-arch.c and common/selftest.c to
9664 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9665 * configure: Re-generated.
9666 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9668 (maintenance_info_selftests): Likewise.
9670 2018-01-08 Xavier Roirand <roirand@adacore.com>
9672 * ada-valprint.c (val_print_packed_array_elements): Use
9673 proper number of elements when printing an array indexed
9674 by an enumeration type.
9676 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9678 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9679 (dw2_get_file_names_reader): Adjust.
9680 (lookup_dwo_signatured_type): Adjust.
9681 (lookup_dwp_signatured_type): Adjust.
9682 (lookup_signatured_type): Adjust.
9683 (create_type_unit_group): Adjust.
9684 (get_type_unit_group): Adjust.
9685 (process_psymtab_comp_unit_reader): Adjust.
9686 (build_type_psymtabs_reader): Adjust.
9687 (scan_partial_symbols): Adjust.
9688 (add_partial_symbol): Adjust.
9689 (add_partial_subprogram): Adjust.
9690 (peek_die_abbrev): Adjust.
9691 (fixup_go_packaging): Adjust.
9692 (process_imported_unit_die): Adjust.
9693 (dwarf2_compute_name): Adjust.
9694 (dwarf2_physname): Adjust.
9695 (read_import_statement): Adjust.
9696 (handle_DW_AT_stmt_list): Adjust.
9697 (read_file_scope): Adjust.
9698 (read_func_scope): Adjust.
9699 (read_lexical_block_scope): Adjust.
9700 (read_call_site_scope): Adjust.
9701 (read_variable): Adjust.
9702 (dwarf2_rnglists_process): Adjust.
9703 (dwarf2_ranges_process): Adjust.
9704 (dwarf2_ranges_read): Adjust.
9705 (dwarf2_get_pc_bounds): Adjust.
9706 (dwarf2_record_block_ranges): Adjust.
9707 (dwarf2_add_field): Adjust.
9708 (dwarf2_add_member_fn): Adjust.
9709 (read_structure_type): Adjust.
9710 (process_structure_scope): Adjust.
9711 (read_enumeration_type): Adjust.
9712 (read_array_type): Adjust.
9713 (mark_common_block_symbol_computed): Adjust.
9714 (read_common_block): Adjust.
9715 (read_namespace_type): Adjust.
9716 (read_namespace): Adjust.
9717 (read_module_type): Adjust.
9718 (read_tag_pointer_type): Adjust.
9719 (read_tag_ptr_to_member_type): Adjust.
9720 (read_tag_string_type): Adjust.
9721 (read_subroutine_type): Adjust.
9722 (read_typedef): Adjust.
9723 (read_base_type): Adjust.
9724 (attr_to_dynamic_prop): Adjust.
9725 (read_subrange_type): Adjust.
9726 (read_unspecified_type): Adjust.
9727 (dwarf2_read_abbrevs): Adjust.
9728 (load_partial_dies): Adjust.
9729 (read_partial_die): Adjust.
9730 (find_partial_die): Adjust.
9731 (guess_partial_die_structure_name): Adjust.
9732 (fixup_partial_die): Adjust.
9733 (read_attribute_value): Adjust.
9734 (read_addr_index): Adjust.
9735 (read_addr_index_from_leb128): Adjust.
9736 (read_str_index): Adjust.
9737 (dwarf2_string_attr): Adjust.
9738 (get_debug_line_section): Adjust.
9739 (dwarf_decode_line_header): Adjust.
9740 (lnp_state_machine::check_line_address): Adjust.
9741 (dwarf_decode_lines_1): Adjust.
9742 (dwarf_decode_lines): Adjust.
9743 (dwarf2_start_symtab): Adjust.
9744 (var_decode_location): Adjust.
9745 (new_symbol_full): Adjust.
9746 (dwarf2_const_value_data): Adjust.
9747 (dwarf2_const_value_attr): Adjust.
9748 (dwarf2_const_value): Adjust.
9750 (die_containing_type): Adjust.
9751 (build_error_marker_type): Adjust.
9752 (lookup_die_type): Adjust.
9753 (guess_full_die_structure_name): Adjust.
9754 (anonymous_struct_prefix): Adjust.
9755 (determine_prefix): Adjust.
9756 (dwarf2_name): Adjust.
9757 (follow_die_ref_or_sig): Adjust.
9758 (follow_die_offset): Adjust.
9759 (follow_die_ref): Adjust.
9760 (follow_die_sig_1): Adjust.
9761 (follow_die_sig): Adjust.
9762 (get_signatured_type): Adjust.
9763 (get_DW_AT_signature_type): Adjust.
9764 (decode_locdesc): Adjust.
9765 (dwarf_decode_macros): Adjust.
9766 (cu_debug_loc_section): Adjust.
9767 (fill_in_loclist_baton): Adjust.
9768 (dwarf2_symbol_mark_computed): Adjust.
9769 (init_one_comp_unit): Don't assign
9770 dwarf2_cu::dwarf2_per_objfile.
9771 (set_die_type): Adjust.
9773 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9775 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9776 <dwarf2_per_objfile>: New field.
9777 (dwarf2_per_objfile): Remove global.
9778 (get_dwarf2_per_objfile): New function.
9779 (set_dwarf2_per_objfile): New function.
9780 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9782 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9783 (read_abbrev_offset): Likewise.
9784 (read_indirect_string): Likewise.
9785 (read_indirect_line_string): Likewise.
9786 (read_indirect_string_at_offset): Likewise.
9787 (read_indirect_string_from_dwz): Likewise.
9788 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9790 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9791 (create_all_comp_units): Change objfile parameter to
9793 (create_all_type_units): Likewise.
9794 (process_queue): Add dwarf2_per_objfile parameter.
9795 (read_and_check_comp_unit_head): Likewise.
9796 (lookup_dwo_unit_in_dwp): Likewise.
9797 (get_dwp_file): Likewise.
9798 (process_cu_includes): Likewise.
9799 (struct free_dwo_file_cleanup_data): New struct.
9800 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9801 set_dwarf2_per_objfile.
9802 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9803 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9804 context, adjust calls.
9805 (dw2_instantiate_symtab): Likewise.
9806 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9807 (dw2_get_cu): Likewise.
9808 (create_cu_from_index_list): Change objfile parameter to
9810 (create_cus_from_index_list): Get dwarf2_per_objfile from
9811 context, adjust calls.
9812 (create_cus_from_index): Likewise.
9813 (create_signatured_type_table_from_index): Change objfile
9814 parameter to dwarf2_per_objfile.
9815 (create_signatured_type_table_from_debug_names): Change objfile
9816 parameter to dwarf2_per_objfile.
9817 (create_addrmap_from_index): Likewise.
9818 (create_addrmap_from_aranges): Likewise.
9819 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9820 (dw2_setup): Remove.
9821 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9823 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9824 get_dwarf2_per_objfile.
9825 (dw2_forget_cached_source_info): Likewise.
9826 (dw2_map_symtabs_matching_filename): Likewise.
9827 (struct dw2_symtab_iterator) <index>: Remove.
9828 <dwarf2_per_objfile>: New field.
9829 (dw2_symtab_iter_init): Replace index parameter with
9831 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9832 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9833 (dw2_print_stats): Likewise.
9834 (dw2_dump): Likewise.
9835 (dw2_expand_symtabs_for_function): Likewise.
9836 (dw2_expand_all_symtabs): Likewise.
9837 (dw2_expand_symtabs_with_fullname): Likewise.
9838 (dw2_expand_marked_cus): Replace index and objfile parameters
9839 with dwarf2_per_objfile.
9840 (dw_expand_symtabs_matching_file_matcher): Add
9841 dwarf2_per_objfile parameter and adjust calls.
9842 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9844 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9845 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9847 (create_cus_from_debug_names_list): Replace objfile parameter
9848 with dwarf2_per_objfile and adjust calls.
9849 (create_cus_from_debug_names): Likewise.
9850 (dwarf2_read_debug_names): Likewise.
9851 (mapped_debug_names::namei_to_name): Adjust call.
9852 (dw2_debug_names_iterator::next): Likewise.
9853 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9854 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9855 (dw2_debug_names_dump): Likewise.
9856 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9857 (dw2_debug_names_expand_symtabs_matching): Likewise.
9858 (dwarf2_initialize_objfile): Likewise.
9859 (dwarf2_build_psymtabs): Likewise.
9860 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9862 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9863 (read_and_check_comp_unit_head): Likewise.
9864 (read_abbrev_offset): Likewise.
9865 (create_debug_type_hash_table): Likewise.
9866 (create_debug_types_hash_table): Likewise.
9867 (create_all_type_units): Replace objfile parameter with
9869 (add_type_unit): Add dwarf2_per_objfile parameter.
9870 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9871 with dwarf2_per_objfile.
9872 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9873 (lookup_dwp_signatured_type): Likewise.
9874 (lookup_signatured_type): Likewise.
9875 (read_cutu_die_from_dwo): Likewise.
9876 (init_tu_and_read_dwo_dies): Likewise.
9877 (init_cutu_and_read_dies): Likewise.
9878 (init_cutu_and_read_dies_no_follow): Likewise.
9879 (allocate_type_unit_groups_table): Add objfile parameter.
9880 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9881 (get_type_unit_group): Likewise.
9882 (process_psymtab_comp_unit): Update call.
9883 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9884 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9885 (print_tu_stats): Likewise.
9886 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9888 (build_type_psymtabs): Change objfile parameter to
9890 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9891 passed in void* parameter.
9892 (process_skeletonless_type_units): Change objfile parameter to
9894 (set_partial_user): Likewise.
9895 (dwarf2_build_psymtabs_hard): Likewise.
9896 (read_comp_units_from_section): Likewise.
9897 (create_all_comp_units): Likewise.
9898 (scan_partial_symbols): Update calls.
9899 (add_partial_symbol): Likewise.
9900 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9901 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9902 (process_queue): Add dwarf2_per_objfile parameter.
9903 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9904 (compute_compunit_symtab_includes): Likewise.
9905 (process_cu_includes): Add dwarf2_per_objfile parameter.
9906 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9907 (process_full_type_unit): Likewise.
9908 (process_imported_unit_die): Update call.
9909 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9910 (read_file_scope): Likewise.
9911 (allocate_dwo_file_hash_table): Add objfile parameter.
9912 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9913 (create_cus_hash_table): Likewise.
9914 (create_dwp_hash_table): Likewise.
9915 (create_dwo_unit_in_dwp_v1): Likewise.
9916 (create_dwp_v2_section): Likewise.
9917 (create_dwo_unit_in_dwp_v2): Likewise.
9918 (lookup_dwo_unit_in_dwp): Likewise.
9919 (try_open_dwop_file): Likewise.
9920 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9921 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9922 cleanup to include a reference to dwarf2_per_objfile.
9923 (open_dwp_file): Add dwarf2_per_objfile parameter.
9924 (open_and_init_dwp_file): Likewise.
9925 (get_dwp_file): Likewise.
9926 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9927 (queue_and_load_all_dwo_tus): Update call.
9928 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9930 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9931 (dwarf2_ranges_process): Likewise.
9932 (dwarf2_get_pc_bounds): Likewise.
9933 (mark_common_block_symbol_computed): Likewise.
9934 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9935 (dwarf2_read_abbrevs): Update call.
9936 (read_partial_die): Use dwarf2_per_objfile from cu.
9937 (find_partial_die): Likewise.
9938 (fixup_partial_die): Likewise.
9939 (read_attribute_value): Likewise.
9940 (read_indirect_string_at_offset_from): Add objfile parameter.
9941 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9943 (read_indirect_string_from_dwz): Add objfile parameter.
9944 (read_indirect_string): Add objfile parameter.
9945 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9946 (read_addr_index): Use dwarf2_per_objfile from cu.
9947 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9949 (read_str_index): Use dwarf2_per_objfile from cu.
9950 (get_debug_line_section): Likewise.
9951 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9952 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9953 (new_symbol_full): Use dwarf2_per_objfile from cu.
9954 (build_error_marker_type): Likewise.
9955 (lookup_die_type): Likewise.
9956 (determine_prefix): Likewise.
9957 (follow_die_offset): Likewise.
9958 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9959 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9960 (dwarf2_fetch_die_type_sect_off): Likewise.
9961 (dwarf2_get_die_type): Likewise.
9962 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9963 (get_signatured_type): Likewise.
9964 (get_DW_AT_signature_type): Likewise.
9965 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9966 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9967 (cu_debug_loc_section): Likewise.
9968 (fill_in_loclist_baton): Likewise.
9969 (dwarf2_symbol_mark_computed): Likewise.
9970 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9972 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9974 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9975 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9976 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9977 (set_die_type): Use dwarf2_free_objfile from cu.
9978 (get_die_type_at_offset): Likewise.
9979 (dwarf2_per_objfile_free): Don't assign global variable.
9980 (debug_names) <constructor>: Add dwarf2_per_objfile
9981 parameter, update m_debugstrlookup construction.
9982 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9984 <m_dwarf2_per_objfile>: New field.
9985 <lookup>: Use m_dwarf2_per_objfile.
9986 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9987 (psyms_seen_size): Likewise.
9988 (write_gdbindex): Replace objfile parameter with
9990 (write_debug_names): Likewise.
9991 (write_psymtabs_to_index): Likewise.
9992 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9995 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9997 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9998 <dwarf2_per_objfile>: New field.
9999 (struct dwarf2_per_cu_data) <objfile>: Remove.
10000 <dwarf2_per_objfile>: New field.
10001 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10003 (create_signatured_type_table_from_index): Likewise.
10004 (create_debug_type_hash_table): Likewise.
10005 (fill_in_sig_entry_from_dwo_entry): Likewise.
10006 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10007 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10009 (create_partial_symtab): Access objfile through
10010 dwarf2_per_objfile.
10011 (process_psymtab_comp_unit_reader): Likewise.
10012 (read_comp_units_from_section): Likewise.
10013 (scan_partial_symbols): Likewise.
10014 (add_partial_symbol): Likewise.
10015 (add_partial_subprogram): Likewise.
10016 (peek_die_abbrev): Likewise.
10017 (fixup_go_packaging): Likewise.
10018 (process_full_comp_unit): Likewise.
10019 (process_full_type_unit): Likewise.
10020 (process_imported_unit_die): Likewise.
10021 (dwarf2_compute_name): Likewise.
10022 (dwarf2_physname): Likewise.
10023 (read_import_statement): Likewise.
10024 (create_cus_hash_table): Assign dwarf2_physname instead of
10026 (read_func_scope): Access objfile through dwarf2_per_objfile.
10027 (read_lexical_block_scope): Likewise.
10028 (read_call_site_scope): Likewise.
10029 (read_variable): Likewise.
10030 (dwarf2_rnglists_process): Likewise.
10031 (dwarf2_ranges_process): Likewise.
10032 (dwarf2_ranges_read): Likewise.
10033 (dwarf2_record_block_ranges): Likewise.
10034 (dwarf2_add_field): Likewise.
10035 (dwarf2_add_member_fn): Likewise.
10036 (read_structure_type): Likewise.
10037 (process_structure_scope): Likewise.
10038 (read_enumeration_type): Likewise.
10039 (read_array_type): Likewise.
10040 (read_common_block): Likewise.
10041 (read_namespace_type): Likewise.
10042 (read_namespace): Likewise.
10043 (read_module_type): Likewise.
10044 (read_tag_pointer_type): Likewise.
10045 (read_tag_ptr_to_member_type): Likewise.
10046 (read_tag_string_type): Likewise.
10047 (read_subroutine_type): Likewise.
10048 (read_typedef): Likewise.
10049 (read_base_type): Likewise.
10050 (attr_to_dynamic_prop): Likewise.
10051 (read_subrange_type): Likewise.
10052 (read_unspecified_type): Likewise.
10053 (load_partial_dies): Likewise.
10054 (read_partial_die): Likewise.
10055 (find_partial_die): Likewise.
10056 (guess_partial_die_structure_name): Likewise.
10057 (fixup_partial_die): Likewise.
10058 (read_attribute_value): Likewise.
10059 (read_addr_index_from_leb128): Likewise.
10060 (dwarf2_read_addr_index): Likewise.
10061 (dwarf2_string_attr): Likewise.
10062 (lnp_state_machine::check_line_address): Likewise.
10063 (dwarf_decode_lines_1): Likewise.
10064 (dwarf_decode_lines): Likewise.
10065 (dwarf2_start_symtab): Likewise.
10066 (var_decode_location): Likewise.
10067 (new_symbol_full): Likewise.
10068 (dwarf2_const_value_data): Likewise.
10069 (dwarf2_const_value_attr): Likewise.
10070 (dwarf2_const_value): Likewise.
10071 (die_type): Likewise.
10072 (die_containing_type): Likewise.
10073 (lookup_die_type): Likewise.
10074 (guess_full_die_structure_name): Likewise.
10075 (anonymous_struct_prefix): Likewise.
10076 (dwarf2_name): Likewise.
10077 (follow_die_ref_or_sig): Likewise.
10078 (follow_die_offset): Likewise.
10079 (follow_die_ref): Likewise.
10080 (dwarf2_fetch_die_loc_sect_off): Likewise.
10081 (dwarf2_fetch_constant_bytes): Likewise.
10082 (dwarf2_fetch_die_type_sect_off): Likewise.
10083 (dwarf2_get_die_type): Likewise.
10084 (follow_die_sig): Likewise.
10085 (decode_locdesc): Likewise.
10086 (dwarf2_per_cu_objfile): Likewise.
10087 (dwarf2_per_cu_text_offset): Likewise.
10088 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10090 (set_die_type): Access objfile through
10091 dwarf2_per_objfile.
10093 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10095 * valprint.c (converted_character_d): Remove typedef.
10096 (DEF_VEC_O (converted_character_d)): Remove.
10097 (count_next_character): Use std::vector.
10098 (print_converted_chars_to_obstack): Likewise.
10099 (generic_printstr): Likewise.
10101 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10103 * xml-support.h (struct gdb_xml_value): Add constructor.
10104 <value>: Change type to unique_xmalloc_ptr.
10105 (gdb_xml_value_s): Remove typedef.
10106 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10107 (gdb_xml_element_start_handler): Change parameter type to
10109 (xml_find_attribute): Likewise.
10110 * xml-support.c (xml_find_attribute): Change parameter type to
10111 std::vector and adjust.
10112 (gdb_xml_values_cleanup): Remove.
10113 (gdb_xml_parser::start_element): Adjust to std::vector.
10114 (xinclude_start_include): Change paraeter type to std::vector
10116 * btrace.c (check_xml_btrace_version): Likewise.
10117 (parse_xml_btrace_block): Likewise.
10118 (parse_xml_btrace_pt_config_cpu): Likewise.
10119 (parse_xml_btrace_pt): Likewise.
10120 (parse_xml_btrace_conf_bts): Likewise.
10121 (parse_xml_btrace_conf_pt): Likewise.
10122 * memory-map.c (memory_map_start_memory): Likewise.
10123 (memory_map_start_property): Likewise.
10124 * osdata.c (osdata_start_osdata): Likewise.
10125 (osdata_start_item): Likewise.
10126 (osdata_start_column): Likewise.
10127 * remote.c (start_thread): Likewise.
10128 * solib-aix.c (library_list_start_library): Likewise.
10129 (library_list_start_list): Likewise.
10130 * solib-svr4.c (library_list_start_library): Likewise.
10131 (svr4_library_list_start_list): Likewise.
10132 * solib-target.c (library_list_start_segment): Likewise.
10133 (library_list_start_section): Likewise.
10134 (library_list_start_library): Likewise.
10135 (library_list_start_list): Likewise.
10136 * tracepoint.c (traceframe_info_start_memory): Likewise.
10137 (traceframe_info_start_tvar): Likewise.
10138 * xml-syscall.c (syscall_start_syscall): Likewise.
10139 * xml-tdesc.c (tdesc_start_target): Likewise.
10140 (tdesc_start_feature): Likewise.
10141 (tdesc_start_reg): Likewise.
10142 (tdesc_start_union): Likewise.
10143 (tdesc_start_struct): Likewise.
10144 (tdesc_start_flags): Likewise.
10145 (tdesc_start_enum): Likewise.
10146 (tdesc_start_field): Likewise.
10147 (tdesc_start_enum_value): Likewise.
10148 (tdesc_start_vector): Likewise.
10150 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10152 * extension.h (struct xmethod_worker) <clone>: Remove.
10153 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10155 (python_xmethod_worker::clone): Remove.
10156 * valops.c (find_overload_match): Use std::move instead of
10159 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10161 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10162 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10163 <free_xmethod_worker_data>: Remove.
10164 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10165 <get_xmethod_arg_types>: Remove.
10166 <get_xmethod_result_type>: Remove.
10167 <invoke_xmethod>: Remove.
10168 * extension.c (new_xmethod_worker): Remove.
10169 (clone_xmethod_worker): Remove.
10170 (get_matching_xmethod_workers): Return void, pass std::vector by
10172 (get_xmethod_arg_types): Rename to...
10173 (xmethod_worker::get_arg_types): ... this, and adjust.
10174 (get_xmethod_result_type): Rename to...
10175 (xmethod_worker::get_result_type): ... this, and adjust.
10176 (invoke_xmethod): Remove.
10177 (free_xmethod_worker): Remove.
10178 (free_xmethod_worker_vec): Remove.
10179 * extension.h (enum ext_lang_rc): Move here from
10181 (struct xmethod_worker): Add constructor and destructor.
10184 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10185 virtual pure methods.
10186 <get_arg_types, get_result_type>: New methods.
10187 (xmethod_worker_ptr): Remove typedef.
10188 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10189 (xmethod_worker_vec): Remove typedef.
10190 (xmethod_worker_up): New typedef.
10191 (invoke_xmethod): Remove.
10192 (clone_xmethod_worker): Remove.
10193 (free_xmethod_worker): Remove.
10194 (free_xmethod_worker_vec): Remove.
10195 (get_xmethod_arg_types): Remove.
10196 (get_xmethod_result_type): Remove.
10197 * valops.c (find_method_list): Use std::vector, don't use
10198 intermediate vector.
10199 (value_find_oload_method_list): Use std::vector.
10200 (find_overload_match): Use std::vector.
10201 (find_oload_champ): Use std::vector.
10202 * value.c (value_free): Use operator delete.
10203 (value_of_xmethod): Rename to...
10204 (value_from_xmethod): ... this. Don't assign
10205 xmethod_worker::value, take rvalue-reference.
10206 (result_type_of_xmethod): Adjust.
10207 (call_xmethod): Adjust.
10208 * value.h: Include extension.h.
10209 (struct xmethod_worker): Don't forward-declare.
10210 (value_of_xmethod): Rename to...
10211 (value_from_xmethod): ... this, take rvalue-reference.
10212 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10213 (struct python_xmethod_worker): ... this, add constructor and
10215 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10216 (gdbpy_free_xmethod_worker_data): Rename to...
10217 (python_xmethod_worker::~python_xmethod_worker): ... this and
10219 (gdbpy_clone_xmethod_worker_data): Rename to...
10220 (python_xmethod_worker::clone): ... this and adjust.
10221 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10223 (gdbpy_get_xmethod_arg_types): Rename to...
10224 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10225 (gdbpy_get_xmethod_result_type): Rename to...
10226 (python_xmethod_worker::do_get_result_type): ... this and
10228 (gdbpy_invoke_xmethod): Rename to...
10229 (python_xmethod_worker::invoke): ... this and adjust.
10230 (new_python_xmethod_worker): Rename to...
10231 (python_xmethod_worker::python_xmethod_worker): ... this and
10233 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10235 (gdbpy_free_xmethod_worker_data): Remove.
10236 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10237 (gdbpy_get_xmethod_arg_types): Remove.
10238 (gdbpy_get_xmethod_result_type): Remove.
10239 (gdbpy_invoke_xmethod): Remove.
10240 * python/python.c (python_extension_ops): Remove obsolete
10243 2018-01-05 Pedro Alves <palves@redhat.com>
10246 * common/signals-state-save-restore.c
10247 (save_original_signals_state): New parameter 'quiet'. Warn if we
10248 find a custom handler preinstalled, instead of internal erroring.
10249 But only warn if !quiet.
10250 * common/signals-state-save-restore.h
10251 (save_original_signals_state): New parameter 'quiet'.
10252 * main.c (captured_main_1): Move save_original_signals_state call
10253 after option handling, and pass QUIET.
10255 2018-01-05 Pedro Alves <palves@redhat.com>
10257 * spu-tdep.c (spu_catch_start): Pass
10258 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10260 2018-01-05 Pedro Alves <palves@redhat.com>
10263 * ada-lang.c (literal_symbol_name_matcher): New function.
10264 (ada_get_symbol_name_matcher): Use it for
10265 symbol_name_match_type::SEARCH_NAME.
10266 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10267 it down instead of assuming symbol_name_match_type::FULL.
10268 * block.h (block_lookup_symbol): New parameter 'match_type'.
10269 * c-valprint.c (print_unpacked_pointer): Use
10270 lookup_symbol_search_name instead of lookup_symbol.
10271 * compile/compile-object-load.c (get_out_value_type): Pass down
10272 symbol_name_match_type::SEARCH_NAME.
10273 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10274 symbol_name_match_type::FULL.
10275 * cp-support.c (cp_get_symbol_name_matcher): Handle
10276 symbol_name_match_type::SEARCH_NAME.
10277 * infrun.c (insert_exception_resume_breakpoint): Use
10278 lookup_symbol_search_name.
10279 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10280 * psymtab.c (maintenance_check_psymtabs): Use
10281 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10282 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10283 SYMBOL_SEARCH_NAME.
10284 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10285 if symbol_name_match_type::SEARCH_NAME.
10286 (lookup_symbol_in_language): Pass down
10287 symbol_name_match_type::FULL.
10288 (lookup_symbol_search_name): New.
10289 (lookup_language_this): Pass down
10290 symbol_name_match_type::SEARCH_NAME.
10291 (lookup_symbol_aux, lookup_local_symbol): New parameter
10292 'match_type'. Pass it down.
10293 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10294 (lookup_symbol_search_name): New declaration.
10295 (lookup_symbol_in_block): New 'match_type' parameter.
10297 2018-01-05 Pedro Alves <palves@redhat.com>
10300 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10302 (ada_lookup_symbol): Reimplement in terms of
10303 ada_lookup_symbol_list, bits factored out from
10304 ada_lookup_encoded_symbol.
10306 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10308 * ada-exp.y (write_object_renaming): When subscripting an array
10309 using a symbol as the index, pass the block in call to
10310 ada_lookup_encoded_symbol when looking that symbol up.
10312 2018-01-05 Jerome Guitton <guitton@adacore.com>
10314 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10317 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10319 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10320 the case where VALUE_LVAL (val0) is not lval_memory.
10322 2018-01-05 Xavier Roirand <roirand@adacore.com>
10324 * ada-valprint.c (print_optional_low_bound): Handle
10325 character-indexed array printing like boolean-indexed array
10328 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10330 * NEWS: Create a new section for the next release branch.
10331 Rename the section of the current branch, now that it has
10334 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10336 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10337 * version.in: Bump version to 8.1.50.DATE-git.
10339 2018-01-03 Xavier Roirand <roirand@adacore.com>
10341 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10343 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10345 (default_exception_support_info) <catch_handlers_sym>: Add field.
10346 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10347 (ada_exception_name_addr_1): Add "catch handlers" handling.
10348 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10349 Update all callers.
10350 (create_excep_cond_exprs) <ex>: Add parameter.
10351 (re_set_exception): Update create_excep_cond_exprs call.
10352 (print_it_exception, print_one_exception, print_mention_exception)
10353 (print_recreate_exception): Add "catch handler" handling.
10354 (allocate_location_catch_handlers, re_set_catch_handlers)
10355 (check_status_catch_handlers, print_it_catch_handlers)
10356 (print_one_catch_handlers, print_mention_catch_handlers)
10357 (print_recreate_catch_handlers): New function.
10358 (catch_handlers_breakpoint_ops): New variable.
10359 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10360 Add parameter. Add "catch handler" handling.
10361 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10362 Add "catch handler" handling.
10363 (ada_exception_catchpoint_cond_string): Add "catch handler"
10365 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10367 (catch_ada_handlers_command): New function.
10368 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10369 operations structure.
10370 (_initialize_ada_language): Add "catch handlers" command entry.
10371 * NEWS: Document "catch handlers" feature.
10373 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10375 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10376 account when creating the array type of the slice.
10377 (ada_value_slice): Likewise.
10379 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10381 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10383 (create_array_type_with_stride): Add byte_stride_prop parameter.
10384 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10385 New parameter. Update all callers in this file.
10386 (array_type_has_dynamic_stride): New function.
10387 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10388 of arrays with dynamic byte strides.
10389 * dwarf2read.c (read_array_type): Add support for dynamic
10390 DW_AT_byte_stride attributes.
10392 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10394 * dwarf2read.c (read_unspecified_type): Treat
10395 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10397 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10399 Update copyright year range in all GDB files.
10401 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10403 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10404 and gdb/testsuite/gdb.base/step-line.c.
10406 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10408 * copyright.py (main): Dump the contents of
10409 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10410 even if BY_HAND is empty.
10412 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10414 * top.c (print_gdb_version): Update Copyright year in version
10417 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10419 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10421 For older changes see ChangeLog-2017.
10427 version-control: never