1 2018-07-20 Tom Tromey <tom@tromey.com>
3 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4 (process_full_type_unit): Likewise.
5 (dwarf2_start_symtab): Set list_in_scope.
7 2018-07-20 Tom Tromey <tom@tromey.com>
9 * dwarf2read.c (process_psymtab_comp_unit_reader)
10 (build_type_psymtabs_reader): Do not set list_in_scope.
12 2018-07-20 Tom Tromey <tom@tromey.com>
14 * buildsym.c (free_pendings): Remove.
15 (add_symbol_to_list, scoped_free_pendings)
16 (finish_block_internal, buildsym_init): Update.
18 2018-07-20 Tom Tromey <tom@tromey.com>
20 * xcoffread.c (read_xcoff_symtab): Update.
21 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
23 * dbxread.c (process_one_symbol): Update.
24 * coffread.c (coff_symtab_read): Update.
25 * buildsym.h (finish_block): Update.
26 * buildsym.c (finish_block): Remove "listhead" argument.
27 (end_symtab_get_static_block): Update.
29 2018-07-20 Tom Tromey <tom@tromey.com>
31 * buildsym.h (class scoped_free_pendings): Remove constructor.
32 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
34 <m_pending_block_obstack, m_pending_blocks>: New members.
35 (pending_block_obstack, pending_blocks): Remove.
36 (scoped_free_pendings::scoped_free_pendings): Default.
37 (~scoped_free_pendings): Update.
38 (free_pending_blocks): Remove.
39 (finish_block_internal, record_pending_block, make_blockvector)
40 (end_symtab_get_static_block, augment_type_symtab, push_context)
41 (buildsym_init): Update.
43 2018-07-20 Tom Tromey <tom@tromey.com>
45 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
46 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
48 (pending_addrmap, pending_addrmap_obstack)
49 (pending_addrmap_interesting): Remove.
50 (scoped_free_pendings, record_block_range, make_blockvector)
51 (prepare_for_building, reset_symtab_globals, buildsym_init):
54 2018-07-20 Tom Tromey <tom@tromey.com>
56 * xcoffread.c (process_linenos): Update.
57 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
58 * mdebugread.c (psymtab_to_symtab_1): Update.
59 * dwarf2read.c (setup_type_unit_groups)
60 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
61 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
62 * dbxread.c (process_one_symbol): Update.
63 * coffread.c (coff_symtab_read, enter_linenos)
64 (process_coff_symbol): Update.
65 * buildsym.h (current_subfile): Don't declare.
66 (get_current_subfile): Declare.
67 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
69 (start_subfile, free_buildsym_compunit, push_subfile)
70 (prepare_for_building, start_symtab): Update.
71 (get_current_subfile): New function.
73 2018-07-20 Tom Tromey <tom@tromey.com>
75 * coffread.c (coff_symtab_read): Update.
76 * xcoffread.c (read_xcoff_symtab): Update.
77 * dwarf2read.c (new_symbol): Update.
78 (read_func_scope, read_lexical_block_scope): Update.
79 * dbxread.c (process_one_symbol): Update.
80 * buildsym.h (context_stack, context_stack_depth): Don't declare.
81 (outermost_context_p): Remove macro.
82 (outermost_context_p, get_current_context_stack)
83 (get_context_stack_depth): Declare.
84 (pop_context): Return struct context_stack.
85 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
87 (context_stack_size): Remove.
88 (INITIAL_CONTEXT_STACK_SIZE): Remove.
89 (prepare_for_building, end_symtab_get_static_block)
90 (augment_type_symtab, push_context): Update.
91 (pop_context): Return struct context_stack.
92 (outermost_context_p, get_current_context_stack)
93 (get_context_stack_depth): New functions.
94 (buildsym_init): Update.
96 2018-07-20 Tom Tromey <tom@tromey.com>
98 * rust-exp.y: Now a pure parser. Update all rules.
99 (%union): Move earlier.
100 (current_parser, work_obstack): Remove globals.
101 (rust_parser, ~rust_parser): Update.
102 (class rust_parser) <copy_name, concat3, crate_name, super_name,
103 lex_character, lex_number, lex_string, lex_identifier,
104 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
105 convert_name, convert_params_to_expression,
106 convert_ast_to_expression, ast_basic_type, ast_operation,
107 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
108 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
109 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
110 ast_array_type, ast_slice_type, ast_reference_type,
111 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
112 (rust_parse): Update.
113 (rustyyerror, rustyylex): Add parser parameter.
114 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
115 (rust_lex_stringish_test, rust_lex_test_sequence)
116 (rust_lex_test_trailing_dot, rust_lex_test_completion)
117 (rust_lex_test_push_back, rust_lex_tests): Update.
119 2018-07-19 Pedro Alves <palves@redhat.com>
121 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
122 gdb::unique_xmalloc_ptr.
123 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
124 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
125 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
127 * guile/scm-pretty-print.c (ppscm_print_children): Use
128 gdb::unique_xmalloc_ptr instead of cleanups.
129 (gdbscm_apply_val_pretty_printer): Remove cleanups.
130 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
131 gdb::unique_xmalloc_ptr.
132 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
133 Adjust to use gdb::unique_xmalloc_ptr.
134 * guile/scm-utils.c (extract_arg): Adjust.
135 * guile/scm-value.c (gdbscm_value_field): Adjust to use
136 gdb::unique_xmalloc_ptr instead of a cleanup.
138 2018-07-19 Tom Tromey <tom@tromey.com>
140 * utils.c (do_value_free_to_mark)
141 (make_cleanup_value_free_to_mark): Remove.
142 * utils.h (make_cleanup_value_free_to_mark): Remove.
144 2018-07-19 Pedro Alves <palves@redhat.com>
146 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
147 forwarding reference.
149 2018-07-18 Pedro Alves <palves@redhat.com>
151 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
152 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
155 2018-07-18 Pedro Alves <palves@redhat.com>
157 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
159 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
161 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
162 directly instead of a cleanup.
163 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
164 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
165 (vlscm_binop_gdbthrow): New, factored out from ...
166 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
167 (vlscm_rich_compare): Use gdbscm_wrap.
168 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
169 instead of a cleanup.
170 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
172 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
173 Use xfree directly instead of a cleanup.
174 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
175 Adjust to use gdbscm_wrap and scoped_value_mark.
176 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
177 (gdbscm_value_address, gdbscm_value_dereference)
178 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
180 (gdbscm_value_dynamic_type): Use scoped_value_mark.
181 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
183 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
184 gdbscm_wrap and scoped_value_mark.
185 (gdbscm_value_to_string): Use xfree directly instead of a
186 cleanup. Move 'buffer' unique_ptr to TRY scope.
187 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
188 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
190 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
191 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
193 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
196 2018-07-18 Tom de Vries <tdevries@suse.de>
198 * findvar.c (default_read_var_value): Also resolve dynamic type for
199 LOC_OPTIMIZED_OUT vars.
201 2018-07-18 Maciej W. Rozycki <macro@mips.com>
203 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
206 2018-07-17 Tom Tromey <tom@tromey.com>
208 * guile/scm-param.c (pascm_set_func, pascm_show_func)
209 (compute_enum_list, pascm_set_param_value_x)
210 (gdbscm_parameter_value): Update.
211 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
212 (gdbscm_scm_to_host_string): Update.
213 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
215 * guile/scm-cmd.c (cmdscm_add_completion): Update.
216 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
217 * guile/scm-string.c (gdbscm_scm_to_string): Return
219 (gdbscm_scm_to_host_string): Likewise.
221 2018-07-17 Tom Tromey <tom@tromey.com>
223 * guile/guile.c (gdbscm_eval_from_control_command): Update.
224 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
225 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
226 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
229 2018-07-17 Tom Tromey <tom@tromey.com>
231 * guile/scm-param.c (pascm_signal_setshow_error): Update.
232 * guile/guile-internal.h (gdbscm_exception_message_to_string):
234 * guile/scm-cmd.c (cmdscm_function): Update.
235 * guile/scm-pretty-print.c
236 (ppscm_print_exception_unless_memory_error): Update.
237 * guile/scm-exception.c (gdbscm_exception_message_to_string):
238 Return unique_xmalloc_ptr.
240 2018-07-17 Tom Tromey <tom@tromey.com>
242 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
245 2018-07-17 Jim Wilson <jimw@sifive.com>
247 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
248 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
249 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
250 unecessary braces after EF_RISCV_RVC test. Delete call to
251 set_gdbarch_decr_pc_after_break.
253 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
254 RISCV_LAST_FP_REGNUM + 1.
255 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
257 2018-07-17 Tom Tromey <tom@tromey.com>
259 * configure.ac: Remove --disable-gdbcli.
260 * configure: Rebuild.
261 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
262 (SUBDIR_CLI_CFLAGS): Remove.
263 (SFILES): Use SUBDIR_CLI_SRCS.
264 (COMMON_OBS): Use SUBDIR_CLI_OBS.
266 2018-07-17 Tom Tromey <tom@tromey.com>
269 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
271 2018-07-16 Jim Wilson <jimw@sifive.com>
273 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
275 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
277 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
279 (libunwind_frame_sniffer): Likewise.
280 (libunwind_frame_prev_register): Likewise.
281 (libunwind_sigtramp_frame_sniffer): Likewise.
282 * ia64-tdep.c (ia64_access_reg): Likewise.
283 (ia64_access_rse_reg): Likewise.
284 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
285 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
287 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
289 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
291 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
293 * remote-sim.c (gdbsim_target::close,
294 gdbsim_target::mourn_inferior): Remove unused variables.
296 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
298 * ia64-tdep.c (ktab_buf): New global.
299 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
300 (get_kernel_table): Adjust.
302 2018-07-16 Tom Tromey <tom@tromey.com>
304 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
305 * dwarf2read.c (using_directives, new_symbol): Use
307 * dbxread.c (process_one_symbol): Use outermost_context_p.
308 * coffread.c (coff_symtab_read): Use outermost_context_p.
310 2018-07-16 Tom Tromey <tom@tromey.com>
312 * dwarf2read.c (using_directives, read_func_scope)
313 (read_lexical_block_scope): Update.
314 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
315 * buildsym.h (local_using_directives, global_using_directives):
317 (get_local_using_directives, set_local_using_directives)
318 (get_global_using_directives): Declare.
319 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
320 m_global_using_directives>: New members.
321 (finish_block_internal, prepare_for_building)
322 (reset_symtab_globals, end_symtab_get_static_block)
323 (push_context): Update.
324 (get_local_using_directives, set_local_using_directives)
325 (get_global_using_directives): New functions.
326 (buildsym_init): Update.
328 2018-07-16 Tom Tromey <tom@tromey.com>
330 * xcoffread.c (xcoff_initial_scan): Don't call
332 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
333 * buildsym.h (class scoped_free_pendings): Add constructor.
334 (free_pending_blocks): Don't declare.
335 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
336 (free_pending_blocks): Now static.
338 2018-07-16 Tom Tromey <tom@tromey.com>
340 * buildsym.h (push_subfile, pop_subfile): Update declarations.
341 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
343 (struct subfile_stack): Remove.
344 (subfile_stack): Remove.
345 (push_subfile, pop_subfile, buildsym_init): Update.
347 2018-07-16 Tom Tromey <tom@tromey.com>
349 * buildsym.c (push_subfile): Use gdb_assert.
350 (pop_subfile): Use gdb_assert.
352 2018-07-16 Tom Tromey <tom@tromey.com>
354 * buildsym.h (merge_symbol_lists): Remove.
355 * buildsym.c (merge_symbol_lists): Remove.
357 2018-07-16 Tom Tromey <tom@tromey.com>
359 * stabsread.c (scan_file_globals): Update comment.
360 * stabsread.h (scan_file_globals): Move from buildsym.h.
361 * buildsym.h (scan_file_globals): Move to stabsread.h.
363 2018-07-16 Tom Tromey <tom@tromey.com>
365 * xcoffread.c (xcoff_new_init): Update.
366 * mipsread.c (mipscoff_new_init): Update.
367 * mdebugread.c (mdebug_build_psymtabs): Update.
368 * elfread.c (elf_new_init): Update.
369 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
370 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
371 * buildsym.h (buildsym_new_init): Don't declare.
372 * buildsym.c (buildsym_new_init): Remove.
374 2018-07-16 Tom Tromey <tom@tromey.com>
376 * stabsread.h (within_function): Move from buildsym.h.
377 * stabsread.c (start_stabs): Clear within_function.
378 * coffread.c (coff_start_symtab): Clear within_function.
379 * buildsym.h (within_function): Move to stabsread.h.
380 * buildsym.c (prepare_for_building): Update.
382 2018-07-16 Tom Tromey <tom@tromey.com>
384 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
385 * dwarf2read.c (dwarf2_start_symtab): Don't set
386 processing_gcc_compilation.
387 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
389 2018-07-16 Tom Tromey <tom@tromey.com>
391 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
392 (next_symbol_text_func): Move from buildsym.h.
393 * stabsread.c (hashname): Move from buildsym.c.
394 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
395 (next_symbol_text_func, hashname): Move to stabsread.h.
396 * buildsym.c: Don't include bcache.h
397 (hashname): Move to stasbread.c.
399 2018-07-16 Tom Tromey <tom@tromey.com>
401 * buildsym.h (context_stack_size): Don't declare.
402 * buildsym.c (context_stack_size): New global.
404 2018-07-16 Tom Tromey <tom@tromey.com>
406 * dbxread.c (processing_acc_compilation): New global.
407 * buildsym.h (processing_acc_compilation): Don't declare.
409 2018-07-16 Tom Tromey <tom@tromey.com>
411 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
412 * dbxread.c (read_ofile_symtab): Update.
413 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
414 * buildsym.h (last_source_start_addr): Remove.
415 (set_last_source_start_addr, get_last_source_start_addr):
417 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
419 (struct buildsym_compunit) <m_last_source_start_addr>: New
421 (prepare_for_building): Remove start_addr parameter.
422 (start_symtab, restart_symtab, end_symtab_get_static_block)
423 (end_symtab_with_blockvector): Update.
424 (set_last_source_start_addr, get_last_source_start_addr): New
427 2018-07-16 Tom Tromey <tom@tromey.com>
429 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
431 (have_line_numbers): Remove.
432 (record_line, prepare_for_building, end_symtab_get_static_block)
433 (augment_type_symtab): Update.
435 2018-07-16 Tom Tromey <tom@tromey.com>
437 * buildsym.c (~buildsym_compunit): Free the macro table.
438 (struct buildsym_compunit) <get_macro_table, release_macros>: New
440 <m_pending_macros>: New member.
441 (pending_macros): Remove.
442 (~scoped_free_pendings, get_macro_table, prepare_for_building)
443 (reset_symtab_globals, end_symtab_get_static_block)
444 (end_symtab_with_blockvector, augment_type_symtab)
445 (buildsym_init): Update.
447 2018-07-16 Tom Tromey <tom@tromey.com>
449 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
451 (buildsym_compunit::set_last_source_file): New method.
452 <m_last_source_file>: New member.
453 (prepare_for_building): Remove "name" parameter.
454 (start_symtab, restart_symtab, reset_symtab_globals): Update.
455 (last_source_file): Remove.
456 (set_last_source_file, get_last_source_file): Update.
458 2018-07-16 Tom Tromey <tom@tromey.com>
460 * buildsym.c (prepare_for_building): Add assert.
462 2018-07-16 Tom Tromey <tom@tromey.com>
464 * buildsym.c (~buildsym_compunit): Update.
465 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
466 (start_subfile, patch_subfile_names)
467 (end_symtab_with_blockvector): Update.
469 2018-07-16 Tom Tromey <tom@tromey.com>
471 * buildsym.c (struct buildsym_compunit): Add constructor,
472 destructor, initializers.
473 (start_buildsym_compunit): Remove.
474 (free_buildsym_compunit): Use "delete".
475 (start_symtab, restart_symtab): Use "new".
477 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
479 * symfile.c (set_objfile_default_section_offset): Remove struct
482 2018-07-14 Stafford Horne <shorne@gmail.com>
484 * (Responsible Maintainers): Add myself as or1k maintainer.
486 2018-07-13 Tom Tromey <tom@tromey.com>
488 * symfile.c (set_objfile_default_section_offset): Use extra braces
491 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
493 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
496 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
498 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
499 unittests/cli-utils-selftests.c
500 * unittests/cli-utils-selftests.c: New file.
502 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
504 * NEWS: Mention new commands. Mention change to 'thread apply'.
506 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
508 * thread.c (thr_try_catch_cmd): New function.
509 (thread_apply_all_command): Handle qcs flags.
510 (thread_apply_command): Handle qcs flags.
511 (taas_command): New function.
512 (tfaas_command): New function.
513 (_initialize_thread): Update to setup the new commands 'taas
514 and 'tfaas'. Change doc string for 'thread apply'.
516 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
518 * stack.c: (trailing_outermost_frame): New function, mostly
519 extracted from backtrace_command_1.
520 (leading_innermost_frame): New function.
521 (backtrace_command_1): Update to call trailing_outermost_frame.
522 (frame_apply_command_count): New function.
523 (frame_apply_level_command): New function.
524 (frame_apply_all_command): New function.
525 (frame_apply_command): New function.
526 (faas_command): New function.
527 (frame_cmd_list): New variable.
528 (_initialize_stack): Update to setup the new commands 'frame apply'
531 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
533 * cli-utils.c (number_or_range_parser::get_number): Only handle
534 numbers or convenience var as numbers.
535 (parse_flags): New function.
536 (parse_flags_qcs): New function.
537 (number_or_range_parser::finished): Ensure parsing end is detected
538 before end of string.
539 * cli-utils.h (parse_flags): New function.
540 (parse_flags_qcs): New function.
541 (number_or_range_parser): Remove m_finished bool.
542 (number_or_range_parser::skip_range): Set m_in_range to false.
544 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
546 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
549 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
550 Jan Kratochvil <jan.kratochvil@redhat.com>
551 Paul Fertser <fercerpav@gmail.com>
552 Tsutomu Seki <sekiriki@gmail.com>
553 Pedro Alves <palves@redhat.com>
555 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
556 'unittests/parse-connection-spec-selftests.c'.
557 (COMMON_SFILES): Add 'common/netstuff.c'.
558 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
559 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
560 * common/netstuff.c: New file.
561 * common/netstuff.h: New file.
562 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
563 (wait_for_connect): Update comment. New parameter
564 'gdb::optional<int> sock' instead of 'struct serial *scb'.
565 Use 'sock' directly instead of 'scb->fd'.
566 (try_connect): New function, with code from 'net_open'.
567 (net_open): Rewrite main loop to deal with multiple
568 sockets/addresses. Handle IPv6-style hostnames; implement
569 support for IPv6 connections.
570 * unittests/parse-connection-spec-selftests.c: New file.
572 2018-07-11 Pedro Alves <palves@redhat.com>
575 * remote.c (remote_target::remote_detach_pid): Call
578 2018-07-11 Pedro Alves <palves@redhat.com>
580 * h8300-tdep.c (h8300_gdbarch_init): Remove
581 set_gdbarch_ecoff_reg_to_regnum calls.
583 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
586 * c-typeprint.c (c_type_print_base_struct_union): Don't print
587 offsets/sizes for static members of a class/struct.
589 2018-07-11 Alan Hayward <alan.hayward@arm.com>
591 * target-descriptions.c (tdesc_register_bitsize): Rename.
592 * target-descriptions.h (tdesc_register_bitsize): Likewise.
593 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
594 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
596 2018-07-10 Tom Tromey <tom@tromey.com>
598 * breakpoint.c (moribund_locations): Now static and a
600 (breakpoint_init_inferior, moribund_breakpoint_here_p)
601 (build_bpstat_chain, update_global_location_list)
602 (breakpoint_retire_moribund): Update.
603 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
606 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
608 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
609 (riscv_register_reggroup_p): Use new function, remove unneeded
611 (riscv_push_dummy_call): Extend assert to compare against xlen or
612 flen based on register type.
614 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
616 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
618 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
620 * remote.c (show_hardware_watchpoint_limit): New function.
621 (show_hardware_watchpoint_length_limit): New function.
622 (show_hardware_breakpoint_limit): New function.
623 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
624 where appropriate, update help text.
626 2018-07-09 Tom Tromey <tom@tromey.com>
628 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
629 (CLIBS): Don't mention NAT_CLIBS.
631 2018-07-09 Tom Tromey <tom@tromey.com>
633 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
634 (LIBGDB_OBS, clean mostlyclean): Update.
635 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
637 2018-07-09 Tom Tromey <tom@tromey.com>
639 * Makefile.in (%.c: %.y): Use ECHO_YACC.
640 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
641 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
643 2018-07-09 Tom Tromey <tom@tromey.com>
645 * Makefile.in (ALLDEPFILES): Remove exec.c.
646 (COMMON_OBS): Remove exec.o.
647 (COMMON_SFILES): Add exec.c.
649 2018-07-09 Tom Tromey <tom@tromey.com>
651 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
653 2018-07-09 Tom Tromey <tom@tromey.com>
655 * Makefile.in (clean mostlyclean): Remove stamp-version.
656 (version.c): Depend on stamp-version.
657 (stamp-version): New rule, from version.c rule.
659 2018-07-09 Tom Tromey <tom@tromey.com>
661 * Makefile.in (init.c): Depend on stamp-init.
662 (stamp-init): New rule, from init.c rule.
663 (clean mostlyclean): Remove stamp-init.
665 2018-07-09 Tom Tromey <tom@tromey.com>
667 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
668 SUBDIR_GCC_COMPILE_SRCS.
670 2018-07-09 Tom Tromey <tom@tromey.com>
672 * Makefile.in (init.c): Remove some unused sed rules.
674 2018-07-09 Tom Tromey <tom@tromey.com>
676 * Makefile.in (TSOBS): Remove.
677 (INIT_FILES): Update.
678 (LIBGDB_OBS): Update.
679 (COMMON_SFILES): Add inflow.c.
680 (SFILES): Remove inflow.c.
682 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
684 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
686 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
688 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
689 get_saveloc_name, is_signal_frame_name, step_name,
690 init_remote_name, create_addr_space_name,
691 destroy_addr_space_name, search_unwind_table_name,
692 find_dyn_list_name): Constify.
694 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
696 * darwin-nat.c (darwin_pthread_kill): New function.
697 (darwin_resume_thread): Use darwin_pthread_kill.
699 2018-07-05 Tom de Vries <tdevries@suse.de>
701 * macroexp.c (macro_buffer) <operator=>: New member function.
703 2018-07-04 Tom Tromey <tom@tromey.com>
705 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
707 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
709 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
710 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
714 2018-07-04 Joel Brobecker <brobecker@adacore.com>
716 * NEWS: Create a new section for the next release branch.
717 Rename the section of the current branch, now that it has
720 2018-07-04 Joel Brobecker <brobecker@adacore.com>
722 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
723 * version.in: Bump version to 8.2.50.DATE-git.
725 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
726 Pedro Alves <palves@redhat.com>
728 * linux-nat.c (linux_init_ptrace): Rename to ...
729 (linux_init_ptrace_procfs): ... this. Call
730 linux_proc_init_warnings.
731 (linux_nat_target::post_attach)
732 (linux_nat_target::post_startup_inferior): Adjust.
733 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
734 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
736 2018-07-04 Tom de Vries <tdevries@suse.de>
738 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
740 (read_comp_unit_head): ... here.
742 2018-07-03 Tom Tromey <tom@tromey.com>
744 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
745 (stop_tracing, tstatus_command)
746 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
747 (print_one_static_tracepoint_marker): Update.
748 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
750 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
752 (all_tracepoints, static_tracepoints_here): Return std::vector.
754 2018-07-03 Tom Tromey <tom@tromey.com>
756 * common/ptid.c (ptid_equal): Remove.
757 * common/ptid.h (ptid_equal): Don't declare.
758 * ada-tasks.c: Update.
759 * breakpoint.c: Update.
760 * common/agent.c: Update.
762 * darwin-nat-info.c: Update.
763 * darwin-nat.c: Update.
765 * dtrace-probe.c: Update.
766 * dummy-frame.c: Update.
767 * fbsd-nat.c: Update.
769 * gdbthread.h: Update.
771 * go32-nat.c: Update.
772 * inf-loop.c: Update.
773 * inf-ptrace.c: Update.
778 * linux-fork.c: Update.
779 * linux-nat.c: Update.
780 * linux-thread-db.c: Update.
781 * mi/mi-cmd-var.c: Update.
782 * mi/mi-interp.c: Update.
783 * mi/mi-main.c: Update.
784 * nto-procfs.c: Update.
785 * ppc-linux-tdep.c: Update.
787 * python/py-inferior.c: Update.
788 * python/py-record-btrace.c: Update.
789 * python/py-record.c: Update.
790 * ravenscar-thread.c: Update.
791 * regcache.c: Update.
792 * remote-sim.c: Update.
794 * sol-thread.c: Update.
797 * tui/tui-stack.c: Update.
799 * windows-nat.c: Update.
800 * windows-tdep.c: Update.
802 2018-07-03 Tom Tromey <tom@tromey.com>
804 * common/ptid.c (ptid_match): Remove.
805 * common/ptid.h (ptid_match): Don't declare.
806 * fbsd-nat.c: Update.
809 * linux-nat.c: Update.
810 * record-btrace.c: Update.
811 * regcache.c: Update.
814 2018-07-03 Tom Tromey <tom@tromey.com>
816 * common/ptid.c (ptid_tid_p): Remove.
817 * common/ptid.h (ptid_tid_p): Don't declare.
818 * sol-thread.c: Update.
820 2018-07-03 Tom Tromey <tom@tromey.com>
822 * common/ptid.c (ptid_lwp_p): Remove.
823 * common/ptid.h (ptid_lwp_p): Don't declare.
824 * fbsd-nat.c: Update.
825 * linux-nat.c: Update.
826 * nat/linux-procfs.c: Update.
827 * nat/x86-linux-dregs.c: Update.
828 * sol-thread.c: Update.
830 2018-07-03 Tom Tromey <tom@tromey.com>
832 * common/ptid.c (ptid_is_pid): Remove.
833 * common/ptid.h (ptid_is_pid): Don't declare.
835 * linux-nat.c: Update.
836 * mi/mi-interp.c: Update.
840 2018-07-03 Tom Tromey <tom@tromey.com>
842 * common/ptid.c (ptid_get_tid): Remove.
843 * common/ptid.h (ptid_get_tid): Don't declare.
844 * ada-tasks.c: Update.
845 * aix-thread.c: Update.
846 * bsd-uthread.c: Update.
847 * darwin-nat.c: Update.
848 * fbsd-nat.c: Update.
849 * i386-darwin-nat.c: Update.
851 * linux-tdep.c: Update.
852 * nto-procfs.c: Update.
853 * ppc-ravenscar-thread.c: Update.
854 * python/py-infthread.c: Update.
855 * ravenscar-thread.c: Update.
856 * sol-thread.c: Update.
857 * sparc-ravenscar-thread.c: Update.
858 * windows-nat.c: Update.
860 2018-07-03 Tom Tromey <tom@tromey.com>
862 * common/ptid.c (ptid_get_lwp): Remove.
863 * common/ptid.h (ptid_get_lwp): Don't declare.
864 * aarch64-linux-nat.c: Update.
865 * ada-tasks.c: Update.
866 * aix-thread.c: Update.
867 * amd64-linux-nat.c: Update.
868 * arm-linux-nat.c: Update.
870 * fbsd-nat.c: Update.
871 * fbsd-tdep.c: Update.
873 * i386-cygwin-tdep.c: Update.
874 * i386-gnu-nat.c: Update.
875 * i386-linux-nat.c: Update.
876 * ia64-linux-nat.c: Update.
877 * inf-ptrace.c: Update.
879 * linux-fork.c: Update.
880 * linux-nat.c: Update.
881 * linux-tdep.c: Update.
882 * linux-thread-db.c: Update.
883 * mips-linux-nat.c: Update.
884 * nat/aarch64-linux-hw-point.c: Update.
885 * nat/aarch64-linux.c: Update.
886 * nat/linux-btrace.c: Update.
887 * nat/linux-osdata.c: Update.
888 * nat/linux-procfs.c: Update.
889 * nat/x86-linux-dregs.c: Update.
890 * obsd-nat.c: Update.
891 * ppc-fbsd-nat.c: Update.
892 * ppc-linux-nat.c: Update.
894 * python/py-infthread.c: Update.
895 * ravenscar-thread.c: Update.
897 * s390-linux-nat.c: Update.
898 * sol-thread.c: Update.
899 * sol2-tdep.c: Update.
900 * spu-linux-nat.c: Update.
901 * x86-linux-nat.c: Update.
902 * xtensa-linux-nat.c: Update.
904 2018-07-03 Tom Tromey <tom@tromey.com>
906 * common/ptid.c (ptid_get_pid): Remove.
907 * common/ptid.h (ptid_get_pid): Don't declare.
908 * aarch64-linux-nat.c: Update.
909 * ada-lang.c: Update.
910 * aix-thread.c: Update.
911 * alpha-bsd-nat.c: Update.
912 * amd64-fbsd-nat.c: Update.
913 * amd64-linux-nat.c: Update.
914 * arm-linux-nat.c: Update.
915 * arm-nbsd-nat.c: Update.
917 * break-catch-syscall.c: Update.
918 * breakpoint.c: Update.
919 * bsd-uthread.c: Update.
922 * darwin-nat.c: Update.
923 * fbsd-nat.c: Update.
924 * fbsd-tdep.c: Update.
927 * hppa-nbsd-nat.c: Update.
928 * hppa-obsd-nat.c: Update.
929 * i386-fbsd-nat.c: Update.
930 * ia64-linux-nat.c: Update.
931 * inf-ptrace.c: Update.
933 * inferior.c: Update.
934 * inferior.h: Update.
937 * linux-fork.c: Update.
938 * linux-nat.c: Update.
939 * linux-tdep.c: Update.
940 * linux-thread-db.c: Update.
941 * m68k-bsd-nat.c: Update.
942 * mi/mi-interp.c: Update.
943 * mi/mi-main.c: Update.
944 * mips-linux-nat.c: Update.
945 * mips-nbsd-nat.c: Update.
946 * mips64-obsd-nat.c: Update.
947 * nat/aarch64-linux-hw-point.c: Update.
948 * nat/aarch64-linux.c: Update.
949 * nat/linux-btrace.c: Update.
950 * nat/linux-osdata.c: Update.
951 * nat/linux-procfs.c: Update.
952 * nat/x86-linux-dregs.c: Update.
953 * nto-procfs.c: Update.
954 * obsd-nat.c: Update.
955 * ppc-linux-nat.c: Update.
956 * ppc-nbsd-nat.c: Update.
957 * ppc-obsd-nat.c: Update.
958 * proc-service.c: Update.
960 * python/py-inferior.c: Update.
961 * python/py-infthread.c: Update.
962 * ravenscar-thread.c: Update.
964 * remote-sim.c: Update.
966 * rs6000-nat.c: Update.
967 * s390-linux-nat.c: Update.
968 * sh-nbsd-nat.c: Update.
969 * sol-thread.c: Update.
970 * sparc-nat.c: Update.
971 * sparc64-tdep.c: Update.
972 * spu-linux-nat.c: Update.
973 * spu-tdep.c: Update.
974 * target-debug.h: Update.
977 * tid-parse.c: Update.
978 * tracefile-tfile.c: Update.
979 * vax-bsd-nat.c: Update.
980 * windows-nat.c: Update.
981 * x86-linux-nat.c: Update.
984 2018-07-03 Tom Tromey <tom@tromey.com>
986 * common/ptid.c (pid_to_ptid): Remove.
987 * common/ptid.h (pid_to_ptid): Don't declare.
988 * aix-thread.c: Update.
989 * arm-linux-nat.c: Update.
990 * common/ptid.c: Update.
991 * common/ptid.h: Update.
994 * darwin-nat.c: Update.
995 * fbsd-nat.c: Update.
996 * fork-child.c: Update.
998 * go32-nat.c: Update.
999 * inf-ptrace.c: Update.
1001 * inferior.c: Update.
1003 * linux-fork.c: Update.
1004 * linux-nat.c: Update.
1005 * nat/aarch64-linux-hw-point.c: Update.
1006 * nat/fork-inferior.c: Update.
1007 * nat/x86-linux-dregs.c: Update.
1008 * nto-procfs.c: Update.
1009 * obsd-nat.c: Update.
1011 * progspace.c: Update.
1013 * rs6000-nat.c: Update.
1014 * s390-linux-nat.c: Update.
1015 * sol-thread.c: Update.
1016 * spu-linux-nat.c: Update.
1019 * tracefile-tfile.c: Update.
1020 * windows-nat.c: Update.
1022 2018-07-03 Tom Tromey <tom@tromey.com>
1024 * common/ptid.h (ptid_build): Don't declare.
1025 * common/ptid.c (ptid_build): Remove.
1026 * aix-thread.c: Update.
1027 * bsd-kvm.c: Update.
1028 * bsd-uthread.c: Update.
1029 * common/agent.c: Update.
1030 * common/ptid.c: Update.
1031 * common/ptid.h: Update.
1032 * corelow.c: Update.
1033 * darwin-nat.c: Update.
1034 * fbsd-nat.c: Update.
1035 * gnu-nat.c: Update.
1036 * linux-fork.c: Update.
1037 * linux-nat.c: Update.
1038 * linux-thread-db.c: Update.
1039 * nat/linux-osdata.c: Update.
1040 * nat/linux-procfs.c: Update.
1041 * nto-procfs.c: Update.
1042 * obsd-nat.c: Update.
1043 * proc-service.c: Update.
1045 * ravenscar-thread.c: Update.
1046 * remote-sim.c: Update.
1048 * sol-thread.c: Update.
1050 * windows-nat.c: Update.
1052 2018-07-03 Tom Tromey <tom@tromey.com>
1054 * infrun.c (follow_exec): Use exit_inferior_silent.
1055 * inferior.c (exit_inferior_num_silent): Remove.
1056 * inferior.h (exit_inferior_num_silent): Don't declare.
1058 2018-07-03 Tom Tromey <tom@tromey.com>
1061 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1062 inferior_ptid on error.
1064 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1065 Simon Marchi <simon.marchi@polymtl.ca>
1068 * disasm.h (gdb_disassembler): Add
1069 `m_disassembler_options_holder'. member
1070 * disasm.c (get_all_disassembler_options): New function.
1071 (gdb_disassembler::gdb_disassembler): Use it.
1072 (gdb_buffered_insn_length_init_dis): Likewise.
1073 (gdb_buffered_insn_length): Adjust accordingly.
1074 (set_disassembler_options): Handle options with arguments.
1075 (show_disassembler_options_sfunc): Likewise. Add a leading new
1076 line if showing options with descriptions.
1077 (disassembler_options_completer): Adapt to using the
1078 `disasm_options_and_args_t' structure.
1079 * mips-tdep.c (mips_disassembler_options): New variable.
1080 (mips_disassembler_options_o32): Likewise.
1081 (mips_disassembler_options_n32): Likewise.
1082 (mips_disassembler_options_n64): Likewise.
1083 (gdb_print_insn_mips): Don't set `disassembler_options'.
1084 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1086 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1087 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1088 `gdbarch_disassembler_options_implicit' and
1089 `gdbarch_valid_disassembler_options'.
1090 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1091 `disasm_options_and_args_t' structure.
1092 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1094 (valid_disassembler_options): Switch from `disasm_options_t' to
1095 the `disasm_options_and_args_t' structure.
1096 * NEWS: Document `set disassembler-options' support for the MIPS
1098 * gdbarch.h: Regenerate.
1099 * gdbarch.c: Regenerate.
1101 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1103 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1105 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1107 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1108 parameter in call to amd64_target_description.
1109 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1110 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1111 (amd64fbsd_init_abi): Likewise.
1112 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1113 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1114 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1115 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1117 2018-06-29 Pedro Alves <palves@redhat.com>
1119 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1120 "segments" parameter.
1121 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1122 (_initialize_amd64_tdep): Update call to
1123 amd64_create_target_description.
1124 (amd64_target_description): Add "segments" parameter. Adjust
1125 the implementation to use it.
1126 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1127 call to amd64_create_target_description.
1128 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1129 * gdb/arch/amd64.h (amd64_create_target_description): Add
1130 "segments" register.
1131 * gdb/arch/amd64.c (amd64_create_target_description): Add
1132 "segments" parameter. Call create_feature_i386_64bit_segments
1133 only if SEGMENTS is true.
1134 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1135 call to amd64_create_target_description.
1137 2018-06-29 Pedro Alves <palves@redhat.com>
1139 * thread.c (thread_target_id_str): New, factored out from ...
1140 (print_thread_info_1): ... here. Use it to compute the max
1141 "Target Id" column width.
1143 2018-06-29 Pedro Alves <palves@redhat.com>
1145 * remote.c (remote_target::extra_thread_info): Delete
1146 'display_buf' and 'n' locals. from the cache, regardless of
1147 packet mechanims is in use. Use cache for qThreadExtra and qP
1150 2018-06-29 Pedro Alves <palves@redhat.com>
1152 * blockframe.c (find_pc_sect_containing_function): New function.
1153 * breakpoint.c (print_breakpoint_location): Don't call
1154 find_pc_sect_function.
1155 * linespec.c (create_sals_line_offset): Record the location's
1157 * linespec.c (convert_address_location_to_sals): Fill in sal's
1158 symbol with find_pc_sect_containing_function.
1159 * symtab.c (find_function_start_sal): Rename to ...
1160 (find_function_start_sal_1): ... this.
1161 (find_function_start_sal): Reimplement as wrapper around
1162 find_function_start_sal_1, and use
1163 find_pc_sect_containing_function to fill in the sal's symbol.
1164 (find_function_start_sal(symbol*, bool)): Adjust.
1165 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1167 (find_pc_sect_containing_function): Declare.
1169 2018-06-29 Pedro Alves <palves@redhat.com>
1171 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1172 true if the the location has no symbol.
1174 2018-06-28 Tom Tromey <tom@tromey.com>
1176 * NEWS: Mention --enable-codesign.
1177 * silent-rules.mk (ECHO_SIGN): New variable.
1178 * configure.ac: Add --enable-codesign.
1179 * configure: Rebuild.
1180 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1181 (gdb$(EXEEXT)): Optionally invoke codesign.
1183 2018-06-28 Pedro Alves <palves@redhat.com>
1185 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1187 (switch_to_thread_no_regs): Adjust comment.
1188 * infcmd.c (stop_pc): Delete.
1189 (post_create_inferior, info_program_command): Replace references
1190 to stop_pc with references to thread_info->suspend.stop_pc.
1191 * inferior.h (stop_pc): Delete declaration.
1192 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1193 (handle_inferior_event_1, handle_signal_stop)
1194 (process_event_stop_test, keep_going_stepped_thread)
1195 (handle_step_into_function, handle_step_into_function_backward)
1196 (print_stop_location): Replace references to stop_pc with
1197 references to thread_info->suspend.stop_pc.
1198 (struct infcall_suspend_state) <stop_pc>: Delete field.
1199 (save_infcall_suspend_state, restore_infcall_suspend_state):
1200 Remove references to inf_stat->stop_pc.
1201 * linux-fork.c (fork_load_infrun_state): Likewise.
1202 * record-btrace.c (record_btrace_set_replay): Likewise.
1203 * record-full.c (record_full_goto_entry): Likewise.
1204 * remote.c (print_one_stopped_thread): Likewise.
1205 * target.c (target_resume): Extend comment.
1206 * thread.c (set_executing_thread): New.
1207 (set_executing): Use it.
1208 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1209 Remove references to stop_pc.
1211 2018-06-28 Pedro Alves <palves@redhat.com>
1213 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1214 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1216 2018-06-28 Tom Tromey <tom@tromey.com>
1218 * coffread.c (coff_symfile_finish): Update.
1219 * xcoffread.c (xcoff_symfile_finish): Update.
1220 * elfread.c (elf_symfile_finish): Update.
1221 * symfile.h (dwarf2_free_objfile): Don't declare.
1222 * dwarf2read.c (_initialize_dwarf2_read): Use
1223 register_objfile_data_with_cleanup.
1224 (dwarf2_free_objfile): Now static. Change signature.
1226 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1228 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1229 option "-o" to add-symbol-file-load to add an offset to each
1230 section's load address.
1231 * symfile.c (set_objfile_default_section_offset): New function.
1233 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1235 * symfile.c (add_symbol_file_command): Make sure that sections
1236 with the same name are sorted in the same order.
1238 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1240 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1241 require the second argument. If omitted, load sections at the
1242 addresses specified in the file.
1244 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1246 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1247 (_initialize_symfile): Add option "-o" to symbol-file to add an
1248 offset to each section of the symbol file.
1250 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1252 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1254 2018-06-27 Tom Tromey <tom@tromey.com>
1256 * stack.c (_initialize_stack): Update "func" help text.
1258 2018-06-27 Tom Tromey <tom@tromey.com>
1260 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1262 (unwind_infopy_str, pyuw_create_unwind_info)
1263 (unwind_infopy_add_saved_register, pyuw_sniffer)
1264 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1266 (struct saved_reg): Add constructor.
1267 <value>: Now a gdbpy_ref<>.
1269 2018-06-27 Tom Tromey <tom@tromey.com>
1271 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1273 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1275 * gdb-gdb.py.in: Format using autopep8.
1277 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1279 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1280 (type_lookup_function): Recognize CORE_ADDR values.
1282 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1284 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1287 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1289 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1292 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1294 * gdb-gdb.py: Move to...
1295 * gdb-gdb.py.in: ... here.
1296 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1297 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1299 (distclean): Remove gdb-gdb.py when cleaning.
1300 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1301 * configure: Re-generate.
1303 2018-06-27 Pedro Alves <palves@redhat.com>
1305 * proc-service.c (get_ps_regcache): New.
1306 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1307 (ps_lsetfpregs): Use it.
1309 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1312 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1313 (dwarf_decode_lines_1): Adjust.
1315 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1317 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1319 <info_proc>: Likewise.
1321 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1323 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1324 to windows_fetch_one_register, and only handle the case of
1325 fetching one register. Move the code that reloads the context
1326 and iterates over all registers if R is negative to...
1327 (windows_nat_target::fetch_registers): ... here.
1328 (do_windows_store_inferior_registers): Rename to
1329 windows_store_one_register, and only handle the case of storing
1330 one register. Move the code that handles the case where r is
1332 (windows_nat_target::store_registers) ... here.
1334 2018-06-26 Tom Tromey <tom@tromey.com>
1337 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1338 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1340 (rust_internal_print_type): Add podata parameter.
1341 (rust_print_type): Update.
1343 2018-06-26 Tom Tromey <tom@tromey.com>
1345 * typeprint.h (struct print_offset_data) <update, finish,
1346 maybe_print_hole>: New methods.
1347 <indentation>: New constant.
1348 * typeprint.c (print_offset_data::indentation): Define.
1349 (print_offset_data::maybe_print_hole, print_offset_data::update)
1350 (print_offset_data::finish): Move from c-typeprint.c and rename.
1351 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1352 (print_spaces_filtered_with_print_options): Update.
1353 (c_print_type_union_field_offset, maybe_print_hole)
1354 (c_print_type_struct_field_offset): Move to typeprint.c and
1356 (c_type_print_base_struct_union): Update.
1358 2018-06-25 Pedro Alves <palves@redhat.com>
1360 * gdbthread.h (thread_info_ref, delete_thread)
1361 (delete_thread_silent, first_thread_of_inferior)
1362 (any_thread_of_inferior, switch_to_thread)
1363 (enable_thread_stack_temporaries)
1364 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1365 (get_last_thread_stack_temporary)
1366 (value_in_thread_stack_temporaries, can_access_registers_thread):
1367 Spell out "struct thread_info" instead of just "thread_info".
1368 * inferior.h (notice_new_inferior): Likewise.
1370 2018-06-25 Pedro Alves <palves@redhat.com>
1372 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1373 pass thread_info pointer to delete_thread.
1374 (windows_nat_target::detach): Pass inferior pointer to
1376 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1378 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1379 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1380 and pass a thread_info pointer to delete_thread.
1381 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1382 pass thread_info pointer to delete_thread.
1383 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1384 delete_thread_silent call.
1385 * procfs.c (procfs_target::detach): Pass inferior pointer to
1387 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1388 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1389 delete_thread_silent call.
1390 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1391 pass thread_info pointer to delete_thread.
1392 (windows_nat_target::detach): Pass inferior pointer to
1395 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1397 * regcache.c (readable_regcache::read_part): Fix asserts.
1398 (reg_buffer::raw_collect_part): New function.
1399 (regcache::write_part): Fix asserts.
1400 (reg_buffer::raw_supply_part): New function.
1401 (regcache::transfer_regset_register): New helper function.
1402 (regcache::transfer_regset): Call new functions.
1403 (regcache_supply_regset): Use gdb_byte*.
1404 (regcache::supply_regset): Likewise.
1405 (regcache_collect_regset): Likewise.
1406 (regcache::collect_regset): Likewise.
1407 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1408 (reg_buffer::raw_supply_part): Likewise.
1409 (regcache::transfer_regset_register): Likewise.
1410 (regcache::transfer_regset): Use gdb_byte*.
1412 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1414 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1416 2018-06-21 Pedro Alves <palves@redhat.com>
1418 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1419 instead of a ptid_t. All callers adjusted.
1420 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1422 (print_ada_task_info, display_current_task_id, task_command_1):
1424 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1426 (breakpoint_kind): Adjust.
1427 (remove_breakpoints_pid): Rename to ...
1428 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1429 pointer. All callers adjusted.
1430 (bpstat_clear_actions): Use inferior_thread.
1431 (get_bpstat_thread): New.
1432 (bpstat_do_actions): Use it.
1433 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1434 to take a thread_info pointer. All callers adjusted.
1435 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1436 (breakpoint_re_set_thread): Use inferior_thread.
1437 * breakpoint.h (struct inferior): Forward declare.
1438 (bpstat_stop_status): Update.
1439 (remove_breakpoints_pid): Delete.
1440 (remove_breakpoints_inf): New.
1441 * bsd-uthread.c (bsd_uthread_target::wait)
1442 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1443 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1444 (maint_btrace_packet_history_cmd)
1445 (maint_btrace_clear_packet_history_cmd): Adjust.
1446 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1448 * cli/cli-interp.c: Include "inferior.h".
1449 * common/refcounted-object.h (struct
1450 refcounted_object_ref_policy): New.
1451 * compile/compile-object-load.c: Include gdbthread.h.
1452 (store_regs): Use inferior_thread.
1453 * corelow.c (core_target::close): Use current_inferior.
1454 (core_target_open): Adjust to use first_thread_of_inferior and use
1455 the current inferior.
1456 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1457 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1458 <thread>: ... this new field. All references adjusted.
1459 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1460 Take a thread_info pointer instead of a ptid_t.
1461 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1462 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1463 thread_info pointer instead of a ptid_t.
1464 * elfread.c: Include "inferior.h".
1465 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1466 Use inferior_thread.
1467 * eval.c (evaluate_subexp): Likewise.
1468 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1470 * gdb_proc_service.h (struct thread_info): Forward declare.
1471 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1472 <thread>: ... this new field. All references adjusted.
1473 * gdbarch.h, gdbarch.c: Regenerate.
1474 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1475 'thread' parameter. All implementations and callers adjusted.
1476 * gdbthread.h (thread_info) <set_running>: New method.
1477 (delete_thread, delete_thread_silent): Take a thread_info pointer
1479 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1480 (first_thread_of_process): Delete, replaced by ...
1481 (first_thread_of_inferior): ... this new function. All callers
1483 (any_live_thread_of_process): Delete, replaced by ...
1484 (any_live_thread_of_inferior): ... this new function. All callers
1486 (switch_to_thread, switch_to_no_thread): Declare.
1487 (is_executing): Delete.
1488 (enable_thread_stack_temporaries): Update comment.
1489 <enable_thread_stack_temporaries>: Take a thread_info pointer
1490 instead of a ptid_t. Incref the thread.
1491 <~enable_thread_stack_temporaries>: Decref the thread.
1494 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1495 (get_last_thread_stack_temporary)
1496 (value_in_thread_stack_temporaries, can_access_registers_thread):
1497 Take a thread_info pointer instead of a ptid_t. All callers
1499 * infcall.c (get_call_return_value): Use inferior_thread.
1500 (run_inferior_call): Work with thread pointers instead of ptid_t.
1501 (call_function_by_hand_dummy): Work with thread pointers instead
1502 of ptid_t. Use thread_info_ref.
1503 * infcmd.c (proceed_thread_callback): Access thread's state
1505 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1506 access thread's state directly.
1507 (continue_command): Use inferior_thread.
1508 (info_program_command): Use find_thread_ptid and access thread
1510 (proceed_after_attach_callback): Use thread state directly.
1511 (notice_new_inferior): Take a thread_info pointer instead of a
1512 ptid_t. All callers adjusted.
1513 (exit_inferior): Take an inferior pointer instead of a pid. All
1515 (exit_inferior_silent): New.
1516 (detach_inferior): Delete.
1517 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1518 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1519 (detach_inferior_command, kill_inferior_command): Use
1520 find_inferior_id instead of valid_gdb_inferior_id and
1521 gdb_inferior_id_to_pid.
1522 (inferior_command): Use inferior and thread pointers.
1523 * inferior.h (struct thread_info): Forward declare.
1524 (notice_new_inferior): Take a thread_info pointer instead of a
1525 ptid_t. All callers adjusted.
1526 (detach_inferior): Delete declaration.
1527 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1528 instead of a pid. All callers adjusted.
1529 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1530 (valid_gdb_inferior_id): Delete.
1531 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1532 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1533 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1535 <inf>: ... this new field.
1536 <step_ptid>: Delete, replaced by ...
1537 <step_thread>: ... this new field.
1538 (get_displaced_stepping_state): Take an inferior pointer instead
1539 of a pid. All callers adjusted.
1540 (displaced_step_in_progress_any_inferior): Adjust.
1541 (displaced_step_in_progress_thread): Take a thread pointer instead
1542 of a ptid_t. All callers adjusted.
1543 (displaced_step_in_progress, add_displaced_stepping_state): Take
1544 an inferior pointer instead of a pid. All callers adjusted.
1545 (get_displaced_step_closure_by_addr): Adjust.
1546 (remove_displaced_stepping_state): Take an inferior pointer
1547 instead of a pid. All callers adjusted.
1548 (displaced_step_prepare_throw, displaced_step_prepare)
1549 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1550 All callers adjusted.
1551 (start_step_over): Adjust.
1552 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1553 displaced step queue.
1554 (do_target_resume): Adjust.
1555 (fetch_inferior_event): Use inferior_thread.
1556 (context_switch, get_inferior_stop_soon): Take an
1557 execution_control_state pointer instead of a ptid_t. All callers
1559 (switch_to_thread_cleanup): Delete.
1560 (stop_all_threads): Use scoped_restore_current_thread.
1561 * inline-frame.c: Include "gdbthread.h".
1562 (inline_state) <inline_state>: Take a thread pointer instead of a
1563 ptid_t. All callers adjusted.
1564 <ptid>: Delete, replaced by ...
1565 <thread>: ... this new field.
1566 (find_inline_frame_state): Take a thread pointer instead of a
1567 ptid_t. All callers adjusted.
1568 (skip_inline_frames, step_into_inline_frame)
1569 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1570 pointer instead of a ptid_t. All callers adjusted.
1571 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1572 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1573 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1575 * linux-nat.c (get_detach_signal): Likewise.
1576 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1577 (thread_db_notice_clone): Adjust.
1578 (thread_db_find_new_threads_silently)
1579 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1580 a thread pointer instead of a ptid_t. All callers adjusted.
1581 * mi/mi-cmd-var.c: Include "inferior.h".
1582 (mi_cmd_var_update_iter): Update to use thread pointers.
1583 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1585 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1587 (mi_output_running): ... this new function.
1588 (mi_on_resume_1): Adjust to use it.
1589 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1590 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1592 (interrupt_thread_callback): : Adjust to use thread and inferior
1594 * proc-service.c: Include "gdbthread.h".
1595 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1596 * progspace-and-thread.c: Include "inferior.h".
1597 * progspace.c: Include "inferior.h".
1598 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1599 hold a reference to an inferior_object.
1600 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1602 * python/py-inferior.c (struct inferior_object): Give the type a
1603 tag name instead of a typedef.
1604 (python_on_normal_stop): No need to check if the current thread is
1606 (inferior_to_inferior_object): Change return type to
1607 inferior_object. All callers adjusted.
1608 (find_thread_object): Delete, bits factored out to ...
1609 (thread_to_thread_object): ... this new function.
1610 * python/py-infthread.c (create_thread_object): Use
1611 inferior_to_inferior_object.
1612 (thpy_is_stopped): Use thread pointer directly.
1613 (gdbpy_selected_thread): Use inferior_thread.
1614 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1615 field, replaced with ...
1616 <thread>: ... this new field. All users adjusted.
1617 (btpy_insn_or_gap_new): Drop const.
1618 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1620 * python/py-record.c: Include "gdbthread.h".
1621 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1622 a ptid_t. All callers adjusted.
1623 (gdbpy_current_recording): Use inferior_thread.
1624 * python/py-record.h (recpy_record_object) <ptid>: Delete
1625 field, replaced with ...
1626 <thread>: ... this new field. All users adjusted.
1627 (recpy_element_object) <ptid>: Delete
1628 field, replaced with ...
1629 <thread>: ... this new field. All users adjusted.
1630 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1631 a ptid_t. All callers adjusted.
1632 * python/py-threadevent.c: Include "gdbthread.h".
1633 (get_event_thread): Use thread_to_thread_object.
1634 * python/python-internal.h (struct inferior_object): Forward
1636 (find_thread_object, find_inferior_object): Delete declarations.
1637 (thread_to_thread_object, inferior_to_inferior_object): New
1639 * record-btrace.c: Include "inferior.h".
1640 (require_btrace_thread): Use inferior_thread.
1641 (record_btrace_frame_sniffer)
1642 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1643 (get_thread_current_frame): Use scoped_restore_current_thread and
1645 (get_thread_current_frame): Use thread pointer directly.
1646 (record_btrace_replay_at_breakpoint): Use thread's inferior
1648 * record-full.c: Include "inferior.h".
1649 * regcache.c: Include "gdbthread.h".
1650 (get_thread_arch_regcache): Use the inferior's address space
1652 (get_thread_regcache, registers_changed_thread): New.
1653 * regcache.h (get_thread_regcache(thread_info *thread)): New
1655 (registers_changed_thread): New.
1656 (remote_target) <remote_detach_1>: Swap order of parameters.
1657 (remote_add_thread): <remote_add_thread>: Return the new thread.
1658 (get_remote_thread_info(ptid_t)): New overload.
1659 (remote_target::remote_notice_new_inferior): Use thread pointers
1661 (remote_target::process_initial_stop_replies): Use
1662 thread_info::set_running.
1663 (remote_target::remote_detach_1, remote_target::detach)
1664 (extended_remote_target::detach): Adjust.
1665 * stack.c (frame_show_address): Use inferior_thread.
1666 * target-debug.h (target_debug_print_thread_info_pp): New.
1667 * target-delegates.c: Regenerate.
1668 * target.c (default_thread_address_space): Delete.
1669 (memory_xfer_partial_1): Use current_inferior.
1670 (target_detach): Use current_inferior.
1671 (target_thread_address_space): Delete.
1672 (generic_mourn_inferior): Use current_inferior.
1673 * target.h (struct target_ops) <thread_address_space>: Delete.
1674 (target_thread_address_space): Delete.
1675 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1677 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1678 thread pointer instead of a ptid_t. Adjust all callers.
1679 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1680 (first_thread_of_process): Delete, replaced by ...
1681 (first_thread_of_inferior): ... this new function. All callers
1683 (any_thread_of_process): Rename to ...
1684 (any_thread_of_inferior): ... this, and take an inferior pointer.
1685 (any_live_thread_of_process): Rename to ...
1686 (any_live_thread_of_inferior): ... this, and take an inferior
1688 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1689 (value_in_thread_stack_temporaries)
1690 (get_last_thread_stack_temporary): Take a thread pointer instead
1691 of a ptid_t. Adjust all callers.
1692 (thread_info::set_running): New.
1693 (validate_registers_access): Use inferior_thread.
1694 (can_access_registers_ptid): Rename to ...
1695 (can_access_registers_thread): ... this, and take a thread
1697 (print_thread_info_1): Adjust to compare thread pointers instead
1699 (switch_to_no_thread, switch_to_thread): Make extern.
1700 (scoped_restore_current_thread::~scoped_restore_current_thread):
1701 Use m_thread pointer directly.
1702 (scoped_restore_current_thread::scoped_restore_current_thread):
1703 Use inferior_thread.
1704 (thread_command): Use thread pointer directly.
1705 (thread_num_make_value_helper): Use inferior_thread.
1706 * top.c (execute_command): Use inferior_thread.
1707 * tui/tui-interp.c: Include "inferior.h".
1708 * varobj.c (varobj_create): Use inferior_thread.
1709 (value_of_root_1): Use find_thread_global_id instead of
1710 global_thread_id_to_ptid.
1712 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1714 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1716 (regcache::write_part): Likewise.
1717 (readable_regcache::cooked_read_part): Update comment.
1718 (readable_regcache::cooked_write_part): Likewise.
1719 * regcache.h: (readable_regcache::read_part): Likewise.
1720 (regcache::write_part): Likewise.
1722 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1723 Dirk Schubert <dirk.schubert@arm.com>
1725 * aarch64-linux-nat.c (post_attach): New.
1726 (aarch64_linux_nat_target::post_attach): Override post_attach to
1727 record the number of hardware debug registers.
1729 2018-06-20 Tom Tromey <tom@tromey.com>
1731 * python/py-param.c (add_setshow_generic): Make parameters const.
1732 (parmpy_init): Update.
1734 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1736 * regcache.h (regcache_cooked_read_ftype): Rename to...
1737 (register_read_ftype): ...this, change type to function_view.
1738 (class reg_buffer) <save>: Remove src parameter.
1739 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1740 parameter non-const in first overload. Remove src parameter in
1742 * regcache.c (do_cooked_read): Remove.
1743 (readonly_detached_regcache::readonly_detached_regcache): Make
1744 parameter non-const, adjust call to other constructor.
1745 (reg_buffer::save): Remove src parameter.
1746 * frame.c (do_frame_register_read): Remove.
1747 (frame_save_as_regcache): Use lambda function.
1748 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1749 parameter to ppu2spu_data *.
1750 (ppu2spu_sniffer): Use lambda function.
1752 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1754 * record-full.c (record_full_target::insert_breakpoint): Remove
1755 "struct" keyword, add const.
1757 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1759 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1760 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1761 * configure.ac: Remove AC_PREREQ, add missing quoting.
1762 * gnulib/configure.ac: Modernize usage of
1763 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1764 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1765 (AUTOMAKE_VERSION): Bump to 1.15.1.
1766 * configure: Re-generate.
1767 * config.in: Re-generate.
1768 * aclocal.m4: Re-generate.
1769 * gnulib/aclocal.m4: Re-generate.
1770 * gnulib/config.in: Re-generate.
1771 * gnulib/configure: Re-generate.
1772 * gnulib/import/Makefile.in: Re-generate.
1774 2018-06-19 Pedro Alves <palves@redhat.com>
1776 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1777 (lookup_minimal_symbol_by_pc_section): ... here with
1778 gdb_assert_not_reached added.
1780 2018-06-19 Pedro Alves <palves@redhat.com>
1782 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1783 parameter with a block parameter. Compare location's block symbol
1784 with the frame's block instead of addresses.
1785 (skip_inline_frames): Pass the current block instead of the
1786 frame's address. Break out as soon as we determine the frame
1787 should not be skipped.
1789 2018-06-18 Tom Tromey <tom@tromey.com>
1791 * solib-aix.c (solib_aix_get_section_offsets): Return
1793 (solib_aix_solib_create_inferior_hook): Update.
1795 2018-06-18 Tom Tromey <tom@tromey.com>
1797 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1799 2018-06-18 Tom Tromey <tom@tromey.com>
1801 * solib-frv.c (frv_relocate_main_executable): Use
1803 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1806 2018-06-18 Tom Tromey <tom@tromey.com>
1808 * objfiles.h (inhibit_section_map_updates): Update.
1809 (resume_section_map_updates, resume_section_map_updates_cleanup):
1811 * solib-svr4.c (svr4_handle_solib_event): Update.
1812 * objfiles.c (inhibit_section_map_updates): Return
1813 scoped_restore_tmpl<int>.
1814 (resume_section_map_updates, resume_section_map_updates_cleanup):
1817 2018-06-18 Tom Tromey <tom@tromey.com>
1819 * valprint.h (read_string): Update.
1820 * valprint.c (read_string): Change type of "buffer".
1821 (val_print_string): Update.
1822 * python/py-value.c (valpy_string): Update.
1823 * language.h (struct language_defn) <la_get_string>: Change
1825 (default_get_string, c_get_string): Update.
1826 * language.c (default_get_string): Change type of "buffer".
1827 * guile/scm-value.c (gdbscm_value_to_string): Update.
1828 * c-lang.c (c_get_string): Change type of "buffer".
1830 2018-06-18 Tom Tromey <tom@tromey.com>
1832 * ser-mingw.c (struct pipe_state_destroyer): New.
1833 (pipe_state_up): New typedef.
1834 (cleanup_pipe_state): Remove.
1835 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1837 2018-06-18 Tom Tromey <tom@tromey.com>
1839 * rust-lang.h (rust_yyerror): Don't declare.
1840 * rust-lang.c (rust_language_defn): Update.
1841 * rust-exp.y (yyerror): Now static.
1842 * parse.c (parse_exp_in_context_1): Update.
1843 * p-lang.h (p_yyerror): Don't declare.
1844 * p-lang.c (p_language_defn): Update.
1845 * p-exp.y (yyerror): Now static.
1846 * opencl-lang.c (opencl_language_defn): Update.
1847 * objc-lang.c (objc_language_defn): Update.
1848 * m2-lang.h (m2_yyerror): Don't declare.
1849 * m2-lang.c (m2_language_defn): Update.
1850 * m2-exp.y (yyerror): Now static.
1851 * language.h (struct language_defn) <la_error>: Remove.
1852 * language.c (unk_lang_error): Remove.
1853 (unknown_language_defn, auto_language_defn): Remove.
1854 * go-lang.h (go_yyerror): Don't declare.
1855 * go-lang.c (go_language_defn): Update.
1856 * go-exp.y (yyerror): Now static.
1857 * f-lang.h (f_yyerror): Don't declare.
1858 * f-lang.c (f_language_defn): Update.
1859 * f-exp.y (yyerror): Now static.
1860 * d-lang.h (d_yyerror): Don't declare.
1861 * d-lang.c (d_language_defn): Update.
1862 * d-exp.y (yyerror): Now static.
1863 * c-lang.h (c_yyerror): Don't declare.
1864 * c-lang.c (c_language_defn, cplus_language_defn)
1865 (asm_language_defn, minimal_language_defn): Update.
1866 * c-exp.y (yyerror): Now static.
1867 * ada-lang.h (ada_yyerror): Don't declare.
1868 * ada-lang.c (ada_language_defn): Update.
1869 * ada-exp.y (yyerror): Now static.
1871 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1873 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1874 (store_sveregs_to_thread): Likewise.
1875 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1876 (aarch64_linux_store_inferior_registers): Likewise.
1877 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1879 (aarch64_sve_regs_copy_to_regcache): Likewise.
1880 (aarch64_sve_regs_copy_from_regcache): Likewise.
1881 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1883 (aarch64_sve_regs_copy_to_regcache): Likewise.
1884 (aarch64_sve_regs_copy_from_regcache): Likewise.
1885 (sve_context): Structure from Linux headers.
1886 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1887 (SVE_SIG_ZREG_SIZE): Likewise.
1888 (SVE_SIG_PREG_SIZE): Likewise.
1889 (SVE_SIG_FFR_SIZE): Likewise.
1890 (SVE_SIG_REGS_OFFSET): Likewise.
1891 (SVE_SIG_ZREGS_OFFSET): Likewise.
1892 (SVE_SIG_ZREG_OFFSET): Likewise.
1893 (SVE_SIG_ZREGS_SIZE): Likewise.
1894 (SVE_SIG_PREGS_OFFSET): Likewise.
1895 (SVE_SIG_PREG_OFFSET): Likewise.
1896 (SVE_SIG_PREGS_SIZE): Likewise.
1897 (SVE_SIG_FFR_OFFSET): Likewise.
1898 (SVE_SIG_REGS_SIZE): Likewise.
1899 (SVE_SIG_CONTEXT_SIZE): Likewise.
1900 (SVE_PT_REGS_MASK): Likewise.
1901 (SVE_PT_REGS_FPSIMD): Likewise.
1902 (SVE_PT_REGS_SVE): Likewise.
1903 (SVE_PT_VL_INHERIT): Likewise.
1904 (SVE_PT_VL_ONEXEC): Likewise.
1905 (SVE_PT_REGS_OFFSET): Likewise.
1906 (SVE_PT_FPSIMD_OFFSET): Likewise.
1907 (SVE_PT_FPSIMD_SIZE): Likewise.
1908 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1909 (SVE_PT_SVE_PREG_SIZE): Likewise.
1910 (SVE_PT_SVE_FFR_SIZE): Likewise.
1911 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1912 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1913 (__SVE_SIG_TO_PT): Likewise.
1914 (SVE_PT_SVE_OFFSET): Likewise.
1915 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1916 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1917 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1918 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1919 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1920 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1921 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1922 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1923 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1924 (SVE_PT_SVE_SIZE): Likewise.
1925 (SVE_PT_SIZE): Likewise.
1926 (HAS_SVE_STATE): New define.
1928 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1930 * nat/aarch64-sve-linux-sigcontext.h: New file.
1931 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1933 (SVE_VQ_MIN): Likewise.
1934 (SVE_VQ_MAX): Likewise.
1935 (SVE_VL_MIN): Likewise.
1936 (SVE_VL_MAX): Likewise.
1937 (SVE_NUM_ZREGS): Likewise.
1938 (SVE_NUM_PREGS): Likewise.
1939 (sve_vl_valid): Likewise.
1940 (struct user_sve_header): Likewise.
1942 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1943 Richard Bunt <Richard.Bunt@arm.com>
1945 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1946 was requested by GDB.
1948 2018-06-15 Tom de Vries <tdevries@suse.de>
1950 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1952 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1954 * gnulib/update-gnulib.sh: Print expected versions of
1957 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1959 * arch-utils.c (default_type_align): Use type_length_units.
1960 * gdbtypes.c (type_align): Use type_length_units.
1962 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1964 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1965 of 'define' command.
1967 2018-06-14 Tom de Vries <tdevries@suse.de>
1970 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1971 get_no_prettyformat_print_options.
1973 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1975 * sparc-nat.h: Include target.h.
1976 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1977 <fetch_registers>: Remove this argument in function call.
1978 <store_registers>: Remove this argument in function call, remove
1980 <low_forget_process>: Call sparc64_forget_process instead of
1981 sparc_forget_process.
1983 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1985 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1986 (procfs_target::make_corefile_notes): Adjust to new
1987 target_read_alloc return type.
1989 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1990 Stephen Roberts <stephen.roberts@arm.com>
1993 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1994 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1995 Move should_notify_stop local into more inner scope.
1997 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1998 Stephen Roberts <stephen.roberts@arm.com>
2001 * infrun.c (resume_1): Add call to mark_async_event_handler.
2003 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2005 * infrun.c (do_target_wait): Change old version of $pc printed.
2007 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2009 * dwarf2read.c (read_index_from_section): Rename to...
2010 (read_gdb_index_from_section): ... this, update all callers.
2011 (dwarf2_read_index): Rename to...
2012 (dwarf2_read_gdb_index): ... this, update all callers.
2014 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2016 * gdb/hppa-linux-nat.c
2017 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2018 hppa_linux_nat_target::fetch_registers.
2020 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2022 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2023 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2024 (AARCH64_DWARF_SVE_FFR): Likewise.
2025 (AARCH64_DWARF_SVE_P0): Likewise.
2026 (AARCH64_DWARF_SVE_Z0): Likewise.
2028 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2030 * common/common-regcache.h (raw_compare): New function.
2031 * regcache.c (regcache::raw_compare): Likewise.
2032 * regcache.h (regcache::raw_compare): New declaration.
2034 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2036 * common/common-regcache.h (reg_buffer_common): New structure.
2037 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2038 (reg_buffer::raw_supply): Likewise.
2039 (reg_buffer::raw_supply_integer): Likewise.
2040 (reg_buffer::raw_supply_zeroed): Likewise.
2041 (reg_buffer::raw_collect): Likewise.
2042 (reg_buffer::raw_collect_integer): Likewise.
2043 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2044 (reg_buffer::raw_supply): Likewise.
2045 (reg_buffer::raw_supply_integer): Likewise.
2046 (reg_buffer::raw_supply_zeroed): Likewise.
2047 (reg_buffer::raw_collect): Likewise.
2048 (reg_buffer::raw_collect_integer): Likewise.
2050 2018-06-10 Tom Tromey <tom@tromey.com>
2052 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2053 (class remote_state) <stop_reply_queue>: Now std::vector.
2054 (remote_state::~remote_state)
2055 (remote_target::stop_reply_queue_length): Update.
2056 (struct queue_iter_param, remove_child_of_pending_fork)
2057 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2058 (check_pending_event_prevents_wildcard_vcont_callback)
2059 (remove_stop_reply_for_inferior)
2060 (remove_stop_reply_of_remote_state)
2061 (remote_notif_remove_once_on_match)
2062 (stop_reply_match_ptid_and_ws)
2063 (remote_kill_child_of_pending_fork): Remove.
2064 (remote_target::remove_new_fork_children)
2065 (remote_target::check_pending_events_prevent_wildcard_vcont)
2066 (remote_target::discard_pending_stop_replies)
2067 (remote_target::discard_pending_stop_replies_in_queue)
2068 (remote_target::remote_notif_remove_queued_reply)
2069 (remote_target::queued_stop_reply)
2070 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2071 (remote_target::wait, remote_target::kill_new_fork_children)
2072 (remote_target::async): Update.
2074 2018-06-10 Tom Tromey <tom@tromey.com>
2076 * record-full.c (record_full_arch_list_cleanups): Remove.
2077 (record_full_message): Use try/catch.
2078 (record_full_wait_cleanups): Remove.
2079 (record_full_wait_1): Use try/catch.
2080 (record_full_restore): Likewise.
2082 2018-06-10 Tom Tromey <tom@tromey.com>
2084 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2085 declare VEC. Add constructor.
2086 <in_target_beneath>: Now bool.
2087 (record_full_breakpoints): Now a std::vector, static.
2088 (record_full_sync_record_breakpoints)
2089 (record_full_init_record_breakpoints)
2090 (record_full_target::insert_breakpoint)
2091 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2093 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2095 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2096 * serial.c (serial_interface_lookup): Remove struct keyword.
2098 2018-06-10 Tom Tromey <tom@tromey.com>
2100 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2102 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2104 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2106 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2107 "beneath" as a method.
2108 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2109 Use "beneath" as a method.
2111 2018-06-10 Tom Tromey <tom@tromey.com>
2113 * tracefile.c (struct trace_file_writer_deleter): New.
2114 <operator()>: Rename from trace_file_writer_xfree.
2115 (trace_file_writer_up): New typedef.
2116 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2118 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2120 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2121 <m_registers, m_register_status>: Change type to
2123 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2126 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2128 * common/common-regcache.h (enum register_status): Add
2129 underlying type "signed char".
2130 * regcache.h (reg_buffer) <m_register_status>: Change type to
2132 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2133 register_status instead of signed char.
2134 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2135 (reg_buffer::get_register_status): Remove cast.
2136 (readable_regcache::raw_read): Remove cast.
2137 (readable_regcache::cooked_read): Remove cast.
2139 2018-06-09 Tom Tromey <tom@tromey.com>
2141 * source.c (reverse_search_command, forward_search_command): Use
2144 2018-06-09 Tom Tromey <tom@tromey.com>
2146 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2147 (serial_ops_list): Now static, std::vector.
2148 (serial_interface_lookup, serial_add_interface): Update.
2150 2018-06-09 Tom Tromey <tom@tromey.com>
2152 * dwarf2read.c (process_cu_includes): Update.
2153 (process_full_comp_unit): Update.
2154 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2157 2018-06-08 Paul Koning <paul_koning@dell.com>
2161 * python/python.c (do_start_initialization):
2162 Avoid call to internal Python API.
2163 (init__gdb_module): New function.
2165 2018-06-08 Gary Benson <gbenson@redhat.com>
2167 * linux-thread-db.c (valprint.h): New include.
2168 (struct check_thread_db_info): New structure.
2169 (check_thread_db_on_load, tdb_testinfo): New static globals.
2170 (check_thread_db, check_thread_db_callback): New functions.
2171 (try_thread_db_load_1): Run integrity checks if requested.
2172 (maintenance_check_libthread_db): New function.
2173 (_initialize_thread_db): Register "maint check libthread-db"
2174 and "maint set/show check-libthread-db".
2175 * NEWS: Mention the above new commands.
2177 2018-06-08 Tom Tromey <tom@tromey.com>
2179 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2182 2018-06-08 Tom Tromey <tom@tromey.com>
2184 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2186 2018-06-08 Tom Tromey <tom@tromey.com>
2188 * common/btrace-common.h (struct btrace_data): Add constructor,
2189 destructor, move assignment operator.
2190 <empty, clear, fini>: New methods.
2191 <format>: Initialize.
2192 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2193 (btrace_data_empty): Don't declare.
2194 * common/btrace-common.c (btrace_data_init): Remove.
2195 (btrace_data::fini): Rename from btrace_data_fini.
2196 (btrace_data::empty): Rename from btrace_data_empty.
2197 (btrace_data::clear): Rename from btrace_data_clear. Return
2199 * btrace.h (make_cleanup_btrace_data): Don't declare.
2200 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2201 (parse_xml_btrace): Update.
2202 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2203 (maint_btrace_clear_packet_history_cmd): Update.
2205 2018-06-07 Pedro Alves <palves@redhat.com>
2207 * target.h (target_ops) <beneath>: Now a method. All references
2209 (class target_stack): New.
2210 * target.c (g_target_stack): New.
2211 (g_current_top_target): Delete.
2212 (current_top_target): Get the top target out of g_target_stack.
2213 (target_stack::push, target_stack::unpush): New.
2214 (push_target, unpush_target): Reimplement.
2215 (target_is_pushed): Reimplement in terms of g_target_stack.
2216 (target_ops::beneath, target_stack::find_beneath): New.
2218 2018-06-07 Pedro Alves <palves@redhat.com>
2220 * target.h (find_target_beneath): Delete declaration.
2221 * target.c (find_target_beneath): Delete definition.
2222 * aix-thread.c: All callers of find_target_beneath adjusted to
2223 call target_ops::beneath instead.
2224 * bsd-uthread.c: Likewise.
2225 * linux-thread-db.c: Likewise.
2226 * ravenscar-thread.c: Likewise.
2227 * sol-thread.c: Likewise.
2228 * spu-multiarch.c: Likewise.
2230 2018-06-07 Pedro Alves <palves@redhat.com>
2232 * target.h (target_ops) <beneath>: Now a method. All references
2234 (target_ops) <m_beneath>: New.
2235 * target.c (target_ops::beneath): New.
2236 * corelow.c: Adjust all references to target_ops::beneath.
2237 * linux-thread-db.c: Likewise.
2238 * make-target-delegates: Likewise.
2239 * record-btrace.c: Likewise.
2240 * record-full.c: Likewise.
2241 * remote.c: Likewise.
2242 * target.c: Likewise.
2243 * target-delegates.c: Regenerate.
2245 2018-06-07 Pedro Alves <palves@redhat.com>
2247 * target.h (target_stack): Delete.
2248 (current_top_target): Declare function.
2249 * target.c (target_stack): Delete.
2250 (g_current_top_target): New.
2251 (current_top_target): New function.
2252 * auxv.c: Use current_top_target instead of target_stack
2254 * avr-tdep.c: Likewise.
2255 * breakpoint.c: Likewise.
2256 * corefile.c: Likewise.
2257 * elfread.c: Likewise.
2259 * exceptions.c: Likewise.
2260 * frame.c: Likewise.
2261 * gdbarch-selftests.c: Likewise.
2262 * gnu-v3-abi.c: Likewise.
2263 * ia64-tdep.c: Likewise.
2264 * ia64-vms-tdep.c: Likewise.
2265 * infcall.c: Likewise.
2266 * infcmd.c: Likewise.
2267 * infrun.c: Likewise.
2268 * linespec.c: Likewise.
2269 * linux-tdep.c: Likewise.
2270 * minsyms.c: Likewise.
2271 * ppc-linux-nat.c: Likewise.
2272 * ppc-linux-tdep.c: Likewise.
2273 * procfs.c: Likewise.
2274 * regcache.c: Likewise.
2275 * remote.c: Likewise.
2276 * rs6000-tdep.c: Likewise.
2277 * s390-linux-nat.c: Likewise.
2278 * s390-tdep.c: Likewise.
2279 * solib-aix.c: Likewise.
2280 * solib-darwin.c: Likewise.
2281 * solib-dsbt.c: Likewise.
2282 * solib-spu.c: Likewise.
2283 * solib-svr4.c: Likewise.
2284 * solib-target.c: Likewise.
2285 * sparc-tdep.c: Likewise.
2286 * sparc64-tdep.c: Likewise.
2287 * spu-tdep.c: Likewise.
2288 * symfile.c: Likewise.
2289 * symtab.c: Likewise.
2290 * target-descriptions.c: Likewise.
2291 * target-memory.c: Likewise.
2292 * target.c: Likewise.
2293 * target.h: Likewise.
2294 * tracefile-tfile.c: Likewise.
2295 * tracepoint.c: Likewise.
2296 * valops.c: Likewise.
2297 * valprint.c: Likewise.
2298 * value.c: Likewise.
2299 * windows-tdep.c: Likewise.
2300 * mi/mi-main.c: Likewise.
2302 2018-06-07 Tom Tromey <tom@tromey.com>
2304 * valprint.h (build_address_symbolic): Declare.
2305 * printcmd.c (print_address_symbolic): Update.
2306 (build_address_symbolic): Change "name" and "filename" to
2308 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2310 * defs.h (build_address_symbolic): Remove declaration.
2312 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2314 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2315 (aarch64_vnv_type): Add function.
2316 (aarch64_pseudo_register_name): Add V regs for SVE.
2317 (aarch64_pseudo_register_type): Likewise.
2318 (aarch64_pseudo_register_reggroup_p): Likewise.
2319 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2320 (aarch64_pseudo_read_value): Add V regs for SVE.
2321 (aarch64_pseudo_write_2): Use V0 offset for SVE
2322 (aarch64_pseudo_write): Add V regs for SVE.
2323 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2325 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2327 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2328 (sve_vl_from_vq): Likewise.
2330 2018-06-05 Tom Tromey <tom@tromey.com>
2332 * cli/cli-cmds.c (show_version): Update.
2333 * top.c (print_gdb_version): Add "interactive" parameter.
2335 * main.c (captured_main_1): Update.
2336 * top.h (print_gdb_version): Add "interactive" parameter and a
2339 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2341 * common/enum-flags.h: Add trailing semicolon to example in
2344 2018-06-05 Tom Tromey <tom@tromey.com>
2347 * NEWS: Add entry about pager.
2348 * utils.c (pagination_disabled_for_command): New global.
2349 (prompt_for_continue): Allow "c" response to prompt.
2350 (reinitialize_more_filter): Clear
2351 pagination_disabled_for_command.
2352 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2354 2018-06-04 Tom Tromey <tom@tromey.com>
2356 * ada-lang.h (ada_lookup_symbol_list): Update.
2357 * ada-lang.c (resolve_subexp): Update.
2358 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2360 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2361 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2362 results parameter to std::vector.
2363 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2365 * ada-exp.y (block_lookup): Update.
2366 (select_possible_type_sym): Change type of syms. Remove nsyms
2368 (write_var_or_type, write_name_assoc): Update.
2370 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2372 * windows-nat.c (windows_nat_target::xfer_partial): Return
2373 TARGET_XFER_E_IO if we need to delegate to the target beneath
2374 but BENEATH is NULL.
2376 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2378 * Makefile.in (config.status): Add configure.nat as a
2381 2018-06-04 Tom Tromey <tom@tromey.com>
2383 * cp-name-parser.y (cpname_state): Add method declarations.
2384 (HANDLE_QUAL): Update.
2385 (cpname_state::d_grab, cpname_state::fill_comp)
2386 (cpname_state::make_operator, cpname_state::make_dtor)
2387 (cpname_state::make_builtin_type, cpname_state::make_name)
2388 (cpname_state::d_qualify, cpname_state::d_int_type)
2389 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2390 (%union): Move earlier.
2392 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2394 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2396 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2398 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2399 (aarch64_pseudo_write_1): Likewise.
2400 (aarch64_pseudo_read_value): Use helper.
2401 (aarch64_pseudo_write): Likewise.
2403 2018-06-04 Pedro Alves <palves@redhat.com>
2405 * darwin-nat.c (darwin_ops): Delete.
2406 (darwin_attach_pid): Use get_native_target.
2408 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2410 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2411 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2413 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2415 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2416 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2417 (aarch64_gdbarch_init): Check for SVE.
2418 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2420 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2422 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2423 * aarch64-tdep.h (aarch64_read_description): Likewise.
2424 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2425 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2426 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2427 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2428 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2430 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2432 * value.c (value_fetch_lazy_bitfield): New.
2433 (value_fetch_lazy_memory): New.
2434 (value_fetch_lazy_register): New.
2435 (value_fetch_lazy): Factor out to smaller functions.
2437 2018-06-01 Tom Tromey <tom@tromey.com>
2439 * cp-name-parser.y (backslashable, represented): Now const.
2441 2018-06-01 Tom Tromey <tom@tromey.com>
2443 * cp-name-parser.y: Include parser-defs.h.
2444 (parser_fprintf): Remove declaration.
2446 2018-06-01 Tom Tromey <tom@tromey.com>
2448 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2450 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2451 (global_result): Remove globals.
2452 (struct cpname_state): New.
2453 (yyparse): Don't declare.
2454 (yylex, yyerror): Move declarations after %union.
2455 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2456 (make_name): Add state parameter.
2458 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2460 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2462 (yylex): Add lvalp, state parameters.
2463 (yyerror): Add state parameter.
2464 (cp_demangled_name_to_comp): Update.
2466 2018-06-01 Tom Tromey <tom@tromey.com>
2468 * cp-name-parser.y (parser_fprintf): Declare.
2469 (GDB_YY_REMAP_PREFIX): Define.
2470 Include yy-remap.h. Don't redefine yy* identifiers.
2472 2018-06-01 Tom Tromey <tom@tromey.com>
2474 * python/py-type.c (typy_legacy_template_argument): Update.
2475 * cp-support.h (cp_demangled_name_to_comp): Update.
2476 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2477 parameter to be a "std::string *".
2480 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2482 * ada-lex.l: Include "diagnostics.h" instead of
2483 "common/diagnostics.h".
2484 * unittests/environ-selftests.c: Likewise.
2485 * common/diagnostics.h: Moved to ../include.
2487 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2489 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2490 to language_mode_manual while calling breakpoint_re_set_one.
2492 2018-06-01 Tom Tromey <tom@tromey.com>
2494 * valops.c (value_cast_structs, destructor_name_p): Update.
2495 * symtab.c (gdb_mangle_name): Update.
2496 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2498 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2499 (pascal_object_print_value_fields, pascal_object_print_value):
2501 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2502 * linespec.c (find_methods): Update.
2503 * gdbtypes.h (type_name_no_tag): Remove.
2504 (type_name_or_error): Rename from type_name_no_tag_or_error.
2505 * gdbtypes.c (type_name_no_tag): Remove.
2506 (type_name_or_error): Rename from type_name_no_tag_or_error.
2507 (lookup_struct_elt_type, check_typedef): Update.
2508 * expprint.c (print_subexp_standard): Update.
2509 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2510 * d-namespace.c (d_lookup_nested_symbol): Update.
2511 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2512 (cp_print_class_member): Update.
2513 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2514 * completer.c (add_struct_fields): Update.
2515 * c-typeprint.c (cp_type_print_derivation_info)
2516 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2518 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2519 (ada_prefer_type, ada_is_exception_sym): Update.
2521 2018-06-01 Tom Tromey <tom@tromey.com>
2523 * valops.c (enum_constant_from_type, value_namespace_elt)
2524 (value_maybe_namespace_elt): Update.
2525 * valarith.c (find_size_for_pointer_math): Update.
2526 * target-descriptions.c (make_gdb_type): Update.
2527 * symmisc.c (print_symbol): Update.
2528 * stabsread.c (define_symbol, read_type)
2529 (complain_about_struct_wipeout, add_undefined_type)
2530 (cleanup_undefined_types_1): Update.
2531 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2532 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2533 (rust_internal_print_type, rust_composite_type)
2534 (rust_evaluate_funcall, rust_evaluate_subexp)
2535 (rust_inclusive_range_type_p): Update.
2536 * python/py-type.c (typy_get_tag): Update.
2537 * p-typeprint.c (pascal_type_print_base): Update.
2538 * mdebugread.c (parse_symbol, parse_type): Update.
2539 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2541 * guile/scm-type.c (gdbscm_type_tag): Update.
2542 * go-lang.c (sixg_string_p): Update.
2543 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2545 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2546 (TYPE_TAG_NAME): Remove.
2547 * gdbtypes.c (type_name_no_tag): Simplify.
2548 (check_typedef, check_types_equal, recursive_dump_type)
2549 (copy_type_recursive, arch_composite_type): Update.
2550 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2551 in summary mode when needed.
2552 * eval.c (evaluate_funcall): Update.
2553 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2554 (process_structure_scope, read_enumeration_type)
2555 (read_namespace_type, read_module_type, determine_prefix): Update.
2556 * cp-support.c (inspect_type): Update.
2557 * coffread.c (process_coff_symbol, decode_base_type): Update.
2558 * c-varobj.c (c_is_path_expr_parent): Update.
2559 * c-typeprint.c (c_type_print_base_struct_union): Update.
2560 (c_type_print_base_1): Update. Print struct/class/union/enum in
2561 summary when using C language.
2562 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2563 (gen_maybe_namespace_elt): Update.
2564 * ada-lang.c (ada_type_name): Simplify.
2565 (empty_record, ada_template_to_fixed_record_type_1)
2566 (template_to_static_fixed_type)
2567 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2569 2018-06-01 Tom Tromey <tom@tromey.com>
2571 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2573 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2574 (c_print_type): Update.
2575 (c_print_type): New overload.
2576 (c_type_print_varspec_prefix, c_type_print_args)
2577 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2578 (c_type_print_base_struct_union, c_type_print_base_1)
2579 (cp_type_print_method_args): Add "language" parameter.
2580 (c_type_print_base): Update.
2581 * c-lang.h (c_print_type): Add new overload.
2583 2018-06-01 Tom Tromey <tom@tromey.com>
2585 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2586 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2588 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2590 * aarch64-tdep.c (aarch64_sve_register_names): New const
2592 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2593 (AARCH64_SVE_Z_REGS_NUM): New define.
2594 (AARCH64_SVE_P_REGS_NUM): Likewise.
2595 (AARCH64_SVE_NUM_REGS): Likewise.
2597 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2599 * nat/linux-ptrace.h [__alpha__]
2600 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2603 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2605 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2606 the endianness selected.
2607 * NEWS: Document `set endian auto' mode operation update.
2609 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2611 * Makefile.in: Add new header.
2612 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2613 (sve_vl_from_vg): Likewise.
2614 (sve_vq_from_vl): Likewise.
2615 (sve_vl_from_vq): Likewise.
2616 (sve_vq_from_vg): Likewise.
2617 (sve_vg_from_vq): Likewise.
2618 * configure.nat: Add new c file.
2619 * nat/aarch64-sve-linux-ptrace.c: New file.
2620 * nat/aarch64-sve-linux-ptrace.h: New file.
2622 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2624 * aarch64-linux-nat.c (aarch64_linux_read_description):
2626 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2628 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2629 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2630 (aarch64_gdbarch_init): Add parmeter zero.
2631 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2632 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2633 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2635 * doc/gdb.texinfo: Describe SVE feature
2636 * features/aarch64-sve.c: New file.
2638 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2641 * gdbarch.sh (significant_addr_bit): Default to zero when
2642 not set by target architecture.
2643 * gdbarch.c: Re-generated.
2644 * utils.c (address_significant): Update.
2646 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2648 * stack.c (func_command): Remove trailing newline in call to error.
2650 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2652 * regcache.h (regcache_raw_collect): Remove, update callers to
2653 use regcache::raw_collect.
2654 * regcache.c (regcache_raw_collect): Remove.
2656 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2658 * regcache.h (regcache_raw_supply): Remove, update callers to
2659 use detached_regcache::raw_supply.
2660 * regcache.c (regcache_raw_supply): Remove.
2662 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2664 * regcache.h (regcache_cooked_write_part): Remove, update
2665 callers to use regcache::cooked_write_part.
2666 * regcache.c (regcache_cooked_write_part): Remove.
2668 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2670 * regcache.h (regcache_cooked_read_part): Remove, update callers
2671 to use readable_regcache::cooked_read_part.
2672 * regcache.c (regcache_cooked_read_part): Remove.
2674 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2676 * regcache.h (regcache_cooked_read_value): Remove, update
2677 callers to use readable_regcache::cooked_read_value.
2678 * regcache.c (regcache_cooked_read_value): Remove.
2680 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2682 * regcache.h (regcache_cooked_write): Remove, update callers to
2683 use regcache::cooked_write.
2684 * regcache.c (regcache_cooked_write): Remove.
2686 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2688 * regcache.h (regcache_invalidate): Remove, update callers to
2689 use detached_regcache::invalidate instead.
2690 * regcache.c (regcache_invalidate): Remove.
2692 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2694 * regcache.h (regcache_raw_write_part): Remove, update callers
2695 to use regcache::raw_write_part instead.
2696 * regcache.c (regcache_raw_write_part): Remove.
2698 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2700 * regcache.h (regcache_raw_read_part): Remove, update callers to
2701 use readable_regcache::raw_read_part instead.
2702 * regcache.c (regcache_raw_read_part): Remove.
2704 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2706 * regcache.h (regcache_cooked_read): Remove, update callers to
2707 use readable_regcache::cooked_read instead.
2708 * regcache.c (regcache_cooked_read): Remove.
2710 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2712 * regcache.h (regcache_raw_write): Remove, update callers to use
2713 regcache::raw_write instead.
2714 * regcache.c (regcache_raw_write): Remove.
2716 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2718 * regcache.h (regcache_raw_read): Remove, update callers to use
2719 readable_regcache::raw_read instead.
2720 * regcache.c (regcache_raw_read): Remove.
2722 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2724 * regcache.h (regcache_raw_update): Remove, update callers to
2725 use readable_regcache::raw_update instead.
2726 * regcache.c (regcache_raw_update): Remove.
2728 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2730 * regcache.h (regcache_register_status): Remove, update callers
2731 to use reg_buffer::get_register_status directly instead.
2732 * regcache.c (regcache_register_status): Remove.
2734 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2736 * regcache.h (regcache_get_ptid): Remove, update all callers to
2737 call regcache::ptid instead.
2738 * regcache.c (regcache_get_ptid): Remove.
2740 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2742 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2744 2018-05-30 Pedro Alves <palves@redhat.com>
2746 * common/common-exceptions.h (exception_rethrow): Use
2749 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2751 * breakpoint.c (print_solib_event, check_status_catch_solib):
2752 Remove struct keyword in range-based for loops.
2753 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2754 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2756 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2758 * symfile.c (addr_info_make_relative): Likewise.
2759 * thread.c (value_in_thread_stack_temporaries): Likewise.
2761 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2764 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2765 aggregate type to get its real type before accessing it.
2767 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2769 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2770 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2771 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2772 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2773 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2774 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2775 * printcmd.c (info_address_command): Likewise.
2777 2018-05-29 Tom Tromey <tom@tromey.com>
2779 * windows-nat.c (handle_exception): Update fall-through comment.
2781 2018-05-29 Tom Tromey <tom@tromey.com>
2783 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2784 (struct program_space) <added_solibs>: Now a std::vector.
2785 * breakpoint.c (print_solib_event): Update.
2786 (check_status_catch_solib): Update.
2787 * progspace.c (clear_program_space_solib_cache): Update.
2788 * solib.c (update_solib_list): Update.
2790 2018-05-29 Tom Tromey <tom@tromey.com>
2792 * python/py-type.c (typy_richcompare): Update.
2793 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2794 * gdbtypes.h (types_deeply_equal): Return bool.
2795 (types_equal): Likewise.
2796 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2798 (check_types_equal): Change worklist to std::vector. Return
2800 (struct type_equality_entry): Add constructor.
2801 (compare_maybe_null_strings): Return bool.
2802 (check_types_worklist): Return bool. Change worklist to
2804 (types_deeply_equal): Use std::vector.
2805 (types_equal): Return bool.
2806 (compare_maybe_null_strings): Simplify.
2808 2018-05-29 Tom Tromey <tom@tromey.com>
2810 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2812 2018-05-29 Tom Tromey <tom@tromey.com>
2814 * objc-lang.h: Don't include cp-support.h.
2815 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2818 2018-05-27 Tom Tromey <tom@tromey.com>
2820 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2822 2018-05-25 Tom Tromey <tom@tromey.com>
2824 * value.c (value::location): Initialize.
2826 2018-05-25 Tom Tromey <tom@tromey.com>
2828 * dbxread.c (init_bincl_list): Remove.
2829 (bincl_list): Now a std::vector.
2830 (bincls_allocated, next_bincl): Remove.
2831 (free_bincl_list, do_free_bincl_list_cleanup)
2832 (make_cleanup_free_bincl_list): Remove.
2833 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2835 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2836 (struct header_file_location): Add constructor.
2837 (add_bincl_to_list): Remove.
2839 2018-05-25 Tom Tromey <tom@tromey.com>
2841 * tui/tui.c (tui_enable): Update.
2842 * mi/mi-interp.c (mi_interp::init): Update.
2843 * interps.h (class interp) <name>: New method.
2844 <m_name>: Rename from name.
2845 (~scoped_restore_interp): Update.
2846 * interps.c (interp::interp): Update.
2847 (interp_add, interp_set, interp_lookup_existing)
2848 (current_interp_named_p): Update.
2850 2018-05-25 Tom Tromey <tom@tromey.com>
2852 * interps.c (interp_name): Remove.
2853 * mi/mi-interp.c (mi_interp::init): Update.
2854 * interps.h (interp_name): Remove.
2855 (~scoped_restore_interp): Update.
2856 * tui/tui.c (tui_enable): Update.
2858 2018-05-25 Tom Tromey <tom@tromey.com>
2860 * utils.c (fputs_maybe_filtered): Update.
2861 * linespec.c (decode_line_full): Update.
2862 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2863 (mi_print_breakpoint_for_event, mi_solib_loaded)
2864 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2865 (mi_user_selected_context_changed): Update.
2866 * mi/mi-main.c (mi_execute_command): Update.
2867 * cli/cli-script.c (execute_control_command): Update.
2868 * python/python.c (execute_gdb_command): Update.
2869 * solib.c (info_sharedlibrary_command): Update.
2870 * interps.c (interp_ui_out): Remove.
2871 * interps.h (interp_ui_out): Remove.
2873 2018-05-25 Tom Tromey <tom@tromey.com>
2875 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2876 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2877 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2879 2018-05-25 Tom Tromey <tom@tromey.com>
2881 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2882 * interps.c (interp_exec): Use scoped_restore.
2884 2018-05-25 Tom Tromey <tom@tromey.com>
2886 * remote.c (remote_target::remote_file_get): Use
2888 (remote_target::remote_file_put): Likewise.
2890 2018-05-25 Tom Tromey <tom@tromey.com>
2892 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2894 (get_pe_section_index, add_pe_exported_sym): Update.
2895 (read_pe_exported_syms): Use gdb::def_vector.
2897 2018-05-25 Tom Tromey <tom@tromey.com>
2899 * frame.c (remove_prev_frame): Remove.
2900 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2902 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2904 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2906 * mips-linux-nat.c (supply_fpregset): Always call
2907 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2908 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2909 `mips_fill_fpregset'.
2910 * mips-linux-tdep.c (mips_supply_fpregset)
2911 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2912 (mips_fill_fpregset_wrapper): Remove functions.
2913 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2914 (mips_linux_fpregset): Remove variable.
2915 (mips_linux_iterate_over_regset_sections): Use
2916 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2917 (mips_linux_o32_sigframe_init): Remove comment.
2919 2018-05-25 Pedro Alves <palves@redhat.com>
2921 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2922 (struct readahead_cache, struct packet_reg, struct
2923 remote_arch_state, class remote_state): Move higher up in the
2925 (remote_target::m_remote_state): Now an object instead of a pointer.
2926 (remote_target::get_remote_state): Adjust.
2928 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2930 * stack.c (select_and_print_frame): Delete.
2931 (struct function_bounds): Move struct within function.
2932 (func_command): Most content moved into new function
2933 find_frame_for_function, use new function, print result, add
2935 (find_frame_for_function): New function, now returns a result.
2937 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2939 * stack.c (iterate_over_block_arg_vars): Fix comment.
2940 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2942 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2946 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2948 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2950 * frame.h (class scoped_restore_selected_frame): New class.
2951 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2952 of any exception, use scoped_restore_selected_frame to restore the
2955 2018-05-24 Pedro Alves <palves@redhat.com>
2957 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2960 2018-05-23 Tom Tromey <tom@tromey.com>
2962 * complaints.c (struct complaints): Remove.
2963 (symfile_complaint_book): Remove.
2964 (series): New global.
2965 (complaint_internal): Update.
2966 (clear_complaints): Update.
2968 2018-05-23 Tom Tromey <tom@tromey.com>
2970 * complaints.c (counters): New global.
2971 (struct complain): Remove.
2972 (struct complaints) <root>: Remove.
2973 (complaint_sentinel): Remove.
2974 (symfile_complaint_book): Update.
2975 (find_complaint) Remove.
2976 (complaint_internal, clear_complaints): Update.
2978 2018-05-23 Tom Tromey <tom@tromey.com>
2980 * complaints.c (struct complain) <file, line>: Remove.
2981 (find_complaint): Remove file, line parameters.
2982 (complaint_internal): Update.
2984 2018-05-23 Tom Tromey <tom@tromey.com>
2986 * complaints.c (vcomplaint): Remove.
2987 (complaint_internal) Merge in contents of vcomplaint.
2989 2018-05-23 Tom Tromey <tom@tromey.com>
2991 * complaints.c (struct complaints) <explanation>: Remove.
2992 (symfile_explanations): Remove.
2993 (symfile_complaint_book): Update.
2994 (vcomplaint): Update.
2995 (struct explanation): Remove.
2997 2018-05-23 Tom Tromey <tom@tromey.com>
2999 * complaints.c (symfile_complaints): Remove.
3000 (complaint_internal): Remove "complaints" parameter.
3001 (clear_complaints, vcomplaint): Remove "c" parameter.
3002 (get_complaints): Remove.
3003 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3004 (dwarf2_debug_line_missing_file_complaint)
3005 (dwarf2_debug_line_missing_end_sequence_complaint)
3006 (dwarf2_complex_location_expr_complaint)
3007 (dwarf2_const_value_length_mismatch_complaint)
3008 (dwarf2_section_buffer_overflow_complaint)
3009 (dwarf2_macro_malformed_definition_complaint)
3010 (dwarf2_invalid_attrib_class_complaint)
3011 (create_addrmap_from_index, dw2_symtab_iter_next)
3012 (dw2_expand_marked_cus)
3013 (dw2_debug_names_iterator::find_vec_in_debug_names)
3014 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3015 (create_debug_type_hash_table, init_cutu_and_read_dies)
3016 (partial_die_parent_scope, add_partial_enumeration)
3017 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3018 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3019 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3020 (create_cus_hash_table, create_dwp_hash_table)
3021 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3022 (dwarf2_rnglists_process, dwarf2_ranges_process)
3023 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3024 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3025 (handle_struct_member_die, process_structure_scope)
3026 (read_array_type, read_common_block, read_module_type)
3027 (read_tag_pointer_type, read_typedef, read_base_type)
3028 (read_subrange_type, load_partial_dies, partial_die_info::read)
3029 (partial_die_info::read, partial_die_info::read)
3030 (partial_die_info::read, read_checked_initial_length_and_offset)
3031 (dwarf2_string_attr, read_formatted_entries)
3032 (dwarf_decode_line_header)
3033 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3034 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3035 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3036 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3037 (get_signatured_type, get_DW_AT_signature_type)
3038 (decode_locdesc, file_file_name, consume_improper_spaces)
3039 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3040 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3041 (dwarf2_symbol_mark_computed, set_die_type)
3042 (read_attribute_value): Update.
3043 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3045 * dbxread.c (unknown_symtype_complaint)
3046 (lbrac_mismatch_complaint, repeated_header_complaint)
3047 (set_namestring, function_outside_compilation_unit_complaint)
3048 (read_dbx_symtab, process_one_symbol): Update.
3049 * gdbtypes.c (stub_noname_complaint): Update.
3050 * windows-nat.c (handle_unload_dll): Update.
3051 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3052 (decode_base_type): Update.
3053 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3054 (eb_complaint, record_include_begin, record_include_end)
3055 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3056 (process_xcoff_symbol, read_symbol)
3057 (function_outside_compilation_unit_complaint)
3058 (scan_xcoff_symtab): Update.
3059 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3060 * buildsym.c (finish_block_internal, make_blockvector)
3061 (end_symtab_get_static_block, augment_type_symtab): Update.
3062 * dtrace-probe.c (dtrace_process_dof)
3063 (dtrace_static_probe_ops::get_probes): Update.
3064 * complaints.h (struct complaint): Don't declare.
3065 (symfile_complaints): Remove.
3066 (complaint_internal): Remove "complaints" parameter.
3067 (complaint): Likewise.
3068 (clear_complaints): Likewise.
3069 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3070 (reread_symbols): Update.
3071 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3072 (dwarf2_frame_cache, decode_frame_entry): Update.
3073 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3074 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3075 (info_selectors_command): Update.
3076 * macrotab.c (macro_include, check_for_redefinition)
3077 (macro_undef): Update.
3078 * objfiles.c (filter_overlapping_sections): Update.
3079 * stabsread.c (invalid_cpp_abbrev_complaint)
3080 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3081 (define_symbol, error_type, read_type, rs6000_builtin_type)
3082 (stabs_method_name_from_physname, read_member_functions)
3083 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3084 (attach_fields_to_type, complain_about_struct_wipeout)
3085 (read_range_type, read_args, common_block_start)
3086 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3088 * mdebugread.c (index_complaint, unknown_ext_complaint)
3089 (basic_type_complaint, bad_tag_guess_complaint)
3090 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3091 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3092 (parse_procedure, parse_lines)
3093 (function_outside_compilation_unit_complaint)
3094 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3095 (bad_tag_guess_complaint, reg_value_complaint): Update.
3096 * cp-support.c (demangled_name_complaint): Update.
3097 * macroscope.c (sal_macro_scope): Update.
3098 * dwarf-index-write.c (class debug_names): Update.
3100 2018-05-23 Tom Tromey <tom@tromey.com>
3102 * complaints.c (clear_complaints): Remove "noisy" parameter.
3103 * complaints.h (clear_complaints): Update.
3104 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3105 (reread_symbols): Update.
3107 2018-05-23 Tom Tromey <tom@tromey.com>
3109 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3111 (vcomplaint, clear_complaints): Update.
3112 (symfile_explanations): Remove some messages.
3114 2018-05-23 Tom Tromey <tom@tromey.com>
3116 * complaints.c (internal_complaint): Remove.
3117 * complaints.h (internal_complaint): Remove.
3119 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3121 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3123 2018-05-22 Pedro Alves <palves@redhat.com>
3125 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3126 (remote_fileio_badfd, remote_fileio_return_errno)
3127 (remote_fileio_return_success, remote_fileio_func_open)
3128 (remote_fileio_func_open, remote_fileio_func_close)
3129 (remote_fileio_func_read, remote_fileio_func_write)
3130 (remote_fileio_func_lseek, remote_fileio_func_rename)
3131 (remote_fileio_func_unlink, remote_fileio_func_stat)
3132 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3133 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3134 remote_target parameter.
3135 (remote_fio_func_map) <func>: Add remote_target parameter.
3136 (do_remote_fileio_request, remote_fileio_request):
3137 * remote-fileio.h (remote_fileio_request):
3138 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3139 remote_target parameter.
3140 (remote_notif_process, handle_notification): Adjust to pass down
3142 (remote_notif_state_allocate): Add remote_target parameter. Save
3144 * remote-notif.h (struct remote_target): Forward declare.
3145 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3146 remote_target parameter.
3147 (struct remote_notif_state) <remote>: New field.
3148 (remote_notif_ack, remote_notif_parse): Add remote_target
3150 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3151 remote_target parameter.
3152 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3153 (threads_listing_context, rmt_thread_action, protocol_feature)
3154 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3155 (packet_result, struct threads_listing_context, remote_state):
3156 Move definitions and declarations higher up.
3157 (remote_target) <~remote_target>: Declare.
3158 (remote_download_command_source, remote_file_put, remote_file_get)
3159 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3160 (remote_hostio_pread_vFile, remote_hostio_send_command)
3161 (remote_hostio_set_filesystem, remote_hostio_open)
3162 (remote_hostio_close, remote_hostio_unlink, remote_state)
3163 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3164 (get_memory_write_packet_size, get_memory_read_packet_size)
3165 (append_pending_thread_resumptions, remote_detach_1)
3166 (append_resumption, remote_resume_with_vcont)
3167 (add_current_inferior_and_thread, wait_ns, wait_as)
3168 (process_stop_reply, remote_notice_new_inferior)
3169 (process_initial_stop_replies, remote_add_thread)
3170 (btrace_sync_conf, remote_btrace_maybe_reopen)
3171 (remove_new_fork_children, kill_new_fork_children)
3172 (discard_pending_stop_replies, stop_reply_queue_length)
3173 (check_pending_events_prevent_wildcard_vcont)
3174 (discard_pending_stop_replies_in_queue, stop_reply)
3175 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3176 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3177 (remote_interrupt_as, remote_interrupt_ns)
3178 (remote_get_noisy_reply, remote_query_attached)
3179 (remote_add_inferior, remote_current_thread, get_current_thread)
3180 (set_thread, set_general_thread, set_continue_thread)
3181 (set_general_process, write_ptid)
3182 (remote_unpack_thread_info_response, remote_get_threadinfo)
3183 (parse_threadlist_response, remote_get_threadlist)
3184 (remote_threadlist_iterator, remote_get_threads_with_ql)
3185 (remote_get_threads_with_qxfer)
3186 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3187 (get_offsets, remote_check_symbols, remote_supported_packet)
3188 (remote_query_supported, remote_packet_size)
3189 (remote_serial_quit_handler, remote_detach_pid)
3190 (remote_vcont_probe, remote_resume_with_hc)
3191 (send_interrupt_sequence, interrupt_query)
3192 (remote_notif_get_pending_events, fetch_register_using_p)
3193 (send_g_packet, process_g_packet, fetch_registers_using_g)
3194 (store_register_using_P, store_registers_using_G)
3195 (set_remote_traceframe, check_binary_download)
3196 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3197 (remote_xfer_live_readonly_partial, remote_read_bytes)
3198 (remote_send_printf, remote_flash_write, readchar)
3199 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3200 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3201 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3202 (extended_remote_disable_randomization, extended_remote_run)
3203 (send_environment_packet, extended_remote_environment_support)
3204 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3205 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3206 (packet_command): Now methods of ...
3207 (remote_target): ... this class.
3208 (m_remote_state) <remote_target>: New field.
3209 (struct remote_state) <stop_reply_queue,
3210 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3212 (remote_state::remote_state): Allocate stop_reply_queue.
3213 (remote_state): Delete global.
3214 (get_remote_state_raw): Delete.
3215 (remote_target::get_remote_state): Allocate m_remote_state on
3217 (get_current_remote_target): New.
3218 (remote_ops, extended_remote_ops): Delete.
3219 (wait_forever_enabled_p, remote_async_inferior_event_token):
3220 Delete, moved to struct remote_state.
3221 (remote_target::close): Delete self. Destruction bits split to
3223 (remote_target::~remote_target): ... this.
3224 (show_memory_packet_size): Adjust to use
3225 get_current_remote_target.
3226 (struct protocol_feature) <func>: Add remote_target parameter.
3227 All callers adjusted.
3228 (curr_quit_handler_target): New.
3229 (remote_serial_quit_handler): Reimplement.
3230 (remote_target::open_1): Adjust to use get_current_remote_target.
3231 Heap-allocate remote_target/extended_remote_target instances.
3232 (vcont_builder::vcont_builder): Add remote_target parameter, and
3233 save it in m_remote. All callers adjusted.
3234 (vcont_builder::m_remote): New field.
3235 (vcont_builder::restart, vcont_builder::flush)
3236 (vcont_builder::push_action): Use it.
3237 (remote_target::commit_resume): Use it.
3238 (struct queue_iter_param) <remote>: New field.
3239 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3240 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3241 (check_pending_event_prevents_wildcard_vcont_callback)
3242 (remote_target::check_pending_events_prevent_wildcard_vcont)
3243 (remote_target::discard_pending_stop_replies)
3244 (remote_target::discard_pending_stop_replies_in_queue)
3245 (remote_target::remote_notif_remove_queued_reply): Fill in
3247 (remote_notif_get_pending_events): New.
3248 (remote_target::readchar, remote_target::remote_serial_write):
3249 Save/restore curr_quit_handler_target.
3251 (kill_new_fork_children): Fill in 'remote' field.
3252 (packet_command): Use get_current_remote_target, defer to
3253 remote_target method of same name.
3254 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3255 parameter, and save it in m_remote. All callers adjusted.
3256 (scoped_remote_fd::release): Use m_remote.
3257 (scoped_remote_fd::m_remote): New field.
3258 (remote_file_put, remote_file_get, remote_file_delete): Use
3259 get_current_remote_target, defer to remote_target method of same
3261 (remote_btrace_reset): Add remote_state paremeter. Update all
3263 (remote_async_inferior_event_handler). Pass down 'data'.
3264 (remote_new_objfile): Use get_current_remote_target.
3265 (remote_target::vcont_r_supported): New.
3266 (set_range_stepping): Use get_current_remote_target and
3267 remote_target::vcont_r_supported.
3268 (_initialize_remote): Don't allocate 'remote_state' and
3269 'stop_reply_queue' globals.
3270 * remote.h (struct remote_target): Forward declare.
3271 (getpkt, putpkt, remote_notif_get_pending_events): Add
3272 'remote_target' parameter.
3274 2018-05-22 Pedro Alves <palves@redhat.com>
3276 * remote.c (vcont_builder): Now a class. Make all data members
3278 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3280 (vcont_builder_restart): Rename to ...
3281 (vcont_builder::restart): ... this.
3282 (vcont_builder_flush): Rename to ...
3283 (vcont_builder::flush): ... this.
3284 (vcont_builder_push_action): Rename to ...
3285 (vcont_builder::push_action): ... this.
3286 (remote_target::commit_resume): Adjust.
3288 2018-05-22 Pedro Alves <palves@redhat.com>
3290 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3291 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3292 (get_fixed_memory_packet_size): New.
3293 (get_memory_packet_size): Use it.
3294 (set_memory_packet_size): Don't override the config size with
3295 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3296 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3297 Don't refer to get_memory_packet_size if not connected to a remote
3298 target. Show "(default)" if configured size is 0.
3300 2018-05-22 Pedro Alves <palves@redhat.com>
3302 * remote.c (remote_target::mourn_inferior): Move
3303 discard_pending_stop_replies call here from ...
3304 (_initialize_remote): ... here.
3306 2018-05-22 Pedro Alves <palves@redhat.com>
3308 * remote.c (compare_section_command): Remove set_general_process
3311 2018-05-22 Pedro Alves <palves@redhat.com>
3313 * remote.c (struct packet_reg, struct remote_arch_state):
3314 Move higher up in the file.
3315 (remote_state) <m_arch_states>: Store remote_arch_state values
3316 instead of remote_arch_state pointers.
3317 (remote_state::get_remote_arch_state): Adjust.
3319 2018-05-22 Pedro Alves <palves@redhat.com>
3321 * remote.c: Include <unordered_map>.
3322 (remote_state): Now a class.
3323 (remote_state) <get_remote_arch_state>: Declare method.
3324 <get_remote_arch_state>: New field.
3325 (remote_arch_state) <remote_arch_state>: Declare ctor.
3326 <regs>: Now a unique_ptr.
3327 (remote_gdbarch_data_handle): Delete.
3328 (get_remote_arch_state): Delete.
3329 (remote_state::get_remote_arch_state): New.
3330 (get_remote_state): Adjust to call remote_state's
3331 get_remote_arch_state method.
3332 (init_remote_state): Delete, bits factored out to ...
3333 (remote_arch_state::remote_arch_state): ... this new method.
3334 (get_remote_packet_size, get_memory_packet_size)
3335 (process_g_packet, remote_target::fetch_registers)
3336 (remote_target::prepare_to_store, store_registers_using_G)
3337 (remote_target::store_registers, remote_target::get_trace_status):
3338 Adjust to call remote_state's method.
3339 (_initialize_remote): Remove reference to
3340 remote_gdbarch_data_handle.
3342 2018-05-22 Pedro Alves <palves@redhat.com>
3344 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3345 pread>: New method declarations.
3346 (remote_target::open_1): Adjust.
3347 (readahead_cache_invalidate): Rename to ...
3348 (readahead_cache::invalidate): ... this, and adjust to be a class
3350 (readahead_cache_invalidate_fd): Rename to ...
3351 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3353 (remote_hostio_pwrite): Adjust.
3354 (remote_hostio_pread_from_cache): Rename to ...
3355 (readahead_cache::pread): ... this, and adjust to be a class
3357 (remote_hostio_close): Adjust.
3359 2018-05-22 Pedro Alves <palves@redhat.com>
3361 * remote.c (remote_hostio_close_cleanup): Delete.
3362 (class scoped_remote_fd): New.
3363 (remote_file_put, remote_file_get): Use it.
3365 2018-05-22 Pedro Alves <palves@redhat.com>
3367 (struct vCont_action_support): Use bool and initialize all fields.
3368 (struct readahead_cache): Initialize all fields.
3369 (remote_state): Use bool and initialize all fields.
3370 (remote_state::remote_state, remote_state::~remote_state): New.
3371 (new_remote_state): Delete.
3372 (_initialize_remote): Use new to allocate remote_state.
3374 2018-05-22 Pedro Alves <palves@redhat.com>
3378 * c-exp.y: Include "c-support.h".
3379 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3380 of tolower. Use c_ident_is_alpha to scan names.
3381 * c-lang.c: Include "c-support.h".
3382 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3383 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3384 * c-support.h: New file, with bits factored out from ...
3385 * cp-name-parser.y: ... this file.
3386 Include "c-support.h".
3387 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3388 c-support.h and renamed.
3389 (symbol_end, yylex): Adjust.
3391 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3393 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3394 parameter type to CORE_ADDR.
3395 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3396 parameter type in declaration to CORE_ADDR.
3397 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3398 target_auxv_search to get AT_HWCAP and use the result to get the
3400 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3401 to CORE_ADDR. Remove the cast of the return value to unsigned
3402 long. Fix error predicate of target_auxv_search.
3403 (ppc_linux_nat_target::read_description): Change the type of the
3404 hwcap variable to CORE_ADDR.
3406 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3408 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3409 if the size of fpscr is larger than 32 bits.
3411 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3413 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3414 (ppc32_linux_vsxregmap): New global.
3415 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3416 regcache_supply_regset, and regcache_collect_regset.
3417 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3418 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3419 (fetch_vsx_register, store_vsx_register): Remove.
3420 (fetch_vsx_registers): Add regno parameter. Get regset using
3421 ppc_linux_vsxregset. Use regset to supply registers.
3422 (store_vsx_registers): Add regno parameter. Get regset using
3423 ppc_linux_vsxregset. Use regset to collect registers.
3424 (fetch_register): Call fetch_vsx_registers instead of
3426 (store_register): Call store_vsx_registers instead of
3428 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3429 new regno parameter.
3430 (store_ppc_registers): Call store_vsx_registers with -1 for the
3431 new regno parameter.
3432 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3433 (ppc_collect_vsxregset): Remove.
3435 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3437 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3439 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3440 for vector register offset fields.
3441 (ppc64_fbsd_reg_offsets): Likewise.
3442 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3443 to vector register offset fields.
3444 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3445 to vector register offset fields.
3446 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3447 vector register offset fields.
3448 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3449 initializers for vector register offset fields.
3450 (rs6000_aix64_reg_offsets): Likewise.
3451 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3452 (ppc_supply_vrregset): Remove.
3453 (ppc_collect_vrregset): Remove.
3454 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3455 (ppc_linux_vrregset) : New function.
3456 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3457 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3458 (ppc32_linux_vrregset): Remove.
3459 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3460 and use result instead of ppc32_linux_vrregset.
3461 (ppc32_linux_reg_offsets): Remove initializers for vector register
3463 (ppc64_linux_reg_offsets): Likewise.
3464 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3465 * ppc-linux-nat.c: Include regset.h.
3466 (gdb_vrregset_t): Adjust comment to account for little-endian
3468 (supply_vrregset, fill_vrregset): Remove.
3469 (fetch_altivec_register, store_altivec_register): Remove.
3470 (fetch_altivec_registers): Add regno parameter. Get regset using
3471 ppc_linux_vrregset. Use regset to supply registers.
3472 (store_altivec_registers): Add regno parameter. Get regset using
3473 ppc_linux_vrregset. Use regset to collect registers.
3474 (fetch_register): Call fetch_altivec_registers instead of
3475 fetch_altivec_register.
3476 (store_register): Call store_altivec_registers instead of
3477 store_altivec_register.
3478 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3479 the new regno parameter.
3480 (store_ppc_registers): Call store_altivec_registers with -1 for
3481 the new regno parameter.
3483 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3485 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3486 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3487 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3488 (gdb_vrregset_t): Change array type size to
3489 PPC_LINUX_SIZEOF_VRREGSET.
3490 (gdb_vsxregset_t): Change array type size to
3491 PPC_LINUX_SIZEOF_VSXREGSET.
3492 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3493 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3494 PPC_LINUX_SIZEOF_VSXREGSET.
3496 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3498 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3499 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3501 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3502 ppc_linux_target_wordsize with tid.
3503 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3505 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3506 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3507 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3508 tid parameter. Remove static specifier.
3509 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3510 (ppc_linux_target_wordsize): New declaration.
3512 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3514 * arch/ppc-linux-common.c: New file.
3515 * arch/ppc-linux-common.h: New file.
3516 * arch/ppc-linux-tdesc.h: New file.
3517 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3518 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3519 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3520 arch/ppc-linux-tdesc.h.
3521 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3522 arch/ppc-linux-tdesc.h.
3523 (ppc_linux_nat_target::read_description): Remove target
3524 description matching code. Fill a ppc_linux_features struct and
3525 call ppc_linux_match_description with it. Move comment about ISA
3526 2.05 to ppc-linux-common.c.
3527 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3528 arch/ppc-linux-tdesc.h.
3529 (ppc_linux_core_read_description): Remove target description
3530 matching code. Fill a ppc_linux_features struct and call
3531 ppc_linux_match_description with it.
3532 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3533 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3534 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3535 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3536 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3537 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3538 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3539 (tdesc_powerpc_e500l): Remove.
3541 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3543 * ada-lang.c (catch_assert_command): Pass empty string instead
3544 of NULL for excep_string argument.
3546 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3548 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3549 the width of the requested register exceeds the width of the
3552 2018-05-21 Tom Tromey <tom@tromey.com>
3554 * printcmd.c (output_command): Remove.
3555 (output_command_const): Rename to output_command.
3556 * valprint.h (output_command): Rename from output_command_const.
3557 * tracepoint.c (trace_dump_actions): Call output_command.
3559 2018-05-21 Tom Tromey <tom@tromey.com>
3561 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3562 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3563 * ada-lang.h (create_ada_exception_catchpoint): Update.
3564 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3566 (create_excep_cond_exprs, ~ada_catchpoint)
3567 (should_stop_exception, print_one_exception)
3568 (print_mention_exception, print_recreate_exception): Update.
3569 (ada_get_next_arg): Remove.
3570 (catch_ada_exception_command_split): Use std::string. Change type
3571 of "excep_string", "cond_string".
3572 (catch_ada_exception_command): Update.
3573 (create_ada_exception_catchpoint): Change type of excep_string.
3574 (ada_exception_sal): Remove excep_string parameter.
3575 (~ada_catchpoint): Remove.
3577 2018-05-21 Tom Tromey <tom@tromey.com>
3579 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3582 2018-05-21 Tom Tromey <tom@tromey.com>
3584 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3585 Return unique_xmalloc_ptr.
3586 (print_it_exception): Update.
3588 2018-05-21 Tom Tromey <tom@tromey.com>
3590 * tracepoint.c (trace_dump_actions): Use std::string.
3592 2018-05-21 Tom Tromey <tom@tromey.com>
3594 * symfile.c (reread_symbols): Use std::string for original_name.
3596 2018-05-21 Tom Tromey <tom@tromey.com>
3598 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3599 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3602 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3604 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3606 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3607 * objfiles.c (get_objfile_bfd_data): Allocate
3608 objfile_per_bfd_storage with obstack_new when allocating on
3611 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3613 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3615 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3616 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3617 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3618 (add_pending): Likewise.
3619 (parse_symbol): Likewise.
3620 (parse_partial_symbols): Likewise.
3621 (psymtab_to_symtab_1): Likewise.
3622 (new_psymtab): Likewise.
3623 (elfmdebug_build_psymtabs): Likewise.
3624 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3625 * objfiles.c (get_objfile_bfd_data): Likewise.
3626 (objfile_register_static_link): Likewise.
3627 * psymtab.c (allocate_psymtab): Likewise.
3628 * stabsread.c (read_member_functions): Likewise.
3629 * xcoffread.c (xcoff_end_psymtab): Likewise.
3631 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3633 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3634 compiler supports std::is_trivially_constructible.
3635 * common/poison.h: Include obstack.h.
3636 (IsMallocable): Define to is_trivially_constructible if the
3637 compiler supports it, define to true_type otherwise.
3641 (XOBNEWVEC): Redefine.
3642 * gdb_obstack.h (obstack_zalloc): New.
3643 (OBSTACK_ZALLOC): Redefine.
3644 (obstack_calloc): New.
3645 (OBSTACK_CALLOC): Redefine.
3647 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3648 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3650 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3651 obstack_calloc/obstack_zalloc.
3652 (gdbarch_obstack_zalloc): Remove.
3653 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3655 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3657 * stack.c (backtrace_command_1): Remove useless variable int i.
3659 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3661 * stack.c (print_frame_info): Fix comment.
3663 2018-05-18 Tom Tromey <tom@tromey.com>
3665 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3666 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3667 (~dwarf2_per_objfile): Update
3668 (dwarf2_get_dwz_file): Use new.
3669 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3672 2018-05-18 Tom Tromey <tom@tromey.com>
3674 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3676 * dwarf2read.c (struct dwp_file): Add constructor and
3678 (open_and_init_dwp_file): Return a unique_ptr.
3679 (dwarf2_per_objfile, create_dwp_hash_table)
3680 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3681 (lookup_dwo_unit_in_dwp): Update.
3682 (open_and_init_dwp_file, get_dwp_file): Update.
3684 2018-05-18 Tom Tromey <tom@tromey.com>
3686 * dwarf2read.c (dwarf2_per_objfile): Update.
3687 (struct mapped_index): Add initializers.
3688 (dwarf2_read_index): Use new.
3689 (dw2_symtab_iter_init): Update.
3690 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3693 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3695 * dwarf2read.c (mapped_index) <total_size>: Remove.
3697 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3699 * unittests/format_pieces-selftests.c (test_format_specifier):
3702 2018-05-18 Tom Tromey <tom@tromey.com>
3704 * c-typeprint.c (maybe_print_hole): New function.
3705 (c_print_type_struct_field_offset): Update.
3706 (c_type_print_base_struct_union): Call maybe_print_hole.
3708 2018-05-17 Keith Seitz <keiths@redhat.com>
3710 * breakpoint.c (build_bpstat_chain): New function, moved from
3712 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3713 If no stop chain is passed, call build_bpstat_chain to build it.
3714 * breakpoint.h (build_bpstat_chain): Declare.
3715 (bpstat_stop_status): Move documentation here from breakpoint.c.
3716 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3717 build the stop chain and pass it to skip_inline_frames.
3718 Pass this stop chain to bpstat_stop_status.
3719 * inline-frame.c: Include breakpoint.h.
3720 (stopped_by_user_bp_inline_frame): New function.
3721 (skip_inline_frames): Add parameter `stop_chain'.
3722 Move documention to inline-frame.h.
3723 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3724 whether the frame should be elided.
3725 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3726 Add moved documentation and update for new parameter.
3728 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3731 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3732 unittests/format_pieces-selftests.c.
3733 * common/format.h (format_piece) <operator==>: New.
3734 (format_pieces) <operator[]>: Remove.
3735 * common/format.c (format_pieces::format_pieces): Handle \e.
3736 * unittests/format_pieces-selftests.c: New.
3738 2018-05-17 Tom Tromey <tom@tromey.com>
3741 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3742 (dw2_instantiate_symtab): Add skip_partial parameter.
3743 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3744 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3745 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3746 (dw2_expand_symtabs_matching_one)
3747 (dw2_find_pc_sect_compunit_symtab)
3748 (dw2_debug_names_lookup_symbol)
3749 (dw2_debug_names_expand_symtabs_for_function): Update.
3750 (init_cutu_and_read_dies): Add skip_partial parameter.
3751 (process_psymtab_comp_unit, build_type_psymtabs_1)
3752 (process_skeletonless_type_unit, load_partial_comp_unit)
3753 (psymtab_to_symtab_1): Update.
3754 (load_full_comp_unit): Add skip_partial parameter.
3755 (process_imported_unit_die, dwarf2_read_addr_index)
3756 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3757 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3758 (read_signatured_type): Update.
3760 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3762 * value.c (release_value): Remove unused variable.
3763 (record_latest_value): Likewise.
3764 (access_value_history): Likewise.
3765 (preserve_values): Likewise.
3767 2018-05-17 Tom Tromey <tom@tromey.com>
3769 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3772 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3775 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3776 Also handle registers whose width is not a multiple of
3778 (linux_nat_trad_target::store_register): Likewise.
3780 2018-05-16 Tom Tromey <tom@tromey.com>
3782 * gdbcore.h (core_bfd): Redefine.
3783 * corelow.c (core_target::close): Update.
3784 (core_target_open): Update.
3785 * progspace.h (struct program_space) <cbfd>: Now a
3788 2018-05-16 Tom Tromey <tom@tromey.com>
3791 * symfile-add-flags.h (enum symfile_add_flags)
3792 <SYMFILE_NOT_FILENAME>: New constant.
3793 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3794 objfile name from BFD.
3795 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3796 * minidebug.c (find_separate_debug_file_in_section): Put
3797 ".gnu_debugdata" into BFD's file name.
3799 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3801 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3804 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3807 * aarch64-tdep.c (aarch64_analyze_prologue,
3808 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3809 Indicate not interested in errors.
3811 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3813 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3814 Supply the MIPS_ZERO_REGNUM register.
3816 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3818 * mips-tdep.c (mask_address_var): Make variable static.
3820 2018-05-14 Tom Tromey <tom@tromey.com>
3822 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3824 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3826 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3827 FXSAVE_ADDR for the mxcsr register.
3829 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3831 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3833 2018-05-11 Pedro Alves <palves@redhat.com>
3835 * corelow.c (core_target) <core_target>: No longer inline.
3836 Initialize m_core_gdbarch, m_core_vec and build the section table
3838 <~core_target>: New.
3839 <core_gdbarch, get_core_register_section>: New methods.
3840 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3841 factored out from ...
3842 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3844 (sniff_core_bfd): Add gdbarch parameter.
3845 (core_close): Delete, merged into ...
3846 (core_target::close): ... here. Delete self.
3847 (core_close_cleanup): Delete.
3848 (core_target_open): Allocate a core_target on the heap. Use a
3849 unique_ptr instead of a cleanup. Bits moved into the core_target
3850 ctor. Adjust to use core_target methods instead of globals.
3851 (get_core_register_section): Rename to ...
3852 (core_target::get_core_register_section): ... this and adjust.
3853 (struct get_core_registers_cb_data): New.
3854 (get_core_registers_cb): Use it. Use bool.
3855 (core_target::fetch_registers, core_target::files_info)
3856 (core_target::xfer_partial, core_target::read_description)
3857 (core_target::pid_to, core_target::thread_name): Adjust to
3858 reference class fields instead of globals.
3859 * target.h (struct target_ops_deleter, target_ops_up): New.
3861 2018-05-11 Pedro Alves <palves@redhat.com>
3863 * corefile.c (core_file_command): Move to corelow.c.
3864 * corelow.c (the_core_target): Delete.
3865 (core_file_command): Moved from corefile.c. Check exec_bfd
3866 instead of the_core_target. Use target_detach instead of calling
3867 into the_core_target directly.
3868 (maybe_say_no_core_file_now): New.
3869 (core_target::detach): Use it.
3870 (_initialize_corelow): Remove references to the_core_target.
3871 * gdbcore.h (the_core_target): Delete.
3873 2018-05-11 Tom Tromey <tromey@redhat.com>
3874 Pedro Alves <palves@redhat.com>
3876 * corefile.c (core_bfd): Remove.
3877 * gdbcore.h (core_bfd): Now a macro.
3878 * progspace.h (struct program_space) <cbfd>: New field.
3880 2018-05-11 Tom Tromey <tom@tromey.com>
3882 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3885 2018-05-10 Tom Tromey <tom@tromey.com>
3887 * configure: Rebuild.
3888 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3890 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3893 * regformats/regdat.sh: Adjust script, following the addition
3894 of the new expedite_regs parameter to init_target_desc.
3896 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3899 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3900 set_gdbarch_significant_addr_bit.
3901 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3902 set_gdbarch_significant_addr_bit.
3903 * utils.c (address_significant): Update to sign extend addr.
3905 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3907 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3908 (xtensa_linux_init_abi): Limit tdep->num_regs by
3909 tdep->num_nopriv_regs.
3910 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3911 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3914 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3916 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3918 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3920 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3921 (I387_MXCSR_INIT_VAL): New constant.
3922 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3923 buffer if it was supplied by the inferior.
3924 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3925 (i387_xsave_get_clear_bv): New function.
3926 (i387_supply_xsave): Only read x87 control registers from the
3927 xsave buffer if the feature is enabled, and the state will have
3928 been written, otherwise, provide a suitable default.
3929 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3930 including x87 control registers. Update control registers if they
3931 have changed from the default value, and mark features as enabled
3933 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3935 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3937 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3939 2018-05-07 Tom Tromey <tom@tromey.com>
3941 * configure: Rebuild.
3942 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3944 2018-05-07 Tom Tromey <tom@tromey.com>
3947 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3948 bit. Use correct value for VDIV.
3950 2018-05-04 Tom Tromey <tom@tromey.com>
3952 * configure: Rebuild.
3953 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3955 2018-05-04 Tom Tromey <tom@tromey.com>
3957 * linux-record.c (record_linux_system_call) <case
3958 RECORD_SYS_RECVFROM>: Add "break".
3960 2018-05-04 Tom Tromey <tom@tromey.com>
3962 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3963 Add missing "break".
3964 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3965 Add missing "break".
3967 2018-05-04 Tom Tromey <tom@tromey.com>
3969 * rs6000-tdep.c (ppc_process_record_op4)
3970 (ppc_process_record_op63): Add fall-through comment.
3972 2018-05-04 Tom Tromey <tom@tromey.com>
3974 * i386-tdep.c (i386_process_record): Add fall-through comment.
3976 2018-05-04 Tom Tromey <tom@tromey.com>
3978 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3981 2018-05-04 Tom Tromey <tom@tromey.com>
3983 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3984 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3985 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3987 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3989 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3992 2018-05-04 Tom Tromey <tom@tromey.com>
3994 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3996 2018-05-04 Tom Tromey <tom@tromey.com>
3998 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3999 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4000 * symfile.c (section_is_mapped): Fix fall-through comment.
4001 * stabsread.c (define_symbol, read_member_functions): Fix
4002 fall-through comment.
4003 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4005 * remote.c (remote_wait_as): Fix fall-through comment.
4006 * p-exp.y (yylex): Fix fall-through comment.
4007 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4009 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4010 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4011 * jv-exp.y (yylex): Fix fall-through comment.
4012 * go-exp.y (lex_one_token): Fix fall-through comment.
4013 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4014 fall-through comment.
4015 * f-exp.y (yylex): Fix fall-through comment.
4016 * dwarf2read.c (process_die): Fix fall-through comments.
4017 * dbxread.c (process_one_symbol): Fix fall-through comment.
4018 * d-exp.y (lex_one_token): Fix fall-through comment.
4019 * cp-name-parser.y (yylex): Fix fall-through comment.
4020 * coffread.c (coff_symtab_read): Fix fall-through comment.
4021 * c-exp.y (lex_one_token): Fix fall-through comment.
4022 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4024 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4027 2018-05-04 Tom Tromey <tom@tromey.com>
4030 * NEWS: Mention gdb.execute change.
4031 * gdbcmd.h (execute_control_command): Don't declare.
4032 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4033 execute_control_commands, execute_control_commands_to_string.
4034 * cli/cli-script.h (execute_control_commands)
4035 (execute_control_commands_to_string): Declare.
4036 (execute_control_command): Add from_tty parameter.
4037 * cli/cli-script.c (execute_control_commands)
4038 (execute_control_commands_to_string): New functions.
4039 (execute_user_command): Use execute_control_commands.
4040 (execute_control_command_1): Add "from_tty" parameter. Update.
4041 (execute_control_command): Likewise.
4043 2018-05-04 Tom Tromey <tom@tromey.com>
4046 * NEWS: Mention that breakpoint commands are writable.
4047 * python/py-breakpoint.c (bppy_set_commands): New function.
4048 (breakpoint_object_getset) <"commands">: Use it.
4050 2018-05-04 Tom Tromey <tom@tromey.com>
4052 * tracepoint.c (actions_command): Update.
4053 * mi/mi-cmd-break.c (mi_command_line_array)
4054 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4055 (mi_read_next_line): Remove.
4056 (mi_cmd_break_commands): Update.
4057 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4059 * cli/cli-script.c (get_command_line): Update.
4060 (process_next_line): Use function_view. Constify.
4061 (recurse_read_control_structure, read_command_lines)
4062 (read_command_lines_1): Change argument types to function_view.
4063 (do_define_command, document_command): Update.
4064 * breakpoint.h (check_tracepoint_command): Don't declare.
4065 * breakpoint.c (check_tracepoint_command): Remove.
4066 (commands_command_1, create_tracepoint_from_upload): Update.
4068 2018-05-04 Tom Tromey <tom@tromey.com>
4071 * cli/cli-script.h (enum command_control_type) <define_control>:
4073 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4074 (build_command_line, execute_control_command_1)
4075 (process_next_line): Likewise.
4076 (do_define_command): New function, extracted from define_command.
4077 (define_command): Use it.
4079 2018-05-04 Tom Tromey <tom@tromey.com>
4081 * tracepoint.c (actions_command): Update.
4082 * cli/cli-script.h (read_command_lines): Update.
4083 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4084 (MAX_TMPBUF): Remove define.
4085 (define_command): Use string_printf.
4086 (document_command): Likewise.
4087 * breakpoint.c (commands_command_1): Update.
4089 2018-05-04 Tom Tromey <tom@tromey.com>
4091 * top.c (execute_command): Update.
4092 * cli/cli-script.h (print_command_lines): Now varargs.
4093 * cli/cli-script.c (print_command_lines): Now varargs.
4094 (execute_control_command_1) <case while_control, case if_control>:
4097 2018-05-04 Tom Tromey <tom@tromey.com>
4099 * tracepoint.c (all_tracepoint_actions): Rename from
4100 all_tracepoint_actions_and_cleanup. Change return type.
4101 (actions_command, encode_actions_1, encode_actions)
4102 (trace_dump_actions, tdump_command): Update.
4103 * remote.c (remote_download_command_source): Update.
4104 * python/python.c (gdbpy_eval_from_control_command)
4105 (python_command, python_interactive_command): Update.
4106 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4107 * guile/guile.c (guile_command)
4108 (gdbscm_eval_from_control_command, guile_command): Update.
4109 * compile/compile.c (compile_code_command)
4110 (compile_print_command, compile_to_object): Update.
4111 * cli/cli-script.h (struct command_lines_deleter): New.
4112 (counted_command_line): New typedef.
4113 (struct command_line): Add constructor, destructor.
4114 <body_list>: Remove.
4115 <body_list_0, body_list_1>: New members.
4116 (command_line_up): Remove typedef.
4117 (read_command_lines, read_command_lines_1, get_command_line):
4119 (copy_command_lines): Don't declare.
4120 * cli/cli-script.c (build_command_line): Use "new".
4121 (get_command_line): Return counted_command_line.
4122 (print_command_lines, execute_user_command)
4123 (execute_control_command_1, while_command, if_command): Update.
4124 (realloc_body_list): Remove.
4125 (process_next_line, recurse_read_control_structure): Update.
4126 (read_command_lines, read_command_lines_1): Return counted_command_line.
4127 (free_command_lines): Use "delete".
4128 (copy_command_lines): Remove.
4129 (define_command, document_command, show_user_1): Update.
4130 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4131 a counted_command_line.
4132 * breakpoint.h (counted_command_line): Remove typedef.
4133 (breakpoint_set_commands): Update.
4134 * breakpoint.c (check_no_tracepoint_commands)
4135 (validate_commands_for_breakpoint): Update.
4136 (breakpoint_set_commands): Change commands to be a
4137 counted_command_line.
4138 (commands_command_1, update_dprintf_command_list)
4139 (create_tracepoint_from_upload): Update.
4141 2018-05-04 Tom Tromey <tom@tromey.com>
4143 * cli/cli-decode.h (cmd_list_element): New constructor.
4144 (~cmd_list_element): New destructor.
4145 (struct cmd_list_element): Add initializers.
4146 * cli/cli-decode.c (do_add_cmd): Use "new".
4147 (delete_cmd): Use "delete".
4149 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4150 Pedro Alves <palves@redhat.com>
4152 PR breakpoints/19806 and support for PR external/20207.
4153 * NEWS: Mention Aarch64 watchpoint improvements.
4154 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4155 watchpoints and PR external/20207 watchpoints.
4156 * nat/aarch64-linux-hw-point.c
4157 (kernel_supports_any_contiguous_range): New.
4158 (aarch64_watchpoint_offset): New.
4159 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4160 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4161 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4162 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4163 next_addr_orig_p. Support PR external/20207 watchpoints.
4164 (aarch64_downgrade_regs): New.
4165 (aarch64_dr_state_insert_one_point): New parameters offset and
4167 (aarch64_dr_state_remove_one_point): Likewise.
4168 (aarch64_handle_breakpoint): Update caller.
4169 (aarch64_handle_aligned_watchpoint): Likewise.
4170 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4172 (aarch64_linux_set_debug_regs): Remove const from state. Call
4173 aarch64_downgrade_regs.
4174 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4175 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4176 (DR_CONTROL_MASK): ... this.
4177 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4178 (unsigned int aarch64_watchpoint_offset): New prototype.
4179 (aarch64_linux_set_debug_regs): Remove const from state.
4180 * utils.c (align_up, align_down): Move to ...
4181 * common/common-utils.c (align_up, align_down): ... here.
4182 * utils.h (align_up, align_down): Move to ...
4183 * common/common-utils.h (align_up, align_down): ... here.
4185 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4187 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4188 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4189 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4190 Re-implement to match the ABI as summarized in GCC's
4191 gcc/config/sparc/sparc.c. All callers updated.
4192 (sparc32_store_arguments): Remove assertion.
4194 2018-05-04 Tom Tromey <tom@tromey.com>
4196 * printcmd.c: Don't include tui.h.
4197 (decode_format): Use skip_spaces.
4199 2018-05-04 Tom Tromey <tom@tromey.com>
4202 * printcmd.c (last_count): New global.
4203 (x_command): Use saved count when repeating.
4205 2018-05-04 Tom Tromey <tom@tromey.com>
4207 * nto-procfs.c (do_closedir_cleanup): Remove.
4208 (procfs_pidlist): Use gdb_dir_up.
4209 * procfs.c (do_closedir_cleanup): Remove.
4210 (proc_update_threads): Use gdb_dir_up.
4211 * common/filestuff.h (struct gdb_dir_deleter): New.
4212 (gdb_dir_up): New typedef.
4214 2018-05-04 Tom Tromey <tom@tromey.com>
4216 * ada-lang.c (print_mention_exception): Use std::string.
4218 2018-05-04 Tom Tromey <tom@tromey.com>
4220 * ada-lang.c (create_excep_cond_exprs): Update.
4221 (ada_exception_catchpoint_cond_string): Use std::string.
4223 2018-05-04 Tom Tromey <tom@tromey.com>
4225 * ada-lang.c (xget_renaming_scope): Return std::string.
4226 (old_renaming_is_invisible): Update.
4228 2018-05-04 Tom Tromey <tom@tromey.com>
4230 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4231 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4233 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4235 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4237 2018-05-04 Tom Tromey <tom@tromey.com>
4239 * remote.c (remote_query_supported_append): Change type.
4240 (remote_check_symbols): Update.
4242 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4245 * configure.ac: Prepend libpython.
4246 * python/python-config.py: Likewise.
4247 * configure: Regenerate.
4249 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4251 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4253 2018-05-03 Pedro Alves <palves@redhat.com>
4256 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4257 override. Write 'true' instead of '1'.
4258 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4261 2018-05-02 Pedro Alves <palves@redhat.com>
4263 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4264 add_inf_child_target.
4265 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4266 add_inf_child_target.
4267 * aix-thread.c (aix_thread_target_info): New.
4268 (aix_thread_target) <shortname, longname, doc>: Delete.
4270 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4271 add_inf_child_target.
4272 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4273 add_inf_child_target.
4274 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4275 add_inf_child_target.
4276 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4277 add_inf_child_target.
4278 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4279 add_inf_child_target.
4280 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4281 add_inf_child_target.
4282 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4283 add_inf_child_target.
4284 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4285 add_inf_child_target.
4286 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4287 add_inf_child_target.
4288 * bfd-target.c (target_bfd_target_info): New.
4289 (target_bfd) <shortname, longname, doc>: Delete.
4291 * bsd-kvm.c (bsd_kvm_target_info): New.
4292 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4294 (bsd_kvm_target::open): Rename to ...
4295 (bsd_kvm_target_open): ... this. Adjust.
4296 * bsd-uthread.c (bsd_uthread_target_info): New.
4297 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4299 * corefile.c (core_file_command): Adjust.
4300 * corelow.c (core_target_info): New.
4301 (core_target) <shortname, longname, doc>: Delete.
4303 (core_target::open): Rename to ...
4304 (core_target_open): ... this. Adjust.
4305 * ctf.c (ctf_target_info): New.
4306 (ctf_target) <shortname, longname, doc>: Delete.
4308 (ctf_target::open): Rename to ...
4309 (ctf_target_open): ... this.
4310 (_initialize_ctf): Adjust.
4311 * exec.c (exec_target_info): New.
4312 (exec_target) <shortname, longname, doc>: Delete.
4314 (exec_target::open): Rename to ...
4315 (exec_target_open): ... this.
4316 * gdbcore.h (core_target_open): Declare.
4317 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4318 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4319 add_inf_child_target.
4320 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4321 add_inf_child_target.
4322 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4323 add_inf_child_target.
4324 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4325 add_inf_child_target.
4326 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4327 add_inf_child_target.
4328 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4329 add_inf_child_target.
4330 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4331 add_inf_child_target.
4332 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4333 add_inf_child_target.
4334 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4335 add_inf_child_target.
4336 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4337 add_inf_child_target.
4338 * inf-child.c (inf_child_target_info): New.
4339 (inf_child_target::info): New.
4340 (inf_child_open_target): Remove 'target' parameter. Use
4341 get_native_target instead.
4342 (inf_child_target::open): Delete.
4343 (add_inf_child_target): New.
4344 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4347 (add_inf_child_target): Declare.
4348 (inf_child_open_target): Declare.
4349 * linux-thread-db.c (thread_db_target_info): New.
4350 (thread_db_target) <shortname, longname, doc>: Delete.
4352 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4353 add_inf_child_target.
4354 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4355 add_inf_child_target.
4356 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4357 add_inf_child_target.
4358 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4359 add_inf_child_target.
4360 * make-target-delegates (print_class): Adjust.
4361 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4362 add_inf_child_target.
4363 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4364 add_inf_child_target.
4365 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4366 add_inf_child_target.
4367 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4368 add_inf_child_target.
4369 * nto-procfs.c (nto_native_target_info): New.
4370 (nto_procfs_target_native) <shortname, longname, doc>:
4373 (nto_procfs_target_info): New.
4374 (nto_procfs_target_procfs) <shortname, longname, doc>:
4377 (init_procfs_targets): Adjust.
4378 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4379 add_inf_child_target.
4380 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4381 add_inf_child_target.
4382 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4383 add_inf_child_target.
4384 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4385 add_inf_child_target.
4386 * ravenscar-thread.c (ravenscar_target_info): New.
4387 (ravenscar_thread_target) <shortname, longname, doc>:
4390 * record-btrace.c (record_btrace_target_info):
4391 (record_btrace_target) <shortname, longname, doc>: Delete.
4393 (record_btrace_target::open): Rename to ...
4394 (record_btrace_target_open): ... this. Adjust.
4395 * record-full.c (record_longname, record_doc): New.
4396 (record_full_base_target) <shortname, longname, doc>: Delete.
4398 (record_full_target_info): New.
4399 (record_full_target): <shortname>: Delete.
4401 (record_full_core_open_1, record_full_open_1): Update comments.
4402 (record_full_base_target::open): Rename to ...
4403 (record_full_open): ... this.
4404 (cmd_record_full_restore): Update.
4405 (_initialize_record_full): Update.
4406 * remote-sim.c (remote_sim_target_info): New.
4407 (gdbsim_target) <shortname, longname, doc>: Delete.
4409 (gdbsim_target::open): Rename to ...
4410 (gdbsim_target_open): ... this.
4411 (_initialize_remote_sim): Adjust.
4412 * remote.c (remote_doc): New.
4413 (remote_target_info): New.
4414 (remote_target) <shortname, longname, doc>: Delete.
4416 (extended_remote_target_info): New.
4417 (extended_remote_target) <shortname, longname, doc>: Delete.
4419 (remote_target::open_1): Make static. Adjust.
4420 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4421 * s390-linux-nat.c (_initialize_s390_nat): Use
4422 add_inf_child_target.
4423 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4424 add_inf_child_target.
4425 * sol-thread.c (thread_db_target_info): New.
4426 (sol_thread_target) <shortname, longname, doc>: Delete.
4428 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4429 add_inf_child_target.
4430 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4431 add_inf_child_target.
4432 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4433 add_inf_child_target.
4434 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4435 add_inf_child_target.
4436 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4437 add_inf_child_target.
4438 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4439 add_inf_child_target.
4440 * spu-linux-nat.c (_initialize_spu_nat): Use
4441 add_inf_child_target.
4442 * spu-multiarch.c (spu_multiarch_target_info): New.
4443 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4445 * target-delegates.c: Regenerate.
4446 * target.c: Include <unordered_map>.
4447 (target_ops_p): Delete.
4448 (DEF_VEC_P(target_ops_p)): Delete.
4449 (target_factories): New.
4450 (test_target_info): New.
4451 (test_target_ops::info): New.
4452 (open_target): Adjust to use target_factories.
4453 (add_target_with_completer): Rename to ...
4454 (add_target): ... this. Change prototype. Register target_info
4455 and open callback in target_factories. Register target_info in
4456 command context instead of target_ops.
4457 (add_target): Delete old implementation.
4458 (add_deprecated_target_alias): Change prototype. Adjust.
4459 (the_native_target): New.
4460 (set_native_target, get_native_target): New.
4461 (find_default_run_target): Use the_native_target.
4462 (find_attach_target, find_run_target): Simplify.
4463 (target_ops::open): Delete.
4464 (dummy_target_info): New.
4465 (dummy_target::shortname, dummy_target::longname)
4466 (dummy_target::doc): Delete.
4467 (dummy_target::info): New.
4468 (debug_target::shortname, debug_target::longname)
4469 (debug_target::doc): Delete.
4470 (debug_target::info): New.
4471 * target.h (struct target_info): New.
4472 (target_ops::~target_ops): Add comment.
4473 (target_ops::info): New.
4474 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4475 longer virtual. Implement in terms of target_info.
4476 (set_native_target, get_native_target): Declare.
4477 (target_open_ftype): New.
4478 (add_target, add_target_with_completer)
4479 (add_deprecated_target_alias): Change prototype.
4480 (test_target) <shortname, longname, doc>: Delete.
4482 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4483 add_inf_child_target.
4484 * tracefile-tfile.c (tfile_target_info): New.
4485 (tfile_target) <shortname, longname, doc>: Delete.
4487 (tfile_target::open): Rename to ...
4488 (tfile_target_open): ... this.
4489 (_initialize_tracefile_tfile): Adjust.
4490 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4491 add_inf_child_target.
4492 * windows-nat.c (_initialize_windows_nat): Use
4493 add_inf_child_target.
4494 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4495 add_inf_child_target.
4497 2018-05-02 Pedro Alves <palves@redhat.com>
4499 * linux-nat.h (linux_nat_target) <low_new_thread,
4500 low_delete_thread, low_new_fork, low_forget_process,
4501 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4502 New virtual methods.
4503 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4504 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4505 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4506 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4507 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4509 * linux-fork.c (delete_fork): Adjust to call low method.
4510 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4511 (linux_nat_new_fork, linux_nat_forget_process_hook)
4512 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4513 (linux_nat_status_is_event):
4514 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4515 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4517 (sigtrap_is_event): Rename to ...
4518 (linux_nat_target::low_status_is_event): ... this.
4519 (linux_nat_set_status_is_event): Delete.
4520 (save_stop_reason, linux_nat_wait_1)
4521 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4523 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4524 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4525 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4526 (linux_nat_set_prepare_to_resume): Delete.
4527 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4528 low virtual methods.
4529 * amd64-linux-nat.c: Likewise.
4530 * arm-linux-nat.c: Likewise.
4531 * i386-linux-nat.c: Likewise.
4532 * ia64-linux-nat.c: Likewise.
4533 * mips-linux-nat.c: Likewise.
4534 * ppc-linux-nat.c: Likewise.
4535 * s390-linux-nat.c: Likewise.
4536 * sparc64-linux-nat.c: Likewise.
4537 * x86-linux-nat.c: Likewise.
4538 * x86-linux-nat.h: Include "nat/x86-linux.h".
4539 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4540 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4543 2018-05-02 Pedro Alves <palves@redhat.com>
4545 * target.h (target_ops)
4546 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4547 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4548 stopped_by_watchpoint, have_continuable_watchpoint,
4549 stopped_data_address, watchpoint_addr_within_range,
4550 can_accel_watchpoint_condition, can_run, thread_alive,
4551 has_all_memory, has_memory, has_stack, has_registers,
4552 has_execution, can_async_p, is_async_p, supports_non_stop,
4553 always_non_stop_p, can_execute_reverse, supports_multi_process,
4554 supports_enable_disable_tracepoint,
4555 supports_disable_randomization, supports_string_tracing,
4556 supports_evaluation_of_breakpoint_conditions,
4557 can_run_breakpoint_commands, filesystem_is_local,
4558 can_download_tracepoint, get_trace_state_variable_value,
4559 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4560 record_is_replaying, record_will_replay,
4561 augmented_libraries_svr4_read>: Adjust to return bool.
4562 * aarch64-linux-nat.c: All implementations adjusted.
4563 * aix-thread.c: All implementations adjusted.
4564 * arm-linux-nat.c: All implementations adjusted.
4565 * breakpoint.c: All implementations adjusted.
4566 * bsd-kvm.c: All implementations adjusted.
4567 * bsd-uthread.c: All implementations adjusted.
4568 * corelow.c: All implementations adjusted.
4569 * ctf.c: All implementations adjusted.
4570 * darwin-nat.c: All implementations adjusted.
4571 * darwin-nat.h: All implementations adjusted.
4572 * exec.c: All implementations adjusted.
4573 * fbsd-nat.c: All implementations adjusted.
4574 * fbsd-nat.h: All implementations adjusted.
4575 * gnu-nat.c: All implementations adjusted.
4576 * gnu-nat.h: All implementations adjusted.
4577 * go32-nat.c: All implementations adjusted.
4578 * ia64-linux-nat.c: All implementations adjusted.
4579 * inf-child.c: All implementations adjusted.
4580 * inf-child.h: All implementations adjusted.
4581 * inf-ptrace.c: All implementations adjusted.
4582 * inf-ptrace.h: All implementations adjusted.
4583 * linux-nat.c: All implementations adjusted.
4584 * linux-nat.h: All implementations adjusted.
4585 * mips-linux-nat.c: All implementations adjusted.
4586 * nto-procfs.c: All implementations adjusted.
4587 * ppc-linux-nat.c: All implementations adjusted.
4588 * procfs.c: All implementations adjusted.
4589 * ravenscar-thread.c: All implementations adjusted.
4590 * record-btrace.c: All implementations adjusted.
4591 * record-full.c: All implementations adjusted.
4592 * remote-sim.c: All implementations adjusted.
4593 * remote.c: All implementations adjusted.
4594 * s390-linux-nat.c: All implementations adjusted.
4595 * sol-thread.c: All implementations adjusted.
4596 * spu-multiarch.c: All implementations adjusted.
4597 * target-delegates.c: All implementations adjusted.
4598 * target.c: All implementations adjusted.
4599 * target.h: All implementations adjusted.
4600 * tracefile-tfile.c: All implementations adjusted.
4601 * tracefile.c: All implementations adjusted.
4602 * tracefile.h: All implementations adjusted.
4603 * windows-nat.c: All implementations adjusted.
4604 * x86-linux-nat.h: All implementations adjusted.
4605 * x86-nat.h: All implementations adjusted.
4607 2018-05-02 Pedro Alves <palves@redhat.com>
4609 * make-target-delegates (scan_target_h): Don't trim lines here.
4610 Replace sequences of tabs and/or whitespace with a single
4612 (top level, parsing methods): Trim each line before processing it
4615 2018-05-02 Pedro Alves <palves@redhat.com>
4616 John Baldwin <jhb@freebsd.org>
4618 * target.h (enum strata) <debug_stratum>: New.
4619 (struct target_ops) <all delegation methods>: Replace by C++
4620 virtual methods, and drop "to_" prefix. All references updated
4622 <to_shortname, to_longname, to_doc, to_data,
4623 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4624 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4625 virtual methods. All references updated throughout.
4626 <can_attach, supports_terminal_ours, can_create_inferior,
4627 get_thread_control_capabilities, attach_no_wait>: New
4629 <insert_breakpoint, remove_breakpoint>: Now
4630 TARGET_DEFAULT_NORETURN methods.
4631 <info_proc>: Now returns bool.
4633 (OPS_MAGIC): Delete.
4634 (current_target): Delete. All references replaced by references
4636 (target_stack): ... this. New.
4637 (target_shortname, target_longname): Adjust.
4638 (target_can_run): Now a function declaration.
4639 (default_child_has_all_memory, default_child_has_memory)
4640 (default_child_has_stack, default_child_has_registers)
4641 (default_child_has_execution): Remove target_ops parameter.
4642 (complete_target_initialization): Delete.
4643 (memory_breakpoint_target): New template class.
4644 (test_target_ops): Refactor as a C++ class with virtual methods.
4645 * make-target-delegates (NAME_PART): Tighten.
4646 (POINTER_PART, CP_SYMBOL): New.
4647 (SIMPLE_RETURN_PART): Reimplement.
4648 (VEC_RETURN_PART): Expect less.
4649 (RETURN_PART, VIRTUAL_PART): New.
4650 (METHOD): Adjust to C++ virtual methods.
4651 (scan_target_h): Remove reference to C99.
4652 (dname): Output "target_ops::" prefix.
4653 (write_function_header): Adjust to output a C++ class method.
4654 (write_declaration): New.
4655 (write_delegator): Adjust to output a C++ class method.
4656 (tdname): Output "dummy_target::" prefix.
4657 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4659 (tdefault_names, debug_names): Delete.
4660 (return_types, tdefaults, styles, argtypes_array): New.
4661 (top level): All methods are delegators.
4663 (top level): Print dummy_target and debug_target classes.
4664 * target-delegates.c: Regenerate.
4665 * target-debug.h (target_debug_print_enum_info_proc_what)
4666 (target_debug_print_thread_control_capabilities)
4667 (target_debug_print_thread_info_p): New.
4668 * target.c (dummy_target): Delete.
4669 (the_dummy_target, the_debug_target): New.
4670 (target_stack): Now extern.
4671 (set_targetdebug): Push/unpush debug target.
4672 (default_child_has_all_memory, default_child_has_memory)
4673 (default_child_has_stack, default_child_has_registers)
4674 (default_child_has_execution): Remove target_ops parameter.
4675 (complete_target_initialization): Delete.
4676 (add_target_with_completer): No longer call
4677 complete_target_initialization.
4678 (target_supports_terminal_ours): Use regular delegation.
4679 (update_current_target): Delete.
4680 (push_target): No longer check magic number. Don't call
4681 update_current_target.
4682 (unpush_target): Don't call update_current_target.
4683 (target_is_pushed): No longer check magic number.
4684 (target_require_runnable): Skip for all stratums over
4686 (target_ops::info_proc): New.
4687 (target_info_proc): Use find_target_at and
4688 find_default_run_target.
4689 (target_supports_disable_randomization): Use regular delegation.
4690 (target_get_osdata): Use find_target_at.
4691 (target_ops::open, target_ops::close, target_ops::can_attach)
4692 (target_ops::attach, target_ops::can_create_inferior)
4693 (target_ops::create_inferior, target_ops::can_run)
4694 (target_can_run): New.
4695 (default_fileio_target): Use regular delegation.
4696 (target_ops::fileio_open, target_ops::fileio_pwrite)
4697 (target_ops::fileio_pread, target_ops::fileio_fstat)
4698 (target_ops::fileio_close, target_ops::fileio_unlink)
4699 (target_ops::fileio_readlink): New.
4700 (target_fileio_open_1, target_fileio_unlink)
4701 (target_fileio_readlink): Always call the target method. Handle
4703 (return_zero, return_zero_has_execution): Delete.
4704 (init_dummy_target): Delete.
4705 (dummy_target::dummy_target, dummy_target::shortname)
4706 (dummy_target::longname, dummy_target::doc)
4707 (debug_target::debug_target, debug_target::shortname)
4708 (debug_target::longname, debug_target::doc): New.
4709 (target_supports_delete_record): Use regular delegation.
4710 (setup_target_debug): Delete.
4711 (maintenance_print_target_stack): Skip debug_stratum.
4712 (initialize_targets): Instantiate the_dummy_target and
4714 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4716 (target_auxv_search, fprint_target_auxv): Adjust.
4717 (info_auxv_command): Adjust to use target_stack.
4718 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4719 * exceptions.c (print_flush): Handle a NULL target_stack.
4720 * regcache.c (target_ops_no_register): Refactor as class with
4723 * exec.c (exec_target): New class.
4724 (exec_ops): Now an exec_target.
4725 (exec_open, exec_close_1, exec_get_section_table)
4726 (exec_xfer_partial, exec_files_info, exec_has_memory)
4727 (exec_make_note_section): Refactor as exec_target methods.
4728 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4730 (exec_target::find_memory_regions): New.
4731 (_initialize_exec): Don't call init_exec_ops.
4732 * gdbcore.h (exec_file_clear): Delete.
4734 * corefile.c (core_target): Delete.
4735 (core_file_command): Adjust.
4736 * corelow.c (core_target): New class.
4737 (the_core_target): New.
4738 (core_close): Remove target_ops parameter.
4739 (core_close_cleanup): Adjust.
4740 (core_target::close): New.
4741 (core_open, core_detach, get_core_registers, core_files_info)
4742 (core_xfer_partial, core_thread_alive, core_read_description)
4743 (core_pid_to_str, core_thread_name, core_has_memory)
4744 (core_has_stack, core_has_registers, core_info_proc): Rework as
4745 core_target methods.
4746 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4747 (_initialize_corelow): Initialize the_core_target.
4748 * gdbcore.h (core_target): Delete.
4749 (the_core_target): New.
4751 * ctf.c: (ctf_target): New class.
4752 (ctf_ops): Now a ctf_target.
4753 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4754 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4755 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4757 (init_ctf_ops): Delete.
4758 (_initialize_ctf): Don't call it.
4759 * tracefile-tfile.c (tfile_target): New class.
4760 (tfile_ops): Now a tfile_target.
4761 (tfile_open, tfile_close, tfile_files_info)
4762 (tfile_get_tracepoint_status, tfile_trace_find)
4763 (tfile_fetch_registers, tfile_xfer_partial)
4764 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4765 Refactor as tfile_target methods.
4766 (tfile_xfer_partial_features): Remove target_ops parameter.
4767 (init_tfile_ops): Delete.
4768 (_initialize_tracefile_tfile): Don't call it.
4769 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4770 (tracefile_has_stack, tracefile_has_registers)
4771 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4772 tracefile_target methods.
4773 (init_tracefile_ops): Delete.
4774 (tracefile_target::tracefile_target): New.
4775 * tracefile.h: Include "target.h".
4776 (tracefile_target): New class.
4777 (init_tracefile_ops): Delete.
4779 * spu-multiarch.c (spu_multiarch_target): New class.
4780 (spu_ops): Now a spu_multiarch_target.
4781 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4782 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4783 (spu_search_memory, spu_mourn_inferior): Refactor as
4784 spu_multiarch_target methods.
4785 (init_spu_ops): Delete.
4786 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4787 complete_target_initialization.
4789 * ravenscar-thread.c (ravenscar_thread_target): New class.
4790 (ravenscar_ops): Now a ravenscar_thread_target.
4791 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4792 (ravenscar_thread_alive, ravenscar_pid_to_str)
4793 (ravenscar_fetch_registers, ravenscar_store_registers)
4794 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4795 (ravenscar_stopped_by_hw_breakpoint)
4796 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4797 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4798 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4800 (init_ravenscar_thread_ops): Delete.
4801 (_initialize_ravenscar): Remove references to
4802 init_ravenscar_thread_ops and complete_target_initialization.
4804 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4805 (bsd_uthread_target): New class.
4806 (bsd_uthread_ops): Now a bsd_uthread_target.
4807 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4808 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4809 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4810 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4811 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4812 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4813 (bsd_uthread_target): Delete function.
4814 (_initialize_bsd_uthread): Remove reference to
4815 complete_target_initialization.
4817 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4818 (target_bfd): ... this new class.
4819 (target_bfd_xfer_partial, target_bfd_get_section_table)
4820 (target_bfd_close): Refactor as target_bfd methods.
4821 (target_bfd::~target_bfd): New.
4822 (target_bfd_reopen): Adjust.
4823 (target_bfd::close): New.
4825 * record-btrace.c (record_btrace_target): New class.
4826 (record_btrace_ops): Now a record_btrace_target.
4827 (record_btrace_open, record_btrace_stop_recording)
4828 (record_btrace_disconnect, record_btrace_close)
4829 (record_btrace_async, record_btrace_info)
4830 (record_btrace_insn_history, record_btrace_insn_history_range)
4831 (record_btrace_insn_history_from, record_btrace_call_history)
4832 (record_btrace_call_history_range)
4833 (record_btrace_call_history_from, record_btrace_record_method)
4834 (record_btrace_is_replaying, record_btrace_will_replay)
4835 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4836 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4837 (record_btrace_store_registers, record_btrace_prepare_to_store)
4838 (record_btrace_to_get_unwinder)
4839 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4840 (record_btrace_commit_resume, record_btrace_wait)
4841 (record_btrace_stop, record_btrace_can_execute_reverse)
4842 (record_btrace_stopped_by_sw_breakpoint)
4843 (record_btrace_supports_stopped_by_sw_breakpoint)
4844 (record_btrace_stopped_by_hw_breakpoint)
4845 (record_btrace_supports_stopped_by_hw_breakpoint)
4846 (record_btrace_update_thread_list, record_btrace_thread_alive)
4847 (record_btrace_goto_begin, record_btrace_goto_end)
4848 (record_btrace_goto, record_btrace_stop_replaying_all)
4849 (record_btrace_execution_direction)
4850 (record_btrace_prepare_to_generate_core)
4851 (record_btrace_done_generating_core): Refactor as
4852 record_btrace_target methods.
4853 (init_record_btrace_ops): Delete.
4854 (_initialize_record_btrace): Remove reference to
4855 init_record_btrace_ops.
4856 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4857 the execution_direction global.
4858 (record_full_base_target, record_full_target)
4859 (record_full_core_target): New classes.
4860 (record_full_ops): Now a record_full_target.
4861 (record_full_core_ops): Now a record_full_core_target.
4862 (record_full_target::detach, record_full_target::disconnect)
4863 (record_full_core_target::disconnect)
4864 (record_full_target::mourn_inferior, record_full_target::kill):
4866 (record_full_open, record_full_close, record_full_async): Refactor
4867 as methods of the record_full_base_target class.
4868 (record_full_resume, record_full_commit_resume): Refactor
4869 as methods of the record_full_target class.
4870 (record_full_wait, record_full_stopped_by_watchpoint)
4871 (record_full_stopped_data_address)
4872 (record_full_stopped_by_sw_breakpoint)
4873 (record_full_supports_stopped_by_sw_breakpoint)
4874 (record_full_stopped_by_hw_breakpoint)
4875 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4876 methods of the record_full_base_target class.
4877 (record_full_store_registers, record_full_xfer_partial)
4878 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4879 Refactor as methods of the record_full_target class.
4880 (record_full_can_execute_reverse, record_full_get_bookmark)
4881 (record_full_goto_bookmark, record_full_execution_direction)
4882 (record_full_record_method, record_full_info, record_full_delete)
4883 (record_full_is_replaying, record_full_will_replay)
4884 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4885 (record_full_stop_replaying): Refactor as methods of the
4886 record_full_base_target class.
4887 (record_full_core_resume, record_full_core_kill)
4888 (record_full_core_fetch_registers)
4889 (record_full_core_prepare_to_store)
4890 (record_full_core_store_registers, record_full_core_xfer_partial)
4891 (record_full_core_insert_breakpoint)
4892 (record_full_core_remove_breakpoint)
4893 (record_full_core_has_execution): Refactor
4894 as methods of the record_full_core_target class.
4895 (record_full_base_target::supports_delete_record): New.
4896 (init_record_full_ops): Delete.
4897 (init_record_full_core_ops): Delete.
4898 (record_full_save): Refactor as method of the
4899 record_full_base_target class.
4900 (_initialize_record_full): Remove references to
4901 init_record_full_ops and init_record_full_core_ops.
4903 * remote.c (remote_target, extended_remote_target): New classes.
4904 (remote_ops): Now a remote_target.
4905 (extended_remote_ops): Now an extended_remote_target.
4906 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4907 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4908 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4909 (remote_pass_signals, remote_set_syscall_catchpoint)
4910 (remote_program_signals, )
4911 (remote_thread_always_alive): Remove target_ops parameter.
4912 (remote_thread_alive, remote_thread_name)
4913 (remote_update_thread_list, remote_threads_extra_info)
4914 (remote_static_tracepoint_marker_at)
4915 (remote_static_tracepoint_markers_by_strid)
4916 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4917 (remote_open): Refactor as methods of remote_target.
4918 (extended_remote_open, extended_remote_detach)
4919 (extended_remote_attach, extended_remote_post_attach):
4920 (extended_remote_supports_disable_randomization)
4921 (extended_remote_create_inferior): : Refactor as method of
4922 extended_remote_target.
4923 (remote_set_permissions, remote_open_1, remote_detach)
4924 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4925 (remote_resume, remote_commit_resume, remote_stop)
4926 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4927 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4928 (remote_prepare_to_store, remote_store_registers)
4929 (remote_flash_erase, remote_flash_done, remote_files_info)
4930 (remote_kill, remote_mourn, remote_insert_breakpoint)
4931 (remote_remove_breakpoint, remote_insert_watchpoint)
4932 (remote_watchpoint_addr_within_range)
4933 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4934 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4935 (remote_supports_stopped_by_sw_breakpoint)
4936 (remote_stopped_by_hw_breakpoint)
4937 (remote_supports_stopped_by_hw_breakpoint)
4938 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4939 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4940 (remote_verify_memory): Refactor as methods of remote_target.
4941 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4943 (remote_xfer_partial, remote_get_memory_xfer_limit)
4944 (remote_search_memory, remote_rcmd, remote_memory_map)
4945 (remote_pid_to_str, remote_get_thread_local_address)
4946 (remote_get_tib_address, remote_read_description): Refactor as
4947 methods of remote_target.
4948 (remote_target::fileio_open, remote_target::fileio_pwrite)
4949 (remote_target::fileio_pread, remote_target::fileio_close): New.
4950 (remote_hostio_readlink, remote_hostio_fstat)
4951 (remote_filesystem_is_local, remote_can_execute_reverse)
4952 (remote_supports_non_stop, remote_supports_disable_randomization)
4953 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4954 (remote_supports_enable_disable_tracepoint)
4955 (remote_supports_string_tracing)
4956 (remote_can_run_breakpoint_commands, remote_trace_init)
4957 (remote_download_tracepoint, remote_can_download_tracepoint)
4958 (remote_download_trace_state_variable, remote_enable_tracepoint)
4959 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4960 (remote_trace_start, remote_get_trace_status)
4961 (remote_get_tracepoint_status, remote_trace_stop)
4962 (remote_trace_find, remote_get_trace_state_variable_value)
4963 (remote_save_trace_data, remote_get_raw_trace_data)
4964 (remote_set_disconnected_tracing, remote_core_of_thread)
4965 (remote_set_circular_trace_buffer, remote_traceframe_info)
4966 (remote_get_min_fast_tracepoint_insn_len)
4967 (remote_set_trace_buffer_size, remote_set_trace_notes)
4968 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4969 (remote_disable_btrace, remote_teardown_btrace)
4970 (remote_read_btrace, remote_btrace_conf)
4971 (remote_augmented_libraries_svr4_read, remote_load)
4972 (remote_pid_to_exec_file, remote_can_do_single_step)
4973 (remote_execution_direction, remote_thread_handle_to_thread_info):
4974 Refactor as methods of remote_target.
4975 (init_remote_ops, init_extended_remote_ops): Delete.
4976 (remote_can_async_p, remote_is_async_p, remote_async)
4977 (remote_thread_events, remote_upload_tracepoints)
4978 (remote_upload_trace_state_variables): Refactor as methods of
4980 (_initialize_remote): Remove references to init_remote_ops and
4981 init_extended_remote_ops.
4983 * remote-sim.c (gdbsim_target): New class.
4984 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4985 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4986 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4987 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4988 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4989 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4990 Refactor as methods of gdbsim_target.
4991 (gdbsim_ops): Now a gdbsim_target.
4992 (init_gdbsim_ops): Delete.
4993 (gdbsim_cntrl_c): Adjust.
4994 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4996 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4997 (the_amd64_linux_nat_target): New.
4998 (amd64_linux_fetch_inferior_registers)
4999 (amd64_linux_store_inferior_registers): Refactor as methods of
5000 amd64_linux_nat_target.
5001 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5002 * i386-linux-nat.c: Don't include "linux-nat.h".
5003 (i386_linux_nat_target): New class.
5004 (the_i386_linux_nat_target): New.
5005 (i386_linux_fetch_inferior_registers)
5006 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5007 as methods of i386_linux_nat_target.
5008 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5009 * inf-child.c (inf_child_ops): Delete.
5010 (inf_child_fetch_inferior_registers)
5011 (inf_child_store_inferior_registers): Delete.
5012 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5013 methods of inf_child_target.
5014 (inf_child_target::supports_terminal_ours)
5015 (inf_child_target::terminal_init)
5016 (inf_child_target::terminal_inferior)
5017 (inf_child_target::terminal_ours_for_output)
5018 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5019 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5021 (inf_child_open, inf_child_disconnect, inf_child_close)
5022 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5023 (inf_child_post_startup_inferior, inf_child_can_run)
5024 (inf_child_pid_to_exec_file): Refactor as methods of
5026 (inf_child_follow_fork): Delete.
5027 (inf_child_target::can_create_inferior)
5028 (inf_child_target::can_attach): New.
5029 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5030 (inf_child_target::has_stack, inf_child_target::has_registers)
5031 (inf_child_target::has_execution): New.
5032 (inf_child_fileio_open, inf_child_fileio_pwrite)
5033 (inf_child_fileio_pread, inf_child_fileio_fstat)
5034 (inf_child_fileio_close, inf_child_fileio_unlink)
5035 (inf_child_fileio_readlink, inf_child_use_agent)
5036 (inf_child_can_use_agent): Refactor as methods of
5038 (return_zero, inf_child_target): Delete.
5039 (inf_child_target::inf_child_target): New.
5040 * inf-child.h: Include "target.h".
5041 (inf_child_target): Delete function prototype.
5042 (inf_child_target): New class.
5043 (inf_child_open_target, inf_child_mourn_inferior)
5044 (inf_child_maybe_unpush_target): Delete.
5045 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5046 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5047 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5048 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5049 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5050 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5051 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5052 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5053 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5054 methods of inf_ptrace_target.
5055 (inf_ptrace_target): Delete function.
5056 * inf-ptrace.h: Include "inf-child.h".
5057 (inf_ptrace_target): Delete function declaration.
5058 (inf_ptrace_target): New class.
5059 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5060 * linux-nat.c (linux_target): New.
5061 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5062 (linux_nat_target::~linux_nat_target): New.
5063 (linux_child_post_attach, linux_child_post_startup_inferior)
5064 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5065 (linux_child_remove_fork_catchpoint)
5066 (linux_child_insert_vfork_catchpoint)
5067 (linux_child_remove_vfork_catchpoint)
5068 (linux_child_insert_exec_catchpoint)
5069 (linux_child_remove_exec_catchpoint)
5070 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5071 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5072 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5073 (linux_nat_stopped_data_address)
5074 (linux_nat_stopped_by_sw_breakpoint)
5075 (linux_nat_supports_stopped_by_sw_breakpoint)
5076 (linux_nat_stopped_by_hw_breakpoint)
5077 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5078 (linux_nat_kill, linux_nat_mourn_inferior)
5079 (linux_nat_xfer_partial, linux_nat_thread_alive)
5080 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5081 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5082 (linux_child_static_tracepoint_markers_by_strid)
5083 (linux_nat_is_async_p, linux_nat_can_async_p)
5084 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5085 (linux_nat_supports_multi_process)
5086 (linux_nat_supports_disable_randomization, linux_nat_async)
5087 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5088 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5089 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5090 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5091 methods of linux_nat_target.
5092 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5093 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5095 (check_stopped_by_watchpoint): Adjust.
5096 (linux_xfer_partial): Delete.
5097 (linux_target_install_ops, linux_target, linux_nat_add_target):
5099 (linux_nat_target::linux_nat_target): New.
5100 * linux-nat.h: Include "inf-ptrace.h".
5101 (linux_nat_target): New.
5102 (linux_target, linux_target_install_ops, linux_nat_add_target):
5103 Delete function declarations.
5104 (linux_target): Declare global.
5105 * linux-thread-db.c (thread_db_target): New.
5106 (thread_db_target::thread_db_target): New.
5107 (thread_db_ops): Delete.
5108 (the_thread_db_target): New.
5109 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5110 (thread_db_update_thread_list, thread_db_pid_to_str)
5111 (thread_db_extra_thread_info)
5112 (thread_db_thread_handle_to_thread_info)
5113 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5114 (thread_db_resume): Refactor as methods of thread_db_target.
5115 (init_thread_db_ops): Delete.
5116 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5117 * x86-linux-nat.c: Don't include "linux-nat.h".
5118 (super_post_startup_inferior): Delete.
5119 (x86_linux_nat_target::~x86_linux_nat_target): New.
5120 (x86_linux_child_post_startup_inferior)
5121 (x86_linux_read_description, x86_linux_enable_btrace)
5122 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5123 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5124 methods of x86_linux_nat_target.
5125 (x86_linux_create_target): Delete. Bits folded ...
5126 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5128 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5129 (x86_linux_nat_target): New class.
5130 (x86_linux_create_target): Delete.
5131 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5132 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5133 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5134 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5135 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5136 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5138 (x86_use_watchpoints): Delete.
5139 * x86-nat.h: Include "breakpoint.h" and "target.h".
5140 (x86_use_watchpoints): Delete.
5141 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5142 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5143 (x86_insert_watchpoint, x86_remove_watchpoint)
5144 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5145 (x86_stopped_by_hw_breakpoint): New declarations.
5146 (x86_nat_target): New template class.
5148 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5149 (the_ppc_linux_nat_target): New.
5150 (ppc_linux_fetch_inferior_registers)
5151 (ppc_linux_can_use_hw_breakpoint)
5152 (ppc_linux_region_ok_for_hw_watchpoint)
5153 (ppc_linux_ranged_break_num_registers)
5154 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5155 (ppc_linux_insert_mask_watchpoint)
5156 (ppc_linux_remove_mask_watchpoint)
5157 (ppc_linux_can_accel_watchpoint_condition)
5158 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5159 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5160 (ppc_linux_watchpoint_addr_within_range)
5161 (ppc_linux_masked_watch_num_registers)
5162 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5163 (ppc_linux_read_description): Refactor as methods of
5164 ppc_linux_nat_target.
5165 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5167 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5168 (procfs_target): New class.
5169 (the_procfs_target): New.
5170 (procfs_target): Delete function.
5171 (procfs_auxv_parse, procfs_attach, procfs_detach)
5172 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5173 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5174 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5175 (procfs_create_inferior, procfs_update_thread_list)
5176 (procfs_thread_alive, procfs_pid_to_str)
5177 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5178 (procfs_stopped_data_address, procfs_insert_watchpoint)
5179 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5180 (proc_find_memory_regions, procfs_info_proc)
5181 (procfs_make_note_section): Refactor as methods of procfs_target.
5182 (_initialize_procfs): Adjust.
5183 * sol-thread.c (sol_thread_target): New class.
5184 (sol_thread_ops): Now a sol_thread_target.
5185 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5186 (sol_thread_fetch_registers, sol_thread_store_registers)
5187 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5188 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5189 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5190 (init_sol_thread_ops): Delete.
5191 (_initialize_sol_thread): Adjust. Remove references to
5192 init_sol_thread_ops and complete_target_initialization.
5194 * windows-nat.c (windows_nat_target): New class.
5195 (windows_fetch_inferior_registers)
5196 (windows_store_inferior_registers, windows_resume, windows_wait)
5197 (windows_attach, windows_detach, windows_pid_to_exec_file)
5198 (windows_files_info, windows_create_inferior)
5199 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5200 (windows_close, windows_pid_to_str, windows_xfer_partial)
5201 (windows_get_tib_address, windows_get_ada_task_ptid)
5202 (windows_thread_name, windows_thread_alive): Refactor as
5203 windows_nat_target methods.
5204 (do_initial_windows_stuff): Adjust.
5205 (windows_target): Delete function.
5206 (_initialize_windows_nat): Adjust.
5208 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5209 (darwin_mourn_inferior, darwin_kill_inferior)
5210 (darwin_create_inferior, darwin_attach, darwin_detach)
5211 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5212 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5213 (darwin_supports_multi_process): Refactor as darwin_nat_target
5215 (darwin_resume_to, darwin_files_info): Delete.
5216 (_initialize_darwin_inferior): Rename to ...
5217 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5218 * darwin-nat.h: Include "inf-child.h".
5219 (darwin_nat_target): New class.
5220 (darwin_complete_target): Delete.
5221 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5222 (darwin_target): New.
5223 (i386_darwin_fetch_inferior_registers)
5224 (i386_darwin_store_inferior_registers): Refactor as methods of
5226 (darwin_complete_target): Delete, with ...
5227 (_initialize_i386_darwin_nat): ... bits factored out here.
5229 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5230 (the_alpha_linux_nat_target): New.
5231 (alpha_linux_register_u_offset): Refactor as
5232 alpha_linux_nat_target method.
5233 (_initialize_alpha_linux_nat): Adjust.
5234 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5235 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5236 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5237 methods of linux_nat_trad_target.
5238 (linux_trad_target): Delete.
5239 * linux-nat-trad.h (linux_trad_target): Delete function.
5240 (linux_nat_trad_target): New class.
5241 * mips-linux-nat.c (mips_linux_nat_target): New class.
5242 (super_fetch_registers, super_store_registers, super_close):
5244 (the_mips_linux_nat_target): New.
5245 (mips64_linux_regsets_fetch_registers)
5246 (mips64_linux_regsets_store_registers)
5247 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5248 (mips_linux_register_u_offset, mips_linux_read_description)
5249 (mips_linux_can_use_hw_breakpoint)
5250 (mips_linux_stopped_by_watchpoint)
5251 (mips_linux_stopped_data_address)
5252 (mips_linux_region_ok_for_hw_watchpoint)
5253 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5254 (mips_linux_close): Refactor as methods of mips_linux_nat.
5255 (_initialize_mips_linux_nat): Adjust to C++ification.
5257 * aix-thread.c (aix_thread_target): New class.
5258 (aix_thread_ops): Now an aix_thread_target.
5259 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5260 (aix_thread_fetch_registers, aix_thread_store_registers)
5261 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5262 (aix_thread_thread_alive, aix_thread_pid_to_str)
5263 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5264 Refactor as methods of aix_thread_target.
5265 (init_aix_thread_ops): Delete.
5266 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5267 and complete_target_initialization.
5268 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5269 (rs6000_nat_target): New class.
5270 (the_rs6000_nat_target): New.
5271 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5272 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5273 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5274 (super_create_inferior): Delete.
5275 (_initialize_rs6000_nat): Adjust to C++ification.
5277 * arm-linux-nat.c (arm_linux_nat_target): New class.
5278 (the_arm_linux_nat_target): New.
5279 (arm_linux_fetch_inferior_registers)
5280 (arm_linux_store_inferior_registers, arm_linux_read_description)
5281 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5282 (arm_linux_remove_hw_breakpoint)
5283 (arm_linux_region_ok_for_hw_watchpoint)
5284 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5285 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5286 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5287 arm_linux_nat_target.
5288 (_initialize_arm_linux_nat): Adjust to C++ification.
5290 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5291 (the_aarch64_linux_nat_target): New.
5292 (aarch64_linux_fetch_inferior_registers)
5293 (aarch64_linux_store_inferior_registers)
5294 (aarch64_linux_child_post_startup_inferior)
5295 (aarch64_linux_read_description)
5296 (aarch64_linux_can_use_hw_breakpoint)
5297 (aarch64_linux_insert_hw_breakpoint)
5298 (aarch64_linux_remove_hw_breakpoint)
5299 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5300 (aarch64_linux_region_ok_for_hw_watchpoint)
5301 (aarch64_linux_stopped_data_address)
5302 (aarch64_linux_stopped_by_watchpoint)
5303 (aarch64_linux_watchpoint_addr_within_range)
5304 (aarch64_linux_can_do_single_step): Refactor as methods of
5305 aarch64_linux_nat_target.
5306 (super_post_startup_inferior): Delete.
5307 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5309 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5310 (the_hppa_linux_nat_target): New.
5311 (hppa_linux_fetch_inferior_registers)
5312 (hppa_linux_store_inferior_registers): Refactor as methods of
5313 hppa_linux_nat_target.
5314 (_initialize_hppa_linux_nat): Adjust to C++ification.
5316 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5317 (the_ia64_linux_nat_target): New.
5318 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5319 (ia64_linux_stopped_data_address)
5320 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5321 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5322 ia64_linux_nat_target methods.
5323 (super_xfer_partial): Delete.
5324 (_initialize_ia64_linux_nat): Adjust to C++ification.
5326 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5327 (the_m32r_linux_nat_target): New.
5328 (m32r_linux_fetch_inferior_registers)
5329 (m32r_linux_store_inferior_registers): Refactor as
5330 m32r_linux_nat_target methods.
5331 (_initialize_m32r_linux_nat): Adjust to C++ification.
5333 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5334 (the_m68k_linux_nat_target): New.
5335 (m68k_linux_fetch_inferior_registers)
5336 (m68k_linux_store_inferior_registers): Refactor as
5337 m68k_linux_nat_target methods.
5338 (_initialize_m68k_linux_nat): Adjust to C++ification.
5340 * s390-linux-nat.c (s390_linux_nat_target): New class.
5341 (the_s390_linux_nat_target): New.
5342 (s390_linux_fetch_inferior_registers)
5343 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5344 (s390_insert_watchpoint, s390_remove_watchpoint)
5345 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5346 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5347 (s390_auxv_parse, s390_read_description): Refactor as methods of
5348 s390_linux_nat_target.
5349 (_initialize_s390_nat): Adjust to C++ification.
5351 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5352 (the_sparc_linux_nat_target): New.
5353 (_initialize_sparc_linux_nat): Adjust to C++ification.
5354 * sparc-nat.c (sparc_fetch_inferior_registers)
5355 (sparc_store_inferior_registers): Remove target_ops parameter.
5356 * sparc-nat.h (sparc_fetch_inferior_registers)
5357 (sparc_store_inferior_registers): Remove target_ops parameter.
5358 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5359 (the_sparc64_linux_nat_target): New.
5360 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5362 * spu-linux-nat.c (spu_linux_nat_target): New class.
5363 (the_spu_linux_nat_target): New.
5364 (spu_child_post_startup_inferior, spu_child_post_attach)
5365 (spu_child_wait, spu_fetch_inferior_registers)
5366 (spu_store_inferior_registers, spu_xfer_partial)
5367 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5369 (_initialize_spu_nat): Adjust to C++ification.
5371 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5372 (the_tilegx_linux_nat_target): New.
5373 (fetch_inferior_registers, store_inferior_registers):
5374 Refactor as methods.
5375 (_initialize_tile_linux_nat): Adjust to C++ification.
5377 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5378 (the_xtensa_linux_nat_target): New.
5379 (xtensa_linux_fetch_inferior_registers)
5380 (xtensa_linux_store_inferior_registers): Refactor as
5381 xtensa_linux_nat_target methods.
5382 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5384 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5385 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5386 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5387 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5388 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5389 (fbsd_stopped_by_sw_breakpoint)
5390 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5391 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5392 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5393 (fbsd_post_startup_inferior, fbsd_post_attach)
5394 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5395 (fbsd_set_syscall_catchpoint)
5396 (super_xfer_partial, super_resume, super_wait)
5397 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5398 (fbsd_handle_debug_trap): Remove target_ops parameter.
5399 (fbsd_nat_add_target): Delete.
5400 * fbsd-nat.h: Include "inf-ptrace.h".
5401 (fbsd_nat_add_target): Delete.
5402 (USE_SIGTRAP_SIGINFO): Define.
5403 (fbsd_nat_target): New class.
5405 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5406 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5407 (amd64bsd_target): Delete.
5408 * amd64-bsd-nat.h: New file.
5409 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5411 (amd64_fbsd_nat_target): New class.
5412 (the_amd64_fbsd_nat_target): New.
5413 (amd64fbsd_read_description): Refactor as method of
5414 amd64_fbsd_nat_target.
5415 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5416 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5417 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5418 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5419 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5420 (i386bsd_target): Delete.
5421 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5422 (i386bsd_fetch_inferior_registers)
5423 (i386bsd_store_inferior_registers): Declare.
5424 (i386_bsd_nat_target): New class.
5425 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5426 (the_i386_fbsd_nat_target): New.
5427 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5428 i386_fbsd_nat_target methods.
5429 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5430 (_initialize_i386fbsd_nat): Adjust to C++ification.
5431 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5432 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5433 (_initialize_x86_bsd_nat): Adjust to C++ification.
5434 * x86-bsd-nat.h: Include "x86-nat.h".
5435 (x86bsd_target): Delete declaration.
5436 (x86bsd_nat_target): New class.
5438 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5439 (the_aarch64_fbsd_nat_target): New.
5440 (aarch64_fbsd_fetch_inferior_registers)
5441 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5442 aarch64_fbsd_nat_target.
5443 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5444 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5445 (the_alpha_bsd_nat_target): New.
5446 (alphabsd_fetch_inferior_registers)
5447 (alphabsd_store_inferior_registers): Refactor as
5448 alpha_bsd_nat_target methods.
5449 (_initialize_alphabsd_nat): Refactor as methods of
5450 alpha_bsd_nat_target.
5451 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5452 (the_amd64_nbsd_nat_target): New.
5453 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5454 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5455 (the_amd64_obsd_nat_target): New.
5456 (_initialize_amd64obsd_nat): Adjust to C++ification.
5457 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5458 (the_arm_fbsd_nat_target): New.
5459 (arm_fbsd_fetch_inferior_registers)
5460 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5461 (_initialize_arm_fbsd_nat): Refactor as methods of
5462 arm_fbsd_nat_target.
5463 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5464 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5465 (the_arm_netbsd_nat_target): New.
5466 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5467 arm_netbsd_nat_target.
5468 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5469 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5470 (the_hppa_nbsd_nat_target): New.
5471 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5472 hppa_nbsd_nat_target methods.
5473 (_initialize_hppanbsd_nat): Adjust to C++ification.
5474 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5475 (the_hppa_obsd_nat_target): New.
5476 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5477 methods of hppa_obsd_nat_target.
5478 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5480 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5481 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5483 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5484 (_initialize_i386obsd_nat): Use add_target.
5485 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5486 (the_m68k_bsd_nat_target): New.
5487 (m68kbsd_fetch_inferior_registers)
5488 (m68kbsd_store_inferior_registers): Refactor as methods of
5489 m68k_bsd_nat_target.
5490 (_initialize_m68kbsd_nat): Adjust to C++ification.
5491 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5492 (the_mips_fbsd_nat_target): New.
5493 (mips_fbsd_fetch_inferior_registers)
5494 (mips_fbsd_store_inferior_registers): Refactor as methods of
5495 mips_fbsd_nat_target.
5496 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5498 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5499 (the_mips_nbsd_nat_target): New.
5500 (mipsnbsd_fetch_inferior_registers)
5501 (mipsnbsd_store_inferior_registers): Refactor as methods of
5502 mips_nbsd_nat_target.
5503 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5504 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5505 (the_mips64_obsd_nat_target): New.
5506 (mips64obsd_fetch_inferior_registers)
5507 (mips64obsd_store_inferior_registers): Refactor as methods of
5508 mips64_obsd_nat_target.
5509 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5511 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5513 * nbsd-nat.h: Include "inf-ptrace.h".
5514 (nbsd_nat_target): New class.
5515 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5516 (obsd_wait): Refactor as methods of obsd_nat_target.
5517 (obsd_add_target): Delete.
5518 * obsd-nat.h: Include "inf-ptrace.h".
5519 (obsd_nat_target): New class.
5520 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5521 (the_ppc_fbsd_nat_target): New.
5522 (ppcfbsd_fetch_inferior_registers)
5523 (ppcfbsd_store_inferior_registers): Refactor as methods of
5524 ppc_fbsd_nat_target.
5525 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5527 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5528 (the_ppc_nbsd_nat_target): New.
5529 (ppcnbsd_fetch_inferior_registers)
5530 (ppcnbsd_store_inferior_registers): Refactor as methods of
5531 ppc_nbsd_nat_target.
5532 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5533 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5534 (the_ppc_obsd_nat_target): New.
5535 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5536 methods of ppc_obsd_nat_target.
5537 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5539 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5540 (the_sh_nbsd_nat_target): New.
5541 (shnbsd_fetch_inferior_registers)
5542 (shnbsd_store_inferior_registers): Refactor as methods of
5544 (_initialize_shnbsd_nat): Adjust to C++ification.
5545 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5546 (inf_ptrace_xfer_partial): Delete.
5547 (sparc_xfer_partial, sparc_target): Delete.
5548 * sparc-nat.h (sparc_fetch_inferior_registers)
5549 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5550 (sparc_target): Delete function declaration.
5551 (sparc_target): New template class.
5552 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5553 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5554 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5555 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5557 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5558 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5559 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5560 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5562 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5563 (the_vax_bsd_nat_target): New.
5564 (vaxbsd_fetch_inferior_registers)
5565 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5567 (_initialize_vaxbsd_nat): Adjust to C++ification.
5569 * bsd-kvm.c (bsd_kvm_target): New class.
5570 (bsd_kvm_ops): Now a bsd_kvm_target.
5571 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5572 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5573 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5575 (bsd_kvm_return_one): Delete.
5576 (bsd_kvm_add_target): Adjust to C++ification.
5578 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5579 (nto_procfs_target_procfs): New classes.
5580 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5581 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5582 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5583 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5584 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5585 (procfs_remove_hw_breakpoint, procfs_resume)
5586 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5587 (procfs_kill_inferior, procfs_store_registers)
5588 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5589 as methods of nto_procfs_target.
5590 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5591 (nto_native_ops): Delete.
5592 (procfs_open, procfs_native_open): Delete.
5593 (nto_native_ops): Now an nto_procfs_target_native.
5594 (init_procfs_targets): Adjust to C++ification.
5595 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5596 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5597 Refactor as methods of nto_procfs_target.
5599 * go32-nat.c (go32_nat_target): New class.
5600 (the_go32_nat_target): New.
5601 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5602 (go32_store_registers, go32_xfer_partial, go32_files_info)
5603 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5604 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5605 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5606 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5607 (go32_target): Delete.
5608 (_initialize_go32_nat): Adjust to C++ification.
5610 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5611 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5612 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5613 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5615 (gnu_target): Delete.
5616 * gnu-nat.h (gnu_target): Delete.
5617 (gnu_nat_target): New class.
5618 * i386-gnu-nat.c (gnu_base_target): New.
5619 (i386_gnu_nat_target): New class.
5620 (the_i386_gnu_nat_target): New.
5621 (_initialize_i386gnu_nat): Adjust to C++ification.
5623 2018-05-02 Pedro Alves <palves@redhat.com>
5625 * bfd-target.c (target_bfd_xclose): Rename to ...
5626 (target_bfd_close): ... this.
5627 (target_bfd_reopen): Adjust.
5628 * target.c (target_close): Remove references to to_xclose.
5629 * target.h (target_ops::to_xclose): Delete.
5630 (target_ops::to_close): Update comments.
5632 2018-05-02 Pedro Alves <palves@redhat.com>
5634 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5636 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5637 * inf-ptrace.c (inf_ptrace_register_u_offset)
5638 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5639 (inf_ptrace_store_register, inf_ptrace_store_registers)
5640 (inf_ptrace_trad_target): Move to ...
5641 * linux-nat-trad.c: ... this new file.
5642 * linux-nat-trad.h: New file.
5643 * linux-nat.c (linux_target_install_ops): Make extern.
5644 (linux_trad_target): Delete.
5645 * linux-nat.h (linux_trad_target): Delete declaration.
5646 (linux_target_install_ops): Declare.
5647 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5650 2018-05-02 Pedro Alves <palves@redhat.com>
5652 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5653 procfs_target/add_target here.
5654 * procfs.c (procfs_target): Make static.
5655 (_initialize_procfs): Call add_target here.
5656 * procfs.h (struct target_ops): Remove forward declaration.
5657 (procfs_target): Remove declaration.
5658 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5660 2018-05-02 Pedro Alves <palves@redhat.com>
5662 * procfs.c (procfs_stopped_by_watchpoint)
5663 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5664 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5666 (procfs_use_watchpoints): Delete, move contents...
5667 (procfs_target): ... here.
5668 * procfs.h (procfs_use_watchpoints): Delete declaration.
5669 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5670 procfs_use_watchpoints.
5671 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5672 procfs_use_watchpoints.
5674 2018-05-02 Tom Tromey <tom@tromey.com>
5677 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5678 and var_zuinteger_unlimited.
5679 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5680 and PARAM_ZUINTEGER_UNLIMITED.
5681 (set_parameter_value): Handle var_zuinteger and
5682 var_zuinteger_unlimited.
5683 (add_setshow_generic): Likewise.
5684 (parmpy_init): Likewise.
5686 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5689 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5690 pointer is not null before dereferencing it.
5692 2018-04-30 Tom Tromey <tom@tromey.com>
5694 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5697 2018-04-30 Tom Tromey <tom@tromey.com>
5699 * breakpoint.c (mention): Remove use of is_mi_like_p.
5700 (print_mention_ranged_breakpoint): Likewise.
5701 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5704 2018-04-30 Tom Tromey <tom@tromey.com>
5706 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5708 2018-04-30 Tom Tromey <tom@tromey.com>
5710 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5711 (info_spu_event_command): Remove some uses of is_mi_like_p.
5713 2018-04-30 Tom Tromey <tom@tromey.com>
5715 * python/py-framefilter.c (py_print_single_arg)
5716 (enumerate_locals, py_print_args, py_print_frame): Remove some
5717 uses of is_mi_like_p.
5719 2018-04-30 Tom Tromey <tom@tromey.com>
5722 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5723 * ui-out.h (ui_out::is_mi_like_p): Now const.
5724 (ui_out::do_is_mi_like_p): Now const.
5725 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5727 2018-04-30 Tom Tromey <tom@tromey.com>
5729 * varobj.c (varobj_set_visualizer): Use new_reference.
5730 * python/python.c (gdbpy_decode_line): Use new_reference.
5731 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5734 2018-04-30 Tom Tromey <tom@tromey.com>
5736 * varobj.c (install_new_value): Use new_reference.
5737 * value.h (value_incref): Return void. Swap intro comment with
5739 * value.c (set_value_parent): Use new_reference.
5740 (value_incref): Return void. Update intro comment.
5741 (release_value): Use new_reference.
5742 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5744 2018-04-30 Tom Tromey <tom@tromey.com>
5746 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5747 * gdb_bfd.h (new_bfd_ref): Remove.
5748 (gdb_bfd_open): Update comment.
5749 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5750 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5751 (gdb_bfd_fdopenr): Use new_reference.
5752 * exec.c (exec_file_attach): Use new_reference.
5754 2018-04-30 Tom Tromey <tom@tromey.com>
5756 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5759 2018-04-30 Tom Tromey <tom@tromey.com>
5761 * jit.c (jit_read_code_entry): Use type_align.
5762 * i386-tdep.c (i386_gdbarch_init): Don't call
5763 set_gdbarch_long_long_align_bit.
5764 * gdbarch.sh: Remove long_long_align_bit.
5765 * gdbarch.c, gdbarch.h: Rebuild.
5766 * arc-tdep.c (arc_type_align): New function.
5767 (arc_gdbarch_init): Use arc_type_align. Don't call
5768 set_gdbarch_long_long_align_bit.
5770 2018-04-30 Tom Tromey <tom@tromey.com>
5772 * rust-lang.c (rust_type_alignment): Remove.
5773 (rust_composite_type): Use type_align.
5775 2018-04-30 Tom Tromey <tom@tromey.com>
5777 * NEWS: Mention Type.align.
5778 * python/py-type.c (typy_get_alignof): New function.
5779 (type_object_getset): Add "alignof".
5781 2018-04-30 Tom Tromey <tom@tromey.com>
5785 * std-operator.def (UNOP_ALIGNOF): New operator.
5786 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5788 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5789 * c-lang.c (c_op_print_tab): Add alignof.
5790 * c-exp.y (ALIGNOF): New token.
5791 (exp): Add "ALIGNOF" production.
5792 (ident_tokens): Add _Alignof and alignof.
5794 2018-04-30 Tom Tromey <tom@tromey.com>
5796 * i386-tdep.c (i386_type_align): New function.
5797 (i386_gdbarch_init): Update.
5798 * gdbarch.sh (type_align): New method.
5799 * gdbarch.c, gdbarch.h: Rebuild.
5800 * arch-utils.h (default_type_align): Declare.
5801 * arch-utils.c (default_type_align): New function.
5802 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5803 (struct type) <align_log2>: New field.
5804 <instance_flags>: Now a bitfield.
5805 (TYPE_RAW_ALIGN): New macro.
5806 (type_align, type_raw_align, set_type_align): Declare.
5807 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5809 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5810 (get_alignment, maybe_set_alignment): New functions.
5811 (read_structure_type, read_enumeration_type, read_array_type)
5812 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5813 (read_subrange_type, read_base_type): Set type alignment.
5815 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5817 * dwarf2read.c (read_index_from_section): Use bool.
5819 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5822 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5825 2018-04-29 John Reiser <jreiser@BitWagon.com>
5828 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5829 last step, and do it atomically.
5831 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5833 * compile/compile-c-types.c (convert_int, convert_float):
5836 2018-04-27 Tom Tromey <tom@tromey.com>
5839 * rust-lang.c (rust_inclusive_range_type_p): New function.
5840 (rust_range): Handle inclusive ranges.
5841 (rust_compute_range): Likewise.
5842 * rust-exp.y (struct rust_op) <inclusive>: New field.
5843 (DOTDOTEQ): New constant.
5844 (range_expr): Add "..=" productions.
5845 (operator_tokens): Add "..=" token.
5846 (ast_range): Add "inclusive" parameter.
5847 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5849 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5851 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5852 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5854 * expprint.c (print_subexp_standard): Handle new bounds values.
5855 (dump_subexp_body_standard): Likewise.
5857 2018-04-27 Tom Tromey <tom@tromey.com>
5859 * configure: Rebuild.
5860 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5861 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5863 (class symbol_needs_eval_context): Likewise.
5864 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5865 (mock_mapped_index::symbol_name_at): Use "override". Remove
5867 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5869 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5870 * aarch64-tdep.c (instruction_reader::read): Use "override".
5871 (instruction_reader_test::read): Likewise.
5872 * arm-tdep.c (instruction_reader::read): Use "override".
5873 (instruction_reader_thumb::read): Likewise.
5875 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5878 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5879 instead of remote_send.
5880 (remote_send): Remove.
5882 2018-04-26 Pedro Alves <palves@redhat.com>
5884 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5885 find_function_start_sal instead of find_pc_line.
5887 2018-04-26 Pedro Alves <palves@redhat.com>
5889 * breakpoint.c (set_breakpoint_location_function): Handle
5891 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5892 * elfread.c (elf_symtab_read): Give data symbols with
5893 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5894 (elf_rel_plt_read): Update comment.
5895 * linespec.c (convert_linespec_to_sals): Handle
5897 (minsym_found): Handle mst_data_gnu_ifunc.
5898 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5899 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5900 * parse.c (find_minsym_type_and_address): Handle
5902 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5903 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5904 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5906 <mst_data_gnu_ifunc>: New enumerator.
5908 2018-04-26 Pedro Alves <palves@redhat.com>
5910 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5911 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5912 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5914 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5915 (lookup_minimal_symbol_by_pc): Adjust.
5916 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5917 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5918 * minsyms.h (lookup_msym_prefer): New enum.
5919 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5920 parameter by a lookup_msym_prefer parameter.
5922 2018-04-26 Pedro Alves <palves@redhat.com>
5924 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5925 ends in "@plt" instead of looking at the symbol's section.
5927 2018-04-26 Pedro Alves <palves@redhat.com>
5929 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5931 (find_pc_partial_function_gnu_ifunc): Rename to ...
5932 (find_pc_partial_function): ... this, and remove references to
5934 (find_pc_partial_function): Delete old implementation.
5935 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5937 2018-04-26 Pedro Alves <palves@redhat.com>
5939 * linespec.c (struct bound_minimal_symbol_search_key): New.
5940 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5941 skip first line if we found a GNU ifunc minimal symbol by name.
5942 (compare_msymbols): Change parameters to work with a destructured
5944 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5947 2018-04-26 Pedro Alves <palves@redhat.com>
5949 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5950 ifunc targets here. Instead, if we have an ifunc minsym, use its
5952 (add_location_to_breakpoint): Store the minsym and the objfile in
5953 the breakpoint location.
5954 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5955 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5956 Record the minsym in the sal.
5957 * symtab.h (symtab_and_line) <msymbol>: New field.
5959 2018-04-26 Pedro Alves <palves@redhat.com>
5961 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5962 unless we actually resolved the ifunc.
5964 2018-04-26 Pedro Alves <palves@redhat.com>
5966 * c-exp.y (variable production): Prefer ifunc minsyms over
5967 regular function symbols.
5968 * symtab.c (find_gnu_ifunc): New function.
5969 * minsyms.h (lookup_msym_prefer): New enum.
5970 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5971 parameter by a lookup_msym_prefer parameter.
5972 * symtab.h (find_gnu_ifunc): New declaration.
5974 2018-04-26 Pedro Alves <palves@redhat.com>
5976 * blockframe.c (find_gnu_ifunc_target_type): New function.
5977 (find_function_type): New.
5978 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5979 return a value with a memory address.
5980 (eval_call): For calls to GNU ifunc functions, try to find the
5981 type of the target function from the type that the resolver
5983 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5985 * infcall.c (find_function_return_type): Delete.
5986 (find_function_addr): Add 'function_type' parameter. For calls to
5987 GNU ifunc functions, try to find the type of the target function
5988 from the type that the resolver returns, and return it via
5990 (call_function_by_hand_dummy): Adjust to use the function type
5991 returned by find_function_addr.
5992 (find_function_addr): Add 'function_type' parameter and move
5994 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5997 2018-04-26 Pedro Alves <palves@redhat.com>
5999 * c-exp.y (variable production): Skip finding an alias for ifunc
6002 2018-04-26 Pedro Alves <palves@redhat.com>
6004 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6006 2018-04-25 Pedro Alves <palves@redhat.com>
6008 * infcmd.c (kill_command): Print the pid as string, not the whole
6009 thread's ptid. Add comment. s/has been killed/killed/ in output
6011 * remote.c (remote_detach_1): Print the pid as string, not the
6012 whole thread's ptid.
6014 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6015 Sergio Durigan Junior <sergiodj@redhat.com>
6016 Pedro Alves <palves@redhat.com>
6018 * infcmd.c (kill_command): Print message when inferior has
6020 * inferior.c (print_inferior_events): Remove 'static'. Set as
6022 (add_inferior): Improve message printed when
6023 'print_inferior_events' is on.
6024 (exit_inferior): Remove message printed when
6025 'print_inferior_events' is on.
6026 (detach_inferior): Improve message printed when
6027 'print_inferior_events' is on.
6028 (initialize_inferiors): Use 'add_inferior_silent' to set
6029 'current_inferior_'.
6030 * inferior.h (print_inferior_events): Declare here as
6032 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6033 '[Detaching...]' messages when 'print_inferior_events' is on.
6034 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6035 as prefix/suffix for messages. Remove periods. Fix erroneous
6036 'Detaching after fork from child...', replace it by '... from
6038 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6039 prefix/suffix when printing 'Detaching...' messages. Print
6040 them when 'print_inferior_events' is on.
6041 * remote.c (remote_detach_1): Print message when detaching
6042 from inferior and '!is_fork_parent'.
6044 2018-04-24 Tom Tromey <tom@tromey.com>
6046 * cli-out.h: Reindent.
6048 2018-04-24 Tom Tromey <tom@tromey.com>
6050 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6051 (cli_ui_out::do_field_string): Use fputs_filtered.
6052 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6054 2018-04-23 Tom Tromey <tom@tromey.com>
6056 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6057 gdb::unique_xmalloc_ptr.
6059 2018-04-23 Tom Tromey <tom@tromey.com>
6061 * configure: Rebuild.
6063 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6066 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6067 prepare_for_testing. Set normal_bp to r_debug_state if target
6070 2018-04-21 Pedro Alves <palves@redhat.com>
6071 Rajendra SY <rajendra.sy@gmail.com>
6073 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6074 * remote.c (extended_remote_attach): In all-stop mode, mark the
6075 thread as executing.
6077 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6079 * thread.c (thread_apply_all_command): Fix comment.
6080 (thread_command): Fix comment.
6082 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6084 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6086 * features/aarch64-core.c (create_feature_aarch64_core):
6088 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6090 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6092 * features/i386/32bit-avx512.c
6093 (create_feature_i386_32bit_avx512): Likewise.
6094 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6096 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6098 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6100 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6102 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6104 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6106 * features/i386/64bit-avx512.c
6107 (create_feature_i386_64bit_avx512): Likewise.
6108 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6110 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6112 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6114 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6116 * features/i386/64bit-segments.c
6117 (create_feature_i386_64bit_segments): Likewise.
6118 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6120 * features/i386/x32-core.c
6121 (create_feature_i386_x32_core): Likewise.
6122 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6123 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6124 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6125 * target-descriptions.c: In generated code, don't pass xml
6128 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6130 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6131 (print_xml_feature::visit_post): Likewise.
6132 (print_xml_feature::visit): Likewise.
6133 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6134 (print_xml_feature): Add new class.
6135 * regformats/regdat.sh: Null xmltarget on feature targets.
6136 * target-descriptions.c (struct target_desc): Add xmltarget.
6137 (maintenance_check_tdesc_xml_convert): Add unittest function.
6138 (tdesc_get_features_xml): Add function to get xml.
6139 (maintenance_check_xml_descriptions): Test xml generation.
6140 * xml-tdesc.c (string_read_description_xml): Add function.
6141 * xml-tdesc.h (string_read_description_xml): Add declaration.
6143 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6145 * features/Makefile: Add feature marker to targets with new style
6146 target descriptions.
6147 * regformats/aarch64.dat: Regenerate.
6148 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6149 * regformats/i386/amd64-avx-linux.dat: Likewise.
6150 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6151 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6152 * regformats/i386/amd64-linux.dat: Likewise.
6153 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6154 * regformats/i386/amd64.dat: Likewise.
6155 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6156 * regformats/i386/i386-avx-linux.dat: Likewise.
6157 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6158 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6159 * regformats/i386/i386-linux.dat: Likewise.
6160 * regformats/i386/i386-mmx-linux.dat: Likewise.
6161 * regformats/i386/i386-mpx-linux.dat: Likewise.
6162 * regformats/i386/i386.dat: Likewise.
6163 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6164 * regformats/i386/x32-avx-linux.dat: Likewise.
6165 * regformats/i386/x32-linux.dat: Likewise.
6166 * regformats/tic6x-c62x-linux.dat: Likewise.
6167 * regformats/tic6x-c64x-linux.dat: Likewise.
6168 * regformats/tic6x-c64xp-linux.dat: Likewise.
6169 * regformats/regdat.sh: Parse feature marker.
6171 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6173 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6174 (tdesc_osabi_name): Likewise.
6175 * target-descriptions.c (tdesc_architecture_name): Add new
6177 (tdesc_osabi_name): Likewise.
6179 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6181 * common/tdesc.c (tdesc_predefined_type): Move to here.
6182 (tdesc_named_type): Likewise.
6183 (tdesc_create_vector): Likewise.
6184 (tdesc_create_struct): Likewise.
6185 (tdesc_set_struct_size): Likewise.
6186 (tdesc_create_union): Likewise.
6187 (tdesc_create_flags): Likewise.
6188 (tdesc_create_enum): Likewise.
6189 (tdesc_add_field): Likewise.
6190 (tdesc_add_typed_bitfield): Likewise.
6191 (tdesc_add_bitfield): Likewise.
6192 (tdesc_add_flag): Likewise.
6193 (tdesc_add_enum_value): Likewise.
6194 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6195 (struct tdesc_type_vector): Likewise.
6196 (struct tdesc_type_field): Likewise.
6197 (struct tdesc_type_with_fields): Likewise.
6198 (tdesc_create_enum): Add declaration.
6199 (tdesc_add_typed_bitfield): Likewise.
6200 (tdesc_add_enum_value): Likewise.
6201 * target-descriptions.c (tdesc_type_field): Move from here.
6202 (tdesc_type_builtin): Likewise.
6203 (tdesc_type_vector): Likewise.
6204 (tdesc_type_with_fields): Likewise.
6205 (tdesc_predefined_types): Likewise.
6206 (tdesc_named_type): Likewise.
6207 (tdesc_create_vector): Likewise.
6208 (tdesc_create_struct): Likewise.
6209 (tdesc_set_struct_size): Likewise.
6210 (tdesc_create_union): Likewise.
6211 (tdesc_create_flags): Likewise.
6212 (tdesc_create_enum): Likewise.
6213 (tdesc_add_field): Likewise.
6214 (tdesc_add_typed_bitfield): Likewise.
6215 (tdesc_add_bitfield): Likewise.
6216 (tdesc_add_flag): Likewise.
6217 (tdesc_add_enum_value): Likewise.
6218 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6219 (tdesc_add_typed_bitfield): Likewise.
6220 (tdesc_add_enum_value): Likewise.
6222 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6224 * common/tdesc.c (tdesc_feature::accept): Move to here.
6225 (tdesc_feature::operator==): Likewise.
6226 (tdesc_create_reg): Likewise.
6227 * common/tdesc.h (tdesc_type_kind): Likewise.
6228 (struct tdesc_type): Likewise.
6229 (struct tdesc_feature): Likewise.
6230 * regformats/regdat.sh: Create a feature.
6231 * target-descriptions.c (tdesc_type_kind): Move from here.
6232 (tdesc_type): Likewise.
6233 (tdesc_type_up): Likewise.
6234 (tdesc_feature): Likewise.
6235 (tdesc_create_reg): Likewise.
6237 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6239 * Makefile.in: Add arch/tdesc.c
6240 * common/tdesc.c: New file.
6241 * common/tdesc.h (tdesc_element_visitor): Move to here.
6242 (tdesc_element): Likewise.
6243 (tdesc_reg): Likewise.
6244 (tdesc_reg_up): Likewise.
6245 * regformats/regdef.h (reg): Add offset to constructors.
6246 * target-descriptions.c (tdesc_element_visitor): Move from here.
6247 (tdesc_element): Likewise.
6248 (tdesc_reg): Likewise.
6249 (tdesc_reg_up): Likewise.
6251 2018-04-17 Tom Tromey <tom@tromey.com>
6253 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6256 2018-04-17 Tom Tromey <tom@tromey.com>
6258 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6260 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6262 * symtab.c (print_symbol_info): Skip printing filename and line
6263 number when `last' is NULL.
6264 (symtab_symbol_info): Use empty string instead of NULL for first
6265 invocation of print_symbol_info.
6266 (rbreak_command): Pass NULL to `last' parameter of
6269 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6271 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6274 2018-04-16 Pedro Alves <palves@redhat.com>
6276 * MAINTAINERS (sh): Remove.
6277 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6278 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6279 (ALLDEPFILES): Remove sh64-tdep.c.
6280 * NEWS: Mentions that support for SH-5/SH64 is removed.
6281 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6282 (sh*-*-openbsd*): Ditto.
6283 (sh64-*-elf*): Remove.
6285 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6286 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6287 * sh-tdep.c: No longer include "sh64-tdep.h".
6288 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6289 * sh64-tdep.c, sh64-tdep.h: Remove files.
6291 2018-04-16 Pedro Alves <palves@redhat.com>
6293 * MAINTAINERS: Remove m88k.
6294 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6295 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6296 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6297 * NEWS: Mention that support for m88k was removed.
6298 * configure.host (m88*-*-*): Remove support.
6299 * configure.nat (m88k-*-*): Remove support.
6300 * configure.tgt (m88*-*-openbsd*): Remove.
6301 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6303 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6305 * configure.tgt (x86_tobjs): New variable.
6306 (amd64_tobjs, i386_tobjs): Use it.
6308 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6310 * symtab.c (print_symbol_info): Precede the symbol definition by
6311 the line number when available.
6312 * NEWS: Advertise this enhancement.
6314 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6316 * NEWS (New options): announce set/show record btrace cpu.
6317 * btrace.c: Include record-btrace.h.
6318 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6319 the vendor is unknown.
6320 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6321 Maybe overwrite the btrace configuration's cpu.
6322 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6323 (btrace_fetch): Add cpu parameter. Update callers.
6324 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6325 Maybe overwrite the btrace configuration's cpu. Skip enabling
6326 errata workarounds if the vendor is unknown.
6327 * python/py-record-btrace.c: Include record-btrace.h.
6328 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6329 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6330 * record-btrace.c (record_btrace_cpu_state_kind): New.
6331 (record_btrace_cpu): New.
6332 (set_record_btrace_cpu_cmdlist): New.
6333 (record_btrace_get_cpu): New.
6334 (require_btrace_thread, record_btrace_info)
6335 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6336 (cmd_set_record_btrace_cpu_none): New.
6337 (cmd_set_record_btrace_cpu_auto): New.
6338 (cmd_set_record_btrace_cpu): New.
6339 (cmd_show_record_btrace_cpu): New.
6340 (_initialize_record_btrace): Initialize set/show record btrace cpu
6342 * record-btrace.h (record_btrace_get_cpu): New.
6344 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6346 * record.c (set_record_command): Fix typo in message.
6348 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6350 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6352 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6354 * infrun.c (process_event_stop_test): Call
6355 gdbarch_in_indirect_branch_thunk.
6356 * gdbarch.sh (in_indirect_branch_thunk): New.
6357 * gdbarch.c: Regenerated.
6358 * gdbarch.h: Regenerated.
6361 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6362 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6363 (ALLDEPFILES): Add x86-tdep.c.
6364 * arch-utils.h (default_in_indirect_branch_thunk): New.
6365 * arch-utils.c (default_in_indirect_branch_thunk): New.
6366 * i386-tdep: Include x86-tdep.h.
6367 (i386_in_indirect_branch_thunk): New.
6368 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6370 * amd64-tdep: Include x86-tdep.h.
6371 (amd64_in_indirect_branch_thunk): New.
6372 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6374 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6377 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6378 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6379 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6382 2018-04-12 Tom Tromey <tom@tromey.com>
6384 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6385 (rust_evaluate_subexp): Likewise.
6387 2018-04-12 Pedro Alves <palves@redhat.com>
6389 * procfs.c (procfs_detach): Make forward declaration's prototype
6390 match definition's protototype.
6391 (proc_get_LDT_entry): Remove stale do_cleanups call.
6393 2018-04-12 Pedro Alves <palves@redhat.com>
6395 * target.h (target_ops::to_has_exited): Delete.
6396 (target_has_exited): Delete.
6397 * target-delegates.c: Regenerate.
6399 2018-04-11 Pedro Alves <palves@redhat.com>
6401 * target.c (fileio_fh_t::t): Add comment.
6402 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6403 (target_fileio_close): Handle a NULL target.
6404 (invalidate_fileio_fh): New.
6405 (target_close): Call it.
6406 * remote.c (remote_hostio_send_command): No longer check whether
6407 remote_desc is open.
6409 2018-04-11 Pedro Alves <palves@redhat.com>
6411 * target.c (fileio_fh_t): Make it a named struct instead of a
6413 (fileio_fh_t::is_closed): New method.
6414 (DEF_VEC_O (fileio_fh_t)): Remove.
6415 (fileio_fhandles): Now a std::vector.
6416 (is_closed_fileio_fh): Delete.
6417 (acquire_fileio_fd): Adjust. Rename parameters.
6418 (release_fileio_fd): Adjust.
6419 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6420 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6421 (target_fileio_close): Adjust.
6423 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6425 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6428 2018-04-10 Pedro Alves <palves@redhat.com>
6430 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6431 (scoped_finish_thread_state): New class.
6432 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6434 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6435 (fetch_inferior_event, normal_stop): Likewise.
6436 * thread.c (finish_thread_state_cleanup): Delete.
6438 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6439 Pedro Alves <palves@redhat.com>
6441 * value.c: Include "selftest.h" and "common/array-view.h".
6442 (struct range) <operator ==>: New.
6443 (test_ranges_contain): New.
6444 (check_ranges_vector): New.
6445 (test_insert_into_bit_range_vector): New.
6446 (_initialize_values): Register selftests.
6447 * common/array-view.h (operator==, operator!=): New.
6449 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6451 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6453 * inline-frame.c: Include <algorithm>.
6454 (struct inline_state): Add constructor.
6455 (inline_state_s): Remove.
6456 (DEF_VEC_O(inline_state_s)): Remove.
6457 (inline_states): Change type to std::vector.
6458 (find_inline_frame_state): Adjust to std::vector.
6459 (allocate_inline_frame_state): Remove.
6460 (clear_inline_frame_state): Adjust to std::vector.
6461 (skip_inline_frames): Adjust to std::vector.
6463 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6465 * tracepoint.h (struct trace_state_variable): Add constructor.
6466 <name>: Change type to std::string.
6467 * tracepoint.c (tsv_s): Remove.
6468 (DEF_VEC_O(tsv_s)): Remove.
6469 (tvariables): Change to std::vector.
6470 (create_trace_state_variable): Adjust to std::vector.
6471 (find_trace_state_variable): Likewise.
6472 (find_trace_state_variable_by_number): Likewise.
6473 (delete_trace_state_variable): Likewise.
6474 (trace_variable_command): Adjust to std::string.
6475 (delete_trace_variable_command): Likewise.
6476 (tvariables_info_1): Adjust to std::vector.
6477 (save_trace_state_variables): Likewise.
6478 (start_tracing): Likewise.
6479 (merge_uploaded_trace_state_variables): Adjust to std::vector
6481 * target.h (struct target_ops)
6482 <to_download_trace_state_variable>: Pass reference to
6483 trace_state_variable.
6484 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6485 * target-delegates.c: Re-generate.
6486 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6487 (mi_tsv_deleted): Likewise.
6488 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6489 * remote.c (remote_download_trace_state_variable): Change
6490 pointer to reference and adjust.
6491 * make-target-delegates (parse_argtypes): Handle references.
6492 (write_function_header): Likewise.
6493 (munge_type): Likewise.
6495 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6497 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6498 string_view-selftests.c.
6499 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6501 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6502 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6503 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6504 * unittests/basic_string_view/element_access/char/1.cc:
6506 * unittests/basic_string_view/element_access/char/empty.cc:
6508 * unittests/basic_string_view/element_access/char/front_back.cc:
6510 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6511 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6513 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6515 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6517 * unittests/basic_string_view/operations/compare/char/1.cc:
6519 * unittests/basic_string_view/operations/compare/char/13650.cc:
6521 * unittests/basic_string_view/operations/copy/char/1.cc:
6523 * unittests/basic_string_view/operations/data/char/1.cc:
6525 * unittests/basic_string_view/operations/find/char/1.cc:
6527 * unittests/basic_string_view/operations/find/char/2.cc:
6529 * unittests/basic_string_view/operations/find/char/3.cc:
6531 * unittests/basic_string_view/operations/find/char/4.cc:
6533 * unittests/basic_string_view/operations/rfind/char/1.cc:
6535 * unittests/basic_string_view/operations/rfind/char/2.cc:
6537 * unittests/basic_string_view/operations/rfind/char/3.cc:
6539 * unittests/basic_string_view/operations/substr/char/1.cc:
6541 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6542 * unittests/string_view-selftests.c: New file.
6544 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6546 * unittests/basic_string_view/capacity/1.cc: New file.
6547 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6548 * unittests/basic_string_view/cons/char/1.cc: New file.
6549 * unittests/basic_string_view/cons/char/2.cc: New file.
6550 * unittests/basic_string_view/cons/char/3.cc: New file.
6551 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6552 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6553 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6554 * unittests/basic_string_view/element_access/char/1.cc: New file.
6555 * unittests/basic_string_view/element_access/char/2.cc: New file.
6556 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6557 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6558 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6559 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6560 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6561 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6562 * unittests/basic_string_view/include.cc: New file.
6563 * unittests/basic_string_view/inserters/char/1.cc: New file.
6564 * unittests/basic_string_view/inserters/char/2.cc: New file.
6565 * unittests/basic_string_view/inserters/char/3.cc: New file.
6566 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6567 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6568 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6569 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6570 * unittests/basic_string_view/literals/types.cc: New file.
6571 * unittests/basic_string_view/literals/values.cc: New file.
6572 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6573 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6574 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6575 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6576 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6577 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6578 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6579 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6580 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6581 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6582 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6583 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6584 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6585 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6586 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6587 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6588 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6589 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6590 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6591 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6592 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6593 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6594 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6595 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6596 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6597 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6598 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6599 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6600 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6601 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6602 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6603 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6604 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6605 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6606 * unittests/basic_string_view/operators/char/2.cc: New file.
6607 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6608 * unittests/basic_string_view/range_access/char/1.cc: New file.
6609 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6610 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6611 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6612 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6613 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6614 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6615 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6616 * unittests/basic_string_view/typedefs.cc: New file.
6617 * unittests/basic_string_view/types/1.cc: New file.
6619 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6621 * common/gdb_string_view.h: Remove libstdc++ implementation
6622 details, adjust to gdb reality.
6623 * common/gdb_string_view.tcc: Likewise.
6624 * cli/cli-script.c (struct string_view): Remove.
6625 (user_args) <m_args>: Change element type to gdb::string_view.
6626 (user_args::insert_args): Adjust.
6628 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6630 * common/gdb_string_view.h: New file.
6631 * common/gdb_string_view.tcc: New file.
6633 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6635 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6636 * configure: Re-generate.
6638 2018-04-09 Pedro Alves <palves@redhat.com>
6640 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6641 (set_target_gdbarch): Call
6642 gdb::observers::architecture_changed.notify instead of
6643 observer_notify_architecture_changed.
6645 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6647 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6648 (do_restore_current_traceframe_cleanup): Remove.
6649 (restore_current_traceframe_cleanup_dtor): Remove.
6650 (make_cleanup_restore_current_traceframe): Remove.
6651 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6653 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6654 * infrun.c (fetch_inferior_event): Use
6655 scoped_restore_current_traceframe.
6657 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6659 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6661 <n_allocated_type_units>: Remove.
6662 <all_type_units>: Change to std::vector.
6663 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6664 to std::vector change.
6665 (dwarf2_per_objfile::get_cutu): Likewise.
6666 (dwarf2_per_objfile::get_tu): Likewise.
6667 (create_signatured_type_table_from_index): Likewise.
6668 (create_signatured_type_table_from_debug_names): Likewise.
6669 (dw2_symtab_iter_next): Likewise.
6670 (dw2_print_stats): Likewise.
6671 (dw2_expand_all_symtabs): Likewise.
6672 (dw2_expand_marked_cus): Likewise.
6673 (dw2_debug_names_iterator::next): Likewise.
6674 (dwarf2_initialize_objfile): Likewise.
6675 (add_signatured_type_cu_to_table): Likewise.
6676 (create_all_type_units): Likewise.
6677 (add_type_unit): Likewise.
6678 (struct tu_abbrev_offset): Add constructor.
6679 (build_type_psymtabs_1): Adjust to std::vector change.
6680 (print_tu_stats): Likewise.
6681 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6682 (write_debug_names): Likewise.
6684 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6686 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6687 Make an std::vector.
6688 <n_comp_units>: Remove.
6689 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6690 to std::vector change.
6691 (dwarf2_per_objfile::get_cutu): Likewise.
6692 (dwarf2_per_objfile::get_cu): Likewise.
6693 (create_cus_from_index): Likewise.
6694 (create_addrmap_from_index): Likewise.
6695 (create_addrmap_from_aranges): Likewise.
6696 (dwarf2_read_index): Likewise.
6697 (dw2_find_last_source_symtab): Likewise.
6698 (dw2_map_symtabs_matching_filename): Likewise.
6699 (dw2_symtab_iter_next): Likewise.
6700 (dw2_print_stats): Likewise.
6701 (dw2_expand_all_symtabs): Likewise.
6702 (dw2_expand_symtabs_with_fullname): Likewise.
6703 (dw2_expand_marked_cus): Likewise.
6704 (dw2_map_symbol_filenames): Likewise.
6705 (create_cus_from_debug_names): Likewise.
6706 (dwarf2_read_debug_names): Likewise.
6707 (dw2_debug_names_iterator::next): Likewise.
6708 (dwarf2_initialize_objfile): Likewise.
6709 (set_partial_user): Likewise.
6710 (dwarf2_build_psymtabs_hard): Likewise.
6711 (read_comp_units_from_section): Remove arguments, adjust to
6713 (create_all_comp_units): Adjust to std::vector and
6714 read_comp_units_from_section changes.
6715 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6717 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6718 (psyms_seen_size): Likewise.
6719 (write_gdbindex): Likewise.
6720 (write_debug_names): Likewise.
6722 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6724 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6725 with dwarf2_per_objfile.
6726 (create_cus_from_index): Likewise.
6727 (create_signatured_type_table_from_index): Likewise.
6728 (dwarf2_read_index): Likewise.
6729 (dwarf2_initialize_objfile): Likewise.
6730 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6731 per_cu rather than get_dwarf2_per_objfile.
6733 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6735 * dwarf2read.h (struct signatured_type): Forward declare.
6736 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6738 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6739 (dw2_get_cutu): ...this.
6740 (dwarf2_per_objfile::get_cu): Rename from...
6741 (dw2_get_cu): ...this.
6742 (dwarf2_per_objfile::get_tu): New.
6743 (create_addrmap_from_index): Adjust.
6744 (create_addrmap_from_aranges): Adjust.
6745 (dw2_find_last_source_symtab): Adjust.
6746 (dw2_map_symtabs_matching_filename): Adjust.
6747 (dw2_symtab_iter_next): Adjust.
6748 (dw2_print_stats): Adjust.
6749 (dw2_expand_all_symtabs): Adjust.
6750 (dw2_expand_symtabs_with_fullname): Adjust.
6751 (dw2_expand_marked_cus): Adjust.
6752 (dw_expand_symtabs_matching_file_matcher): Adjust.
6753 (dw2_map_symbol_filenames): Adjust.
6754 (dw2_debug_names_iterator::next): Adjust.
6755 (dwarf2_initialize_objfile): Adjust.
6756 (set_partial_user): Adjust.
6757 (dwarf2_build_psymtabs_hard): Adjust.
6759 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6761 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6762 Remove unused variables.
6763 (dw2_map_symtabs_matching_filename): Likewise.
6764 (dwarf2_record_block_ranges): Likewise.
6765 (dwarf2_read_addr_index): Likewise.
6766 (follow_die_offset): Likewise.
6768 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6770 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6771 to symbol_file_add_main.
6773 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6776 * mi/mi-console.c (do_fputc_async_safe): New.
6777 (mi_console_file::write_async_safe): New.
6778 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6779 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6781 * ui-file.c (ui_file::putstrn): Adjust call to
6782 fputstrn_unfiltered.
6783 * utils.c (printchar): Replace do_fputs and do_fprintf
6784 parameters by do_fputc.
6785 (fputstr_filtered): Adjust call to printchar.
6786 (fputstr_unfiltered): Likewise.
6787 (fputstrn_filtered): Likewise.
6788 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6790 * utils.h (do_fputc_ftype): New typedef.
6791 (fputstrn_unfiltered): Add do_fputc parameter.
6793 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6795 * regformats/i386/i386-avx.dat: Remove.
6797 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6800 * amd64-tdep.c (amd64_none_init_abi): New function.
6801 (amd64_x32_none_init_abi): New function.
6802 (_initialize_amd64_tdep): Register handlers for x86-64 and
6803 x64_32 with GDB_OSABI_NONE.
6804 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6805 GDB_OSABI_NONE osabi.
6807 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6810 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6812 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6813 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6815 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6817 * common/byte-vector.h (char_vector): New type.
6818 * target.h (target_read_alloc): Return
6819 gdb::optional<byte_vector>.
6820 (target_read_stralloc): Return gdb::optional<char_vector>.
6821 (target_get_osdata): Return gdb::optional<char_vector>.
6822 * target.c (target_read_alloc_1): Templatize. Replacement
6823 manual memory management with vector.
6824 (target_read_alloc): Change return type, adjust.
6825 (target_read_stralloc): Change return type, adjust.
6826 (target_get_osdata): Change return type, adjust.
6827 * auxv.c (struct auxv_info) <length>: Remove.
6828 <data>: Change type to gdb::optional<byte_vector>.
6829 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6830 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6831 (target_auxv_search): Adjust.
6832 (fprint_target_auxv): Adjust.
6833 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6834 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6835 (linux_make_corefile_notes): Adjust.
6836 * osdata.c (get_osdata): Adjust.
6837 * remote.c (remote_get_threads_with_qxfer): Adjust.
6838 (remote_memory_map): Adjust.
6839 (remote_traceframe_info): Adjust.
6840 (btrace_read_config): Adjust.
6841 (remote_read_btrace): Adjust.
6842 (remote_pid_to_exec_file): Adjust.
6843 * solib-aix.c (solib_aix_get_library_list): Adjust.
6844 * solib-dsbt.c (decode_loadmap): Don't free buf.
6845 (dsbt_get_initial_loadmaps): Adjust.
6846 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6847 * solib-target.c (solib_target_current_sos): Adjust.
6848 * tracepoint.c (sdata_make_value): Adjust.
6849 * xml-support.c (xinclude_start_include): Adjust.
6850 (xml_fetch_content_from_file): Adjust.
6851 * xml-support.h (xml_fetch_another): Change return type.
6852 (xml_fetch_content_from_file): Change return type.
6853 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6854 * xml-tdesc.c (file_read_description_xml): Adjust.
6855 (fetch_available_features_from_target): Change return type.
6856 (target_fetch_description_xml): Adjust.
6857 (target_read_description_xml): Adjust.
6859 2018-04-06 Tom Tromey <tom@tromey.com>
6861 * value.c (~value): Update.
6862 (struct value) <contents>: Now unique_xmalloc_ptr.
6863 (value_contents_bits_eq, allocate_value_contents)
6864 (value_contents_raw, value_contents_all_raw)
6865 (value_contents_for_printing, value_contents_for_printing_const)
6866 (set_value_enclosing_type): Update.
6868 2018-04-06 Tom Tromey <tom@tromey.com>
6870 * value.c (range_s): Remove typedef, VEC.
6871 (struct range): Add operator<.
6872 (range_lessthan): Remove.
6873 (ranges_contain): Change type.
6875 (struct value) <unavailable, optimized_out>: Now std::vector.
6876 (value_entirely_available)
6877 (value_entirely_covered_by_range_vector)
6878 (value_entirely_unavailable, value_entirely_optimized_out):
6880 (insert_into_bit_range_vector): Change argument type.
6881 (find_first_range_overlap): Likewise.
6882 (struct ranges_and_idx, value_contents_bits_eq)
6883 (require_not_optimized_out, require_available): Update.
6884 (ranges_copy_adjusted): Change argument types.
6885 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6887 2018-04-06 Tom Tromey <tom@tromey.com>
6889 * value.c (~value): Update.
6890 (struct value) <parent>: Now a value_ref_ptr.
6891 (value_parent, set_value_parent, value_address, value_copy):
6894 2018-04-06 Tom Tromey <tom@tromey.com>
6896 * value.c (struct value): Add constructor, destructor, and member
6898 (allocate_value_lazy, value_decref): Update.
6900 2018-04-06 Tom Tromey <tom@tromey.com>
6902 * value.c (struct value) <released, next>: Remove.
6903 (all_values): Now a std::vector.
6904 (allocate_value_lazy): Update.
6905 (value_next): Remove.
6906 (value_mark, value_free_to_mark, release_value)
6907 (value_release_to_mark): Update.
6909 2018-04-06 Tom Tromey <tom@tromey.com>
6911 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6912 (free_value_chain): Remove.
6913 * value.c (free_value_chain): Remove.
6914 (value_release_to_mark): Return a std::vector.
6915 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6917 (check_condition): Update.
6918 * eval.c (fetch_subexp_value): Change "val_chain" to a
6920 * breakpoint.c (update_watchpoint): Update.
6921 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6923 2018-04-06 Tom Tromey <tom@tromey.com>
6925 * value.h (free_all_values): Remove.
6926 * value.c (free_all_values): Remove.
6928 2018-04-06 Tom Tromey <tom@tromey.com>
6930 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6931 (value_history_chain, value_history_count): Remove.
6932 (value_history): New global.
6933 (record_latest_value, access_value_history, show_values)
6934 (preserve_values): Update.
6936 2018-04-06 Tom Tromey <tom@tromey.com>
6938 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6939 * varobj.c (varobj_set_display_format, varobj_set_value)
6940 (install_default_visualizer, construct_visualizer)
6941 (install_new_value, ~varobj, varobj_get_value_type)
6942 (my_value_of_variable, varobj_editable_p): Update.
6943 * c-varobj.c (c_describe_child, c_value_of_variable)
6944 (cplus_number_of_children, cplus_describe_child): Update.
6945 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6946 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6947 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6949 2018-04-06 Tom Tromey <tom@tromey.com>
6951 * printcmd.c (last_examine_address): Change type to
6953 (do_examine, x_command): Update.
6955 2018-04-06 Tom Tromey <tom@tromey.com>
6957 * value.c (release_value): Update.
6958 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6959 (struct bpstats) <val>: Now a value_ref_ptr.
6960 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6961 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6962 (~watchpoint, print_it_watchpoint, watch_command_1)
6963 (invalidate_bp_value_on_memory_change): Update.
6965 2018-04-06 Tom Tromey <tom@tromey.com>
6967 * varobj.c (varobj_clear_saved_item)
6968 (update_dynamic_varobj_children, install_new_value, ~varobj):
6970 * value.h (value_incref): Move declaration earlier.
6971 (value_decref): Rename from value_free.
6972 (struct value_ref_policy): New.
6973 (value_ref_ptr): New typedef.
6974 (struct value_deleter): Remove.
6975 (gdb_value_up): Remove typedef.
6976 (release_value): Change return type.
6977 (release_value_or_incref): Remove.
6978 * value.c (set_value_parent): Update.
6979 (value_incref): Change return type.
6980 (value_decref): Rename from value_free.
6981 (value_free_to_mark, free_all_values, free_value_chain): Update.
6982 (release_value): Return value_ref_ptr.
6983 (release_value_or_incref): Remove.
6984 (record_latest_value, set_internalvar, clear_internalvar):
6986 * stack.c (info_frame_command): Don't call value_free.
6987 * python/py-value.c (valpy_dealloc, valpy_new)
6988 (value_to_value_object): Update.
6989 * printcmd.c (do_examine): Update.
6990 * opencl-lang.c (lval_func_free_closure): Update.
6991 * mi/mi-main.c (register_changed_p): Don't call value_free.
6992 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6993 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6994 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6996 * guile/scm-value.c (vlscm_free_value_smob)
6997 (vlscm_scm_from_value): Update.
6998 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6999 (frame_unwind_register_unsigned, get_frame_register_bytes)
7000 (put_frame_register_bytes): Don't call value_free.
7001 * findvar.c (address_from_register): Don't call value_free.
7002 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7003 * dwarf2loc.c (entry_data_value_free_closure)
7004 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7005 (dwarf2_evaluate_loc_desc_full): Update.
7006 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7007 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7008 (~watchpoint, watch_command_1)
7009 (invalidate_bp_value_on_memory_change): Update.
7010 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7012 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7015 * warning.m4: Add -Wno-error=deprecated-register.
7016 * configure: Re-generate.
7018 2018-04-05 Tom Tromey <tom@tromey.com>
7020 * linespec.h: Remove include of "vec.h".
7022 2018-04-05 Tom Tromey <tom@tromey.com>
7024 * linespec.c (typep): Remove typedef.
7025 (find_methods, find_superclass_methods): Take a std::vector.
7026 (find_method): Use std::vector.
7028 2018-04-05 Tom Tromey <tom@tromey.com>
7030 * utils.c (compare_strings): Remove.
7031 * utils.h (compare_strings): Remove.
7032 * objc-lang.h (find_imps): Update.
7033 * objc-lang.c (find_methods): Take a std::vector.
7034 (uniquify_strings, find_imps): Likewise.
7035 * linespec.c (find_methods): Take a std::vector.
7036 (decode_objc): Use std::vector.
7037 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7039 (find_method, find_function_symbols): Use std::vector.
7041 2018-04-05 Tom Tromey <tom@tromey.com>
7043 * completer.c (completion_tracker::completion_tracker): Remove
7045 (completion_tracker::discard_completions): Likewise.
7046 * breakpoint.c (ambiguous_names_p): Remove cast.
7047 * ada-lang.c (_initialize_ada_language): Remove cast.
7048 * utils.h (streq): Update.
7049 (streq_hash): Add new declaration.
7050 * utils.c (streq): Return bool.
7051 (streq_hash): New function.
7053 2018-04-05 Tom Tromey <tom@tromey.com>
7055 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7056 Remove a string copy.
7058 2018-04-05 Tom Tromey <tom@tromey.com>
7060 * linespec.c (filter_results): Use std::vector.
7061 (decode_line_2, decode_line_full): Update.
7063 2018-04-05 Tom Tromey <tom@tromey.com>
7065 * linespec.c (canonical_to_fullform): Return std::string.
7066 (filter_results): Update.
7067 (struct decode_line_2_item): Add constructor.
7068 <fullform, displayform>: Now std::string.
7069 (decode_line_2_compare_items): Now a std::sort comparator.
7070 (decode_line_2): Update.
7072 2018-04-05 Tom Tromey <tom@tromey.com>
7074 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7075 (unexpected_linespec_error): Update.
7076 (linespec_parse_basic, parse_linespec): Update.
7078 2018-04-05 Tom Tromey <tom@tromey.com>
7080 * linespec.c (linespec_parse_basic): Reindent.
7082 2018-04-05 Tom Tromey <tom@tromey.com>
7084 * minsyms.h (iterate_over_minimal_symbols): Update.
7085 * minsyms.c (iterate_over_minimal_symbols): Take a
7087 * linespec.c (struct collect_minsyms): Remove.
7088 (compare_msyms): Now a std::sort comparator.
7089 (add_minsym): Add parameters.
7090 (search_minsyms_for_name): Update. Use std::vector.
7092 2018-04-03 Tom Tromey <tom@tromey.com>
7094 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7097 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7099 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7101 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7104 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7105 printing static type.
7107 2018-04-01 Tom Tromey <tom@tromey.com>
7109 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7110 (rs6000_xfer_shared_libraries): Update.
7112 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7114 * common/gdb_vecs.h (char_ptr): Remove.
7115 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7117 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7119 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7121 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7123 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7125 * tracepoint.h (struct uploaded_tp): Initialize fields.
7126 <actions, step_actions, cmd_strings>: Change type to
7127 std::vector<char *>.
7128 * tracepoint.c (get_uploaded_tp): Allocate with new.
7129 (free_uploaded_tps): Free with delete.
7130 (parse_tracepoint_definition): Adjust to std::vector change.
7131 * breakpoint.c (read_uploaded_action): Likewise.
7132 (create_tracepoint_from_upload): Likewise.
7133 * ctf.c (ctf_write_uploaded_tp): Likewise.
7134 (SET_ARRAY_FIELD): Likewise.
7135 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7137 2018-03-30 Tom Tromey <tom@tromey.com>
7139 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7141 (svr4_keep_data_in_core): Update.
7142 (svr4_read_so_list): Update.
7144 2018-03-30 Tom Tromey <tom@tromey.com>
7146 * windows-nat.c (handle_output_debug_string, handle_exception):
7148 * target.h (target_read_string): Update.
7149 * target.c (target_read_string): Change "string" to
7151 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7153 * solib-frv.c (frv_current_sos): Update.
7154 * solib-dsbt.c (dsbt_current_sos): Update.
7155 * solib-darwin.c (darwin_current_sos): Update.
7156 * linux-thread-db.c (inferior_has_bug): Update.
7157 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7158 Update. Remove alloca.
7159 * ada-lang.c (ada_main_name): Update.
7161 2018-03-30 Tom Tromey <tom@tromey.com>
7163 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7164 (struct dwo_file_deleter): New.
7165 (dwo_file_up): New typedef.
7166 (open_and_init_dwo_file): Use dwo_file_up.
7167 (free_dwo_file_cleanup): Remove.
7169 2018-03-30 Tom Tromey <tom@tromey.com>
7171 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7172 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7174 2018-03-30 Tom Tromey <tom@tromey.com>
7176 * dwarf2read.c (class free_cached_comp_units): New class.
7177 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7178 (free_cached_comp_units): Remove function.
7180 2018-03-30 Tom Tromey <tom@tromey.com>
7182 * utils.h (make_cleanup_unpush_target): Remove.
7183 * inf-ptrace.c (struct target_unpusher): New.
7184 (target_unpush_up) New typedef.
7185 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7187 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7189 2018-03-27 Tom Tromey <tom@tromey.com>
7191 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7193 2018-03-27 Pedro Alves <palves@redhat.com>
7194 Tom Tromey <tom@tromey.com>
7196 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7197 destructor. Now a class.
7198 (gdb_readline_wrapper_cleanup): Remove function.
7199 (gdb_readline_wrapper): Remove cleanups.
7201 2018-03-27 Tom Tromey <tom@tromey.com>
7203 * typeprint.h (struct type_print_options) <local_typedefs,
7204 global_typedefs>: Remove "struct" keyword.
7205 (class typedef_hash_table): New class.
7206 (recursively_update_typedef_hash, add_template_parameters)
7207 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7208 (find_typedef_in_hash): Don't declare.
7209 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7210 (typedef_hash_table::recursively_update): Rename from
7211 recursively_update_typedef_hash. Now a member.
7212 (typedef_hash_table::add_template_parameters): Rename from
7213 add_template_parameters. Now a member.
7214 (typedef_hash_table::typedef_hash_table): Now a constructor;
7215 rename from create_typedef_hash.
7216 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7217 rename from free_typedef_hash.
7218 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7219 (do_free_global_table): Remove.
7220 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7221 from copy_type_recursive.
7222 (create_global_typedef_table): Remove.
7223 (typedef_hash_table::find_global_typedef): Now a member of
7225 (typedef_hash_table::find_typedef): Rename from
7226 find_typedef_in_hash; now a member.
7227 (whatis_exp): Update.
7228 * extension.h (struct ext_lang_type_printers): Add constructor and
7230 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7232 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7233 Now a constructor; rename from start_ext_lang_type_printers.
7234 (ext_lang_type_printers): Now a destructor; rename from
7235 free_ext_lang_type_printers.
7236 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7238 (c_type_print_base_struct_union): Update. Remove cleanups.
7240 2018-03-27 Tom Tromey <tom@tromey.com>
7242 * dwarf-index-write.c: Include <cmath>.
7244 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7246 * NEWS: Add entry describing new "set|show varsize-limit" command.
7247 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7249 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7252 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7254 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7256 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7257 * dwarf-index-common.c: New file.
7258 * dwarf-index-common.h: New file.
7259 * dwarf-index-write.c: New file.
7260 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7261 (struct dwarf2_section_info): Move from here.
7262 (dwarf2_section_info_def): Likewise.
7263 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7264 (offset_type): Likewise.
7265 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7266 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7267 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7268 (byte_swap): Likewise.
7269 (MAYBE_SWAP): Likewise.
7270 (dwarf2_per_cu_ptr): Likewise.
7271 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7272 (struct tu_stats): Likewise.
7273 (struct dwarf2_per_objfile): Likewise.
7274 (struct dwarf2_per_cu_data): Likewise.
7275 (struct signatured_type): Likewise.
7276 (sig_type_ptr): Likewise.
7277 (DEF_VEC_P (sig_type_ptr)): Likewise.
7278 (INDEX4_SUFFIX): Likewise.
7279 (INDEX5_SUFFIX): Likewise.
7280 (DEBUG_STR_SUFFIX): Likewise.
7281 (dwarf2_read_section): Make non-static.
7282 (mapped_index_string_hash): Move from here.
7283 (dwarf5_djb_hash): Likewise.
7284 (file_write): Likewise.
7285 (class data_buf): Likewise.
7286 (struct symtab_index_entry): Likewise.
7287 (struct mapped_symtab): Likewise.
7288 (find_slot): Likewise.
7289 (hash_expand): Likewise.
7290 (add_index_entry): Likewise.
7291 (uniquify_cu_indices): Likewise.
7292 (class c_str_view): Likewise.
7293 (class c_str_view_hasher): Likewise.
7294 (class vector_hasher): Likewise.
7295 (write_hash_table): Likewise.
7296 (psym_index_map): Likewise.
7297 (struct addrmap_index_data): Likewise.
7298 (add_address_entry): Likewise.
7299 (add_address_entry_worker): Likewise.
7300 (write_address_map): Likewise.
7301 (symbol_kind): Likewise.
7302 (write_psymbols): Likewise.
7303 (struct signatured_type_index_data): Likewise.
7304 (write_one_signatured_type): Likewise.
7305 (recursively_count_psymbols): Likewise.
7306 (recursively_write_psymbols): Likewise.
7307 (class debug_names): Likewise.
7308 (check_dwarf64_offsets): Likewise.
7309 (psyms_seen_size): Likewise.
7310 (write_gdbindex): Likewise.
7311 (write_debug_names): Likewise.
7312 (assert_file_size): Likewise.
7313 (write_psymtabs_to_index): Likewise.
7314 (save_gdb_index_command): Likewise.
7315 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7317 * dwarf2read.h: New file.
7319 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7322 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7323 symbol name if the CU's language stores symbol names in linkage
7325 * language.h (struct language_defn)
7326 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7327 all instances of this struct.
7329 2018-03-26 Tom Tromey <tom@tromey.com>
7331 * stack.c (backtrace_command_1): Remove verbose code.
7333 2018-03-26 Tom Tromey <tom@tromey.com>
7335 * python/py-framefilter.c (py_print_type): Don't catch
7336 exceptions. Return void.
7337 (py_print_value): Likewise.
7338 (py_print_single_arg): Likewise.
7339 (enumerate_args): Don't catch exceptions.
7340 (py_print_args): Likewise.
7341 (py_print_frame): Likewise.
7342 (gdbpy_apply_frame_filter): Catch exceptions here.
7344 2018-03-26 Tom Tromey <tom@tromey.com>
7346 * stack.c (_initialize_stack): Remove trailing newlines from help
7347 text. Add "Usage" line to "backtrace" help.
7349 2018-03-26 Tom Tromey <tom@tromey.com>
7352 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7354 2018-03-26 Tom Tromey <tom@tromey.com>
7356 * python/py-framefilter.c (py_print_single_arg): Return
7357 EXT_LANG_BT_ERROR from catch.
7359 2018-03-26 Tom Tromey <tom@tromey.com>
7362 * stack.c (backtrace_command_1): Move some code into no-filters
7365 2018-03-26 Tom Tromey <tom@tromey.com>
7367 * python/py-framefilter.c (throw_quit_or_print_exception): New
7369 (gdbpy_apply_frame_filter): Use it.
7371 2018-03-26 Tom Tromey <tom@tromey.com>
7374 * python/py-framefilter.c (py_print_type, py_print_value)
7375 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7378 2018-03-26 Tom Tromey <tom@tromey.com>
7380 * python/py-framefilter.c (enumerate_args): Use
7381 gdb::unique_xmalloc_ptr.
7383 2018-03-26 Tom Tromey <tom@tromey.com>
7385 * python/py-framefilter.c (py_print_frame): Return
7387 (gdbpy_apply_frame_filter): Update comment.
7388 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7390 <EXT_LANG_BT_NO_FILTERS>: Change value.
7392 2018-03-26 Tom Tromey <tom@tromey.com>
7395 * stack.c (backtrace_command): Parse "hide" argument.
7396 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7397 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7400 2018-03-26 Tom Tromey <tom@tromey.com>
7402 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7404 (backtrace_command): Remove "fulltrace", add "flags".
7406 2018-03-26 Tom Tromey <tom@tromey.com>
7408 * stack.c (backtrace_command): Rewrite command line parsing.
7410 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7412 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7414 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7416 * filename-seen-cache.h: Add include guard.
7418 2018-03-26 Keith Seitz <keiths@redhat.com>
7420 * symfile.c (place_section): Remove "struct" from section_addr_info
7422 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7423 "struct" keyword from section_addr_info.
7425 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7427 * regformats/regdef.h (reg): Add constructors.
7429 2018-03-25 Pedro Alves <palves@redhat.com>
7431 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7432 if then/else bodies in var_func_name extraction.
7434 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7436 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7437 lookup_minimal_symbol() to find symbol entry.
7438 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7440 2018-03-23 Keith Seitz <keiths@redhat.com>
7443 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7444 nested type definitions for C++, too.
7446 2018-03-23 Tom Tromey <tom@tromey.com>
7448 * machoread.c (struct oso_el): Add a constructor. Don't define as
7450 (macho_register_oso): Remove.
7451 (macho_symtab_read): Take a std::vector.
7452 (oso_el_compare_name): Now a std::sort comparator.
7453 (macho_symfile_read_all_oso): Take a std::vector.
7454 (macho_symfile_read): Use std::vector. Remove cleanups.
7456 2018-03-22 Tom Tromey <tom@tromey.com>
7458 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7459 (record_full_goto_bookmark): Use std::string.
7461 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7464 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7467 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7469 * rs6000-tdep.c (store_insn_p): New function.
7470 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7471 and cr_reg to their unshifted values. Use store_insn_p to
7472 match LR saves using either R1 or fdata->alloca_reg. Use
7473 store_insn_p to match CR saves. Set alloca_reg_offset
7474 when alloca_reg and framep are set. Remove lr_reg shift
7475 when assigning to fdata->lr_register.
7477 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7479 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7480 command line args instead of emitting a warning.
7482 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7484 * tracepoint.h (struct static_tracepoint_marker): Initialize
7485 fields, define default constructor, move constructor and move
7486 assignment, disable the rest.
7487 <str_id, extra>: Make std::string.
7488 (release_static_tracepoint_marker): Remove.
7489 (free_current_marker): Remove.
7490 * tracepoint.c (free_current_marker): Remove.
7491 (parse_static_tracepoint_marker_definition): Adjust to
7492 std::string, use new hex2str overload.
7493 (release_static_tracepoint_marker): Remove.
7494 (print_one_static_tracepoint_marker): Get marker by reference
7495 and adjust to std::string.
7496 (info_static_tracepoint_markers_command): Adjust to std::vector
7498 * target.h (static_tracepoint_marker_p): Remove typedef.
7499 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7500 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7502 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7504 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7505 (target_debug_print_std_vector_static_tracepoint_marker): New.
7506 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7508 (target_debug_print_static_tracepoint_marker_p): ... this.
7509 * target-delegates.c: Re-generate.
7510 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7512 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7513 (decode_static_tracepoint_spec): Adjust to std::vector.
7514 (tracepoint_print_one_detail): Adjust to std::string.
7515 (strace_marker_decode_location): Adjust to std::string.
7516 (update_static_tracepoint): Adjust to std::string, remove call
7517 to release_static_tracepoint_marker.
7518 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7519 Adjust to std::vector.
7520 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7521 (remote_static_tracepoint_markers_by_strid): Adjust to
7523 * common/rsp-low.h (hex2str): New overload with explicit count
7525 * common/rsp-low.c (hex2str): New overload with explicit count
7527 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7528 (_initialize_rsp_low_selftests): Add test_hex2str test.
7529 * unittests/tracepoint-selftests.c
7530 (test_parse_static_tracepoint_marker_definition): Adjust to
7533 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7535 * tracepoint.c (parse_static_tracepoint_marker_definition):
7536 Consider case where the definition is followed by more
7538 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7539 tracepoint-selftests.c.
7540 * unittests/tracepoint-selftests.c: New.
7542 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7544 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7547 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7549 * symtab.c (find_pc_sect_line): fixed indentation.
7551 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7553 * symtab.c (find_pc_sect_line): now uses binary search.
7555 2018-03-19 Tom Tromey <tom@tromey.com>
7557 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7560 2018-03-19 Pedro Alves <palves@redhat.com>
7561 Tom Tromey <tom@tromey.com>
7563 * unittests/observable-selftests.c: New file.
7564 * common/observable.h: New file.
7565 * observable.h: New file.
7566 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7567 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7568 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7569 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7570 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7571 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7572 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7573 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7574 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7575 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7576 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7577 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7578 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7579 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7580 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7581 tui/tui-interp.c, valops.c: Update all users.
7582 * tui/tui-hooks.c (tui_bp_created_observer)
7583 (tui_bp_deleted_observer, tui_bp_modified_observer)
7584 (tui_inferior_exit_observer, tui_before_prompt_observer)
7585 (tui_normal_stop_observer, tui_register_changed_observer):
7587 (tui_observers_token): New global.
7588 (attach_or_detach, tui_attach_detach_observers): New functions.
7589 (tui_install_hooks, tui_remove_hooks): Use
7590 tui_attach_detach_observers.
7591 * record-btrace.c (record_btrace_thread_observer): Remove.
7592 (record_btrace_thread_observer_token): New global.
7593 * observer.sh: Remove.
7594 * observer.c: Rename to observable.c.
7595 * observable.c (namespace gdb_observers): Define new objects.
7596 (observer_debug): Move into gdb_observers namespace.
7597 (struct observer, struct observer_list, xalloc_observer_list_node)
7598 (xfree_observer_list_node, generic_observer_attach)
7599 (generic_observer_detach, generic_observer_notify): Remove.
7600 (_initialize_observer): Update.
7601 Don't include observer.inc.
7602 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7603 (clean mostlyclean): Likewise.
7604 (observer.h, observer.inc): Remove targets.
7605 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7606 (COMMON_SFILES): Use observable.c, not observer.c.
7607 * .gitignore: Remove observer.h.
7609 2018-03-18 Tom Tromey <tom@tromey.com>
7611 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7613 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7615 2018-03-17 Tom Tromey <tom@tromey.com>
7617 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7619 2018-03-17 Tom Tromey <tom@tromey.com>
7621 * target.c (class scoped_target_fd): New.
7622 (target_fileio_close_cleanup): Remove.
7623 (target_fileio_read_alloc_1): Use scoped_target_fd.
7625 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7627 * silent-rules.mk: New.
7628 * Makefile.in: Include silent-rules.mk
7629 (srcdir, VPATH, top_srcdir): Move up.
7630 (COMPILE): Add ECHO_CXX.
7631 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7632 (init.c): Add ECHO_INIT_C.
7633 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7634 (version.c): Add ECHO_GEN.
7635 (printcmd.o): Add ECHO_CXX.
7636 (target-float.o): Add ECHO_CXX.
7637 (ada-exp.o): Add ECHO_CXX.
7638 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7639 (insight$(EXEEXT)): Add ECHO_CXXLD.
7640 * gnulib/configure.ac: Add AM_SILENT_RULES.
7641 * gnulib/aclocal.m4: Re-generate.
7642 * gnulib/configure: Re-generate.
7643 * gnulib/import/Makefile.in: Re-generate.
7645 2018-03-16 Tom Tromey <tom@tromey.com>
7647 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7648 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7649 * utils.c (do_free_section_addr_info)
7650 (make_cleanup_free_section_addr_info): Remove.
7651 * symfile.h (struct other_sections): Add constructor.
7652 (struct section_addr_info): Remove.
7653 (section_addr_info): New typedef.
7654 (struct sym_fns) <sym_offsets>: Change type of parameter.
7655 (build_section_addr_info_from_objfile)
7656 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7657 (default_symfile_offsets, symbol_file_add)
7658 (symbol_file_add_from_bfd)
7659 (build_section_addr_info_from_section_table): Update.
7660 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7661 * symfile.c (alloc_section_addr_info): Remove.
7662 (build_section_addr_info_from_section_table): Change return type.
7664 (build_section_addr_info_from_bfd)
7665 (build_section_addr_info_from_objfile): Likewise.
7666 (free_section_addr_info): Remove.
7667 (relative_addr_info_to_section_offsets): Change type of "addrs".
7668 (addrs_section_compar): Now a std::sort comparator.
7669 (addrs_section_sort): Change return type.
7670 (addr_info_make_relative): Change type of "addrs". Update.
7671 (default_symfile_offsets, syms_from_objfile_1)
7672 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7673 (symbol_file_add_separate): Update.
7674 (symbol_file_add): Change type of "addrs". Update.
7675 (add_symbol_file_command): Update. Remove cleanups.
7676 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7678 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7679 * solib.c (solib_read_symbols): Update.
7680 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7681 * machoread.c (macho_symfile_offsets): Update.
7682 * jit.c (jit_bfd_try_read_symtab): Update.
7684 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7686 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7687 unittests/utils-selftests.c.
7688 * unittests/utils-selftests.c: New file.
7690 2018-03-14 Tom Tromey <tom@tromey.com>
7693 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7696 2018-03-14 Tom Tromey <tom@tromey.com>
7699 * printcmd.c (printf_pointer): Allow "-" in format.
7701 2018-03-14 Tom Tromey <tom@tromey.com>
7703 * printcmd.c (_initialize_printcmd): Add usage to printf.
7705 2018-03-14 Yao Qi <qiyao@sourceware.org>
7707 * MAINTAINERS: Update my email address.
7709 2018-03-13 Tom Tromey <tom@tromey.com>
7711 * machoread.c (macho_check_dsym): Change filenamep to a
7713 (macho_symfile_read): Update.
7714 * symfile.c (load_command): Use std::string.
7716 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7718 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7719 to error message string.
7720 (riscv_register_name): Use xsnprintf instead of sprintf.
7721 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7723 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7725 (riscv_push_dummy_call): Likewise.
7727 2018-03-12 Tom Tromey <tom@tromey.com>
7729 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7730 Use gdb::byte_vector.
7731 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7733 2018-03-12 Yao Qi <yao.qi@linaro.org>
7735 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7736 parameter type to readable_regcache.
7737 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7740 2018-03-11 Tom Tromey <tom@tromey.com>
7742 * dwarf2read.c (struct nextfield): Add initializers.
7743 (struct nextfnfield): Remove.
7744 (struct fnfieldlist): Add initializers. Remove "length" and
7745 "head", use std::vector.
7746 (struct decl_field_list): Remove.
7747 (struct field_info): Add initializers.
7748 <fields, baseclasses>: Now std::vector.
7749 <nbaseclasses, nfnfields, typedef_field_list_count,
7750 nested_types_list_count>: Remove.
7751 (dwarf2_add_field, dwarf2_add_type_defn)
7752 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7753 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7754 (process_structure_scope): Update.
7756 2018-03-11 Tom Tromey <tom@tromey.com>
7758 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7759 for use by std::sort.
7760 (build_type_psymtabs_1): Use std::vector.
7762 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7764 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7765 and LIBMPFR in the printed configuration.
7767 2018-03-08 Tom Tromey <tom@tromey.com>
7769 * source.c (get_filename_and_charpos): Use scoped_fd.
7770 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7771 (procfs_pidlist): Likewise.
7772 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7773 (iterate_over_mappings): Likewise.
7775 2018-03-08 Tom Tromey <tom@tromey.com>
7777 * infcall.c (struct call_return_meta_info)
7778 <stack_temporaries_enabled>: Remove.
7779 (get_call_return_value, call_function_by_hand_dummy): Update.
7780 * thread.c (disable_thread_stack_temporaries): Remove.
7781 (enable_thread_stack_temporaries): Remove.
7782 (thread_stack_temporaries_enabled_p): Return bool.
7783 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7784 (get_last_thread_stack_temporary): Update.
7785 * eval.c (evaluate_subexp): Update.
7786 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7787 class, not a function.
7788 (value_ptr, value_vec): Remove typedefs.
7789 (class thread_info) <stack_temporaries_enabled>: Now bool.
7790 <stack_temporaries>: Now a std::vector.
7791 (thread_stack_temporaries_enabled_p)
7792 (value_in_thread_stack_temporaries): Return bool.
7794 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7796 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7797 (getpkt_or_notif_sane_1): Likewise.
7799 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7801 * build-id.c (build_id_to_debug_bfd): Use std::string.
7803 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7805 * build-id.c (find_separate_debug_file_by_buildid): Return
7807 * build-id.h (find_separate_debug_file_by_buildid): Return
7809 * coffread.c (coff_symfile_read): Adjust to std::string.
7810 * elfread.c (elf_symfile_read): Adjust to std::string.
7811 * symfile.c (separate_debug_file_exists): Change parameter to
7813 (find_separate_debug_file): Return std::string.
7814 (find_separate_debug_file_by_debuglink): Return std::string.
7815 * symfile.h (find_separate_debug_file_by_debuglink): Return
7818 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7820 * common/xml-utils.c (xml_escape_text): Move code to...
7821 (xml_escape_text_append): ... this new function.
7822 * common/xml-utils.h (xml_escape_text_append): New declaration.
7823 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7825 (_initialize_xml_utils): register test_xml_escape_text_append as
7828 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7830 * defs.h: Remove MAX_REGISTER_SIZE.
7831 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7833 * python/py-unwind.c (pyuw_sniffer): Likewise.
7835 2018-03-07 Tom Tromey <tom@tromey.com>
7837 * linux-tdep.c (linux_info_proc): Update.
7838 * target.h (struct target_ops) <to_fileio_readlink>: Return
7840 (target_fileio_readlink): Return optional<string>.
7841 * remote.c (remote_hostio_readlink): Return optional<string>.
7842 * inf-child.c (inf_child_fileio_readlink): Return
7844 * target.c (target_fileio_readlink): Return optional<string>.
7846 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7848 * regcache.c (cooked_read_test): Add riscv to the list of
7849 architectures that have a save_reggroup.
7851 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7853 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7854 value is not a dynamic class object.
7856 2018-03-06 Tom Tromey <tom@tromey.com>
7858 * rust-exp.y: Formatting fixes.
7860 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7862 * riscv-tdep.c (riscv_register_name): Remove target description
7864 (riscv_gdbarch_init): Remove target description check.
7866 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7868 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7870 * riscv-tdep.h: Likewise.
7872 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7874 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7875 (riscv_pseudo_register_write): Delete.
7876 (riscv_gdbarch_init): Remove all use of pseudo registers.
7878 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7880 * record-btrace.c (btrace_print_lines): Replace cleanup
7881 parameter with RAII equivalents.
7882 (btrace_insn_history): Replace cleanup with RAII equivalents.
7883 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7884 make_cleanup_ui_out_tuple_begin_end): Remove.
7885 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7886 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7887 make_cleanup_ui_out_list_begin_end): Remove.
7889 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7891 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7892 parameter types to std::vector. Use bool.
7893 (record_btrace_wait): Replace VEC(tp_t) with
7894 std::vector<thread_info *>.
7895 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7897 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7899 * record-btrace.c (record_btrace_disable_callback): Remove.
7900 (struct scoped_btrace_disable): New.
7901 (record_btrace_open): Use scoped_btrace_disable.
7903 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7905 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7906 reading values from registers.
7908 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7910 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7913 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7915 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7916 change parameter type. Use GDB's print functions, and use
7917 core_addr_to_string where appropriate.
7918 (riscv_push_dummy_call): Use core_addr_to_string where
7919 appropriate, update call to riscv_print_arg_location, and reindent
7921 (riscv_return_value): Update call to riscv_print_arg_location.
7923 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7924 Tim Newsome <tim@sifive.com>
7925 Albert Ou <a0u@eecs.berkeley.edu>
7926 Darius Rad <darius@bluespec.com>
7928 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7929 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7930 (ALLDEPFILES): Add riscv-tdep.c
7931 * configure.tgt: Add riscv support.
7932 * riscv-tdep.c: New file.
7933 * riscv-tdep.h: New file.
7934 * NEWS: Mention new target.
7935 * MAINTAINERS: Add entry for riscv.
7937 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7939 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7940 fields within aggregates.
7942 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7944 * record-btrace.c (btrace_print_lines): Change type of flags to
7945 gdb_disassembly_flags.
7947 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7949 * fbsd-nat.c: Include "inf-ptrace.h".
7950 (USE_SIGTRAP_SIGINFO): Conditionally define.
7951 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7952 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7953 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7955 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7957 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7959 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7960 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7961 "supports_stopped_by_hw_breakpoint" target methods.
7963 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7965 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7966 * fbsd-nat.c (debug_fbsd_nat): New variable.
7967 (show_fbsd_nat_debug): New function.
7968 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7969 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7971 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7973 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7974 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7976 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7977 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7980 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7982 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7983 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7985 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7987 * charset.c (struct charset_vector): New.
7988 (charsets): Change type to charset_vector.
7989 (find_charset_names): Adjust.
7991 (_initialize_charset): Adjust.
7993 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7995 * progspace.h (struct program_space) <deleted_solibs>: Change
7996 type to std::vector<std::string>.
7997 * progspace.c (clear_program_space_solib_cache): Adjust.
7998 * breakpoint.c (print_solib_event): Adjust.
7999 (check_status_catch_solib): Adjust.
8000 * solib.c (update_solib_list): Adjust.
8001 * ui-out.h (class ui_out) <field_string>: New overload.
8002 * ui-out.c (ui_out::field_string): New overload.
8004 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8006 * progspace.h (struct program_space): Add constructor and
8007 destructor, initialize fields.
8008 (add_program_space): Remove.
8009 * progspace.c (add_program_space): Rename to...
8010 (program_space::program_space): ... this.
8011 (release_program_space): Rename to...
8012 (program_space::~program_space): ... this.
8013 (delete_program_space): Use delete to delete program_space.
8014 (initialize_progspace): Use new to allocate program_space.
8015 * inferior.c (add_inferior_with_spaces): Likewise.
8016 (clone_inferior_command): Likewise.
8017 * infrun.c (follow_fork_inferior): Likewise.
8018 (handle_vfork_child_exec_or_exit): Likewise.
8020 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8022 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8023 (delim_string_to_char_ptr_vec): Return std::vector of
8024 gdb::unique_xmalloc_ptr.
8025 (dirnames_to_char_ptr_vec_append): Take std::vector of
8026 gdb::unique_xmalloc_ptr.
8027 (dirnames_to_char_ptr_vec): Return std::vector of
8028 gdb::unique_xmalloc_ptr.
8029 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8030 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8031 (delim_string_to_char_ptr_vec): Return an std::vector of
8032 gdb::unique_xmalloc_ptr, adjust the code.
8033 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8034 gdb::unique_xmalloc_ptr, adjust the code.
8035 (dirnames_to_char_ptr_vec): Return an std::vector of
8036 gdb::unique_xmalloc_ptr, adjust the code.
8037 * auto-load.c (auto_load_safe_path_vec): Change type to
8038 std::vector of gdb::unique_xmalloc_ptr.
8039 (auto_load_expand_dir_vars): Return an std::vector of
8040 gdb::unique_xmalloc_ptr, adjust the code.
8041 (auto_load_safe_path_vec_update): Adjust.
8042 (filename_is_in_auto_load_safe_path_vec): Adjust.
8043 (auto_load_objfile_script_1): Adjust.
8044 * build-id.c (build_id_to_debug_bfd): Adjust.
8045 * linux-thread-db.c (thread_db_load_search): Adjust.
8046 * source.c (add_path): Adjust.
8048 * symfile.c (find_separate_debug_file): Adjust.
8049 * utils.c (do_free_char_ptr_vec): Remove.
8050 (make_cleanup_free_char_ptr_vec): Remove.
8052 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8055 * common/pathstuff.c: Conditionally include "<windows.h>".
8057 2018-03-01 Georg Sauthoff <mail@georg.so>
8060 * gcore.in: Quote variables and switch interpreter to bash.
8062 2018-03-01 Tom Tromey <tom@tromey.com>
8064 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8065 assertion. Add assertion for discriminant_index.
8066 (quirk_rust_enum): Use correct base type name in univariant case.
8068 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8070 * record.c (get_call_history_modifiers): Return a
8072 (cmd_record_call_history): Adjust.
8073 * record-btrace.c (record_btrace_call_history): Adjust.
8074 (record_btrace_call_history_range): Adjust.
8075 (record_btrace_call_history_from): Adjust.
8076 * target-debug.h (target_debug_print_record_print_flags): New.
8077 * target-delegates.c: Re-generate.
8078 * target.c (target_call_history): Change flags type.
8079 (target_call_history_from): Likewise.
8080 (target_call_history_range): Likewise.
8081 * target.h (struct target_ops) <target_call_history>: Likewise.
8082 (target_call_history_from): Likewise.
8083 (target_call_history_range): Likewise.
8085 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8086 Simon Marchi <simon.marchi@polymtl.ca>
8088 * common/common-utils.c: Include "sys/stat.h".
8089 (is_regular_file): Move here from "source.c"; change return
8091 * common/common-utils.h (is_regular_file): New prototype.
8092 * common/pathstuff.c (contains_dir_separator): New function.
8093 * common/pathstuff.h (contains_dir_separator): New prototype.
8094 * source.c: Don't include "sys/stat.h".
8095 (is_regular_file): Move to "common/common-utils.c".
8097 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8099 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8100 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8101 * auto-load.c: Include "common/pathstuff.h".
8102 * common/common-def.h (current_directory): Move here.
8103 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8105 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8107 * common/pathstuff.c: New file.
8108 * common/pathstuff.h: New file.
8109 * compile/compile.c: Include "common/pathstuff.h".
8110 * defs.h (current_directory): Move to "common/common-defs.h".
8111 * dwarf2read.c: Include "common/pathstuff.h".
8113 * guile/scm-safe-call.c: Likewise.
8114 * linux-thread-db.c: Likewise.
8116 * nto-tdep.c: Likewise.
8117 * objfiles.c: Likewise.
8118 * source.c: Likewise.
8119 * symtab.c: Likewise.
8120 * utils.c: Include "common/pathstuff.h".
8121 (gdb_realpath): Move to "common/pathstuff.c".
8122 (gdb_realpath_keepfile): Likewise.
8123 (gdb_abspath): Likewise.
8124 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8125 (gdb_realpath_keepfile): Likewise.
8126 (gdb_abspath): Likewise.
8128 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8130 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8131 wildcard process pid for super_resume for kernels with a
8134 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8136 * compile/compile.c (get_args): Add additional comments
8137 explaining function.
8139 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8140 Tom Tromey <tom@tromey.com>
8142 * target.h (memory_write_request_s): Remove typedef. Don't define
8144 (target_write_memory_blocks): Change argument to std::vector.
8145 (struct memory_write_request): Add constructor.
8146 * target-memory.c (compare_block_starting_address): Return bool.
8147 Change argument types.
8148 (claim_memory): Change arguments to use std::vector.
8149 (split_regular_and_flash_blocks, blocks_to_erase)
8150 (compute_garbled_blocks): Likewise.
8151 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8152 (target_write_memory_blocks): Change argument to std::vector.
8153 * symfile.c (struct load_section_data): Add constructor and
8154 destructor. Use std::vector for "requests".
8155 (struct load_progress_data): Add initializers.
8156 (load_section_callback): Update. Use "new".
8157 (clear_memory_write_data): Remove.
8158 (generic_load): Update.
8160 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8162 * arch/aarch64.h: Use common/tdesc.h.
8164 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8166 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8167 architecture with a 64-bit ABI.
8169 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8171 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8172 ahead of target description loading.
8174 2018-02-26 Tom Tromey <tom@tromey.com>
8176 * stack.c (backtrace_command_1): Update.
8177 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8179 * python/py-framefilter.c (py_print_frame)
8180 (gdbpy_apply_frame_filter): Change type of "flags".
8181 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8183 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8184 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8185 * extension.h (enum frame_filter_flag): Rename from
8187 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8188 (apply_ext_lang_frame_filter): Change type of "flags".
8189 * extension.c (apply_ext_lang_frame_filter): Change type of
8191 * extension-priv.h (struct extension_language_ops)
8192 <apply_frame_filter>: Change type of "flags".
8194 2018-02-26 Tom Tromey <tom@tromey.com>
8197 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8198 off-by-one in py_end computation.
8199 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8201 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8204 2018-02-26 Tom Tromey <tom@tromey.com>
8206 * dwarf2read.c (struct variant_field): New.
8207 (struct nextfield) <variant>: New field.
8208 (dwarf2_add_field): Handle DW_TAG_variant_part.
8209 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8210 discriminated union.
8211 (read_structure_type): Handle DW_TAG_variant_part.
8212 (handle_struct_member_die): New function, extracted from
8213 process_structure_scope. Handle DW_TAG_variant.
8214 (process_structure_scope): Handle discriminated unions. Call
8215 handle_struct_member_die.
8217 2018-02-26 Tom Tromey <tom@tromey.com>
8219 * rust-lang.h (rust_last_path_segment): Declare.
8220 * rust-lang.c (rust_last_path_segment): Now public. Change
8222 (struct disr_info): Remove.
8223 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8224 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8225 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8226 (rust_enum_p, rust_enum_variant): New function.
8227 (rust_underscore_fields): Remove "offset" parameter.
8228 (rust_print_enum): New function.
8229 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8230 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8231 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8233 (rust_internal_print_type): New function, from rust_print_type.
8235 (rust_print_type): Call rust_internal_print_type.
8236 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8237 Update enum handling.
8238 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8239 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8240 (rust_union_quirks): New functions.
8241 (process_full_comp_unit, process_full_type_unit): Call
8243 (process_structure_scope): Update rust_unions if necessary.
8245 2018-02-26 Tom Tromey <tom@tromey.com>
8247 * value.h (value_union_variant): Declare.
8248 * valops.c (value_union_variant): New function.
8249 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8250 (struct discriminant_info): New.
8251 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8253 (struct main_type) <flag_discriminated_union>: New field.
8255 2018-02-26 Tom Tromey <tom@tromey.com>
8257 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8258 unittests/unpack-selftests.c.
8259 * unittests/unpack-selftests.c: New file.
8260 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8262 2018-02-26 Yao Qi <yao.qi@linaro.org>
8264 * dwarf2read.c (struct partial_die_info) <read>: New method.
8265 (read_partial_die): Remove the declaration.
8266 (load_partial_dies): Update.
8267 (partial_die_info::partial_die_info):
8268 (read_partial_die): Change it to partial_die_info::read.
8270 2018-02-26 Yao Qi <yao.qi@linaro.org>
8272 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8273 (fixup_partial_die): Remove declaration.
8274 (scan_partial_symbols): Update.
8275 (partial_die_parent_scope): Likewise.
8276 (partial_die_full_name): Likewise.
8277 (fixup_partial_die): Change it to partial_die_info::fixup.
8279 2018-02-26 Yao Qi <yao.qi@linaro.org>
8281 * dwarf2read.c (read_partial_die): Update the declaration.
8282 (load_partial_dies): Caller update.
8283 (read_partial_die): Remove one argument abbrev_len.
8285 2018-02-26 Yao Qi <yao.qi@linaro.org>
8287 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8288 assignment operator.
8289 (load_partial_dies): Use ctor and copy ctor.
8290 (read_partial_die): Update.
8291 (dwarf2_cu::find_partial_die): Use ctor.
8293 2018-02-26 Yao Qi <yao.qi@linaro.org>
8295 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8296 (find_partial_die_in_comp_unit): Change it to
8297 dwarf2_cu::find_partial_die.
8298 (find_partial_die): Update.
8300 2018-02-26 Yao Qi <yao.qi@linaro.org>
8302 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8305 2018-02-26 Yao Qi <yao.qi@linaro.org>
8307 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8309 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8311 * arch/amd64.h: Use common/tdesc.h.
8312 * arch/i386.c: Likewise.
8313 * arch/i386.h: Likewise.
8314 * arch/tic6x.c: Likewise.
8315 * arch/tdesc.h: Move file from here...
8316 * common/tdesc.h: ...to here.
8317 * features/aarch64-core.c: Regenerate.
8318 * features/aarch64-fpu.c: Regenerate.
8319 * features/i386/32bit-avx.c: Regenerate.
8320 * features/i386/32bit-avx512.c: Regenerate.
8321 * features/i386/32bit-core.c: Regenerate.
8322 * features/i386/32bit-linux.c: Regenerate.
8323 * features/i386/32bit-mpx.c: Regenerate.
8324 * features/i386/32bit-pkeys.c: Regenerate.
8325 * features/i386/32bit-sse.c: Regenerate.
8326 * features/i386/64bit-avx.c: Regenerate.
8327 * features/i386/64bit-avx512.c: Regenerate.
8328 * features/i386/64bit-core.c: Regenerate.
8329 * features/i386/64bit-linux.c: Regenerate.
8330 * features/i386/64bit-mpx.c: Regenerate.
8331 * features/i386/64bit-pkeys.c: Regenerate.
8332 * features/i386/64bit-segments.c: Regenerate.
8333 * features/i386/64bit-sse.c: Regenerate.
8334 * features/i386/x32-core.c: Regenerate.
8335 * features/tic6x-c6xp.c: Regenerate.
8336 * features/tic6x-core.c: Regenerate.
8337 * features/tic6x-gp.c: Regenerate.
8338 * target-descriptions.c: Use common/tdesc.h.
8339 * target-descriptions.h: Likewise.
8341 2018-02-24 Tom Tromey <tom@tromey.com>
8343 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8344 (try_thread_db_load_from_dir, thread_db_load_search): Use
8346 (info_auto_load_libthread_db_compare): Return bool. Change
8348 (info_auto_load_libthread_db): Use std::vector, std::string.
8351 2018-02-24 Tom Tromey <tom@tromey.com>
8353 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8355 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8357 * gdbarch.c: Rebuild.
8358 * gdbarch.h: Rebuild.
8359 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8360 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8361 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8364 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8366 * gdbtypes.h (sect_offset): Change type to uint64_t.
8367 (sect_offset_str): New function.
8368 * dwarf2read.c (create_addrmap_from_aranges): Use
8370 (error_check_comp_unit_head): Likewise.
8371 (create_debug_type_hash_table): Likewise.
8372 (read_cutu_die_from_dwo): Likewise.
8373 (init_cutu_and_read_dies): Likewise.
8374 (init_cutu_and_read_dies_no_follow): Likewise.
8375 (process_psymtab_comp_unit_reader): Likewise.
8376 (partial_die_parent_scope): Likewise.
8377 (peek_die_abbrev): Likewise.
8378 (process_queue): Likewise.
8379 (dwarf2_physname): Likewise.
8380 (read_namespace_alias): Likewise.
8381 (read_import_statement): Likewise.
8382 (create_dwo_cu_reader): Likewise.
8383 (create_cus_hash_table): Likewise.
8384 (lookup_dwo_cutu): Likewise.
8385 (inherit_abstract_dies): Likewise.
8386 (read_func_scope): Likewise.
8387 (read_call_site_scope): Likewise.
8388 (dwarf2_add_member_fn): Likewise.
8389 (read_common_block): Likewise.
8390 (read_module_type): Likewise.
8391 (read_typedef): Likewise.
8392 (read_subrange_type): Likewise.
8393 (load_partial_dies): Likewise.
8394 (read_partial_die): Likewise.
8395 (find_partial_die): Likewise.
8396 (read_str_index): Likewise.
8397 (dwarf2_string_attr): Likewise.
8398 (build_error_marker_type): Likewise.
8399 (lookup_die_type): Likewise.
8400 (dump_die_shallow): Likewise.
8401 (follow_die_ref): Likewise.
8402 (dwarf2_fetch_die_loc_sect_off): Likewise.
8403 (dwarf2_fetch_constant_bytes): Likewise.
8404 (follow_die_sig): Likewise.
8405 (get_signatured_type): Likewise.
8406 (get_DW_AT_signature_type): Likewise.
8407 (dwarf2_find_containing_comp_unit): Likewise.
8408 (set_die_type): Likewise.
8410 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8412 * arch/aarch64.c: Include "common-defs.h".
8413 * arch/amd64.c: Likewise.
8414 * arch/i386.c: Likewise.
8416 2018-02-21 Tom Tromey <tom@tromey.com>
8418 * value.h: (extract_field_op): Update.
8419 * eval.c (extract_field_op): Return a const char *.
8420 * expression.h (parse_expression_for_completion): Update.
8421 * completer.c (complete_expression): Update.
8422 (add_struct_fields): Make fieldname const.
8423 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8424 (mark_completion_tag, parse_exp_in_context_1): Update.
8425 (parse_expression_for_completion): Change "name" to
8426 unique_xmalloc_ptr*.
8428 2018-02-21 Tom Tromey <tom@tromey.com>
8430 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8432 2018-02-21 Yao Qi <yao.qi@linaro.org>
8434 * avr-tdep.c (avr_read_pc): Change parameter type to
8436 * gdbarch.sh (read_pc): Likewise.
8437 * gdbarch.c: Re-generated.
8438 * gdbarch.h: Re-generated.
8439 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8441 * ia64-tdep.c (ia64_read_pc): Likewise.
8442 * mips-tdep.c (mips_read_pc): Likewise.
8443 * spu-tdep.c (spu_read_pc): Likewise.
8445 2018-02-21 Yao Qi <yao.qi@linaro.org>
8447 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8448 * regcache-dump.c: New file.
8449 * regcache.c: Move register_dump to regcache-dump.c.
8450 (maintenance_print_registers): Likewise.
8451 (maintenance_print_raw_registers): Likewise.
8452 (maintenance_print_cooked_registers): Likewise.
8453 (maintenance_print_register_groups): Likewise.
8454 (maintenance_print_remote_registers): Likewise.
8455 (_initialize_regcache): Likewise.
8456 * regcache.h (register_dump): Moved from regcache.c.
8458 2018-02-21 Yao Qi <yao.qi@linaro.org>
8460 * regcache.c (regcache::regcache): Update.
8461 (regcache::invalidate): Move it to detached_regcache::invalidate.
8462 (get_thread_arch_aspace_regcache): Update.
8463 (regcache::raw_update): Update.
8464 (regcache::cooked_read): Remove some code.
8465 (regcache::cooked_read_value): Likewise.
8466 (regcache::raw_write): Remove assert on m_readonly_p.
8467 (regcache::raw_supply_integer): Move it to
8468 detached_regcache::raw_supply_integer.
8469 (regcache::raw_supply_zeroed): Likewise.
8470 * regcache.h (detached_regcache) <raw_supply_integer>: New
8472 <raw_supply_zeroed, invalidate>: Likewise.
8473 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8474 <invalidate>: Likewise.
8475 <m_readonly_p>: Removed.
8477 2018-02-21 Yao Qi <yao.qi@linaro.org>
8479 * infcmd.c (get_return_value): Let stop_regs point to
8480 get_current_regcache.
8481 * regcache.c (regcache::regcache): Remove.
8482 (register_dump_reg_buffer): New class.
8483 (regcache_print): Adjust.
8484 * regcache.h (regcache): Remove constructors.
8486 2018-02-21 Yao Qi <yao.qi@linaro.org>
8488 * regcache.c (class register_dump): New class.
8489 (register_dump_regcache, register_dump_none): New class.
8490 (register_dump_remote, register_dump_groups): New class.
8491 (regcache_print): Update.
8492 * regcache.h (regcache_dump_what): Move it to regcache.c.
8493 (regcache) <dump>: Remove.
8495 2018-02-21 Yao Qi <yao.qi@linaro.org>
8497 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8499 (jit_unwind_reg_set_impl): Call raw_supply.
8500 (jit_frame_sniffer): Use reg_buffer_rw.
8501 * record-full.c (record_full_core_regbuf): Change its type.
8502 (record_full_core_open_1): Use reg_buffer_rw.
8503 (record_full_close): Likewise.
8504 (record_full_core_fetch_registers): Use regcache->raw_supply.
8505 (record_full_core_store_registers): Likewise.
8506 * regcache.c (regcache::get_register_status): Move it to
8508 (regcache_raw_set_cached_value): Remove.
8509 (regcache::raw_set_cached_value): Remove.
8510 (regcache::raw_write): Call raw_supply.
8511 (regcache::raw_supply): Move it to reg_buffer_rw.
8512 * regcache.h (regcache_raw_set_cached_value): Remove.
8513 (reg_buffer_rw): New class.
8515 2018-02-21 Yao Qi <yao.qi@linaro.org>
8517 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8518 readonly_detached_regcache.
8519 (dummy_frame_prev_register): Use regcache->cooked_read.
8520 * frame.c (frame_save_as_regcache): Change return type.
8521 (frame_pop): Update.
8522 * frame.h (frame_save_as_regcache): Update declaration.
8523 * inferior.h (get_infcall_suspend_state_regcache): Update
8525 * infrun.c (infcall_suspend_state) <registers>: use
8526 readonly_detached_regcache.
8527 (save_infcall_suspend_state): Don't use regcache_dup.
8528 (get_infcall_suspend_state_regcache): Change return type.
8529 * linux-fork.c (struct fork_info) <savedregs>: Change to
8530 readonly_detached_regcache.
8532 (fork_save_infrun_state): Don't use regcache_dup.
8533 (info_checkpoints_command): Adjust.
8534 * mi/mi-main.c (register_changed_p): Update declaration.
8535 (mi_cmd_data_list_changed_registers): Use
8536 readonly_detached_regcache.
8537 (register_changed_p): Change parameter type to
8538 readonly_detached_regcache.
8539 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8540 readonly_detached_regcache.
8541 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8542 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8544 (regcache::save): Move it to reg_buffer.
8545 (regcache::restore): Change parameter type.
8546 (regcache_dup): Remove.
8547 * regcache.h (reg_buffer) <save>: New method.
8548 (readonly_detached_regcache): New class.
8549 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8550 readonly_detached_regcache.
8551 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8553 2018-02-21 Yao Qi <yao.qi@linaro.org>
8555 * frame.c (frame_save_as_regcache): Use regcache method save.
8556 (frame_pop): Use regcache method restore.
8557 * infrun.c (restore_infcall_suspend_state): Likewise.
8558 * linux-fork.c (fork_load_infrun_state): Likewise.
8559 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8561 * regcache.c (regcache_save): Remove.
8562 (regcache::restore): More asserts.
8563 (regcache_cpy): Remove.
8564 * regcache.h (regcache_save): Remove the declaration.
8565 (regcache::restore): Move from private to public.
8566 Remove the friend declaration of regcache_cpy.
8567 (regcache_cpy): Remove declaration.
8569 2018-02-21 Yao Qi <yao.qi@linaro.org>
8571 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8572 parameter type to 'readable_regcache *'.
8573 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8574 * arm-tdep.c (arm_neon_quad_read): Likewise.
8575 (arm_pseudo_read): Likewise.
8576 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8577 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8578 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8579 * gdbarch.c: Re-generated.
8580 * gdbarch.h: Re-generated.
8581 * gdbarch.sh (pseudo_register_read): Change parameter type to
8582 'readable_regcache *'.
8583 (pseudo_register_read_value): Likewise.
8584 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8585 (h8300_pseudo_register_read): Likewise.
8586 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8587 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8588 (i386_pseudo_register_read_into_value): Likewise.
8589 (i386_pseudo_register_read_value): Likewise.
8590 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8592 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8593 * m32c-tdep.c (m32c_raw_read): Likewise.
8594 (m32c_read_flg): Likewise.
8595 (m32c_banked_register): Likewise.
8596 (m32c_banked_read): Likewise.
8597 (m32c_sb_read): Likewise.
8598 (m32c_part_read): Likewise.
8599 (m32c_cat_read): Likewise.
8600 (m32c_r3r2r1r0_read): Likewise.
8601 (m32c_pseudo_register_read): Likewise.
8602 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8603 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8604 (mep_pseudo_cr64_read): Likewise.
8605 (mep_pseudo_register_read): Likewise.
8606 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8607 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8608 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8609 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8610 (regcache::cooked_read): Likewise.
8611 (regcache::cooked_read_value): Likewise.
8612 (regcache_cooked_read_signed):
8613 (regcache::cooked_read): Likewise.
8614 * regcache.h (readable_regcache): New class.
8615 (regcache): Inherit readable_regcache. Move some methods to
8617 * rl78-tdep.c (rl78_pseudo_register_read): Change
8618 parameter type to 'readable_regcache *'.
8619 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8620 (e500_pseudo_register_read): Change parameter type to
8621 'readable_regcache *'.
8622 (dfp_pseudo_register_read): Likewise.
8623 (vsx_pseudo_register_read): Likewise.
8624 (efpr_pseudo_register_read): Likewise.
8625 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8626 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8627 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8628 (sh64_pseudo_register_read): Likewise.
8629 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8630 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8631 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8632 (spu_pseudo_register_read): Likewise.
8633 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8634 (xtensa_pseudo_register_read): Likewise.
8636 2018-02-21 Yao Qi <yao.qi@linaro.org>
8638 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8639 (regcache::arch): Move it to reg_buffer::arch.
8640 (regcache::register_buffer): Likewise.
8641 (regcache::assert_regnum): Likewise.
8642 (regcache::num_raw_registers): Likewise.
8643 * regcache.h (reg_buffer): New class.
8644 (regcache): Inherit reg_buffer.
8646 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8648 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8649 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8651 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8653 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8655 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8657 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8658 (SFILES): Remove common/*.c files.
8659 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8660 * common/common.host: Add common reference.
8661 * configure.ac: Likewise.
8662 * configure: Regenerate.
8664 2018-02-16 Yao Qi <yao.qi@linaro.org>
8666 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8667 (block_initialize_namespace): Use new.
8668 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8669 (dwarf2_free_objfile): Use delete.
8670 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8671 (copy_type_recursive): Use new.
8672 * gdb_obstack.h (allocate_on_obstack): New.
8674 2018-02-15 Yao Qi <yao.qi@linaro.org>
8677 * inferior.c (exit_inferior_1): Reset inf->control.
8679 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8681 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8684 2018-02-14 Pedro Alves <palves@redhat.com>
8686 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8687 frame_cleanup_after_sniffer on exception.
8689 2018-02-14 Tom Tromey <tom@tromey.com>
8691 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8693 (solib_bfd_open): Make pathname const.
8694 * solib.c (solib_bfd_open): Make pathname const.
8695 * solib-spu.c (spu_bfd_fopen): Make name const.
8696 (spu_bfd_open): Make pathname const.
8697 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8698 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8700 2018-02-14 Tom Tromey <tom@tromey.com>
8702 * symfile.c (symfile_bfd_open): Update.
8703 * source.h (openp, source_full_path_of, find_and_open_source):
8704 Change argument type to unique_xmalloc_ptr.
8705 * source.c (openp): Take a unique_xmalloc_ptr.
8706 (source_full_path_of, find_and_open_source): Likewise.
8707 (open_source_file, symtab_to_fullname): Update.
8708 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8710 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8711 (exec_file_find): Update.
8712 * psymtab.c (psymtab_to_fullname): Update.
8713 * nto-tdep.h (nto_find_and_open_solib): Update.
8714 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8716 * exec.c (exec_file_attach): Update.
8717 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8718 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8720 2018-02-14 Tom Tromey <tom@tromey.com>
8722 * solib.c: Include source.h.
8723 * nto-tdep.c: Include source.h.
8724 * mi/mi-cmd-env.c: Include source.h.
8725 * infcmd.c: Include source.h.
8726 * exec.c: Include source.h.
8727 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8728 (add_path, directory_switch, source_path, init_source_path): Move
8730 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8731 (add_path, directory_switch, source_path, init_source_path):
8734 2018-02-14 Tom Tromey <tom@tromey.com>
8736 * solist.h (exec_file_find, solib_find): Return
8738 (solib_bfd_fopen): Take a const char *.
8739 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8740 (exec_file_find, solib_find): Likewise.
8741 (solib_bfd_fopen): Do not take ownership of "pathname".
8742 (solib_bfd_open): Use unique_xmalloc_ptr.
8743 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8744 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8745 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8746 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8748 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8750 * ada-lang.c (name_match_type_from_name): Remove reference to
8751 ada_name_for_lookup in function's documentation.
8752 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8754 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8756 * defs.h (enum openp_flags): New enum.
8757 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8758 Move to enum openp_flags.
8759 (openp_flags): New enum flags.
8760 (openp): Change parameter type to openp_flags.
8761 * source.c (openp): Change parameter type to openp_flags.
8762 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8763 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8765 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8767 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8770 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8772 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8774 (class dwarf2_queue_guard): ...the destructor of this new class.
8775 (dw2_do_instantiate_symtab): Create instance of the new class
8776 dwarf2_queue_guard, remove cleanup.
8778 2018-02-09 Tom Tromey <tom@tromey.com>
8780 * source.c (find_source_lines): Don't reference past the end of
8783 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8785 * remote.c (remote_btrace_maybe_reopen): Change error message.
8786 * btrace.c (btrace_enable): Likewise.
8787 (parse_xml_btrace): Likewise.
8788 (parse_xml_btrace_conf): Likewise.
8790 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8792 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8793 (linux_enable_pt, linux_enable_bts): Call
8794 diagnose_perf_event_open_fail.
8796 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8798 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8799 Remove parameter and change return type. Update callers. Move it.
8800 (linux_enable_bts, linux_enable_pt): Improve error message.
8801 (linux_enable_pt): Remove zero buffer size check.
8802 (linux_enable_btrace): Improve error messages. Remove NULL return
8805 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8807 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8808 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8809 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8810 (linux_supports_pt, linux_supports_btrace): Remove.
8811 (linux_enable_bts): Call cpu_supports_bts.
8812 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8813 * remote.c (remote_supports_btrace): Remove.
8814 (init_remote_ops): Remove remote_supports_btrace.
8815 * target-delegates.c: Regenerated.
8816 * target.c (target_supports_btrace): Remove.
8817 * target.h (target_ops) <to_supports_btrace>: Remove
8818 (target_supports_btrace): Remove.
8819 * x86-linux-nat.c (x86_linux_create_target): Remove
8820 linux_supports_btrace.
8822 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8824 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8826 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8827 exception and use message in own exception.
8829 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8831 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8832 (perf_event_pt_event_type): Use gdb_file_up.
8833 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8834 scoped_fd, and scoped_mmap.
8836 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8838 * common/scoped_mmap.h: New.
8839 * unittests/scoped_mmap-selftest.c: New.
8840 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8841 unittests/scoped_mmap-selftest.c.
8843 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8845 * common/scoped_fd.h: New.
8846 * unittests/scoped_fd-selftest.c: New.
8847 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8848 unittests/scoped_fd-selftest.c.
8850 2018-02-09 Tom Tromey <tom@tromey.com>
8852 * auto-load.c (auto_load_section_scripts): Use
8853 gdb::unique_xmalloc_ptr.
8855 2018-02-09 Tom Tromey <tom@tromey.com>
8857 * auto-load.c (execute_script_contents): Use std::string.
8859 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8861 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8862 Python function, rather than a new command.
8864 2018-02-08 Tom Tromey <tom@tromey.com>
8866 * solib.c (solib_find_1): Use std::string.
8867 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8869 2018-02-08 Tom Tromey <tom@tromey.com>
8871 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8873 2018-02-08 Tom Tromey <tom@tromey.com>
8875 * source.c (find_source_lines): Use gdb::def_vector.
8877 2018-02-08 Tom Tromey <tom@tromey.com>
8879 * macrocmd.c (struct temporary_macro_definition): New.
8880 (macro_define_command): Use temporary_macro_definition. Remove
8882 (free_macro_definition_ptr): Remove.
8884 2018-02-08 Tom Tromey <tom@tromey.com>
8886 * macroexp.c (maybe_expand): Use std::string.
8888 2018-02-08 Tom Tromey <tom@tromey.com>
8890 * macroexp.c (struct macro_buffer): Add initializers for some
8892 (init_buffer, init_shared_buffer, free_buffer)
8893 (free_buffer_return_text): Remove.
8894 (macro_buffer): New constructors.
8895 (~macro_buffer): New destructor.
8896 (macro_buffer::set_shared): New method.
8897 (macro_buffer::resize_buffer, macro_buffer::appendc)
8898 (macro_buffer::appendmem): Now methods, not free functions.
8899 (set_token, append_tokens_without_splicing, stringify)
8900 (macro_stringify): Update.
8901 (gather_arguments): Change return type. Remove argc_p argument,
8902 add args_ptr argument. Use std::vector.
8903 (substitute_args): Remove argc argument. Accept std::vector.
8904 (expand): Update. Use std::vector.
8905 (scan, macro_expand, macro_expand_next): Update.
8907 2018-02-08 Tom Tromey <tom@tromey.com>
8909 * symtab.c (default_collect_symbol_completion_matches_break_on):
8910 Use unique_xmalloc_ptr.
8911 * macroscope.h: (sal_macro_scope, user_macro_scope)
8912 (default_macro_scope): Return unique_xmalloc_ptr.
8913 * macroscope.c (sal_macro_scope, user_macro_scope)
8914 (default_macro_scope): Return unique_xmalloc_ptr.
8915 * macroexp.h (macro_expand, macro_expand_once): Return
8917 * macroexp.c (macro_expand, macro_expand_once): Return
8919 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8920 (info_macro_command, info_macros_command): Use
8922 * compile/compile-c-support.c (write_macro_definitions): Use
8924 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8926 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8928 * value.c (value_static_field): Assign field type instead of
8929 containing type when returning an optimized out value.
8931 2018-02-06 Yao Qi <yao.qi@linaro.org>
8933 * ft32-tdep.c (ft32_read_pc): Remove.
8934 (ft32_write_pc): Remove.
8935 (ft32_gdbarch_init): Update.
8936 * m32r-tdep.c (m32r_read_pc): Remove.
8937 (m32r_gdbarch_init): Update.
8938 * mep-tdep.c (mep_read_pc): Remove.
8939 (mep_gdbarch_init): Update.
8940 * microblaze-tdep.c (microblaze_write_pc): Remove.
8941 (microblaze_gdbarch_init): Update.
8942 * mn10300-tdep.c (mn10300_read_pc): Remove.
8943 (mn10300_write_pc): Remove.
8944 (mn10300_gdbarch_init): Update.
8945 * moxie-tdep.c (moxie_read_pc): Remove.
8946 (moxie_write_pc): Remove.
8947 (moxie_gdbarch_init): Update.
8949 2018-02-06 Yao Qi <yao.qi@linaro.org>
8951 * expprint.c (print_subexp_standard): Handle
8952 OP_F77_UNDETERMINED_ARGLIST.
8953 (dump_subexp_body_standard): Likewise.
8955 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8957 * target-descriptions.c (tdesc_element_visitor) Add empty
8959 (tdesc_type): Move make_gdb_type from here.
8960 (tdesc_type_builtin): Likewise.
8961 (tdesc_type_vector): Likewise.
8962 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8963 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8964 (make_gdb_type_union): Likewise.
8965 (make_gdb_type_flags): Likewise.
8966 (make_gdb_type_enum): Likewise.
8967 (make_gdb_type): New function.
8968 (tdesc_register_type): Use static make_gdb_type.
8970 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8972 * infcmd.c (default_print_one_register_info): Align natural-format
8973 column values consistently one under another.
8974 (pad_to_column): New function.
8976 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8978 * dwarf2read.c (dwarf2_physname): Move commment.
8980 2018-02-01 Leszek Swirski <leszeks@google.com>
8982 * varobj.c (varobj_formatted_print_options): Allow recursive
8983 pretty printing if pretty printing is enabled.
8985 2018-02-01 Leszek Swirski <leszeks@google.com>
8987 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8988 names after a structop as a filename.
8990 2018-02-01 Yao Qi <yao.qi@linaro.org>
8992 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8993 (arm_record_coproc_data_proc): Likewise.
8995 2018-02-01 Yao Qi <yao.qi@linaro.org>
8997 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8999 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9001 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9002 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9004 2018-01-31 Pedro Alves <palves@redhat.com>
9006 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9007 * inflow.c (child_terminal_save_inferior): Wrap reference to
9008 tcgetpgrp in HAVE_TERMIOS_H.
9009 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9011 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9012 always iterate over all inferiors.
9013 (gdbsim_cntrl_c): Adjust.
9014 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9016 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9018 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9019 index type is objfile-owned if the element type is as well.
9021 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9025 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9027 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9028 "features/s390x-linux64.c".
9029 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9030 s390_linux32 and s390x_linux64.
9031 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9033 * s390-tdep.c: Include "features/s390-linux32.c" and
9034 "features/s390x-linux64.c".
9035 (s390_tdesc_valid): Add check for tdesc_has_registers.
9036 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9037 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9038 tdesc_s390x_linux64.
9039 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9040 tdesc_s390x_linux64 to...
9041 * s390-tdep.h: ...here.
9043 2018-01-30 Pedro Alves <palves@redhat.com>
9046 * config.in, configure: Regenerate.
9047 * configure.ac: Check for getpgid.
9048 * go32-nat.c (go32_pass_ctrlc): New.
9049 (go32_target): Install it.
9050 * inf-child.c (inf_child_target): Install
9051 child_terminal_save_inferior, child_pass_ctrlc and
9053 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9054 (inf_ptrace_target): No longer install it.
9055 * infcmd.c (interrupt_target_1): Adjust.
9056 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9057 (child_interrupt): Declare.
9058 (inferior::terminal_state): New.
9059 * inflow.c (struct terminal_info): Update comments.
9060 (inferior_process_group): Delete.
9061 (terminal_is_ours): Delete.
9062 (gdb_tty_state): New.
9063 (child_terminal_init): Adjust.
9064 (is_gdb_terminal, sharing_input_terminal_1)
9065 (sharing_input_terminal): New functions.
9066 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9067 Set the process's actual process group in the foreground if
9068 possible. Handle is_ours_for_output/is_ours distinction. Don't
9069 mark terminal as the inferior's if not sharing GDB's terminal.
9070 Don't check attach_flag.
9071 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9072 pass down a target_terminal_state.
9073 (child_terminal_save_inferior): New, factored out from ...
9074 (child_terminal_ours_1): ... this. Handle
9075 target_terminal_state::is_ours_for_output.
9076 (child_interrupt, child_pass_ctrlc): New.
9077 (inflow_inferior_exit): Clear the inferior's terminal_state.
9078 (copy_terminal_info): Copy the inferior's terminal state.
9079 (_initialize_inflow): Remove reference to terminal_is_ours.
9080 * inflow.h (inferior_process_group): Delete.
9081 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9082 * procfs.c (procfs_target): Don't install procfs_interrupt.
9083 (procfs_interrupt): Delete.
9084 * remote.c (remote_serial_quit_handler): Adjust.
9085 (remote_interrupt): Remove ptid parameter. Adjust.
9086 * target-delegates.c: Regenerate.
9087 * target.c: Include "terminal.h".
9088 (target_terminal::terminal_state): Rename to ...
9089 (target_terminal::m_terminal_state): ... this.
9090 (target_terminal::init): Adjust.
9091 (target_terminal::inferior): Adjust to per-inferior
9093 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9094 (target_terminal::ours, target_terminal::ours_for_output): Use
9095 target_terminal_is_ours_kind.
9096 (target_interrupt): Remove ptid parameter. Adjust.
9097 (default_target_pass_ctrlc): Adjust.
9098 * target.h (target_ops::to_terminal_save_inferior): New field.
9099 (target_ops::to_interrupt): Remove ptid_t parameter.
9100 (target_interrupt): Remove ptid_t parameter. Update comment.
9101 (target_pass_ctrlc): Update comment.
9102 * target/target.h (target_terminal_state): New scoped enum,
9104 (target_terminal::terminal_state): ... here.
9105 (target_terminal::inferior): Update comments.
9106 (target_terminal::restore_inferior): New.
9107 (target_terminal::is_inferior, target_terminal::is_ours)
9108 (target_terminal::is_ours_for_output): Adjust.
9109 (target_terminal::scoped_restore_terminal_state): Adjust to
9110 rename, and call restore_inferior() instead of inferior().
9111 (target_terminal::scoped_restore_terminal_state::m_state): Change
9113 (target_terminal::terminal_state): Rename to ...
9114 (target_terminal::m_terminal_state): ... this and change type.
9116 2018-01-30 Pedro Alves <palves@redhat.com>
9118 * linux-nat.c (wait_for_signal): New function.
9119 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9121 (async_terminal_is_ours)
9122 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9123 (linux_nat_add_target): Don't override
9124 to_terminal_inferior/to_terminal_ours.
9126 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9128 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9130 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9132 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9133 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9134 dwarf2_per_objfile_free here.
9135 (dwarf2_per_objfile_free): Remove.
9136 (_initialize_dwarf2_read): Don't register
9137 dwarf2_per_objfile_free as a registry cleanup.
9139 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9141 Avoid compilation errors in MinGW native builds
9143 The error is triggered by including python-internal.h, and the
9146 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9147 from build-gnulib/import/math.h:27,
9148 from d:/usr/Python26/include/pyport.h:235,
9149 from d:/usr/Python26/include/Python.h:58,
9150 from python/python-internal.h:94,
9151 from python/py-arch.c:24:
9152 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9156 This happens because Python headers define 'hypot' to expand t
9157 '_hypot' in the Windows builds.
9158 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9159 'hypoth'. This avoids a compilation error.
9161 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9163 * MAINTAINERS (Write After Approval): Fix ordering.
9165 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9167 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9169 2018-01-26 Alan Modra <amodra@gmail.com>
9171 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9172 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9173 Remove nop. Make const. Comment.
9174 (powerpc32_plt_stub_so_2): New.
9175 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9176 Correct count. Update uses.
9177 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9178 Move common code reading PLT entry word. Correct
9179 powerpc32_plt_stub PLT address calculation.
9180 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9181 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9182 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9183 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9184 (ppc64_standard_linkage8): Likewise.
9185 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9186 Correct insns description.
9187 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9189 2018-01-24 Pedro Alves <palves@redhat.com>
9191 GCC PR libstdc++/83906
9192 * gdbtypes.c (operator==(const dynamic_prop &,
9193 const dynamic_prop &)): New.
9194 (operator==(const range_bounds &, const range_bounds &)): New.
9195 (check_types_equal): Use them instead of memcmp.
9196 * gdbtypes.h (operator==(const dynamic_prop &,
9197 const dynamic_prop &)): Declare.
9198 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9199 (operator==(const range_bounds &, const range_bounds &)): Declare.
9200 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9202 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9204 * s390-linux-tdep.c (s390_record_address_mask)
9205 (s390_record_calc_disp_common, s390_record_calc_disp)
9206 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9207 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9208 (s390_process_record): Move to s390-tdep.c.
9209 (s390_linux_init_abi_any): Adjust.
9210 * s390-tdep.c (s390_record_address_mask)
9211 (s390_record_calc_disp_common, s390_record_calc_disp)
9212 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9213 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9214 (s390_process_record): Moved from s390-linux-tdep.c
9215 (s390_gdbarch_init): Adjust.
9217 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9219 * s390-linux-nat.c (s390-tdep.h): New include.
9220 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9221 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9222 (ALLDEPFILES): Add s390-tdep.c.
9223 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9224 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9225 * s390-tdep.h: ...this. New file.
9226 * s390-linux-tdep.c (s390-tdep.h): New include.
9227 (_initialize_s390_tdep): Rename to...
9228 (_initialize_s390_linux_tdep): ...this and adjust.
9229 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9230 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9232 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9233 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9234 (s390_is_partial_instruction, s390_software_single_step)
9235 (is_non_branch_ril, s390_displaced_step_copy_insn)
9236 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9237 (s390_prologue_data, s390_addr, s390_store, s390_load)
9238 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9239 (s390_register_call_saved, s390_guess_tracepoint_registers)
9240 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9241 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9242 (s390_pseudo_register_name, s390_pseudo_register_type)
9243 (s390_pseudo_register_read, s390_pseudo_register_write)
9244 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9245 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9246 (s390_addr_bits_remove, s390_address_class_type_flags)
9247 (s390_address_class_type_flags_to_name)
9248 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9249 (s390_function_arg_float, s390_function_arg_vector)
9250 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9251 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9252 (s390_frame_align, s390_register_return_value, s390_return_value)
9253 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9254 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9255 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9256 (s390_trad_frame_prev_register, s390_unwind_cache)
9257 (s390_prologue_frame_unwind_cache)
9258 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9259 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9260 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9261 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9262 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9263 (s390_frame_base_address, s390_local_base_address)
9264 (s390_frame_base, s390_gcc_target_options)
9265 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9266 (s390_validate_reg_range, s390_tdesc_valid)
9267 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9268 * s390-tdep.c: ...this. New file.
9270 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9272 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9273 (s390_process_record, s390_gdbarch_tdep_alloc)
9274 (s390_linux_init_abi_any): Use/set new hook.
9276 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9278 * s390-linux-tdep.c (osabi.h): New include.
9279 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9280 (s390_linux_init_abi_any): New functions.
9281 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9283 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9285 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9286 tdesc_has_registers check
9288 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9290 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9291 (s390_validate_reg_range): New macro.
9292 (s390_gdbarch_init): Adjust.
9294 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9296 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9297 (s390_gdbarch_tdep_alloc): Adjust.
9298 (s390_gdbarch_init): Adjust.
9300 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9302 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9303 <have_tdb>: Change type to bool.
9304 (s390_gdbarch_tdep_alloc): Adjust.
9305 (s390_gdbarch_init): Adjust.
9307 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9309 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9310 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9311 (s390_gdbarch_tdep_alloc): New function.
9312 (s390_gdbarch_init): Allocate tdep at start and use its fields
9313 instead of separate variables.
9315 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9317 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9318 when looking for cached gdbarch and add comment for remaining.
9320 2018-01-22 Pedro Alves <palves@redhat.com>
9321 Sergio Durigan Junior <sergiodj@redhat.com>
9323 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9326 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9328 * MAINTAINERS: Update my company e-mail address.
9330 2018-01-22 Yao Qi <yao.qi@linaro.org>
9332 * regcache.c (cooked_write_test): New function.
9333 (_initialize_regcache): Register the test.
9335 2018-01-22 Yao Qi <yao.qi@linaro.org>
9337 * ia64-tdep.c (ia64_pseudo_register_read): Call
9338 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9339 * m32c-tdep.c (m32c_cat_read): Likewise.
9340 (m32c_r3r2r1r0_read): Likewise.
9341 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9342 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9344 2018-01-22 Yao Qi <yao.qi@linaro.org>
9346 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9347 method raw_read instead of regcache_raw_read.
9348 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9349 * arm-tdep.c (arm_neon_quad_read): Likewise.
9350 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9351 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9352 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9353 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9354 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9355 (i386_pseudo_register_read_into_value): Likewise.
9356 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9357 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9358 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9359 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9360 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9361 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9362 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9363 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9364 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9366 2018-01-22 Yao Qi <yao.qi@linaro.org>
9368 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9369 * configure.tgt: Remove target mt.
9370 * mt-tdep.c: Remove.
9371 * regcache.c (cooked_read_test): Remove the check for mt.
9373 2018-01-22 Yao Qi <yao.qi@linaro.org>
9375 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9376 instead of gdbarch_pseudo_register_read_value.
9378 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9380 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9383 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9385 * linespec.c (create_sals_line_offset): Remove code that preserved
9386 the symtab_and_line's line number.
9388 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9390 * varobj.c (varobj_create): Don't set valid_block when creating a
9393 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9395 * varobj.c (varobj_create): Remove out of date comment.
9397 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9400 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9401 updating innermost block.
9402 * parse.c (innermost_block_tracker::update): Take extra type
9403 parameter, and check types match before updating innermost block.
9404 (write_dollar_variable): Update innermost block for registers.
9405 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9406 (innermost_block_tracker::innermost_block_tracker): Initialise
9408 (innermost_block_tracker::reset): Take type parameter.
9409 (innermost_block_tracker::update): Take type parameter, and pass
9410 type through as needed.
9411 (innermost_block_tracker::m_types): New member.
9412 * varobj.c (varobj_create): Pass type when reseting innermost
9415 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9417 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9418 * ada-lang.c (resolve_subexp): Likewise.
9419 * breakpoint.c (set_breakpoint_condition) Likewise.
9420 (watch_command_1) Likewise.
9421 * c-exp.y (variable): Likewise.
9422 * d-exp.y (PrimaryExpression): Likewise.
9423 * f-exp.y (variable): Likewise.
9424 * go-exp.y (variable): Likewise.
9425 * m2-exp.y (variable): Likewise.
9426 * objfiles.c (objfile::~objfile): Likewise.
9427 * p-exp.y (variable): Likewise.
9428 * parse.c (innermost_block): Change type.
9429 * parser-defs.h (class innermost_block_tracker): New.
9430 (innermost_block): Change to innermost_block_tracker.
9431 * printcmd.c (display_command): Switch to innermost_block API.
9432 (do_one_display): Likewise.
9433 * rust-exp.y (do_one_display): Likewise.
9434 * symfile.c (clear_symtab_users): Likewise.
9435 * varobj.c (varobj_create): Switch to innermost_block API, replace
9436 use of innermost_block with block stored on varobj object.
9438 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9440 * expression.h (innermost_block): Remove declaration.
9441 * varobj.c: Add 'parser-defs.h' include.
9443 2018-01-19 Tom Tromey <tom@tromey.com>
9445 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9446 symbols in the static and global blocks.
9448 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9450 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9451 gdb_ptrace.h, and move including gdb_wait.h ...
9452 * nat/linux-ptrace.h: ... to here.
9454 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9456 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9457 inf_ptrace_detach_success.
9458 (inf_ptrace_detach_success): Add inferior parameter, use it
9459 instead of inferior_ptid, pass it to detach_inferior.
9460 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9462 * inferior.c (detach_inferior): Add overload that takes an
9464 * inferior.h (detach_inferior): Likewise.
9465 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9466 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9467 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9469 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9471 * target.h (struct target_ops) <to_detach>: Add inferior
9473 (target_detach): Likewise.
9474 * target.c (dispose_inferior): Pass inferior down.
9475 (target_detach): Pass inferior down. Assert that it is equal to
9476 the current inferior.
9477 * aix-thread.c (aix_thread_detach): Pass inferior down.
9478 * corefile.c (core_file_command): Pass current_inferior() down.
9479 * corelow.c (core_detach): Add inferior parameter.
9480 * darwin-nat.c (darwin_detach): Likewise.
9481 * gnu-nat.c (gnu_detach): Likewise.
9482 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9483 * infcmd.c (detach_command): Pass current_inferior() down to
9485 * infrun.c (follow_fork_inferior): Pass parent_inf to
9487 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9489 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9490 * linux-thread-db.c (thread_db_detach): Likewise.
9491 * nto-procfs.c (procfs_detach): Likewise.
9492 * procfs.c (procfs_detach): Likewise.
9493 * record.c (record_detach): Likewise.
9494 * record.h (struct inferior): Forward-declare.
9495 (record_detach): Add inferior parameter.
9496 * remote-sim.c (gdbsim_detach): Likewise.
9497 * remote.c (remote_detach_1): Likewise.
9498 (remote_detach): Likewise.
9499 (extended_remote_detach): Likewise.
9500 * sol-thread.c (sol_thread_detach): Likewise.
9501 * target-debug.h (target_debug_print_inferior_p): New macro.
9502 * target-delegates.c: Re-generate.
9503 * top.c (kill_or_detach): Pass inferior down to target_detach.
9504 * windows-nat.c (windows_detach): Add inferior parameter.
9506 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9508 * target.h (struct target_ops) <to_detach>: Remove args
9510 (target_detach): Likewise.
9511 * target.c (dispose_inferior): Adjust.
9512 (target_detach): Remove args parameter, adjust.
9513 * aix-thread.c (aix_thread_detach): Adjust.
9514 * corefile.c (core_file_command): Adjust.
9515 * corelow.c (core_detach): Adjust.
9516 * darwin-nat.c (darwin_detach): Adjust.
9517 * gnu-nat.c (gnu_detach): Adjust.
9518 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9519 * infcmd.c (detach_command): Adjust
9520 * infrun.c (follow_fork_inferior): Adjust.
9521 (handle_vfork_child_exec_or_exit): Adjust.
9522 * linux-fork.c (linux_fork_detach): Remove args parameter.
9523 * linux-fork.h (linux_fork_detach): Likewise.
9524 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9525 * linux-thread-db.c (thread_db_detach): Likewise.
9526 * nto-procfs.c (procfs_detach): Likewise.
9527 * procfs.c (procfs_detach): Likewise.
9528 (do_detach): Remove signo parameter.
9529 * record.c (record_detach): Remove args parameter.
9530 * record.h (record_detach): Likewise.
9531 * remote-sim.c (gdbsim_detach): Likewise.
9532 * remote.c (remote_detach_1): Likewise.
9533 (remote_detach): Likewise.
9534 (extended_remote_detach): Likewise.
9535 * sol-thread.c (sol_thread_detach): Likewise.
9536 * target-delegates.c: Re-generate.
9537 * top.c (struct qt_args) <args>: Remove field.
9538 (kill_or_detach): Don't pass args.
9539 (quit_force): Don't set args.
9540 * windows-nat.c (windows_detach): Remove args parameter.
9542 2018-01-19 Yao Qi <yao.qi@linaro.org>
9544 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9545 (arm_linux_init_abi): Install it.
9547 2018-01-19 Yao Qi <yao.qi@linaro.org>
9549 * osabi.c (gdb_osabi_names): Extend the regexp for
9550 arm-linux-gnueabihf.
9552 2018-01-18 Yao Qi <yao.qi@linaro.org>
9554 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9556 (abbrev_table::add_abbrev): Update.
9557 (abbrev_table::lookup_abbrev): Update.
9559 2018-01-18 Yao Qi <yao.qi@linaro.org>
9561 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9563 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9565 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9568 2018-01-17 Tom Tromey <tom@tromey.com>
9570 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9572 2018-01-17 Tom Tromey <tom@tromey.com>
9574 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9575 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9576 (create_array_type_with_stride): Update.
9577 * dwarf2read.c (set_die_type): Update.
9579 2018-01-17 Tom Tromey <tom@tromey.com>
9581 * dwarf2read.c (delayed_method_info): Remove typedef.
9582 (dwarf2_cu::method_info): Now a std::vector.
9583 (add_to_method_list): Update.
9584 (free_delayed_list): Remove.
9585 (compute_delayed_physnames): Update.
9586 (process_full_comp_unit, process_full_type_unit): Clear the method
9587 list. Remove cleanups.
9588 (psymtab_include_file_name): Add name_holder parameter. Use
9590 (dwarf_decode_lines): Update.
9592 2018-01-17 Tom Tromey <tom@tromey.com>
9593 Simon Marchi <simon.marchi@ericsson.com>
9595 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9596 (dwarf2_per_objfile::free_cached_comp_units)
9597 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9598 (init_cutu_and_read_dies_no_follow): Update.
9599 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9600 (dwarf2_cu::~dwarf2_cu): New.
9601 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9602 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9604 2018-01-17 Tom Tromey <tom@tromey.com>
9605 Simon Marchi <simon.marchi@ericsson.com>
9607 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9608 (struct die_reader_specs) <abbrev_table>: New member.
9609 (struct abbrev_table): Add constructor.
9610 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9611 <abbrev_obstack>: Now an auto_obstack.
9612 (abbrev_table_up): New typedef.
9613 (init_cu_die_reader): Add abbrev_table parameter.
9614 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9615 Add result_dwo_abbrev_table.
9616 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9617 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9619 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9621 (skip_children): Update.
9622 (abbrev_table::alloc_abbrev): Rename from
9623 abbrev_table_alloc_abbrev.
9624 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9625 (abbrev_table::lookup_abbrev): Rename from
9626 abbrev_table_lookup_abbrev.
9627 (abbrev_table_read_table): Return abbrev_table_up.
9628 (abbrev_table_free, abbrev_table_free_cleanup)
9629 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9630 (load_partial_dies): Update.
9632 2018-01-17 Tom Tromey <tom@tromey.com>
9634 * dwarf2read.c (dwarf2_compute_name): Update comment.
9635 (read_func_scope, read_variable): Update.
9636 (new_symbol): Remove.
9637 (new_symbol_full): Rename to new_symbol.
9639 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9642 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9643 a warning instead of throwing an error, set section size to 0 and return
9645 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9647 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9649 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9651 (linux_ptrace_attach_fail_reason_string): Likewise.
9652 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9654 (linux_ptrace_attach_fail_reason_string): Likewise.
9655 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9657 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9659 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9661 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9664 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9665 checking for fs_base/gs_base fields in struct user_regs_struct.
9666 * configure: Regenerate.
9668 2018-01-17 Yao Qi <yao.qi@linaro.org>
9670 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9672 (aarch64_linux_init_abi): Install it to gdbarch hook
9675 2018-01-15 Pedro Alves <palves@redhat.com>
9677 * common/signals-state-save-restore.c
9678 (save_original_signals_state): Fix typos.
9680 2017-01-12 Tom Tromey <tom@tromey.com>
9681 Sergio Durigan Junior <sergiodj@redhat.com>
9683 * Makefile.in (install-only): Install gdb-add-index.
9685 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9687 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9689 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9691 * infrun.c (keep_going_pass_signal): Clear step-over info when
9692 insert_breakpoints fails.
9694 2018-01-11 Pedro Alves <palves@redhat.com>
9697 * infrun.c (resume): Rename to ...
9698 (resume_1): ... this.
9699 (resume): Reimplement as wrapper around resume_1.
9701 2018-01-11 Pedro Alves <palves@redhat.com>
9704 * remote.c (remote_parse_stop_reply): Default to the last-set
9705 general thread instead of to 'magic_null_ptid'.
9707 2018-01-10 Pedro Alves <palves@redhat.com>
9709 * language.h (language_get_symbol_name_matcher): Rename ...
9710 (get_symbol_name_matcher): ... this.
9711 * language.c (language_get_symbol_name_matcher): Ditto.
9712 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9715 2018-01-10 Pedro Alves <palves@redhat.com>
9719 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9720 Adjust to use language_get_symbol_name_matcher instead of
9721 language_defn::la_get_symbol_name_matcher.
9722 * language.c (language_get_symbol_name_matcher): If in Ada mode
9723 and the lookup name is a verbatim match, return Ada's matcher.
9724 * language.h (language_get_symbol_name_matcher): Adjust comment.
9725 (ada_lookup_name_info::verbatim_p):: New method.
9727 2018-01-10 Pedro Alves <palves@redhat.com>
9730 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9731 minsym's language is language_auto or language_cplus, pass down
9732 language_ada instead.
9733 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9735 2018-01-10 Pedro Alves <palves@redhat.com>
9738 * minsyms.c (linkage_name_str): New function.
9739 (iterate_over_minimal_symbols): Use it.
9741 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9743 * NEWS: Document that 'info proc' now works on FreeBSD.
9745 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9747 * configure.ac: Check for kinfo_getfile in libutil.
9748 * configure: Regenerate.
9749 * config.in: Regenerate.
9750 * fbsd-nat.c: Include "fbsd-tdep.h".
9751 (fbsd_fetch_cmdline): New.
9752 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9753 rather than calling error.
9754 (fbsd_info_proc): New.
9755 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9756 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9757 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9759 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9761 * fbsd-nat.c (struct free_deleter): Remove.
9762 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9764 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9766 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9767 NULL for an empty pathname.
9769 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9771 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9772 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9773 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9774 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9775 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9776 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9777 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9778 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9779 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9780 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9781 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9782 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9783 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9784 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9785 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9787 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9789 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9790 (gnu_xfer_auxv): New function.
9791 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9794 2018-01-08 Yao Qi <yao.qi@linaro.org>
9795 Simon Marchi <simon.marchi@ericsson.com>
9797 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9799 (COMMON_OBS): Remove selftest.o.
9800 * configure.ac: Append selftest-arch.c and common/selftest.c to
9801 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9802 * configure: Re-generated.
9803 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9805 (maintenance_info_selftests): Likewise.
9807 2018-01-08 Xavier Roirand <roirand@adacore.com>
9809 * ada-valprint.c (val_print_packed_array_elements): Use
9810 proper number of elements when printing an array indexed
9811 by an enumeration type.
9813 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9815 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9816 (dw2_get_file_names_reader): Adjust.
9817 (lookup_dwo_signatured_type): Adjust.
9818 (lookup_dwp_signatured_type): Adjust.
9819 (lookup_signatured_type): Adjust.
9820 (create_type_unit_group): Adjust.
9821 (get_type_unit_group): Adjust.
9822 (process_psymtab_comp_unit_reader): Adjust.
9823 (build_type_psymtabs_reader): Adjust.
9824 (scan_partial_symbols): Adjust.
9825 (add_partial_symbol): Adjust.
9826 (add_partial_subprogram): Adjust.
9827 (peek_die_abbrev): Adjust.
9828 (fixup_go_packaging): Adjust.
9829 (process_imported_unit_die): Adjust.
9830 (dwarf2_compute_name): Adjust.
9831 (dwarf2_physname): Adjust.
9832 (read_import_statement): Adjust.
9833 (handle_DW_AT_stmt_list): Adjust.
9834 (read_file_scope): Adjust.
9835 (read_func_scope): Adjust.
9836 (read_lexical_block_scope): Adjust.
9837 (read_call_site_scope): Adjust.
9838 (read_variable): Adjust.
9839 (dwarf2_rnglists_process): Adjust.
9840 (dwarf2_ranges_process): Adjust.
9841 (dwarf2_ranges_read): Adjust.
9842 (dwarf2_get_pc_bounds): Adjust.
9843 (dwarf2_record_block_ranges): Adjust.
9844 (dwarf2_add_field): Adjust.
9845 (dwarf2_add_member_fn): Adjust.
9846 (read_structure_type): Adjust.
9847 (process_structure_scope): Adjust.
9848 (read_enumeration_type): Adjust.
9849 (read_array_type): Adjust.
9850 (mark_common_block_symbol_computed): Adjust.
9851 (read_common_block): Adjust.
9852 (read_namespace_type): Adjust.
9853 (read_namespace): Adjust.
9854 (read_module_type): Adjust.
9855 (read_tag_pointer_type): Adjust.
9856 (read_tag_ptr_to_member_type): Adjust.
9857 (read_tag_string_type): Adjust.
9858 (read_subroutine_type): Adjust.
9859 (read_typedef): Adjust.
9860 (read_base_type): Adjust.
9861 (attr_to_dynamic_prop): Adjust.
9862 (read_subrange_type): Adjust.
9863 (read_unspecified_type): Adjust.
9864 (dwarf2_read_abbrevs): Adjust.
9865 (load_partial_dies): Adjust.
9866 (read_partial_die): Adjust.
9867 (find_partial_die): Adjust.
9868 (guess_partial_die_structure_name): Adjust.
9869 (fixup_partial_die): Adjust.
9870 (read_attribute_value): Adjust.
9871 (read_addr_index): Adjust.
9872 (read_addr_index_from_leb128): Adjust.
9873 (read_str_index): Adjust.
9874 (dwarf2_string_attr): Adjust.
9875 (get_debug_line_section): Adjust.
9876 (dwarf_decode_line_header): Adjust.
9877 (lnp_state_machine::check_line_address): Adjust.
9878 (dwarf_decode_lines_1): Adjust.
9879 (dwarf_decode_lines): Adjust.
9880 (dwarf2_start_symtab): Adjust.
9881 (var_decode_location): Adjust.
9882 (new_symbol_full): Adjust.
9883 (dwarf2_const_value_data): Adjust.
9884 (dwarf2_const_value_attr): Adjust.
9885 (dwarf2_const_value): Adjust.
9887 (die_containing_type): Adjust.
9888 (build_error_marker_type): Adjust.
9889 (lookup_die_type): Adjust.
9890 (guess_full_die_structure_name): Adjust.
9891 (anonymous_struct_prefix): Adjust.
9892 (determine_prefix): Adjust.
9893 (dwarf2_name): Adjust.
9894 (follow_die_ref_or_sig): Adjust.
9895 (follow_die_offset): Adjust.
9896 (follow_die_ref): Adjust.
9897 (follow_die_sig_1): Adjust.
9898 (follow_die_sig): Adjust.
9899 (get_signatured_type): Adjust.
9900 (get_DW_AT_signature_type): Adjust.
9901 (decode_locdesc): Adjust.
9902 (dwarf_decode_macros): Adjust.
9903 (cu_debug_loc_section): Adjust.
9904 (fill_in_loclist_baton): Adjust.
9905 (dwarf2_symbol_mark_computed): Adjust.
9906 (init_one_comp_unit): Don't assign
9907 dwarf2_cu::dwarf2_per_objfile.
9908 (set_die_type): Adjust.
9910 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9912 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9913 <dwarf2_per_objfile>: New field.
9914 (dwarf2_per_objfile): Remove global.
9915 (get_dwarf2_per_objfile): New function.
9916 (set_dwarf2_per_objfile): New function.
9917 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9919 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9920 (read_abbrev_offset): Likewise.
9921 (read_indirect_string): Likewise.
9922 (read_indirect_line_string): Likewise.
9923 (read_indirect_string_at_offset): Likewise.
9924 (read_indirect_string_from_dwz): Likewise.
9925 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9927 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9928 (create_all_comp_units): Change objfile parameter to
9930 (create_all_type_units): Likewise.
9931 (process_queue): Add dwarf2_per_objfile parameter.
9932 (read_and_check_comp_unit_head): Likewise.
9933 (lookup_dwo_unit_in_dwp): Likewise.
9934 (get_dwp_file): Likewise.
9935 (process_cu_includes): Likewise.
9936 (struct free_dwo_file_cleanup_data): New struct.
9937 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9938 set_dwarf2_per_objfile.
9939 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9940 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9941 context, adjust calls.
9942 (dw2_instantiate_symtab): Likewise.
9943 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9944 (dw2_get_cu): Likewise.
9945 (create_cu_from_index_list): Change objfile parameter to
9947 (create_cus_from_index_list): Get dwarf2_per_objfile from
9948 context, adjust calls.
9949 (create_cus_from_index): Likewise.
9950 (create_signatured_type_table_from_index): Change objfile
9951 parameter to dwarf2_per_objfile.
9952 (create_signatured_type_table_from_debug_names): Change objfile
9953 parameter to dwarf2_per_objfile.
9954 (create_addrmap_from_index): Likewise.
9955 (create_addrmap_from_aranges): Likewise.
9956 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9957 (dw2_setup): Remove.
9958 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9960 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9961 get_dwarf2_per_objfile.
9962 (dw2_forget_cached_source_info): Likewise.
9963 (dw2_map_symtabs_matching_filename): Likewise.
9964 (struct dw2_symtab_iterator) <index>: Remove.
9965 <dwarf2_per_objfile>: New field.
9966 (dw2_symtab_iter_init): Replace index parameter with
9968 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9969 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9970 (dw2_print_stats): Likewise.
9971 (dw2_dump): Likewise.
9972 (dw2_expand_symtabs_for_function): Likewise.
9973 (dw2_expand_all_symtabs): Likewise.
9974 (dw2_expand_symtabs_with_fullname): Likewise.
9975 (dw2_expand_marked_cus): Replace index and objfile parameters
9976 with dwarf2_per_objfile.
9977 (dw_expand_symtabs_matching_file_matcher): Add
9978 dwarf2_per_objfile parameter and adjust calls.
9979 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9981 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9982 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9984 (create_cus_from_debug_names_list): Replace objfile parameter
9985 with dwarf2_per_objfile and adjust calls.
9986 (create_cus_from_debug_names): Likewise.
9987 (dwarf2_read_debug_names): Likewise.
9988 (mapped_debug_names::namei_to_name): Adjust call.
9989 (dw2_debug_names_iterator::next): Likewise.
9990 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9991 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9992 (dw2_debug_names_dump): Likewise.
9993 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9994 (dw2_debug_names_expand_symtabs_matching): Likewise.
9995 (dwarf2_initialize_objfile): Likewise.
9996 (dwarf2_build_psymtabs): Likewise.
9997 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9999 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10000 (read_and_check_comp_unit_head): Likewise.
10001 (read_abbrev_offset): Likewise.
10002 (create_debug_type_hash_table): Likewise.
10003 (create_debug_types_hash_table): Likewise.
10004 (create_all_type_units): Replace objfile parameter with
10005 dwarf2_per_objfile.
10006 (add_type_unit): Add dwarf2_per_objfile parameter.
10007 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10008 with dwarf2_per_objfile.
10009 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10010 (lookup_dwp_signatured_type): Likewise.
10011 (lookup_signatured_type): Likewise.
10012 (read_cutu_die_from_dwo): Likewise.
10013 (init_tu_and_read_dwo_dies): Likewise.
10014 (init_cutu_and_read_dies): Likewise.
10015 (init_cutu_and_read_dies_no_follow): Likewise.
10016 (allocate_type_unit_groups_table): Add objfile parameter.
10017 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10018 (get_type_unit_group): Likewise.
10019 (process_psymtab_comp_unit): Update call.
10020 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10021 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10022 (print_tu_stats): Likewise.
10023 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10024 in void* parameter.
10025 (build_type_psymtabs): Change objfile parameter to
10026 dwarf2_per_objfile.
10027 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10028 passed in void* parameter.
10029 (process_skeletonless_type_units): Change objfile parameter to
10030 dwarf2_per_objfile.
10031 (set_partial_user): Likewise.
10032 (dwarf2_build_psymtabs_hard): Likewise.
10033 (read_comp_units_from_section): Likewise.
10034 (create_all_comp_units): Likewise.
10035 (scan_partial_symbols): Update calls.
10036 (add_partial_symbol): Likewise.
10037 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10038 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10039 (process_queue): Add dwarf2_per_objfile parameter.
10040 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10041 (compute_compunit_symtab_includes): Likewise.
10042 (process_cu_includes): Add dwarf2_per_objfile parameter.
10043 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10044 (process_full_type_unit): Likewise.
10045 (process_imported_unit_die): Update call.
10046 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10047 (read_file_scope): Likewise.
10048 (allocate_dwo_file_hash_table): Add objfile parameter.
10049 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10050 (create_cus_hash_table): Likewise.
10051 (create_dwp_hash_table): Likewise.
10052 (create_dwo_unit_in_dwp_v1): Likewise.
10053 (create_dwp_v2_section): Likewise.
10054 (create_dwo_unit_in_dwp_v2): Likewise.
10055 (lookup_dwo_unit_in_dwp): Likewise.
10056 (try_open_dwop_file): Likewise.
10057 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10058 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10059 cleanup to include a reference to dwarf2_per_objfile.
10060 (open_dwp_file): Add dwarf2_per_objfile parameter.
10061 (open_and_init_dwp_file): Likewise.
10062 (get_dwp_file): Likewise.
10063 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10064 (queue_and_load_all_dwo_tus): Update call.
10065 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10067 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10068 (dwarf2_ranges_process): Likewise.
10069 (dwarf2_get_pc_bounds): Likewise.
10070 (mark_common_block_symbol_computed): Likewise.
10071 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10072 (dwarf2_read_abbrevs): Update call.
10073 (read_partial_die): Use dwarf2_per_objfile from cu.
10074 (find_partial_die): Likewise.
10075 (fixup_partial_die): Likewise.
10076 (read_attribute_value): Likewise.
10077 (read_indirect_string_at_offset_from): Add objfile parameter.
10078 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10080 (read_indirect_string_from_dwz): Add objfile parameter.
10081 (read_indirect_string): Add objfile parameter.
10082 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10083 (read_addr_index): Use dwarf2_per_objfile from cu.
10084 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10086 (read_str_index): Use dwarf2_per_objfile from cu.
10087 (get_debug_line_section): Likewise.
10088 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10089 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10090 (new_symbol_full): Use dwarf2_per_objfile from cu.
10091 (build_error_marker_type): Likewise.
10092 (lookup_die_type): Likewise.
10093 (determine_prefix): Likewise.
10094 (follow_die_offset): Likewise.
10095 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10096 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10097 (dwarf2_fetch_die_type_sect_off): Likewise.
10098 (dwarf2_get_die_type): Likewise.
10099 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10100 (get_signatured_type): Likewise.
10101 (get_DW_AT_signature_type): Likewise.
10102 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10103 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10104 (cu_debug_loc_section): Likewise.
10105 (fill_in_loclist_baton): Likewise.
10106 (dwarf2_symbol_mark_computed): Likewise.
10107 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10108 dwarf2_per_objfile.
10109 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10111 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10112 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10113 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10114 (set_die_type): Use dwarf2_free_objfile from cu.
10115 (get_die_type_at_offset): Likewise.
10116 (dwarf2_per_objfile_free): Don't assign global variable.
10117 (debug_names) <constructor>: Add dwarf2_per_objfile
10118 parameter, update m_debugstrlookup construction.
10119 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10121 <m_dwarf2_per_objfile>: New field.
10122 <lookup>: Use m_dwarf2_per_objfile.
10123 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10124 (psyms_seen_size): Likewise.
10125 (write_gdbindex): Replace objfile parameter with
10126 dwarf2_per_objfile.
10127 (write_debug_names): Likewise.
10128 (write_psymtabs_to_index): Likewise.
10129 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10132 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10134 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10135 <dwarf2_per_objfile>: New field.
10136 (struct dwarf2_per_cu_data) <objfile>: Remove.
10137 <dwarf2_per_objfile>: New field.
10138 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10140 (create_signatured_type_table_from_index): Likewise.
10141 (create_debug_type_hash_table): Likewise.
10142 (fill_in_sig_entry_from_dwo_entry): Likewise.
10143 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10144 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10146 (create_partial_symtab): Access objfile through
10147 dwarf2_per_objfile.
10148 (process_psymtab_comp_unit_reader): Likewise.
10149 (read_comp_units_from_section): Likewise.
10150 (scan_partial_symbols): Likewise.
10151 (add_partial_symbol): Likewise.
10152 (add_partial_subprogram): Likewise.
10153 (peek_die_abbrev): Likewise.
10154 (fixup_go_packaging): Likewise.
10155 (process_full_comp_unit): Likewise.
10156 (process_full_type_unit): Likewise.
10157 (process_imported_unit_die): Likewise.
10158 (dwarf2_compute_name): Likewise.
10159 (dwarf2_physname): Likewise.
10160 (read_import_statement): Likewise.
10161 (create_cus_hash_table): Assign dwarf2_physname instead of
10163 (read_func_scope): Access objfile through dwarf2_per_objfile.
10164 (read_lexical_block_scope): Likewise.
10165 (read_call_site_scope): Likewise.
10166 (read_variable): Likewise.
10167 (dwarf2_rnglists_process): Likewise.
10168 (dwarf2_ranges_process): Likewise.
10169 (dwarf2_ranges_read): Likewise.
10170 (dwarf2_record_block_ranges): Likewise.
10171 (dwarf2_add_field): Likewise.
10172 (dwarf2_add_member_fn): Likewise.
10173 (read_structure_type): Likewise.
10174 (process_structure_scope): Likewise.
10175 (read_enumeration_type): Likewise.
10176 (read_array_type): Likewise.
10177 (read_common_block): Likewise.
10178 (read_namespace_type): Likewise.
10179 (read_namespace): Likewise.
10180 (read_module_type): Likewise.
10181 (read_tag_pointer_type): Likewise.
10182 (read_tag_ptr_to_member_type): Likewise.
10183 (read_tag_string_type): Likewise.
10184 (read_subroutine_type): Likewise.
10185 (read_typedef): Likewise.
10186 (read_base_type): Likewise.
10187 (attr_to_dynamic_prop): Likewise.
10188 (read_subrange_type): Likewise.
10189 (read_unspecified_type): Likewise.
10190 (load_partial_dies): Likewise.
10191 (read_partial_die): Likewise.
10192 (find_partial_die): Likewise.
10193 (guess_partial_die_structure_name): Likewise.
10194 (fixup_partial_die): Likewise.
10195 (read_attribute_value): Likewise.
10196 (read_addr_index_from_leb128): Likewise.
10197 (dwarf2_read_addr_index): Likewise.
10198 (dwarf2_string_attr): Likewise.
10199 (lnp_state_machine::check_line_address): Likewise.
10200 (dwarf_decode_lines_1): Likewise.
10201 (dwarf_decode_lines): Likewise.
10202 (dwarf2_start_symtab): Likewise.
10203 (var_decode_location): Likewise.
10204 (new_symbol_full): Likewise.
10205 (dwarf2_const_value_data): Likewise.
10206 (dwarf2_const_value_attr): Likewise.
10207 (dwarf2_const_value): Likewise.
10208 (die_type): Likewise.
10209 (die_containing_type): Likewise.
10210 (lookup_die_type): Likewise.
10211 (guess_full_die_structure_name): Likewise.
10212 (anonymous_struct_prefix): Likewise.
10213 (dwarf2_name): Likewise.
10214 (follow_die_ref_or_sig): Likewise.
10215 (follow_die_offset): Likewise.
10216 (follow_die_ref): Likewise.
10217 (dwarf2_fetch_die_loc_sect_off): Likewise.
10218 (dwarf2_fetch_constant_bytes): Likewise.
10219 (dwarf2_fetch_die_type_sect_off): Likewise.
10220 (dwarf2_get_die_type): Likewise.
10221 (follow_die_sig): Likewise.
10222 (decode_locdesc): Likewise.
10223 (dwarf2_per_cu_objfile): Likewise.
10224 (dwarf2_per_cu_text_offset): Likewise.
10225 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10227 (set_die_type): Access objfile through
10228 dwarf2_per_objfile.
10230 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10232 * valprint.c (converted_character_d): Remove typedef.
10233 (DEF_VEC_O (converted_character_d)): Remove.
10234 (count_next_character): Use std::vector.
10235 (print_converted_chars_to_obstack): Likewise.
10236 (generic_printstr): Likewise.
10238 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10240 * xml-support.h (struct gdb_xml_value): Add constructor.
10241 <value>: Change type to unique_xmalloc_ptr.
10242 (gdb_xml_value_s): Remove typedef.
10243 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10244 (gdb_xml_element_start_handler): Change parameter type to
10246 (xml_find_attribute): Likewise.
10247 * xml-support.c (xml_find_attribute): Change parameter type to
10248 std::vector and adjust.
10249 (gdb_xml_values_cleanup): Remove.
10250 (gdb_xml_parser::start_element): Adjust to std::vector.
10251 (xinclude_start_include): Change paraeter type to std::vector
10253 * btrace.c (check_xml_btrace_version): Likewise.
10254 (parse_xml_btrace_block): Likewise.
10255 (parse_xml_btrace_pt_config_cpu): Likewise.
10256 (parse_xml_btrace_pt): Likewise.
10257 (parse_xml_btrace_conf_bts): Likewise.
10258 (parse_xml_btrace_conf_pt): Likewise.
10259 * memory-map.c (memory_map_start_memory): Likewise.
10260 (memory_map_start_property): Likewise.
10261 * osdata.c (osdata_start_osdata): Likewise.
10262 (osdata_start_item): Likewise.
10263 (osdata_start_column): Likewise.
10264 * remote.c (start_thread): Likewise.
10265 * solib-aix.c (library_list_start_library): Likewise.
10266 (library_list_start_list): Likewise.
10267 * solib-svr4.c (library_list_start_library): Likewise.
10268 (svr4_library_list_start_list): Likewise.
10269 * solib-target.c (library_list_start_segment): Likewise.
10270 (library_list_start_section): Likewise.
10271 (library_list_start_library): Likewise.
10272 (library_list_start_list): Likewise.
10273 * tracepoint.c (traceframe_info_start_memory): Likewise.
10274 (traceframe_info_start_tvar): Likewise.
10275 * xml-syscall.c (syscall_start_syscall): Likewise.
10276 * xml-tdesc.c (tdesc_start_target): Likewise.
10277 (tdesc_start_feature): Likewise.
10278 (tdesc_start_reg): Likewise.
10279 (tdesc_start_union): Likewise.
10280 (tdesc_start_struct): Likewise.
10281 (tdesc_start_flags): Likewise.
10282 (tdesc_start_enum): Likewise.
10283 (tdesc_start_field): Likewise.
10284 (tdesc_start_enum_value): Likewise.
10285 (tdesc_start_vector): Likewise.
10287 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10289 * extension.h (struct xmethod_worker) <clone>: Remove.
10290 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10292 (python_xmethod_worker::clone): Remove.
10293 * valops.c (find_overload_match): Use std::move instead of
10296 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10298 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10299 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10300 <free_xmethod_worker_data>: Remove.
10301 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10302 <get_xmethod_arg_types>: Remove.
10303 <get_xmethod_result_type>: Remove.
10304 <invoke_xmethod>: Remove.
10305 * extension.c (new_xmethod_worker): Remove.
10306 (clone_xmethod_worker): Remove.
10307 (get_matching_xmethod_workers): Return void, pass std::vector by
10309 (get_xmethod_arg_types): Rename to...
10310 (xmethod_worker::get_arg_types): ... this, and adjust.
10311 (get_xmethod_result_type): Rename to...
10312 (xmethod_worker::get_result_type): ... this, and adjust.
10313 (invoke_xmethod): Remove.
10314 (free_xmethod_worker): Remove.
10315 (free_xmethod_worker_vec): Remove.
10316 * extension.h (enum ext_lang_rc): Move here from
10318 (struct xmethod_worker): Add constructor and destructor.
10321 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10322 virtual pure methods.
10323 <get_arg_types, get_result_type>: New methods.
10324 (xmethod_worker_ptr): Remove typedef.
10325 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10326 (xmethod_worker_vec): Remove typedef.
10327 (xmethod_worker_up): New typedef.
10328 (invoke_xmethod): Remove.
10329 (clone_xmethod_worker): Remove.
10330 (free_xmethod_worker): Remove.
10331 (free_xmethod_worker_vec): Remove.
10332 (get_xmethod_arg_types): Remove.
10333 (get_xmethod_result_type): Remove.
10334 * valops.c (find_method_list): Use std::vector, don't use
10335 intermediate vector.
10336 (value_find_oload_method_list): Use std::vector.
10337 (find_overload_match): Use std::vector.
10338 (find_oload_champ): Use std::vector.
10339 * value.c (value_free): Use operator delete.
10340 (value_of_xmethod): Rename to...
10341 (value_from_xmethod): ... this. Don't assign
10342 xmethod_worker::value, take rvalue-reference.
10343 (result_type_of_xmethod): Adjust.
10344 (call_xmethod): Adjust.
10345 * value.h: Include extension.h.
10346 (struct xmethod_worker): Don't forward-declare.
10347 (value_of_xmethod): Rename to...
10348 (value_from_xmethod): ... this, take rvalue-reference.
10349 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10350 (struct python_xmethod_worker): ... this, add constructor and
10352 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10353 (gdbpy_free_xmethod_worker_data): Rename to...
10354 (python_xmethod_worker::~python_xmethod_worker): ... this and
10356 (gdbpy_clone_xmethod_worker_data): Rename to...
10357 (python_xmethod_worker::clone): ... this and adjust.
10358 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10360 (gdbpy_get_xmethod_arg_types): Rename to...
10361 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10362 (gdbpy_get_xmethod_result_type): Rename to...
10363 (python_xmethod_worker::do_get_result_type): ... this and
10365 (gdbpy_invoke_xmethod): Rename to...
10366 (python_xmethod_worker::invoke): ... this and adjust.
10367 (new_python_xmethod_worker): Rename to...
10368 (python_xmethod_worker::python_xmethod_worker): ... this and
10370 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10372 (gdbpy_free_xmethod_worker_data): Remove.
10373 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10374 (gdbpy_get_xmethod_arg_types): Remove.
10375 (gdbpy_get_xmethod_result_type): Remove.
10376 (gdbpy_invoke_xmethod): Remove.
10377 * python/python.c (python_extension_ops): Remove obsolete
10380 2018-01-05 Pedro Alves <palves@redhat.com>
10383 * common/signals-state-save-restore.c
10384 (save_original_signals_state): New parameter 'quiet'. Warn if we
10385 find a custom handler preinstalled, instead of internal erroring.
10386 But only warn if !quiet.
10387 * common/signals-state-save-restore.h
10388 (save_original_signals_state): New parameter 'quiet'.
10389 * main.c (captured_main_1): Move save_original_signals_state call
10390 after option handling, and pass QUIET.
10392 2018-01-05 Pedro Alves <palves@redhat.com>
10394 * spu-tdep.c (spu_catch_start): Pass
10395 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10397 2018-01-05 Pedro Alves <palves@redhat.com>
10400 * ada-lang.c (literal_symbol_name_matcher): New function.
10401 (ada_get_symbol_name_matcher): Use it for
10402 symbol_name_match_type::SEARCH_NAME.
10403 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10404 it down instead of assuming symbol_name_match_type::FULL.
10405 * block.h (block_lookup_symbol): New parameter 'match_type'.
10406 * c-valprint.c (print_unpacked_pointer): Use
10407 lookup_symbol_search_name instead of lookup_symbol.
10408 * compile/compile-object-load.c (get_out_value_type): Pass down
10409 symbol_name_match_type::SEARCH_NAME.
10410 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10411 symbol_name_match_type::FULL.
10412 * cp-support.c (cp_get_symbol_name_matcher): Handle
10413 symbol_name_match_type::SEARCH_NAME.
10414 * infrun.c (insert_exception_resume_breakpoint): Use
10415 lookup_symbol_search_name.
10416 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10417 * psymtab.c (maintenance_check_psymtabs): Use
10418 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10419 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10420 SYMBOL_SEARCH_NAME.
10421 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10422 if symbol_name_match_type::SEARCH_NAME.
10423 (lookup_symbol_in_language): Pass down
10424 symbol_name_match_type::FULL.
10425 (lookup_symbol_search_name): New.
10426 (lookup_language_this): Pass down
10427 symbol_name_match_type::SEARCH_NAME.
10428 (lookup_symbol_aux, lookup_local_symbol): New parameter
10429 'match_type'. Pass it down.
10430 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10431 (lookup_symbol_search_name): New declaration.
10432 (lookup_symbol_in_block): New 'match_type' parameter.
10434 2018-01-05 Pedro Alves <palves@redhat.com>
10437 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10439 (ada_lookup_symbol): Reimplement in terms of
10440 ada_lookup_symbol_list, bits factored out from
10441 ada_lookup_encoded_symbol.
10443 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10445 * ada-exp.y (write_object_renaming): When subscripting an array
10446 using a symbol as the index, pass the block in call to
10447 ada_lookup_encoded_symbol when looking that symbol up.
10449 2018-01-05 Jerome Guitton <guitton@adacore.com>
10451 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10454 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10456 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10457 the case where VALUE_LVAL (val0) is not lval_memory.
10459 2018-01-05 Xavier Roirand <roirand@adacore.com>
10461 * ada-valprint.c (print_optional_low_bound): Handle
10462 character-indexed array printing like boolean-indexed array
10465 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10467 * NEWS: Create a new section for the next release branch.
10468 Rename the section of the current branch, now that it has
10471 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10473 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10474 * version.in: Bump version to 8.1.50.DATE-git.
10476 2018-01-03 Xavier Roirand <roirand@adacore.com>
10478 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10480 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10482 (default_exception_support_info) <catch_handlers_sym>: Add field.
10483 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10484 (ada_exception_name_addr_1): Add "catch handlers" handling.
10485 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10486 Update all callers.
10487 (create_excep_cond_exprs) <ex>: Add parameter.
10488 (re_set_exception): Update create_excep_cond_exprs call.
10489 (print_it_exception, print_one_exception, print_mention_exception)
10490 (print_recreate_exception): Add "catch handler" handling.
10491 (allocate_location_catch_handlers, re_set_catch_handlers)
10492 (check_status_catch_handlers, print_it_catch_handlers)
10493 (print_one_catch_handlers, print_mention_catch_handlers)
10494 (print_recreate_catch_handlers): New function.
10495 (catch_handlers_breakpoint_ops): New variable.
10496 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10497 Add parameter. Add "catch handler" handling.
10498 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10499 Add "catch handler" handling.
10500 (ada_exception_catchpoint_cond_string): Add "catch handler"
10502 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10504 (catch_ada_handlers_command): New function.
10505 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10506 operations structure.
10507 (_initialize_ada_language): Add "catch handlers" command entry.
10508 * NEWS: Document "catch handlers" feature.
10510 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10512 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10513 account when creating the array type of the slice.
10514 (ada_value_slice): Likewise.
10516 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10518 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10520 (create_array_type_with_stride): Add byte_stride_prop parameter.
10521 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10522 New parameter. Update all callers in this file.
10523 (array_type_has_dynamic_stride): New function.
10524 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10525 of arrays with dynamic byte strides.
10526 * dwarf2read.c (read_array_type): Add support for dynamic
10527 DW_AT_byte_stride attributes.
10529 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10531 * dwarf2read.c (read_unspecified_type): Treat
10532 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10534 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10536 Update copyright year range in all GDB files.
10538 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10540 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10541 and gdb/testsuite/gdb.base/step-line.c.
10543 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10545 * copyright.py (main): Dump the contents of
10546 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10547 even if BY_HAND is empty.
10549 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10551 * top.c (print_gdb_version): Update Copyright year in version
10554 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10556 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10558 For older changes see ChangeLog-2017.
10564 version-control: never