1 2018-07-20 Tom Tromey <tom@tromey.com>
3 * coffread.c (coff_symtab_read): Update.
4 * xcoffread.c (read_xcoff_symtab): Update.
5 * dwarf2read.c (new_symbol): Update.
6 (read_func_scope, read_lexical_block_scope): Update.
7 * dbxread.c (process_one_symbol): Update.
8 * buildsym.h (context_stack, context_stack_depth): Don't declare.
9 (outermost_context_p): Remove macro.
10 (outermost_context_p, get_current_context_stack)
11 (get_context_stack_depth): Declare.
12 (pop_context): Return struct context_stack.
13 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
15 (context_stack_size): Remove.
16 (INITIAL_CONTEXT_STACK_SIZE): Remove.
17 (prepare_for_building, end_symtab_get_static_block)
18 (augment_type_symtab, push_context): Update.
19 (pop_context): Return struct context_stack.
20 (outermost_context_p, get_current_context_stack)
21 (get_context_stack_depth): New functions.
22 (buildsym_init): Update.
24 2018-07-20 Tom Tromey <tom@tromey.com>
26 * rust-exp.y: Now a pure parser. Update all rules.
27 (%union): Move earlier.
28 (current_parser, work_obstack): Remove globals.
29 (rust_parser, ~rust_parser): Update.
30 (class rust_parser) <copy_name, concat3, crate_name, super_name,
31 lex_character, lex_number, lex_string, lex_identifier,
32 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
33 convert_name, convert_params_to_expression,
34 convert_ast_to_expression, ast_basic_type, ast_operation,
35 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
36 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
37 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
38 ast_array_type, ast_slice_type, ast_reference_type,
39 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
41 (rustyyerror, rustyylex): Add parser parameter.
42 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
43 (rust_lex_stringish_test, rust_lex_test_sequence)
44 (rust_lex_test_trailing_dot, rust_lex_test_completion)
45 (rust_lex_test_push_back, rust_lex_tests): Update.
47 2018-07-19 Pedro Alves <palves@redhat.com>
49 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
50 gdb::unique_xmalloc_ptr.
51 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
52 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
53 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
55 * guile/scm-pretty-print.c (ppscm_print_children): Use
56 gdb::unique_xmalloc_ptr instead of cleanups.
57 (gdbscm_apply_val_pretty_printer): Remove cleanups.
58 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
59 gdb::unique_xmalloc_ptr.
60 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
61 Adjust to use gdb::unique_xmalloc_ptr.
62 * guile/scm-utils.c (extract_arg): Adjust.
63 * guile/scm-value.c (gdbscm_value_field): Adjust to use
64 gdb::unique_xmalloc_ptr instead of a cleanup.
66 2018-07-19 Tom Tromey <tom@tromey.com>
68 * utils.c (do_value_free_to_mark)
69 (make_cleanup_value_free_to_mark): Remove.
70 * utils.h (make_cleanup_value_free_to_mark): Remove.
72 2018-07-19 Pedro Alves <palves@redhat.com>
74 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
77 2018-07-18 Pedro Alves <palves@redhat.com>
79 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
80 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
83 2018-07-18 Pedro Alves <palves@redhat.com>
85 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
87 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
89 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
90 directly instead of a cleanup.
91 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
92 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
93 (vlscm_binop_gdbthrow): New, factored out from ...
94 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
95 (vlscm_rich_compare): Use gdbscm_wrap.
96 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
98 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
100 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
101 Use xfree directly instead of a cleanup.
102 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
103 Adjust to use gdbscm_wrap and scoped_value_mark.
104 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
105 (gdbscm_value_address, gdbscm_value_dereference)
106 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
108 (gdbscm_value_dynamic_type): Use scoped_value_mark.
109 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
111 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
112 gdbscm_wrap and scoped_value_mark.
113 (gdbscm_value_to_string): Use xfree directly instead of a
114 cleanup. Move 'buffer' unique_ptr to TRY scope.
115 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
116 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
118 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
119 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
121 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
124 2018-07-18 Tom de Vries <tdevries@suse.de>
126 * findvar.c (default_read_var_value): Also resolve dynamic type for
127 LOC_OPTIMIZED_OUT vars.
129 2018-07-18 Maciej W. Rozycki <macro@mips.com>
131 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
134 2018-07-17 Tom Tromey <tom@tromey.com>
136 * guile/scm-param.c (pascm_set_func, pascm_show_func)
137 (compute_enum_list, pascm_set_param_value_x)
138 (gdbscm_parameter_value): Update.
139 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
140 (gdbscm_scm_to_host_string): Update.
141 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
143 * guile/scm-cmd.c (cmdscm_add_completion): Update.
144 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
145 * guile/scm-string.c (gdbscm_scm_to_string): Return
147 (gdbscm_scm_to_host_string): Likewise.
149 2018-07-17 Tom Tromey <tom@tromey.com>
151 * guile/guile.c (gdbscm_eval_from_control_command): Update.
152 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
153 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
154 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
157 2018-07-17 Tom Tromey <tom@tromey.com>
159 * guile/scm-param.c (pascm_signal_setshow_error): Update.
160 * guile/guile-internal.h (gdbscm_exception_message_to_string):
162 * guile/scm-cmd.c (cmdscm_function): Update.
163 * guile/scm-pretty-print.c
164 (ppscm_print_exception_unless_memory_error): Update.
165 * guile/scm-exception.c (gdbscm_exception_message_to_string):
166 Return unique_xmalloc_ptr.
168 2018-07-17 Tom Tromey <tom@tromey.com>
170 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
173 2018-07-17 Jim Wilson <jimw@sifive.com>
175 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
176 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
177 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
178 unecessary braces after EF_RISCV_RVC test. Delete call to
179 set_gdbarch_decr_pc_after_break.
181 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
182 RISCV_LAST_FP_REGNUM + 1.
183 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
185 2018-07-17 Tom Tromey <tom@tromey.com>
187 * configure.ac: Remove --disable-gdbcli.
188 * configure: Rebuild.
189 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
190 (SUBDIR_CLI_CFLAGS): Remove.
191 (SFILES): Use SUBDIR_CLI_SRCS.
192 (COMMON_OBS): Use SUBDIR_CLI_OBS.
194 2018-07-17 Tom Tromey <tom@tromey.com>
197 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
199 2018-07-16 Jim Wilson <jimw@sifive.com>
201 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
203 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
205 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
207 (libunwind_frame_sniffer): Likewise.
208 (libunwind_frame_prev_register): Likewise.
209 (libunwind_sigtramp_frame_sniffer): Likewise.
210 * ia64-tdep.c (ia64_access_reg): Likewise.
211 (ia64_access_rse_reg): Likewise.
212 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
213 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
215 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
217 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
219 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
221 * remote-sim.c (gdbsim_target::close,
222 gdbsim_target::mourn_inferior): Remove unused variables.
224 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
226 * ia64-tdep.c (ktab_buf): New global.
227 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
228 (get_kernel_table): Adjust.
230 2018-07-16 Tom Tromey <tom@tromey.com>
232 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
233 * dwarf2read.c (using_directives, new_symbol): Use
235 * dbxread.c (process_one_symbol): Use outermost_context_p.
236 * coffread.c (coff_symtab_read): Use outermost_context_p.
238 2018-07-16 Tom Tromey <tom@tromey.com>
240 * dwarf2read.c (using_directives, read_func_scope)
241 (read_lexical_block_scope): Update.
242 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
243 * buildsym.h (local_using_directives, global_using_directives):
245 (get_local_using_directives, set_local_using_directives)
246 (get_global_using_directives): Declare.
247 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
248 m_global_using_directives>: New members.
249 (finish_block_internal, prepare_for_building)
250 (reset_symtab_globals, end_symtab_get_static_block)
251 (push_context): Update.
252 (get_local_using_directives, set_local_using_directives)
253 (get_global_using_directives): New functions.
254 (buildsym_init): Update.
256 2018-07-16 Tom Tromey <tom@tromey.com>
258 * xcoffread.c (xcoff_initial_scan): Don't call
260 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
261 * buildsym.h (class scoped_free_pendings): Add constructor.
262 (free_pending_blocks): Don't declare.
263 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
264 (free_pending_blocks): Now static.
266 2018-07-16 Tom Tromey <tom@tromey.com>
268 * buildsym.h (push_subfile, pop_subfile): Update declarations.
269 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
271 (struct subfile_stack): Remove.
272 (subfile_stack): Remove.
273 (push_subfile, pop_subfile, buildsym_init): Update.
275 2018-07-16 Tom Tromey <tom@tromey.com>
277 * buildsym.c (push_subfile): Use gdb_assert.
278 (pop_subfile): Use gdb_assert.
280 2018-07-16 Tom Tromey <tom@tromey.com>
282 * buildsym.h (merge_symbol_lists): Remove.
283 * buildsym.c (merge_symbol_lists): Remove.
285 2018-07-16 Tom Tromey <tom@tromey.com>
287 * stabsread.c (scan_file_globals): Update comment.
288 * stabsread.h (scan_file_globals): Move from buildsym.h.
289 * buildsym.h (scan_file_globals): Move to stabsread.h.
291 2018-07-16 Tom Tromey <tom@tromey.com>
293 * xcoffread.c (xcoff_new_init): Update.
294 * mipsread.c (mipscoff_new_init): Update.
295 * mdebugread.c (mdebug_build_psymtabs): Update.
296 * elfread.c (elf_new_init): Update.
297 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
298 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
299 * buildsym.h (buildsym_new_init): Don't declare.
300 * buildsym.c (buildsym_new_init): Remove.
302 2018-07-16 Tom Tromey <tom@tromey.com>
304 * stabsread.h (within_function): Move from buildsym.h.
305 * stabsread.c (start_stabs): Clear within_function.
306 * coffread.c (coff_start_symtab): Clear within_function.
307 * buildsym.h (within_function): Move to stabsread.h.
308 * buildsym.c (prepare_for_building): Update.
310 2018-07-16 Tom Tromey <tom@tromey.com>
312 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
313 * dwarf2read.c (dwarf2_start_symtab): Don't set
314 processing_gcc_compilation.
315 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
317 2018-07-16 Tom Tromey <tom@tromey.com>
319 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
320 (next_symbol_text_func): Move from buildsym.h.
321 * stabsread.c (hashname): Move from buildsym.c.
322 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
323 (next_symbol_text_func, hashname): Move to stabsread.h.
324 * buildsym.c: Don't include bcache.h
325 (hashname): Move to stasbread.c.
327 2018-07-16 Tom Tromey <tom@tromey.com>
329 * buildsym.h (context_stack_size): Don't declare.
330 * buildsym.c (context_stack_size): New global.
332 2018-07-16 Tom Tromey <tom@tromey.com>
334 * dbxread.c (processing_acc_compilation): New global.
335 * buildsym.h (processing_acc_compilation): Don't declare.
337 2018-07-16 Tom Tromey <tom@tromey.com>
339 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
340 * dbxread.c (read_ofile_symtab): Update.
341 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
342 * buildsym.h (last_source_start_addr): Remove.
343 (set_last_source_start_addr, get_last_source_start_addr):
345 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
347 (struct buildsym_compunit) <m_last_source_start_addr>: New
349 (prepare_for_building): Remove start_addr parameter.
350 (start_symtab, restart_symtab, end_symtab_get_static_block)
351 (end_symtab_with_blockvector): Update.
352 (set_last_source_start_addr, get_last_source_start_addr): New
355 2018-07-16 Tom Tromey <tom@tromey.com>
357 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
359 (have_line_numbers): Remove.
360 (record_line, prepare_for_building, end_symtab_get_static_block)
361 (augment_type_symtab): Update.
363 2018-07-16 Tom Tromey <tom@tromey.com>
365 * buildsym.c (~buildsym_compunit): Free the macro table.
366 (struct buildsym_compunit) <get_macro_table, release_macros>: New
368 <m_pending_macros>: New member.
369 (pending_macros): Remove.
370 (~scoped_free_pendings, get_macro_table, prepare_for_building)
371 (reset_symtab_globals, end_symtab_get_static_block)
372 (end_symtab_with_blockvector, augment_type_symtab)
373 (buildsym_init): Update.
375 2018-07-16 Tom Tromey <tom@tromey.com>
377 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
379 (buildsym_compunit::set_last_source_file): New method.
380 <m_last_source_file>: New member.
381 (prepare_for_building): Remove "name" parameter.
382 (start_symtab, restart_symtab, reset_symtab_globals): Update.
383 (last_source_file): Remove.
384 (set_last_source_file, get_last_source_file): Update.
386 2018-07-16 Tom Tromey <tom@tromey.com>
388 * buildsym.c (prepare_for_building): Add assert.
390 2018-07-16 Tom Tromey <tom@tromey.com>
392 * buildsym.c (~buildsym_compunit): Update.
393 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
394 (start_subfile, patch_subfile_names)
395 (end_symtab_with_blockvector): Update.
397 2018-07-16 Tom Tromey <tom@tromey.com>
399 * buildsym.c (struct buildsym_compunit): Add constructor,
400 destructor, initializers.
401 (start_buildsym_compunit): Remove.
402 (free_buildsym_compunit): Use "delete".
403 (start_symtab, restart_symtab): Use "new".
405 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
407 * symfile.c (set_objfile_default_section_offset): Remove struct
410 2018-07-14 Stafford Horne <shorne@gmail.com>
412 * (Responsible Maintainers): Add myself as or1k maintainer.
414 2018-07-13 Tom Tromey <tom@tromey.com>
416 * symfile.c (set_objfile_default_section_offset): Use extra braces
419 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
421 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
424 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
426 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
427 unittests/cli-utils-selftests.c
428 * unittests/cli-utils-selftests.c: New file.
430 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
432 * NEWS: Mention new commands. Mention change to 'thread apply'.
434 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
436 * thread.c (thr_try_catch_cmd): New function.
437 (thread_apply_all_command): Handle qcs flags.
438 (thread_apply_command): Handle qcs flags.
439 (taas_command): New function.
440 (tfaas_command): New function.
441 (_initialize_thread): Update to setup the new commands 'taas
442 and 'tfaas'. Change doc string for 'thread apply'.
444 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
446 * stack.c: (trailing_outermost_frame): New function, mostly
447 extracted from backtrace_command_1.
448 (leading_innermost_frame): New function.
449 (backtrace_command_1): Update to call trailing_outermost_frame.
450 (frame_apply_command_count): New function.
451 (frame_apply_level_command): New function.
452 (frame_apply_all_command): New function.
453 (frame_apply_command): New function.
454 (faas_command): New function.
455 (frame_cmd_list): New variable.
456 (_initialize_stack): Update to setup the new commands 'frame apply'
459 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
461 * cli-utils.c (number_or_range_parser::get_number): Only handle
462 numbers or convenience var as numbers.
463 (parse_flags): New function.
464 (parse_flags_qcs): New function.
465 (number_or_range_parser::finished): Ensure parsing end is detected
466 before end of string.
467 * cli-utils.h (parse_flags): New function.
468 (parse_flags_qcs): New function.
469 (number_or_range_parser): Remove m_finished bool.
470 (number_or_range_parser::skip_range): Set m_in_range to false.
472 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
474 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
477 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
478 Jan Kratochvil <jan.kratochvil@redhat.com>
479 Paul Fertser <fercerpav@gmail.com>
480 Tsutomu Seki <sekiriki@gmail.com>
481 Pedro Alves <palves@redhat.com>
483 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
484 'unittests/parse-connection-spec-selftests.c'.
485 (COMMON_SFILES): Add 'common/netstuff.c'.
486 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
487 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
488 * common/netstuff.c: New file.
489 * common/netstuff.h: New file.
490 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
491 (wait_for_connect): Update comment. New parameter
492 'gdb::optional<int> sock' instead of 'struct serial *scb'.
493 Use 'sock' directly instead of 'scb->fd'.
494 (try_connect): New function, with code from 'net_open'.
495 (net_open): Rewrite main loop to deal with multiple
496 sockets/addresses. Handle IPv6-style hostnames; implement
497 support for IPv6 connections.
498 * unittests/parse-connection-spec-selftests.c: New file.
500 2018-07-11 Pedro Alves <palves@redhat.com>
503 * remote.c (remote_target::remote_detach_pid): Call
506 2018-07-11 Pedro Alves <palves@redhat.com>
508 * h8300-tdep.c (h8300_gdbarch_init): Remove
509 set_gdbarch_ecoff_reg_to_regnum calls.
511 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
514 * c-typeprint.c (c_type_print_base_struct_union): Don't print
515 offsets/sizes for static members of a class/struct.
517 2018-07-11 Alan Hayward <alan.hayward@arm.com>
519 * target-descriptions.c (tdesc_register_bitsize): Rename.
520 * target-descriptions.h (tdesc_register_bitsize): Likewise.
521 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
522 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
524 2018-07-10 Tom Tromey <tom@tromey.com>
526 * breakpoint.c (moribund_locations): Now static and a
528 (breakpoint_init_inferior, moribund_breakpoint_here_p)
529 (build_bpstat_chain, update_global_location_list)
530 (breakpoint_retire_moribund): Update.
531 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
534 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
536 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
537 (riscv_register_reggroup_p): Use new function, remove unneeded
539 (riscv_push_dummy_call): Extend assert to compare against xlen or
540 flen based on register type.
542 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
544 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
546 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
548 * remote.c (show_hardware_watchpoint_limit): New function.
549 (show_hardware_watchpoint_length_limit): New function.
550 (show_hardware_breakpoint_limit): New function.
551 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
552 where appropriate, update help text.
554 2018-07-09 Tom Tromey <tom@tromey.com>
556 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
557 (CLIBS): Don't mention NAT_CLIBS.
559 2018-07-09 Tom Tromey <tom@tromey.com>
561 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
562 (LIBGDB_OBS, clean mostlyclean): Update.
563 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
565 2018-07-09 Tom Tromey <tom@tromey.com>
567 * Makefile.in (%.c: %.y): Use ECHO_YACC.
568 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
569 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
571 2018-07-09 Tom Tromey <tom@tromey.com>
573 * Makefile.in (ALLDEPFILES): Remove exec.c.
574 (COMMON_OBS): Remove exec.o.
575 (COMMON_SFILES): Add exec.c.
577 2018-07-09 Tom Tromey <tom@tromey.com>
579 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
581 2018-07-09 Tom Tromey <tom@tromey.com>
583 * Makefile.in (clean mostlyclean): Remove stamp-version.
584 (version.c): Depend on stamp-version.
585 (stamp-version): New rule, from version.c rule.
587 2018-07-09 Tom Tromey <tom@tromey.com>
589 * Makefile.in (init.c): Depend on stamp-init.
590 (stamp-init): New rule, from init.c rule.
591 (clean mostlyclean): Remove stamp-init.
593 2018-07-09 Tom Tromey <tom@tromey.com>
595 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
596 SUBDIR_GCC_COMPILE_SRCS.
598 2018-07-09 Tom Tromey <tom@tromey.com>
600 * Makefile.in (init.c): Remove some unused sed rules.
602 2018-07-09 Tom Tromey <tom@tromey.com>
604 * Makefile.in (TSOBS): Remove.
605 (INIT_FILES): Update.
606 (LIBGDB_OBS): Update.
607 (COMMON_SFILES): Add inflow.c.
608 (SFILES): Remove inflow.c.
610 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
612 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
614 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
616 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
617 get_saveloc_name, is_signal_frame_name, step_name,
618 init_remote_name, create_addr_space_name,
619 destroy_addr_space_name, search_unwind_table_name,
620 find_dyn_list_name): Constify.
622 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
624 * darwin-nat.c (darwin_pthread_kill): New function.
625 (darwin_resume_thread): Use darwin_pthread_kill.
627 2018-07-05 Tom de Vries <tdevries@suse.de>
629 * macroexp.c (macro_buffer) <operator=>: New member function.
631 2018-07-04 Tom Tromey <tom@tromey.com>
633 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
635 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
637 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
638 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
642 2018-07-04 Joel Brobecker <brobecker@adacore.com>
644 * NEWS: Create a new section for the next release branch.
645 Rename the section of the current branch, now that it has
648 2018-07-04 Joel Brobecker <brobecker@adacore.com>
650 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
651 * version.in: Bump version to 8.2.50.DATE-git.
653 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
654 Pedro Alves <palves@redhat.com>
656 * linux-nat.c (linux_init_ptrace): Rename to ...
657 (linux_init_ptrace_procfs): ... this. Call
658 linux_proc_init_warnings.
659 (linux_nat_target::post_attach)
660 (linux_nat_target::post_startup_inferior): Adjust.
661 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
662 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
664 2018-07-04 Tom de Vries <tdevries@suse.de>
666 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
668 (read_comp_unit_head): ... here.
670 2018-07-03 Tom Tromey <tom@tromey.com>
672 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
673 (stop_tracing, tstatus_command)
674 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
675 (print_one_static_tracepoint_marker): Update.
676 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
678 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
680 (all_tracepoints, static_tracepoints_here): Return std::vector.
682 2018-07-03 Tom Tromey <tom@tromey.com>
684 * common/ptid.c (ptid_equal): Remove.
685 * common/ptid.h (ptid_equal): Don't declare.
686 * ada-tasks.c: Update.
687 * breakpoint.c: Update.
688 * common/agent.c: Update.
690 * darwin-nat-info.c: Update.
691 * darwin-nat.c: Update.
693 * dtrace-probe.c: Update.
694 * dummy-frame.c: Update.
695 * fbsd-nat.c: Update.
697 * gdbthread.h: Update.
699 * go32-nat.c: Update.
700 * inf-loop.c: Update.
701 * inf-ptrace.c: Update.
706 * linux-fork.c: Update.
707 * linux-nat.c: Update.
708 * linux-thread-db.c: Update.
709 * mi/mi-cmd-var.c: Update.
710 * mi/mi-interp.c: Update.
711 * mi/mi-main.c: Update.
712 * nto-procfs.c: Update.
713 * ppc-linux-tdep.c: Update.
715 * python/py-inferior.c: Update.
716 * python/py-record-btrace.c: Update.
717 * python/py-record.c: Update.
718 * ravenscar-thread.c: Update.
719 * regcache.c: Update.
720 * remote-sim.c: Update.
722 * sol-thread.c: Update.
725 * tui/tui-stack.c: Update.
727 * windows-nat.c: Update.
728 * windows-tdep.c: Update.
730 2018-07-03 Tom Tromey <tom@tromey.com>
732 * common/ptid.c (ptid_match): Remove.
733 * common/ptid.h (ptid_match): Don't declare.
734 * fbsd-nat.c: Update.
737 * linux-nat.c: Update.
738 * record-btrace.c: Update.
739 * regcache.c: Update.
742 2018-07-03 Tom Tromey <tom@tromey.com>
744 * common/ptid.c (ptid_tid_p): Remove.
745 * common/ptid.h (ptid_tid_p): Don't declare.
746 * sol-thread.c: Update.
748 2018-07-03 Tom Tromey <tom@tromey.com>
750 * common/ptid.c (ptid_lwp_p): Remove.
751 * common/ptid.h (ptid_lwp_p): Don't declare.
752 * fbsd-nat.c: Update.
753 * linux-nat.c: Update.
754 * nat/linux-procfs.c: Update.
755 * nat/x86-linux-dregs.c: Update.
756 * sol-thread.c: Update.
758 2018-07-03 Tom Tromey <tom@tromey.com>
760 * common/ptid.c (ptid_is_pid): Remove.
761 * common/ptid.h (ptid_is_pid): Don't declare.
763 * linux-nat.c: Update.
764 * mi/mi-interp.c: Update.
768 2018-07-03 Tom Tromey <tom@tromey.com>
770 * common/ptid.c (ptid_get_tid): Remove.
771 * common/ptid.h (ptid_get_tid): Don't declare.
772 * ada-tasks.c: Update.
773 * aix-thread.c: Update.
774 * bsd-uthread.c: Update.
775 * darwin-nat.c: Update.
776 * fbsd-nat.c: Update.
777 * i386-darwin-nat.c: Update.
779 * linux-tdep.c: Update.
780 * nto-procfs.c: Update.
781 * ppc-ravenscar-thread.c: Update.
782 * python/py-infthread.c: Update.
783 * ravenscar-thread.c: Update.
784 * sol-thread.c: Update.
785 * sparc-ravenscar-thread.c: Update.
786 * windows-nat.c: Update.
788 2018-07-03 Tom Tromey <tom@tromey.com>
790 * common/ptid.c (ptid_get_lwp): Remove.
791 * common/ptid.h (ptid_get_lwp): Don't declare.
792 * aarch64-linux-nat.c: Update.
793 * ada-tasks.c: Update.
794 * aix-thread.c: Update.
795 * amd64-linux-nat.c: Update.
796 * arm-linux-nat.c: Update.
798 * fbsd-nat.c: Update.
799 * fbsd-tdep.c: Update.
801 * i386-cygwin-tdep.c: Update.
802 * i386-gnu-nat.c: Update.
803 * i386-linux-nat.c: Update.
804 * ia64-linux-nat.c: Update.
805 * inf-ptrace.c: Update.
807 * linux-fork.c: Update.
808 * linux-nat.c: Update.
809 * linux-tdep.c: Update.
810 * linux-thread-db.c: Update.
811 * mips-linux-nat.c: Update.
812 * nat/aarch64-linux-hw-point.c: Update.
813 * nat/aarch64-linux.c: Update.
814 * nat/linux-btrace.c: Update.
815 * nat/linux-osdata.c: Update.
816 * nat/linux-procfs.c: Update.
817 * nat/x86-linux-dregs.c: Update.
818 * obsd-nat.c: Update.
819 * ppc-fbsd-nat.c: Update.
820 * ppc-linux-nat.c: Update.
822 * python/py-infthread.c: Update.
823 * ravenscar-thread.c: Update.
825 * s390-linux-nat.c: Update.
826 * sol-thread.c: Update.
827 * sol2-tdep.c: Update.
828 * spu-linux-nat.c: Update.
829 * x86-linux-nat.c: Update.
830 * xtensa-linux-nat.c: Update.
832 2018-07-03 Tom Tromey <tom@tromey.com>
834 * common/ptid.c (ptid_get_pid): Remove.
835 * common/ptid.h (ptid_get_pid): Don't declare.
836 * aarch64-linux-nat.c: Update.
837 * ada-lang.c: Update.
838 * aix-thread.c: Update.
839 * alpha-bsd-nat.c: Update.
840 * amd64-fbsd-nat.c: Update.
841 * amd64-linux-nat.c: Update.
842 * arm-linux-nat.c: Update.
843 * arm-nbsd-nat.c: Update.
845 * break-catch-syscall.c: Update.
846 * breakpoint.c: Update.
847 * bsd-uthread.c: Update.
850 * darwin-nat.c: Update.
851 * fbsd-nat.c: Update.
852 * fbsd-tdep.c: Update.
855 * hppa-nbsd-nat.c: Update.
856 * hppa-obsd-nat.c: Update.
857 * i386-fbsd-nat.c: Update.
858 * ia64-linux-nat.c: Update.
859 * inf-ptrace.c: Update.
861 * inferior.c: Update.
862 * inferior.h: Update.
865 * linux-fork.c: Update.
866 * linux-nat.c: Update.
867 * linux-tdep.c: Update.
868 * linux-thread-db.c: Update.
869 * m68k-bsd-nat.c: Update.
870 * mi/mi-interp.c: Update.
871 * mi/mi-main.c: Update.
872 * mips-linux-nat.c: Update.
873 * mips-nbsd-nat.c: Update.
874 * mips64-obsd-nat.c: Update.
875 * nat/aarch64-linux-hw-point.c: Update.
876 * nat/aarch64-linux.c: Update.
877 * nat/linux-btrace.c: Update.
878 * nat/linux-osdata.c: Update.
879 * nat/linux-procfs.c: Update.
880 * nat/x86-linux-dregs.c: Update.
881 * nto-procfs.c: Update.
882 * obsd-nat.c: Update.
883 * ppc-linux-nat.c: Update.
884 * ppc-nbsd-nat.c: Update.
885 * ppc-obsd-nat.c: Update.
886 * proc-service.c: Update.
888 * python/py-inferior.c: Update.
889 * python/py-infthread.c: Update.
890 * ravenscar-thread.c: Update.
892 * remote-sim.c: Update.
894 * rs6000-nat.c: Update.
895 * s390-linux-nat.c: Update.
896 * sh-nbsd-nat.c: Update.
897 * sol-thread.c: Update.
898 * sparc-nat.c: Update.
899 * sparc64-tdep.c: Update.
900 * spu-linux-nat.c: Update.
901 * spu-tdep.c: Update.
902 * target-debug.h: Update.
905 * tid-parse.c: Update.
906 * tracefile-tfile.c: Update.
907 * vax-bsd-nat.c: Update.
908 * windows-nat.c: Update.
909 * x86-linux-nat.c: Update.
912 2018-07-03 Tom Tromey <tom@tromey.com>
914 * common/ptid.c (pid_to_ptid): Remove.
915 * common/ptid.h (pid_to_ptid): Don't declare.
916 * aix-thread.c: Update.
917 * arm-linux-nat.c: Update.
918 * common/ptid.c: Update.
919 * common/ptid.h: Update.
922 * darwin-nat.c: Update.
923 * fbsd-nat.c: Update.
924 * fork-child.c: Update.
926 * go32-nat.c: Update.
927 * inf-ptrace.c: Update.
929 * inferior.c: Update.
931 * linux-fork.c: Update.
932 * linux-nat.c: Update.
933 * nat/aarch64-linux-hw-point.c: Update.
934 * nat/fork-inferior.c: Update.
935 * nat/x86-linux-dregs.c: Update.
936 * nto-procfs.c: Update.
937 * obsd-nat.c: Update.
939 * progspace.c: Update.
941 * rs6000-nat.c: Update.
942 * s390-linux-nat.c: Update.
943 * sol-thread.c: Update.
944 * spu-linux-nat.c: Update.
947 * tracefile-tfile.c: Update.
948 * windows-nat.c: Update.
950 2018-07-03 Tom Tromey <tom@tromey.com>
952 * common/ptid.h (ptid_build): Don't declare.
953 * common/ptid.c (ptid_build): Remove.
954 * aix-thread.c: Update.
956 * bsd-uthread.c: Update.
957 * common/agent.c: Update.
958 * common/ptid.c: Update.
959 * common/ptid.h: Update.
961 * darwin-nat.c: Update.
962 * fbsd-nat.c: Update.
964 * linux-fork.c: Update.
965 * linux-nat.c: Update.
966 * linux-thread-db.c: Update.
967 * nat/linux-osdata.c: Update.
968 * nat/linux-procfs.c: Update.
969 * nto-procfs.c: Update.
970 * obsd-nat.c: Update.
971 * proc-service.c: Update.
973 * ravenscar-thread.c: Update.
974 * remote-sim.c: Update.
976 * sol-thread.c: Update.
978 * windows-nat.c: Update.
980 2018-07-03 Tom Tromey <tom@tromey.com>
982 * infrun.c (follow_exec): Use exit_inferior_silent.
983 * inferior.c (exit_inferior_num_silent): Remove.
984 * inferior.h (exit_inferior_num_silent): Don't declare.
986 2018-07-03 Tom Tromey <tom@tromey.com>
989 * darwin-nat.c (darwin_attach_pid): Reset inferior and
990 inferior_ptid on error.
992 2018-07-02 Maciej W. Rozycki <macro@mips.com>
993 Simon Marchi <simon.marchi@polymtl.ca>
996 * disasm.h (gdb_disassembler): Add
997 `m_disassembler_options_holder'. member
998 * disasm.c (get_all_disassembler_options): New function.
999 (gdb_disassembler::gdb_disassembler): Use it.
1000 (gdb_buffered_insn_length_init_dis): Likewise.
1001 (gdb_buffered_insn_length): Adjust accordingly.
1002 (set_disassembler_options): Handle options with arguments.
1003 (show_disassembler_options_sfunc): Likewise. Add a leading new
1004 line if showing options with descriptions.
1005 (disassembler_options_completer): Adapt to using the
1006 `disasm_options_and_args_t' structure.
1007 * mips-tdep.c (mips_disassembler_options): New variable.
1008 (mips_disassembler_options_o32): Likewise.
1009 (mips_disassembler_options_n32): Likewise.
1010 (mips_disassembler_options_n64): Likewise.
1011 (gdb_print_insn_mips): Don't set `disassembler_options'.
1012 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1014 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1015 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1016 `gdbarch_disassembler_options_implicit' and
1017 `gdbarch_valid_disassembler_options'.
1018 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1019 `disasm_options_and_args_t' structure.
1020 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1022 (valid_disassembler_options): Switch from `disasm_options_t' to
1023 the `disasm_options_and_args_t' structure.
1024 * NEWS: Document `set disassembler-options' support for the MIPS
1026 * gdbarch.h: Regenerate.
1027 * gdbarch.c: Regenerate.
1029 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1031 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1033 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1035 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1036 parameter in call to amd64_target_description.
1037 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1038 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1039 (amd64fbsd_init_abi): Likewise.
1040 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1041 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1042 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1043 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1045 2018-06-29 Pedro Alves <palves@redhat.com>
1047 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1048 "segments" parameter.
1049 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1050 (_initialize_amd64_tdep): Update call to
1051 amd64_create_target_description.
1052 (amd64_target_description): Add "segments" parameter. Adjust
1053 the implementation to use it.
1054 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1055 call to amd64_create_target_description.
1056 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1057 * gdb/arch/amd64.h (amd64_create_target_description): Add
1058 "segments" register.
1059 * gdb/arch/amd64.c (amd64_create_target_description): Add
1060 "segments" parameter. Call create_feature_i386_64bit_segments
1061 only if SEGMENTS is true.
1062 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1063 call to amd64_create_target_description.
1065 2018-06-29 Pedro Alves <palves@redhat.com>
1067 * thread.c (thread_target_id_str): New, factored out from ...
1068 (print_thread_info_1): ... here. Use it to compute the max
1069 "Target Id" column width.
1071 2018-06-29 Pedro Alves <palves@redhat.com>
1073 * remote.c (remote_target::extra_thread_info): Delete
1074 'display_buf' and 'n' locals. from the cache, regardless of
1075 packet mechanims is in use. Use cache for qThreadExtra and qP
1078 2018-06-29 Pedro Alves <palves@redhat.com>
1080 * blockframe.c (find_pc_sect_containing_function): New function.
1081 * breakpoint.c (print_breakpoint_location): Don't call
1082 find_pc_sect_function.
1083 * linespec.c (create_sals_line_offset): Record the location's
1085 * linespec.c (convert_address_location_to_sals): Fill in sal's
1086 symbol with find_pc_sect_containing_function.
1087 * symtab.c (find_function_start_sal): Rename to ...
1088 (find_function_start_sal_1): ... this.
1089 (find_function_start_sal): Reimplement as wrapper around
1090 find_function_start_sal_1, and use
1091 find_pc_sect_containing_function to fill in the sal's symbol.
1092 (find_function_start_sal(symbol*, bool)): Adjust.
1093 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1095 (find_pc_sect_containing_function): Declare.
1097 2018-06-29 Pedro Alves <palves@redhat.com>
1099 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1100 true if the the location has no symbol.
1102 2018-06-28 Tom Tromey <tom@tromey.com>
1104 * NEWS: Mention --enable-codesign.
1105 * silent-rules.mk (ECHO_SIGN): New variable.
1106 * configure.ac: Add --enable-codesign.
1107 * configure: Rebuild.
1108 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1109 (gdb$(EXEEXT)): Optionally invoke codesign.
1111 2018-06-28 Pedro Alves <palves@redhat.com>
1113 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1115 (switch_to_thread_no_regs): Adjust comment.
1116 * infcmd.c (stop_pc): Delete.
1117 (post_create_inferior, info_program_command): Replace references
1118 to stop_pc with references to thread_info->suspend.stop_pc.
1119 * inferior.h (stop_pc): Delete declaration.
1120 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1121 (handle_inferior_event_1, handle_signal_stop)
1122 (process_event_stop_test, keep_going_stepped_thread)
1123 (handle_step_into_function, handle_step_into_function_backward)
1124 (print_stop_location): Replace references to stop_pc with
1125 references to thread_info->suspend.stop_pc.
1126 (struct infcall_suspend_state) <stop_pc>: Delete field.
1127 (save_infcall_suspend_state, restore_infcall_suspend_state):
1128 Remove references to inf_stat->stop_pc.
1129 * linux-fork.c (fork_load_infrun_state): Likewise.
1130 * record-btrace.c (record_btrace_set_replay): Likewise.
1131 * record-full.c (record_full_goto_entry): Likewise.
1132 * remote.c (print_one_stopped_thread): Likewise.
1133 * target.c (target_resume): Extend comment.
1134 * thread.c (set_executing_thread): New.
1135 (set_executing): Use it.
1136 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1137 Remove references to stop_pc.
1139 2018-06-28 Pedro Alves <palves@redhat.com>
1141 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1142 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1144 2018-06-28 Tom Tromey <tom@tromey.com>
1146 * coffread.c (coff_symfile_finish): Update.
1147 * xcoffread.c (xcoff_symfile_finish): Update.
1148 * elfread.c (elf_symfile_finish): Update.
1149 * symfile.h (dwarf2_free_objfile): Don't declare.
1150 * dwarf2read.c (_initialize_dwarf2_read): Use
1151 register_objfile_data_with_cleanup.
1152 (dwarf2_free_objfile): Now static. Change signature.
1154 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1156 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1157 option "-o" to add-symbol-file-load to add an offset to each
1158 section's load address.
1159 * symfile.c (set_objfile_default_section_offset): New function.
1161 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1163 * symfile.c (add_symbol_file_command): Make sure that sections
1164 with the same name are sorted in the same order.
1166 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1168 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1169 require the second argument. If omitted, load sections at the
1170 addresses specified in the file.
1172 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1174 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1175 (_initialize_symfile): Add option "-o" to symbol-file to add an
1176 offset to each section of the symbol file.
1178 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1180 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1182 2018-06-27 Tom Tromey <tom@tromey.com>
1184 * stack.c (_initialize_stack): Update "func" help text.
1186 2018-06-27 Tom Tromey <tom@tromey.com>
1188 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1190 (unwind_infopy_str, pyuw_create_unwind_info)
1191 (unwind_infopy_add_saved_register, pyuw_sniffer)
1192 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1194 (struct saved_reg): Add constructor.
1195 <value>: Now a gdbpy_ref<>.
1197 2018-06-27 Tom Tromey <tom@tromey.com>
1199 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1201 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1203 * gdb-gdb.py.in: Format using autopep8.
1205 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1207 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1208 (type_lookup_function): Recognize CORE_ADDR values.
1210 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1212 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1215 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1217 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1220 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1222 * gdb-gdb.py: Move to...
1223 * gdb-gdb.py.in: ... here.
1224 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1225 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1227 (distclean): Remove gdb-gdb.py when cleaning.
1228 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1229 * configure: Re-generate.
1231 2018-06-27 Pedro Alves <palves@redhat.com>
1233 * proc-service.c (get_ps_regcache): New.
1234 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1235 (ps_lsetfpregs): Use it.
1237 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1240 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1241 (dwarf_decode_lines_1): Adjust.
1243 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1245 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1247 <info_proc>: Likewise.
1249 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1251 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1252 to windows_fetch_one_register, and only handle the case of
1253 fetching one register. Move the code that reloads the context
1254 and iterates over all registers if R is negative to...
1255 (windows_nat_target::fetch_registers): ... here.
1256 (do_windows_store_inferior_registers): Rename to
1257 windows_store_one_register, and only handle the case of storing
1258 one register. Move the code that handles the case where r is
1260 (windows_nat_target::store_registers) ... here.
1262 2018-06-26 Tom Tromey <tom@tromey.com>
1265 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1266 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1268 (rust_internal_print_type): Add podata parameter.
1269 (rust_print_type): Update.
1271 2018-06-26 Tom Tromey <tom@tromey.com>
1273 * typeprint.h (struct print_offset_data) <update, finish,
1274 maybe_print_hole>: New methods.
1275 <indentation>: New constant.
1276 * typeprint.c (print_offset_data::indentation): Define.
1277 (print_offset_data::maybe_print_hole, print_offset_data::update)
1278 (print_offset_data::finish): Move from c-typeprint.c and rename.
1279 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1280 (print_spaces_filtered_with_print_options): Update.
1281 (c_print_type_union_field_offset, maybe_print_hole)
1282 (c_print_type_struct_field_offset): Move to typeprint.c and
1284 (c_type_print_base_struct_union): Update.
1286 2018-06-25 Pedro Alves <palves@redhat.com>
1288 * gdbthread.h (thread_info_ref, delete_thread)
1289 (delete_thread_silent, first_thread_of_inferior)
1290 (any_thread_of_inferior, switch_to_thread)
1291 (enable_thread_stack_temporaries)
1292 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1293 (get_last_thread_stack_temporary)
1294 (value_in_thread_stack_temporaries, can_access_registers_thread):
1295 Spell out "struct thread_info" instead of just "thread_info".
1296 * inferior.h (notice_new_inferior): Likewise.
1298 2018-06-25 Pedro Alves <palves@redhat.com>
1300 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1301 pass thread_info pointer to delete_thread.
1302 (windows_nat_target::detach): Pass inferior pointer to
1304 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1306 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1307 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1308 and pass a thread_info pointer to delete_thread.
1309 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1310 pass thread_info pointer to delete_thread.
1311 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1312 delete_thread_silent call.
1313 * procfs.c (procfs_target::detach): Pass inferior pointer to
1315 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1316 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1317 delete_thread_silent call.
1318 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1319 pass thread_info pointer to delete_thread.
1320 (windows_nat_target::detach): Pass inferior pointer to
1323 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1325 * regcache.c (readable_regcache::read_part): Fix asserts.
1326 (reg_buffer::raw_collect_part): New function.
1327 (regcache::write_part): Fix asserts.
1328 (reg_buffer::raw_supply_part): New function.
1329 (regcache::transfer_regset_register): New helper function.
1330 (regcache::transfer_regset): Call new functions.
1331 (regcache_supply_regset): Use gdb_byte*.
1332 (regcache::supply_regset): Likewise.
1333 (regcache_collect_regset): Likewise.
1334 (regcache::collect_regset): Likewise.
1335 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1336 (reg_buffer::raw_supply_part): Likewise.
1337 (regcache::transfer_regset_register): Likewise.
1338 (regcache::transfer_regset): Use gdb_byte*.
1340 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1342 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1344 2018-06-21 Pedro Alves <palves@redhat.com>
1346 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1347 instead of a ptid_t. All callers adjusted.
1348 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1350 (print_ada_task_info, display_current_task_id, task_command_1):
1352 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1354 (breakpoint_kind): Adjust.
1355 (remove_breakpoints_pid): Rename to ...
1356 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1357 pointer. All callers adjusted.
1358 (bpstat_clear_actions): Use inferior_thread.
1359 (get_bpstat_thread): New.
1360 (bpstat_do_actions): Use it.
1361 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1362 to take a thread_info pointer. All callers adjusted.
1363 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1364 (breakpoint_re_set_thread): Use inferior_thread.
1365 * breakpoint.h (struct inferior): Forward declare.
1366 (bpstat_stop_status): Update.
1367 (remove_breakpoints_pid): Delete.
1368 (remove_breakpoints_inf): New.
1369 * bsd-uthread.c (bsd_uthread_target::wait)
1370 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1371 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1372 (maint_btrace_packet_history_cmd)
1373 (maint_btrace_clear_packet_history_cmd): Adjust.
1374 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1376 * cli/cli-interp.c: Include "inferior.h".
1377 * common/refcounted-object.h (struct
1378 refcounted_object_ref_policy): New.
1379 * compile/compile-object-load.c: Include gdbthread.h.
1380 (store_regs): Use inferior_thread.
1381 * corelow.c (core_target::close): Use current_inferior.
1382 (core_target_open): Adjust to use first_thread_of_inferior and use
1383 the current inferior.
1384 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1385 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1386 <thread>: ... this new field. All references adjusted.
1387 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1388 Take a thread_info pointer instead of a ptid_t.
1389 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1390 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1391 thread_info pointer instead of a ptid_t.
1392 * elfread.c: Include "inferior.h".
1393 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1394 Use inferior_thread.
1395 * eval.c (evaluate_subexp): Likewise.
1396 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1398 * gdb_proc_service.h (struct thread_info): Forward declare.
1399 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1400 <thread>: ... this new field. All references adjusted.
1401 * gdbarch.h, gdbarch.c: Regenerate.
1402 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1403 'thread' parameter. All implementations and callers adjusted.
1404 * gdbthread.h (thread_info) <set_running>: New method.
1405 (delete_thread, delete_thread_silent): Take a thread_info pointer
1407 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1408 (first_thread_of_process): Delete, replaced by ...
1409 (first_thread_of_inferior): ... this new function. All callers
1411 (any_live_thread_of_process): Delete, replaced by ...
1412 (any_live_thread_of_inferior): ... this new function. All callers
1414 (switch_to_thread, switch_to_no_thread): Declare.
1415 (is_executing): Delete.
1416 (enable_thread_stack_temporaries): Update comment.
1417 <enable_thread_stack_temporaries>: Take a thread_info pointer
1418 instead of a ptid_t. Incref the thread.
1419 <~enable_thread_stack_temporaries>: Decref the thread.
1422 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1423 (get_last_thread_stack_temporary)
1424 (value_in_thread_stack_temporaries, can_access_registers_thread):
1425 Take a thread_info pointer instead of a ptid_t. All callers
1427 * infcall.c (get_call_return_value): Use inferior_thread.
1428 (run_inferior_call): Work with thread pointers instead of ptid_t.
1429 (call_function_by_hand_dummy): Work with thread pointers instead
1430 of ptid_t. Use thread_info_ref.
1431 * infcmd.c (proceed_thread_callback): Access thread's state
1433 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1434 access thread's state directly.
1435 (continue_command): Use inferior_thread.
1436 (info_program_command): Use find_thread_ptid and access thread
1438 (proceed_after_attach_callback): Use thread state directly.
1439 (notice_new_inferior): Take a thread_info pointer instead of a
1440 ptid_t. All callers adjusted.
1441 (exit_inferior): Take an inferior pointer instead of a pid. All
1443 (exit_inferior_silent): New.
1444 (detach_inferior): Delete.
1445 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1446 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1447 (detach_inferior_command, kill_inferior_command): Use
1448 find_inferior_id instead of valid_gdb_inferior_id and
1449 gdb_inferior_id_to_pid.
1450 (inferior_command): Use inferior and thread pointers.
1451 * inferior.h (struct thread_info): Forward declare.
1452 (notice_new_inferior): Take a thread_info pointer instead of a
1453 ptid_t. All callers adjusted.
1454 (detach_inferior): Delete declaration.
1455 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1456 instead of a pid. All callers adjusted.
1457 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1458 (valid_gdb_inferior_id): Delete.
1459 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1460 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1461 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1463 <inf>: ... this new field.
1464 <step_ptid>: Delete, replaced by ...
1465 <step_thread>: ... this new field.
1466 (get_displaced_stepping_state): Take an inferior pointer instead
1467 of a pid. All callers adjusted.
1468 (displaced_step_in_progress_any_inferior): Adjust.
1469 (displaced_step_in_progress_thread): Take a thread pointer instead
1470 of a ptid_t. All callers adjusted.
1471 (displaced_step_in_progress, add_displaced_stepping_state): Take
1472 an inferior pointer instead of a pid. All callers adjusted.
1473 (get_displaced_step_closure_by_addr): Adjust.
1474 (remove_displaced_stepping_state): Take an inferior pointer
1475 instead of a pid. All callers adjusted.
1476 (displaced_step_prepare_throw, displaced_step_prepare)
1477 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1478 All callers adjusted.
1479 (start_step_over): Adjust.
1480 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1481 displaced step queue.
1482 (do_target_resume): Adjust.
1483 (fetch_inferior_event): Use inferior_thread.
1484 (context_switch, get_inferior_stop_soon): Take an
1485 execution_control_state pointer instead of a ptid_t. All callers
1487 (switch_to_thread_cleanup): Delete.
1488 (stop_all_threads): Use scoped_restore_current_thread.
1489 * inline-frame.c: Include "gdbthread.h".
1490 (inline_state) <inline_state>: Take a thread pointer instead of a
1491 ptid_t. All callers adjusted.
1492 <ptid>: Delete, replaced by ...
1493 <thread>: ... this new field.
1494 (find_inline_frame_state): Take a thread pointer instead of a
1495 ptid_t. All callers adjusted.
1496 (skip_inline_frames, step_into_inline_frame)
1497 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1498 pointer instead of a ptid_t. All callers adjusted.
1499 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1500 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1501 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1503 * linux-nat.c (get_detach_signal): Likewise.
1504 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1505 (thread_db_notice_clone): Adjust.
1506 (thread_db_find_new_threads_silently)
1507 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1508 a thread pointer instead of a ptid_t. All callers adjusted.
1509 * mi/mi-cmd-var.c: Include "inferior.h".
1510 (mi_cmd_var_update_iter): Update to use thread pointers.
1511 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1513 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1515 (mi_output_running): ... this new function.
1516 (mi_on_resume_1): Adjust to use it.
1517 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1518 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1520 (interrupt_thread_callback): : Adjust to use thread and inferior
1522 * proc-service.c: Include "gdbthread.h".
1523 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1524 * progspace-and-thread.c: Include "inferior.h".
1525 * progspace.c: Include "inferior.h".
1526 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1527 hold a reference to an inferior_object.
1528 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1530 * python/py-inferior.c (struct inferior_object): Give the type a
1531 tag name instead of a typedef.
1532 (python_on_normal_stop): No need to check if the current thread is
1534 (inferior_to_inferior_object): Change return type to
1535 inferior_object. All callers adjusted.
1536 (find_thread_object): Delete, bits factored out to ...
1537 (thread_to_thread_object): ... this new function.
1538 * python/py-infthread.c (create_thread_object): Use
1539 inferior_to_inferior_object.
1540 (thpy_is_stopped): Use thread pointer directly.
1541 (gdbpy_selected_thread): Use inferior_thread.
1542 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1543 field, replaced with ...
1544 <thread>: ... this new field. All users adjusted.
1545 (btpy_insn_or_gap_new): Drop const.
1546 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1548 * python/py-record.c: Include "gdbthread.h".
1549 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1550 a ptid_t. All callers adjusted.
1551 (gdbpy_current_recording): Use inferior_thread.
1552 * python/py-record.h (recpy_record_object) <ptid>: Delete
1553 field, replaced with ...
1554 <thread>: ... this new field. All users adjusted.
1555 (recpy_element_object) <ptid>: Delete
1556 field, replaced with ...
1557 <thread>: ... this new field. All users adjusted.
1558 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1559 a ptid_t. All callers adjusted.
1560 * python/py-threadevent.c: Include "gdbthread.h".
1561 (get_event_thread): Use thread_to_thread_object.
1562 * python/python-internal.h (struct inferior_object): Forward
1564 (find_thread_object, find_inferior_object): Delete declarations.
1565 (thread_to_thread_object, inferior_to_inferior_object): New
1567 * record-btrace.c: Include "inferior.h".
1568 (require_btrace_thread): Use inferior_thread.
1569 (record_btrace_frame_sniffer)
1570 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1571 (get_thread_current_frame): Use scoped_restore_current_thread and
1573 (get_thread_current_frame): Use thread pointer directly.
1574 (record_btrace_replay_at_breakpoint): Use thread's inferior
1576 * record-full.c: Include "inferior.h".
1577 * regcache.c: Include "gdbthread.h".
1578 (get_thread_arch_regcache): Use the inferior's address space
1580 (get_thread_regcache, registers_changed_thread): New.
1581 * regcache.h (get_thread_regcache(thread_info *thread)): New
1583 (registers_changed_thread): New.
1584 (remote_target) <remote_detach_1>: Swap order of parameters.
1585 (remote_add_thread): <remote_add_thread>: Return the new thread.
1586 (get_remote_thread_info(ptid_t)): New overload.
1587 (remote_target::remote_notice_new_inferior): Use thread pointers
1589 (remote_target::process_initial_stop_replies): Use
1590 thread_info::set_running.
1591 (remote_target::remote_detach_1, remote_target::detach)
1592 (extended_remote_target::detach): Adjust.
1593 * stack.c (frame_show_address): Use inferior_thread.
1594 * target-debug.h (target_debug_print_thread_info_pp): New.
1595 * target-delegates.c: Regenerate.
1596 * target.c (default_thread_address_space): Delete.
1597 (memory_xfer_partial_1): Use current_inferior.
1598 (target_detach): Use current_inferior.
1599 (target_thread_address_space): Delete.
1600 (generic_mourn_inferior): Use current_inferior.
1601 * target.h (struct target_ops) <thread_address_space>: Delete.
1602 (target_thread_address_space): Delete.
1603 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1605 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1606 thread pointer instead of a ptid_t. Adjust all callers.
1607 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1608 (first_thread_of_process): Delete, replaced by ...
1609 (first_thread_of_inferior): ... this new function. All callers
1611 (any_thread_of_process): Rename to ...
1612 (any_thread_of_inferior): ... this, and take an inferior pointer.
1613 (any_live_thread_of_process): Rename to ...
1614 (any_live_thread_of_inferior): ... this, and take an inferior
1616 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1617 (value_in_thread_stack_temporaries)
1618 (get_last_thread_stack_temporary): Take a thread pointer instead
1619 of a ptid_t. Adjust all callers.
1620 (thread_info::set_running): New.
1621 (validate_registers_access): Use inferior_thread.
1622 (can_access_registers_ptid): Rename to ...
1623 (can_access_registers_thread): ... this, and take a thread
1625 (print_thread_info_1): Adjust to compare thread pointers instead
1627 (switch_to_no_thread, switch_to_thread): Make extern.
1628 (scoped_restore_current_thread::~scoped_restore_current_thread):
1629 Use m_thread pointer directly.
1630 (scoped_restore_current_thread::scoped_restore_current_thread):
1631 Use inferior_thread.
1632 (thread_command): Use thread pointer directly.
1633 (thread_num_make_value_helper): Use inferior_thread.
1634 * top.c (execute_command): Use inferior_thread.
1635 * tui/tui-interp.c: Include "inferior.h".
1636 * varobj.c (varobj_create): Use inferior_thread.
1637 (value_of_root_1): Use find_thread_global_id instead of
1638 global_thread_id_to_ptid.
1640 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1642 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1644 (regcache::write_part): Likewise.
1645 (readable_regcache::cooked_read_part): Update comment.
1646 (readable_regcache::cooked_write_part): Likewise.
1647 * regcache.h: (readable_regcache::read_part): Likewise.
1648 (regcache::write_part): Likewise.
1650 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1651 Dirk Schubert <dirk.schubert@arm.com>
1653 * aarch64-linux-nat.c (post_attach): New.
1654 (aarch64_linux_nat_target::post_attach): Override post_attach to
1655 record the number of hardware debug registers.
1657 2018-06-20 Tom Tromey <tom@tromey.com>
1659 * python/py-param.c (add_setshow_generic): Make parameters const.
1660 (parmpy_init): Update.
1662 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1664 * regcache.h (regcache_cooked_read_ftype): Rename to...
1665 (register_read_ftype): ...this, change type to function_view.
1666 (class reg_buffer) <save>: Remove src parameter.
1667 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1668 parameter non-const in first overload. Remove src parameter in
1670 * regcache.c (do_cooked_read): Remove.
1671 (readonly_detached_regcache::readonly_detached_regcache): Make
1672 parameter non-const, adjust call to other constructor.
1673 (reg_buffer::save): Remove src parameter.
1674 * frame.c (do_frame_register_read): Remove.
1675 (frame_save_as_regcache): Use lambda function.
1676 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1677 parameter to ppu2spu_data *.
1678 (ppu2spu_sniffer): Use lambda function.
1680 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1682 * record-full.c (record_full_target::insert_breakpoint): Remove
1683 "struct" keyword, add const.
1685 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1687 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1688 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1689 * configure.ac: Remove AC_PREREQ, add missing quoting.
1690 * gnulib/configure.ac: Modernize usage of
1691 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1692 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1693 (AUTOMAKE_VERSION): Bump to 1.15.1.
1694 * configure: Re-generate.
1695 * config.in: Re-generate.
1696 * aclocal.m4: Re-generate.
1697 * gnulib/aclocal.m4: Re-generate.
1698 * gnulib/config.in: Re-generate.
1699 * gnulib/configure: Re-generate.
1700 * gnulib/import/Makefile.in: Re-generate.
1702 2018-06-19 Pedro Alves <palves@redhat.com>
1704 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1705 (lookup_minimal_symbol_by_pc_section): ... here with
1706 gdb_assert_not_reached added.
1708 2018-06-19 Pedro Alves <palves@redhat.com>
1710 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1711 parameter with a block parameter. Compare location's block symbol
1712 with the frame's block instead of addresses.
1713 (skip_inline_frames): Pass the current block instead of the
1714 frame's address. Break out as soon as we determine the frame
1715 should not be skipped.
1717 2018-06-18 Tom Tromey <tom@tromey.com>
1719 * solib-aix.c (solib_aix_get_section_offsets): Return
1721 (solib_aix_solib_create_inferior_hook): Update.
1723 2018-06-18 Tom Tromey <tom@tromey.com>
1725 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1727 2018-06-18 Tom Tromey <tom@tromey.com>
1729 * solib-frv.c (frv_relocate_main_executable): Use
1731 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1734 2018-06-18 Tom Tromey <tom@tromey.com>
1736 * objfiles.h (inhibit_section_map_updates): Update.
1737 (resume_section_map_updates, resume_section_map_updates_cleanup):
1739 * solib-svr4.c (svr4_handle_solib_event): Update.
1740 * objfiles.c (inhibit_section_map_updates): Return
1741 scoped_restore_tmpl<int>.
1742 (resume_section_map_updates, resume_section_map_updates_cleanup):
1745 2018-06-18 Tom Tromey <tom@tromey.com>
1747 * valprint.h (read_string): Update.
1748 * valprint.c (read_string): Change type of "buffer".
1749 (val_print_string): Update.
1750 * python/py-value.c (valpy_string): Update.
1751 * language.h (struct language_defn) <la_get_string>: Change
1753 (default_get_string, c_get_string): Update.
1754 * language.c (default_get_string): Change type of "buffer".
1755 * guile/scm-value.c (gdbscm_value_to_string): Update.
1756 * c-lang.c (c_get_string): Change type of "buffer".
1758 2018-06-18 Tom Tromey <tom@tromey.com>
1760 * ser-mingw.c (struct pipe_state_destroyer): New.
1761 (pipe_state_up): New typedef.
1762 (cleanup_pipe_state): Remove.
1763 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1765 2018-06-18 Tom Tromey <tom@tromey.com>
1767 * rust-lang.h (rust_yyerror): Don't declare.
1768 * rust-lang.c (rust_language_defn): Update.
1769 * rust-exp.y (yyerror): Now static.
1770 * parse.c (parse_exp_in_context_1): Update.
1771 * p-lang.h (p_yyerror): Don't declare.
1772 * p-lang.c (p_language_defn): Update.
1773 * p-exp.y (yyerror): Now static.
1774 * opencl-lang.c (opencl_language_defn): Update.
1775 * objc-lang.c (objc_language_defn): Update.
1776 * m2-lang.h (m2_yyerror): Don't declare.
1777 * m2-lang.c (m2_language_defn): Update.
1778 * m2-exp.y (yyerror): Now static.
1779 * language.h (struct language_defn) <la_error>: Remove.
1780 * language.c (unk_lang_error): Remove.
1781 (unknown_language_defn, auto_language_defn): Remove.
1782 * go-lang.h (go_yyerror): Don't declare.
1783 * go-lang.c (go_language_defn): Update.
1784 * go-exp.y (yyerror): Now static.
1785 * f-lang.h (f_yyerror): Don't declare.
1786 * f-lang.c (f_language_defn): Update.
1787 * f-exp.y (yyerror): Now static.
1788 * d-lang.h (d_yyerror): Don't declare.
1789 * d-lang.c (d_language_defn): Update.
1790 * d-exp.y (yyerror): Now static.
1791 * c-lang.h (c_yyerror): Don't declare.
1792 * c-lang.c (c_language_defn, cplus_language_defn)
1793 (asm_language_defn, minimal_language_defn): Update.
1794 * c-exp.y (yyerror): Now static.
1795 * ada-lang.h (ada_yyerror): Don't declare.
1796 * ada-lang.c (ada_language_defn): Update.
1797 * ada-exp.y (yyerror): Now static.
1799 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1801 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1802 (store_sveregs_to_thread): Likewise.
1803 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1804 (aarch64_linux_store_inferior_registers): Likewise.
1805 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1807 (aarch64_sve_regs_copy_to_regcache): Likewise.
1808 (aarch64_sve_regs_copy_from_regcache): Likewise.
1809 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1811 (aarch64_sve_regs_copy_to_regcache): Likewise.
1812 (aarch64_sve_regs_copy_from_regcache): Likewise.
1813 (sve_context): Structure from Linux headers.
1814 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1815 (SVE_SIG_ZREG_SIZE): Likewise.
1816 (SVE_SIG_PREG_SIZE): Likewise.
1817 (SVE_SIG_FFR_SIZE): Likewise.
1818 (SVE_SIG_REGS_OFFSET): Likewise.
1819 (SVE_SIG_ZREGS_OFFSET): Likewise.
1820 (SVE_SIG_ZREG_OFFSET): Likewise.
1821 (SVE_SIG_ZREGS_SIZE): Likewise.
1822 (SVE_SIG_PREGS_OFFSET): Likewise.
1823 (SVE_SIG_PREG_OFFSET): Likewise.
1824 (SVE_SIG_PREGS_SIZE): Likewise.
1825 (SVE_SIG_FFR_OFFSET): Likewise.
1826 (SVE_SIG_REGS_SIZE): Likewise.
1827 (SVE_SIG_CONTEXT_SIZE): Likewise.
1828 (SVE_PT_REGS_MASK): Likewise.
1829 (SVE_PT_REGS_FPSIMD): Likewise.
1830 (SVE_PT_REGS_SVE): Likewise.
1831 (SVE_PT_VL_INHERIT): Likewise.
1832 (SVE_PT_VL_ONEXEC): Likewise.
1833 (SVE_PT_REGS_OFFSET): Likewise.
1834 (SVE_PT_FPSIMD_OFFSET): Likewise.
1835 (SVE_PT_FPSIMD_SIZE): Likewise.
1836 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1837 (SVE_PT_SVE_PREG_SIZE): Likewise.
1838 (SVE_PT_SVE_FFR_SIZE): Likewise.
1839 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1840 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1841 (__SVE_SIG_TO_PT): Likewise.
1842 (SVE_PT_SVE_OFFSET): Likewise.
1843 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1844 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1845 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1846 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1847 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1848 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1849 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1850 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1851 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1852 (SVE_PT_SVE_SIZE): Likewise.
1853 (SVE_PT_SIZE): Likewise.
1854 (HAS_SVE_STATE): New define.
1856 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1858 * nat/aarch64-sve-linux-sigcontext.h: New file.
1859 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1861 (SVE_VQ_MIN): Likewise.
1862 (SVE_VQ_MAX): Likewise.
1863 (SVE_VL_MIN): Likewise.
1864 (SVE_VL_MAX): Likewise.
1865 (SVE_NUM_ZREGS): Likewise.
1866 (SVE_NUM_PREGS): Likewise.
1867 (sve_vl_valid): Likewise.
1868 (struct user_sve_header): Likewise.
1870 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1871 Richard Bunt <Richard.Bunt@arm.com>
1873 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1874 was requested by GDB.
1876 2018-06-15 Tom de Vries <tdevries@suse.de>
1878 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1880 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1882 * gnulib/update-gnulib.sh: Print expected versions of
1885 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1887 * arch-utils.c (default_type_align): Use type_length_units.
1888 * gdbtypes.c (type_align): Use type_length_units.
1890 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1892 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1893 of 'define' command.
1895 2018-06-14 Tom de Vries <tdevries@suse.de>
1898 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1899 get_no_prettyformat_print_options.
1901 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1903 * sparc-nat.h: Include target.h.
1904 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1905 <fetch_registers>: Remove this argument in function call.
1906 <store_registers>: Remove this argument in function call, remove
1908 <low_forget_process>: Call sparc64_forget_process instead of
1909 sparc_forget_process.
1911 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1913 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1914 (procfs_target::make_corefile_notes): Adjust to new
1915 target_read_alloc return type.
1917 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1918 Stephen Roberts <stephen.roberts@arm.com>
1921 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1922 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1923 Move should_notify_stop local into more inner scope.
1925 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1926 Stephen Roberts <stephen.roberts@arm.com>
1929 * infrun.c (resume_1): Add call to mark_async_event_handler.
1931 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1933 * infrun.c (do_target_wait): Change old version of $pc printed.
1935 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1937 * dwarf2read.c (read_index_from_section): Rename to...
1938 (read_gdb_index_from_section): ... this, update all callers.
1939 (dwarf2_read_index): Rename to...
1940 (dwarf2_read_gdb_index): ... this, update all callers.
1942 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1944 * gdb/hppa-linux-nat.c
1945 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1946 hppa_linux_nat_target::fetch_registers.
1948 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1950 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1951 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1952 (AARCH64_DWARF_SVE_FFR): Likewise.
1953 (AARCH64_DWARF_SVE_P0): Likewise.
1954 (AARCH64_DWARF_SVE_Z0): Likewise.
1956 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1958 * common/common-regcache.h (raw_compare): New function.
1959 * regcache.c (regcache::raw_compare): Likewise.
1960 * regcache.h (regcache::raw_compare): New declaration.
1962 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1964 * common/common-regcache.h (reg_buffer_common): New structure.
1965 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1966 (reg_buffer::raw_supply): Likewise.
1967 (reg_buffer::raw_supply_integer): Likewise.
1968 (reg_buffer::raw_supply_zeroed): Likewise.
1969 (reg_buffer::raw_collect): Likewise.
1970 (reg_buffer::raw_collect_integer): Likewise.
1971 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1972 (reg_buffer::raw_supply): Likewise.
1973 (reg_buffer::raw_supply_integer): Likewise.
1974 (reg_buffer::raw_supply_zeroed): Likewise.
1975 (reg_buffer::raw_collect): Likewise.
1976 (reg_buffer::raw_collect_integer): Likewise.
1978 2018-06-10 Tom Tromey <tom@tromey.com>
1980 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1981 (class remote_state) <stop_reply_queue>: Now std::vector.
1982 (remote_state::~remote_state)
1983 (remote_target::stop_reply_queue_length): Update.
1984 (struct queue_iter_param, remove_child_of_pending_fork)
1985 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1986 (check_pending_event_prevents_wildcard_vcont_callback)
1987 (remove_stop_reply_for_inferior)
1988 (remove_stop_reply_of_remote_state)
1989 (remote_notif_remove_once_on_match)
1990 (stop_reply_match_ptid_and_ws)
1991 (remote_kill_child_of_pending_fork): Remove.
1992 (remote_target::remove_new_fork_children)
1993 (remote_target::check_pending_events_prevent_wildcard_vcont)
1994 (remote_target::discard_pending_stop_replies)
1995 (remote_target::discard_pending_stop_replies_in_queue)
1996 (remote_target::remote_notif_remove_queued_reply)
1997 (remote_target::queued_stop_reply)
1998 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1999 (remote_target::wait, remote_target::kill_new_fork_children)
2000 (remote_target::async): Update.
2002 2018-06-10 Tom Tromey <tom@tromey.com>
2004 * record-full.c (record_full_arch_list_cleanups): Remove.
2005 (record_full_message): Use try/catch.
2006 (record_full_wait_cleanups): Remove.
2007 (record_full_wait_1): Use try/catch.
2008 (record_full_restore): Likewise.
2010 2018-06-10 Tom Tromey <tom@tromey.com>
2012 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2013 declare VEC. Add constructor.
2014 <in_target_beneath>: Now bool.
2015 (record_full_breakpoints): Now a std::vector, static.
2016 (record_full_sync_record_breakpoints)
2017 (record_full_init_record_breakpoints)
2018 (record_full_target::insert_breakpoint)
2019 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2021 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2023 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2024 * serial.c (serial_interface_lookup): Remove struct keyword.
2026 2018-06-10 Tom Tromey <tom@tromey.com>
2028 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2030 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2032 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2034 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2035 "beneath" as a method.
2036 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2037 Use "beneath" as a method.
2039 2018-06-10 Tom Tromey <tom@tromey.com>
2041 * tracefile.c (struct trace_file_writer_deleter): New.
2042 <operator()>: Rename from trace_file_writer_xfree.
2043 (trace_file_writer_up): New typedef.
2044 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2046 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2048 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2049 <m_registers, m_register_status>: Change type to
2051 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2054 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2056 * common/common-regcache.h (enum register_status): Add
2057 underlying type "signed char".
2058 * regcache.h (reg_buffer) <m_register_status>: Change type to
2060 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2061 register_status instead of signed char.
2062 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2063 (reg_buffer::get_register_status): Remove cast.
2064 (readable_regcache::raw_read): Remove cast.
2065 (readable_regcache::cooked_read): Remove cast.
2067 2018-06-09 Tom Tromey <tom@tromey.com>
2069 * source.c (reverse_search_command, forward_search_command): Use
2072 2018-06-09 Tom Tromey <tom@tromey.com>
2074 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2075 (serial_ops_list): Now static, std::vector.
2076 (serial_interface_lookup, serial_add_interface): Update.
2078 2018-06-09 Tom Tromey <tom@tromey.com>
2080 * dwarf2read.c (process_cu_includes): Update.
2081 (process_full_comp_unit): Update.
2082 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2085 2018-06-08 Paul Koning <paul_koning@dell.com>
2089 * python/python.c (do_start_initialization):
2090 Avoid call to internal Python API.
2091 (init__gdb_module): New function.
2093 2018-06-08 Gary Benson <gbenson@redhat.com>
2095 * linux-thread-db.c (valprint.h): New include.
2096 (struct check_thread_db_info): New structure.
2097 (check_thread_db_on_load, tdb_testinfo): New static globals.
2098 (check_thread_db, check_thread_db_callback): New functions.
2099 (try_thread_db_load_1): Run integrity checks if requested.
2100 (maintenance_check_libthread_db): New function.
2101 (_initialize_thread_db): Register "maint check libthread-db"
2102 and "maint set/show check-libthread-db".
2103 * NEWS: Mention the above new commands.
2105 2018-06-08 Tom Tromey <tom@tromey.com>
2107 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2110 2018-06-08 Tom Tromey <tom@tromey.com>
2112 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2114 2018-06-08 Tom Tromey <tom@tromey.com>
2116 * common/btrace-common.h (struct btrace_data): Add constructor,
2117 destructor, move assignment operator.
2118 <empty, clear, fini>: New methods.
2119 <format>: Initialize.
2120 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2121 (btrace_data_empty): Don't declare.
2122 * common/btrace-common.c (btrace_data_init): Remove.
2123 (btrace_data::fini): Rename from btrace_data_fini.
2124 (btrace_data::empty): Rename from btrace_data_empty.
2125 (btrace_data::clear): Rename from btrace_data_clear. Return
2127 * btrace.h (make_cleanup_btrace_data): Don't declare.
2128 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2129 (parse_xml_btrace): Update.
2130 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2131 (maint_btrace_clear_packet_history_cmd): Update.
2133 2018-06-07 Pedro Alves <palves@redhat.com>
2135 * target.h (target_ops) <beneath>: Now a method. All references
2137 (class target_stack): New.
2138 * target.c (g_target_stack): New.
2139 (g_current_top_target): Delete.
2140 (current_top_target): Get the top target out of g_target_stack.
2141 (target_stack::push, target_stack::unpush): New.
2142 (push_target, unpush_target): Reimplement.
2143 (target_is_pushed): Reimplement in terms of g_target_stack.
2144 (target_ops::beneath, target_stack::find_beneath): New.
2146 2018-06-07 Pedro Alves <palves@redhat.com>
2148 * target.h (find_target_beneath): Delete declaration.
2149 * target.c (find_target_beneath): Delete definition.
2150 * aix-thread.c: All callers of find_target_beneath adjusted to
2151 call target_ops::beneath instead.
2152 * bsd-uthread.c: Likewise.
2153 * linux-thread-db.c: Likewise.
2154 * ravenscar-thread.c: Likewise.
2155 * sol-thread.c: Likewise.
2156 * spu-multiarch.c: Likewise.
2158 2018-06-07 Pedro Alves <palves@redhat.com>
2160 * target.h (target_ops) <beneath>: Now a method. All references
2162 (target_ops) <m_beneath>: New.
2163 * target.c (target_ops::beneath): New.
2164 * corelow.c: Adjust all references to target_ops::beneath.
2165 * linux-thread-db.c: Likewise.
2166 * make-target-delegates: Likewise.
2167 * record-btrace.c: Likewise.
2168 * record-full.c: Likewise.
2169 * remote.c: Likewise.
2170 * target.c: Likewise.
2171 * target-delegates.c: Regenerate.
2173 2018-06-07 Pedro Alves <palves@redhat.com>
2175 * target.h (target_stack): Delete.
2176 (current_top_target): Declare function.
2177 * target.c (target_stack): Delete.
2178 (g_current_top_target): New.
2179 (current_top_target): New function.
2180 * auxv.c: Use current_top_target instead of target_stack
2182 * avr-tdep.c: Likewise.
2183 * breakpoint.c: Likewise.
2184 * corefile.c: Likewise.
2185 * elfread.c: Likewise.
2187 * exceptions.c: Likewise.
2188 * frame.c: Likewise.
2189 * gdbarch-selftests.c: Likewise.
2190 * gnu-v3-abi.c: Likewise.
2191 * ia64-tdep.c: Likewise.
2192 * ia64-vms-tdep.c: Likewise.
2193 * infcall.c: Likewise.
2194 * infcmd.c: Likewise.
2195 * infrun.c: Likewise.
2196 * linespec.c: Likewise.
2197 * linux-tdep.c: Likewise.
2198 * minsyms.c: Likewise.
2199 * ppc-linux-nat.c: Likewise.
2200 * ppc-linux-tdep.c: Likewise.
2201 * procfs.c: Likewise.
2202 * regcache.c: Likewise.
2203 * remote.c: Likewise.
2204 * rs6000-tdep.c: Likewise.
2205 * s390-linux-nat.c: Likewise.
2206 * s390-tdep.c: Likewise.
2207 * solib-aix.c: Likewise.
2208 * solib-darwin.c: Likewise.
2209 * solib-dsbt.c: Likewise.
2210 * solib-spu.c: Likewise.
2211 * solib-svr4.c: Likewise.
2212 * solib-target.c: Likewise.
2213 * sparc-tdep.c: Likewise.
2214 * sparc64-tdep.c: Likewise.
2215 * spu-tdep.c: Likewise.
2216 * symfile.c: Likewise.
2217 * symtab.c: Likewise.
2218 * target-descriptions.c: Likewise.
2219 * target-memory.c: Likewise.
2220 * target.c: Likewise.
2221 * target.h: Likewise.
2222 * tracefile-tfile.c: Likewise.
2223 * tracepoint.c: Likewise.
2224 * valops.c: Likewise.
2225 * valprint.c: Likewise.
2226 * value.c: Likewise.
2227 * windows-tdep.c: Likewise.
2228 * mi/mi-main.c: Likewise.
2230 2018-06-07 Tom Tromey <tom@tromey.com>
2232 * valprint.h (build_address_symbolic): Declare.
2233 * printcmd.c (print_address_symbolic): Update.
2234 (build_address_symbolic): Change "name" and "filename" to
2236 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2238 * defs.h (build_address_symbolic): Remove declaration.
2240 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2242 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2243 (aarch64_vnv_type): Add function.
2244 (aarch64_pseudo_register_name): Add V regs for SVE.
2245 (aarch64_pseudo_register_type): Likewise.
2246 (aarch64_pseudo_register_reggroup_p): Likewise.
2247 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2248 (aarch64_pseudo_read_value): Add V regs for SVE.
2249 (aarch64_pseudo_write_2): Use V0 offset for SVE
2250 (aarch64_pseudo_write): Add V regs for SVE.
2251 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2253 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2255 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2256 (sve_vl_from_vq): Likewise.
2258 2018-06-05 Tom Tromey <tom@tromey.com>
2260 * cli/cli-cmds.c (show_version): Update.
2261 * top.c (print_gdb_version): Add "interactive" parameter.
2263 * main.c (captured_main_1): Update.
2264 * top.h (print_gdb_version): Add "interactive" parameter and a
2267 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2269 * common/enum-flags.h: Add trailing semicolon to example in
2272 2018-06-05 Tom Tromey <tom@tromey.com>
2275 * NEWS: Add entry about pager.
2276 * utils.c (pagination_disabled_for_command): New global.
2277 (prompt_for_continue): Allow "c" response to prompt.
2278 (reinitialize_more_filter): Clear
2279 pagination_disabled_for_command.
2280 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2282 2018-06-04 Tom Tromey <tom@tromey.com>
2284 * ada-lang.h (ada_lookup_symbol_list): Update.
2285 * ada-lang.c (resolve_subexp): Update.
2286 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2288 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2289 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2290 results parameter to std::vector.
2291 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2293 * ada-exp.y (block_lookup): Update.
2294 (select_possible_type_sym): Change type of syms. Remove nsyms
2296 (write_var_or_type, write_name_assoc): Update.
2298 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2300 * windows-nat.c (windows_nat_target::xfer_partial): Return
2301 TARGET_XFER_E_IO if we need to delegate to the target beneath
2302 but BENEATH is NULL.
2304 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2306 * Makefile.in (config.status): Add configure.nat as a
2309 2018-06-04 Tom Tromey <tom@tromey.com>
2311 * cp-name-parser.y (cpname_state): Add method declarations.
2312 (HANDLE_QUAL): Update.
2313 (cpname_state::d_grab, cpname_state::fill_comp)
2314 (cpname_state::make_operator, cpname_state::make_dtor)
2315 (cpname_state::make_builtin_type, cpname_state::make_name)
2316 (cpname_state::d_qualify, cpname_state::d_int_type)
2317 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2318 (%union): Move earlier.
2320 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2322 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2324 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2326 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2327 (aarch64_pseudo_write_1): Likewise.
2328 (aarch64_pseudo_read_value): Use helper.
2329 (aarch64_pseudo_write): Likewise.
2331 2018-06-04 Pedro Alves <palves@redhat.com>
2333 * darwin-nat.c (darwin_ops): Delete.
2334 (darwin_attach_pid): Use get_native_target.
2336 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2338 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2339 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2341 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2343 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2344 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2345 (aarch64_gdbarch_init): Check for SVE.
2346 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2348 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2350 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2351 * aarch64-tdep.h (aarch64_read_description): Likewise.
2352 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2353 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2354 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2355 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2356 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2358 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2360 * value.c (value_fetch_lazy_bitfield): New.
2361 (value_fetch_lazy_memory): New.
2362 (value_fetch_lazy_register): New.
2363 (value_fetch_lazy): Factor out to smaller functions.
2365 2018-06-01 Tom Tromey <tom@tromey.com>
2367 * cp-name-parser.y (backslashable, represented): Now const.
2369 2018-06-01 Tom Tromey <tom@tromey.com>
2371 * cp-name-parser.y: Include parser-defs.h.
2372 (parser_fprintf): Remove declaration.
2374 2018-06-01 Tom Tromey <tom@tromey.com>
2376 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2378 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2379 (global_result): Remove globals.
2380 (struct cpname_state): New.
2381 (yyparse): Don't declare.
2382 (yylex, yyerror): Move declarations after %union.
2383 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2384 (make_name): Add state parameter.
2386 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2388 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2390 (yylex): Add lvalp, state parameters.
2391 (yyerror): Add state parameter.
2392 (cp_demangled_name_to_comp): Update.
2394 2018-06-01 Tom Tromey <tom@tromey.com>
2396 * cp-name-parser.y (parser_fprintf): Declare.
2397 (GDB_YY_REMAP_PREFIX): Define.
2398 Include yy-remap.h. Don't redefine yy* identifiers.
2400 2018-06-01 Tom Tromey <tom@tromey.com>
2402 * python/py-type.c (typy_legacy_template_argument): Update.
2403 * cp-support.h (cp_demangled_name_to_comp): Update.
2404 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2405 parameter to be a "std::string *".
2408 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2410 * ada-lex.l: Include "diagnostics.h" instead of
2411 "common/diagnostics.h".
2412 * unittests/environ-selftests.c: Likewise.
2413 * common/diagnostics.h: Moved to ../include.
2415 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2417 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2418 to language_mode_manual while calling breakpoint_re_set_one.
2420 2018-06-01 Tom Tromey <tom@tromey.com>
2422 * valops.c (value_cast_structs, destructor_name_p): Update.
2423 * symtab.c (gdb_mangle_name): Update.
2424 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2426 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2427 (pascal_object_print_value_fields, pascal_object_print_value):
2429 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2430 * linespec.c (find_methods): Update.
2431 * gdbtypes.h (type_name_no_tag): Remove.
2432 (type_name_or_error): Rename from type_name_no_tag_or_error.
2433 * gdbtypes.c (type_name_no_tag): Remove.
2434 (type_name_or_error): Rename from type_name_no_tag_or_error.
2435 (lookup_struct_elt_type, check_typedef): Update.
2436 * expprint.c (print_subexp_standard): Update.
2437 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2438 * d-namespace.c (d_lookup_nested_symbol): Update.
2439 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2440 (cp_print_class_member): Update.
2441 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2442 * completer.c (add_struct_fields): Update.
2443 * c-typeprint.c (cp_type_print_derivation_info)
2444 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2446 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2447 (ada_prefer_type, ada_is_exception_sym): Update.
2449 2018-06-01 Tom Tromey <tom@tromey.com>
2451 * valops.c (enum_constant_from_type, value_namespace_elt)
2452 (value_maybe_namespace_elt): Update.
2453 * valarith.c (find_size_for_pointer_math): Update.
2454 * target-descriptions.c (make_gdb_type): Update.
2455 * symmisc.c (print_symbol): Update.
2456 * stabsread.c (define_symbol, read_type)
2457 (complain_about_struct_wipeout, add_undefined_type)
2458 (cleanup_undefined_types_1): Update.
2459 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2460 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2461 (rust_internal_print_type, rust_composite_type)
2462 (rust_evaluate_funcall, rust_evaluate_subexp)
2463 (rust_inclusive_range_type_p): Update.
2464 * python/py-type.c (typy_get_tag): Update.
2465 * p-typeprint.c (pascal_type_print_base): Update.
2466 * mdebugread.c (parse_symbol, parse_type): Update.
2467 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2469 * guile/scm-type.c (gdbscm_type_tag): Update.
2470 * go-lang.c (sixg_string_p): Update.
2471 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2473 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2474 (TYPE_TAG_NAME): Remove.
2475 * gdbtypes.c (type_name_no_tag): Simplify.
2476 (check_typedef, check_types_equal, recursive_dump_type)
2477 (copy_type_recursive, arch_composite_type): Update.
2478 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2479 in summary mode when needed.
2480 * eval.c (evaluate_funcall): Update.
2481 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2482 (process_structure_scope, read_enumeration_type)
2483 (read_namespace_type, read_module_type, determine_prefix): Update.
2484 * cp-support.c (inspect_type): Update.
2485 * coffread.c (process_coff_symbol, decode_base_type): Update.
2486 * c-varobj.c (c_is_path_expr_parent): Update.
2487 * c-typeprint.c (c_type_print_base_struct_union): Update.
2488 (c_type_print_base_1): Update. Print struct/class/union/enum in
2489 summary when using C language.
2490 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2491 (gen_maybe_namespace_elt): Update.
2492 * ada-lang.c (ada_type_name): Simplify.
2493 (empty_record, ada_template_to_fixed_record_type_1)
2494 (template_to_static_fixed_type)
2495 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2497 2018-06-01 Tom Tromey <tom@tromey.com>
2499 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2501 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2502 (c_print_type): Update.
2503 (c_print_type): New overload.
2504 (c_type_print_varspec_prefix, c_type_print_args)
2505 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2506 (c_type_print_base_struct_union, c_type_print_base_1)
2507 (cp_type_print_method_args): Add "language" parameter.
2508 (c_type_print_base): Update.
2509 * c-lang.h (c_print_type): Add new overload.
2511 2018-06-01 Tom Tromey <tom@tromey.com>
2513 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2514 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2516 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2518 * aarch64-tdep.c (aarch64_sve_register_names): New const
2520 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2521 (AARCH64_SVE_Z_REGS_NUM): New define.
2522 (AARCH64_SVE_P_REGS_NUM): Likewise.
2523 (AARCH64_SVE_NUM_REGS): Likewise.
2525 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2527 * nat/linux-ptrace.h [__alpha__]
2528 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2531 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2533 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2534 the endianness selected.
2535 * NEWS: Document `set endian auto' mode operation update.
2537 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2539 * Makefile.in: Add new header.
2540 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2541 (sve_vl_from_vg): Likewise.
2542 (sve_vq_from_vl): Likewise.
2543 (sve_vl_from_vq): Likewise.
2544 (sve_vq_from_vg): Likewise.
2545 (sve_vg_from_vq): Likewise.
2546 * configure.nat: Add new c file.
2547 * nat/aarch64-sve-linux-ptrace.c: New file.
2548 * nat/aarch64-sve-linux-ptrace.h: New file.
2550 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2552 * aarch64-linux-nat.c (aarch64_linux_read_description):
2554 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2556 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2557 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2558 (aarch64_gdbarch_init): Add parmeter zero.
2559 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2560 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2561 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2563 * doc/gdb.texinfo: Describe SVE feature
2564 * features/aarch64-sve.c: New file.
2566 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2569 * gdbarch.sh (significant_addr_bit): Default to zero when
2570 not set by target architecture.
2571 * gdbarch.c: Re-generated.
2572 * utils.c (address_significant): Update.
2574 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2576 * stack.c (func_command): Remove trailing newline in call to error.
2578 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2580 * regcache.h (regcache_raw_collect): Remove, update callers to
2581 use regcache::raw_collect.
2582 * regcache.c (regcache_raw_collect): Remove.
2584 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2586 * regcache.h (regcache_raw_supply): Remove, update callers to
2587 use detached_regcache::raw_supply.
2588 * regcache.c (regcache_raw_supply): Remove.
2590 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2592 * regcache.h (regcache_cooked_write_part): Remove, update
2593 callers to use regcache::cooked_write_part.
2594 * regcache.c (regcache_cooked_write_part): Remove.
2596 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2598 * regcache.h (regcache_cooked_read_part): Remove, update callers
2599 to use readable_regcache::cooked_read_part.
2600 * regcache.c (regcache_cooked_read_part): Remove.
2602 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2604 * regcache.h (regcache_cooked_read_value): Remove, update
2605 callers to use readable_regcache::cooked_read_value.
2606 * regcache.c (regcache_cooked_read_value): Remove.
2608 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2610 * regcache.h (regcache_cooked_write): Remove, update callers to
2611 use regcache::cooked_write.
2612 * regcache.c (regcache_cooked_write): Remove.
2614 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2616 * regcache.h (regcache_invalidate): Remove, update callers to
2617 use detached_regcache::invalidate instead.
2618 * regcache.c (regcache_invalidate): Remove.
2620 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2622 * regcache.h (regcache_raw_write_part): Remove, update callers
2623 to use regcache::raw_write_part instead.
2624 * regcache.c (regcache_raw_write_part): Remove.
2626 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2628 * regcache.h (regcache_raw_read_part): Remove, update callers to
2629 use readable_regcache::raw_read_part instead.
2630 * regcache.c (regcache_raw_read_part): Remove.
2632 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2634 * regcache.h (regcache_cooked_read): Remove, update callers to
2635 use readable_regcache::cooked_read instead.
2636 * regcache.c (regcache_cooked_read): Remove.
2638 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2640 * regcache.h (regcache_raw_write): Remove, update callers to use
2641 regcache::raw_write instead.
2642 * regcache.c (regcache_raw_write): Remove.
2644 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2646 * regcache.h (regcache_raw_read): Remove, update callers to use
2647 readable_regcache::raw_read instead.
2648 * regcache.c (regcache_raw_read): Remove.
2650 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2652 * regcache.h (regcache_raw_update): Remove, update callers to
2653 use readable_regcache::raw_update instead.
2654 * regcache.c (regcache_raw_update): Remove.
2656 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2658 * regcache.h (regcache_register_status): Remove, update callers
2659 to use reg_buffer::get_register_status directly instead.
2660 * regcache.c (regcache_register_status): Remove.
2662 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2664 * regcache.h (regcache_get_ptid): Remove, update all callers to
2665 call regcache::ptid instead.
2666 * regcache.c (regcache_get_ptid): Remove.
2668 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2670 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2672 2018-05-30 Pedro Alves <palves@redhat.com>
2674 * common/common-exceptions.h (exception_rethrow): Use
2677 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2679 * breakpoint.c (print_solib_event, check_status_catch_solib):
2680 Remove struct keyword in range-based for loops.
2681 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2682 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2684 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2686 * symfile.c (addr_info_make_relative): Likewise.
2687 * thread.c (value_in_thread_stack_temporaries): Likewise.
2689 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2692 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2693 aggregate type to get its real type before accessing it.
2695 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2697 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2698 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2699 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2700 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2701 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2702 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2703 * printcmd.c (info_address_command): Likewise.
2705 2018-05-29 Tom Tromey <tom@tromey.com>
2707 * windows-nat.c (handle_exception): Update fall-through comment.
2709 2018-05-29 Tom Tromey <tom@tromey.com>
2711 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2712 (struct program_space) <added_solibs>: Now a std::vector.
2713 * breakpoint.c (print_solib_event): Update.
2714 (check_status_catch_solib): Update.
2715 * progspace.c (clear_program_space_solib_cache): Update.
2716 * solib.c (update_solib_list): Update.
2718 2018-05-29 Tom Tromey <tom@tromey.com>
2720 * python/py-type.c (typy_richcompare): Update.
2721 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2722 * gdbtypes.h (types_deeply_equal): Return bool.
2723 (types_equal): Likewise.
2724 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2726 (check_types_equal): Change worklist to std::vector. Return
2728 (struct type_equality_entry): Add constructor.
2729 (compare_maybe_null_strings): Return bool.
2730 (check_types_worklist): Return bool. Change worklist to
2732 (types_deeply_equal): Use std::vector.
2733 (types_equal): Return bool.
2734 (compare_maybe_null_strings): Simplify.
2736 2018-05-29 Tom Tromey <tom@tromey.com>
2738 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2740 2018-05-29 Tom Tromey <tom@tromey.com>
2742 * objc-lang.h: Don't include cp-support.h.
2743 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2746 2018-05-27 Tom Tromey <tom@tromey.com>
2748 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2750 2018-05-25 Tom Tromey <tom@tromey.com>
2752 * value.c (value::location): Initialize.
2754 2018-05-25 Tom Tromey <tom@tromey.com>
2756 * dbxread.c (init_bincl_list): Remove.
2757 (bincl_list): Now a std::vector.
2758 (bincls_allocated, next_bincl): Remove.
2759 (free_bincl_list, do_free_bincl_list_cleanup)
2760 (make_cleanup_free_bincl_list): Remove.
2761 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2763 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2764 (struct header_file_location): Add constructor.
2765 (add_bincl_to_list): Remove.
2767 2018-05-25 Tom Tromey <tom@tromey.com>
2769 * tui/tui.c (tui_enable): Update.
2770 * mi/mi-interp.c (mi_interp::init): Update.
2771 * interps.h (class interp) <name>: New method.
2772 <m_name>: Rename from name.
2773 (~scoped_restore_interp): Update.
2774 * interps.c (interp::interp): Update.
2775 (interp_add, interp_set, interp_lookup_existing)
2776 (current_interp_named_p): Update.
2778 2018-05-25 Tom Tromey <tom@tromey.com>
2780 * interps.c (interp_name): Remove.
2781 * mi/mi-interp.c (mi_interp::init): Update.
2782 * interps.h (interp_name): Remove.
2783 (~scoped_restore_interp): Update.
2784 * tui/tui.c (tui_enable): Update.
2786 2018-05-25 Tom Tromey <tom@tromey.com>
2788 * utils.c (fputs_maybe_filtered): Update.
2789 * linespec.c (decode_line_full): Update.
2790 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2791 (mi_print_breakpoint_for_event, mi_solib_loaded)
2792 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2793 (mi_user_selected_context_changed): Update.
2794 * mi/mi-main.c (mi_execute_command): Update.
2795 * cli/cli-script.c (execute_control_command): Update.
2796 * python/python.c (execute_gdb_command): Update.
2797 * solib.c (info_sharedlibrary_command): Update.
2798 * interps.c (interp_ui_out): Remove.
2799 * interps.h (interp_ui_out): Remove.
2801 2018-05-25 Tom Tromey <tom@tromey.com>
2803 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2804 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2805 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2807 2018-05-25 Tom Tromey <tom@tromey.com>
2809 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2810 * interps.c (interp_exec): Use scoped_restore.
2812 2018-05-25 Tom Tromey <tom@tromey.com>
2814 * remote.c (remote_target::remote_file_get): Use
2816 (remote_target::remote_file_put): Likewise.
2818 2018-05-25 Tom Tromey <tom@tromey.com>
2820 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2822 (get_pe_section_index, add_pe_exported_sym): Update.
2823 (read_pe_exported_syms): Use gdb::def_vector.
2825 2018-05-25 Tom Tromey <tom@tromey.com>
2827 * frame.c (remove_prev_frame): Remove.
2828 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2830 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2832 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2834 * mips-linux-nat.c (supply_fpregset): Always call
2835 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2836 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2837 `mips_fill_fpregset'.
2838 * mips-linux-tdep.c (mips_supply_fpregset)
2839 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2840 (mips_fill_fpregset_wrapper): Remove functions.
2841 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2842 (mips_linux_fpregset): Remove variable.
2843 (mips_linux_iterate_over_regset_sections): Use
2844 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2845 (mips_linux_o32_sigframe_init): Remove comment.
2847 2018-05-25 Pedro Alves <palves@redhat.com>
2849 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2850 (struct readahead_cache, struct packet_reg, struct
2851 remote_arch_state, class remote_state): Move higher up in the
2853 (remote_target::m_remote_state): Now an object instead of a pointer.
2854 (remote_target::get_remote_state): Adjust.
2856 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2858 * stack.c (select_and_print_frame): Delete.
2859 (struct function_bounds): Move struct within function.
2860 (func_command): Most content moved into new function
2861 find_frame_for_function, use new function, print result, add
2863 (find_frame_for_function): New function, now returns a result.
2865 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2867 * stack.c (iterate_over_block_arg_vars): Fix comment.
2868 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2870 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2874 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2876 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2878 * frame.h (class scoped_restore_selected_frame): New class.
2879 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2880 of any exception, use scoped_restore_selected_frame to restore the
2883 2018-05-24 Pedro Alves <palves@redhat.com>
2885 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2888 2018-05-23 Tom Tromey <tom@tromey.com>
2890 * complaints.c (struct complaints): Remove.
2891 (symfile_complaint_book): Remove.
2892 (series): New global.
2893 (complaint_internal): Update.
2894 (clear_complaints): Update.
2896 2018-05-23 Tom Tromey <tom@tromey.com>
2898 * complaints.c (counters): New global.
2899 (struct complain): Remove.
2900 (struct complaints) <root>: Remove.
2901 (complaint_sentinel): Remove.
2902 (symfile_complaint_book): Update.
2903 (find_complaint) Remove.
2904 (complaint_internal, clear_complaints): Update.
2906 2018-05-23 Tom Tromey <tom@tromey.com>
2908 * complaints.c (struct complain) <file, line>: Remove.
2909 (find_complaint): Remove file, line parameters.
2910 (complaint_internal): Update.
2912 2018-05-23 Tom Tromey <tom@tromey.com>
2914 * complaints.c (vcomplaint): Remove.
2915 (complaint_internal) Merge in contents of vcomplaint.
2917 2018-05-23 Tom Tromey <tom@tromey.com>
2919 * complaints.c (struct complaints) <explanation>: Remove.
2920 (symfile_explanations): Remove.
2921 (symfile_complaint_book): Update.
2922 (vcomplaint): Update.
2923 (struct explanation): Remove.
2925 2018-05-23 Tom Tromey <tom@tromey.com>
2927 * complaints.c (symfile_complaints): Remove.
2928 (complaint_internal): Remove "complaints" parameter.
2929 (clear_complaints, vcomplaint): Remove "c" parameter.
2930 (get_complaints): Remove.
2931 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2932 (dwarf2_debug_line_missing_file_complaint)
2933 (dwarf2_debug_line_missing_end_sequence_complaint)
2934 (dwarf2_complex_location_expr_complaint)
2935 (dwarf2_const_value_length_mismatch_complaint)
2936 (dwarf2_section_buffer_overflow_complaint)
2937 (dwarf2_macro_malformed_definition_complaint)
2938 (dwarf2_invalid_attrib_class_complaint)
2939 (create_addrmap_from_index, dw2_symtab_iter_next)
2940 (dw2_expand_marked_cus)
2941 (dw2_debug_names_iterator::find_vec_in_debug_names)
2942 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2943 (create_debug_type_hash_table, init_cutu_and_read_dies)
2944 (partial_die_parent_scope, add_partial_enumeration)
2945 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2946 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2947 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2948 (create_cus_hash_table, create_dwp_hash_table)
2949 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2950 (dwarf2_rnglists_process, dwarf2_ranges_process)
2951 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2952 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2953 (handle_struct_member_die, process_structure_scope)
2954 (read_array_type, read_common_block, read_module_type)
2955 (read_tag_pointer_type, read_typedef, read_base_type)
2956 (read_subrange_type, load_partial_dies, partial_die_info::read)
2957 (partial_die_info::read, partial_die_info::read)
2958 (partial_die_info::read, read_checked_initial_length_and_offset)
2959 (dwarf2_string_attr, read_formatted_entries)
2960 (dwarf_decode_line_header)
2961 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2962 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2963 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2964 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2965 (get_signatured_type, get_DW_AT_signature_type)
2966 (decode_locdesc, file_file_name, consume_improper_spaces)
2967 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2968 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2969 (dwarf2_symbol_mark_computed, set_die_type)
2970 (read_attribute_value): Update.
2971 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2973 * dbxread.c (unknown_symtype_complaint)
2974 (lbrac_mismatch_complaint, repeated_header_complaint)
2975 (set_namestring, function_outside_compilation_unit_complaint)
2976 (read_dbx_symtab, process_one_symbol): Update.
2977 * gdbtypes.c (stub_noname_complaint): Update.
2978 * windows-nat.c (handle_unload_dll): Update.
2979 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2980 (decode_base_type): Update.
2981 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2982 (eb_complaint, record_include_begin, record_include_end)
2983 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2984 (process_xcoff_symbol, read_symbol)
2985 (function_outside_compilation_unit_complaint)
2986 (scan_xcoff_symtab): Update.
2987 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2988 * buildsym.c (finish_block_internal, make_blockvector)
2989 (end_symtab_get_static_block, augment_type_symtab): Update.
2990 * dtrace-probe.c (dtrace_process_dof)
2991 (dtrace_static_probe_ops::get_probes): Update.
2992 * complaints.h (struct complaint): Don't declare.
2993 (symfile_complaints): Remove.
2994 (complaint_internal): Remove "complaints" parameter.
2995 (complaint): Likewise.
2996 (clear_complaints): Likewise.
2997 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2998 (reread_symbols): Update.
2999 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3000 (dwarf2_frame_cache, decode_frame_entry): Update.
3001 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3002 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3003 (info_selectors_command): Update.
3004 * macrotab.c (macro_include, check_for_redefinition)
3005 (macro_undef): Update.
3006 * objfiles.c (filter_overlapping_sections): Update.
3007 * stabsread.c (invalid_cpp_abbrev_complaint)
3008 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3009 (define_symbol, error_type, read_type, rs6000_builtin_type)
3010 (stabs_method_name_from_physname, read_member_functions)
3011 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3012 (attach_fields_to_type, complain_about_struct_wipeout)
3013 (read_range_type, read_args, common_block_start)
3014 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3016 * mdebugread.c (index_complaint, unknown_ext_complaint)
3017 (basic_type_complaint, bad_tag_guess_complaint)
3018 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3019 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3020 (parse_procedure, parse_lines)
3021 (function_outside_compilation_unit_complaint)
3022 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3023 (bad_tag_guess_complaint, reg_value_complaint): Update.
3024 * cp-support.c (demangled_name_complaint): Update.
3025 * macroscope.c (sal_macro_scope): Update.
3026 * dwarf-index-write.c (class debug_names): Update.
3028 2018-05-23 Tom Tromey <tom@tromey.com>
3030 * complaints.c (clear_complaints): Remove "noisy" parameter.
3031 * complaints.h (clear_complaints): Update.
3032 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3033 (reread_symbols): Update.
3035 2018-05-23 Tom Tromey <tom@tromey.com>
3037 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3039 (vcomplaint, clear_complaints): Update.
3040 (symfile_explanations): Remove some messages.
3042 2018-05-23 Tom Tromey <tom@tromey.com>
3044 * complaints.c (internal_complaint): Remove.
3045 * complaints.h (internal_complaint): Remove.
3047 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3049 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3051 2018-05-22 Pedro Alves <palves@redhat.com>
3053 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3054 (remote_fileio_badfd, remote_fileio_return_errno)
3055 (remote_fileio_return_success, remote_fileio_func_open)
3056 (remote_fileio_func_open, remote_fileio_func_close)
3057 (remote_fileio_func_read, remote_fileio_func_write)
3058 (remote_fileio_func_lseek, remote_fileio_func_rename)
3059 (remote_fileio_func_unlink, remote_fileio_func_stat)
3060 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3061 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3062 remote_target parameter.
3063 (remote_fio_func_map) <func>: Add remote_target parameter.
3064 (do_remote_fileio_request, remote_fileio_request):
3065 * remote-fileio.h (remote_fileio_request):
3066 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3067 remote_target parameter.
3068 (remote_notif_process, handle_notification): Adjust to pass down
3070 (remote_notif_state_allocate): Add remote_target parameter. Save
3072 * remote-notif.h (struct remote_target): Forward declare.
3073 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3074 remote_target parameter.
3075 (struct remote_notif_state) <remote>: New field.
3076 (remote_notif_ack, remote_notif_parse): Add remote_target
3078 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3079 remote_target parameter.
3080 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3081 (threads_listing_context, rmt_thread_action, protocol_feature)
3082 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3083 (packet_result, struct threads_listing_context, remote_state):
3084 Move definitions and declarations higher up.
3085 (remote_target) <~remote_target>: Declare.
3086 (remote_download_command_source, remote_file_put, remote_file_get)
3087 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3088 (remote_hostio_pread_vFile, remote_hostio_send_command)
3089 (remote_hostio_set_filesystem, remote_hostio_open)
3090 (remote_hostio_close, remote_hostio_unlink, remote_state)
3091 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3092 (get_memory_write_packet_size, get_memory_read_packet_size)
3093 (append_pending_thread_resumptions, remote_detach_1)
3094 (append_resumption, remote_resume_with_vcont)
3095 (add_current_inferior_and_thread, wait_ns, wait_as)
3096 (process_stop_reply, remote_notice_new_inferior)
3097 (process_initial_stop_replies, remote_add_thread)
3098 (btrace_sync_conf, remote_btrace_maybe_reopen)
3099 (remove_new_fork_children, kill_new_fork_children)
3100 (discard_pending_stop_replies, stop_reply_queue_length)
3101 (check_pending_events_prevent_wildcard_vcont)
3102 (discard_pending_stop_replies_in_queue, stop_reply)
3103 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3104 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3105 (remote_interrupt_as, remote_interrupt_ns)
3106 (remote_get_noisy_reply, remote_query_attached)
3107 (remote_add_inferior, remote_current_thread, get_current_thread)
3108 (set_thread, set_general_thread, set_continue_thread)
3109 (set_general_process, write_ptid)
3110 (remote_unpack_thread_info_response, remote_get_threadinfo)
3111 (parse_threadlist_response, remote_get_threadlist)
3112 (remote_threadlist_iterator, remote_get_threads_with_ql)
3113 (remote_get_threads_with_qxfer)
3114 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3115 (get_offsets, remote_check_symbols, remote_supported_packet)
3116 (remote_query_supported, remote_packet_size)
3117 (remote_serial_quit_handler, remote_detach_pid)
3118 (remote_vcont_probe, remote_resume_with_hc)
3119 (send_interrupt_sequence, interrupt_query)
3120 (remote_notif_get_pending_events, fetch_register_using_p)
3121 (send_g_packet, process_g_packet, fetch_registers_using_g)
3122 (store_register_using_P, store_registers_using_G)
3123 (set_remote_traceframe, check_binary_download)
3124 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3125 (remote_xfer_live_readonly_partial, remote_read_bytes)
3126 (remote_send_printf, remote_flash_write, readchar)
3127 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3128 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3129 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3130 (extended_remote_disable_randomization, extended_remote_run)
3131 (send_environment_packet, extended_remote_environment_support)
3132 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3133 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3134 (packet_command): Now methods of ...
3135 (remote_target): ... this class.
3136 (m_remote_state) <remote_target>: New field.
3137 (struct remote_state) <stop_reply_queue,
3138 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3140 (remote_state::remote_state): Allocate stop_reply_queue.
3141 (remote_state): Delete global.
3142 (get_remote_state_raw): Delete.
3143 (remote_target::get_remote_state): Allocate m_remote_state on
3145 (get_current_remote_target): New.
3146 (remote_ops, extended_remote_ops): Delete.
3147 (wait_forever_enabled_p, remote_async_inferior_event_token):
3148 Delete, moved to struct remote_state.
3149 (remote_target::close): Delete self. Destruction bits split to
3151 (remote_target::~remote_target): ... this.
3152 (show_memory_packet_size): Adjust to use
3153 get_current_remote_target.
3154 (struct protocol_feature) <func>: Add remote_target parameter.
3155 All callers adjusted.
3156 (curr_quit_handler_target): New.
3157 (remote_serial_quit_handler): Reimplement.
3158 (remote_target::open_1): Adjust to use get_current_remote_target.
3159 Heap-allocate remote_target/extended_remote_target instances.
3160 (vcont_builder::vcont_builder): Add remote_target parameter, and
3161 save it in m_remote. All callers adjusted.
3162 (vcont_builder::m_remote): New field.
3163 (vcont_builder::restart, vcont_builder::flush)
3164 (vcont_builder::push_action): Use it.
3165 (remote_target::commit_resume): Use it.
3166 (struct queue_iter_param) <remote>: New field.
3167 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3168 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3169 (check_pending_event_prevents_wildcard_vcont_callback)
3170 (remote_target::check_pending_events_prevent_wildcard_vcont)
3171 (remote_target::discard_pending_stop_replies)
3172 (remote_target::discard_pending_stop_replies_in_queue)
3173 (remote_target::remote_notif_remove_queued_reply): Fill in
3175 (remote_notif_get_pending_events): New.
3176 (remote_target::readchar, remote_target::remote_serial_write):
3177 Save/restore curr_quit_handler_target.
3179 (kill_new_fork_children): Fill in 'remote' field.
3180 (packet_command): Use get_current_remote_target, defer to
3181 remote_target method of same name.
3182 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3183 parameter, and save it in m_remote. All callers adjusted.
3184 (scoped_remote_fd::release): Use m_remote.
3185 (scoped_remote_fd::m_remote): New field.
3186 (remote_file_put, remote_file_get, remote_file_delete): Use
3187 get_current_remote_target, defer to remote_target method of same
3189 (remote_btrace_reset): Add remote_state paremeter. Update all
3191 (remote_async_inferior_event_handler). Pass down 'data'.
3192 (remote_new_objfile): Use get_current_remote_target.
3193 (remote_target::vcont_r_supported): New.
3194 (set_range_stepping): Use get_current_remote_target and
3195 remote_target::vcont_r_supported.
3196 (_initialize_remote): Don't allocate 'remote_state' and
3197 'stop_reply_queue' globals.
3198 * remote.h (struct remote_target): Forward declare.
3199 (getpkt, putpkt, remote_notif_get_pending_events): Add
3200 'remote_target' parameter.
3202 2018-05-22 Pedro Alves <palves@redhat.com>
3204 * remote.c (vcont_builder): Now a class. Make all data members
3206 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3208 (vcont_builder_restart): Rename to ...
3209 (vcont_builder::restart): ... this.
3210 (vcont_builder_flush): Rename to ...
3211 (vcont_builder::flush): ... this.
3212 (vcont_builder_push_action): Rename to ...
3213 (vcont_builder::push_action): ... this.
3214 (remote_target::commit_resume): Adjust.
3216 2018-05-22 Pedro Alves <palves@redhat.com>
3218 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3219 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3220 (get_fixed_memory_packet_size): New.
3221 (get_memory_packet_size): Use it.
3222 (set_memory_packet_size): Don't override the config size with
3223 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3224 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3225 Don't refer to get_memory_packet_size if not connected to a remote
3226 target. Show "(default)" if configured size is 0.
3228 2018-05-22 Pedro Alves <palves@redhat.com>
3230 * remote.c (remote_target::mourn_inferior): Move
3231 discard_pending_stop_replies call here from ...
3232 (_initialize_remote): ... here.
3234 2018-05-22 Pedro Alves <palves@redhat.com>
3236 * remote.c (compare_section_command): Remove set_general_process
3239 2018-05-22 Pedro Alves <palves@redhat.com>
3241 * remote.c (struct packet_reg, struct remote_arch_state):
3242 Move higher up in the file.
3243 (remote_state) <m_arch_states>: Store remote_arch_state values
3244 instead of remote_arch_state pointers.
3245 (remote_state::get_remote_arch_state): Adjust.
3247 2018-05-22 Pedro Alves <palves@redhat.com>
3249 * remote.c: Include <unordered_map>.
3250 (remote_state): Now a class.
3251 (remote_state) <get_remote_arch_state>: Declare method.
3252 <get_remote_arch_state>: New field.
3253 (remote_arch_state) <remote_arch_state>: Declare ctor.
3254 <regs>: Now a unique_ptr.
3255 (remote_gdbarch_data_handle): Delete.
3256 (get_remote_arch_state): Delete.
3257 (remote_state::get_remote_arch_state): New.
3258 (get_remote_state): Adjust to call remote_state's
3259 get_remote_arch_state method.
3260 (init_remote_state): Delete, bits factored out to ...
3261 (remote_arch_state::remote_arch_state): ... this new method.
3262 (get_remote_packet_size, get_memory_packet_size)
3263 (process_g_packet, remote_target::fetch_registers)
3264 (remote_target::prepare_to_store, store_registers_using_G)
3265 (remote_target::store_registers, remote_target::get_trace_status):
3266 Adjust to call remote_state's method.
3267 (_initialize_remote): Remove reference to
3268 remote_gdbarch_data_handle.
3270 2018-05-22 Pedro Alves <palves@redhat.com>
3272 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3273 pread>: New method declarations.
3274 (remote_target::open_1): Adjust.
3275 (readahead_cache_invalidate): Rename to ...
3276 (readahead_cache::invalidate): ... this, and adjust to be a class
3278 (readahead_cache_invalidate_fd): Rename to ...
3279 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3281 (remote_hostio_pwrite): Adjust.
3282 (remote_hostio_pread_from_cache): Rename to ...
3283 (readahead_cache::pread): ... this, and adjust to be a class
3285 (remote_hostio_close): Adjust.
3287 2018-05-22 Pedro Alves <palves@redhat.com>
3289 * remote.c (remote_hostio_close_cleanup): Delete.
3290 (class scoped_remote_fd): New.
3291 (remote_file_put, remote_file_get): Use it.
3293 2018-05-22 Pedro Alves <palves@redhat.com>
3295 (struct vCont_action_support): Use bool and initialize all fields.
3296 (struct readahead_cache): Initialize all fields.
3297 (remote_state): Use bool and initialize all fields.
3298 (remote_state::remote_state, remote_state::~remote_state): New.
3299 (new_remote_state): Delete.
3300 (_initialize_remote): Use new to allocate remote_state.
3302 2018-05-22 Pedro Alves <palves@redhat.com>
3306 * c-exp.y: Include "c-support.h".
3307 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3308 of tolower. Use c_ident_is_alpha to scan names.
3309 * c-lang.c: Include "c-support.h".
3310 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3311 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3312 * c-support.h: New file, with bits factored out from ...
3313 * cp-name-parser.y: ... this file.
3314 Include "c-support.h".
3315 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3316 c-support.h and renamed.
3317 (symbol_end, yylex): Adjust.
3319 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3321 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3322 parameter type to CORE_ADDR.
3323 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3324 parameter type in declaration to CORE_ADDR.
3325 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3326 target_auxv_search to get AT_HWCAP and use the result to get the
3328 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3329 to CORE_ADDR. Remove the cast of the return value to unsigned
3330 long. Fix error predicate of target_auxv_search.
3331 (ppc_linux_nat_target::read_description): Change the type of the
3332 hwcap variable to CORE_ADDR.
3334 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3336 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3337 if the size of fpscr is larger than 32 bits.
3339 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3341 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3342 (ppc32_linux_vsxregmap): New global.
3343 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3344 regcache_supply_regset, and regcache_collect_regset.
3345 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3346 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3347 (fetch_vsx_register, store_vsx_register): Remove.
3348 (fetch_vsx_registers): Add regno parameter. Get regset using
3349 ppc_linux_vsxregset. Use regset to supply registers.
3350 (store_vsx_registers): Add regno parameter. Get regset using
3351 ppc_linux_vsxregset. Use regset to collect registers.
3352 (fetch_register): Call fetch_vsx_registers instead of
3354 (store_register): Call store_vsx_registers instead of
3356 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3357 new regno parameter.
3358 (store_ppc_registers): Call store_vsx_registers with -1 for the
3359 new regno parameter.
3360 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3361 (ppc_collect_vsxregset): Remove.
3363 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3365 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3367 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3368 for vector register offset fields.
3369 (ppc64_fbsd_reg_offsets): Likewise.
3370 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3371 to vector register offset fields.
3372 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3373 to vector register offset fields.
3374 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3375 vector register offset fields.
3376 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3377 initializers for vector register offset fields.
3378 (rs6000_aix64_reg_offsets): Likewise.
3379 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3380 (ppc_supply_vrregset): Remove.
3381 (ppc_collect_vrregset): Remove.
3382 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3383 (ppc_linux_vrregset) : New function.
3384 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3385 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3386 (ppc32_linux_vrregset): Remove.
3387 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3388 and use result instead of ppc32_linux_vrregset.
3389 (ppc32_linux_reg_offsets): Remove initializers for vector register
3391 (ppc64_linux_reg_offsets): Likewise.
3392 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3393 * ppc-linux-nat.c: Include regset.h.
3394 (gdb_vrregset_t): Adjust comment to account for little-endian
3396 (supply_vrregset, fill_vrregset): Remove.
3397 (fetch_altivec_register, store_altivec_register): Remove.
3398 (fetch_altivec_registers): Add regno parameter. Get regset using
3399 ppc_linux_vrregset. Use regset to supply registers.
3400 (store_altivec_registers): Add regno parameter. Get regset using
3401 ppc_linux_vrregset. Use regset to collect registers.
3402 (fetch_register): Call fetch_altivec_registers instead of
3403 fetch_altivec_register.
3404 (store_register): Call store_altivec_registers instead of
3405 store_altivec_register.
3406 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3407 the new regno parameter.
3408 (store_ppc_registers): Call store_altivec_registers with -1 for
3409 the new regno parameter.
3411 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3413 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3414 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3415 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3416 (gdb_vrregset_t): Change array type size to
3417 PPC_LINUX_SIZEOF_VRREGSET.
3418 (gdb_vsxregset_t): Change array type size to
3419 PPC_LINUX_SIZEOF_VSXREGSET.
3420 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3421 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3422 PPC_LINUX_SIZEOF_VSXREGSET.
3424 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3426 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3427 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3429 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3430 ppc_linux_target_wordsize with tid.
3431 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3433 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3434 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3435 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3436 tid parameter. Remove static specifier.
3437 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3438 (ppc_linux_target_wordsize): New declaration.
3440 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3442 * arch/ppc-linux-common.c: New file.
3443 * arch/ppc-linux-common.h: New file.
3444 * arch/ppc-linux-tdesc.h: New file.
3445 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3446 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3447 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3448 arch/ppc-linux-tdesc.h.
3449 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3450 arch/ppc-linux-tdesc.h.
3451 (ppc_linux_nat_target::read_description): Remove target
3452 description matching code. Fill a ppc_linux_features struct and
3453 call ppc_linux_match_description with it. Move comment about ISA
3454 2.05 to ppc-linux-common.c.
3455 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3456 arch/ppc-linux-tdesc.h.
3457 (ppc_linux_core_read_description): Remove target description
3458 matching code. Fill a ppc_linux_features struct and call
3459 ppc_linux_match_description with it.
3460 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3461 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3462 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3463 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3464 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3465 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3466 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3467 (tdesc_powerpc_e500l): Remove.
3469 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3471 * ada-lang.c (catch_assert_command): Pass empty string instead
3472 of NULL for excep_string argument.
3474 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3476 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3477 the width of the requested register exceeds the width of the
3480 2018-05-21 Tom Tromey <tom@tromey.com>
3482 * printcmd.c (output_command): Remove.
3483 (output_command_const): Rename to output_command.
3484 * valprint.h (output_command): Rename from output_command_const.
3485 * tracepoint.c (trace_dump_actions): Call output_command.
3487 2018-05-21 Tom Tromey <tom@tromey.com>
3489 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3490 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3491 * ada-lang.h (create_ada_exception_catchpoint): Update.
3492 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3494 (create_excep_cond_exprs, ~ada_catchpoint)
3495 (should_stop_exception, print_one_exception)
3496 (print_mention_exception, print_recreate_exception): Update.
3497 (ada_get_next_arg): Remove.
3498 (catch_ada_exception_command_split): Use std::string. Change type
3499 of "excep_string", "cond_string".
3500 (catch_ada_exception_command): Update.
3501 (create_ada_exception_catchpoint): Change type of excep_string.
3502 (ada_exception_sal): Remove excep_string parameter.
3503 (~ada_catchpoint): Remove.
3505 2018-05-21 Tom Tromey <tom@tromey.com>
3507 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3510 2018-05-21 Tom Tromey <tom@tromey.com>
3512 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3513 Return unique_xmalloc_ptr.
3514 (print_it_exception): Update.
3516 2018-05-21 Tom Tromey <tom@tromey.com>
3518 * tracepoint.c (trace_dump_actions): Use std::string.
3520 2018-05-21 Tom Tromey <tom@tromey.com>
3522 * symfile.c (reread_symbols): Use std::string for original_name.
3524 2018-05-21 Tom Tromey <tom@tromey.com>
3526 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3527 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3530 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3532 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3534 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3535 * objfiles.c (get_objfile_bfd_data): Allocate
3536 objfile_per_bfd_storage with obstack_new when allocating on
3539 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3541 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3543 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3544 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3545 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3546 (add_pending): Likewise.
3547 (parse_symbol): Likewise.
3548 (parse_partial_symbols): Likewise.
3549 (psymtab_to_symtab_1): Likewise.
3550 (new_psymtab): Likewise.
3551 (elfmdebug_build_psymtabs): Likewise.
3552 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3553 * objfiles.c (get_objfile_bfd_data): Likewise.
3554 (objfile_register_static_link): Likewise.
3555 * psymtab.c (allocate_psymtab): Likewise.
3556 * stabsread.c (read_member_functions): Likewise.
3557 * xcoffread.c (xcoff_end_psymtab): Likewise.
3559 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3561 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3562 compiler supports std::is_trivially_constructible.
3563 * common/poison.h: Include obstack.h.
3564 (IsMallocable): Define to is_trivially_constructible if the
3565 compiler supports it, define to true_type otherwise.
3569 (XOBNEWVEC): Redefine.
3570 * gdb_obstack.h (obstack_zalloc): New.
3571 (OBSTACK_ZALLOC): Redefine.
3572 (obstack_calloc): New.
3573 (OBSTACK_CALLOC): Redefine.
3575 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3576 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3578 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3579 obstack_calloc/obstack_zalloc.
3580 (gdbarch_obstack_zalloc): Remove.
3581 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3583 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3585 * stack.c (backtrace_command_1): Remove useless variable int i.
3587 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3589 * stack.c (print_frame_info): Fix comment.
3591 2018-05-18 Tom Tromey <tom@tromey.com>
3593 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3594 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3595 (~dwarf2_per_objfile): Update
3596 (dwarf2_get_dwz_file): Use new.
3597 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3600 2018-05-18 Tom Tromey <tom@tromey.com>
3602 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3604 * dwarf2read.c (struct dwp_file): Add constructor and
3606 (open_and_init_dwp_file): Return a unique_ptr.
3607 (dwarf2_per_objfile, create_dwp_hash_table)
3608 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3609 (lookup_dwo_unit_in_dwp): Update.
3610 (open_and_init_dwp_file, get_dwp_file): Update.
3612 2018-05-18 Tom Tromey <tom@tromey.com>
3614 * dwarf2read.c (dwarf2_per_objfile): Update.
3615 (struct mapped_index): Add initializers.
3616 (dwarf2_read_index): Use new.
3617 (dw2_symtab_iter_init): Update.
3618 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3621 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3623 * dwarf2read.c (mapped_index) <total_size>: Remove.
3625 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3627 * unittests/format_pieces-selftests.c (test_format_specifier):
3630 2018-05-18 Tom Tromey <tom@tromey.com>
3632 * c-typeprint.c (maybe_print_hole): New function.
3633 (c_print_type_struct_field_offset): Update.
3634 (c_type_print_base_struct_union): Call maybe_print_hole.
3636 2018-05-17 Keith Seitz <keiths@redhat.com>
3638 * breakpoint.c (build_bpstat_chain): New function, moved from
3640 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3641 If no stop chain is passed, call build_bpstat_chain to build it.
3642 * breakpoint.h (build_bpstat_chain): Declare.
3643 (bpstat_stop_status): Move documentation here from breakpoint.c.
3644 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3645 build the stop chain and pass it to skip_inline_frames.
3646 Pass this stop chain to bpstat_stop_status.
3647 * inline-frame.c: Include breakpoint.h.
3648 (stopped_by_user_bp_inline_frame): New function.
3649 (skip_inline_frames): Add parameter `stop_chain'.
3650 Move documention to inline-frame.h.
3651 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3652 whether the frame should be elided.
3653 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3654 Add moved documentation and update for new parameter.
3656 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3659 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3660 unittests/format_pieces-selftests.c.
3661 * common/format.h (format_piece) <operator==>: New.
3662 (format_pieces) <operator[]>: Remove.
3663 * common/format.c (format_pieces::format_pieces): Handle \e.
3664 * unittests/format_pieces-selftests.c: New.
3666 2018-05-17 Tom Tromey <tom@tromey.com>
3669 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3670 (dw2_instantiate_symtab): Add skip_partial parameter.
3671 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3672 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3673 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3674 (dw2_expand_symtabs_matching_one)
3675 (dw2_find_pc_sect_compunit_symtab)
3676 (dw2_debug_names_lookup_symbol)
3677 (dw2_debug_names_expand_symtabs_for_function): Update.
3678 (init_cutu_and_read_dies): Add skip_partial parameter.
3679 (process_psymtab_comp_unit, build_type_psymtabs_1)
3680 (process_skeletonless_type_unit, load_partial_comp_unit)
3681 (psymtab_to_symtab_1): Update.
3682 (load_full_comp_unit): Add skip_partial parameter.
3683 (process_imported_unit_die, dwarf2_read_addr_index)
3684 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3685 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3686 (read_signatured_type): Update.
3688 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3690 * value.c (release_value): Remove unused variable.
3691 (record_latest_value): Likewise.
3692 (access_value_history): Likewise.
3693 (preserve_values): Likewise.
3695 2018-05-17 Tom Tromey <tom@tromey.com>
3697 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3700 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3703 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3704 Also handle registers whose width is not a multiple of
3706 (linux_nat_trad_target::store_register): Likewise.
3708 2018-05-16 Tom Tromey <tom@tromey.com>
3710 * gdbcore.h (core_bfd): Redefine.
3711 * corelow.c (core_target::close): Update.
3712 (core_target_open): Update.
3713 * progspace.h (struct program_space) <cbfd>: Now a
3716 2018-05-16 Tom Tromey <tom@tromey.com>
3719 * symfile-add-flags.h (enum symfile_add_flags)
3720 <SYMFILE_NOT_FILENAME>: New constant.
3721 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3722 objfile name from BFD.
3723 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3724 * minidebug.c (find_separate_debug_file_in_section): Put
3725 ".gnu_debugdata" into BFD's file name.
3727 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3729 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3732 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3735 * aarch64-tdep.c (aarch64_analyze_prologue,
3736 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3737 Indicate not interested in errors.
3739 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3741 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3742 Supply the MIPS_ZERO_REGNUM register.
3744 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3746 * mips-tdep.c (mask_address_var): Make variable static.
3748 2018-05-14 Tom Tromey <tom@tromey.com>
3750 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3752 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3754 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3755 FXSAVE_ADDR for the mxcsr register.
3757 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3759 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3761 2018-05-11 Pedro Alves <palves@redhat.com>
3763 * corelow.c (core_target) <core_target>: No longer inline.
3764 Initialize m_core_gdbarch, m_core_vec and build the section table
3766 <~core_target>: New.
3767 <core_gdbarch, get_core_register_section>: New methods.
3768 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3769 factored out from ...
3770 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3772 (sniff_core_bfd): Add gdbarch parameter.
3773 (core_close): Delete, merged into ...
3774 (core_target::close): ... here. Delete self.
3775 (core_close_cleanup): Delete.
3776 (core_target_open): Allocate a core_target on the heap. Use a
3777 unique_ptr instead of a cleanup. Bits moved into the core_target
3778 ctor. Adjust to use core_target methods instead of globals.
3779 (get_core_register_section): Rename to ...
3780 (core_target::get_core_register_section): ... this and adjust.
3781 (struct get_core_registers_cb_data): New.
3782 (get_core_registers_cb): Use it. Use bool.
3783 (core_target::fetch_registers, core_target::files_info)
3784 (core_target::xfer_partial, core_target::read_description)
3785 (core_target::pid_to, core_target::thread_name): Adjust to
3786 reference class fields instead of globals.
3787 * target.h (struct target_ops_deleter, target_ops_up): New.
3789 2018-05-11 Pedro Alves <palves@redhat.com>
3791 * corefile.c (core_file_command): Move to corelow.c.
3792 * corelow.c (the_core_target): Delete.
3793 (core_file_command): Moved from corefile.c. Check exec_bfd
3794 instead of the_core_target. Use target_detach instead of calling
3795 into the_core_target directly.
3796 (maybe_say_no_core_file_now): New.
3797 (core_target::detach): Use it.
3798 (_initialize_corelow): Remove references to the_core_target.
3799 * gdbcore.h (the_core_target): Delete.
3801 2018-05-11 Tom Tromey <tromey@redhat.com>
3802 Pedro Alves <palves@redhat.com>
3804 * corefile.c (core_bfd): Remove.
3805 * gdbcore.h (core_bfd): Now a macro.
3806 * progspace.h (struct program_space) <cbfd>: New field.
3808 2018-05-11 Tom Tromey <tom@tromey.com>
3810 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3813 2018-05-10 Tom Tromey <tom@tromey.com>
3815 * configure: Rebuild.
3816 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3818 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3821 * regformats/regdat.sh: Adjust script, following the addition
3822 of the new expedite_regs parameter to init_target_desc.
3824 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3827 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3828 set_gdbarch_significant_addr_bit.
3829 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3830 set_gdbarch_significant_addr_bit.
3831 * utils.c (address_significant): Update to sign extend addr.
3833 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3835 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3836 (xtensa_linux_init_abi): Limit tdep->num_regs by
3837 tdep->num_nopriv_regs.
3838 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3839 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3842 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3844 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3846 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3848 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3849 (I387_MXCSR_INIT_VAL): New constant.
3850 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3851 buffer if it was supplied by the inferior.
3852 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3853 (i387_xsave_get_clear_bv): New function.
3854 (i387_supply_xsave): Only read x87 control registers from the
3855 xsave buffer if the feature is enabled, and the state will have
3856 been written, otherwise, provide a suitable default.
3857 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3858 including x87 control registers. Update control registers if they
3859 have changed from the default value, and mark features as enabled
3861 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3863 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3865 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3867 2018-05-07 Tom Tromey <tom@tromey.com>
3869 * configure: Rebuild.
3870 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3872 2018-05-07 Tom Tromey <tom@tromey.com>
3875 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3876 bit. Use correct value for VDIV.
3878 2018-05-04 Tom Tromey <tom@tromey.com>
3880 * configure: Rebuild.
3881 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3883 2018-05-04 Tom Tromey <tom@tromey.com>
3885 * linux-record.c (record_linux_system_call) <case
3886 RECORD_SYS_RECVFROM>: Add "break".
3888 2018-05-04 Tom Tromey <tom@tromey.com>
3890 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3891 Add missing "break".
3892 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3893 Add missing "break".
3895 2018-05-04 Tom Tromey <tom@tromey.com>
3897 * rs6000-tdep.c (ppc_process_record_op4)
3898 (ppc_process_record_op63): Add fall-through comment.
3900 2018-05-04 Tom Tromey <tom@tromey.com>
3902 * i386-tdep.c (i386_process_record): Add fall-through comment.
3904 2018-05-04 Tom Tromey <tom@tromey.com>
3906 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3909 2018-05-04 Tom Tromey <tom@tromey.com>
3911 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3912 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3913 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3915 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3917 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3920 2018-05-04 Tom Tromey <tom@tromey.com>
3922 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3924 2018-05-04 Tom Tromey <tom@tromey.com>
3926 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3927 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3928 * symfile.c (section_is_mapped): Fix fall-through comment.
3929 * stabsread.c (define_symbol, read_member_functions): Fix
3930 fall-through comment.
3931 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3933 * remote.c (remote_wait_as): Fix fall-through comment.
3934 * p-exp.y (yylex): Fix fall-through comment.
3935 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3937 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3938 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3939 * jv-exp.y (yylex): Fix fall-through comment.
3940 * go-exp.y (lex_one_token): Fix fall-through comment.
3941 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3942 fall-through comment.
3943 * f-exp.y (yylex): Fix fall-through comment.
3944 * dwarf2read.c (process_die): Fix fall-through comments.
3945 * dbxread.c (process_one_symbol): Fix fall-through comment.
3946 * d-exp.y (lex_one_token): Fix fall-through comment.
3947 * cp-name-parser.y (yylex): Fix fall-through comment.
3948 * coffread.c (coff_symtab_read): Fix fall-through comment.
3949 * c-exp.y (lex_one_token): Fix fall-through comment.
3950 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3952 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3955 2018-05-04 Tom Tromey <tom@tromey.com>
3958 * NEWS: Mention gdb.execute change.
3959 * gdbcmd.h (execute_control_command): Don't declare.
3960 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3961 execute_control_commands, execute_control_commands_to_string.
3962 * cli/cli-script.h (execute_control_commands)
3963 (execute_control_commands_to_string): Declare.
3964 (execute_control_command): Add from_tty parameter.
3965 * cli/cli-script.c (execute_control_commands)
3966 (execute_control_commands_to_string): New functions.
3967 (execute_user_command): Use execute_control_commands.
3968 (execute_control_command_1): Add "from_tty" parameter. Update.
3969 (execute_control_command): Likewise.
3971 2018-05-04 Tom Tromey <tom@tromey.com>
3974 * NEWS: Mention that breakpoint commands are writable.
3975 * python/py-breakpoint.c (bppy_set_commands): New function.
3976 (breakpoint_object_getset) <"commands">: Use it.
3978 2018-05-04 Tom Tromey <tom@tromey.com>
3980 * tracepoint.c (actions_command): Update.
3981 * mi/mi-cmd-break.c (mi_command_line_array)
3982 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3983 (mi_read_next_line): Remove.
3984 (mi_cmd_break_commands): Update.
3985 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3987 * cli/cli-script.c (get_command_line): Update.
3988 (process_next_line): Use function_view. Constify.
3989 (recurse_read_control_structure, read_command_lines)
3990 (read_command_lines_1): Change argument types to function_view.
3991 (do_define_command, document_command): Update.
3992 * breakpoint.h (check_tracepoint_command): Don't declare.
3993 * breakpoint.c (check_tracepoint_command): Remove.
3994 (commands_command_1, create_tracepoint_from_upload): Update.
3996 2018-05-04 Tom Tromey <tom@tromey.com>
3999 * cli/cli-script.h (enum command_control_type) <define_control>:
4001 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4002 (build_command_line, execute_control_command_1)
4003 (process_next_line): Likewise.
4004 (do_define_command): New function, extracted from define_command.
4005 (define_command): Use it.
4007 2018-05-04 Tom Tromey <tom@tromey.com>
4009 * tracepoint.c (actions_command): Update.
4010 * cli/cli-script.h (read_command_lines): Update.
4011 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4012 (MAX_TMPBUF): Remove define.
4013 (define_command): Use string_printf.
4014 (document_command): Likewise.
4015 * breakpoint.c (commands_command_1): Update.
4017 2018-05-04 Tom Tromey <tom@tromey.com>
4019 * top.c (execute_command): Update.
4020 * cli/cli-script.h (print_command_lines): Now varargs.
4021 * cli/cli-script.c (print_command_lines): Now varargs.
4022 (execute_control_command_1) <case while_control, case if_control>:
4025 2018-05-04 Tom Tromey <tom@tromey.com>
4027 * tracepoint.c (all_tracepoint_actions): Rename from
4028 all_tracepoint_actions_and_cleanup. Change return type.
4029 (actions_command, encode_actions_1, encode_actions)
4030 (trace_dump_actions, tdump_command): Update.
4031 * remote.c (remote_download_command_source): Update.
4032 * python/python.c (gdbpy_eval_from_control_command)
4033 (python_command, python_interactive_command): Update.
4034 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4035 * guile/guile.c (guile_command)
4036 (gdbscm_eval_from_control_command, guile_command): Update.
4037 * compile/compile.c (compile_code_command)
4038 (compile_print_command, compile_to_object): Update.
4039 * cli/cli-script.h (struct command_lines_deleter): New.
4040 (counted_command_line): New typedef.
4041 (struct command_line): Add constructor, destructor.
4042 <body_list>: Remove.
4043 <body_list_0, body_list_1>: New members.
4044 (command_line_up): Remove typedef.
4045 (read_command_lines, read_command_lines_1, get_command_line):
4047 (copy_command_lines): Don't declare.
4048 * cli/cli-script.c (build_command_line): Use "new".
4049 (get_command_line): Return counted_command_line.
4050 (print_command_lines, execute_user_command)
4051 (execute_control_command_1, while_command, if_command): Update.
4052 (realloc_body_list): Remove.
4053 (process_next_line, recurse_read_control_structure): Update.
4054 (read_command_lines, read_command_lines_1): Return counted_command_line.
4055 (free_command_lines): Use "delete".
4056 (copy_command_lines): Remove.
4057 (define_command, document_command, show_user_1): Update.
4058 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4059 a counted_command_line.
4060 * breakpoint.h (counted_command_line): Remove typedef.
4061 (breakpoint_set_commands): Update.
4062 * breakpoint.c (check_no_tracepoint_commands)
4063 (validate_commands_for_breakpoint): Update.
4064 (breakpoint_set_commands): Change commands to be a
4065 counted_command_line.
4066 (commands_command_1, update_dprintf_command_list)
4067 (create_tracepoint_from_upload): Update.
4069 2018-05-04 Tom Tromey <tom@tromey.com>
4071 * cli/cli-decode.h (cmd_list_element): New constructor.
4072 (~cmd_list_element): New destructor.
4073 (struct cmd_list_element): Add initializers.
4074 * cli/cli-decode.c (do_add_cmd): Use "new".
4075 (delete_cmd): Use "delete".
4077 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4078 Pedro Alves <palves@redhat.com>
4080 PR breakpoints/19806 and support for PR external/20207.
4081 * NEWS: Mention Aarch64 watchpoint improvements.
4082 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4083 watchpoints and PR external/20207 watchpoints.
4084 * nat/aarch64-linux-hw-point.c
4085 (kernel_supports_any_contiguous_range): New.
4086 (aarch64_watchpoint_offset): New.
4087 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4088 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4089 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4090 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4091 next_addr_orig_p. Support PR external/20207 watchpoints.
4092 (aarch64_downgrade_regs): New.
4093 (aarch64_dr_state_insert_one_point): New parameters offset and
4095 (aarch64_dr_state_remove_one_point): Likewise.
4096 (aarch64_handle_breakpoint): Update caller.
4097 (aarch64_handle_aligned_watchpoint): Likewise.
4098 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4100 (aarch64_linux_set_debug_regs): Remove const from state. Call
4101 aarch64_downgrade_regs.
4102 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4103 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4104 (DR_CONTROL_MASK): ... this.
4105 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4106 (unsigned int aarch64_watchpoint_offset): New prototype.
4107 (aarch64_linux_set_debug_regs): Remove const from state.
4108 * utils.c (align_up, align_down): Move to ...
4109 * common/common-utils.c (align_up, align_down): ... here.
4110 * utils.h (align_up, align_down): Move to ...
4111 * common/common-utils.h (align_up, align_down): ... here.
4113 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4115 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4116 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4117 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4118 Re-implement to match the ABI as summarized in GCC's
4119 gcc/config/sparc/sparc.c. All callers updated.
4120 (sparc32_store_arguments): Remove assertion.
4122 2018-05-04 Tom Tromey <tom@tromey.com>
4124 * printcmd.c: Don't include tui.h.
4125 (decode_format): Use skip_spaces.
4127 2018-05-04 Tom Tromey <tom@tromey.com>
4130 * printcmd.c (last_count): New global.
4131 (x_command): Use saved count when repeating.
4133 2018-05-04 Tom Tromey <tom@tromey.com>
4135 * nto-procfs.c (do_closedir_cleanup): Remove.
4136 (procfs_pidlist): Use gdb_dir_up.
4137 * procfs.c (do_closedir_cleanup): Remove.
4138 (proc_update_threads): Use gdb_dir_up.
4139 * common/filestuff.h (struct gdb_dir_deleter): New.
4140 (gdb_dir_up): New typedef.
4142 2018-05-04 Tom Tromey <tom@tromey.com>
4144 * ada-lang.c (print_mention_exception): Use std::string.
4146 2018-05-04 Tom Tromey <tom@tromey.com>
4148 * ada-lang.c (create_excep_cond_exprs): Update.
4149 (ada_exception_catchpoint_cond_string): Use std::string.
4151 2018-05-04 Tom Tromey <tom@tromey.com>
4153 * ada-lang.c (xget_renaming_scope): Return std::string.
4154 (old_renaming_is_invisible): Update.
4156 2018-05-04 Tom Tromey <tom@tromey.com>
4158 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4159 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4161 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4163 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4165 2018-05-04 Tom Tromey <tom@tromey.com>
4167 * remote.c (remote_query_supported_append): Change type.
4168 (remote_check_symbols): Update.
4170 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4173 * configure.ac: Prepend libpython.
4174 * python/python-config.py: Likewise.
4175 * configure: Regenerate.
4177 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4179 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4181 2018-05-03 Pedro Alves <palves@redhat.com>
4184 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4185 override. Write 'true' instead of '1'.
4186 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4189 2018-05-02 Pedro Alves <palves@redhat.com>
4191 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4192 add_inf_child_target.
4193 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4194 add_inf_child_target.
4195 * aix-thread.c (aix_thread_target_info): New.
4196 (aix_thread_target) <shortname, longname, doc>: Delete.
4198 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4199 add_inf_child_target.
4200 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4201 add_inf_child_target.
4202 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4203 add_inf_child_target.
4204 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4205 add_inf_child_target.
4206 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4207 add_inf_child_target.
4208 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4209 add_inf_child_target.
4210 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4211 add_inf_child_target.
4212 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4213 add_inf_child_target.
4214 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4215 add_inf_child_target.
4216 * bfd-target.c (target_bfd_target_info): New.
4217 (target_bfd) <shortname, longname, doc>: Delete.
4219 * bsd-kvm.c (bsd_kvm_target_info): New.
4220 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4222 (bsd_kvm_target::open): Rename to ...
4223 (bsd_kvm_target_open): ... this. Adjust.
4224 * bsd-uthread.c (bsd_uthread_target_info): New.
4225 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4227 * corefile.c (core_file_command): Adjust.
4228 * corelow.c (core_target_info): New.
4229 (core_target) <shortname, longname, doc>: Delete.
4231 (core_target::open): Rename to ...
4232 (core_target_open): ... this. Adjust.
4233 * ctf.c (ctf_target_info): New.
4234 (ctf_target) <shortname, longname, doc>: Delete.
4236 (ctf_target::open): Rename to ...
4237 (ctf_target_open): ... this.
4238 (_initialize_ctf): Adjust.
4239 * exec.c (exec_target_info): New.
4240 (exec_target) <shortname, longname, doc>: Delete.
4242 (exec_target::open): Rename to ...
4243 (exec_target_open): ... this.
4244 * gdbcore.h (core_target_open): Declare.
4245 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4246 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4247 add_inf_child_target.
4248 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4249 add_inf_child_target.
4250 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4251 add_inf_child_target.
4252 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4253 add_inf_child_target.
4254 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4255 add_inf_child_target.
4256 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4257 add_inf_child_target.
4258 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4259 add_inf_child_target.
4260 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4261 add_inf_child_target.
4262 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4263 add_inf_child_target.
4264 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4265 add_inf_child_target.
4266 * inf-child.c (inf_child_target_info): New.
4267 (inf_child_target::info): New.
4268 (inf_child_open_target): Remove 'target' parameter. Use
4269 get_native_target instead.
4270 (inf_child_target::open): Delete.
4271 (add_inf_child_target): New.
4272 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4275 (add_inf_child_target): Declare.
4276 (inf_child_open_target): Declare.
4277 * linux-thread-db.c (thread_db_target_info): New.
4278 (thread_db_target) <shortname, longname, doc>: Delete.
4280 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4281 add_inf_child_target.
4282 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4283 add_inf_child_target.
4284 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4285 add_inf_child_target.
4286 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4287 add_inf_child_target.
4288 * make-target-delegates (print_class): Adjust.
4289 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4290 add_inf_child_target.
4291 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4292 add_inf_child_target.
4293 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4294 add_inf_child_target.
4295 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4296 add_inf_child_target.
4297 * nto-procfs.c (nto_native_target_info): New.
4298 (nto_procfs_target_native) <shortname, longname, doc>:
4301 (nto_procfs_target_info): New.
4302 (nto_procfs_target_procfs) <shortname, longname, doc>:
4305 (init_procfs_targets): Adjust.
4306 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4307 add_inf_child_target.
4308 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4309 add_inf_child_target.
4310 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4311 add_inf_child_target.
4312 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4313 add_inf_child_target.
4314 * ravenscar-thread.c (ravenscar_target_info): New.
4315 (ravenscar_thread_target) <shortname, longname, doc>:
4318 * record-btrace.c (record_btrace_target_info):
4319 (record_btrace_target) <shortname, longname, doc>: Delete.
4321 (record_btrace_target::open): Rename to ...
4322 (record_btrace_target_open): ... this. Adjust.
4323 * record-full.c (record_longname, record_doc): New.
4324 (record_full_base_target) <shortname, longname, doc>: Delete.
4326 (record_full_target_info): New.
4327 (record_full_target): <shortname>: Delete.
4329 (record_full_core_open_1, record_full_open_1): Update comments.
4330 (record_full_base_target::open): Rename to ...
4331 (record_full_open): ... this.
4332 (cmd_record_full_restore): Update.
4333 (_initialize_record_full): Update.
4334 * remote-sim.c (remote_sim_target_info): New.
4335 (gdbsim_target) <shortname, longname, doc>: Delete.
4337 (gdbsim_target::open): Rename to ...
4338 (gdbsim_target_open): ... this.
4339 (_initialize_remote_sim): Adjust.
4340 * remote.c (remote_doc): New.
4341 (remote_target_info): New.
4342 (remote_target) <shortname, longname, doc>: Delete.
4344 (extended_remote_target_info): New.
4345 (extended_remote_target) <shortname, longname, doc>: Delete.
4347 (remote_target::open_1): Make static. Adjust.
4348 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4349 * s390-linux-nat.c (_initialize_s390_nat): Use
4350 add_inf_child_target.
4351 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4352 add_inf_child_target.
4353 * sol-thread.c (thread_db_target_info): New.
4354 (sol_thread_target) <shortname, longname, doc>: Delete.
4356 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4357 add_inf_child_target.
4358 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4359 add_inf_child_target.
4360 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4361 add_inf_child_target.
4362 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4363 add_inf_child_target.
4364 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4365 add_inf_child_target.
4366 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4367 add_inf_child_target.
4368 * spu-linux-nat.c (_initialize_spu_nat): Use
4369 add_inf_child_target.
4370 * spu-multiarch.c (spu_multiarch_target_info): New.
4371 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4373 * target-delegates.c: Regenerate.
4374 * target.c: Include <unordered_map>.
4375 (target_ops_p): Delete.
4376 (DEF_VEC_P(target_ops_p)): Delete.
4377 (target_factories): New.
4378 (test_target_info): New.
4379 (test_target_ops::info): New.
4380 (open_target): Adjust to use target_factories.
4381 (add_target_with_completer): Rename to ...
4382 (add_target): ... this. Change prototype. Register target_info
4383 and open callback in target_factories. Register target_info in
4384 command context instead of target_ops.
4385 (add_target): Delete old implementation.
4386 (add_deprecated_target_alias): Change prototype. Adjust.
4387 (the_native_target): New.
4388 (set_native_target, get_native_target): New.
4389 (find_default_run_target): Use the_native_target.
4390 (find_attach_target, find_run_target): Simplify.
4391 (target_ops::open): Delete.
4392 (dummy_target_info): New.
4393 (dummy_target::shortname, dummy_target::longname)
4394 (dummy_target::doc): Delete.
4395 (dummy_target::info): New.
4396 (debug_target::shortname, debug_target::longname)
4397 (debug_target::doc): Delete.
4398 (debug_target::info): New.
4399 * target.h (struct target_info): New.
4400 (target_ops::~target_ops): Add comment.
4401 (target_ops::info): New.
4402 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4403 longer virtual. Implement in terms of target_info.
4404 (set_native_target, get_native_target): Declare.
4405 (target_open_ftype): New.
4406 (add_target, add_target_with_completer)
4407 (add_deprecated_target_alias): Change prototype.
4408 (test_target) <shortname, longname, doc>: Delete.
4410 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4411 add_inf_child_target.
4412 * tracefile-tfile.c (tfile_target_info): New.
4413 (tfile_target) <shortname, longname, doc>: Delete.
4415 (tfile_target::open): Rename to ...
4416 (tfile_target_open): ... this.
4417 (_initialize_tracefile_tfile): Adjust.
4418 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4419 add_inf_child_target.
4420 * windows-nat.c (_initialize_windows_nat): Use
4421 add_inf_child_target.
4422 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4423 add_inf_child_target.
4425 2018-05-02 Pedro Alves <palves@redhat.com>
4427 * linux-nat.h (linux_nat_target) <low_new_thread,
4428 low_delete_thread, low_new_fork, low_forget_process,
4429 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4430 New virtual methods.
4431 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4432 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4433 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4434 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4435 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4437 * linux-fork.c (delete_fork): Adjust to call low method.
4438 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4439 (linux_nat_new_fork, linux_nat_forget_process_hook)
4440 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4441 (linux_nat_status_is_event):
4442 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4443 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4445 (sigtrap_is_event): Rename to ...
4446 (linux_nat_target::low_status_is_event): ... this.
4447 (linux_nat_set_status_is_event): Delete.
4448 (save_stop_reason, linux_nat_wait_1)
4449 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4451 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4452 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4453 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4454 (linux_nat_set_prepare_to_resume): Delete.
4455 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4456 low virtual methods.
4457 * amd64-linux-nat.c: Likewise.
4458 * arm-linux-nat.c: Likewise.
4459 * i386-linux-nat.c: Likewise.
4460 * ia64-linux-nat.c: Likewise.
4461 * mips-linux-nat.c: Likewise.
4462 * ppc-linux-nat.c: Likewise.
4463 * s390-linux-nat.c: Likewise.
4464 * sparc64-linux-nat.c: Likewise.
4465 * x86-linux-nat.c: Likewise.
4466 * x86-linux-nat.h: Include "nat/x86-linux.h".
4467 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4468 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4471 2018-05-02 Pedro Alves <palves@redhat.com>
4473 * target.h (target_ops)
4474 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4475 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4476 stopped_by_watchpoint, have_continuable_watchpoint,
4477 stopped_data_address, watchpoint_addr_within_range,
4478 can_accel_watchpoint_condition, can_run, thread_alive,
4479 has_all_memory, has_memory, has_stack, has_registers,
4480 has_execution, can_async_p, is_async_p, supports_non_stop,
4481 always_non_stop_p, can_execute_reverse, supports_multi_process,
4482 supports_enable_disable_tracepoint,
4483 supports_disable_randomization, supports_string_tracing,
4484 supports_evaluation_of_breakpoint_conditions,
4485 can_run_breakpoint_commands, filesystem_is_local,
4486 can_download_tracepoint, get_trace_state_variable_value,
4487 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4488 record_is_replaying, record_will_replay,
4489 augmented_libraries_svr4_read>: Adjust to return bool.
4490 * aarch64-linux-nat.c: All implementations adjusted.
4491 * aix-thread.c: All implementations adjusted.
4492 * arm-linux-nat.c: All implementations adjusted.
4493 * breakpoint.c: All implementations adjusted.
4494 * bsd-kvm.c: All implementations adjusted.
4495 * bsd-uthread.c: All implementations adjusted.
4496 * corelow.c: All implementations adjusted.
4497 * ctf.c: All implementations adjusted.
4498 * darwin-nat.c: All implementations adjusted.
4499 * darwin-nat.h: All implementations adjusted.
4500 * exec.c: All implementations adjusted.
4501 * fbsd-nat.c: All implementations adjusted.
4502 * fbsd-nat.h: All implementations adjusted.
4503 * gnu-nat.c: All implementations adjusted.
4504 * gnu-nat.h: All implementations adjusted.
4505 * go32-nat.c: All implementations adjusted.
4506 * ia64-linux-nat.c: All implementations adjusted.
4507 * inf-child.c: All implementations adjusted.
4508 * inf-child.h: All implementations adjusted.
4509 * inf-ptrace.c: All implementations adjusted.
4510 * inf-ptrace.h: All implementations adjusted.
4511 * linux-nat.c: All implementations adjusted.
4512 * linux-nat.h: All implementations adjusted.
4513 * mips-linux-nat.c: All implementations adjusted.
4514 * nto-procfs.c: All implementations adjusted.
4515 * ppc-linux-nat.c: All implementations adjusted.
4516 * procfs.c: All implementations adjusted.
4517 * ravenscar-thread.c: All implementations adjusted.
4518 * record-btrace.c: All implementations adjusted.
4519 * record-full.c: All implementations adjusted.
4520 * remote-sim.c: All implementations adjusted.
4521 * remote.c: All implementations adjusted.
4522 * s390-linux-nat.c: All implementations adjusted.
4523 * sol-thread.c: All implementations adjusted.
4524 * spu-multiarch.c: All implementations adjusted.
4525 * target-delegates.c: All implementations adjusted.
4526 * target.c: All implementations adjusted.
4527 * target.h: All implementations adjusted.
4528 * tracefile-tfile.c: All implementations adjusted.
4529 * tracefile.c: All implementations adjusted.
4530 * tracefile.h: All implementations adjusted.
4531 * windows-nat.c: All implementations adjusted.
4532 * x86-linux-nat.h: All implementations adjusted.
4533 * x86-nat.h: All implementations adjusted.
4535 2018-05-02 Pedro Alves <palves@redhat.com>
4537 * make-target-delegates (scan_target_h): Don't trim lines here.
4538 Replace sequences of tabs and/or whitespace with a single
4540 (top level, parsing methods): Trim each line before processing it
4543 2018-05-02 Pedro Alves <palves@redhat.com>
4544 John Baldwin <jhb@freebsd.org>
4546 * target.h (enum strata) <debug_stratum>: New.
4547 (struct target_ops) <all delegation methods>: Replace by C++
4548 virtual methods, and drop "to_" prefix. All references updated
4550 <to_shortname, to_longname, to_doc, to_data,
4551 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4552 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4553 virtual methods. All references updated throughout.
4554 <can_attach, supports_terminal_ours, can_create_inferior,
4555 get_thread_control_capabilities, attach_no_wait>: New
4557 <insert_breakpoint, remove_breakpoint>: Now
4558 TARGET_DEFAULT_NORETURN methods.
4559 <info_proc>: Now returns bool.
4561 (OPS_MAGIC): Delete.
4562 (current_target): Delete. All references replaced by references
4564 (target_stack): ... this. New.
4565 (target_shortname, target_longname): Adjust.
4566 (target_can_run): Now a function declaration.
4567 (default_child_has_all_memory, default_child_has_memory)
4568 (default_child_has_stack, default_child_has_registers)
4569 (default_child_has_execution): Remove target_ops parameter.
4570 (complete_target_initialization): Delete.
4571 (memory_breakpoint_target): New template class.
4572 (test_target_ops): Refactor as a C++ class with virtual methods.
4573 * make-target-delegates (NAME_PART): Tighten.
4574 (POINTER_PART, CP_SYMBOL): New.
4575 (SIMPLE_RETURN_PART): Reimplement.
4576 (VEC_RETURN_PART): Expect less.
4577 (RETURN_PART, VIRTUAL_PART): New.
4578 (METHOD): Adjust to C++ virtual methods.
4579 (scan_target_h): Remove reference to C99.
4580 (dname): Output "target_ops::" prefix.
4581 (write_function_header): Adjust to output a C++ class method.
4582 (write_declaration): New.
4583 (write_delegator): Adjust to output a C++ class method.
4584 (tdname): Output "dummy_target::" prefix.
4585 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4587 (tdefault_names, debug_names): Delete.
4588 (return_types, tdefaults, styles, argtypes_array): New.
4589 (top level): All methods are delegators.
4591 (top level): Print dummy_target and debug_target classes.
4592 * target-delegates.c: Regenerate.
4593 * target-debug.h (target_debug_print_enum_info_proc_what)
4594 (target_debug_print_thread_control_capabilities)
4595 (target_debug_print_thread_info_p): New.
4596 * target.c (dummy_target): Delete.
4597 (the_dummy_target, the_debug_target): New.
4598 (target_stack): Now extern.
4599 (set_targetdebug): Push/unpush debug target.
4600 (default_child_has_all_memory, default_child_has_memory)
4601 (default_child_has_stack, default_child_has_registers)
4602 (default_child_has_execution): Remove target_ops parameter.
4603 (complete_target_initialization): Delete.
4604 (add_target_with_completer): No longer call
4605 complete_target_initialization.
4606 (target_supports_terminal_ours): Use regular delegation.
4607 (update_current_target): Delete.
4608 (push_target): No longer check magic number. Don't call
4609 update_current_target.
4610 (unpush_target): Don't call update_current_target.
4611 (target_is_pushed): No longer check magic number.
4612 (target_require_runnable): Skip for all stratums over
4614 (target_ops::info_proc): New.
4615 (target_info_proc): Use find_target_at and
4616 find_default_run_target.
4617 (target_supports_disable_randomization): Use regular delegation.
4618 (target_get_osdata): Use find_target_at.
4619 (target_ops::open, target_ops::close, target_ops::can_attach)
4620 (target_ops::attach, target_ops::can_create_inferior)
4621 (target_ops::create_inferior, target_ops::can_run)
4622 (target_can_run): New.
4623 (default_fileio_target): Use regular delegation.
4624 (target_ops::fileio_open, target_ops::fileio_pwrite)
4625 (target_ops::fileio_pread, target_ops::fileio_fstat)
4626 (target_ops::fileio_close, target_ops::fileio_unlink)
4627 (target_ops::fileio_readlink): New.
4628 (target_fileio_open_1, target_fileio_unlink)
4629 (target_fileio_readlink): Always call the target method. Handle
4631 (return_zero, return_zero_has_execution): Delete.
4632 (init_dummy_target): Delete.
4633 (dummy_target::dummy_target, dummy_target::shortname)
4634 (dummy_target::longname, dummy_target::doc)
4635 (debug_target::debug_target, debug_target::shortname)
4636 (debug_target::longname, debug_target::doc): New.
4637 (target_supports_delete_record): Use regular delegation.
4638 (setup_target_debug): Delete.
4639 (maintenance_print_target_stack): Skip debug_stratum.
4640 (initialize_targets): Instantiate the_dummy_target and
4642 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4644 (target_auxv_search, fprint_target_auxv): Adjust.
4645 (info_auxv_command): Adjust to use target_stack.
4646 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4647 * exceptions.c (print_flush): Handle a NULL target_stack.
4648 * regcache.c (target_ops_no_register): Refactor as class with
4651 * exec.c (exec_target): New class.
4652 (exec_ops): Now an exec_target.
4653 (exec_open, exec_close_1, exec_get_section_table)
4654 (exec_xfer_partial, exec_files_info, exec_has_memory)
4655 (exec_make_note_section): Refactor as exec_target methods.
4656 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4658 (exec_target::find_memory_regions): New.
4659 (_initialize_exec): Don't call init_exec_ops.
4660 * gdbcore.h (exec_file_clear): Delete.
4662 * corefile.c (core_target): Delete.
4663 (core_file_command): Adjust.
4664 * corelow.c (core_target): New class.
4665 (the_core_target): New.
4666 (core_close): Remove target_ops parameter.
4667 (core_close_cleanup): Adjust.
4668 (core_target::close): New.
4669 (core_open, core_detach, get_core_registers, core_files_info)
4670 (core_xfer_partial, core_thread_alive, core_read_description)
4671 (core_pid_to_str, core_thread_name, core_has_memory)
4672 (core_has_stack, core_has_registers, core_info_proc): Rework as
4673 core_target methods.
4674 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4675 (_initialize_corelow): Initialize the_core_target.
4676 * gdbcore.h (core_target): Delete.
4677 (the_core_target): New.
4679 * ctf.c: (ctf_target): New class.
4680 (ctf_ops): Now a ctf_target.
4681 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4682 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4683 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4685 (init_ctf_ops): Delete.
4686 (_initialize_ctf): Don't call it.
4687 * tracefile-tfile.c (tfile_target): New class.
4688 (tfile_ops): Now a tfile_target.
4689 (tfile_open, tfile_close, tfile_files_info)
4690 (tfile_get_tracepoint_status, tfile_trace_find)
4691 (tfile_fetch_registers, tfile_xfer_partial)
4692 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4693 Refactor as tfile_target methods.
4694 (tfile_xfer_partial_features): Remove target_ops parameter.
4695 (init_tfile_ops): Delete.
4696 (_initialize_tracefile_tfile): Don't call it.
4697 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4698 (tracefile_has_stack, tracefile_has_registers)
4699 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4700 tracefile_target methods.
4701 (init_tracefile_ops): Delete.
4702 (tracefile_target::tracefile_target): New.
4703 * tracefile.h: Include "target.h".
4704 (tracefile_target): New class.
4705 (init_tracefile_ops): Delete.
4707 * spu-multiarch.c (spu_multiarch_target): New class.
4708 (spu_ops): Now a spu_multiarch_target.
4709 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4710 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4711 (spu_search_memory, spu_mourn_inferior): Refactor as
4712 spu_multiarch_target methods.
4713 (init_spu_ops): Delete.
4714 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4715 complete_target_initialization.
4717 * ravenscar-thread.c (ravenscar_thread_target): New class.
4718 (ravenscar_ops): Now a ravenscar_thread_target.
4719 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4720 (ravenscar_thread_alive, ravenscar_pid_to_str)
4721 (ravenscar_fetch_registers, ravenscar_store_registers)
4722 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4723 (ravenscar_stopped_by_hw_breakpoint)
4724 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4725 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4726 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4728 (init_ravenscar_thread_ops): Delete.
4729 (_initialize_ravenscar): Remove references to
4730 init_ravenscar_thread_ops and complete_target_initialization.
4732 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4733 (bsd_uthread_target): New class.
4734 (bsd_uthread_ops): Now a bsd_uthread_target.
4735 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4736 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4737 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4738 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4739 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4740 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4741 (bsd_uthread_target): Delete function.
4742 (_initialize_bsd_uthread): Remove reference to
4743 complete_target_initialization.
4745 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4746 (target_bfd): ... this new class.
4747 (target_bfd_xfer_partial, target_bfd_get_section_table)
4748 (target_bfd_close): Refactor as target_bfd methods.
4749 (target_bfd::~target_bfd): New.
4750 (target_bfd_reopen): Adjust.
4751 (target_bfd::close): New.
4753 * record-btrace.c (record_btrace_target): New class.
4754 (record_btrace_ops): Now a record_btrace_target.
4755 (record_btrace_open, record_btrace_stop_recording)
4756 (record_btrace_disconnect, record_btrace_close)
4757 (record_btrace_async, record_btrace_info)
4758 (record_btrace_insn_history, record_btrace_insn_history_range)
4759 (record_btrace_insn_history_from, record_btrace_call_history)
4760 (record_btrace_call_history_range)
4761 (record_btrace_call_history_from, record_btrace_record_method)
4762 (record_btrace_is_replaying, record_btrace_will_replay)
4763 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4764 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4765 (record_btrace_store_registers, record_btrace_prepare_to_store)
4766 (record_btrace_to_get_unwinder)
4767 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4768 (record_btrace_commit_resume, record_btrace_wait)
4769 (record_btrace_stop, record_btrace_can_execute_reverse)
4770 (record_btrace_stopped_by_sw_breakpoint)
4771 (record_btrace_supports_stopped_by_sw_breakpoint)
4772 (record_btrace_stopped_by_hw_breakpoint)
4773 (record_btrace_supports_stopped_by_hw_breakpoint)
4774 (record_btrace_update_thread_list, record_btrace_thread_alive)
4775 (record_btrace_goto_begin, record_btrace_goto_end)
4776 (record_btrace_goto, record_btrace_stop_replaying_all)
4777 (record_btrace_execution_direction)
4778 (record_btrace_prepare_to_generate_core)
4779 (record_btrace_done_generating_core): Refactor as
4780 record_btrace_target methods.
4781 (init_record_btrace_ops): Delete.
4782 (_initialize_record_btrace): Remove reference to
4783 init_record_btrace_ops.
4784 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4785 the execution_direction global.
4786 (record_full_base_target, record_full_target)
4787 (record_full_core_target): New classes.
4788 (record_full_ops): Now a record_full_target.
4789 (record_full_core_ops): Now a record_full_core_target.
4790 (record_full_target::detach, record_full_target::disconnect)
4791 (record_full_core_target::disconnect)
4792 (record_full_target::mourn_inferior, record_full_target::kill):
4794 (record_full_open, record_full_close, record_full_async): Refactor
4795 as methods of the record_full_base_target class.
4796 (record_full_resume, record_full_commit_resume): Refactor
4797 as methods of the record_full_target class.
4798 (record_full_wait, record_full_stopped_by_watchpoint)
4799 (record_full_stopped_data_address)
4800 (record_full_stopped_by_sw_breakpoint)
4801 (record_full_supports_stopped_by_sw_breakpoint)
4802 (record_full_stopped_by_hw_breakpoint)
4803 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4804 methods of the record_full_base_target class.
4805 (record_full_store_registers, record_full_xfer_partial)
4806 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4807 Refactor as methods of the record_full_target class.
4808 (record_full_can_execute_reverse, record_full_get_bookmark)
4809 (record_full_goto_bookmark, record_full_execution_direction)
4810 (record_full_record_method, record_full_info, record_full_delete)
4811 (record_full_is_replaying, record_full_will_replay)
4812 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4813 (record_full_stop_replaying): Refactor as methods of the
4814 record_full_base_target class.
4815 (record_full_core_resume, record_full_core_kill)
4816 (record_full_core_fetch_registers)
4817 (record_full_core_prepare_to_store)
4818 (record_full_core_store_registers, record_full_core_xfer_partial)
4819 (record_full_core_insert_breakpoint)
4820 (record_full_core_remove_breakpoint)
4821 (record_full_core_has_execution): Refactor
4822 as methods of the record_full_core_target class.
4823 (record_full_base_target::supports_delete_record): New.
4824 (init_record_full_ops): Delete.
4825 (init_record_full_core_ops): Delete.
4826 (record_full_save): Refactor as method of the
4827 record_full_base_target class.
4828 (_initialize_record_full): Remove references to
4829 init_record_full_ops and init_record_full_core_ops.
4831 * remote.c (remote_target, extended_remote_target): New classes.
4832 (remote_ops): Now a remote_target.
4833 (extended_remote_ops): Now an extended_remote_target.
4834 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4835 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4836 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4837 (remote_pass_signals, remote_set_syscall_catchpoint)
4838 (remote_program_signals, )
4839 (remote_thread_always_alive): Remove target_ops parameter.
4840 (remote_thread_alive, remote_thread_name)
4841 (remote_update_thread_list, remote_threads_extra_info)
4842 (remote_static_tracepoint_marker_at)
4843 (remote_static_tracepoint_markers_by_strid)
4844 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4845 (remote_open): Refactor as methods of remote_target.
4846 (extended_remote_open, extended_remote_detach)
4847 (extended_remote_attach, extended_remote_post_attach):
4848 (extended_remote_supports_disable_randomization)
4849 (extended_remote_create_inferior): : Refactor as method of
4850 extended_remote_target.
4851 (remote_set_permissions, remote_open_1, remote_detach)
4852 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4853 (remote_resume, remote_commit_resume, remote_stop)
4854 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4855 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4856 (remote_prepare_to_store, remote_store_registers)
4857 (remote_flash_erase, remote_flash_done, remote_files_info)
4858 (remote_kill, remote_mourn, remote_insert_breakpoint)
4859 (remote_remove_breakpoint, remote_insert_watchpoint)
4860 (remote_watchpoint_addr_within_range)
4861 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4862 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4863 (remote_supports_stopped_by_sw_breakpoint)
4864 (remote_stopped_by_hw_breakpoint)
4865 (remote_supports_stopped_by_hw_breakpoint)
4866 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4867 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4868 (remote_verify_memory): Refactor as methods of remote_target.
4869 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4871 (remote_xfer_partial, remote_get_memory_xfer_limit)
4872 (remote_search_memory, remote_rcmd, remote_memory_map)
4873 (remote_pid_to_str, remote_get_thread_local_address)
4874 (remote_get_tib_address, remote_read_description): Refactor as
4875 methods of remote_target.
4876 (remote_target::fileio_open, remote_target::fileio_pwrite)
4877 (remote_target::fileio_pread, remote_target::fileio_close): New.
4878 (remote_hostio_readlink, remote_hostio_fstat)
4879 (remote_filesystem_is_local, remote_can_execute_reverse)
4880 (remote_supports_non_stop, remote_supports_disable_randomization)
4881 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4882 (remote_supports_enable_disable_tracepoint)
4883 (remote_supports_string_tracing)
4884 (remote_can_run_breakpoint_commands, remote_trace_init)
4885 (remote_download_tracepoint, remote_can_download_tracepoint)
4886 (remote_download_trace_state_variable, remote_enable_tracepoint)
4887 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4888 (remote_trace_start, remote_get_trace_status)
4889 (remote_get_tracepoint_status, remote_trace_stop)
4890 (remote_trace_find, remote_get_trace_state_variable_value)
4891 (remote_save_trace_data, remote_get_raw_trace_data)
4892 (remote_set_disconnected_tracing, remote_core_of_thread)
4893 (remote_set_circular_trace_buffer, remote_traceframe_info)
4894 (remote_get_min_fast_tracepoint_insn_len)
4895 (remote_set_trace_buffer_size, remote_set_trace_notes)
4896 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4897 (remote_disable_btrace, remote_teardown_btrace)
4898 (remote_read_btrace, remote_btrace_conf)
4899 (remote_augmented_libraries_svr4_read, remote_load)
4900 (remote_pid_to_exec_file, remote_can_do_single_step)
4901 (remote_execution_direction, remote_thread_handle_to_thread_info):
4902 Refactor as methods of remote_target.
4903 (init_remote_ops, init_extended_remote_ops): Delete.
4904 (remote_can_async_p, remote_is_async_p, remote_async)
4905 (remote_thread_events, remote_upload_tracepoints)
4906 (remote_upload_trace_state_variables): Refactor as methods of
4908 (_initialize_remote): Remove references to init_remote_ops and
4909 init_extended_remote_ops.
4911 * remote-sim.c (gdbsim_target): New class.
4912 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4913 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4914 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4915 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4916 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4917 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4918 Refactor as methods of gdbsim_target.
4919 (gdbsim_ops): Now a gdbsim_target.
4920 (init_gdbsim_ops): Delete.
4921 (gdbsim_cntrl_c): Adjust.
4922 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4924 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4925 (the_amd64_linux_nat_target): New.
4926 (amd64_linux_fetch_inferior_registers)
4927 (amd64_linux_store_inferior_registers): Refactor as methods of
4928 amd64_linux_nat_target.
4929 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4930 * i386-linux-nat.c: Don't include "linux-nat.h".
4931 (i386_linux_nat_target): New class.
4932 (the_i386_linux_nat_target): New.
4933 (i386_linux_fetch_inferior_registers)
4934 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4935 as methods of i386_linux_nat_target.
4936 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4937 * inf-child.c (inf_child_ops): Delete.
4938 (inf_child_fetch_inferior_registers)
4939 (inf_child_store_inferior_registers): Delete.
4940 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4941 methods of inf_child_target.
4942 (inf_child_target::supports_terminal_ours)
4943 (inf_child_target::terminal_init)
4944 (inf_child_target::terminal_inferior)
4945 (inf_child_target::terminal_ours_for_output)
4946 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4947 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4949 (inf_child_open, inf_child_disconnect, inf_child_close)
4950 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4951 (inf_child_post_startup_inferior, inf_child_can_run)
4952 (inf_child_pid_to_exec_file): Refactor as methods of
4954 (inf_child_follow_fork): Delete.
4955 (inf_child_target::can_create_inferior)
4956 (inf_child_target::can_attach): New.
4957 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4958 (inf_child_target::has_stack, inf_child_target::has_registers)
4959 (inf_child_target::has_execution): New.
4960 (inf_child_fileio_open, inf_child_fileio_pwrite)
4961 (inf_child_fileio_pread, inf_child_fileio_fstat)
4962 (inf_child_fileio_close, inf_child_fileio_unlink)
4963 (inf_child_fileio_readlink, inf_child_use_agent)
4964 (inf_child_can_use_agent): Refactor as methods of
4966 (return_zero, inf_child_target): Delete.
4967 (inf_child_target::inf_child_target): New.
4968 * inf-child.h: Include "target.h".
4969 (inf_child_target): Delete function prototype.
4970 (inf_child_target): New class.
4971 (inf_child_open_target, inf_child_mourn_inferior)
4972 (inf_child_maybe_unpush_target): Delete.
4973 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4974 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4975 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4976 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4977 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4978 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4979 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4980 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4981 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4982 methods of inf_ptrace_target.
4983 (inf_ptrace_target): Delete function.
4984 * inf-ptrace.h: Include "inf-child.h".
4985 (inf_ptrace_target): Delete function declaration.
4986 (inf_ptrace_target): New class.
4987 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4988 * linux-nat.c (linux_target): New.
4989 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4990 (linux_nat_target::~linux_nat_target): New.
4991 (linux_child_post_attach, linux_child_post_startup_inferior)
4992 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4993 (linux_child_remove_fork_catchpoint)
4994 (linux_child_insert_vfork_catchpoint)
4995 (linux_child_remove_vfork_catchpoint)
4996 (linux_child_insert_exec_catchpoint)
4997 (linux_child_remove_exec_catchpoint)
4998 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4999 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5000 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5001 (linux_nat_stopped_data_address)
5002 (linux_nat_stopped_by_sw_breakpoint)
5003 (linux_nat_supports_stopped_by_sw_breakpoint)
5004 (linux_nat_stopped_by_hw_breakpoint)
5005 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5006 (linux_nat_kill, linux_nat_mourn_inferior)
5007 (linux_nat_xfer_partial, linux_nat_thread_alive)
5008 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5009 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5010 (linux_child_static_tracepoint_markers_by_strid)
5011 (linux_nat_is_async_p, linux_nat_can_async_p)
5012 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5013 (linux_nat_supports_multi_process)
5014 (linux_nat_supports_disable_randomization, linux_nat_async)
5015 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5016 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5017 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5018 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5019 methods of linux_nat_target.
5020 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5021 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5023 (check_stopped_by_watchpoint): Adjust.
5024 (linux_xfer_partial): Delete.
5025 (linux_target_install_ops, linux_target, linux_nat_add_target):
5027 (linux_nat_target::linux_nat_target): New.
5028 * linux-nat.h: Include "inf-ptrace.h".
5029 (linux_nat_target): New.
5030 (linux_target, linux_target_install_ops, linux_nat_add_target):
5031 Delete function declarations.
5032 (linux_target): Declare global.
5033 * linux-thread-db.c (thread_db_target): New.
5034 (thread_db_target::thread_db_target): New.
5035 (thread_db_ops): Delete.
5036 (the_thread_db_target): New.
5037 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5038 (thread_db_update_thread_list, thread_db_pid_to_str)
5039 (thread_db_extra_thread_info)
5040 (thread_db_thread_handle_to_thread_info)
5041 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5042 (thread_db_resume): Refactor as methods of thread_db_target.
5043 (init_thread_db_ops): Delete.
5044 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5045 * x86-linux-nat.c: Don't include "linux-nat.h".
5046 (super_post_startup_inferior): Delete.
5047 (x86_linux_nat_target::~x86_linux_nat_target): New.
5048 (x86_linux_child_post_startup_inferior)
5049 (x86_linux_read_description, x86_linux_enable_btrace)
5050 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5051 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5052 methods of x86_linux_nat_target.
5053 (x86_linux_create_target): Delete. Bits folded ...
5054 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5056 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5057 (x86_linux_nat_target): New class.
5058 (x86_linux_create_target): Delete.
5059 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5060 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5061 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5062 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5063 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5064 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5066 (x86_use_watchpoints): Delete.
5067 * x86-nat.h: Include "breakpoint.h" and "target.h".
5068 (x86_use_watchpoints): Delete.
5069 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5070 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5071 (x86_insert_watchpoint, x86_remove_watchpoint)
5072 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5073 (x86_stopped_by_hw_breakpoint): New declarations.
5074 (x86_nat_target): New template class.
5076 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5077 (the_ppc_linux_nat_target): New.
5078 (ppc_linux_fetch_inferior_registers)
5079 (ppc_linux_can_use_hw_breakpoint)
5080 (ppc_linux_region_ok_for_hw_watchpoint)
5081 (ppc_linux_ranged_break_num_registers)
5082 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5083 (ppc_linux_insert_mask_watchpoint)
5084 (ppc_linux_remove_mask_watchpoint)
5085 (ppc_linux_can_accel_watchpoint_condition)
5086 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5087 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5088 (ppc_linux_watchpoint_addr_within_range)
5089 (ppc_linux_masked_watch_num_registers)
5090 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5091 (ppc_linux_read_description): Refactor as methods of
5092 ppc_linux_nat_target.
5093 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5095 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5096 (procfs_target): New class.
5097 (the_procfs_target): New.
5098 (procfs_target): Delete function.
5099 (procfs_auxv_parse, procfs_attach, procfs_detach)
5100 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5101 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5102 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5103 (procfs_create_inferior, procfs_update_thread_list)
5104 (procfs_thread_alive, procfs_pid_to_str)
5105 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5106 (procfs_stopped_data_address, procfs_insert_watchpoint)
5107 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5108 (proc_find_memory_regions, procfs_info_proc)
5109 (procfs_make_note_section): Refactor as methods of procfs_target.
5110 (_initialize_procfs): Adjust.
5111 * sol-thread.c (sol_thread_target): New class.
5112 (sol_thread_ops): Now a sol_thread_target.
5113 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5114 (sol_thread_fetch_registers, sol_thread_store_registers)
5115 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5116 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5117 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5118 (init_sol_thread_ops): Delete.
5119 (_initialize_sol_thread): Adjust. Remove references to
5120 init_sol_thread_ops and complete_target_initialization.
5122 * windows-nat.c (windows_nat_target): New class.
5123 (windows_fetch_inferior_registers)
5124 (windows_store_inferior_registers, windows_resume, windows_wait)
5125 (windows_attach, windows_detach, windows_pid_to_exec_file)
5126 (windows_files_info, windows_create_inferior)
5127 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5128 (windows_close, windows_pid_to_str, windows_xfer_partial)
5129 (windows_get_tib_address, windows_get_ada_task_ptid)
5130 (windows_thread_name, windows_thread_alive): Refactor as
5131 windows_nat_target methods.
5132 (do_initial_windows_stuff): Adjust.
5133 (windows_target): Delete function.
5134 (_initialize_windows_nat): Adjust.
5136 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5137 (darwin_mourn_inferior, darwin_kill_inferior)
5138 (darwin_create_inferior, darwin_attach, darwin_detach)
5139 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5140 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5141 (darwin_supports_multi_process): Refactor as darwin_nat_target
5143 (darwin_resume_to, darwin_files_info): Delete.
5144 (_initialize_darwin_inferior): Rename to ...
5145 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5146 * darwin-nat.h: Include "inf-child.h".
5147 (darwin_nat_target): New class.
5148 (darwin_complete_target): Delete.
5149 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5150 (darwin_target): New.
5151 (i386_darwin_fetch_inferior_registers)
5152 (i386_darwin_store_inferior_registers): Refactor as methods of
5154 (darwin_complete_target): Delete, with ...
5155 (_initialize_i386_darwin_nat): ... bits factored out here.
5157 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5158 (the_alpha_linux_nat_target): New.
5159 (alpha_linux_register_u_offset): Refactor as
5160 alpha_linux_nat_target method.
5161 (_initialize_alpha_linux_nat): Adjust.
5162 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5163 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5164 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5165 methods of linux_nat_trad_target.
5166 (linux_trad_target): Delete.
5167 * linux-nat-trad.h (linux_trad_target): Delete function.
5168 (linux_nat_trad_target): New class.
5169 * mips-linux-nat.c (mips_linux_nat_target): New class.
5170 (super_fetch_registers, super_store_registers, super_close):
5172 (the_mips_linux_nat_target): New.
5173 (mips64_linux_regsets_fetch_registers)
5174 (mips64_linux_regsets_store_registers)
5175 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5176 (mips_linux_register_u_offset, mips_linux_read_description)
5177 (mips_linux_can_use_hw_breakpoint)
5178 (mips_linux_stopped_by_watchpoint)
5179 (mips_linux_stopped_data_address)
5180 (mips_linux_region_ok_for_hw_watchpoint)
5181 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5182 (mips_linux_close): Refactor as methods of mips_linux_nat.
5183 (_initialize_mips_linux_nat): Adjust to C++ification.
5185 * aix-thread.c (aix_thread_target): New class.
5186 (aix_thread_ops): Now an aix_thread_target.
5187 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5188 (aix_thread_fetch_registers, aix_thread_store_registers)
5189 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5190 (aix_thread_thread_alive, aix_thread_pid_to_str)
5191 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5192 Refactor as methods of aix_thread_target.
5193 (init_aix_thread_ops): Delete.
5194 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5195 and complete_target_initialization.
5196 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5197 (rs6000_nat_target): New class.
5198 (the_rs6000_nat_target): New.
5199 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5200 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5201 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5202 (super_create_inferior): Delete.
5203 (_initialize_rs6000_nat): Adjust to C++ification.
5205 * arm-linux-nat.c (arm_linux_nat_target): New class.
5206 (the_arm_linux_nat_target): New.
5207 (arm_linux_fetch_inferior_registers)
5208 (arm_linux_store_inferior_registers, arm_linux_read_description)
5209 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5210 (arm_linux_remove_hw_breakpoint)
5211 (arm_linux_region_ok_for_hw_watchpoint)
5212 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5213 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5214 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5215 arm_linux_nat_target.
5216 (_initialize_arm_linux_nat): Adjust to C++ification.
5218 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5219 (the_aarch64_linux_nat_target): New.
5220 (aarch64_linux_fetch_inferior_registers)
5221 (aarch64_linux_store_inferior_registers)
5222 (aarch64_linux_child_post_startup_inferior)
5223 (aarch64_linux_read_description)
5224 (aarch64_linux_can_use_hw_breakpoint)
5225 (aarch64_linux_insert_hw_breakpoint)
5226 (aarch64_linux_remove_hw_breakpoint)
5227 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5228 (aarch64_linux_region_ok_for_hw_watchpoint)
5229 (aarch64_linux_stopped_data_address)
5230 (aarch64_linux_stopped_by_watchpoint)
5231 (aarch64_linux_watchpoint_addr_within_range)
5232 (aarch64_linux_can_do_single_step): Refactor as methods of
5233 aarch64_linux_nat_target.
5234 (super_post_startup_inferior): Delete.
5235 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5237 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5238 (the_hppa_linux_nat_target): New.
5239 (hppa_linux_fetch_inferior_registers)
5240 (hppa_linux_store_inferior_registers): Refactor as methods of
5241 hppa_linux_nat_target.
5242 (_initialize_hppa_linux_nat): Adjust to C++ification.
5244 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5245 (the_ia64_linux_nat_target): New.
5246 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5247 (ia64_linux_stopped_data_address)
5248 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5249 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5250 ia64_linux_nat_target methods.
5251 (super_xfer_partial): Delete.
5252 (_initialize_ia64_linux_nat): Adjust to C++ification.
5254 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5255 (the_m32r_linux_nat_target): New.
5256 (m32r_linux_fetch_inferior_registers)
5257 (m32r_linux_store_inferior_registers): Refactor as
5258 m32r_linux_nat_target methods.
5259 (_initialize_m32r_linux_nat): Adjust to C++ification.
5261 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5262 (the_m68k_linux_nat_target): New.
5263 (m68k_linux_fetch_inferior_registers)
5264 (m68k_linux_store_inferior_registers): Refactor as
5265 m68k_linux_nat_target methods.
5266 (_initialize_m68k_linux_nat): Adjust to C++ification.
5268 * s390-linux-nat.c (s390_linux_nat_target): New class.
5269 (the_s390_linux_nat_target): New.
5270 (s390_linux_fetch_inferior_registers)
5271 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5272 (s390_insert_watchpoint, s390_remove_watchpoint)
5273 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5274 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5275 (s390_auxv_parse, s390_read_description): Refactor as methods of
5276 s390_linux_nat_target.
5277 (_initialize_s390_nat): Adjust to C++ification.
5279 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5280 (the_sparc_linux_nat_target): New.
5281 (_initialize_sparc_linux_nat): Adjust to C++ification.
5282 * sparc-nat.c (sparc_fetch_inferior_registers)
5283 (sparc_store_inferior_registers): Remove target_ops parameter.
5284 * sparc-nat.h (sparc_fetch_inferior_registers)
5285 (sparc_store_inferior_registers): Remove target_ops parameter.
5286 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5287 (the_sparc64_linux_nat_target): New.
5288 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5290 * spu-linux-nat.c (spu_linux_nat_target): New class.
5291 (the_spu_linux_nat_target): New.
5292 (spu_child_post_startup_inferior, spu_child_post_attach)
5293 (spu_child_wait, spu_fetch_inferior_registers)
5294 (spu_store_inferior_registers, spu_xfer_partial)
5295 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5297 (_initialize_spu_nat): Adjust to C++ification.
5299 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5300 (the_tilegx_linux_nat_target): New.
5301 (fetch_inferior_registers, store_inferior_registers):
5302 Refactor as methods.
5303 (_initialize_tile_linux_nat): Adjust to C++ification.
5305 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5306 (the_xtensa_linux_nat_target): New.
5307 (xtensa_linux_fetch_inferior_registers)
5308 (xtensa_linux_store_inferior_registers): Refactor as
5309 xtensa_linux_nat_target methods.
5310 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5312 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5313 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5314 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5315 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5316 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5317 (fbsd_stopped_by_sw_breakpoint)
5318 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5319 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5320 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5321 (fbsd_post_startup_inferior, fbsd_post_attach)
5322 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5323 (fbsd_set_syscall_catchpoint)
5324 (super_xfer_partial, super_resume, super_wait)
5325 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5326 (fbsd_handle_debug_trap): Remove target_ops parameter.
5327 (fbsd_nat_add_target): Delete.
5328 * fbsd-nat.h: Include "inf-ptrace.h".
5329 (fbsd_nat_add_target): Delete.
5330 (USE_SIGTRAP_SIGINFO): Define.
5331 (fbsd_nat_target): New class.
5333 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5334 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5335 (amd64bsd_target): Delete.
5336 * amd64-bsd-nat.h: New file.
5337 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5339 (amd64_fbsd_nat_target): New class.
5340 (the_amd64_fbsd_nat_target): New.
5341 (amd64fbsd_read_description): Refactor as method of
5342 amd64_fbsd_nat_target.
5343 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5344 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5345 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5346 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5347 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5348 (i386bsd_target): Delete.
5349 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5350 (i386bsd_fetch_inferior_registers)
5351 (i386bsd_store_inferior_registers): Declare.
5352 (i386_bsd_nat_target): New class.
5353 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5354 (the_i386_fbsd_nat_target): New.
5355 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5356 i386_fbsd_nat_target methods.
5357 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5358 (_initialize_i386fbsd_nat): Adjust to C++ification.
5359 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5360 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5361 (_initialize_x86_bsd_nat): Adjust to C++ification.
5362 * x86-bsd-nat.h: Include "x86-nat.h".
5363 (x86bsd_target): Delete declaration.
5364 (x86bsd_nat_target): New class.
5366 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5367 (the_aarch64_fbsd_nat_target): New.
5368 (aarch64_fbsd_fetch_inferior_registers)
5369 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5370 aarch64_fbsd_nat_target.
5371 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5372 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5373 (the_alpha_bsd_nat_target): New.
5374 (alphabsd_fetch_inferior_registers)
5375 (alphabsd_store_inferior_registers): Refactor as
5376 alpha_bsd_nat_target methods.
5377 (_initialize_alphabsd_nat): Refactor as methods of
5378 alpha_bsd_nat_target.
5379 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5380 (the_amd64_nbsd_nat_target): New.
5381 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5382 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5383 (the_amd64_obsd_nat_target): New.
5384 (_initialize_amd64obsd_nat): Adjust to C++ification.
5385 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5386 (the_arm_fbsd_nat_target): New.
5387 (arm_fbsd_fetch_inferior_registers)
5388 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5389 (_initialize_arm_fbsd_nat): Refactor as methods of
5390 arm_fbsd_nat_target.
5391 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5392 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5393 (the_arm_netbsd_nat_target): New.
5394 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5395 arm_netbsd_nat_target.
5396 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5397 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5398 (the_hppa_nbsd_nat_target): New.
5399 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5400 hppa_nbsd_nat_target methods.
5401 (_initialize_hppanbsd_nat): Adjust to C++ification.
5402 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5403 (the_hppa_obsd_nat_target): New.
5404 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5405 methods of hppa_obsd_nat_target.
5406 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5408 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5409 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5411 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5412 (_initialize_i386obsd_nat): Use add_target.
5413 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5414 (the_m68k_bsd_nat_target): New.
5415 (m68kbsd_fetch_inferior_registers)
5416 (m68kbsd_store_inferior_registers): Refactor as methods of
5417 m68k_bsd_nat_target.
5418 (_initialize_m68kbsd_nat): Adjust to C++ification.
5419 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5420 (the_mips_fbsd_nat_target): New.
5421 (mips_fbsd_fetch_inferior_registers)
5422 (mips_fbsd_store_inferior_registers): Refactor as methods of
5423 mips_fbsd_nat_target.
5424 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5426 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5427 (the_mips_nbsd_nat_target): New.
5428 (mipsnbsd_fetch_inferior_registers)
5429 (mipsnbsd_store_inferior_registers): Refactor as methods of
5430 mips_nbsd_nat_target.
5431 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5432 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5433 (the_mips64_obsd_nat_target): New.
5434 (mips64obsd_fetch_inferior_registers)
5435 (mips64obsd_store_inferior_registers): Refactor as methods of
5436 mips64_obsd_nat_target.
5437 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5439 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5441 * nbsd-nat.h: Include "inf-ptrace.h".
5442 (nbsd_nat_target): New class.
5443 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5444 (obsd_wait): Refactor as methods of obsd_nat_target.
5445 (obsd_add_target): Delete.
5446 * obsd-nat.h: Include "inf-ptrace.h".
5447 (obsd_nat_target): New class.
5448 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5449 (the_ppc_fbsd_nat_target): New.
5450 (ppcfbsd_fetch_inferior_registers)
5451 (ppcfbsd_store_inferior_registers): Refactor as methods of
5452 ppc_fbsd_nat_target.
5453 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5455 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5456 (the_ppc_nbsd_nat_target): New.
5457 (ppcnbsd_fetch_inferior_registers)
5458 (ppcnbsd_store_inferior_registers): Refactor as methods of
5459 ppc_nbsd_nat_target.
5460 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5461 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5462 (the_ppc_obsd_nat_target): New.
5463 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5464 methods of ppc_obsd_nat_target.
5465 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5467 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5468 (the_sh_nbsd_nat_target): New.
5469 (shnbsd_fetch_inferior_registers)
5470 (shnbsd_store_inferior_registers): Refactor as methods of
5472 (_initialize_shnbsd_nat): Adjust to C++ification.
5473 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5474 (inf_ptrace_xfer_partial): Delete.
5475 (sparc_xfer_partial, sparc_target): Delete.
5476 * sparc-nat.h (sparc_fetch_inferior_registers)
5477 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5478 (sparc_target): Delete function declaration.
5479 (sparc_target): New template class.
5480 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5481 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5482 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5483 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5485 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5486 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5487 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5488 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5490 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5491 (the_vax_bsd_nat_target): New.
5492 (vaxbsd_fetch_inferior_registers)
5493 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5495 (_initialize_vaxbsd_nat): Adjust to C++ification.
5497 * bsd-kvm.c (bsd_kvm_target): New class.
5498 (bsd_kvm_ops): Now a bsd_kvm_target.
5499 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5500 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5501 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5503 (bsd_kvm_return_one): Delete.
5504 (bsd_kvm_add_target): Adjust to C++ification.
5506 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5507 (nto_procfs_target_procfs): New classes.
5508 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5509 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5510 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5511 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5512 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5513 (procfs_remove_hw_breakpoint, procfs_resume)
5514 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5515 (procfs_kill_inferior, procfs_store_registers)
5516 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5517 as methods of nto_procfs_target.
5518 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5519 (nto_native_ops): Delete.
5520 (procfs_open, procfs_native_open): Delete.
5521 (nto_native_ops): Now an nto_procfs_target_native.
5522 (init_procfs_targets): Adjust to C++ification.
5523 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5524 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5525 Refactor as methods of nto_procfs_target.
5527 * go32-nat.c (go32_nat_target): New class.
5528 (the_go32_nat_target): New.
5529 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5530 (go32_store_registers, go32_xfer_partial, go32_files_info)
5531 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5532 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5533 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5534 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5535 (go32_target): Delete.
5536 (_initialize_go32_nat): Adjust to C++ification.
5538 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5539 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5540 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5541 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5543 (gnu_target): Delete.
5544 * gnu-nat.h (gnu_target): Delete.
5545 (gnu_nat_target): New class.
5546 * i386-gnu-nat.c (gnu_base_target): New.
5547 (i386_gnu_nat_target): New class.
5548 (the_i386_gnu_nat_target): New.
5549 (_initialize_i386gnu_nat): Adjust to C++ification.
5551 2018-05-02 Pedro Alves <palves@redhat.com>
5553 * bfd-target.c (target_bfd_xclose): Rename to ...
5554 (target_bfd_close): ... this.
5555 (target_bfd_reopen): Adjust.
5556 * target.c (target_close): Remove references to to_xclose.
5557 * target.h (target_ops::to_xclose): Delete.
5558 (target_ops::to_close): Update comments.
5560 2018-05-02 Pedro Alves <palves@redhat.com>
5562 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5564 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5565 * inf-ptrace.c (inf_ptrace_register_u_offset)
5566 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5567 (inf_ptrace_store_register, inf_ptrace_store_registers)
5568 (inf_ptrace_trad_target): Move to ...
5569 * linux-nat-trad.c: ... this new file.
5570 * linux-nat-trad.h: New file.
5571 * linux-nat.c (linux_target_install_ops): Make extern.
5572 (linux_trad_target): Delete.
5573 * linux-nat.h (linux_trad_target): Delete declaration.
5574 (linux_target_install_ops): Declare.
5575 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5578 2018-05-02 Pedro Alves <palves@redhat.com>
5580 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5581 procfs_target/add_target here.
5582 * procfs.c (procfs_target): Make static.
5583 (_initialize_procfs): Call add_target here.
5584 * procfs.h (struct target_ops): Remove forward declaration.
5585 (procfs_target): Remove declaration.
5586 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5588 2018-05-02 Pedro Alves <palves@redhat.com>
5590 * procfs.c (procfs_stopped_by_watchpoint)
5591 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5592 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5594 (procfs_use_watchpoints): Delete, move contents...
5595 (procfs_target): ... here.
5596 * procfs.h (procfs_use_watchpoints): Delete declaration.
5597 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5598 procfs_use_watchpoints.
5599 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5600 procfs_use_watchpoints.
5602 2018-05-02 Tom Tromey <tom@tromey.com>
5605 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5606 and var_zuinteger_unlimited.
5607 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5608 and PARAM_ZUINTEGER_UNLIMITED.
5609 (set_parameter_value): Handle var_zuinteger and
5610 var_zuinteger_unlimited.
5611 (add_setshow_generic): Likewise.
5612 (parmpy_init): Likewise.
5614 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5617 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5618 pointer is not null before dereferencing it.
5620 2018-04-30 Tom Tromey <tom@tromey.com>
5622 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5625 2018-04-30 Tom Tromey <tom@tromey.com>
5627 * breakpoint.c (mention): Remove use of is_mi_like_p.
5628 (print_mention_ranged_breakpoint): Likewise.
5629 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5632 2018-04-30 Tom Tromey <tom@tromey.com>
5634 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5636 2018-04-30 Tom Tromey <tom@tromey.com>
5638 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5639 (info_spu_event_command): Remove some uses of is_mi_like_p.
5641 2018-04-30 Tom Tromey <tom@tromey.com>
5643 * python/py-framefilter.c (py_print_single_arg)
5644 (enumerate_locals, py_print_args, py_print_frame): Remove some
5645 uses of is_mi_like_p.
5647 2018-04-30 Tom Tromey <tom@tromey.com>
5650 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5651 * ui-out.h (ui_out::is_mi_like_p): Now const.
5652 (ui_out::do_is_mi_like_p): Now const.
5653 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5655 2018-04-30 Tom Tromey <tom@tromey.com>
5657 * varobj.c (varobj_set_visualizer): Use new_reference.
5658 * python/python.c (gdbpy_decode_line): Use new_reference.
5659 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5662 2018-04-30 Tom Tromey <tom@tromey.com>
5664 * varobj.c (install_new_value): Use new_reference.
5665 * value.h (value_incref): Return void. Swap intro comment with
5667 * value.c (set_value_parent): Use new_reference.
5668 (value_incref): Return void. Update intro comment.
5669 (release_value): Use new_reference.
5670 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5672 2018-04-30 Tom Tromey <tom@tromey.com>
5674 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5675 * gdb_bfd.h (new_bfd_ref): Remove.
5676 (gdb_bfd_open): Update comment.
5677 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5678 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5679 (gdb_bfd_fdopenr): Use new_reference.
5680 * exec.c (exec_file_attach): Use new_reference.
5682 2018-04-30 Tom Tromey <tom@tromey.com>
5684 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5687 2018-04-30 Tom Tromey <tom@tromey.com>
5689 * jit.c (jit_read_code_entry): Use type_align.
5690 * i386-tdep.c (i386_gdbarch_init): Don't call
5691 set_gdbarch_long_long_align_bit.
5692 * gdbarch.sh: Remove long_long_align_bit.
5693 * gdbarch.c, gdbarch.h: Rebuild.
5694 * arc-tdep.c (arc_type_align): New function.
5695 (arc_gdbarch_init): Use arc_type_align. Don't call
5696 set_gdbarch_long_long_align_bit.
5698 2018-04-30 Tom Tromey <tom@tromey.com>
5700 * rust-lang.c (rust_type_alignment): Remove.
5701 (rust_composite_type): Use type_align.
5703 2018-04-30 Tom Tromey <tom@tromey.com>
5705 * NEWS: Mention Type.align.
5706 * python/py-type.c (typy_get_alignof): New function.
5707 (type_object_getset): Add "alignof".
5709 2018-04-30 Tom Tromey <tom@tromey.com>
5713 * std-operator.def (UNOP_ALIGNOF): New operator.
5714 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5716 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5717 * c-lang.c (c_op_print_tab): Add alignof.
5718 * c-exp.y (ALIGNOF): New token.
5719 (exp): Add "ALIGNOF" production.
5720 (ident_tokens): Add _Alignof and alignof.
5722 2018-04-30 Tom Tromey <tom@tromey.com>
5724 * i386-tdep.c (i386_type_align): New function.
5725 (i386_gdbarch_init): Update.
5726 * gdbarch.sh (type_align): New method.
5727 * gdbarch.c, gdbarch.h: Rebuild.
5728 * arch-utils.h (default_type_align): Declare.
5729 * arch-utils.c (default_type_align): New function.
5730 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5731 (struct type) <align_log2>: New field.
5732 <instance_flags>: Now a bitfield.
5733 (TYPE_RAW_ALIGN): New macro.
5734 (type_align, type_raw_align, set_type_align): Declare.
5735 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5737 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5738 (get_alignment, maybe_set_alignment): New functions.
5739 (read_structure_type, read_enumeration_type, read_array_type)
5740 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5741 (read_subrange_type, read_base_type): Set type alignment.
5743 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5745 * dwarf2read.c (read_index_from_section): Use bool.
5747 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5750 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5753 2018-04-29 John Reiser <jreiser@BitWagon.com>
5756 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5757 last step, and do it atomically.
5759 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5761 * compile/compile-c-types.c (convert_int, convert_float):
5764 2018-04-27 Tom Tromey <tom@tromey.com>
5767 * rust-lang.c (rust_inclusive_range_type_p): New function.
5768 (rust_range): Handle inclusive ranges.
5769 (rust_compute_range): Likewise.
5770 * rust-exp.y (struct rust_op) <inclusive>: New field.
5771 (DOTDOTEQ): New constant.
5772 (range_expr): Add "..=" productions.
5773 (operator_tokens): Add "..=" token.
5774 (ast_range): Add "inclusive" parameter.
5775 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5777 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5779 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5780 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5782 * expprint.c (print_subexp_standard): Handle new bounds values.
5783 (dump_subexp_body_standard): Likewise.
5785 2018-04-27 Tom Tromey <tom@tromey.com>
5787 * configure: Rebuild.
5788 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5789 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5791 (class symbol_needs_eval_context): Likewise.
5792 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5793 (mock_mapped_index::symbol_name_at): Use "override". Remove
5795 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5797 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5798 * aarch64-tdep.c (instruction_reader::read): Use "override".
5799 (instruction_reader_test::read): Likewise.
5800 * arm-tdep.c (instruction_reader::read): Use "override".
5801 (instruction_reader_thumb::read): Likewise.
5803 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5806 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5807 instead of remote_send.
5808 (remote_send): Remove.
5810 2018-04-26 Pedro Alves <palves@redhat.com>
5812 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5813 find_function_start_sal instead of find_pc_line.
5815 2018-04-26 Pedro Alves <palves@redhat.com>
5817 * breakpoint.c (set_breakpoint_location_function): Handle
5819 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5820 * elfread.c (elf_symtab_read): Give data symbols with
5821 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5822 (elf_rel_plt_read): Update comment.
5823 * linespec.c (convert_linespec_to_sals): Handle
5825 (minsym_found): Handle mst_data_gnu_ifunc.
5826 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5827 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5828 * parse.c (find_minsym_type_and_address): Handle
5830 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5831 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5832 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5834 <mst_data_gnu_ifunc>: New enumerator.
5836 2018-04-26 Pedro Alves <palves@redhat.com>
5838 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5839 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5840 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5842 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5843 (lookup_minimal_symbol_by_pc): Adjust.
5844 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5845 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5846 * minsyms.h (lookup_msym_prefer): New enum.
5847 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5848 parameter by a lookup_msym_prefer parameter.
5850 2018-04-26 Pedro Alves <palves@redhat.com>
5852 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5853 ends in "@plt" instead of looking at the symbol's section.
5855 2018-04-26 Pedro Alves <palves@redhat.com>
5857 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5859 (find_pc_partial_function_gnu_ifunc): Rename to ...
5860 (find_pc_partial_function): ... this, and remove references to
5862 (find_pc_partial_function): Delete old implementation.
5863 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5865 2018-04-26 Pedro Alves <palves@redhat.com>
5867 * linespec.c (struct bound_minimal_symbol_search_key): New.
5868 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5869 skip first line if we found a GNU ifunc minimal symbol by name.
5870 (compare_msymbols): Change parameters to work with a destructured
5872 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5875 2018-04-26 Pedro Alves <palves@redhat.com>
5877 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5878 ifunc targets here. Instead, if we have an ifunc minsym, use its
5880 (add_location_to_breakpoint): Store the minsym and the objfile in
5881 the breakpoint location.
5882 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5883 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5884 Record the minsym in the sal.
5885 * symtab.h (symtab_and_line) <msymbol>: New field.
5887 2018-04-26 Pedro Alves <palves@redhat.com>
5889 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5890 unless we actually resolved the ifunc.
5892 2018-04-26 Pedro Alves <palves@redhat.com>
5894 * c-exp.y (variable production): Prefer ifunc minsyms over
5895 regular function symbols.
5896 * symtab.c (find_gnu_ifunc): New function.
5897 * minsyms.h (lookup_msym_prefer): New enum.
5898 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5899 parameter by a lookup_msym_prefer parameter.
5900 * symtab.h (find_gnu_ifunc): New declaration.
5902 2018-04-26 Pedro Alves <palves@redhat.com>
5904 * blockframe.c (find_gnu_ifunc_target_type): New function.
5905 (find_function_type): New.
5906 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5907 return a value with a memory address.
5908 (eval_call): For calls to GNU ifunc functions, try to find the
5909 type of the target function from the type that the resolver
5911 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5913 * infcall.c (find_function_return_type): Delete.
5914 (find_function_addr): Add 'function_type' parameter. For calls to
5915 GNU ifunc functions, try to find the type of the target function
5916 from the type that the resolver returns, and return it via
5918 (call_function_by_hand_dummy): Adjust to use the function type
5919 returned by find_function_addr.
5920 (find_function_addr): Add 'function_type' parameter and move
5922 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5925 2018-04-26 Pedro Alves <palves@redhat.com>
5927 * c-exp.y (variable production): Skip finding an alias for ifunc
5930 2018-04-26 Pedro Alves <palves@redhat.com>
5932 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5934 2018-04-25 Pedro Alves <palves@redhat.com>
5936 * infcmd.c (kill_command): Print the pid as string, not the whole
5937 thread's ptid. Add comment. s/has been killed/killed/ in output
5939 * remote.c (remote_detach_1): Print the pid as string, not the
5940 whole thread's ptid.
5942 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5943 Sergio Durigan Junior <sergiodj@redhat.com>
5944 Pedro Alves <palves@redhat.com>
5946 * infcmd.c (kill_command): Print message when inferior has
5948 * inferior.c (print_inferior_events): Remove 'static'. Set as
5950 (add_inferior): Improve message printed when
5951 'print_inferior_events' is on.
5952 (exit_inferior): Remove message printed when
5953 'print_inferior_events' is on.
5954 (detach_inferior): Improve message printed when
5955 'print_inferior_events' is on.
5956 (initialize_inferiors): Use 'add_inferior_silent' to set
5957 'current_inferior_'.
5958 * inferior.h (print_inferior_events): Declare here as
5960 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5961 '[Detaching...]' messages when 'print_inferior_events' is on.
5962 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5963 as prefix/suffix for messages. Remove periods. Fix erroneous
5964 'Detaching after fork from child...', replace it by '... from
5966 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5967 prefix/suffix when printing 'Detaching...' messages. Print
5968 them when 'print_inferior_events' is on.
5969 * remote.c (remote_detach_1): Print message when detaching
5970 from inferior and '!is_fork_parent'.
5972 2018-04-24 Tom Tromey <tom@tromey.com>
5974 * cli-out.h: Reindent.
5976 2018-04-24 Tom Tromey <tom@tromey.com>
5978 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5979 (cli_ui_out::do_field_string): Use fputs_filtered.
5980 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5982 2018-04-23 Tom Tromey <tom@tromey.com>
5984 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5985 gdb::unique_xmalloc_ptr.
5987 2018-04-23 Tom Tromey <tom@tromey.com>
5989 * configure: Rebuild.
5991 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5994 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5995 prepare_for_testing. Set normal_bp to r_debug_state if target
5998 2018-04-21 Pedro Alves <palves@redhat.com>
5999 Rajendra SY <rajendra.sy@gmail.com>
6001 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6002 * remote.c (extended_remote_attach): In all-stop mode, mark the
6003 thread as executing.
6005 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6007 * thread.c (thread_apply_all_command): Fix comment.
6008 (thread_command): Fix comment.
6010 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6012 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6014 * features/aarch64-core.c (create_feature_aarch64_core):
6016 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6018 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6020 * features/i386/32bit-avx512.c
6021 (create_feature_i386_32bit_avx512): Likewise.
6022 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6024 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6026 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6028 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6030 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6032 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6034 * features/i386/64bit-avx512.c
6035 (create_feature_i386_64bit_avx512): Likewise.
6036 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6038 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6040 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6042 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6044 * features/i386/64bit-segments.c
6045 (create_feature_i386_64bit_segments): Likewise.
6046 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6048 * features/i386/x32-core.c
6049 (create_feature_i386_x32_core): Likewise.
6050 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6051 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6052 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6053 * target-descriptions.c: In generated code, don't pass xml
6056 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6058 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6059 (print_xml_feature::visit_post): Likewise.
6060 (print_xml_feature::visit): Likewise.
6061 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6062 (print_xml_feature): Add new class.
6063 * regformats/regdat.sh: Null xmltarget on feature targets.
6064 * target-descriptions.c (struct target_desc): Add xmltarget.
6065 (maintenance_check_tdesc_xml_convert): Add unittest function.
6066 (tdesc_get_features_xml): Add function to get xml.
6067 (maintenance_check_xml_descriptions): Test xml generation.
6068 * xml-tdesc.c (string_read_description_xml): Add function.
6069 * xml-tdesc.h (string_read_description_xml): Add declaration.
6071 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6073 * features/Makefile: Add feature marker to targets with new style
6074 target descriptions.
6075 * regformats/aarch64.dat: Regenerate.
6076 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6077 * regformats/i386/amd64-avx-linux.dat: Likewise.
6078 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6079 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6080 * regformats/i386/amd64-linux.dat: Likewise.
6081 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6082 * regformats/i386/amd64.dat: Likewise.
6083 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6084 * regformats/i386/i386-avx-linux.dat: Likewise.
6085 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6086 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6087 * regformats/i386/i386-linux.dat: Likewise.
6088 * regformats/i386/i386-mmx-linux.dat: Likewise.
6089 * regformats/i386/i386-mpx-linux.dat: Likewise.
6090 * regformats/i386/i386.dat: Likewise.
6091 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6092 * regformats/i386/x32-avx-linux.dat: Likewise.
6093 * regformats/i386/x32-linux.dat: Likewise.
6094 * regformats/tic6x-c62x-linux.dat: Likewise.
6095 * regformats/tic6x-c64x-linux.dat: Likewise.
6096 * regformats/tic6x-c64xp-linux.dat: Likewise.
6097 * regformats/regdat.sh: Parse feature marker.
6099 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6101 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6102 (tdesc_osabi_name): Likewise.
6103 * target-descriptions.c (tdesc_architecture_name): Add new
6105 (tdesc_osabi_name): Likewise.
6107 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6109 * common/tdesc.c (tdesc_predefined_type): Move to here.
6110 (tdesc_named_type): Likewise.
6111 (tdesc_create_vector): Likewise.
6112 (tdesc_create_struct): Likewise.
6113 (tdesc_set_struct_size): Likewise.
6114 (tdesc_create_union): Likewise.
6115 (tdesc_create_flags): Likewise.
6116 (tdesc_create_enum): Likewise.
6117 (tdesc_add_field): Likewise.
6118 (tdesc_add_typed_bitfield): Likewise.
6119 (tdesc_add_bitfield): Likewise.
6120 (tdesc_add_flag): Likewise.
6121 (tdesc_add_enum_value): Likewise.
6122 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6123 (struct tdesc_type_vector): Likewise.
6124 (struct tdesc_type_field): Likewise.
6125 (struct tdesc_type_with_fields): Likewise.
6126 (tdesc_create_enum): Add declaration.
6127 (tdesc_add_typed_bitfield): Likewise.
6128 (tdesc_add_enum_value): Likewise.
6129 * target-descriptions.c (tdesc_type_field): Move from here.
6130 (tdesc_type_builtin): Likewise.
6131 (tdesc_type_vector): Likewise.
6132 (tdesc_type_with_fields): Likewise.
6133 (tdesc_predefined_types): Likewise.
6134 (tdesc_named_type): Likewise.
6135 (tdesc_create_vector): Likewise.
6136 (tdesc_create_struct): Likewise.
6137 (tdesc_set_struct_size): Likewise.
6138 (tdesc_create_union): Likewise.
6139 (tdesc_create_flags): Likewise.
6140 (tdesc_create_enum): Likewise.
6141 (tdesc_add_field): Likewise.
6142 (tdesc_add_typed_bitfield): Likewise.
6143 (tdesc_add_bitfield): Likewise.
6144 (tdesc_add_flag): Likewise.
6145 (tdesc_add_enum_value): Likewise.
6146 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6147 (tdesc_add_typed_bitfield): Likewise.
6148 (tdesc_add_enum_value): Likewise.
6150 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6152 * common/tdesc.c (tdesc_feature::accept): Move to here.
6153 (tdesc_feature::operator==): Likewise.
6154 (tdesc_create_reg): Likewise.
6155 * common/tdesc.h (tdesc_type_kind): Likewise.
6156 (struct tdesc_type): Likewise.
6157 (struct tdesc_feature): Likewise.
6158 * regformats/regdat.sh: Create a feature.
6159 * target-descriptions.c (tdesc_type_kind): Move from here.
6160 (tdesc_type): Likewise.
6161 (tdesc_type_up): Likewise.
6162 (tdesc_feature): Likewise.
6163 (tdesc_create_reg): Likewise.
6165 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6167 * Makefile.in: Add arch/tdesc.c
6168 * common/tdesc.c: New file.
6169 * common/tdesc.h (tdesc_element_visitor): Move to here.
6170 (tdesc_element): Likewise.
6171 (tdesc_reg): Likewise.
6172 (tdesc_reg_up): Likewise.
6173 * regformats/regdef.h (reg): Add offset to constructors.
6174 * target-descriptions.c (tdesc_element_visitor): Move from here.
6175 (tdesc_element): Likewise.
6176 (tdesc_reg): Likewise.
6177 (tdesc_reg_up): Likewise.
6179 2018-04-17 Tom Tromey <tom@tromey.com>
6181 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6184 2018-04-17 Tom Tromey <tom@tromey.com>
6186 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6188 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6190 * symtab.c (print_symbol_info): Skip printing filename and line
6191 number when `last' is NULL.
6192 (symtab_symbol_info): Use empty string instead of NULL for first
6193 invocation of print_symbol_info.
6194 (rbreak_command): Pass NULL to `last' parameter of
6197 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6199 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6202 2018-04-16 Pedro Alves <palves@redhat.com>
6204 * MAINTAINERS (sh): Remove.
6205 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6206 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6207 (ALLDEPFILES): Remove sh64-tdep.c.
6208 * NEWS: Mentions that support for SH-5/SH64 is removed.
6209 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6210 (sh*-*-openbsd*): Ditto.
6211 (sh64-*-elf*): Remove.
6213 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6214 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6215 * sh-tdep.c: No longer include "sh64-tdep.h".
6216 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6217 * sh64-tdep.c, sh64-tdep.h: Remove files.
6219 2018-04-16 Pedro Alves <palves@redhat.com>
6221 * MAINTAINERS: Remove m88k.
6222 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6223 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6224 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6225 * NEWS: Mention that support for m88k was removed.
6226 * configure.host (m88*-*-*): Remove support.
6227 * configure.nat (m88k-*-*): Remove support.
6228 * configure.tgt (m88*-*-openbsd*): Remove.
6229 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6231 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6233 * configure.tgt (x86_tobjs): New variable.
6234 (amd64_tobjs, i386_tobjs): Use it.
6236 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6238 * symtab.c (print_symbol_info): Precede the symbol definition by
6239 the line number when available.
6240 * NEWS: Advertise this enhancement.
6242 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6244 * NEWS (New options): announce set/show record btrace cpu.
6245 * btrace.c: Include record-btrace.h.
6246 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6247 the vendor is unknown.
6248 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6249 Maybe overwrite the btrace configuration's cpu.
6250 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6251 (btrace_fetch): Add cpu parameter. Update callers.
6252 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6253 Maybe overwrite the btrace configuration's cpu. Skip enabling
6254 errata workarounds if the vendor is unknown.
6255 * python/py-record-btrace.c: Include record-btrace.h.
6256 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6257 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6258 * record-btrace.c (record_btrace_cpu_state_kind): New.
6259 (record_btrace_cpu): New.
6260 (set_record_btrace_cpu_cmdlist): New.
6261 (record_btrace_get_cpu): New.
6262 (require_btrace_thread, record_btrace_info)
6263 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6264 (cmd_set_record_btrace_cpu_none): New.
6265 (cmd_set_record_btrace_cpu_auto): New.
6266 (cmd_set_record_btrace_cpu): New.
6267 (cmd_show_record_btrace_cpu): New.
6268 (_initialize_record_btrace): Initialize set/show record btrace cpu
6270 * record-btrace.h (record_btrace_get_cpu): New.
6272 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6274 * record.c (set_record_command): Fix typo in message.
6276 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6278 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6280 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6282 * infrun.c (process_event_stop_test): Call
6283 gdbarch_in_indirect_branch_thunk.
6284 * gdbarch.sh (in_indirect_branch_thunk): New.
6285 * gdbarch.c: Regenerated.
6286 * gdbarch.h: Regenerated.
6289 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6290 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6291 (ALLDEPFILES): Add x86-tdep.c.
6292 * arch-utils.h (default_in_indirect_branch_thunk): New.
6293 * arch-utils.c (default_in_indirect_branch_thunk): New.
6294 * i386-tdep: Include x86-tdep.h.
6295 (i386_in_indirect_branch_thunk): New.
6296 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6298 * amd64-tdep: Include x86-tdep.h.
6299 (amd64_in_indirect_branch_thunk): New.
6300 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6302 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6305 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6306 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6307 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6310 2018-04-12 Tom Tromey <tom@tromey.com>
6312 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6313 (rust_evaluate_subexp): Likewise.
6315 2018-04-12 Pedro Alves <palves@redhat.com>
6317 * procfs.c (procfs_detach): Make forward declaration's prototype
6318 match definition's protototype.
6319 (proc_get_LDT_entry): Remove stale do_cleanups call.
6321 2018-04-12 Pedro Alves <palves@redhat.com>
6323 * target.h (target_ops::to_has_exited): Delete.
6324 (target_has_exited): Delete.
6325 * target-delegates.c: Regenerate.
6327 2018-04-11 Pedro Alves <palves@redhat.com>
6329 * target.c (fileio_fh_t::t): Add comment.
6330 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6331 (target_fileio_close): Handle a NULL target.
6332 (invalidate_fileio_fh): New.
6333 (target_close): Call it.
6334 * remote.c (remote_hostio_send_command): No longer check whether
6335 remote_desc is open.
6337 2018-04-11 Pedro Alves <palves@redhat.com>
6339 * target.c (fileio_fh_t): Make it a named struct instead of a
6341 (fileio_fh_t::is_closed): New method.
6342 (DEF_VEC_O (fileio_fh_t)): Remove.
6343 (fileio_fhandles): Now a std::vector.
6344 (is_closed_fileio_fh): Delete.
6345 (acquire_fileio_fd): Adjust. Rename parameters.
6346 (release_fileio_fd): Adjust.
6347 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6348 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6349 (target_fileio_close): Adjust.
6351 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6353 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6356 2018-04-10 Pedro Alves <palves@redhat.com>
6358 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6359 (scoped_finish_thread_state): New class.
6360 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6362 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6363 (fetch_inferior_event, normal_stop): Likewise.
6364 * thread.c (finish_thread_state_cleanup): Delete.
6366 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6367 Pedro Alves <palves@redhat.com>
6369 * value.c: Include "selftest.h" and "common/array-view.h".
6370 (struct range) <operator ==>: New.
6371 (test_ranges_contain): New.
6372 (check_ranges_vector): New.
6373 (test_insert_into_bit_range_vector): New.
6374 (_initialize_values): Register selftests.
6375 * common/array-view.h (operator==, operator!=): New.
6377 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6379 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6381 * inline-frame.c: Include <algorithm>.
6382 (struct inline_state): Add constructor.
6383 (inline_state_s): Remove.
6384 (DEF_VEC_O(inline_state_s)): Remove.
6385 (inline_states): Change type to std::vector.
6386 (find_inline_frame_state): Adjust to std::vector.
6387 (allocate_inline_frame_state): Remove.
6388 (clear_inline_frame_state): Adjust to std::vector.
6389 (skip_inline_frames): Adjust to std::vector.
6391 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6393 * tracepoint.h (struct trace_state_variable): Add constructor.
6394 <name>: Change type to std::string.
6395 * tracepoint.c (tsv_s): Remove.
6396 (DEF_VEC_O(tsv_s)): Remove.
6397 (tvariables): Change to std::vector.
6398 (create_trace_state_variable): Adjust to std::vector.
6399 (find_trace_state_variable): Likewise.
6400 (find_trace_state_variable_by_number): Likewise.
6401 (delete_trace_state_variable): Likewise.
6402 (trace_variable_command): Adjust to std::string.
6403 (delete_trace_variable_command): Likewise.
6404 (tvariables_info_1): Adjust to std::vector.
6405 (save_trace_state_variables): Likewise.
6406 (start_tracing): Likewise.
6407 (merge_uploaded_trace_state_variables): Adjust to std::vector
6409 * target.h (struct target_ops)
6410 <to_download_trace_state_variable>: Pass reference to
6411 trace_state_variable.
6412 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6413 * target-delegates.c: Re-generate.
6414 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6415 (mi_tsv_deleted): Likewise.
6416 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6417 * remote.c (remote_download_trace_state_variable): Change
6418 pointer to reference and adjust.
6419 * make-target-delegates (parse_argtypes): Handle references.
6420 (write_function_header): Likewise.
6421 (munge_type): Likewise.
6423 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6425 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6426 string_view-selftests.c.
6427 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6429 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6430 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6431 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6432 * unittests/basic_string_view/element_access/char/1.cc:
6434 * unittests/basic_string_view/element_access/char/empty.cc:
6436 * unittests/basic_string_view/element_access/char/front_back.cc:
6438 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6439 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6441 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6443 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6445 * unittests/basic_string_view/operations/compare/char/1.cc:
6447 * unittests/basic_string_view/operations/compare/char/13650.cc:
6449 * unittests/basic_string_view/operations/copy/char/1.cc:
6451 * unittests/basic_string_view/operations/data/char/1.cc:
6453 * unittests/basic_string_view/operations/find/char/1.cc:
6455 * unittests/basic_string_view/operations/find/char/2.cc:
6457 * unittests/basic_string_view/operations/find/char/3.cc:
6459 * unittests/basic_string_view/operations/find/char/4.cc:
6461 * unittests/basic_string_view/operations/rfind/char/1.cc:
6463 * unittests/basic_string_view/operations/rfind/char/2.cc:
6465 * unittests/basic_string_view/operations/rfind/char/3.cc:
6467 * unittests/basic_string_view/operations/substr/char/1.cc:
6469 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6470 * unittests/string_view-selftests.c: New file.
6472 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6474 * unittests/basic_string_view/capacity/1.cc: New file.
6475 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6476 * unittests/basic_string_view/cons/char/1.cc: New file.
6477 * unittests/basic_string_view/cons/char/2.cc: New file.
6478 * unittests/basic_string_view/cons/char/3.cc: New file.
6479 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6480 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6481 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6482 * unittests/basic_string_view/element_access/char/1.cc: New file.
6483 * unittests/basic_string_view/element_access/char/2.cc: New file.
6484 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6485 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6486 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6487 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6488 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6489 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6490 * unittests/basic_string_view/include.cc: New file.
6491 * unittests/basic_string_view/inserters/char/1.cc: New file.
6492 * unittests/basic_string_view/inserters/char/2.cc: New file.
6493 * unittests/basic_string_view/inserters/char/3.cc: New file.
6494 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6495 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6496 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6497 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6498 * unittests/basic_string_view/literals/types.cc: New file.
6499 * unittests/basic_string_view/literals/values.cc: New file.
6500 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6501 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6502 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6503 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6504 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6505 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6506 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6507 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6508 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6509 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6510 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6511 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6512 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6513 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6514 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6515 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6516 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6517 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6518 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6519 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6520 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6521 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6522 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6523 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6524 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6525 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6526 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6527 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6528 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6529 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6530 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6531 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6532 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6533 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6534 * unittests/basic_string_view/operators/char/2.cc: New file.
6535 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6536 * unittests/basic_string_view/range_access/char/1.cc: New file.
6537 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6538 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6539 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6540 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6541 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6542 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6543 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6544 * unittests/basic_string_view/typedefs.cc: New file.
6545 * unittests/basic_string_view/types/1.cc: New file.
6547 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6549 * common/gdb_string_view.h: Remove libstdc++ implementation
6550 details, adjust to gdb reality.
6551 * common/gdb_string_view.tcc: Likewise.
6552 * cli/cli-script.c (struct string_view): Remove.
6553 (user_args) <m_args>: Change element type to gdb::string_view.
6554 (user_args::insert_args): Adjust.
6556 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6558 * common/gdb_string_view.h: New file.
6559 * common/gdb_string_view.tcc: New file.
6561 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6563 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6564 * configure: Re-generate.
6566 2018-04-09 Pedro Alves <palves@redhat.com>
6568 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6569 (set_target_gdbarch): Call
6570 gdb::observers::architecture_changed.notify instead of
6571 observer_notify_architecture_changed.
6573 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6575 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6576 (do_restore_current_traceframe_cleanup): Remove.
6577 (restore_current_traceframe_cleanup_dtor): Remove.
6578 (make_cleanup_restore_current_traceframe): Remove.
6579 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6581 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6582 * infrun.c (fetch_inferior_event): Use
6583 scoped_restore_current_traceframe.
6585 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6587 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6589 <n_allocated_type_units>: Remove.
6590 <all_type_units>: Change to std::vector.
6591 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6592 to std::vector change.
6593 (dwarf2_per_objfile::get_cutu): Likewise.
6594 (dwarf2_per_objfile::get_tu): Likewise.
6595 (create_signatured_type_table_from_index): Likewise.
6596 (create_signatured_type_table_from_debug_names): Likewise.
6597 (dw2_symtab_iter_next): Likewise.
6598 (dw2_print_stats): Likewise.
6599 (dw2_expand_all_symtabs): Likewise.
6600 (dw2_expand_marked_cus): Likewise.
6601 (dw2_debug_names_iterator::next): Likewise.
6602 (dwarf2_initialize_objfile): Likewise.
6603 (add_signatured_type_cu_to_table): Likewise.
6604 (create_all_type_units): Likewise.
6605 (add_type_unit): Likewise.
6606 (struct tu_abbrev_offset): Add constructor.
6607 (build_type_psymtabs_1): Adjust to std::vector change.
6608 (print_tu_stats): Likewise.
6609 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6610 (write_debug_names): Likewise.
6612 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6614 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6615 Make an std::vector.
6616 <n_comp_units>: Remove.
6617 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6618 to std::vector change.
6619 (dwarf2_per_objfile::get_cutu): Likewise.
6620 (dwarf2_per_objfile::get_cu): Likewise.
6621 (create_cus_from_index): Likewise.
6622 (create_addrmap_from_index): Likewise.
6623 (create_addrmap_from_aranges): Likewise.
6624 (dwarf2_read_index): Likewise.
6625 (dw2_find_last_source_symtab): Likewise.
6626 (dw2_map_symtabs_matching_filename): Likewise.
6627 (dw2_symtab_iter_next): Likewise.
6628 (dw2_print_stats): Likewise.
6629 (dw2_expand_all_symtabs): Likewise.
6630 (dw2_expand_symtabs_with_fullname): Likewise.
6631 (dw2_expand_marked_cus): Likewise.
6632 (dw2_map_symbol_filenames): Likewise.
6633 (create_cus_from_debug_names): Likewise.
6634 (dwarf2_read_debug_names): Likewise.
6635 (dw2_debug_names_iterator::next): Likewise.
6636 (dwarf2_initialize_objfile): Likewise.
6637 (set_partial_user): Likewise.
6638 (dwarf2_build_psymtabs_hard): Likewise.
6639 (read_comp_units_from_section): Remove arguments, adjust to
6641 (create_all_comp_units): Adjust to std::vector and
6642 read_comp_units_from_section changes.
6643 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6645 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6646 (psyms_seen_size): Likewise.
6647 (write_gdbindex): Likewise.
6648 (write_debug_names): Likewise.
6650 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6652 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6653 with dwarf2_per_objfile.
6654 (create_cus_from_index): Likewise.
6655 (create_signatured_type_table_from_index): Likewise.
6656 (dwarf2_read_index): Likewise.
6657 (dwarf2_initialize_objfile): Likewise.
6658 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6659 per_cu rather than get_dwarf2_per_objfile.
6661 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6663 * dwarf2read.h (struct signatured_type): Forward declare.
6664 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6666 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6667 (dw2_get_cutu): ...this.
6668 (dwarf2_per_objfile::get_cu): Rename from...
6669 (dw2_get_cu): ...this.
6670 (dwarf2_per_objfile::get_tu): New.
6671 (create_addrmap_from_index): Adjust.
6672 (create_addrmap_from_aranges): Adjust.
6673 (dw2_find_last_source_symtab): Adjust.
6674 (dw2_map_symtabs_matching_filename): Adjust.
6675 (dw2_symtab_iter_next): Adjust.
6676 (dw2_print_stats): Adjust.
6677 (dw2_expand_all_symtabs): Adjust.
6678 (dw2_expand_symtabs_with_fullname): Adjust.
6679 (dw2_expand_marked_cus): Adjust.
6680 (dw_expand_symtabs_matching_file_matcher): Adjust.
6681 (dw2_map_symbol_filenames): Adjust.
6682 (dw2_debug_names_iterator::next): Adjust.
6683 (dwarf2_initialize_objfile): Adjust.
6684 (set_partial_user): Adjust.
6685 (dwarf2_build_psymtabs_hard): Adjust.
6687 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6689 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6690 Remove unused variables.
6691 (dw2_map_symtabs_matching_filename): Likewise.
6692 (dwarf2_record_block_ranges): Likewise.
6693 (dwarf2_read_addr_index): Likewise.
6694 (follow_die_offset): Likewise.
6696 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6698 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6699 to symbol_file_add_main.
6701 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6704 * mi/mi-console.c (do_fputc_async_safe): New.
6705 (mi_console_file::write_async_safe): New.
6706 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6707 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6709 * ui-file.c (ui_file::putstrn): Adjust call to
6710 fputstrn_unfiltered.
6711 * utils.c (printchar): Replace do_fputs and do_fprintf
6712 parameters by do_fputc.
6713 (fputstr_filtered): Adjust call to printchar.
6714 (fputstr_unfiltered): Likewise.
6715 (fputstrn_filtered): Likewise.
6716 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6718 * utils.h (do_fputc_ftype): New typedef.
6719 (fputstrn_unfiltered): Add do_fputc parameter.
6721 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6723 * regformats/i386/i386-avx.dat: Remove.
6725 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6728 * amd64-tdep.c (amd64_none_init_abi): New function.
6729 (amd64_x32_none_init_abi): New function.
6730 (_initialize_amd64_tdep): Register handlers for x86-64 and
6731 x64_32 with GDB_OSABI_NONE.
6732 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6733 GDB_OSABI_NONE osabi.
6735 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6738 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6740 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6741 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6743 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6745 * common/byte-vector.h (char_vector): New type.
6746 * target.h (target_read_alloc): Return
6747 gdb::optional<byte_vector>.
6748 (target_read_stralloc): Return gdb::optional<char_vector>.
6749 (target_get_osdata): Return gdb::optional<char_vector>.
6750 * target.c (target_read_alloc_1): Templatize. Replacement
6751 manual memory management with vector.
6752 (target_read_alloc): Change return type, adjust.
6753 (target_read_stralloc): Change return type, adjust.
6754 (target_get_osdata): Change return type, adjust.
6755 * auxv.c (struct auxv_info) <length>: Remove.
6756 <data>: Change type to gdb::optional<byte_vector>.
6757 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6758 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6759 (target_auxv_search): Adjust.
6760 (fprint_target_auxv): Adjust.
6761 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6762 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6763 (linux_make_corefile_notes): Adjust.
6764 * osdata.c (get_osdata): Adjust.
6765 * remote.c (remote_get_threads_with_qxfer): Adjust.
6766 (remote_memory_map): Adjust.
6767 (remote_traceframe_info): Adjust.
6768 (btrace_read_config): Adjust.
6769 (remote_read_btrace): Adjust.
6770 (remote_pid_to_exec_file): Adjust.
6771 * solib-aix.c (solib_aix_get_library_list): Adjust.
6772 * solib-dsbt.c (decode_loadmap): Don't free buf.
6773 (dsbt_get_initial_loadmaps): Adjust.
6774 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6775 * solib-target.c (solib_target_current_sos): Adjust.
6776 * tracepoint.c (sdata_make_value): Adjust.
6777 * xml-support.c (xinclude_start_include): Adjust.
6778 (xml_fetch_content_from_file): Adjust.
6779 * xml-support.h (xml_fetch_another): Change return type.
6780 (xml_fetch_content_from_file): Change return type.
6781 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6782 * xml-tdesc.c (file_read_description_xml): Adjust.
6783 (fetch_available_features_from_target): Change return type.
6784 (target_fetch_description_xml): Adjust.
6785 (target_read_description_xml): Adjust.
6787 2018-04-06 Tom Tromey <tom@tromey.com>
6789 * value.c (~value): Update.
6790 (struct value) <contents>: Now unique_xmalloc_ptr.
6791 (value_contents_bits_eq, allocate_value_contents)
6792 (value_contents_raw, value_contents_all_raw)
6793 (value_contents_for_printing, value_contents_for_printing_const)
6794 (set_value_enclosing_type): Update.
6796 2018-04-06 Tom Tromey <tom@tromey.com>
6798 * value.c (range_s): Remove typedef, VEC.
6799 (struct range): Add operator<.
6800 (range_lessthan): Remove.
6801 (ranges_contain): Change type.
6803 (struct value) <unavailable, optimized_out>: Now std::vector.
6804 (value_entirely_available)
6805 (value_entirely_covered_by_range_vector)
6806 (value_entirely_unavailable, value_entirely_optimized_out):
6808 (insert_into_bit_range_vector): Change argument type.
6809 (find_first_range_overlap): Likewise.
6810 (struct ranges_and_idx, value_contents_bits_eq)
6811 (require_not_optimized_out, require_available): Update.
6812 (ranges_copy_adjusted): Change argument types.
6813 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6815 2018-04-06 Tom Tromey <tom@tromey.com>
6817 * value.c (~value): Update.
6818 (struct value) <parent>: Now a value_ref_ptr.
6819 (value_parent, set_value_parent, value_address, value_copy):
6822 2018-04-06 Tom Tromey <tom@tromey.com>
6824 * value.c (struct value): Add constructor, destructor, and member
6826 (allocate_value_lazy, value_decref): Update.
6828 2018-04-06 Tom Tromey <tom@tromey.com>
6830 * value.c (struct value) <released, next>: Remove.
6831 (all_values): Now a std::vector.
6832 (allocate_value_lazy): Update.
6833 (value_next): Remove.
6834 (value_mark, value_free_to_mark, release_value)
6835 (value_release_to_mark): Update.
6837 2018-04-06 Tom Tromey <tom@tromey.com>
6839 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6840 (free_value_chain): Remove.
6841 * value.c (free_value_chain): Remove.
6842 (value_release_to_mark): Return a std::vector.
6843 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6845 (check_condition): Update.
6846 * eval.c (fetch_subexp_value): Change "val_chain" to a
6848 * breakpoint.c (update_watchpoint): Update.
6849 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6851 2018-04-06 Tom Tromey <tom@tromey.com>
6853 * value.h (free_all_values): Remove.
6854 * value.c (free_all_values): Remove.
6856 2018-04-06 Tom Tromey <tom@tromey.com>
6858 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6859 (value_history_chain, value_history_count): Remove.
6860 (value_history): New global.
6861 (record_latest_value, access_value_history, show_values)
6862 (preserve_values): Update.
6864 2018-04-06 Tom Tromey <tom@tromey.com>
6866 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6867 * varobj.c (varobj_set_display_format, varobj_set_value)
6868 (install_default_visualizer, construct_visualizer)
6869 (install_new_value, ~varobj, varobj_get_value_type)
6870 (my_value_of_variable, varobj_editable_p): Update.
6871 * c-varobj.c (c_describe_child, c_value_of_variable)
6872 (cplus_number_of_children, cplus_describe_child): Update.
6873 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6874 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6875 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6877 2018-04-06 Tom Tromey <tom@tromey.com>
6879 * printcmd.c (last_examine_address): Change type to
6881 (do_examine, x_command): Update.
6883 2018-04-06 Tom Tromey <tom@tromey.com>
6885 * value.c (release_value): Update.
6886 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6887 (struct bpstats) <val>: Now a value_ref_ptr.
6888 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6889 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6890 (~watchpoint, print_it_watchpoint, watch_command_1)
6891 (invalidate_bp_value_on_memory_change): Update.
6893 2018-04-06 Tom Tromey <tom@tromey.com>
6895 * varobj.c (varobj_clear_saved_item)
6896 (update_dynamic_varobj_children, install_new_value, ~varobj):
6898 * value.h (value_incref): Move declaration earlier.
6899 (value_decref): Rename from value_free.
6900 (struct value_ref_policy): New.
6901 (value_ref_ptr): New typedef.
6902 (struct value_deleter): Remove.
6903 (gdb_value_up): Remove typedef.
6904 (release_value): Change return type.
6905 (release_value_or_incref): Remove.
6906 * value.c (set_value_parent): Update.
6907 (value_incref): Change return type.
6908 (value_decref): Rename from value_free.
6909 (value_free_to_mark, free_all_values, free_value_chain): Update.
6910 (release_value): Return value_ref_ptr.
6911 (release_value_or_incref): Remove.
6912 (record_latest_value, set_internalvar, clear_internalvar):
6914 * stack.c (info_frame_command): Don't call value_free.
6915 * python/py-value.c (valpy_dealloc, valpy_new)
6916 (value_to_value_object): Update.
6917 * printcmd.c (do_examine): Update.
6918 * opencl-lang.c (lval_func_free_closure): Update.
6919 * mi/mi-main.c (register_changed_p): Don't call value_free.
6920 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6921 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6922 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6924 * guile/scm-value.c (vlscm_free_value_smob)
6925 (vlscm_scm_from_value): Update.
6926 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6927 (frame_unwind_register_unsigned, get_frame_register_bytes)
6928 (put_frame_register_bytes): Don't call value_free.
6929 * findvar.c (address_from_register): Don't call value_free.
6930 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6931 * dwarf2loc.c (entry_data_value_free_closure)
6932 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6933 (dwarf2_evaluate_loc_desc_full): Update.
6934 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6935 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6936 (~watchpoint, watch_command_1)
6937 (invalidate_bp_value_on_memory_change): Update.
6938 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6940 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6943 * warning.m4: Add -Wno-error=deprecated-register.
6944 * configure: Re-generate.
6946 2018-04-05 Tom Tromey <tom@tromey.com>
6948 * linespec.h: Remove include of "vec.h".
6950 2018-04-05 Tom Tromey <tom@tromey.com>
6952 * linespec.c (typep): Remove typedef.
6953 (find_methods, find_superclass_methods): Take a std::vector.
6954 (find_method): Use std::vector.
6956 2018-04-05 Tom Tromey <tom@tromey.com>
6958 * utils.c (compare_strings): Remove.
6959 * utils.h (compare_strings): Remove.
6960 * objc-lang.h (find_imps): Update.
6961 * objc-lang.c (find_methods): Take a std::vector.
6962 (uniquify_strings, find_imps): Likewise.
6963 * linespec.c (find_methods): Take a std::vector.
6964 (decode_objc): Use std::vector.
6965 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6967 (find_method, find_function_symbols): Use std::vector.
6969 2018-04-05 Tom Tromey <tom@tromey.com>
6971 * completer.c (completion_tracker::completion_tracker): Remove
6973 (completion_tracker::discard_completions): Likewise.
6974 * breakpoint.c (ambiguous_names_p): Remove cast.
6975 * ada-lang.c (_initialize_ada_language): Remove cast.
6976 * utils.h (streq): Update.
6977 (streq_hash): Add new declaration.
6978 * utils.c (streq): Return bool.
6979 (streq_hash): New function.
6981 2018-04-05 Tom Tromey <tom@tromey.com>
6983 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6984 Remove a string copy.
6986 2018-04-05 Tom Tromey <tom@tromey.com>
6988 * linespec.c (filter_results): Use std::vector.
6989 (decode_line_2, decode_line_full): Update.
6991 2018-04-05 Tom Tromey <tom@tromey.com>
6993 * linespec.c (canonical_to_fullform): Return std::string.
6994 (filter_results): Update.
6995 (struct decode_line_2_item): Add constructor.
6996 <fullform, displayform>: Now std::string.
6997 (decode_line_2_compare_items): Now a std::sort comparator.
6998 (decode_line_2): Update.
7000 2018-04-05 Tom Tromey <tom@tromey.com>
7002 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7003 (unexpected_linespec_error): Update.
7004 (linespec_parse_basic, parse_linespec): Update.
7006 2018-04-05 Tom Tromey <tom@tromey.com>
7008 * linespec.c (linespec_parse_basic): Reindent.
7010 2018-04-05 Tom Tromey <tom@tromey.com>
7012 * minsyms.h (iterate_over_minimal_symbols): Update.
7013 * minsyms.c (iterate_over_minimal_symbols): Take a
7015 * linespec.c (struct collect_minsyms): Remove.
7016 (compare_msyms): Now a std::sort comparator.
7017 (add_minsym): Add parameters.
7018 (search_minsyms_for_name): Update. Use std::vector.
7020 2018-04-03 Tom Tromey <tom@tromey.com>
7022 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7025 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7027 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7029 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7032 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7033 printing static type.
7035 2018-04-01 Tom Tromey <tom@tromey.com>
7037 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7038 (rs6000_xfer_shared_libraries): Update.
7040 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7042 * common/gdb_vecs.h (char_ptr): Remove.
7043 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7045 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7047 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7049 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7051 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7053 * tracepoint.h (struct uploaded_tp): Initialize fields.
7054 <actions, step_actions, cmd_strings>: Change type to
7055 std::vector<char *>.
7056 * tracepoint.c (get_uploaded_tp): Allocate with new.
7057 (free_uploaded_tps): Free with delete.
7058 (parse_tracepoint_definition): Adjust to std::vector change.
7059 * breakpoint.c (read_uploaded_action): Likewise.
7060 (create_tracepoint_from_upload): Likewise.
7061 * ctf.c (ctf_write_uploaded_tp): Likewise.
7062 (SET_ARRAY_FIELD): Likewise.
7063 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7065 2018-03-30 Tom Tromey <tom@tromey.com>
7067 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7069 (svr4_keep_data_in_core): Update.
7070 (svr4_read_so_list): Update.
7072 2018-03-30 Tom Tromey <tom@tromey.com>
7074 * windows-nat.c (handle_output_debug_string, handle_exception):
7076 * target.h (target_read_string): Update.
7077 * target.c (target_read_string): Change "string" to
7079 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7081 * solib-frv.c (frv_current_sos): Update.
7082 * solib-dsbt.c (dsbt_current_sos): Update.
7083 * solib-darwin.c (darwin_current_sos): Update.
7084 * linux-thread-db.c (inferior_has_bug): Update.
7085 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7086 Update. Remove alloca.
7087 * ada-lang.c (ada_main_name): Update.
7089 2018-03-30 Tom Tromey <tom@tromey.com>
7091 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7092 (struct dwo_file_deleter): New.
7093 (dwo_file_up): New typedef.
7094 (open_and_init_dwo_file): Use dwo_file_up.
7095 (free_dwo_file_cleanup): Remove.
7097 2018-03-30 Tom Tromey <tom@tromey.com>
7099 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7100 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7102 2018-03-30 Tom Tromey <tom@tromey.com>
7104 * dwarf2read.c (class free_cached_comp_units): New class.
7105 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7106 (free_cached_comp_units): Remove function.
7108 2018-03-30 Tom Tromey <tom@tromey.com>
7110 * utils.h (make_cleanup_unpush_target): Remove.
7111 * inf-ptrace.c (struct target_unpusher): New.
7112 (target_unpush_up) New typedef.
7113 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7115 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7117 2018-03-27 Tom Tromey <tom@tromey.com>
7119 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7121 2018-03-27 Pedro Alves <palves@redhat.com>
7122 Tom Tromey <tom@tromey.com>
7124 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7125 destructor. Now a class.
7126 (gdb_readline_wrapper_cleanup): Remove function.
7127 (gdb_readline_wrapper): Remove cleanups.
7129 2018-03-27 Tom Tromey <tom@tromey.com>
7131 * typeprint.h (struct type_print_options) <local_typedefs,
7132 global_typedefs>: Remove "struct" keyword.
7133 (class typedef_hash_table): New class.
7134 (recursively_update_typedef_hash, add_template_parameters)
7135 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7136 (find_typedef_in_hash): Don't declare.
7137 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7138 (typedef_hash_table::recursively_update): Rename from
7139 recursively_update_typedef_hash. Now a member.
7140 (typedef_hash_table::add_template_parameters): Rename from
7141 add_template_parameters. Now a member.
7142 (typedef_hash_table::typedef_hash_table): Now a constructor;
7143 rename from create_typedef_hash.
7144 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7145 rename from free_typedef_hash.
7146 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7147 (do_free_global_table): Remove.
7148 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7149 from copy_type_recursive.
7150 (create_global_typedef_table): Remove.
7151 (typedef_hash_table::find_global_typedef): Now a member of
7153 (typedef_hash_table::find_typedef): Rename from
7154 find_typedef_in_hash; now a member.
7155 (whatis_exp): Update.
7156 * extension.h (struct ext_lang_type_printers): Add constructor and
7158 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7160 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7161 Now a constructor; rename from start_ext_lang_type_printers.
7162 (ext_lang_type_printers): Now a destructor; rename from
7163 free_ext_lang_type_printers.
7164 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7166 (c_type_print_base_struct_union): Update. Remove cleanups.
7168 2018-03-27 Tom Tromey <tom@tromey.com>
7170 * dwarf-index-write.c: Include <cmath>.
7172 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7174 * NEWS: Add entry describing new "set|show varsize-limit" command.
7175 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7177 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7180 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7182 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7184 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7185 * dwarf-index-common.c: New file.
7186 * dwarf-index-common.h: New file.
7187 * dwarf-index-write.c: New file.
7188 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7189 (struct dwarf2_section_info): Move from here.
7190 (dwarf2_section_info_def): Likewise.
7191 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7192 (offset_type): Likewise.
7193 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7194 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7195 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7196 (byte_swap): Likewise.
7197 (MAYBE_SWAP): Likewise.
7198 (dwarf2_per_cu_ptr): Likewise.
7199 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7200 (struct tu_stats): Likewise.
7201 (struct dwarf2_per_objfile): Likewise.
7202 (struct dwarf2_per_cu_data): Likewise.
7203 (struct signatured_type): Likewise.
7204 (sig_type_ptr): Likewise.
7205 (DEF_VEC_P (sig_type_ptr)): Likewise.
7206 (INDEX4_SUFFIX): Likewise.
7207 (INDEX5_SUFFIX): Likewise.
7208 (DEBUG_STR_SUFFIX): Likewise.
7209 (dwarf2_read_section): Make non-static.
7210 (mapped_index_string_hash): Move from here.
7211 (dwarf5_djb_hash): Likewise.
7212 (file_write): Likewise.
7213 (class data_buf): Likewise.
7214 (struct symtab_index_entry): Likewise.
7215 (struct mapped_symtab): Likewise.
7216 (find_slot): Likewise.
7217 (hash_expand): Likewise.
7218 (add_index_entry): Likewise.
7219 (uniquify_cu_indices): Likewise.
7220 (class c_str_view): Likewise.
7221 (class c_str_view_hasher): Likewise.
7222 (class vector_hasher): Likewise.
7223 (write_hash_table): Likewise.
7224 (psym_index_map): Likewise.
7225 (struct addrmap_index_data): Likewise.
7226 (add_address_entry): Likewise.
7227 (add_address_entry_worker): Likewise.
7228 (write_address_map): Likewise.
7229 (symbol_kind): Likewise.
7230 (write_psymbols): Likewise.
7231 (struct signatured_type_index_data): Likewise.
7232 (write_one_signatured_type): Likewise.
7233 (recursively_count_psymbols): Likewise.
7234 (recursively_write_psymbols): Likewise.
7235 (class debug_names): Likewise.
7236 (check_dwarf64_offsets): Likewise.
7237 (psyms_seen_size): Likewise.
7238 (write_gdbindex): Likewise.
7239 (write_debug_names): Likewise.
7240 (assert_file_size): Likewise.
7241 (write_psymtabs_to_index): Likewise.
7242 (save_gdb_index_command): Likewise.
7243 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7245 * dwarf2read.h: New file.
7247 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7250 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7251 symbol name if the CU's language stores symbol names in linkage
7253 * language.h (struct language_defn)
7254 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7255 all instances of this struct.
7257 2018-03-26 Tom Tromey <tom@tromey.com>
7259 * stack.c (backtrace_command_1): Remove verbose code.
7261 2018-03-26 Tom Tromey <tom@tromey.com>
7263 * python/py-framefilter.c (py_print_type): Don't catch
7264 exceptions. Return void.
7265 (py_print_value): Likewise.
7266 (py_print_single_arg): Likewise.
7267 (enumerate_args): Don't catch exceptions.
7268 (py_print_args): Likewise.
7269 (py_print_frame): Likewise.
7270 (gdbpy_apply_frame_filter): Catch exceptions here.
7272 2018-03-26 Tom Tromey <tom@tromey.com>
7274 * stack.c (_initialize_stack): Remove trailing newlines from help
7275 text. Add "Usage" line to "backtrace" help.
7277 2018-03-26 Tom Tromey <tom@tromey.com>
7280 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7282 2018-03-26 Tom Tromey <tom@tromey.com>
7284 * python/py-framefilter.c (py_print_single_arg): Return
7285 EXT_LANG_BT_ERROR from catch.
7287 2018-03-26 Tom Tromey <tom@tromey.com>
7290 * stack.c (backtrace_command_1): Move some code into no-filters
7293 2018-03-26 Tom Tromey <tom@tromey.com>
7295 * python/py-framefilter.c (throw_quit_or_print_exception): New
7297 (gdbpy_apply_frame_filter): Use it.
7299 2018-03-26 Tom Tromey <tom@tromey.com>
7302 * python/py-framefilter.c (py_print_type, py_print_value)
7303 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7306 2018-03-26 Tom Tromey <tom@tromey.com>
7308 * python/py-framefilter.c (enumerate_args): Use
7309 gdb::unique_xmalloc_ptr.
7311 2018-03-26 Tom Tromey <tom@tromey.com>
7313 * python/py-framefilter.c (py_print_frame): Return
7315 (gdbpy_apply_frame_filter): Update comment.
7316 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7318 <EXT_LANG_BT_NO_FILTERS>: Change value.
7320 2018-03-26 Tom Tromey <tom@tromey.com>
7323 * stack.c (backtrace_command): Parse "hide" argument.
7324 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7325 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7328 2018-03-26 Tom Tromey <tom@tromey.com>
7330 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7332 (backtrace_command): Remove "fulltrace", add "flags".
7334 2018-03-26 Tom Tromey <tom@tromey.com>
7336 * stack.c (backtrace_command): Rewrite command line parsing.
7338 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7340 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7342 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7344 * filename-seen-cache.h: Add include guard.
7346 2018-03-26 Keith Seitz <keiths@redhat.com>
7348 * symfile.c (place_section): Remove "struct" from section_addr_info
7350 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7351 "struct" keyword from section_addr_info.
7353 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7355 * regformats/regdef.h (reg): Add constructors.
7357 2018-03-25 Pedro Alves <palves@redhat.com>
7359 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7360 if then/else bodies in var_func_name extraction.
7362 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7364 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7365 lookup_minimal_symbol() to find symbol entry.
7366 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7368 2018-03-23 Keith Seitz <keiths@redhat.com>
7371 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7372 nested type definitions for C++, too.
7374 2018-03-23 Tom Tromey <tom@tromey.com>
7376 * machoread.c (struct oso_el): Add a constructor. Don't define as
7378 (macho_register_oso): Remove.
7379 (macho_symtab_read): Take a std::vector.
7380 (oso_el_compare_name): Now a std::sort comparator.
7381 (macho_symfile_read_all_oso): Take a std::vector.
7382 (macho_symfile_read): Use std::vector. Remove cleanups.
7384 2018-03-22 Tom Tromey <tom@tromey.com>
7386 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7387 (record_full_goto_bookmark): Use std::string.
7389 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7392 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7395 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7397 * rs6000-tdep.c (store_insn_p): New function.
7398 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7399 and cr_reg to their unshifted values. Use store_insn_p to
7400 match LR saves using either R1 or fdata->alloca_reg. Use
7401 store_insn_p to match CR saves. Set alloca_reg_offset
7402 when alloca_reg and framep are set. Remove lr_reg shift
7403 when assigning to fdata->lr_register.
7405 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7407 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7408 command line args instead of emitting a warning.
7410 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7412 * tracepoint.h (struct static_tracepoint_marker): Initialize
7413 fields, define default constructor, move constructor and move
7414 assignment, disable the rest.
7415 <str_id, extra>: Make std::string.
7416 (release_static_tracepoint_marker): Remove.
7417 (free_current_marker): Remove.
7418 * tracepoint.c (free_current_marker): Remove.
7419 (parse_static_tracepoint_marker_definition): Adjust to
7420 std::string, use new hex2str overload.
7421 (release_static_tracepoint_marker): Remove.
7422 (print_one_static_tracepoint_marker): Get marker by reference
7423 and adjust to std::string.
7424 (info_static_tracepoint_markers_command): Adjust to std::vector
7426 * target.h (static_tracepoint_marker_p): Remove typedef.
7427 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7428 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7430 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7432 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7433 (target_debug_print_std_vector_static_tracepoint_marker): New.
7434 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7436 (target_debug_print_static_tracepoint_marker_p): ... this.
7437 * target-delegates.c: Re-generate.
7438 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7440 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7441 (decode_static_tracepoint_spec): Adjust to std::vector.
7442 (tracepoint_print_one_detail): Adjust to std::string.
7443 (strace_marker_decode_location): Adjust to std::string.
7444 (update_static_tracepoint): Adjust to std::string, remove call
7445 to release_static_tracepoint_marker.
7446 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7447 Adjust to std::vector.
7448 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7449 (remote_static_tracepoint_markers_by_strid): Adjust to
7451 * common/rsp-low.h (hex2str): New overload with explicit count
7453 * common/rsp-low.c (hex2str): New overload with explicit count
7455 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7456 (_initialize_rsp_low_selftests): Add test_hex2str test.
7457 * unittests/tracepoint-selftests.c
7458 (test_parse_static_tracepoint_marker_definition): Adjust to
7461 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7463 * tracepoint.c (parse_static_tracepoint_marker_definition):
7464 Consider case where the definition is followed by more
7466 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7467 tracepoint-selftests.c.
7468 * unittests/tracepoint-selftests.c: New.
7470 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7472 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7475 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7477 * symtab.c (find_pc_sect_line): fixed indentation.
7479 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7481 * symtab.c (find_pc_sect_line): now uses binary search.
7483 2018-03-19 Tom Tromey <tom@tromey.com>
7485 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7488 2018-03-19 Pedro Alves <palves@redhat.com>
7489 Tom Tromey <tom@tromey.com>
7491 * unittests/observable-selftests.c: New file.
7492 * common/observable.h: New file.
7493 * observable.h: New file.
7494 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7495 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7496 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7497 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7498 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7499 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7500 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7501 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7502 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7503 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7504 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7505 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7506 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7507 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7508 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7509 tui/tui-interp.c, valops.c: Update all users.
7510 * tui/tui-hooks.c (tui_bp_created_observer)
7511 (tui_bp_deleted_observer, tui_bp_modified_observer)
7512 (tui_inferior_exit_observer, tui_before_prompt_observer)
7513 (tui_normal_stop_observer, tui_register_changed_observer):
7515 (tui_observers_token): New global.
7516 (attach_or_detach, tui_attach_detach_observers): New functions.
7517 (tui_install_hooks, tui_remove_hooks): Use
7518 tui_attach_detach_observers.
7519 * record-btrace.c (record_btrace_thread_observer): Remove.
7520 (record_btrace_thread_observer_token): New global.
7521 * observer.sh: Remove.
7522 * observer.c: Rename to observable.c.
7523 * observable.c (namespace gdb_observers): Define new objects.
7524 (observer_debug): Move into gdb_observers namespace.
7525 (struct observer, struct observer_list, xalloc_observer_list_node)
7526 (xfree_observer_list_node, generic_observer_attach)
7527 (generic_observer_detach, generic_observer_notify): Remove.
7528 (_initialize_observer): Update.
7529 Don't include observer.inc.
7530 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7531 (clean mostlyclean): Likewise.
7532 (observer.h, observer.inc): Remove targets.
7533 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7534 (COMMON_SFILES): Use observable.c, not observer.c.
7535 * .gitignore: Remove observer.h.
7537 2018-03-18 Tom Tromey <tom@tromey.com>
7539 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7541 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7543 2018-03-17 Tom Tromey <tom@tromey.com>
7545 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7547 2018-03-17 Tom Tromey <tom@tromey.com>
7549 * target.c (class scoped_target_fd): New.
7550 (target_fileio_close_cleanup): Remove.
7551 (target_fileio_read_alloc_1): Use scoped_target_fd.
7553 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7555 * silent-rules.mk: New.
7556 * Makefile.in: Include silent-rules.mk
7557 (srcdir, VPATH, top_srcdir): Move up.
7558 (COMPILE): Add ECHO_CXX.
7559 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7560 (init.c): Add ECHO_INIT_C.
7561 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7562 (version.c): Add ECHO_GEN.
7563 (printcmd.o): Add ECHO_CXX.
7564 (target-float.o): Add ECHO_CXX.
7565 (ada-exp.o): Add ECHO_CXX.
7566 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7567 (insight$(EXEEXT)): Add ECHO_CXXLD.
7568 * gnulib/configure.ac: Add AM_SILENT_RULES.
7569 * gnulib/aclocal.m4: Re-generate.
7570 * gnulib/configure: Re-generate.
7571 * gnulib/import/Makefile.in: Re-generate.
7573 2018-03-16 Tom Tromey <tom@tromey.com>
7575 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7576 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7577 * utils.c (do_free_section_addr_info)
7578 (make_cleanup_free_section_addr_info): Remove.
7579 * symfile.h (struct other_sections): Add constructor.
7580 (struct section_addr_info): Remove.
7581 (section_addr_info): New typedef.
7582 (struct sym_fns) <sym_offsets>: Change type of parameter.
7583 (build_section_addr_info_from_objfile)
7584 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7585 (default_symfile_offsets, symbol_file_add)
7586 (symbol_file_add_from_bfd)
7587 (build_section_addr_info_from_section_table): Update.
7588 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7589 * symfile.c (alloc_section_addr_info): Remove.
7590 (build_section_addr_info_from_section_table): Change return type.
7592 (build_section_addr_info_from_bfd)
7593 (build_section_addr_info_from_objfile): Likewise.
7594 (free_section_addr_info): Remove.
7595 (relative_addr_info_to_section_offsets): Change type of "addrs".
7596 (addrs_section_compar): Now a std::sort comparator.
7597 (addrs_section_sort): Change return type.
7598 (addr_info_make_relative): Change type of "addrs". Update.
7599 (default_symfile_offsets, syms_from_objfile_1)
7600 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7601 (symbol_file_add_separate): Update.
7602 (symbol_file_add): Change type of "addrs". Update.
7603 (add_symbol_file_command): Update. Remove cleanups.
7604 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7606 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7607 * solib.c (solib_read_symbols): Update.
7608 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7609 * machoread.c (macho_symfile_offsets): Update.
7610 * jit.c (jit_bfd_try_read_symtab): Update.
7612 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7614 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7615 unittests/utils-selftests.c.
7616 * unittests/utils-selftests.c: New file.
7618 2018-03-14 Tom Tromey <tom@tromey.com>
7621 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7624 2018-03-14 Tom Tromey <tom@tromey.com>
7627 * printcmd.c (printf_pointer): Allow "-" in format.
7629 2018-03-14 Tom Tromey <tom@tromey.com>
7631 * printcmd.c (_initialize_printcmd): Add usage to printf.
7633 2018-03-14 Yao Qi <qiyao@sourceware.org>
7635 * MAINTAINERS: Update my email address.
7637 2018-03-13 Tom Tromey <tom@tromey.com>
7639 * machoread.c (macho_check_dsym): Change filenamep to a
7641 (macho_symfile_read): Update.
7642 * symfile.c (load_command): Use std::string.
7644 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7646 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7647 to error message string.
7648 (riscv_register_name): Use xsnprintf instead of sprintf.
7649 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7651 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7653 (riscv_push_dummy_call): Likewise.
7655 2018-03-12 Tom Tromey <tom@tromey.com>
7657 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7658 Use gdb::byte_vector.
7659 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7661 2018-03-12 Yao Qi <yao.qi@linaro.org>
7663 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7664 parameter type to readable_regcache.
7665 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7668 2018-03-11 Tom Tromey <tom@tromey.com>
7670 * dwarf2read.c (struct nextfield): Add initializers.
7671 (struct nextfnfield): Remove.
7672 (struct fnfieldlist): Add initializers. Remove "length" and
7673 "head", use std::vector.
7674 (struct decl_field_list): Remove.
7675 (struct field_info): Add initializers.
7676 <fields, baseclasses>: Now std::vector.
7677 <nbaseclasses, nfnfields, typedef_field_list_count,
7678 nested_types_list_count>: Remove.
7679 (dwarf2_add_field, dwarf2_add_type_defn)
7680 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7681 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7682 (process_structure_scope): Update.
7684 2018-03-11 Tom Tromey <tom@tromey.com>
7686 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7687 for use by std::sort.
7688 (build_type_psymtabs_1): Use std::vector.
7690 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7692 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7693 and LIBMPFR in the printed configuration.
7695 2018-03-08 Tom Tromey <tom@tromey.com>
7697 * source.c (get_filename_and_charpos): Use scoped_fd.
7698 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7699 (procfs_pidlist): Likewise.
7700 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7701 (iterate_over_mappings): Likewise.
7703 2018-03-08 Tom Tromey <tom@tromey.com>
7705 * infcall.c (struct call_return_meta_info)
7706 <stack_temporaries_enabled>: Remove.
7707 (get_call_return_value, call_function_by_hand_dummy): Update.
7708 * thread.c (disable_thread_stack_temporaries): Remove.
7709 (enable_thread_stack_temporaries): Remove.
7710 (thread_stack_temporaries_enabled_p): Return bool.
7711 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7712 (get_last_thread_stack_temporary): Update.
7713 * eval.c (evaluate_subexp): Update.
7714 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7715 class, not a function.
7716 (value_ptr, value_vec): Remove typedefs.
7717 (class thread_info) <stack_temporaries_enabled>: Now bool.
7718 <stack_temporaries>: Now a std::vector.
7719 (thread_stack_temporaries_enabled_p)
7720 (value_in_thread_stack_temporaries): Return bool.
7722 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7724 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7725 (getpkt_or_notif_sane_1): Likewise.
7727 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7729 * build-id.c (build_id_to_debug_bfd): Use std::string.
7731 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7733 * build-id.c (find_separate_debug_file_by_buildid): Return
7735 * build-id.h (find_separate_debug_file_by_buildid): Return
7737 * coffread.c (coff_symfile_read): Adjust to std::string.
7738 * elfread.c (elf_symfile_read): Adjust to std::string.
7739 * symfile.c (separate_debug_file_exists): Change parameter to
7741 (find_separate_debug_file): Return std::string.
7742 (find_separate_debug_file_by_debuglink): Return std::string.
7743 * symfile.h (find_separate_debug_file_by_debuglink): Return
7746 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7748 * common/xml-utils.c (xml_escape_text): Move code to...
7749 (xml_escape_text_append): ... this new function.
7750 * common/xml-utils.h (xml_escape_text_append): New declaration.
7751 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7753 (_initialize_xml_utils): register test_xml_escape_text_append as
7756 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7758 * defs.h: Remove MAX_REGISTER_SIZE.
7759 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7761 * python/py-unwind.c (pyuw_sniffer): Likewise.
7763 2018-03-07 Tom Tromey <tom@tromey.com>
7765 * linux-tdep.c (linux_info_proc): Update.
7766 * target.h (struct target_ops) <to_fileio_readlink>: Return
7768 (target_fileio_readlink): Return optional<string>.
7769 * remote.c (remote_hostio_readlink): Return optional<string>.
7770 * inf-child.c (inf_child_fileio_readlink): Return
7772 * target.c (target_fileio_readlink): Return optional<string>.
7774 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7776 * regcache.c (cooked_read_test): Add riscv to the list of
7777 architectures that have a save_reggroup.
7779 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7781 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7782 value is not a dynamic class object.
7784 2018-03-06 Tom Tromey <tom@tromey.com>
7786 * rust-exp.y: Formatting fixes.
7788 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7790 * riscv-tdep.c (riscv_register_name): Remove target description
7792 (riscv_gdbarch_init): Remove target description check.
7794 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7796 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7798 * riscv-tdep.h: Likewise.
7800 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7802 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7803 (riscv_pseudo_register_write): Delete.
7804 (riscv_gdbarch_init): Remove all use of pseudo registers.
7806 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7808 * record-btrace.c (btrace_print_lines): Replace cleanup
7809 parameter with RAII equivalents.
7810 (btrace_insn_history): Replace cleanup with RAII equivalents.
7811 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7812 make_cleanup_ui_out_tuple_begin_end): Remove.
7813 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7814 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7815 make_cleanup_ui_out_list_begin_end): Remove.
7817 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7819 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7820 parameter types to std::vector. Use bool.
7821 (record_btrace_wait): Replace VEC(tp_t) with
7822 std::vector<thread_info *>.
7823 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7825 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7827 * record-btrace.c (record_btrace_disable_callback): Remove.
7828 (struct scoped_btrace_disable): New.
7829 (record_btrace_open): Use scoped_btrace_disable.
7831 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7833 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7834 reading values from registers.
7836 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7838 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7841 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7843 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7844 change parameter type. Use GDB's print functions, and use
7845 core_addr_to_string where appropriate.
7846 (riscv_push_dummy_call): Use core_addr_to_string where
7847 appropriate, update call to riscv_print_arg_location, and reindent
7849 (riscv_return_value): Update call to riscv_print_arg_location.
7851 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7852 Tim Newsome <tim@sifive.com>
7853 Albert Ou <a0u@eecs.berkeley.edu>
7854 Darius Rad <darius@bluespec.com>
7856 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7857 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7858 (ALLDEPFILES): Add riscv-tdep.c
7859 * configure.tgt: Add riscv support.
7860 * riscv-tdep.c: New file.
7861 * riscv-tdep.h: New file.
7862 * NEWS: Mention new target.
7863 * MAINTAINERS: Add entry for riscv.
7865 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7867 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7868 fields within aggregates.
7870 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7872 * record-btrace.c (btrace_print_lines): Change type of flags to
7873 gdb_disassembly_flags.
7875 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7877 * fbsd-nat.c: Include "inf-ptrace.h".
7878 (USE_SIGTRAP_SIGINFO): Conditionally define.
7879 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7880 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7881 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7883 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7885 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7887 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7888 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7889 "supports_stopped_by_hw_breakpoint" target methods.
7891 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7893 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7894 * fbsd-nat.c (debug_fbsd_nat): New variable.
7895 (show_fbsd_nat_debug): New function.
7896 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7897 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7899 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7901 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7902 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7904 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7905 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7908 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7910 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7911 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7913 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7915 * charset.c (struct charset_vector): New.
7916 (charsets): Change type to charset_vector.
7917 (find_charset_names): Adjust.
7919 (_initialize_charset): Adjust.
7921 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7923 * progspace.h (struct program_space) <deleted_solibs>: Change
7924 type to std::vector<std::string>.
7925 * progspace.c (clear_program_space_solib_cache): Adjust.
7926 * breakpoint.c (print_solib_event): Adjust.
7927 (check_status_catch_solib): Adjust.
7928 * solib.c (update_solib_list): Adjust.
7929 * ui-out.h (class ui_out) <field_string>: New overload.
7930 * ui-out.c (ui_out::field_string): New overload.
7932 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7934 * progspace.h (struct program_space): Add constructor and
7935 destructor, initialize fields.
7936 (add_program_space): Remove.
7937 * progspace.c (add_program_space): Rename to...
7938 (program_space::program_space): ... this.
7939 (release_program_space): Rename to...
7940 (program_space::~program_space): ... this.
7941 (delete_program_space): Use delete to delete program_space.
7942 (initialize_progspace): Use new to allocate program_space.
7943 * inferior.c (add_inferior_with_spaces): Likewise.
7944 (clone_inferior_command): Likewise.
7945 * infrun.c (follow_fork_inferior): Likewise.
7946 (handle_vfork_child_exec_or_exit): Likewise.
7948 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7950 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7951 (delim_string_to_char_ptr_vec): Return std::vector of
7952 gdb::unique_xmalloc_ptr.
7953 (dirnames_to_char_ptr_vec_append): Take std::vector of
7954 gdb::unique_xmalloc_ptr.
7955 (dirnames_to_char_ptr_vec): Return std::vector of
7956 gdb::unique_xmalloc_ptr.
7957 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7958 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7959 (delim_string_to_char_ptr_vec): Return an std::vector of
7960 gdb::unique_xmalloc_ptr, adjust the code.
7961 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7962 gdb::unique_xmalloc_ptr, adjust the code.
7963 (dirnames_to_char_ptr_vec): Return an std::vector of
7964 gdb::unique_xmalloc_ptr, adjust the code.
7965 * auto-load.c (auto_load_safe_path_vec): Change type to
7966 std::vector of gdb::unique_xmalloc_ptr.
7967 (auto_load_expand_dir_vars): Return an std::vector of
7968 gdb::unique_xmalloc_ptr, adjust the code.
7969 (auto_load_safe_path_vec_update): Adjust.
7970 (filename_is_in_auto_load_safe_path_vec): Adjust.
7971 (auto_load_objfile_script_1): Adjust.
7972 * build-id.c (build_id_to_debug_bfd): Adjust.
7973 * linux-thread-db.c (thread_db_load_search): Adjust.
7974 * source.c (add_path): Adjust.
7976 * symfile.c (find_separate_debug_file): Adjust.
7977 * utils.c (do_free_char_ptr_vec): Remove.
7978 (make_cleanup_free_char_ptr_vec): Remove.
7980 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7983 * common/pathstuff.c: Conditionally include "<windows.h>".
7985 2018-03-01 Georg Sauthoff <mail@georg.so>
7988 * gcore.in: Quote variables and switch interpreter to bash.
7990 2018-03-01 Tom Tromey <tom@tromey.com>
7992 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7993 assertion. Add assertion for discriminant_index.
7994 (quirk_rust_enum): Use correct base type name in univariant case.
7996 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7998 * record.c (get_call_history_modifiers): Return a
8000 (cmd_record_call_history): Adjust.
8001 * record-btrace.c (record_btrace_call_history): Adjust.
8002 (record_btrace_call_history_range): Adjust.
8003 (record_btrace_call_history_from): Adjust.
8004 * target-debug.h (target_debug_print_record_print_flags): New.
8005 * target-delegates.c: Re-generate.
8006 * target.c (target_call_history): Change flags type.
8007 (target_call_history_from): Likewise.
8008 (target_call_history_range): Likewise.
8009 * target.h (struct target_ops) <target_call_history>: Likewise.
8010 (target_call_history_from): Likewise.
8011 (target_call_history_range): Likewise.
8013 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8014 Simon Marchi <simon.marchi@polymtl.ca>
8016 * common/common-utils.c: Include "sys/stat.h".
8017 (is_regular_file): Move here from "source.c"; change return
8019 * common/common-utils.h (is_regular_file): New prototype.
8020 * common/pathstuff.c (contains_dir_separator): New function.
8021 * common/pathstuff.h (contains_dir_separator): New prototype.
8022 * source.c: Don't include "sys/stat.h".
8023 (is_regular_file): Move to "common/common-utils.c".
8025 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8027 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8028 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8029 * auto-load.c: Include "common/pathstuff.h".
8030 * common/common-def.h (current_directory): Move here.
8031 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8033 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8035 * common/pathstuff.c: New file.
8036 * common/pathstuff.h: New file.
8037 * compile/compile.c: Include "common/pathstuff.h".
8038 * defs.h (current_directory): Move to "common/common-defs.h".
8039 * dwarf2read.c: Include "common/pathstuff.h".
8041 * guile/scm-safe-call.c: Likewise.
8042 * linux-thread-db.c: Likewise.
8044 * nto-tdep.c: Likewise.
8045 * objfiles.c: Likewise.
8046 * source.c: Likewise.
8047 * symtab.c: Likewise.
8048 * utils.c: Include "common/pathstuff.h".
8049 (gdb_realpath): Move to "common/pathstuff.c".
8050 (gdb_realpath_keepfile): Likewise.
8051 (gdb_abspath): Likewise.
8052 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8053 (gdb_realpath_keepfile): Likewise.
8054 (gdb_abspath): Likewise.
8056 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8058 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8059 wildcard process pid for super_resume for kernels with a
8062 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8064 * compile/compile.c (get_args): Add additional comments
8065 explaining function.
8067 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8068 Tom Tromey <tom@tromey.com>
8070 * target.h (memory_write_request_s): Remove typedef. Don't define
8072 (target_write_memory_blocks): Change argument to std::vector.
8073 (struct memory_write_request): Add constructor.
8074 * target-memory.c (compare_block_starting_address): Return bool.
8075 Change argument types.
8076 (claim_memory): Change arguments to use std::vector.
8077 (split_regular_and_flash_blocks, blocks_to_erase)
8078 (compute_garbled_blocks): Likewise.
8079 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8080 (target_write_memory_blocks): Change argument to std::vector.
8081 * symfile.c (struct load_section_data): Add constructor and
8082 destructor. Use std::vector for "requests".
8083 (struct load_progress_data): Add initializers.
8084 (load_section_callback): Update. Use "new".
8085 (clear_memory_write_data): Remove.
8086 (generic_load): Update.
8088 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8090 * arch/aarch64.h: Use common/tdesc.h.
8092 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8094 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8095 architecture with a 64-bit ABI.
8097 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8099 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8100 ahead of target description loading.
8102 2018-02-26 Tom Tromey <tom@tromey.com>
8104 * stack.c (backtrace_command_1): Update.
8105 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8107 * python/py-framefilter.c (py_print_frame)
8108 (gdbpy_apply_frame_filter): Change type of "flags".
8109 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8111 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8112 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8113 * extension.h (enum frame_filter_flag): Rename from
8115 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8116 (apply_ext_lang_frame_filter): Change type of "flags".
8117 * extension.c (apply_ext_lang_frame_filter): Change type of
8119 * extension-priv.h (struct extension_language_ops)
8120 <apply_frame_filter>: Change type of "flags".
8122 2018-02-26 Tom Tromey <tom@tromey.com>
8125 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8126 off-by-one in py_end computation.
8127 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8129 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8132 2018-02-26 Tom Tromey <tom@tromey.com>
8134 * dwarf2read.c (struct variant_field): New.
8135 (struct nextfield) <variant>: New field.
8136 (dwarf2_add_field): Handle DW_TAG_variant_part.
8137 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8138 discriminated union.
8139 (read_structure_type): Handle DW_TAG_variant_part.
8140 (handle_struct_member_die): New function, extracted from
8141 process_structure_scope. Handle DW_TAG_variant.
8142 (process_structure_scope): Handle discriminated unions. Call
8143 handle_struct_member_die.
8145 2018-02-26 Tom Tromey <tom@tromey.com>
8147 * rust-lang.h (rust_last_path_segment): Declare.
8148 * rust-lang.c (rust_last_path_segment): Now public. Change
8150 (struct disr_info): Remove.
8151 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8152 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8153 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8154 (rust_enum_p, rust_enum_variant): New function.
8155 (rust_underscore_fields): Remove "offset" parameter.
8156 (rust_print_enum): New function.
8157 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8158 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8159 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8161 (rust_internal_print_type): New function, from rust_print_type.
8163 (rust_print_type): Call rust_internal_print_type.
8164 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8165 Update enum handling.
8166 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8167 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8168 (rust_union_quirks): New functions.
8169 (process_full_comp_unit, process_full_type_unit): Call
8171 (process_structure_scope): Update rust_unions if necessary.
8173 2018-02-26 Tom Tromey <tom@tromey.com>
8175 * value.h (value_union_variant): Declare.
8176 * valops.c (value_union_variant): New function.
8177 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8178 (struct discriminant_info): New.
8179 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8181 (struct main_type) <flag_discriminated_union>: New field.
8183 2018-02-26 Tom Tromey <tom@tromey.com>
8185 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8186 unittests/unpack-selftests.c.
8187 * unittests/unpack-selftests.c: New file.
8188 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8190 2018-02-26 Yao Qi <yao.qi@linaro.org>
8192 * dwarf2read.c (struct partial_die_info) <read>: New method.
8193 (read_partial_die): Remove the declaration.
8194 (load_partial_dies): Update.
8195 (partial_die_info::partial_die_info):
8196 (read_partial_die): Change it to partial_die_info::read.
8198 2018-02-26 Yao Qi <yao.qi@linaro.org>
8200 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8201 (fixup_partial_die): Remove declaration.
8202 (scan_partial_symbols): Update.
8203 (partial_die_parent_scope): Likewise.
8204 (partial_die_full_name): Likewise.
8205 (fixup_partial_die): Change it to partial_die_info::fixup.
8207 2018-02-26 Yao Qi <yao.qi@linaro.org>
8209 * dwarf2read.c (read_partial_die): Update the declaration.
8210 (load_partial_dies): Caller update.
8211 (read_partial_die): Remove one argument abbrev_len.
8213 2018-02-26 Yao Qi <yao.qi@linaro.org>
8215 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8216 assignment operator.
8217 (load_partial_dies): Use ctor and copy ctor.
8218 (read_partial_die): Update.
8219 (dwarf2_cu::find_partial_die): Use ctor.
8221 2018-02-26 Yao Qi <yao.qi@linaro.org>
8223 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8224 (find_partial_die_in_comp_unit): Change it to
8225 dwarf2_cu::find_partial_die.
8226 (find_partial_die): Update.
8228 2018-02-26 Yao Qi <yao.qi@linaro.org>
8230 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8233 2018-02-26 Yao Qi <yao.qi@linaro.org>
8235 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8237 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8239 * arch/amd64.h: Use common/tdesc.h.
8240 * arch/i386.c: Likewise.
8241 * arch/i386.h: Likewise.
8242 * arch/tic6x.c: Likewise.
8243 * arch/tdesc.h: Move file from here...
8244 * common/tdesc.h: ...to here.
8245 * features/aarch64-core.c: Regenerate.
8246 * features/aarch64-fpu.c: Regenerate.
8247 * features/i386/32bit-avx.c: Regenerate.
8248 * features/i386/32bit-avx512.c: Regenerate.
8249 * features/i386/32bit-core.c: Regenerate.
8250 * features/i386/32bit-linux.c: Regenerate.
8251 * features/i386/32bit-mpx.c: Regenerate.
8252 * features/i386/32bit-pkeys.c: Regenerate.
8253 * features/i386/32bit-sse.c: Regenerate.
8254 * features/i386/64bit-avx.c: Regenerate.
8255 * features/i386/64bit-avx512.c: Regenerate.
8256 * features/i386/64bit-core.c: Regenerate.
8257 * features/i386/64bit-linux.c: Regenerate.
8258 * features/i386/64bit-mpx.c: Regenerate.
8259 * features/i386/64bit-pkeys.c: Regenerate.
8260 * features/i386/64bit-segments.c: Regenerate.
8261 * features/i386/64bit-sse.c: Regenerate.
8262 * features/i386/x32-core.c: Regenerate.
8263 * features/tic6x-c6xp.c: Regenerate.
8264 * features/tic6x-core.c: Regenerate.
8265 * features/tic6x-gp.c: Regenerate.
8266 * target-descriptions.c: Use common/tdesc.h.
8267 * target-descriptions.h: Likewise.
8269 2018-02-24 Tom Tromey <tom@tromey.com>
8271 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8272 (try_thread_db_load_from_dir, thread_db_load_search): Use
8274 (info_auto_load_libthread_db_compare): Return bool. Change
8276 (info_auto_load_libthread_db): Use std::vector, std::string.
8279 2018-02-24 Tom Tromey <tom@tromey.com>
8281 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8283 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8285 * gdbarch.c: Rebuild.
8286 * gdbarch.h: Rebuild.
8287 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8288 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8289 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8292 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8294 * gdbtypes.h (sect_offset): Change type to uint64_t.
8295 (sect_offset_str): New function.
8296 * dwarf2read.c (create_addrmap_from_aranges): Use
8298 (error_check_comp_unit_head): Likewise.
8299 (create_debug_type_hash_table): Likewise.
8300 (read_cutu_die_from_dwo): Likewise.
8301 (init_cutu_and_read_dies): Likewise.
8302 (init_cutu_and_read_dies_no_follow): Likewise.
8303 (process_psymtab_comp_unit_reader): Likewise.
8304 (partial_die_parent_scope): Likewise.
8305 (peek_die_abbrev): Likewise.
8306 (process_queue): Likewise.
8307 (dwarf2_physname): Likewise.
8308 (read_namespace_alias): Likewise.
8309 (read_import_statement): Likewise.
8310 (create_dwo_cu_reader): Likewise.
8311 (create_cus_hash_table): Likewise.
8312 (lookup_dwo_cutu): Likewise.
8313 (inherit_abstract_dies): Likewise.
8314 (read_func_scope): Likewise.
8315 (read_call_site_scope): Likewise.
8316 (dwarf2_add_member_fn): Likewise.
8317 (read_common_block): Likewise.
8318 (read_module_type): Likewise.
8319 (read_typedef): Likewise.
8320 (read_subrange_type): Likewise.
8321 (load_partial_dies): Likewise.
8322 (read_partial_die): Likewise.
8323 (find_partial_die): Likewise.
8324 (read_str_index): Likewise.
8325 (dwarf2_string_attr): Likewise.
8326 (build_error_marker_type): Likewise.
8327 (lookup_die_type): Likewise.
8328 (dump_die_shallow): Likewise.
8329 (follow_die_ref): Likewise.
8330 (dwarf2_fetch_die_loc_sect_off): Likewise.
8331 (dwarf2_fetch_constant_bytes): Likewise.
8332 (follow_die_sig): Likewise.
8333 (get_signatured_type): Likewise.
8334 (get_DW_AT_signature_type): Likewise.
8335 (dwarf2_find_containing_comp_unit): Likewise.
8336 (set_die_type): Likewise.
8338 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8340 * arch/aarch64.c: Include "common-defs.h".
8341 * arch/amd64.c: Likewise.
8342 * arch/i386.c: Likewise.
8344 2018-02-21 Tom Tromey <tom@tromey.com>
8346 * value.h: (extract_field_op): Update.
8347 * eval.c (extract_field_op): Return a const char *.
8348 * expression.h (parse_expression_for_completion): Update.
8349 * completer.c (complete_expression): Update.
8350 (add_struct_fields): Make fieldname const.
8351 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8352 (mark_completion_tag, parse_exp_in_context_1): Update.
8353 (parse_expression_for_completion): Change "name" to
8354 unique_xmalloc_ptr*.
8356 2018-02-21 Tom Tromey <tom@tromey.com>
8358 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8360 2018-02-21 Yao Qi <yao.qi@linaro.org>
8362 * avr-tdep.c (avr_read_pc): Change parameter type to
8364 * gdbarch.sh (read_pc): Likewise.
8365 * gdbarch.c: Re-generated.
8366 * gdbarch.h: Re-generated.
8367 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8369 * ia64-tdep.c (ia64_read_pc): Likewise.
8370 * mips-tdep.c (mips_read_pc): Likewise.
8371 * spu-tdep.c (spu_read_pc): Likewise.
8373 2018-02-21 Yao Qi <yao.qi@linaro.org>
8375 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8376 * regcache-dump.c: New file.
8377 * regcache.c: Move register_dump to regcache-dump.c.
8378 (maintenance_print_registers): Likewise.
8379 (maintenance_print_raw_registers): Likewise.
8380 (maintenance_print_cooked_registers): Likewise.
8381 (maintenance_print_register_groups): Likewise.
8382 (maintenance_print_remote_registers): Likewise.
8383 (_initialize_regcache): Likewise.
8384 * regcache.h (register_dump): Moved from regcache.c.
8386 2018-02-21 Yao Qi <yao.qi@linaro.org>
8388 * regcache.c (regcache::regcache): Update.
8389 (regcache::invalidate): Move it to detached_regcache::invalidate.
8390 (get_thread_arch_aspace_regcache): Update.
8391 (regcache::raw_update): Update.
8392 (regcache::cooked_read): Remove some code.
8393 (regcache::cooked_read_value): Likewise.
8394 (regcache::raw_write): Remove assert on m_readonly_p.
8395 (regcache::raw_supply_integer): Move it to
8396 detached_regcache::raw_supply_integer.
8397 (regcache::raw_supply_zeroed): Likewise.
8398 * regcache.h (detached_regcache) <raw_supply_integer>: New
8400 <raw_supply_zeroed, invalidate>: Likewise.
8401 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8402 <invalidate>: Likewise.
8403 <m_readonly_p>: Removed.
8405 2018-02-21 Yao Qi <yao.qi@linaro.org>
8407 * infcmd.c (get_return_value): Let stop_regs point to
8408 get_current_regcache.
8409 * regcache.c (regcache::regcache): Remove.
8410 (register_dump_reg_buffer): New class.
8411 (regcache_print): Adjust.
8412 * regcache.h (regcache): Remove constructors.
8414 2018-02-21 Yao Qi <yao.qi@linaro.org>
8416 * regcache.c (class register_dump): New class.
8417 (register_dump_regcache, register_dump_none): New class.
8418 (register_dump_remote, register_dump_groups): New class.
8419 (regcache_print): Update.
8420 * regcache.h (regcache_dump_what): Move it to regcache.c.
8421 (regcache) <dump>: Remove.
8423 2018-02-21 Yao Qi <yao.qi@linaro.org>
8425 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8427 (jit_unwind_reg_set_impl): Call raw_supply.
8428 (jit_frame_sniffer): Use reg_buffer_rw.
8429 * record-full.c (record_full_core_regbuf): Change its type.
8430 (record_full_core_open_1): Use reg_buffer_rw.
8431 (record_full_close): Likewise.
8432 (record_full_core_fetch_registers): Use regcache->raw_supply.
8433 (record_full_core_store_registers): Likewise.
8434 * regcache.c (regcache::get_register_status): Move it to
8436 (regcache_raw_set_cached_value): Remove.
8437 (regcache::raw_set_cached_value): Remove.
8438 (regcache::raw_write): Call raw_supply.
8439 (regcache::raw_supply): Move it to reg_buffer_rw.
8440 * regcache.h (regcache_raw_set_cached_value): Remove.
8441 (reg_buffer_rw): New class.
8443 2018-02-21 Yao Qi <yao.qi@linaro.org>
8445 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8446 readonly_detached_regcache.
8447 (dummy_frame_prev_register): Use regcache->cooked_read.
8448 * frame.c (frame_save_as_regcache): Change return type.
8449 (frame_pop): Update.
8450 * frame.h (frame_save_as_regcache): Update declaration.
8451 * inferior.h (get_infcall_suspend_state_regcache): Update
8453 * infrun.c (infcall_suspend_state) <registers>: use
8454 readonly_detached_regcache.
8455 (save_infcall_suspend_state): Don't use regcache_dup.
8456 (get_infcall_suspend_state_regcache): Change return type.
8457 * linux-fork.c (struct fork_info) <savedregs>: Change to
8458 readonly_detached_regcache.
8460 (fork_save_infrun_state): Don't use regcache_dup.
8461 (info_checkpoints_command): Adjust.
8462 * mi/mi-main.c (register_changed_p): Update declaration.
8463 (mi_cmd_data_list_changed_registers): Use
8464 readonly_detached_regcache.
8465 (register_changed_p): Change parameter type to
8466 readonly_detached_regcache.
8467 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8468 readonly_detached_regcache.
8469 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8470 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8472 (regcache::save): Move it to reg_buffer.
8473 (regcache::restore): Change parameter type.
8474 (regcache_dup): Remove.
8475 * regcache.h (reg_buffer) <save>: New method.
8476 (readonly_detached_regcache): New class.
8477 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8478 readonly_detached_regcache.
8479 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8481 2018-02-21 Yao Qi <yao.qi@linaro.org>
8483 * frame.c (frame_save_as_regcache): Use regcache method save.
8484 (frame_pop): Use regcache method restore.
8485 * infrun.c (restore_infcall_suspend_state): Likewise.
8486 * linux-fork.c (fork_load_infrun_state): Likewise.
8487 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8489 * regcache.c (regcache_save): Remove.
8490 (regcache::restore): More asserts.
8491 (regcache_cpy): Remove.
8492 * regcache.h (regcache_save): Remove the declaration.
8493 (regcache::restore): Move from private to public.
8494 Remove the friend declaration of regcache_cpy.
8495 (regcache_cpy): Remove declaration.
8497 2018-02-21 Yao Qi <yao.qi@linaro.org>
8499 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8500 parameter type to 'readable_regcache *'.
8501 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8502 * arm-tdep.c (arm_neon_quad_read): Likewise.
8503 (arm_pseudo_read): Likewise.
8504 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8505 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8506 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8507 * gdbarch.c: Re-generated.
8508 * gdbarch.h: Re-generated.
8509 * gdbarch.sh (pseudo_register_read): Change parameter type to
8510 'readable_regcache *'.
8511 (pseudo_register_read_value): Likewise.
8512 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8513 (h8300_pseudo_register_read): Likewise.
8514 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8515 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8516 (i386_pseudo_register_read_into_value): Likewise.
8517 (i386_pseudo_register_read_value): Likewise.
8518 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8520 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8521 * m32c-tdep.c (m32c_raw_read): Likewise.
8522 (m32c_read_flg): Likewise.
8523 (m32c_banked_register): Likewise.
8524 (m32c_banked_read): Likewise.
8525 (m32c_sb_read): Likewise.
8526 (m32c_part_read): Likewise.
8527 (m32c_cat_read): Likewise.
8528 (m32c_r3r2r1r0_read): Likewise.
8529 (m32c_pseudo_register_read): Likewise.
8530 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8531 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8532 (mep_pseudo_cr64_read): Likewise.
8533 (mep_pseudo_register_read): Likewise.
8534 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8535 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8536 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8537 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8538 (regcache::cooked_read): Likewise.
8539 (regcache::cooked_read_value): Likewise.
8540 (regcache_cooked_read_signed):
8541 (regcache::cooked_read): Likewise.
8542 * regcache.h (readable_regcache): New class.
8543 (regcache): Inherit readable_regcache. Move some methods to
8545 * rl78-tdep.c (rl78_pseudo_register_read): Change
8546 parameter type to 'readable_regcache *'.
8547 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8548 (e500_pseudo_register_read): Change parameter type to
8549 'readable_regcache *'.
8550 (dfp_pseudo_register_read): Likewise.
8551 (vsx_pseudo_register_read): Likewise.
8552 (efpr_pseudo_register_read): Likewise.
8553 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8554 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8555 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8556 (sh64_pseudo_register_read): Likewise.
8557 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8558 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8559 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8560 (spu_pseudo_register_read): Likewise.
8561 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8562 (xtensa_pseudo_register_read): Likewise.
8564 2018-02-21 Yao Qi <yao.qi@linaro.org>
8566 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8567 (regcache::arch): Move it to reg_buffer::arch.
8568 (regcache::register_buffer): Likewise.
8569 (regcache::assert_regnum): Likewise.
8570 (regcache::num_raw_registers): Likewise.
8571 * regcache.h (reg_buffer): New class.
8572 (regcache): Inherit reg_buffer.
8574 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8576 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8577 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8579 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8581 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8583 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8585 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8586 (SFILES): Remove common/*.c files.
8587 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8588 * common/common.host: Add common reference.
8589 * configure.ac: Likewise.
8590 * configure: Regenerate.
8592 2018-02-16 Yao Qi <yao.qi@linaro.org>
8594 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8595 (block_initialize_namespace): Use new.
8596 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8597 (dwarf2_free_objfile): Use delete.
8598 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8599 (copy_type_recursive): Use new.
8600 * gdb_obstack.h (allocate_on_obstack): New.
8602 2018-02-15 Yao Qi <yao.qi@linaro.org>
8605 * inferior.c (exit_inferior_1): Reset inf->control.
8607 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8609 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8612 2018-02-14 Pedro Alves <palves@redhat.com>
8614 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8615 frame_cleanup_after_sniffer on exception.
8617 2018-02-14 Tom Tromey <tom@tromey.com>
8619 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8621 (solib_bfd_open): Make pathname const.
8622 * solib.c (solib_bfd_open): Make pathname const.
8623 * solib-spu.c (spu_bfd_fopen): Make name const.
8624 (spu_bfd_open): Make pathname const.
8625 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8626 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8628 2018-02-14 Tom Tromey <tom@tromey.com>
8630 * symfile.c (symfile_bfd_open): Update.
8631 * source.h (openp, source_full_path_of, find_and_open_source):
8632 Change argument type to unique_xmalloc_ptr.
8633 * source.c (openp): Take a unique_xmalloc_ptr.
8634 (source_full_path_of, find_and_open_source): Likewise.
8635 (open_source_file, symtab_to_fullname): Update.
8636 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8638 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8639 (exec_file_find): Update.
8640 * psymtab.c (psymtab_to_fullname): Update.
8641 * nto-tdep.h (nto_find_and_open_solib): Update.
8642 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8644 * exec.c (exec_file_attach): Update.
8645 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8646 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8648 2018-02-14 Tom Tromey <tom@tromey.com>
8650 * solib.c: Include source.h.
8651 * nto-tdep.c: Include source.h.
8652 * mi/mi-cmd-env.c: Include source.h.
8653 * infcmd.c: Include source.h.
8654 * exec.c: Include source.h.
8655 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8656 (add_path, directory_switch, source_path, init_source_path): Move
8658 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8659 (add_path, directory_switch, source_path, init_source_path):
8662 2018-02-14 Tom Tromey <tom@tromey.com>
8664 * solist.h (exec_file_find, solib_find): Return
8666 (solib_bfd_fopen): Take a const char *.
8667 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8668 (exec_file_find, solib_find): Likewise.
8669 (solib_bfd_fopen): Do not take ownership of "pathname".
8670 (solib_bfd_open): Use unique_xmalloc_ptr.
8671 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8672 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8673 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8674 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8676 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8678 * ada-lang.c (name_match_type_from_name): Remove reference to
8679 ada_name_for_lookup in function's documentation.
8680 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8682 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8684 * defs.h (enum openp_flags): New enum.
8685 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8686 Move to enum openp_flags.
8687 (openp_flags): New enum flags.
8688 (openp): Change parameter type to openp_flags.
8689 * source.c (openp): Change parameter type to openp_flags.
8690 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8691 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8693 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8695 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8698 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8700 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8702 (class dwarf2_queue_guard): ...the destructor of this new class.
8703 (dw2_do_instantiate_symtab): Create instance of the new class
8704 dwarf2_queue_guard, remove cleanup.
8706 2018-02-09 Tom Tromey <tom@tromey.com>
8708 * source.c (find_source_lines): Don't reference past the end of
8711 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8713 * remote.c (remote_btrace_maybe_reopen): Change error message.
8714 * btrace.c (btrace_enable): Likewise.
8715 (parse_xml_btrace): Likewise.
8716 (parse_xml_btrace_conf): Likewise.
8718 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8720 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8721 (linux_enable_pt, linux_enable_bts): Call
8722 diagnose_perf_event_open_fail.
8724 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8726 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8727 Remove parameter and change return type. Update callers. Move it.
8728 (linux_enable_bts, linux_enable_pt): Improve error message.
8729 (linux_enable_pt): Remove zero buffer size check.
8730 (linux_enable_btrace): Improve error messages. Remove NULL return
8733 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8735 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8736 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8737 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8738 (linux_supports_pt, linux_supports_btrace): Remove.
8739 (linux_enable_bts): Call cpu_supports_bts.
8740 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8741 * remote.c (remote_supports_btrace): Remove.
8742 (init_remote_ops): Remove remote_supports_btrace.
8743 * target-delegates.c: Regenerated.
8744 * target.c (target_supports_btrace): Remove.
8745 * target.h (target_ops) <to_supports_btrace>: Remove
8746 (target_supports_btrace): Remove.
8747 * x86-linux-nat.c (x86_linux_create_target): Remove
8748 linux_supports_btrace.
8750 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8752 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8754 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8755 exception and use message in own exception.
8757 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8759 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8760 (perf_event_pt_event_type): Use gdb_file_up.
8761 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8762 scoped_fd, and scoped_mmap.
8764 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8766 * common/scoped_mmap.h: New.
8767 * unittests/scoped_mmap-selftest.c: New.
8768 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8769 unittests/scoped_mmap-selftest.c.
8771 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8773 * common/scoped_fd.h: New.
8774 * unittests/scoped_fd-selftest.c: New.
8775 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8776 unittests/scoped_fd-selftest.c.
8778 2018-02-09 Tom Tromey <tom@tromey.com>
8780 * auto-load.c (auto_load_section_scripts): Use
8781 gdb::unique_xmalloc_ptr.
8783 2018-02-09 Tom Tromey <tom@tromey.com>
8785 * auto-load.c (execute_script_contents): Use std::string.
8787 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8789 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8790 Python function, rather than a new command.
8792 2018-02-08 Tom Tromey <tom@tromey.com>
8794 * solib.c (solib_find_1): Use std::string.
8795 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8797 2018-02-08 Tom Tromey <tom@tromey.com>
8799 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8801 2018-02-08 Tom Tromey <tom@tromey.com>
8803 * source.c (find_source_lines): Use gdb::def_vector.
8805 2018-02-08 Tom Tromey <tom@tromey.com>
8807 * macrocmd.c (struct temporary_macro_definition): New.
8808 (macro_define_command): Use temporary_macro_definition. Remove
8810 (free_macro_definition_ptr): Remove.
8812 2018-02-08 Tom Tromey <tom@tromey.com>
8814 * macroexp.c (maybe_expand): Use std::string.
8816 2018-02-08 Tom Tromey <tom@tromey.com>
8818 * macroexp.c (struct macro_buffer): Add initializers for some
8820 (init_buffer, init_shared_buffer, free_buffer)
8821 (free_buffer_return_text): Remove.
8822 (macro_buffer): New constructors.
8823 (~macro_buffer): New destructor.
8824 (macro_buffer::set_shared): New method.
8825 (macro_buffer::resize_buffer, macro_buffer::appendc)
8826 (macro_buffer::appendmem): Now methods, not free functions.
8827 (set_token, append_tokens_without_splicing, stringify)
8828 (macro_stringify): Update.
8829 (gather_arguments): Change return type. Remove argc_p argument,
8830 add args_ptr argument. Use std::vector.
8831 (substitute_args): Remove argc argument. Accept std::vector.
8832 (expand): Update. Use std::vector.
8833 (scan, macro_expand, macro_expand_next): Update.
8835 2018-02-08 Tom Tromey <tom@tromey.com>
8837 * symtab.c (default_collect_symbol_completion_matches_break_on):
8838 Use unique_xmalloc_ptr.
8839 * macroscope.h: (sal_macro_scope, user_macro_scope)
8840 (default_macro_scope): Return unique_xmalloc_ptr.
8841 * macroscope.c (sal_macro_scope, user_macro_scope)
8842 (default_macro_scope): Return unique_xmalloc_ptr.
8843 * macroexp.h (macro_expand, macro_expand_once): Return
8845 * macroexp.c (macro_expand, macro_expand_once): Return
8847 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8848 (info_macro_command, info_macros_command): Use
8850 * compile/compile-c-support.c (write_macro_definitions): Use
8852 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8854 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8856 * value.c (value_static_field): Assign field type instead of
8857 containing type when returning an optimized out value.
8859 2018-02-06 Yao Qi <yao.qi@linaro.org>
8861 * ft32-tdep.c (ft32_read_pc): Remove.
8862 (ft32_write_pc): Remove.
8863 (ft32_gdbarch_init): Update.
8864 * m32r-tdep.c (m32r_read_pc): Remove.
8865 (m32r_gdbarch_init): Update.
8866 * mep-tdep.c (mep_read_pc): Remove.
8867 (mep_gdbarch_init): Update.
8868 * microblaze-tdep.c (microblaze_write_pc): Remove.
8869 (microblaze_gdbarch_init): Update.
8870 * mn10300-tdep.c (mn10300_read_pc): Remove.
8871 (mn10300_write_pc): Remove.
8872 (mn10300_gdbarch_init): Update.
8873 * moxie-tdep.c (moxie_read_pc): Remove.
8874 (moxie_write_pc): Remove.
8875 (moxie_gdbarch_init): Update.
8877 2018-02-06 Yao Qi <yao.qi@linaro.org>
8879 * expprint.c (print_subexp_standard): Handle
8880 OP_F77_UNDETERMINED_ARGLIST.
8881 (dump_subexp_body_standard): Likewise.
8883 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8885 * target-descriptions.c (tdesc_element_visitor) Add empty
8887 (tdesc_type): Move make_gdb_type from here.
8888 (tdesc_type_builtin): Likewise.
8889 (tdesc_type_vector): Likewise.
8890 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8891 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8892 (make_gdb_type_union): Likewise.
8893 (make_gdb_type_flags): Likewise.
8894 (make_gdb_type_enum): Likewise.
8895 (make_gdb_type): New function.
8896 (tdesc_register_type): Use static make_gdb_type.
8898 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8900 * infcmd.c (default_print_one_register_info): Align natural-format
8901 column values consistently one under another.
8902 (pad_to_column): New function.
8904 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8906 * dwarf2read.c (dwarf2_physname): Move commment.
8908 2018-02-01 Leszek Swirski <leszeks@google.com>
8910 * varobj.c (varobj_formatted_print_options): Allow recursive
8911 pretty printing if pretty printing is enabled.
8913 2018-02-01 Leszek Swirski <leszeks@google.com>
8915 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8916 names after a structop as a filename.
8918 2018-02-01 Yao Qi <yao.qi@linaro.org>
8920 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8921 (arm_record_coproc_data_proc): Likewise.
8923 2018-02-01 Yao Qi <yao.qi@linaro.org>
8925 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8927 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8929 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8930 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8932 2018-01-31 Pedro Alves <palves@redhat.com>
8934 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8935 * inflow.c (child_terminal_save_inferior): Wrap reference to
8936 tcgetpgrp in HAVE_TERMIOS_H.
8937 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8939 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8940 always iterate over all inferiors.
8941 (gdbsim_cntrl_c): Adjust.
8942 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8944 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8946 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8947 index type is objfile-owned if the element type is as well.
8949 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8953 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8955 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8956 "features/s390x-linux64.c".
8957 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8958 s390_linux32 and s390x_linux64.
8959 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8961 * s390-tdep.c: Include "features/s390-linux32.c" and
8962 "features/s390x-linux64.c".
8963 (s390_tdesc_valid): Add check for tdesc_has_registers.
8964 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8965 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8966 tdesc_s390x_linux64.
8967 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8968 tdesc_s390x_linux64 to...
8969 * s390-tdep.h: ...here.
8971 2018-01-30 Pedro Alves <palves@redhat.com>
8974 * config.in, configure: Regenerate.
8975 * configure.ac: Check for getpgid.
8976 * go32-nat.c (go32_pass_ctrlc): New.
8977 (go32_target): Install it.
8978 * inf-child.c (inf_child_target): Install
8979 child_terminal_save_inferior, child_pass_ctrlc and
8981 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8982 (inf_ptrace_target): No longer install it.
8983 * infcmd.c (interrupt_target_1): Adjust.
8984 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8985 (child_interrupt): Declare.
8986 (inferior::terminal_state): New.
8987 * inflow.c (struct terminal_info): Update comments.
8988 (inferior_process_group): Delete.
8989 (terminal_is_ours): Delete.
8990 (gdb_tty_state): New.
8991 (child_terminal_init): Adjust.
8992 (is_gdb_terminal, sharing_input_terminal_1)
8993 (sharing_input_terminal): New functions.
8994 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8995 Set the process's actual process group in the foreground if
8996 possible. Handle is_ours_for_output/is_ours distinction. Don't
8997 mark terminal as the inferior's if not sharing GDB's terminal.
8998 Don't check attach_flag.
8999 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9000 pass down a target_terminal_state.
9001 (child_terminal_save_inferior): New, factored out from ...
9002 (child_terminal_ours_1): ... this. Handle
9003 target_terminal_state::is_ours_for_output.
9004 (child_interrupt, child_pass_ctrlc): New.
9005 (inflow_inferior_exit): Clear the inferior's terminal_state.
9006 (copy_terminal_info): Copy the inferior's terminal state.
9007 (_initialize_inflow): Remove reference to terminal_is_ours.
9008 * inflow.h (inferior_process_group): Delete.
9009 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9010 * procfs.c (procfs_target): Don't install procfs_interrupt.
9011 (procfs_interrupt): Delete.
9012 * remote.c (remote_serial_quit_handler): Adjust.
9013 (remote_interrupt): Remove ptid parameter. Adjust.
9014 * target-delegates.c: Regenerate.
9015 * target.c: Include "terminal.h".
9016 (target_terminal::terminal_state): Rename to ...
9017 (target_terminal::m_terminal_state): ... this.
9018 (target_terminal::init): Adjust.
9019 (target_terminal::inferior): Adjust to per-inferior
9021 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9022 (target_terminal::ours, target_terminal::ours_for_output): Use
9023 target_terminal_is_ours_kind.
9024 (target_interrupt): Remove ptid parameter. Adjust.
9025 (default_target_pass_ctrlc): Adjust.
9026 * target.h (target_ops::to_terminal_save_inferior): New field.
9027 (target_ops::to_interrupt): Remove ptid_t parameter.
9028 (target_interrupt): Remove ptid_t parameter. Update comment.
9029 (target_pass_ctrlc): Update comment.
9030 * target/target.h (target_terminal_state): New scoped enum,
9032 (target_terminal::terminal_state): ... here.
9033 (target_terminal::inferior): Update comments.
9034 (target_terminal::restore_inferior): New.
9035 (target_terminal::is_inferior, target_terminal::is_ours)
9036 (target_terminal::is_ours_for_output): Adjust.
9037 (target_terminal::scoped_restore_terminal_state): Adjust to
9038 rename, and call restore_inferior() instead of inferior().
9039 (target_terminal::scoped_restore_terminal_state::m_state): Change
9041 (target_terminal::terminal_state): Rename to ...
9042 (target_terminal::m_terminal_state): ... this and change type.
9044 2018-01-30 Pedro Alves <palves@redhat.com>
9046 * linux-nat.c (wait_for_signal): New function.
9047 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9049 (async_terminal_is_ours)
9050 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9051 (linux_nat_add_target): Don't override
9052 to_terminal_inferior/to_terminal_ours.
9054 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9056 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9058 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9060 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9061 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9062 dwarf2_per_objfile_free here.
9063 (dwarf2_per_objfile_free): Remove.
9064 (_initialize_dwarf2_read): Don't register
9065 dwarf2_per_objfile_free as a registry cleanup.
9067 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9069 Avoid compilation errors in MinGW native builds
9071 The error is triggered by including python-internal.h, and the
9074 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9075 from build-gnulib/import/math.h:27,
9076 from d:/usr/Python26/include/pyport.h:235,
9077 from d:/usr/Python26/include/Python.h:58,
9078 from python/python-internal.h:94,
9079 from python/py-arch.c:24:
9080 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9084 This happens because Python headers define 'hypot' to expand t
9085 '_hypot' in the Windows builds.
9086 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9087 'hypoth'. This avoids a compilation error.
9089 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9091 * MAINTAINERS (Write After Approval): Fix ordering.
9093 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9095 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9097 2018-01-26 Alan Modra <amodra@gmail.com>
9099 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9100 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9101 Remove nop. Make const. Comment.
9102 (powerpc32_plt_stub_so_2): New.
9103 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9104 Correct count. Update uses.
9105 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9106 Move common code reading PLT entry word. Correct
9107 powerpc32_plt_stub PLT address calculation.
9108 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9109 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9110 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9111 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9112 (ppc64_standard_linkage8): Likewise.
9113 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9114 Correct insns description.
9115 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9117 2018-01-24 Pedro Alves <palves@redhat.com>
9119 GCC PR libstdc++/83906
9120 * gdbtypes.c (operator==(const dynamic_prop &,
9121 const dynamic_prop &)): New.
9122 (operator==(const range_bounds &, const range_bounds &)): New.
9123 (check_types_equal): Use them instead of memcmp.
9124 * gdbtypes.h (operator==(const dynamic_prop &,
9125 const dynamic_prop &)): Declare.
9126 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9127 (operator==(const range_bounds &, const range_bounds &)): Declare.
9128 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9130 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9132 * s390-linux-tdep.c (s390_record_address_mask)
9133 (s390_record_calc_disp_common, s390_record_calc_disp)
9134 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9135 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9136 (s390_process_record): Move to s390-tdep.c.
9137 (s390_linux_init_abi_any): Adjust.
9138 * s390-tdep.c (s390_record_address_mask)
9139 (s390_record_calc_disp_common, s390_record_calc_disp)
9140 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9141 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9142 (s390_process_record): Moved from s390-linux-tdep.c
9143 (s390_gdbarch_init): Adjust.
9145 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9147 * s390-linux-nat.c (s390-tdep.h): New include.
9148 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9149 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9150 (ALLDEPFILES): Add s390-tdep.c.
9151 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9152 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9153 * s390-tdep.h: ...this. New file.
9154 * s390-linux-tdep.c (s390-tdep.h): New include.
9155 (_initialize_s390_tdep): Rename to...
9156 (_initialize_s390_linux_tdep): ...this and adjust.
9157 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9158 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9160 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9161 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9162 (s390_is_partial_instruction, s390_software_single_step)
9163 (is_non_branch_ril, s390_displaced_step_copy_insn)
9164 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9165 (s390_prologue_data, s390_addr, s390_store, s390_load)
9166 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9167 (s390_register_call_saved, s390_guess_tracepoint_registers)
9168 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9169 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9170 (s390_pseudo_register_name, s390_pseudo_register_type)
9171 (s390_pseudo_register_read, s390_pseudo_register_write)
9172 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9173 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9174 (s390_addr_bits_remove, s390_address_class_type_flags)
9175 (s390_address_class_type_flags_to_name)
9176 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9177 (s390_function_arg_float, s390_function_arg_vector)
9178 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9179 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9180 (s390_frame_align, s390_register_return_value, s390_return_value)
9181 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9182 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9183 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9184 (s390_trad_frame_prev_register, s390_unwind_cache)
9185 (s390_prologue_frame_unwind_cache)
9186 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9187 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9188 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9189 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9190 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9191 (s390_frame_base_address, s390_local_base_address)
9192 (s390_frame_base, s390_gcc_target_options)
9193 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9194 (s390_validate_reg_range, s390_tdesc_valid)
9195 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9196 * s390-tdep.c: ...this. New file.
9198 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9200 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9201 (s390_process_record, s390_gdbarch_tdep_alloc)
9202 (s390_linux_init_abi_any): Use/set new hook.
9204 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9206 * s390-linux-tdep.c (osabi.h): New include.
9207 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9208 (s390_linux_init_abi_any): New functions.
9209 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9211 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9213 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9214 tdesc_has_registers check
9216 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9218 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9219 (s390_validate_reg_range): New macro.
9220 (s390_gdbarch_init): Adjust.
9222 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9224 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9225 (s390_gdbarch_tdep_alloc): Adjust.
9226 (s390_gdbarch_init): Adjust.
9228 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9230 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9231 <have_tdb>: Change type to bool.
9232 (s390_gdbarch_tdep_alloc): Adjust.
9233 (s390_gdbarch_init): Adjust.
9235 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9237 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9238 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9239 (s390_gdbarch_tdep_alloc): New function.
9240 (s390_gdbarch_init): Allocate tdep at start and use its fields
9241 instead of separate variables.
9243 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9245 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9246 when looking for cached gdbarch and add comment for remaining.
9248 2018-01-22 Pedro Alves <palves@redhat.com>
9249 Sergio Durigan Junior <sergiodj@redhat.com>
9251 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9254 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9256 * MAINTAINERS: Update my company e-mail address.
9258 2018-01-22 Yao Qi <yao.qi@linaro.org>
9260 * regcache.c (cooked_write_test): New function.
9261 (_initialize_regcache): Register the test.
9263 2018-01-22 Yao Qi <yao.qi@linaro.org>
9265 * ia64-tdep.c (ia64_pseudo_register_read): Call
9266 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9267 * m32c-tdep.c (m32c_cat_read): Likewise.
9268 (m32c_r3r2r1r0_read): Likewise.
9269 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9270 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9272 2018-01-22 Yao Qi <yao.qi@linaro.org>
9274 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9275 method raw_read instead of regcache_raw_read.
9276 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9277 * arm-tdep.c (arm_neon_quad_read): Likewise.
9278 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9279 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9280 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9281 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9282 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9283 (i386_pseudo_register_read_into_value): Likewise.
9284 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9285 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9286 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9287 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9288 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9289 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9290 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9291 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9292 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9294 2018-01-22 Yao Qi <yao.qi@linaro.org>
9296 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9297 * configure.tgt: Remove target mt.
9298 * mt-tdep.c: Remove.
9299 * regcache.c (cooked_read_test): Remove the check for mt.
9301 2018-01-22 Yao Qi <yao.qi@linaro.org>
9303 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9304 instead of gdbarch_pseudo_register_read_value.
9306 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9308 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9311 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9313 * linespec.c (create_sals_line_offset): Remove code that preserved
9314 the symtab_and_line's line number.
9316 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9318 * varobj.c (varobj_create): Don't set valid_block when creating a
9321 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9323 * varobj.c (varobj_create): Remove out of date comment.
9325 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9328 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9329 updating innermost block.
9330 * parse.c (innermost_block_tracker::update): Take extra type
9331 parameter, and check types match before updating innermost block.
9332 (write_dollar_variable): Update innermost block for registers.
9333 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9334 (innermost_block_tracker::innermost_block_tracker): Initialise
9336 (innermost_block_tracker::reset): Take type parameter.
9337 (innermost_block_tracker::update): Take type parameter, and pass
9338 type through as needed.
9339 (innermost_block_tracker::m_types): New member.
9340 * varobj.c (varobj_create): Pass type when reseting innermost
9343 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9345 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9346 * ada-lang.c (resolve_subexp): Likewise.
9347 * breakpoint.c (set_breakpoint_condition) Likewise.
9348 (watch_command_1) Likewise.
9349 * c-exp.y (variable): Likewise.
9350 * d-exp.y (PrimaryExpression): Likewise.
9351 * f-exp.y (variable): Likewise.
9352 * go-exp.y (variable): Likewise.
9353 * m2-exp.y (variable): Likewise.
9354 * objfiles.c (objfile::~objfile): Likewise.
9355 * p-exp.y (variable): Likewise.
9356 * parse.c (innermost_block): Change type.
9357 * parser-defs.h (class innermost_block_tracker): New.
9358 (innermost_block): Change to innermost_block_tracker.
9359 * printcmd.c (display_command): Switch to innermost_block API.
9360 (do_one_display): Likewise.
9361 * rust-exp.y (do_one_display): Likewise.
9362 * symfile.c (clear_symtab_users): Likewise.
9363 * varobj.c (varobj_create): Switch to innermost_block API, replace
9364 use of innermost_block with block stored on varobj object.
9366 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9368 * expression.h (innermost_block): Remove declaration.
9369 * varobj.c: Add 'parser-defs.h' include.
9371 2018-01-19 Tom Tromey <tom@tromey.com>
9373 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9374 symbols in the static and global blocks.
9376 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9378 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9379 gdb_ptrace.h, and move including gdb_wait.h ...
9380 * nat/linux-ptrace.h: ... to here.
9382 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9384 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9385 inf_ptrace_detach_success.
9386 (inf_ptrace_detach_success): Add inferior parameter, use it
9387 instead of inferior_ptid, pass it to detach_inferior.
9388 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9390 * inferior.c (detach_inferior): Add overload that takes an
9392 * inferior.h (detach_inferior): Likewise.
9393 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9394 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9395 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9397 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9399 * target.h (struct target_ops) <to_detach>: Add inferior
9401 (target_detach): Likewise.
9402 * target.c (dispose_inferior): Pass inferior down.
9403 (target_detach): Pass inferior down. Assert that it is equal to
9404 the current inferior.
9405 * aix-thread.c (aix_thread_detach): Pass inferior down.
9406 * corefile.c (core_file_command): Pass current_inferior() down.
9407 * corelow.c (core_detach): Add inferior parameter.
9408 * darwin-nat.c (darwin_detach): Likewise.
9409 * gnu-nat.c (gnu_detach): Likewise.
9410 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9411 * infcmd.c (detach_command): Pass current_inferior() down to
9413 * infrun.c (follow_fork_inferior): Pass parent_inf to
9415 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9417 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9418 * linux-thread-db.c (thread_db_detach): Likewise.
9419 * nto-procfs.c (procfs_detach): Likewise.
9420 * procfs.c (procfs_detach): Likewise.
9421 * record.c (record_detach): Likewise.
9422 * record.h (struct inferior): Forward-declare.
9423 (record_detach): Add inferior parameter.
9424 * remote-sim.c (gdbsim_detach): Likewise.
9425 * remote.c (remote_detach_1): Likewise.
9426 (remote_detach): Likewise.
9427 (extended_remote_detach): Likewise.
9428 * sol-thread.c (sol_thread_detach): Likewise.
9429 * target-debug.h (target_debug_print_inferior_p): New macro.
9430 * target-delegates.c: Re-generate.
9431 * top.c (kill_or_detach): Pass inferior down to target_detach.
9432 * windows-nat.c (windows_detach): Add inferior parameter.
9434 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9436 * target.h (struct target_ops) <to_detach>: Remove args
9438 (target_detach): Likewise.
9439 * target.c (dispose_inferior): Adjust.
9440 (target_detach): Remove args parameter, adjust.
9441 * aix-thread.c (aix_thread_detach): Adjust.
9442 * corefile.c (core_file_command): Adjust.
9443 * corelow.c (core_detach): Adjust.
9444 * darwin-nat.c (darwin_detach): Adjust.
9445 * gnu-nat.c (gnu_detach): Adjust.
9446 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9447 * infcmd.c (detach_command): Adjust
9448 * infrun.c (follow_fork_inferior): Adjust.
9449 (handle_vfork_child_exec_or_exit): Adjust.
9450 * linux-fork.c (linux_fork_detach): Remove args parameter.
9451 * linux-fork.h (linux_fork_detach): Likewise.
9452 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9453 * linux-thread-db.c (thread_db_detach): Likewise.
9454 * nto-procfs.c (procfs_detach): Likewise.
9455 * procfs.c (procfs_detach): Likewise.
9456 (do_detach): Remove signo parameter.
9457 * record.c (record_detach): Remove args parameter.
9458 * record.h (record_detach): Likewise.
9459 * remote-sim.c (gdbsim_detach): Likewise.
9460 * remote.c (remote_detach_1): Likewise.
9461 (remote_detach): Likewise.
9462 (extended_remote_detach): Likewise.
9463 * sol-thread.c (sol_thread_detach): Likewise.
9464 * target-delegates.c: Re-generate.
9465 * top.c (struct qt_args) <args>: Remove field.
9466 (kill_or_detach): Don't pass args.
9467 (quit_force): Don't set args.
9468 * windows-nat.c (windows_detach): Remove args parameter.
9470 2018-01-19 Yao Qi <yao.qi@linaro.org>
9472 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9473 (arm_linux_init_abi): Install it.
9475 2018-01-19 Yao Qi <yao.qi@linaro.org>
9477 * osabi.c (gdb_osabi_names): Extend the regexp for
9478 arm-linux-gnueabihf.
9480 2018-01-18 Yao Qi <yao.qi@linaro.org>
9482 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9484 (abbrev_table::add_abbrev): Update.
9485 (abbrev_table::lookup_abbrev): Update.
9487 2018-01-18 Yao Qi <yao.qi@linaro.org>
9489 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9491 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9493 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9496 2018-01-17 Tom Tromey <tom@tromey.com>
9498 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9500 2018-01-17 Tom Tromey <tom@tromey.com>
9502 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9503 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9504 (create_array_type_with_stride): Update.
9505 * dwarf2read.c (set_die_type): Update.
9507 2018-01-17 Tom Tromey <tom@tromey.com>
9509 * dwarf2read.c (delayed_method_info): Remove typedef.
9510 (dwarf2_cu::method_info): Now a std::vector.
9511 (add_to_method_list): Update.
9512 (free_delayed_list): Remove.
9513 (compute_delayed_physnames): Update.
9514 (process_full_comp_unit, process_full_type_unit): Clear the method
9515 list. Remove cleanups.
9516 (psymtab_include_file_name): Add name_holder parameter. Use
9518 (dwarf_decode_lines): Update.
9520 2018-01-17 Tom Tromey <tom@tromey.com>
9521 Simon Marchi <simon.marchi@ericsson.com>
9523 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9524 (dwarf2_per_objfile::free_cached_comp_units)
9525 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9526 (init_cutu_and_read_dies_no_follow): Update.
9527 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9528 (dwarf2_cu::~dwarf2_cu): New.
9529 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9530 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9532 2018-01-17 Tom Tromey <tom@tromey.com>
9533 Simon Marchi <simon.marchi@ericsson.com>
9535 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9536 (struct die_reader_specs) <abbrev_table>: New member.
9537 (struct abbrev_table): Add constructor.
9538 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9539 <abbrev_obstack>: Now an auto_obstack.
9540 (abbrev_table_up): New typedef.
9541 (init_cu_die_reader): Add abbrev_table parameter.
9542 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9543 Add result_dwo_abbrev_table.
9544 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9545 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9547 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9549 (skip_children): Update.
9550 (abbrev_table::alloc_abbrev): Rename from
9551 abbrev_table_alloc_abbrev.
9552 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9553 (abbrev_table::lookup_abbrev): Rename from
9554 abbrev_table_lookup_abbrev.
9555 (abbrev_table_read_table): Return abbrev_table_up.
9556 (abbrev_table_free, abbrev_table_free_cleanup)
9557 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9558 (load_partial_dies): Update.
9560 2018-01-17 Tom Tromey <tom@tromey.com>
9562 * dwarf2read.c (dwarf2_compute_name): Update comment.
9563 (read_func_scope, read_variable): Update.
9564 (new_symbol): Remove.
9565 (new_symbol_full): Rename to new_symbol.
9567 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9570 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9571 a warning instead of throwing an error, set section size to 0 and return
9573 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9575 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9577 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9579 (linux_ptrace_attach_fail_reason_string): Likewise.
9580 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9582 (linux_ptrace_attach_fail_reason_string): Likewise.
9583 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9585 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9587 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9589 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9592 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9593 checking for fs_base/gs_base fields in struct user_regs_struct.
9594 * configure: Regenerate.
9596 2018-01-17 Yao Qi <yao.qi@linaro.org>
9598 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9600 (aarch64_linux_init_abi): Install it to gdbarch hook
9603 2018-01-15 Pedro Alves <palves@redhat.com>
9605 * common/signals-state-save-restore.c
9606 (save_original_signals_state): Fix typos.
9608 2017-01-12 Tom Tromey <tom@tromey.com>
9609 Sergio Durigan Junior <sergiodj@redhat.com>
9611 * Makefile.in (install-only): Install gdb-add-index.
9613 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9615 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9617 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9619 * infrun.c (keep_going_pass_signal): Clear step-over info when
9620 insert_breakpoints fails.
9622 2018-01-11 Pedro Alves <palves@redhat.com>
9625 * infrun.c (resume): Rename to ...
9626 (resume_1): ... this.
9627 (resume): Reimplement as wrapper around resume_1.
9629 2018-01-11 Pedro Alves <palves@redhat.com>
9632 * remote.c (remote_parse_stop_reply): Default to the last-set
9633 general thread instead of to 'magic_null_ptid'.
9635 2018-01-10 Pedro Alves <palves@redhat.com>
9637 * language.h (language_get_symbol_name_matcher): Rename ...
9638 (get_symbol_name_matcher): ... this.
9639 * language.c (language_get_symbol_name_matcher): Ditto.
9640 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9643 2018-01-10 Pedro Alves <palves@redhat.com>
9647 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9648 Adjust to use language_get_symbol_name_matcher instead of
9649 language_defn::la_get_symbol_name_matcher.
9650 * language.c (language_get_symbol_name_matcher): If in Ada mode
9651 and the lookup name is a verbatim match, return Ada's matcher.
9652 * language.h (language_get_symbol_name_matcher): Adjust comment.
9653 (ada_lookup_name_info::verbatim_p):: New method.
9655 2018-01-10 Pedro Alves <palves@redhat.com>
9658 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9659 minsym's language is language_auto or language_cplus, pass down
9660 language_ada instead.
9661 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9663 2018-01-10 Pedro Alves <palves@redhat.com>
9666 * minsyms.c (linkage_name_str): New function.
9667 (iterate_over_minimal_symbols): Use it.
9669 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9671 * NEWS: Document that 'info proc' now works on FreeBSD.
9673 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9675 * configure.ac: Check for kinfo_getfile in libutil.
9676 * configure: Regenerate.
9677 * config.in: Regenerate.
9678 * fbsd-nat.c: Include "fbsd-tdep.h".
9679 (fbsd_fetch_cmdline): New.
9680 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9681 rather than calling error.
9682 (fbsd_info_proc): New.
9683 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9684 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9685 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9687 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9689 * fbsd-nat.c (struct free_deleter): Remove.
9690 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9692 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9694 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9695 NULL for an empty pathname.
9697 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9699 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9700 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9701 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9702 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9703 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9704 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9705 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9706 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9707 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9708 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9709 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9710 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9711 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9712 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9713 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9715 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9717 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9718 (gnu_xfer_auxv): New function.
9719 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9722 2018-01-08 Yao Qi <yao.qi@linaro.org>
9723 Simon Marchi <simon.marchi@ericsson.com>
9725 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9727 (COMMON_OBS): Remove selftest.o.
9728 * configure.ac: Append selftest-arch.c and common/selftest.c to
9729 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9730 * configure: Re-generated.
9731 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9733 (maintenance_info_selftests): Likewise.
9735 2018-01-08 Xavier Roirand <roirand@adacore.com>
9737 * ada-valprint.c (val_print_packed_array_elements): Use
9738 proper number of elements when printing an array indexed
9739 by an enumeration type.
9741 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9743 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9744 (dw2_get_file_names_reader): Adjust.
9745 (lookup_dwo_signatured_type): Adjust.
9746 (lookup_dwp_signatured_type): Adjust.
9747 (lookup_signatured_type): Adjust.
9748 (create_type_unit_group): Adjust.
9749 (get_type_unit_group): Adjust.
9750 (process_psymtab_comp_unit_reader): Adjust.
9751 (build_type_psymtabs_reader): Adjust.
9752 (scan_partial_symbols): Adjust.
9753 (add_partial_symbol): Adjust.
9754 (add_partial_subprogram): Adjust.
9755 (peek_die_abbrev): Adjust.
9756 (fixup_go_packaging): Adjust.
9757 (process_imported_unit_die): Adjust.
9758 (dwarf2_compute_name): Adjust.
9759 (dwarf2_physname): Adjust.
9760 (read_import_statement): Adjust.
9761 (handle_DW_AT_stmt_list): Adjust.
9762 (read_file_scope): Adjust.
9763 (read_func_scope): Adjust.
9764 (read_lexical_block_scope): Adjust.
9765 (read_call_site_scope): Adjust.
9766 (read_variable): Adjust.
9767 (dwarf2_rnglists_process): Adjust.
9768 (dwarf2_ranges_process): Adjust.
9769 (dwarf2_ranges_read): Adjust.
9770 (dwarf2_get_pc_bounds): Adjust.
9771 (dwarf2_record_block_ranges): Adjust.
9772 (dwarf2_add_field): Adjust.
9773 (dwarf2_add_member_fn): Adjust.
9774 (read_structure_type): Adjust.
9775 (process_structure_scope): Adjust.
9776 (read_enumeration_type): Adjust.
9777 (read_array_type): Adjust.
9778 (mark_common_block_symbol_computed): Adjust.
9779 (read_common_block): Adjust.
9780 (read_namespace_type): Adjust.
9781 (read_namespace): Adjust.
9782 (read_module_type): Adjust.
9783 (read_tag_pointer_type): Adjust.
9784 (read_tag_ptr_to_member_type): Adjust.
9785 (read_tag_string_type): Adjust.
9786 (read_subroutine_type): Adjust.
9787 (read_typedef): Adjust.
9788 (read_base_type): Adjust.
9789 (attr_to_dynamic_prop): Adjust.
9790 (read_subrange_type): Adjust.
9791 (read_unspecified_type): Adjust.
9792 (dwarf2_read_abbrevs): Adjust.
9793 (load_partial_dies): Adjust.
9794 (read_partial_die): Adjust.
9795 (find_partial_die): Adjust.
9796 (guess_partial_die_structure_name): Adjust.
9797 (fixup_partial_die): Adjust.
9798 (read_attribute_value): Adjust.
9799 (read_addr_index): Adjust.
9800 (read_addr_index_from_leb128): Adjust.
9801 (read_str_index): Adjust.
9802 (dwarf2_string_attr): Adjust.
9803 (get_debug_line_section): Adjust.
9804 (dwarf_decode_line_header): Adjust.
9805 (lnp_state_machine::check_line_address): Adjust.
9806 (dwarf_decode_lines_1): Adjust.
9807 (dwarf_decode_lines): Adjust.
9808 (dwarf2_start_symtab): Adjust.
9809 (var_decode_location): Adjust.
9810 (new_symbol_full): Adjust.
9811 (dwarf2_const_value_data): Adjust.
9812 (dwarf2_const_value_attr): Adjust.
9813 (dwarf2_const_value): Adjust.
9815 (die_containing_type): Adjust.
9816 (build_error_marker_type): Adjust.
9817 (lookup_die_type): Adjust.
9818 (guess_full_die_structure_name): Adjust.
9819 (anonymous_struct_prefix): Adjust.
9820 (determine_prefix): Adjust.
9821 (dwarf2_name): Adjust.
9822 (follow_die_ref_or_sig): Adjust.
9823 (follow_die_offset): Adjust.
9824 (follow_die_ref): Adjust.
9825 (follow_die_sig_1): Adjust.
9826 (follow_die_sig): Adjust.
9827 (get_signatured_type): Adjust.
9828 (get_DW_AT_signature_type): Adjust.
9829 (decode_locdesc): Adjust.
9830 (dwarf_decode_macros): Adjust.
9831 (cu_debug_loc_section): Adjust.
9832 (fill_in_loclist_baton): Adjust.
9833 (dwarf2_symbol_mark_computed): Adjust.
9834 (init_one_comp_unit): Don't assign
9835 dwarf2_cu::dwarf2_per_objfile.
9836 (set_die_type): Adjust.
9838 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9840 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9841 <dwarf2_per_objfile>: New field.
9842 (dwarf2_per_objfile): Remove global.
9843 (get_dwarf2_per_objfile): New function.
9844 (set_dwarf2_per_objfile): New function.
9845 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9847 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9848 (read_abbrev_offset): Likewise.
9849 (read_indirect_string): Likewise.
9850 (read_indirect_line_string): Likewise.
9851 (read_indirect_string_at_offset): Likewise.
9852 (read_indirect_string_from_dwz): Likewise.
9853 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9855 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9856 (create_all_comp_units): Change objfile parameter to
9858 (create_all_type_units): Likewise.
9859 (process_queue): Add dwarf2_per_objfile parameter.
9860 (read_and_check_comp_unit_head): Likewise.
9861 (lookup_dwo_unit_in_dwp): Likewise.
9862 (get_dwp_file): Likewise.
9863 (process_cu_includes): Likewise.
9864 (struct free_dwo_file_cleanup_data): New struct.
9865 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9866 set_dwarf2_per_objfile.
9867 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9868 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9869 context, adjust calls.
9870 (dw2_instantiate_symtab): Likewise.
9871 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9872 (dw2_get_cu): Likewise.
9873 (create_cu_from_index_list): Change objfile parameter to
9875 (create_cus_from_index_list): Get dwarf2_per_objfile from
9876 context, adjust calls.
9877 (create_cus_from_index): Likewise.
9878 (create_signatured_type_table_from_index): Change objfile
9879 parameter to dwarf2_per_objfile.
9880 (create_signatured_type_table_from_debug_names): Change objfile
9881 parameter to dwarf2_per_objfile.
9882 (create_addrmap_from_index): Likewise.
9883 (create_addrmap_from_aranges): Likewise.
9884 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9885 (dw2_setup): Remove.
9886 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9888 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9889 get_dwarf2_per_objfile.
9890 (dw2_forget_cached_source_info): Likewise.
9891 (dw2_map_symtabs_matching_filename): Likewise.
9892 (struct dw2_symtab_iterator) <index>: Remove.
9893 <dwarf2_per_objfile>: New field.
9894 (dw2_symtab_iter_init): Replace index parameter with
9896 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9897 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9898 (dw2_print_stats): Likewise.
9899 (dw2_dump): Likewise.
9900 (dw2_expand_symtabs_for_function): Likewise.
9901 (dw2_expand_all_symtabs): Likewise.
9902 (dw2_expand_symtabs_with_fullname): Likewise.
9903 (dw2_expand_marked_cus): Replace index and objfile parameters
9904 with dwarf2_per_objfile.
9905 (dw_expand_symtabs_matching_file_matcher): Add
9906 dwarf2_per_objfile parameter and adjust calls.
9907 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9909 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9910 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9912 (create_cus_from_debug_names_list): Replace objfile parameter
9913 with dwarf2_per_objfile and adjust calls.
9914 (create_cus_from_debug_names): Likewise.
9915 (dwarf2_read_debug_names): Likewise.
9916 (mapped_debug_names::namei_to_name): Adjust call.
9917 (dw2_debug_names_iterator::next): Likewise.
9918 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9919 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9920 (dw2_debug_names_dump): Likewise.
9921 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9922 (dw2_debug_names_expand_symtabs_matching): Likewise.
9923 (dwarf2_initialize_objfile): Likewise.
9924 (dwarf2_build_psymtabs): Likewise.
9925 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9927 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9928 (read_and_check_comp_unit_head): Likewise.
9929 (read_abbrev_offset): Likewise.
9930 (create_debug_type_hash_table): Likewise.
9931 (create_debug_types_hash_table): Likewise.
9932 (create_all_type_units): Replace objfile parameter with
9934 (add_type_unit): Add dwarf2_per_objfile parameter.
9935 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9936 with dwarf2_per_objfile.
9937 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9938 (lookup_dwp_signatured_type): Likewise.
9939 (lookup_signatured_type): Likewise.
9940 (read_cutu_die_from_dwo): Likewise.
9941 (init_tu_and_read_dwo_dies): Likewise.
9942 (init_cutu_and_read_dies): Likewise.
9943 (init_cutu_and_read_dies_no_follow): Likewise.
9944 (allocate_type_unit_groups_table): Add objfile parameter.
9945 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9946 (get_type_unit_group): Likewise.
9947 (process_psymtab_comp_unit): Update call.
9948 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9949 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9950 (print_tu_stats): Likewise.
9951 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9953 (build_type_psymtabs): Change objfile parameter to
9955 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9956 passed in void* parameter.
9957 (process_skeletonless_type_units): Change objfile parameter to
9959 (set_partial_user): Likewise.
9960 (dwarf2_build_psymtabs_hard): Likewise.
9961 (read_comp_units_from_section): Likewise.
9962 (create_all_comp_units): Likewise.
9963 (scan_partial_symbols): Update calls.
9964 (add_partial_symbol): Likewise.
9965 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9966 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9967 (process_queue): Add dwarf2_per_objfile parameter.
9968 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9969 (compute_compunit_symtab_includes): Likewise.
9970 (process_cu_includes): Add dwarf2_per_objfile parameter.
9971 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9972 (process_full_type_unit): Likewise.
9973 (process_imported_unit_die): Update call.
9974 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9975 (read_file_scope): Likewise.
9976 (allocate_dwo_file_hash_table): Add objfile parameter.
9977 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9978 (create_cus_hash_table): Likewise.
9979 (create_dwp_hash_table): Likewise.
9980 (create_dwo_unit_in_dwp_v1): Likewise.
9981 (create_dwp_v2_section): Likewise.
9982 (create_dwo_unit_in_dwp_v2): Likewise.
9983 (lookup_dwo_unit_in_dwp): Likewise.
9984 (try_open_dwop_file): Likewise.
9985 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9986 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9987 cleanup to include a reference to dwarf2_per_objfile.
9988 (open_dwp_file): Add dwarf2_per_objfile parameter.
9989 (open_and_init_dwp_file): Likewise.
9990 (get_dwp_file): Likewise.
9991 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9992 (queue_and_load_all_dwo_tus): Update call.
9993 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9995 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9996 (dwarf2_ranges_process): Likewise.
9997 (dwarf2_get_pc_bounds): Likewise.
9998 (mark_common_block_symbol_computed): Likewise.
9999 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10000 (dwarf2_read_abbrevs): Update call.
10001 (read_partial_die): Use dwarf2_per_objfile from cu.
10002 (find_partial_die): Likewise.
10003 (fixup_partial_die): Likewise.
10004 (read_attribute_value): Likewise.
10005 (read_indirect_string_at_offset_from): Add objfile parameter.
10006 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10008 (read_indirect_string_from_dwz): Add objfile parameter.
10009 (read_indirect_string): Add objfile parameter.
10010 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10011 (read_addr_index): Use dwarf2_per_objfile from cu.
10012 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10014 (read_str_index): Use dwarf2_per_objfile from cu.
10015 (get_debug_line_section): Likewise.
10016 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10017 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10018 (new_symbol_full): Use dwarf2_per_objfile from cu.
10019 (build_error_marker_type): Likewise.
10020 (lookup_die_type): Likewise.
10021 (determine_prefix): Likewise.
10022 (follow_die_offset): Likewise.
10023 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10024 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10025 (dwarf2_fetch_die_type_sect_off): Likewise.
10026 (dwarf2_get_die_type): Likewise.
10027 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10028 (get_signatured_type): Likewise.
10029 (get_DW_AT_signature_type): Likewise.
10030 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10031 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10032 (cu_debug_loc_section): Likewise.
10033 (fill_in_loclist_baton): Likewise.
10034 (dwarf2_symbol_mark_computed): Likewise.
10035 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10036 dwarf2_per_objfile.
10037 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10039 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10040 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10041 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10042 (set_die_type): Use dwarf2_free_objfile from cu.
10043 (get_die_type_at_offset): Likewise.
10044 (dwarf2_per_objfile_free): Don't assign global variable.
10045 (debug_names) <constructor>: Add dwarf2_per_objfile
10046 parameter, update m_debugstrlookup construction.
10047 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10049 <m_dwarf2_per_objfile>: New field.
10050 <lookup>: Use m_dwarf2_per_objfile.
10051 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10052 (psyms_seen_size): Likewise.
10053 (write_gdbindex): Replace objfile parameter with
10054 dwarf2_per_objfile.
10055 (write_debug_names): Likewise.
10056 (write_psymtabs_to_index): Likewise.
10057 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10060 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10062 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10063 <dwarf2_per_objfile>: New field.
10064 (struct dwarf2_per_cu_data) <objfile>: Remove.
10065 <dwarf2_per_objfile>: New field.
10066 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10068 (create_signatured_type_table_from_index): Likewise.
10069 (create_debug_type_hash_table): Likewise.
10070 (fill_in_sig_entry_from_dwo_entry): Likewise.
10071 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10072 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10074 (create_partial_symtab): Access objfile through
10075 dwarf2_per_objfile.
10076 (process_psymtab_comp_unit_reader): Likewise.
10077 (read_comp_units_from_section): Likewise.
10078 (scan_partial_symbols): Likewise.
10079 (add_partial_symbol): Likewise.
10080 (add_partial_subprogram): Likewise.
10081 (peek_die_abbrev): Likewise.
10082 (fixup_go_packaging): Likewise.
10083 (process_full_comp_unit): Likewise.
10084 (process_full_type_unit): Likewise.
10085 (process_imported_unit_die): Likewise.
10086 (dwarf2_compute_name): Likewise.
10087 (dwarf2_physname): Likewise.
10088 (read_import_statement): Likewise.
10089 (create_cus_hash_table): Assign dwarf2_physname instead of
10091 (read_func_scope): Access objfile through dwarf2_per_objfile.
10092 (read_lexical_block_scope): Likewise.
10093 (read_call_site_scope): Likewise.
10094 (read_variable): Likewise.
10095 (dwarf2_rnglists_process): Likewise.
10096 (dwarf2_ranges_process): Likewise.
10097 (dwarf2_ranges_read): Likewise.
10098 (dwarf2_record_block_ranges): Likewise.
10099 (dwarf2_add_field): Likewise.
10100 (dwarf2_add_member_fn): Likewise.
10101 (read_structure_type): Likewise.
10102 (process_structure_scope): Likewise.
10103 (read_enumeration_type): Likewise.
10104 (read_array_type): Likewise.
10105 (read_common_block): Likewise.
10106 (read_namespace_type): Likewise.
10107 (read_namespace): Likewise.
10108 (read_module_type): Likewise.
10109 (read_tag_pointer_type): Likewise.
10110 (read_tag_ptr_to_member_type): Likewise.
10111 (read_tag_string_type): Likewise.
10112 (read_subroutine_type): Likewise.
10113 (read_typedef): Likewise.
10114 (read_base_type): Likewise.
10115 (attr_to_dynamic_prop): Likewise.
10116 (read_subrange_type): Likewise.
10117 (read_unspecified_type): Likewise.
10118 (load_partial_dies): Likewise.
10119 (read_partial_die): Likewise.
10120 (find_partial_die): Likewise.
10121 (guess_partial_die_structure_name): Likewise.
10122 (fixup_partial_die): Likewise.
10123 (read_attribute_value): Likewise.
10124 (read_addr_index_from_leb128): Likewise.
10125 (dwarf2_read_addr_index): Likewise.
10126 (dwarf2_string_attr): Likewise.
10127 (lnp_state_machine::check_line_address): Likewise.
10128 (dwarf_decode_lines_1): Likewise.
10129 (dwarf_decode_lines): Likewise.
10130 (dwarf2_start_symtab): Likewise.
10131 (var_decode_location): Likewise.
10132 (new_symbol_full): Likewise.
10133 (dwarf2_const_value_data): Likewise.
10134 (dwarf2_const_value_attr): Likewise.
10135 (dwarf2_const_value): Likewise.
10136 (die_type): Likewise.
10137 (die_containing_type): Likewise.
10138 (lookup_die_type): Likewise.
10139 (guess_full_die_structure_name): Likewise.
10140 (anonymous_struct_prefix): Likewise.
10141 (dwarf2_name): Likewise.
10142 (follow_die_ref_or_sig): Likewise.
10143 (follow_die_offset): Likewise.
10144 (follow_die_ref): Likewise.
10145 (dwarf2_fetch_die_loc_sect_off): Likewise.
10146 (dwarf2_fetch_constant_bytes): Likewise.
10147 (dwarf2_fetch_die_type_sect_off): Likewise.
10148 (dwarf2_get_die_type): Likewise.
10149 (follow_die_sig): Likewise.
10150 (decode_locdesc): Likewise.
10151 (dwarf2_per_cu_objfile): Likewise.
10152 (dwarf2_per_cu_text_offset): Likewise.
10153 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10155 (set_die_type): Access objfile through
10156 dwarf2_per_objfile.
10158 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10160 * valprint.c (converted_character_d): Remove typedef.
10161 (DEF_VEC_O (converted_character_d)): Remove.
10162 (count_next_character): Use std::vector.
10163 (print_converted_chars_to_obstack): Likewise.
10164 (generic_printstr): Likewise.
10166 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10168 * xml-support.h (struct gdb_xml_value): Add constructor.
10169 <value>: Change type to unique_xmalloc_ptr.
10170 (gdb_xml_value_s): Remove typedef.
10171 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10172 (gdb_xml_element_start_handler): Change parameter type to
10174 (xml_find_attribute): Likewise.
10175 * xml-support.c (xml_find_attribute): Change parameter type to
10176 std::vector and adjust.
10177 (gdb_xml_values_cleanup): Remove.
10178 (gdb_xml_parser::start_element): Adjust to std::vector.
10179 (xinclude_start_include): Change paraeter type to std::vector
10181 * btrace.c (check_xml_btrace_version): Likewise.
10182 (parse_xml_btrace_block): Likewise.
10183 (parse_xml_btrace_pt_config_cpu): Likewise.
10184 (parse_xml_btrace_pt): Likewise.
10185 (parse_xml_btrace_conf_bts): Likewise.
10186 (parse_xml_btrace_conf_pt): Likewise.
10187 * memory-map.c (memory_map_start_memory): Likewise.
10188 (memory_map_start_property): Likewise.
10189 * osdata.c (osdata_start_osdata): Likewise.
10190 (osdata_start_item): Likewise.
10191 (osdata_start_column): Likewise.
10192 * remote.c (start_thread): Likewise.
10193 * solib-aix.c (library_list_start_library): Likewise.
10194 (library_list_start_list): Likewise.
10195 * solib-svr4.c (library_list_start_library): Likewise.
10196 (svr4_library_list_start_list): Likewise.
10197 * solib-target.c (library_list_start_segment): Likewise.
10198 (library_list_start_section): Likewise.
10199 (library_list_start_library): Likewise.
10200 (library_list_start_list): Likewise.
10201 * tracepoint.c (traceframe_info_start_memory): Likewise.
10202 (traceframe_info_start_tvar): Likewise.
10203 * xml-syscall.c (syscall_start_syscall): Likewise.
10204 * xml-tdesc.c (tdesc_start_target): Likewise.
10205 (tdesc_start_feature): Likewise.
10206 (tdesc_start_reg): Likewise.
10207 (tdesc_start_union): Likewise.
10208 (tdesc_start_struct): Likewise.
10209 (tdesc_start_flags): Likewise.
10210 (tdesc_start_enum): Likewise.
10211 (tdesc_start_field): Likewise.
10212 (tdesc_start_enum_value): Likewise.
10213 (tdesc_start_vector): Likewise.
10215 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10217 * extension.h (struct xmethod_worker) <clone>: Remove.
10218 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10220 (python_xmethod_worker::clone): Remove.
10221 * valops.c (find_overload_match): Use std::move instead of
10224 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10226 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10227 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10228 <free_xmethod_worker_data>: Remove.
10229 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10230 <get_xmethod_arg_types>: Remove.
10231 <get_xmethod_result_type>: Remove.
10232 <invoke_xmethod>: Remove.
10233 * extension.c (new_xmethod_worker): Remove.
10234 (clone_xmethod_worker): Remove.
10235 (get_matching_xmethod_workers): Return void, pass std::vector by
10237 (get_xmethod_arg_types): Rename to...
10238 (xmethod_worker::get_arg_types): ... this, and adjust.
10239 (get_xmethod_result_type): Rename to...
10240 (xmethod_worker::get_result_type): ... this, and adjust.
10241 (invoke_xmethod): Remove.
10242 (free_xmethod_worker): Remove.
10243 (free_xmethod_worker_vec): Remove.
10244 * extension.h (enum ext_lang_rc): Move here from
10246 (struct xmethod_worker): Add constructor and destructor.
10249 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10250 virtual pure methods.
10251 <get_arg_types, get_result_type>: New methods.
10252 (xmethod_worker_ptr): Remove typedef.
10253 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10254 (xmethod_worker_vec): Remove typedef.
10255 (xmethod_worker_up): New typedef.
10256 (invoke_xmethod): Remove.
10257 (clone_xmethod_worker): Remove.
10258 (free_xmethod_worker): Remove.
10259 (free_xmethod_worker_vec): Remove.
10260 (get_xmethod_arg_types): Remove.
10261 (get_xmethod_result_type): Remove.
10262 * valops.c (find_method_list): Use std::vector, don't use
10263 intermediate vector.
10264 (value_find_oload_method_list): Use std::vector.
10265 (find_overload_match): Use std::vector.
10266 (find_oload_champ): Use std::vector.
10267 * value.c (value_free): Use operator delete.
10268 (value_of_xmethod): Rename to...
10269 (value_from_xmethod): ... this. Don't assign
10270 xmethod_worker::value, take rvalue-reference.
10271 (result_type_of_xmethod): Adjust.
10272 (call_xmethod): Adjust.
10273 * value.h: Include extension.h.
10274 (struct xmethod_worker): Don't forward-declare.
10275 (value_of_xmethod): Rename to...
10276 (value_from_xmethod): ... this, take rvalue-reference.
10277 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10278 (struct python_xmethod_worker): ... this, add constructor and
10280 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10281 (gdbpy_free_xmethod_worker_data): Rename to...
10282 (python_xmethod_worker::~python_xmethod_worker): ... this and
10284 (gdbpy_clone_xmethod_worker_data): Rename to...
10285 (python_xmethod_worker::clone): ... this and adjust.
10286 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10288 (gdbpy_get_xmethod_arg_types): Rename to...
10289 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10290 (gdbpy_get_xmethod_result_type): Rename to...
10291 (python_xmethod_worker::do_get_result_type): ... this and
10293 (gdbpy_invoke_xmethod): Rename to...
10294 (python_xmethod_worker::invoke): ... this and adjust.
10295 (new_python_xmethod_worker): Rename to...
10296 (python_xmethod_worker::python_xmethod_worker): ... this and
10298 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10300 (gdbpy_free_xmethod_worker_data): Remove.
10301 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10302 (gdbpy_get_xmethod_arg_types): Remove.
10303 (gdbpy_get_xmethod_result_type): Remove.
10304 (gdbpy_invoke_xmethod): Remove.
10305 * python/python.c (python_extension_ops): Remove obsolete
10308 2018-01-05 Pedro Alves <palves@redhat.com>
10311 * common/signals-state-save-restore.c
10312 (save_original_signals_state): New parameter 'quiet'. Warn if we
10313 find a custom handler preinstalled, instead of internal erroring.
10314 But only warn if !quiet.
10315 * common/signals-state-save-restore.h
10316 (save_original_signals_state): New parameter 'quiet'.
10317 * main.c (captured_main_1): Move save_original_signals_state call
10318 after option handling, and pass QUIET.
10320 2018-01-05 Pedro Alves <palves@redhat.com>
10322 * spu-tdep.c (spu_catch_start): Pass
10323 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10325 2018-01-05 Pedro Alves <palves@redhat.com>
10328 * ada-lang.c (literal_symbol_name_matcher): New function.
10329 (ada_get_symbol_name_matcher): Use it for
10330 symbol_name_match_type::SEARCH_NAME.
10331 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10332 it down instead of assuming symbol_name_match_type::FULL.
10333 * block.h (block_lookup_symbol): New parameter 'match_type'.
10334 * c-valprint.c (print_unpacked_pointer): Use
10335 lookup_symbol_search_name instead of lookup_symbol.
10336 * compile/compile-object-load.c (get_out_value_type): Pass down
10337 symbol_name_match_type::SEARCH_NAME.
10338 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10339 symbol_name_match_type::FULL.
10340 * cp-support.c (cp_get_symbol_name_matcher): Handle
10341 symbol_name_match_type::SEARCH_NAME.
10342 * infrun.c (insert_exception_resume_breakpoint): Use
10343 lookup_symbol_search_name.
10344 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10345 * psymtab.c (maintenance_check_psymtabs): Use
10346 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10347 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10348 SYMBOL_SEARCH_NAME.
10349 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10350 if symbol_name_match_type::SEARCH_NAME.
10351 (lookup_symbol_in_language): Pass down
10352 symbol_name_match_type::FULL.
10353 (lookup_symbol_search_name): New.
10354 (lookup_language_this): Pass down
10355 symbol_name_match_type::SEARCH_NAME.
10356 (lookup_symbol_aux, lookup_local_symbol): New parameter
10357 'match_type'. Pass it down.
10358 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10359 (lookup_symbol_search_name): New declaration.
10360 (lookup_symbol_in_block): New 'match_type' parameter.
10362 2018-01-05 Pedro Alves <palves@redhat.com>
10365 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10367 (ada_lookup_symbol): Reimplement in terms of
10368 ada_lookup_symbol_list, bits factored out from
10369 ada_lookup_encoded_symbol.
10371 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10373 * ada-exp.y (write_object_renaming): When subscripting an array
10374 using a symbol as the index, pass the block in call to
10375 ada_lookup_encoded_symbol when looking that symbol up.
10377 2018-01-05 Jerome Guitton <guitton@adacore.com>
10379 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10382 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10384 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10385 the case where VALUE_LVAL (val0) is not lval_memory.
10387 2018-01-05 Xavier Roirand <roirand@adacore.com>
10389 * ada-valprint.c (print_optional_low_bound): Handle
10390 character-indexed array printing like boolean-indexed array
10393 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10395 * NEWS: Create a new section for the next release branch.
10396 Rename the section of the current branch, now that it has
10399 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10401 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10402 * version.in: Bump version to 8.1.50.DATE-git.
10404 2018-01-03 Xavier Roirand <roirand@adacore.com>
10406 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10408 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10410 (default_exception_support_info) <catch_handlers_sym>: Add field.
10411 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10412 (ada_exception_name_addr_1): Add "catch handlers" handling.
10413 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10414 Update all callers.
10415 (create_excep_cond_exprs) <ex>: Add parameter.
10416 (re_set_exception): Update create_excep_cond_exprs call.
10417 (print_it_exception, print_one_exception, print_mention_exception)
10418 (print_recreate_exception): Add "catch handler" handling.
10419 (allocate_location_catch_handlers, re_set_catch_handlers)
10420 (check_status_catch_handlers, print_it_catch_handlers)
10421 (print_one_catch_handlers, print_mention_catch_handlers)
10422 (print_recreate_catch_handlers): New function.
10423 (catch_handlers_breakpoint_ops): New variable.
10424 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10425 Add parameter. Add "catch handler" handling.
10426 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10427 Add "catch handler" handling.
10428 (ada_exception_catchpoint_cond_string): Add "catch handler"
10430 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10432 (catch_ada_handlers_command): New function.
10433 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10434 operations structure.
10435 (_initialize_ada_language): Add "catch handlers" command entry.
10436 * NEWS: Document "catch handlers" feature.
10438 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10440 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10441 account when creating the array type of the slice.
10442 (ada_value_slice): Likewise.
10444 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10446 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10448 (create_array_type_with_stride): Add byte_stride_prop parameter.
10449 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10450 New parameter. Update all callers in this file.
10451 (array_type_has_dynamic_stride): New function.
10452 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10453 of arrays with dynamic byte strides.
10454 * dwarf2read.c (read_array_type): Add support for dynamic
10455 DW_AT_byte_stride attributes.
10457 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10459 * dwarf2read.c (read_unspecified_type): Treat
10460 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10462 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10464 Update copyright year range in all GDB files.
10466 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10468 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10469 and gdb/testsuite/gdb.base/step-line.c.
10471 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10473 * copyright.py (main): Dump the contents of
10474 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10475 even if BY_HAND is empty.
10477 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10479 * top.c (print_gdb_version): Update Copyright year in version
10482 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10484 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10486 For older changes see ChangeLog-2017.
10492 version-control: never