1 2018-07-20 Tom Tromey <tom@tromey.com>
3 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4 * stabsread.c (patch_block_stabs, define_symbol, read_type)
5 (read_enum_type, common_block_start, common_block_end)
6 (cleanup_undefined_types_1, finish_global_stabs): Update.
7 * mdebugread.c (psymtab_to_symtab_1): Update.
8 * dwarf2read.c (fixup_go_packaging, read_func_scope)
9 (read_lexical_block_scope, new_symbol): Update.
10 * dbxread.c (process_one_symbol): Update.
11 * coffread.c (coff_symtab_read, process_coff_symbol)
12 (coff_read_enum_type): Update.
13 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
15 (get_local_symbols, get_file_symbols, get_global_symbols): New
17 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
19 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
20 (~scoped_free_pendings): Update.
21 (finish_block, prepare_for_building, reset_symtab_globals)
22 (end_symtab_get_static_block, end_symtab_with_blockvector)
23 (augment_type_symtab, push_context): Update.
24 (get_local_symbols, get_file_symbols, get_global_symbols): New
26 (buildsym_init): Update.
28 2018-07-20 Tom Tromey <tom@tromey.com>
30 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
31 (process_full_type_unit): Likewise.
32 (dwarf2_start_symtab): Set list_in_scope.
34 2018-07-20 Tom Tromey <tom@tromey.com>
36 * dwarf2read.c (process_psymtab_comp_unit_reader)
37 (build_type_psymtabs_reader): Do not set list_in_scope.
39 2018-07-20 Tom Tromey <tom@tromey.com>
41 * buildsym.c (free_pendings): Remove.
42 (add_symbol_to_list, scoped_free_pendings)
43 (finish_block_internal, buildsym_init): Update.
45 2018-07-20 Tom Tromey <tom@tromey.com>
47 * xcoffread.c (read_xcoff_symtab): Update.
48 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
50 * dbxread.c (process_one_symbol): Update.
51 * coffread.c (coff_symtab_read): Update.
52 * buildsym.h (finish_block): Update.
53 * buildsym.c (finish_block): Remove "listhead" argument.
54 (end_symtab_get_static_block): Update.
56 2018-07-20 Tom Tromey <tom@tromey.com>
58 * buildsym.h (class scoped_free_pendings): Remove constructor.
59 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
61 <m_pending_block_obstack, m_pending_blocks>: New members.
62 (pending_block_obstack, pending_blocks): Remove.
63 (scoped_free_pendings::scoped_free_pendings): Default.
64 (~scoped_free_pendings): Update.
65 (free_pending_blocks): Remove.
66 (finish_block_internal, record_pending_block, make_blockvector)
67 (end_symtab_get_static_block, augment_type_symtab, push_context)
68 (buildsym_init): Update.
70 2018-07-20 Tom Tromey <tom@tromey.com>
72 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
73 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
75 (pending_addrmap, pending_addrmap_obstack)
76 (pending_addrmap_interesting): Remove.
77 (scoped_free_pendings, record_block_range, make_blockvector)
78 (prepare_for_building, reset_symtab_globals, buildsym_init):
81 2018-07-20 Tom Tromey <tom@tromey.com>
83 * xcoffread.c (process_linenos): Update.
84 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
85 * mdebugread.c (psymtab_to_symtab_1): Update.
86 * dwarf2read.c (setup_type_unit_groups)
87 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
88 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
89 * dbxread.c (process_one_symbol): Update.
90 * coffread.c (coff_symtab_read, enter_linenos)
91 (process_coff_symbol): Update.
92 * buildsym.h (current_subfile): Don't declare.
93 (get_current_subfile): Declare.
94 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
96 (start_subfile, free_buildsym_compunit, push_subfile)
97 (prepare_for_building, start_symtab): Update.
98 (get_current_subfile): New function.
100 2018-07-20 Tom Tromey <tom@tromey.com>
102 * coffread.c (coff_symtab_read): Update.
103 * xcoffread.c (read_xcoff_symtab): Update.
104 * dwarf2read.c (new_symbol): Update.
105 (read_func_scope, read_lexical_block_scope): Update.
106 * dbxread.c (process_one_symbol): Update.
107 * buildsym.h (context_stack, context_stack_depth): Don't declare.
108 (outermost_context_p): Remove macro.
109 (outermost_context_p, get_current_context_stack)
110 (get_context_stack_depth): Declare.
111 (pop_context): Return struct context_stack.
112 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
114 (context_stack_size): Remove.
115 (INITIAL_CONTEXT_STACK_SIZE): Remove.
116 (prepare_for_building, end_symtab_get_static_block)
117 (augment_type_symtab, push_context): Update.
118 (pop_context): Return struct context_stack.
119 (outermost_context_p, get_current_context_stack)
120 (get_context_stack_depth): New functions.
121 (buildsym_init): Update.
123 2018-07-20 Tom Tromey <tom@tromey.com>
125 * rust-exp.y: Now a pure parser. Update all rules.
126 (%union): Move earlier.
127 (current_parser, work_obstack): Remove globals.
128 (rust_parser, ~rust_parser): Update.
129 (class rust_parser) <copy_name, concat3, crate_name, super_name,
130 lex_character, lex_number, lex_string, lex_identifier,
131 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
132 convert_name, convert_params_to_expression,
133 convert_ast_to_expression, ast_basic_type, ast_operation,
134 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
135 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
136 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
137 ast_array_type, ast_slice_type, ast_reference_type,
138 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
139 (rust_parse): Update.
140 (rustyyerror, rustyylex): Add parser parameter.
141 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
142 (rust_lex_stringish_test, rust_lex_test_sequence)
143 (rust_lex_test_trailing_dot, rust_lex_test_completion)
144 (rust_lex_test_push_back, rust_lex_tests): Update.
146 2018-07-19 Pedro Alves <palves@redhat.com>
148 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
149 gdb::unique_xmalloc_ptr.
150 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
151 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
152 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
154 * guile/scm-pretty-print.c (ppscm_print_children): Use
155 gdb::unique_xmalloc_ptr instead of cleanups.
156 (gdbscm_apply_val_pretty_printer): Remove cleanups.
157 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
158 gdb::unique_xmalloc_ptr.
159 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
160 Adjust to use gdb::unique_xmalloc_ptr.
161 * guile/scm-utils.c (extract_arg): Adjust.
162 * guile/scm-value.c (gdbscm_value_field): Adjust to use
163 gdb::unique_xmalloc_ptr instead of a cleanup.
165 2018-07-19 Tom Tromey <tom@tromey.com>
167 * utils.c (do_value_free_to_mark)
168 (make_cleanup_value_free_to_mark): Remove.
169 * utils.h (make_cleanup_value_free_to_mark): Remove.
171 2018-07-19 Pedro Alves <palves@redhat.com>
173 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
174 forwarding reference.
176 2018-07-18 Pedro Alves <palves@redhat.com>
178 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
179 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
182 2018-07-18 Pedro Alves <palves@redhat.com>
184 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
186 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
188 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
189 directly instead of a cleanup.
190 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
191 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
192 (vlscm_binop_gdbthrow): New, factored out from ...
193 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
194 (vlscm_rich_compare): Use gdbscm_wrap.
195 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
196 instead of a cleanup.
197 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
199 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
200 Use xfree directly instead of a cleanup.
201 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
202 Adjust to use gdbscm_wrap and scoped_value_mark.
203 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
204 (gdbscm_value_address, gdbscm_value_dereference)
205 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
207 (gdbscm_value_dynamic_type): Use scoped_value_mark.
208 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
210 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
211 gdbscm_wrap and scoped_value_mark.
212 (gdbscm_value_to_string): Use xfree directly instead of a
213 cleanup. Move 'buffer' unique_ptr to TRY scope.
214 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
215 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
217 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
218 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
220 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
223 2018-07-18 Tom de Vries <tdevries@suse.de>
225 * findvar.c (default_read_var_value): Also resolve dynamic type for
226 LOC_OPTIMIZED_OUT vars.
228 2018-07-18 Maciej W. Rozycki <macro@mips.com>
230 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
233 2018-07-17 Tom Tromey <tom@tromey.com>
235 * guile/scm-param.c (pascm_set_func, pascm_show_func)
236 (compute_enum_list, pascm_set_param_value_x)
237 (gdbscm_parameter_value): Update.
238 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
239 (gdbscm_scm_to_host_string): Update.
240 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
242 * guile/scm-cmd.c (cmdscm_add_completion): Update.
243 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
244 * guile/scm-string.c (gdbscm_scm_to_string): Return
246 (gdbscm_scm_to_host_string): Likewise.
248 2018-07-17 Tom Tromey <tom@tromey.com>
250 * guile/guile.c (gdbscm_eval_from_control_command): Update.
251 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
252 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
253 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
256 2018-07-17 Tom Tromey <tom@tromey.com>
258 * guile/scm-param.c (pascm_signal_setshow_error): Update.
259 * guile/guile-internal.h (gdbscm_exception_message_to_string):
261 * guile/scm-cmd.c (cmdscm_function): Update.
262 * guile/scm-pretty-print.c
263 (ppscm_print_exception_unless_memory_error): Update.
264 * guile/scm-exception.c (gdbscm_exception_message_to_string):
265 Return unique_xmalloc_ptr.
267 2018-07-17 Tom Tromey <tom@tromey.com>
269 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
272 2018-07-17 Jim Wilson <jimw@sifive.com>
274 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
275 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
276 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
277 unecessary braces after EF_RISCV_RVC test. Delete call to
278 set_gdbarch_decr_pc_after_break.
280 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
281 RISCV_LAST_FP_REGNUM + 1.
282 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
284 2018-07-17 Tom Tromey <tom@tromey.com>
286 * configure.ac: Remove --disable-gdbcli.
287 * configure: Rebuild.
288 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
289 (SUBDIR_CLI_CFLAGS): Remove.
290 (SFILES): Use SUBDIR_CLI_SRCS.
291 (COMMON_OBS): Use SUBDIR_CLI_OBS.
293 2018-07-17 Tom Tromey <tom@tromey.com>
296 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
298 2018-07-16 Jim Wilson <jimw@sifive.com>
300 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
302 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
304 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
306 (libunwind_frame_sniffer): Likewise.
307 (libunwind_frame_prev_register): Likewise.
308 (libunwind_sigtramp_frame_sniffer): Likewise.
309 * ia64-tdep.c (ia64_access_reg): Likewise.
310 (ia64_access_rse_reg): Likewise.
311 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
312 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
314 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
316 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
318 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
320 * remote-sim.c (gdbsim_target::close,
321 gdbsim_target::mourn_inferior): Remove unused variables.
323 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
325 * ia64-tdep.c (ktab_buf): New global.
326 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
327 (get_kernel_table): Adjust.
329 2018-07-16 Tom Tromey <tom@tromey.com>
331 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
332 * dwarf2read.c (using_directives, new_symbol): Use
334 * dbxread.c (process_one_symbol): Use outermost_context_p.
335 * coffread.c (coff_symtab_read): Use outermost_context_p.
337 2018-07-16 Tom Tromey <tom@tromey.com>
339 * dwarf2read.c (using_directives, read_func_scope)
340 (read_lexical_block_scope): Update.
341 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
342 * buildsym.h (local_using_directives, global_using_directives):
344 (get_local_using_directives, set_local_using_directives)
345 (get_global_using_directives): Declare.
346 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
347 m_global_using_directives>: New members.
348 (finish_block_internal, prepare_for_building)
349 (reset_symtab_globals, end_symtab_get_static_block)
350 (push_context): Update.
351 (get_local_using_directives, set_local_using_directives)
352 (get_global_using_directives): New functions.
353 (buildsym_init): Update.
355 2018-07-16 Tom Tromey <tom@tromey.com>
357 * xcoffread.c (xcoff_initial_scan): Don't call
359 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
360 * buildsym.h (class scoped_free_pendings): Add constructor.
361 (free_pending_blocks): Don't declare.
362 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
363 (free_pending_blocks): Now static.
365 2018-07-16 Tom Tromey <tom@tromey.com>
367 * buildsym.h (push_subfile, pop_subfile): Update declarations.
368 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
370 (struct subfile_stack): Remove.
371 (subfile_stack): Remove.
372 (push_subfile, pop_subfile, buildsym_init): Update.
374 2018-07-16 Tom Tromey <tom@tromey.com>
376 * buildsym.c (push_subfile): Use gdb_assert.
377 (pop_subfile): Use gdb_assert.
379 2018-07-16 Tom Tromey <tom@tromey.com>
381 * buildsym.h (merge_symbol_lists): Remove.
382 * buildsym.c (merge_symbol_lists): Remove.
384 2018-07-16 Tom Tromey <tom@tromey.com>
386 * stabsread.c (scan_file_globals): Update comment.
387 * stabsread.h (scan_file_globals): Move from buildsym.h.
388 * buildsym.h (scan_file_globals): Move to stabsread.h.
390 2018-07-16 Tom Tromey <tom@tromey.com>
392 * xcoffread.c (xcoff_new_init): Update.
393 * mipsread.c (mipscoff_new_init): Update.
394 * mdebugread.c (mdebug_build_psymtabs): Update.
395 * elfread.c (elf_new_init): Update.
396 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
397 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
398 * buildsym.h (buildsym_new_init): Don't declare.
399 * buildsym.c (buildsym_new_init): Remove.
401 2018-07-16 Tom Tromey <tom@tromey.com>
403 * stabsread.h (within_function): Move from buildsym.h.
404 * stabsread.c (start_stabs): Clear within_function.
405 * coffread.c (coff_start_symtab): Clear within_function.
406 * buildsym.h (within_function): Move to stabsread.h.
407 * buildsym.c (prepare_for_building): Update.
409 2018-07-16 Tom Tromey <tom@tromey.com>
411 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
412 * dwarf2read.c (dwarf2_start_symtab): Don't set
413 processing_gcc_compilation.
414 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
416 2018-07-16 Tom Tromey <tom@tromey.com>
418 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
419 (next_symbol_text_func): Move from buildsym.h.
420 * stabsread.c (hashname): Move from buildsym.c.
421 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
422 (next_symbol_text_func, hashname): Move to stabsread.h.
423 * buildsym.c: Don't include bcache.h
424 (hashname): Move to stasbread.c.
426 2018-07-16 Tom Tromey <tom@tromey.com>
428 * buildsym.h (context_stack_size): Don't declare.
429 * buildsym.c (context_stack_size): New global.
431 2018-07-16 Tom Tromey <tom@tromey.com>
433 * dbxread.c (processing_acc_compilation): New global.
434 * buildsym.h (processing_acc_compilation): Don't declare.
436 2018-07-16 Tom Tromey <tom@tromey.com>
438 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
439 * dbxread.c (read_ofile_symtab): Update.
440 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
441 * buildsym.h (last_source_start_addr): Remove.
442 (set_last_source_start_addr, get_last_source_start_addr):
444 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
446 (struct buildsym_compunit) <m_last_source_start_addr>: New
448 (prepare_for_building): Remove start_addr parameter.
449 (start_symtab, restart_symtab, end_symtab_get_static_block)
450 (end_symtab_with_blockvector): Update.
451 (set_last_source_start_addr, get_last_source_start_addr): New
454 2018-07-16 Tom Tromey <tom@tromey.com>
456 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
458 (have_line_numbers): Remove.
459 (record_line, prepare_for_building, end_symtab_get_static_block)
460 (augment_type_symtab): Update.
462 2018-07-16 Tom Tromey <tom@tromey.com>
464 * buildsym.c (~buildsym_compunit): Free the macro table.
465 (struct buildsym_compunit) <get_macro_table, release_macros>: New
467 <m_pending_macros>: New member.
468 (pending_macros): Remove.
469 (~scoped_free_pendings, get_macro_table, prepare_for_building)
470 (reset_symtab_globals, end_symtab_get_static_block)
471 (end_symtab_with_blockvector, augment_type_symtab)
472 (buildsym_init): Update.
474 2018-07-16 Tom Tromey <tom@tromey.com>
476 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
478 (buildsym_compunit::set_last_source_file): New method.
479 <m_last_source_file>: New member.
480 (prepare_for_building): Remove "name" parameter.
481 (start_symtab, restart_symtab, reset_symtab_globals): Update.
482 (last_source_file): Remove.
483 (set_last_source_file, get_last_source_file): Update.
485 2018-07-16 Tom Tromey <tom@tromey.com>
487 * buildsym.c (prepare_for_building): Add assert.
489 2018-07-16 Tom Tromey <tom@tromey.com>
491 * buildsym.c (~buildsym_compunit): Update.
492 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
493 (start_subfile, patch_subfile_names)
494 (end_symtab_with_blockvector): Update.
496 2018-07-16 Tom Tromey <tom@tromey.com>
498 * buildsym.c (struct buildsym_compunit): Add constructor,
499 destructor, initializers.
500 (start_buildsym_compunit): Remove.
501 (free_buildsym_compunit): Use "delete".
502 (start_symtab, restart_symtab): Use "new".
504 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
506 * symfile.c (set_objfile_default_section_offset): Remove struct
509 2018-07-14 Stafford Horne <shorne@gmail.com>
511 * (Responsible Maintainers): Add myself as or1k maintainer.
513 2018-07-13 Tom Tromey <tom@tromey.com>
515 * symfile.c (set_objfile_default_section_offset): Use extra braces
518 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
520 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
523 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
525 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
526 unittests/cli-utils-selftests.c
527 * unittests/cli-utils-selftests.c: New file.
529 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
531 * NEWS: Mention new commands. Mention change to 'thread apply'.
533 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
535 * thread.c (thr_try_catch_cmd): New function.
536 (thread_apply_all_command): Handle qcs flags.
537 (thread_apply_command): Handle qcs flags.
538 (taas_command): New function.
539 (tfaas_command): New function.
540 (_initialize_thread): Update to setup the new commands 'taas
541 and 'tfaas'. Change doc string for 'thread apply'.
543 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
545 * stack.c: (trailing_outermost_frame): New function, mostly
546 extracted from backtrace_command_1.
547 (leading_innermost_frame): New function.
548 (backtrace_command_1): Update to call trailing_outermost_frame.
549 (frame_apply_command_count): New function.
550 (frame_apply_level_command): New function.
551 (frame_apply_all_command): New function.
552 (frame_apply_command): New function.
553 (faas_command): New function.
554 (frame_cmd_list): New variable.
555 (_initialize_stack): Update to setup the new commands 'frame apply'
558 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
560 * cli-utils.c (number_or_range_parser::get_number): Only handle
561 numbers or convenience var as numbers.
562 (parse_flags): New function.
563 (parse_flags_qcs): New function.
564 (number_or_range_parser::finished): Ensure parsing end is detected
565 before end of string.
566 * cli-utils.h (parse_flags): New function.
567 (parse_flags_qcs): New function.
568 (number_or_range_parser): Remove m_finished bool.
569 (number_or_range_parser::skip_range): Set m_in_range to false.
571 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
573 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
576 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
577 Jan Kratochvil <jan.kratochvil@redhat.com>
578 Paul Fertser <fercerpav@gmail.com>
579 Tsutomu Seki <sekiriki@gmail.com>
580 Pedro Alves <palves@redhat.com>
582 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
583 'unittests/parse-connection-spec-selftests.c'.
584 (COMMON_SFILES): Add 'common/netstuff.c'.
585 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
586 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
587 * common/netstuff.c: New file.
588 * common/netstuff.h: New file.
589 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
590 (wait_for_connect): Update comment. New parameter
591 'gdb::optional<int> sock' instead of 'struct serial *scb'.
592 Use 'sock' directly instead of 'scb->fd'.
593 (try_connect): New function, with code from 'net_open'.
594 (net_open): Rewrite main loop to deal with multiple
595 sockets/addresses. Handle IPv6-style hostnames; implement
596 support for IPv6 connections.
597 * unittests/parse-connection-spec-selftests.c: New file.
599 2018-07-11 Pedro Alves <palves@redhat.com>
602 * remote.c (remote_target::remote_detach_pid): Call
605 2018-07-11 Pedro Alves <palves@redhat.com>
607 * h8300-tdep.c (h8300_gdbarch_init): Remove
608 set_gdbarch_ecoff_reg_to_regnum calls.
610 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
613 * c-typeprint.c (c_type_print_base_struct_union): Don't print
614 offsets/sizes for static members of a class/struct.
616 2018-07-11 Alan Hayward <alan.hayward@arm.com>
618 * target-descriptions.c (tdesc_register_bitsize): Rename.
619 * target-descriptions.h (tdesc_register_bitsize): Likewise.
620 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
621 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
623 2018-07-10 Tom Tromey <tom@tromey.com>
625 * breakpoint.c (moribund_locations): Now static and a
627 (breakpoint_init_inferior, moribund_breakpoint_here_p)
628 (build_bpstat_chain, update_global_location_list)
629 (breakpoint_retire_moribund): Update.
630 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
633 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
635 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
636 (riscv_register_reggroup_p): Use new function, remove unneeded
638 (riscv_push_dummy_call): Extend assert to compare against xlen or
639 flen based on register type.
641 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
643 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
645 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
647 * remote.c (show_hardware_watchpoint_limit): New function.
648 (show_hardware_watchpoint_length_limit): New function.
649 (show_hardware_breakpoint_limit): New function.
650 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
651 where appropriate, update help text.
653 2018-07-09 Tom Tromey <tom@tromey.com>
655 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
656 (CLIBS): Don't mention NAT_CLIBS.
658 2018-07-09 Tom Tromey <tom@tromey.com>
660 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
661 (LIBGDB_OBS, clean mostlyclean): Update.
662 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
664 2018-07-09 Tom Tromey <tom@tromey.com>
666 * Makefile.in (%.c: %.y): Use ECHO_YACC.
667 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
668 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
670 2018-07-09 Tom Tromey <tom@tromey.com>
672 * Makefile.in (ALLDEPFILES): Remove exec.c.
673 (COMMON_OBS): Remove exec.o.
674 (COMMON_SFILES): Add exec.c.
676 2018-07-09 Tom Tromey <tom@tromey.com>
678 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
680 2018-07-09 Tom Tromey <tom@tromey.com>
682 * Makefile.in (clean mostlyclean): Remove stamp-version.
683 (version.c): Depend on stamp-version.
684 (stamp-version): New rule, from version.c rule.
686 2018-07-09 Tom Tromey <tom@tromey.com>
688 * Makefile.in (init.c): Depend on stamp-init.
689 (stamp-init): New rule, from init.c rule.
690 (clean mostlyclean): Remove stamp-init.
692 2018-07-09 Tom Tromey <tom@tromey.com>
694 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
695 SUBDIR_GCC_COMPILE_SRCS.
697 2018-07-09 Tom Tromey <tom@tromey.com>
699 * Makefile.in (init.c): Remove some unused sed rules.
701 2018-07-09 Tom Tromey <tom@tromey.com>
703 * Makefile.in (TSOBS): Remove.
704 (INIT_FILES): Update.
705 (LIBGDB_OBS): Update.
706 (COMMON_SFILES): Add inflow.c.
707 (SFILES): Remove inflow.c.
709 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
711 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
713 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
715 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
716 get_saveloc_name, is_signal_frame_name, step_name,
717 init_remote_name, create_addr_space_name,
718 destroy_addr_space_name, search_unwind_table_name,
719 find_dyn_list_name): Constify.
721 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
723 * darwin-nat.c (darwin_pthread_kill): New function.
724 (darwin_resume_thread): Use darwin_pthread_kill.
726 2018-07-05 Tom de Vries <tdevries@suse.de>
728 * macroexp.c (macro_buffer) <operator=>: New member function.
730 2018-07-04 Tom Tromey <tom@tromey.com>
732 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
734 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
736 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
737 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
741 2018-07-04 Joel Brobecker <brobecker@adacore.com>
743 * NEWS: Create a new section for the next release branch.
744 Rename the section of the current branch, now that it has
747 2018-07-04 Joel Brobecker <brobecker@adacore.com>
749 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
750 * version.in: Bump version to 8.2.50.DATE-git.
752 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
753 Pedro Alves <palves@redhat.com>
755 * linux-nat.c (linux_init_ptrace): Rename to ...
756 (linux_init_ptrace_procfs): ... this. Call
757 linux_proc_init_warnings.
758 (linux_nat_target::post_attach)
759 (linux_nat_target::post_startup_inferior): Adjust.
760 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
761 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
763 2018-07-04 Tom de Vries <tdevries@suse.de>
765 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
767 (read_comp_unit_head): ... here.
769 2018-07-03 Tom Tromey <tom@tromey.com>
771 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
772 (stop_tracing, tstatus_command)
773 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
774 (print_one_static_tracepoint_marker): Update.
775 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
777 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
779 (all_tracepoints, static_tracepoints_here): Return std::vector.
781 2018-07-03 Tom Tromey <tom@tromey.com>
783 * common/ptid.c (ptid_equal): Remove.
784 * common/ptid.h (ptid_equal): Don't declare.
785 * ada-tasks.c: Update.
786 * breakpoint.c: Update.
787 * common/agent.c: Update.
789 * darwin-nat-info.c: Update.
790 * darwin-nat.c: Update.
792 * dtrace-probe.c: Update.
793 * dummy-frame.c: Update.
794 * fbsd-nat.c: Update.
796 * gdbthread.h: Update.
798 * go32-nat.c: Update.
799 * inf-loop.c: Update.
800 * inf-ptrace.c: Update.
805 * linux-fork.c: Update.
806 * linux-nat.c: Update.
807 * linux-thread-db.c: Update.
808 * mi/mi-cmd-var.c: Update.
809 * mi/mi-interp.c: Update.
810 * mi/mi-main.c: Update.
811 * nto-procfs.c: Update.
812 * ppc-linux-tdep.c: Update.
814 * python/py-inferior.c: Update.
815 * python/py-record-btrace.c: Update.
816 * python/py-record.c: Update.
817 * ravenscar-thread.c: Update.
818 * regcache.c: Update.
819 * remote-sim.c: Update.
821 * sol-thread.c: Update.
824 * tui/tui-stack.c: Update.
826 * windows-nat.c: Update.
827 * windows-tdep.c: Update.
829 2018-07-03 Tom Tromey <tom@tromey.com>
831 * common/ptid.c (ptid_match): Remove.
832 * common/ptid.h (ptid_match): Don't declare.
833 * fbsd-nat.c: Update.
836 * linux-nat.c: Update.
837 * record-btrace.c: Update.
838 * regcache.c: Update.
841 2018-07-03 Tom Tromey <tom@tromey.com>
843 * common/ptid.c (ptid_tid_p): Remove.
844 * common/ptid.h (ptid_tid_p): Don't declare.
845 * sol-thread.c: Update.
847 2018-07-03 Tom Tromey <tom@tromey.com>
849 * common/ptid.c (ptid_lwp_p): Remove.
850 * common/ptid.h (ptid_lwp_p): Don't declare.
851 * fbsd-nat.c: Update.
852 * linux-nat.c: Update.
853 * nat/linux-procfs.c: Update.
854 * nat/x86-linux-dregs.c: Update.
855 * sol-thread.c: Update.
857 2018-07-03 Tom Tromey <tom@tromey.com>
859 * common/ptid.c (ptid_is_pid): Remove.
860 * common/ptid.h (ptid_is_pid): Don't declare.
862 * linux-nat.c: Update.
863 * mi/mi-interp.c: Update.
867 2018-07-03 Tom Tromey <tom@tromey.com>
869 * common/ptid.c (ptid_get_tid): Remove.
870 * common/ptid.h (ptid_get_tid): Don't declare.
871 * ada-tasks.c: Update.
872 * aix-thread.c: Update.
873 * bsd-uthread.c: Update.
874 * darwin-nat.c: Update.
875 * fbsd-nat.c: Update.
876 * i386-darwin-nat.c: Update.
878 * linux-tdep.c: Update.
879 * nto-procfs.c: Update.
880 * ppc-ravenscar-thread.c: Update.
881 * python/py-infthread.c: Update.
882 * ravenscar-thread.c: Update.
883 * sol-thread.c: Update.
884 * sparc-ravenscar-thread.c: Update.
885 * windows-nat.c: Update.
887 2018-07-03 Tom Tromey <tom@tromey.com>
889 * common/ptid.c (ptid_get_lwp): Remove.
890 * common/ptid.h (ptid_get_lwp): Don't declare.
891 * aarch64-linux-nat.c: Update.
892 * ada-tasks.c: Update.
893 * aix-thread.c: Update.
894 * amd64-linux-nat.c: Update.
895 * arm-linux-nat.c: Update.
897 * fbsd-nat.c: Update.
898 * fbsd-tdep.c: Update.
900 * i386-cygwin-tdep.c: Update.
901 * i386-gnu-nat.c: Update.
902 * i386-linux-nat.c: Update.
903 * ia64-linux-nat.c: Update.
904 * inf-ptrace.c: Update.
906 * linux-fork.c: Update.
907 * linux-nat.c: Update.
908 * linux-tdep.c: Update.
909 * linux-thread-db.c: Update.
910 * mips-linux-nat.c: Update.
911 * nat/aarch64-linux-hw-point.c: Update.
912 * nat/aarch64-linux.c: Update.
913 * nat/linux-btrace.c: Update.
914 * nat/linux-osdata.c: Update.
915 * nat/linux-procfs.c: Update.
916 * nat/x86-linux-dregs.c: Update.
917 * obsd-nat.c: Update.
918 * ppc-fbsd-nat.c: Update.
919 * ppc-linux-nat.c: Update.
921 * python/py-infthread.c: Update.
922 * ravenscar-thread.c: Update.
924 * s390-linux-nat.c: Update.
925 * sol-thread.c: Update.
926 * sol2-tdep.c: Update.
927 * spu-linux-nat.c: Update.
928 * x86-linux-nat.c: Update.
929 * xtensa-linux-nat.c: Update.
931 2018-07-03 Tom Tromey <tom@tromey.com>
933 * common/ptid.c (ptid_get_pid): Remove.
934 * common/ptid.h (ptid_get_pid): Don't declare.
935 * aarch64-linux-nat.c: Update.
936 * ada-lang.c: Update.
937 * aix-thread.c: Update.
938 * alpha-bsd-nat.c: Update.
939 * amd64-fbsd-nat.c: Update.
940 * amd64-linux-nat.c: Update.
941 * arm-linux-nat.c: Update.
942 * arm-nbsd-nat.c: Update.
944 * break-catch-syscall.c: Update.
945 * breakpoint.c: Update.
946 * bsd-uthread.c: Update.
949 * darwin-nat.c: Update.
950 * fbsd-nat.c: Update.
951 * fbsd-tdep.c: Update.
954 * hppa-nbsd-nat.c: Update.
955 * hppa-obsd-nat.c: Update.
956 * i386-fbsd-nat.c: Update.
957 * ia64-linux-nat.c: Update.
958 * inf-ptrace.c: Update.
960 * inferior.c: Update.
961 * inferior.h: Update.
964 * linux-fork.c: Update.
965 * linux-nat.c: Update.
966 * linux-tdep.c: Update.
967 * linux-thread-db.c: Update.
968 * m68k-bsd-nat.c: Update.
969 * mi/mi-interp.c: Update.
970 * mi/mi-main.c: Update.
971 * mips-linux-nat.c: Update.
972 * mips-nbsd-nat.c: Update.
973 * mips64-obsd-nat.c: Update.
974 * nat/aarch64-linux-hw-point.c: Update.
975 * nat/aarch64-linux.c: Update.
976 * nat/linux-btrace.c: Update.
977 * nat/linux-osdata.c: Update.
978 * nat/linux-procfs.c: Update.
979 * nat/x86-linux-dregs.c: Update.
980 * nto-procfs.c: Update.
981 * obsd-nat.c: Update.
982 * ppc-linux-nat.c: Update.
983 * ppc-nbsd-nat.c: Update.
984 * ppc-obsd-nat.c: Update.
985 * proc-service.c: Update.
987 * python/py-inferior.c: Update.
988 * python/py-infthread.c: Update.
989 * ravenscar-thread.c: Update.
991 * remote-sim.c: Update.
993 * rs6000-nat.c: Update.
994 * s390-linux-nat.c: Update.
995 * sh-nbsd-nat.c: Update.
996 * sol-thread.c: Update.
997 * sparc-nat.c: Update.
998 * sparc64-tdep.c: Update.
999 * spu-linux-nat.c: Update.
1000 * spu-tdep.c: Update.
1001 * target-debug.h: Update.
1004 * tid-parse.c: Update.
1005 * tracefile-tfile.c: Update.
1006 * vax-bsd-nat.c: Update.
1007 * windows-nat.c: Update.
1008 * x86-linux-nat.c: Update.
1009 * x86-nat.c: Update.
1011 2018-07-03 Tom Tromey <tom@tromey.com>
1013 * common/ptid.c (pid_to_ptid): Remove.
1014 * common/ptid.h (pid_to_ptid): Don't declare.
1015 * aix-thread.c: Update.
1016 * arm-linux-nat.c: Update.
1017 * common/ptid.c: Update.
1018 * common/ptid.h: Update.
1019 * corelow.c: Update.
1021 * darwin-nat.c: Update.
1022 * fbsd-nat.c: Update.
1023 * fork-child.c: Update.
1024 * gnu-nat.c: Update.
1025 * go32-nat.c: Update.
1026 * inf-ptrace.c: Update.
1028 * inferior.c: Update.
1030 * linux-fork.c: Update.
1031 * linux-nat.c: Update.
1032 * nat/aarch64-linux-hw-point.c: Update.
1033 * nat/fork-inferior.c: Update.
1034 * nat/x86-linux-dregs.c: Update.
1035 * nto-procfs.c: Update.
1036 * obsd-nat.c: Update.
1038 * progspace.c: Update.
1040 * rs6000-nat.c: Update.
1041 * s390-linux-nat.c: Update.
1042 * sol-thread.c: Update.
1043 * spu-linux-nat.c: Update.
1046 * tracefile-tfile.c: Update.
1047 * windows-nat.c: Update.
1049 2018-07-03 Tom Tromey <tom@tromey.com>
1051 * common/ptid.h (ptid_build): Don't declare.
1052 * common/ptid.c (ptid_build): Remove.
1053 * aix-thread.c: Update.
1054 * bsd-kvm.c: Update.
1055 * bsd-uthread.c: Update.
1056 * common/agent.c: Update.
1057 * common/ptid.c: Update.
1058 * common/ptid.h: Update.
1059 * corelow.c: Update.
1060 * darwin-nat.c: Update.
1061 * fbsd-nat.c: Update.
1062 * gnu-nat.c: Update.
1063 * linux-fork.c: Update.
1064 * linux-nat.c: Update.
1065 * linux-thread-db.c: Update.
1066 * nat/linux-osdata.c: Update.
1067 * nat/linux-procfs.c: Update.
1068 * nto-procfs.c: Update.
1069 * obsd-nat.c: Update.
1070 * proc-service.c: Update.
1072 * ravenscar-thread.c: Update.
1073 * remote-sim.c: Update.
1075 * sol-thread.c: Update.
1077 * windows-nat.c: Update.
1079 2018-07-03 Tom Tromey <tom@tromey.com>
1081 * infrun.c (follow_exec): Use exit_inferior_silent.
1082 * inferior.c (exit_inferior_num_silent): Remove.
1083 * inferior.h (exit_inferior_num_silent): Don't declare.
1085 2018-07-03 Tom Tromey <tom@tromey.com>
1088 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1089 inferior_ptid on error.
1091 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1092 Simon Marchi <simon.marchi@polymtl.ca>
1095 * disasm.h (gdb_disassembler): Add
1096 `m_disassembler_options_holder'. member
1097 * disasm.c (get_all_disassembler_options): New function.
1098 (gdb_disassembler::gdb_disassembler): Use it.
1099 (gdb_buffered_insn_length_init_dis): Likewise.
1100 (gdb_buffered_insn_length): Adjust accordingly.
1101 (set_disassembler_options): Handle options with arguments.
1102 (show_disassembler_options_sfunc): Likewise. Add a leading new
1103 line if showing options with descriptions.
1104 (disassembler_options_completer): Adapt to using the
1105 `disasm_options_and_args_t' structure.
1106 * mips-tdep.c (mips_disassembler_options): New variable.
1107 (mips_disassembler_options_o32): Likewise.
1108 (mips_disassembler_options_n32): Likewise.
1109 (mips_disassembler_options_n64): Likewise.
1110 (gdb_print_insn_mips): Don't set `disassembler_options'.
1111 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1113 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1114 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1115 `gdbarch_disassembler_options_implicit' and
1116 `gdbarch_valid_disassembler_options'.
1117 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1118 `disasm_options_and_args_t' structure.
1119 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1121 (valid_disassembler_options): Switch from `disasm_options_t' to
1122 the `disasm_options_and_args_t' structure.
1123 * NEWS: Document `set disassembler-options' support for the MIPS
1125 * gdbarch.h: Regenerate.
1126 * gdbarch.c: Regenerate.
1128 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1130 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1132 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1134 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1135 parameter in call to amd64_target_description.
1136 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1137 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1138 (amd64fbsd_init_abi): Likewise.
1139 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1140 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1141 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1142 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1144 2018-06-29 Pedro Alves <palves@redhat.com>
1146 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1147 "segments" parameter.
1148 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1149 (_initialize_amd64_tdep): Update call to
1150 amd64_create_target_description.
1151 (amd64_target_description): Add "segments" parameter. Adjust
1152 the implementation to use it.
1153 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1154 call to amd64_create_target_description.
1155 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1156 * gdb/arch/amd64.h (amd64_create_target_description): Add
1157 "segments" register.
1158 * gdb/arch/amd64.c (amd64_create_target_description): Add
1159 "segments" parameter. Call create_feature_i386_64bit_segments
1160 only if SEGMENTS is true.
1161 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1162 call to amd64_create_target_description.
1164 2018-06-29 Pedro Alves <palves@redhat.com>
1166 * thread.c (thread_target_id_str): New, factored out from ...
1167 (print_thread_info_1): ... here. Use it to compute the max
1168 "Target Id" column width.
1170 2018-06-29 Pedro Alves <palves@redhat.com>
1172 * remote.c (remote_target::extra_thread_info): Delete
1173 'display_buf' and 'n' locals. from the cache, regardless of
1174 packet mechanims is in use. Use cache for qThreadExtra and qP
1177 2018-06-29 Pedro Alves <palves@redhat.com>
1179 * blockframe.c (find_pc_sect_containing_function): New function.
1180 * breakpoint.c (print_breakpoint_location): Don't call
1181 find_pc_sect_function.
1182 * linespec.c (create_sals_line_offset): Record the location's
1184 * linespec.c (convert_address_location_to_sals): Fill in sal's
1185 symbol with find_pc_sect_containing_function.
1186 * symtab.c (find_function_start_sal): Rename to ...
1187 (find_function_start_sal_1): ... this.
1188 (find_function_start_sal): Reimplement as wrapper around
1189 find_function_start_sal_1, and use
1190 find_pc_sect_containing_function to fill in the sal's symbol.
1191 (find_function_start_sal(symbol*, bool)): Adjust.
1192 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1194 (find_pc_sect_containing_function): Declare.
1196 2018-06-29 Pedro Alves <palves@redhat.com>
1198 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1199 true if the the location has no symbol.
1201 2018-06-28 Tom Tromey <tom@tromey.com>
1203 * NEWS: Mention --enable-codesign.
1204 * silent-rules.mk (ECHO_SIGN): New variable.
1205 * configure.ac: Add --enable-codesign.
1206 * configure: Rebuild.
1207 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1208 (gdb$(EXEEXT)): Optionally invoke codesign.
1210 2018-06-28 Pedro Alves <palves@redhat.com>
1212 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1214 (switch_to_thread_no_regs): Adjust comment.
1215 * infcmd.c (stop_pc): Delete.
1216 (post_create_inferior, info_program_command): Replace references
1217 to stop_pc with references to thread_info->suspend.stop_pc.
1218 * inferior.h (stop_pc): Delete declaration.
1219 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1220 (handle_inferior_event_1, handle_signal_stop)
1221 (process_event_stop_test, keep_going_stepped_thread)
1222 (handle_step_into_function, handle_step_into_function_backward)
1223 (print_stop_location): Replace references to stop_pc with
1224 references to thread_info->suspend.stop_pc.
1225 (struct infcall_suspend_state) <stop_pc>: Delete field.
1226 (save_infcall_suspend_state, restore_infcall_suspend_state):
1227 Remove references to inf_stat->stop_pc.
1228 * linux-fork.c (fork_load_infrun_state): Likewise.
1229 * record-btrace.c (record_btrace_set_replay): Likewise.
1230 * record-full.c (record_full_goto_entry): Likewise.
1231 * remote.c (print_one_stopped_thread): Likewise.
1232 * target.c (target_resume): Extend comment.
1233 * thread.c (set_executing_thread): New.
1234 (set_executing): Use it.
1235 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1236 Remove references to stop_pc.
1238 2018-06-28 Pedro Alves <palves@redhat.com>
1240 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1241 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1243 2018-06-28 Tom Tromey <tom@tromey.com>
1245 * coffread.c (coff_symfile_finish): Update.
1246 * xcoffread.c (xcoff_symfile_finish): Update.
1247 * elfread.c (elf_symfile_finish): Update.
1248 * symfile.h (dwarf2_free_objfile): Don't declare.
1249 * dwarf2read.c (_initialize_dwarf2_read): Use
1250 register_objfile_data_with_cleanup.
1251 (dwarf2_free_objfile): Now static. Change signature.
1253 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1255 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1256 option "-o" to add-symbol-file-load to add an offset to each
1257 section's load address.
1258 * symfile.c (set_objfile_default_section_offset): New function.
1260 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1262 * symfile.c (add_symbol_file_command): Make sure that sections
1263 with the same name are sorted in the same order.
1265 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1267 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1268 require the second argument. If omitted, load sections at the
1269 addresses specified in the file.
1271 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1273 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1274 (_initialize_symfile): Add option "-o" to symbol-file to add an
1275 offset to each section of the symbol file.
1277 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1279 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1281 2018-06-27 Tom Tromey <tom@tromey.com>
1283 * stack.c (_initialize_stack): Update "func" help text.
1285 2018-06-27 Tom Tromey <tom@tromey.com>
1287 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1289 (unwind_infopy_str, pyuw_create_unwind_info)
1290 (unwind_infopy_add_saved_register, pyuw_sniffer)
1291 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1293 (struct saved_reg): Add constructor.
1294 <value>: Now a gdbpy_ref<>.
1296 2018-06-27 Tom Tromey <tom@tromey.com>
1298 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1300 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1302 * gdb-gdb.py.in: Format using autopep8.
1304 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1306 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1307 (type_lookup_function): Recognize CORE_ADDR values.
1309 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1311 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1314 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1316 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1319 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1321 * gdb-gdb.py: Move to...
1322 * gdb-gdb.py.in: ... here.
1323 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1324 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1326 (distclean): Remove gdb-gdb.py when cleaning.
1327 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1328 * configure: Re-generate.
1330 2018-06-27 Pedro Alves <palves@redhat.com>
1332 * proc-service.c (get_ps_regcache): New.
1333 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1334 (ps_lsetfpregs): Use it.
1336 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1339 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1340 (dwarf_decode_lines_1): Adjust.
1342 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1344 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1346 <info_proc>: Likewise.
1348 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1350 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1351 to windows_fetch_one_register, and only handle the case of
1352 fetching one register. Move the code that reloads the context
1353 and iterates over all registers if R is negative to...
1354 (windows_nat_target::fetch_registers): ... here.
1355 (do_windows_store_inferior_registers): Rename to
1356 windows_store_one_register, and only handle the case of storing
1357 one register. Move the code that handles the case where r is
1359 (windows_nat_target::store_registers) ... here.
1361 2018-06-26 Tom Tromey <tom@tromey.com>
1364 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1365 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1367 (rust_internal_print_type): Add podata parameter.
1368 (rust_print_type): Update.
1370 2018-06-26 Tom Tromey <tom@tromey.com>
1372 * typeprint.h (struct print_offset_data) <update, finish,
1373 maybe_print_hole>: New methods.
1374 <indentation>: New constant.
1375 * typeprint.c (print_offset_data::indentation): Define.
1376 (print_offset_data::maybe_print_hole, print_offset_data::update)
1377 (print_offset_data::finish): Move from c-typeprint.c and rename.
1378 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1379 (print_spaces_filtered_with_print_options): Update.
1380 (c_print_type_union_field_offset, maybe_print_hole)
1381 (c_print_type_struct_field_offset): Move to typeprint.c and
1383 (c_type_print_base_struct_union): Update.
1385 2018-06-25 Pedro Alves <palves@redhat.com>
1387 * gdbthread.h (thread_info_ref, delete_thread)
1388 (delete_thread_silent, first_thread_of_inferior)
1389 (any_thread_of_inferior, switch_to_thread)
1390 (enable_thread_stack_temporaries)
1391 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1392 (get_last_thread_stack_temporary)
1393 (value_in_thread_stack_temporaries, can_access_registers_thread):
1394 Spell out "struct thread_info" instead of just "thread_info".
1395 * inferior.h (notice_new_inferior): Likewise.
1397 2018-06-25 Pedro Alves <palves@redhat.com>
1399 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1400 pass thread_info pointer to delete_thread.
1401 (windows_nat_target::detach): Pass inferior pointer to
1403 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1405 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1406 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1407 and pass a thread_info pointer to delete_thread.
1408 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1409 pass thread_info pointer to delete_thread.
1410 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1411 delete_thread_silent call.
1412 * procfs.c (procfs_target::detach): Pass inferior pointer to
1414 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1415 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1416 delete_thread_silent call.
1417 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1418 pass thread_info pointer to delete_thread.
1419 (windows_nat_target::detach): Pass inferior pointer to
1422 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1424 * regcache.c (readable_regcache::read_part): Fix asserts.
1425 (reg_buffer::raw_collect_part): New function.
1426 (regcache::write_part): Fix asserts.
1427 (reg_buffer::raw_supply_part): New function.
1428 (regcache::transfer_regset_register): New helper function.
1429 (regcache::transfer_regset): Call new functions.
1430 (regcache_supply_regset): Use gdb_byte*.
1431 (regcache::supply_regset): Likewise.
1432 (regcache_collect_regset): Likewise.
1433 (regcache::collect_regset): Likewise.
1434 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1435 (reg_buffer::raw_supply_part): Likewise.
1436 (regcache::transfer_regset_register): Likewise.
1437 (regcache::transfer_regset): Use gdb_byte*.
1439 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1441 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1443 2018-06-21 Pedro Alves <palves@redhat.com>
1445 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1446 instead of a ptid_t. All callers adjusted.
1447 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1449 (print_ada_task_info, display_current_task_id, task_command_1):
1451 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1453 (breakpoint_kind): Adjust.
1454 (remove_breakpoints_pid): Rename to ...
1455 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1456 pointer. All callers adjusted.
1457 (bpstat_clear_actions): Use inferior_thread.
1458 (get_bpstat_thread): New.
1459 (bpstat_do_actions): Use it.
1460 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1461 to take a thread_info pointer. All callers adjusted.
1462 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1463 (breakpoint_re_set_thread): Use inferior_thread.
1464 * breakpoint.h (struct inferior): Forward declare.
1465 (bpstat_stop_status): Update.
1466 (remove_breakpoints_pid): Delete.
1467 (remove_breakpoints_inf): New.
1468 * bsd-uthread.c (bsd_uthread_target::wait)
1469 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1470 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1471 (maint_btrace_packet_history_cmd)
1472 (maint_btrace_clear_packet_history_cmd): Adjust.
1473 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1475 * cli/cli-interp.c: Include "inferior.h".
1476 * common/refcounted-object.h (struct
1477 refcounted_object_ref_policy): New.
1478 * compile/compile-object-load.c: Include gdbthread.h.
1479 (store_regs): Use inferior_thread.
1480 * corelow.c (core_target::close): Use current_inferior.
1481 (core_target_open): Adjust to use first_thread_of_inferior and use
1482 the current inferior.
1483 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1484 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1485 <thread>: ... this new field. All references adjusted.
1486 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1487 Take a thread_info pointer instead of a ptid_t.
1488 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1489 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1490 thread_info pointer instead of a ptid_t.
1491 * elfread.c: Include "inferior.h".
1492 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1493 Use inferior_thread.
1494 * eval.c (evaluate_subexp): Likewise.
1495 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1497 * gdb_proc_service.h (struct thread_info): Forward declare.
1498 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1499 <thread>: ... this new field. All references adjusted.
1500 * gdbarch.h, gdbarch.c: Regenerate.
1501 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1502 'thread' parameter. All implementations and callers adjusted.
1503 * gdbthread.h (thread_info) <set_running>: New method.
1504 (delete_thread, delete_thread_silent): Take a thread_info pointer
1506 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1507 (first_thread_of_process): Delete, replaced by ...
1508 (first_thread_of_inferior): ... this new function. All callers
1510 (any_live_thread_of_process): Delete, replaced by ...
1511 (any_live_thread_of_inferior): ... this new function. All callers
1513 (switch_to_thread, switch_to_no_thread): Declare.
1514 (is_executing): Delete.
1515 (enable_thread_stack_temporaries): Update comment.
1516 <enable_thread_stack_temporaries>: Take a thread_info pointer
1517 instead of a ptid_t. Incref the thread.
1518 <~enable_thread_stack_temporaries>: Decref the thread.
1521 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1522 (get_last_thread_stack_temporary)
1523 (value_in_thread_stack_temporaries, can_access_registers_thread):
1524 Take a thread_info pointer instead of a ptid_t. All callers
1526 * infcall.c (get_call_return_value): Use inferior_thread.
1527 (run_inferior_call): Work with thread pointers instead of ptid_t.
1528 (call_function_by_hand_dummy): Work with thread pointers instead
1529 of ptid_t. Use thread_info_ref.
1530 * infcmd.c (proceed_thread_callback): Access thread's state
1532 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1533 access thread's state directly.
1534 (continue_command): Use inferior_thread.
1535 (info_program_command): Use find_thread_ptid and access thread
1537 (proceed_after_attach_callback): Use thread state directly.
1538 (notice_new_inferior): Take a thread_info pointer instead of a
1539 ptid_t. All callers adjusted.
1540 (exit_inferior): Take an inferior pointer instead of a pid. All
1542 (exit_inferior_silent): New.
1543 (detach_inferior): Delete.
1544 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1545 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1546 (detach_inferior_command, kill_inferior_command): Use
1547 find_inferior_id instead of valid_gdb_inferior_id and
1548 gdb_inferior_id_to_pid.
1549 (inferior_command): Use inferior and thread pointers.
1550 * inferior.h (struct thread_info): Forward declare.
1551 (notice_new_inferior): Take a thread_info pointer instead of a
1552 ptid_t. All callers adjusted.
1553 (detach_inferior): Delete declaration.
1554 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1555 instead of a pid. All callers adjusted.
1556 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1557 (valid_gdb_inferior_id): Delete.
1558 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1559 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1560 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1562 <inf>: ... this new field.
1563 <step_ptid>: Delete, replaced by ...
1564 <step_thread>: ... this new field.
1565 (get_displaced_stepping_state): Take an inferior pointer instead
1566 of a pid. All callers adjusted.
1567 (displaced_step_in_progress_any_inferior): Adjust.
1568 (displaced_step_in_progress_thread): Take a thread pointer instead
1569 of a ptid_t. All callers adjusted.
1570 (displaced_step_in_progress, add_displaced_stepping_state): Take
1571 an inferior pointer instead of a pid. All callers adjusted.
1572 (get_displaced_step_closure_by_addr): Adjust.
1573 (remove_displaced_stepping_state): Take an inferior pointer
1574 instead of a pid. All callers adjusted.
1575 (displaced_step_prepare_throw, displaced_step_prepare)
1576 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1577 All callers adjusted.
1578 (start_step_over): Adjust.
1579 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1580 displaced step queue.
1581 (do_target_resume): Adjust.
1582 (fetch_inferior_event): Use inferior_thread.
1583 (context_switch, get_inferior_stop_soon): Take an
1584 execution_control_state pointer instead of a ptid_t. All callers
1586 (switch_to_thread_cleanup): Delete.
1587 (stop_all_threads): Use scoped_restore_current_thread.
1588 * inline-frame.c: Include "gdbthread.h".
1589 (inline_state) <inline_state>: Take a thread pointer instead of a
1590 ptid_t. All callers adjusted.
1591 <ptid>: Delete, replaced by ...
1592 <thread>: ... this new field.
1593 (find_inline_frame_state): Take a thread pointer instead of a
1594 ptid_t. All callers adjusted.
1595 (skip_inline_frames, step_into_inline_frame)
1596 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1597 pointer instead of a ptid_t. All callers adjusted.
1598 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1599 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1600 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1602 * linux-nat.c (get_detach_signal): Likewise.
1603 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1604 (thread_db_notice_clone): Adjust.
1605 (thread_db_find_new_threads_silently)
1606 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1607 a thread pointer instead of a ptid_t. All callers adjusted.
1608 * mi/mi-cmd-var.c: Include "inferior.h".
1609 (mi_cmd_var_update_iter): Update to use thread pointers.
1610 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1612 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1614 (mi_output_running): ... this new function.
1615 (mi_on_resume_1): Adjust to use it.
1616 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1617 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1619 (interrupt_thread_callback): : Adjust to use thread and inferior
1621 * proc-service.c: Include "gdbthread.h".
1622 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1623 * progspace-and-thread.c: Include "inferior.h".
1624 * progspace.c: Include "inferior.h".
1625 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1626 hold a reference to an inferior_object.
1627 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1629 * python/py-inferior.c (struct inferior_object): Give the type a
1630 tag name instead of a typedef.
1631 (python_on_normal_stop): No need to check if the current thread is
1633 (inferior_to_inferior_object): Change return type to
1634 inferior_object. All callers adjusted.
1635 (find_thread_object): Delete, bits factored out to ...
1636 (thread_to_thread_object): ... this new function.
1637 * python/py-infthread.c (create_thread_object): Use
1638 inferior_to_inferior_object.
1639 (thpy_is_stopped): Use thread pointer directly.
1640 (gdbpy_selected_thread): Use inferior_thread.
1641 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1642 field, replaced with ...
1643 <thread>: ... this new field. All users adjusted.
1644 (btpy_insn_or_gap_new): Drop const.
1645 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1647 * python/py-record.c: Include "gdbthread.h".
1648 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1649 a ptid_t. All callers adjusted.
1650 (gdbpy_current_recording): Use inferior_thread.
1651 * python/py-record.h (recpy_record_object) <ptid>: Delete
1652 field, replaced with ...
1653 <thread>: ... this new field. All users adjusted.
1654 (recpy_element_object) <ptid>: Delete
1655 field, replaced with ...
1656 <thread>: ... this new field. All users adjusted.
1657 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1658 a ptid_t. All callers adjusted.
1659 * python/py-threadevent.c: Include "gdbthread.h".
1660 (get_event_thread): Use thread_to_thread_object.
1661 * python/python-internal.h (struct inferior_object): Forward
1663 (find_thread_object, find_inferior_object): Delete declarations.
1664 (thread_to_thread_object, inferior_to_inferior_object): New
1666 * record-btrace.c: Include "inferior.h".
1667 (require_btrace_thread): Use inferior_thread.
1668 (record_btrace_frame_sniffer)
1669 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1670 (get_thread_current_frame): Use scoped_restore_current_thread and
1672 (get_thread_current_frame): Use thread pointer directly.
1673 (record_btrace_replay_at_breakpoint): Use thread's inferior
1675 * record-full.c: Include "inferior.h".
1676 * regcache.c: Include "gdbthread.h".
1677 (get_thread_arch_regcache): Use the inferior's address space
1679 (get_thread_regcache, registers_changed_thread): New.
1680 * regcache.h (get_thread_regcache(thread_info *thread)): New
1682 (registers_changed_thread): New.
1683 (remote_target) <remote_detach_1>: Swap order of parameters.
1684 (remote_add_thread): <remote_add_thread>: Return the new thread.
1685 (get_remote_thread_info(ptid_t)): New overload.
1686 (remote_target::remote_notice_new_inferior): Use thread pointers
1688 (remote_target::process_initial_stop_replies): Use
1689 thread_info::set_running.
1690 (remote_target::remote_detach_1, remote_target::detach)
1691 (extended_remote_target::detach): Adjust.
1692 * stack.c (frame_show_address): Use inferior_thread.
1693 * target-debug.h (target_debug_print_thread_info_pp): New.
1694 * target-delegates.c: Regenerate.
1695 * target.c (default_thread_address_space): Delete.
1696 (memory_xfer_partial_1): Use current_inferior.
1697 (target_detach): Use current_inferior.
1698 (target_thread_address_space): Delete.
1699 (generic_mourn_inferior): Use current_inferior.
1700 * target.h (struct target_ops) <thread_address_space>: Delete.
1701 (target_thread_address_space): Delete.
1702 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1704 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1705 thread pointer instead of a ptid_t. Adjust all callers.
1706 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1707 (first_thread_of_process): Delete, replaced by ...
1708 (first_thread_of_inferior): ... this new function. All callers
1710 (any_thread_of_process): Rename to ...
1711 (any_thread_of_inferior): ... this, and take an inferior pointer.
1712 (any_live_thread_of_process): Rename to ...
1713 (any_live_thread_of_inferior): ... this, and take an inferior
1715 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1716 (value_in_thread_stack_temporaries)
1717 (get_last_thread_stack_temporary): Take a thread pointer instead
1718 of a ptid_t. Adjust all callers.
1719 (thread_info::set_running): New.
1720 (validate_registers_access): Use inferior_thread.
1721 (can_access_registers_ptid): Rename to ...
1722 (can_access_registers_thread): ... this, and take a thread
1724 (print_thread_info_1): Adjust to compare thread pointers instead
1726 (switch_to_no_thread, switch_to_thread): Make extern.
1727 (scoped_restore_current_thread::~scoped_restore_current_thread):
1728 Use m_thread pointer directly.
1729 (scoped_restore_current_thread::scoped_restore_current_thread):
1730 Use inferior_thread.
1731 (thread_command): Use thread pointer directly.
1732 (thread_num_make_value_helper): Use inferior_thread.
1733 * top.c (execute_command): Use inferior_thread.
1734 * tui/tui-interp.c: Include "inferior.h".
1735 * varobj.c (varobj_create): Use inferior_thread.
1736 (value_of_root_1): Use find_thread_global_id instead of
1737 global_thread_id_to_ptid.
1739 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1741 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1743 (regcache::write_part): Likewise.
1744 (readable_regcache::cooked_read_part): Update comment.
1745 (readable_regcache::cooked_write_part): Likewise.
1746 * regcache.h: (readable_regcache::read_part): Likewise.
1747 (regcache::write_part): Likewise.
1749 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1750 Dirk Schubert <dirk.schubert@arm.com>
1752 * aarch64-linux-nat.c (post_attach): New.
1753 (aarch64_linux_nat_target::post_attach): Override post_attach to
1754 record the number of hardware debug registers.
1756 2018-06-20 Tom Tromey <tom@tromey.com>
1758 * python/py-param.c (add_setshow_generic): Make parameters const.
1759 (parmpy_init): Update.
1761 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1763 * regcache.h (regcache_cooked_read_ftype): Rename to...
1764 (register_read_ftype): ...this, change type to function_view.
1765 (class reg_buffer) <save>: Remove src parameter.
1766 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1767 parameter non-const in first overload. Remove src parameter in
1769 * regcache.c (do_cooked_read): Remove.
1770 (readonly_detached_regcache::readonly_detached_regcache): Make
1771 parameter non-const, adjust call to other constructor.
1772 (reg_buffer::save): Remove src parameter.
1773 * frame.c (do_frame_register_read): Remove.
1774 (frame_save_as_regcache): Use lambda function.
1775 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1776 parameter to ppu2spu_data *.
1777 (ppu2spu_sniffer): Use lambda function.
1779 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1781 * record-full.c (record_full_target::insert_breakpoint): Remove
1782 "struct" keyword, add const.
1784 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1786 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1787 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1788 * configure.ac: Remove AC_PREREQ, add missing quoting.
1789 * gnulib/configure.ac: Modernize usage of
1790 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1791 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1792 (AUTOMAKE_VERSION): Bump to 1.15.1.
1793 * configure: Re-generate.
1794 * config.in: Re-generate.
1795 * aclocal.m4: Re-generate.
1796 * gnulib/aclocal.m4: Re-generate.
1797 * gnulib/config.in: Re-generate.
1798 * gnulib/configure: Re-generate.
1799 * gnulib/import/Makefile.in: Re-generate.
1801 2018-06-19 Pedro Alves <palves@redhat.com>
1803 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1804 (lookup_minimal_symbol_by_pc_section): ... here with
1805 gdb_assert_not_reached added.
1807 2018-06-19 Pedro Alves <palves@redhat.com>
1809 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1810 parameter with a block parameter. Compare location's block symbol
1811 with the frame's block instead of addresses.
1812 (skip_inline_frames): Pass the current block instead of the
1813 frame's address. Break out as soon as we determine the frame
1814 should not be skipped.
1816 2018-06-18 Tom Tromey <tom@tromey.com>
1818 * solib-aix.c (solib_aix_get_section_offsets): Return
1820 (solib_aix_solib_create_inferior_hook): Update.
1822 2018-06-18 Tom Tromey <tom@tromey.com>
1824 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1826 2018-06-18 Tom Tromey <tom@tromey.com>
1828 * solib-frv.c (frv_relocate_main_executable): Use
1830 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1833 2018-06-18 Tom Tromey <tom@tromey.com>
1835 * objfiles.h (inhibit_section_map_updates): Update.
1836 (resume_section_map_updates, resume_section_map_updates_cleanup):
1838 * solib-svr4.c (svr4_handle_solib_event): Update.
1839 * objfiles.c (inhibit_section_map_updates): Return
1840 scoped_restore_tmpl<int>.
1841 (resume_section_map_updates, resume_section_map_updates_cleanup):
1844 2018-06-18 Tom Tromey <tom@tromey.com>
1846 * valprint.h (read_string): Update.
1847 * valprint.c (read_string): Change type of "buffer".
1848 (val_print_string): Update.
1849 * python/py-value.c (valpy_string): Update.
1850 * language.h (struct language_defn) <la_get_string>: Change
1852 (default_get_string, c_get_string): Update.
1853 * language.c (default_get_string): Change type of "buffer".
1854 * guile/scm-value.c (gdbscm_value_to_string): Update.
1855 * c-lang.c (c_get_string): Change type of "buffer".
1857 2018-06-18 Tom Tromey <tom@tromey.com>
1859 * ser-mingw.c (struct pipe_state_destroyer): New.
1860 (pipe_state_up): New typedef.
1861 (cleanup_pipe_state): Remove.
1862 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1864 2018-06-18 Tom Tromey <tom@tromey.com>
1866 * rust-lang.h (rust_yyerror): Don't declare.
1867 * rust-lang.c (rust_language_defn): Update.
1868 * rust-exp.y (yyerror): Now static.
1869 * parse.c (parse_exp_in_context_1): Update.
1870 * p-lang.h (p_yyerror): Don't declare.
1871 * p-lang.c (p_language_defn): Update.
1872 * p-exp.y (yyerror): Now static.
1873 * opencl-lang.c (opencl_language_defn): Update.
1874 * objc-lang.c (objc_language_defn): Update.
1875 * m2-lang.h (m2_yyerror): Don't declare.
1876 * m2-lang.c (m2_language_defn): Update.
1877 * m2-exp.y (yyerror): Now static.
1878 * language.h (struct language_defn) <la_error>: Remove.
1879 * language.c (unk_lang_error): Remove.
1880 (unknown_language_defn, auto_language_defn): Remove.
1881 * go-lang.h (go_yyerror): Don't declare.
1882 * go-lang.c (go_language_defn): Update.
1883 * go-exp.y (yyerror): Now static.
1884 * f-lang.h (f_yyerror): Don't declare.
1885 * f-lang.c (f_language_defn): Update.
1886 * f-exp.y (yyerror): Now static.
1887 * d-lang.h (d_yyerror): Don't declare.
1888 * d-lang.c (d_language_defn): Update.
1889 * d-exp.y (yyerror): Now static.
1890 * c-lang.h (c_yyerror): Don't declare.
1891 * c-lang.c (c_language_defn, cplus_language_defn)
1892 (asm_language_defn, minimal_language_defn): Update.
1893 * c-exp.y (yyerror): Now static.
1894 * ada-lang.h (ada_yyerror): Don't declare.
1895 * ada-lang.c (ada_language_defn): Update.
1896 * ada-exp.y (yyerror): Now static.
1898 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1900 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1901 (store_sveregs_to_thread): Likewise.
1902 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1903 (aarch64_linux_store_inferior_registers): Likewise.
1904 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1906 (aarch64_sve_regs_copy_to_regcache): Likewise.
1907 (aarch64_sve_regs_copy_from_regcache): Likewise.
1908 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1910 (aarch64_sve_regs_copy_to_regcache): Likewise.
1911 (aarch64_sve_regs_copy_from_regcache): Likewise.
1912 (sve_context): Structure from Linux headers.
1913 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1914 (SVE_SIG_ZREG_SIZE): Likewise.
1915 (SVE_SIG_PREG_SIZE): Likewise.
1916 (SVE_SIG_FFR_SIZE): Likewise.
1917 (SVE_SIG_REGS_OFFSET): Likewise.
1918 (SVE_SIG_ZREGS_OFFSET): Likewise.
1919 (SVE_SIG_ZREG_OFFSET): Likewise.
1920 (SVE_SIG_ZREGS_SIZE): Likewise.
1921 (SVE_SIG_PREGS_OFFSET): Likewise.
1922 (SVE_SIG_PREG_OFFSET): Likewise.
1923 (SVE_SIG_PREGS_SIZE): Likewise.
1924 (SVE_SIG_FFR_OFFSET): Likewise.
1925 (SVE_SIG_REGS_SIZE): Likewise.
1926 (SVE_SIG_CONTEXT_SIZE): Likewise.
1927 (SVE_PT_REGS_MASK): Likewise.
1928 (SVE_PT_REGS_FPSIMD): Likewise.
1929 (SVE_PT_REGS_SVE): Likewise.
1930 (SVE_PT_VL_INHERIT): Likewise.
1931 (SVE_PT_VL_ONEXEC): Likewise.
1932 (SVE_PT_REGS_OFFSET): Likewise.
1933 (SVE_PT_FPSIMD_OFFSET): Likewise.
1934 (SVE_PT_FPSIMD_SIZE): Likewise.
1935 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1936 (SVE_PT_SVE_PREG_SIZE): Likewise.
1937 (SVE_PT_SVE_FFR_SIZE): Likewise.
1938 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1939 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1940 (__SVE_SIG_TO_PT): Likewise.
1941 (SVE_PT_SVE_OFFSET): Likewise.
1942 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1943 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1944 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1945 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1946 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1947 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1948 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1949 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1950 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1951 (SVE_PT_SVE_SIZE): Likewise.
1952 (SVE_PT_SIZE): Likewise.
1953 (HAS_SVE_STATE): New define.
1955 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1957 * nat/aarch64-sve-linux-sigcontext.h: New file.
1958 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1960 (SVE_VQ_MIN): Likewise.
1961 (SVE_VQ_MAX): Likewise.
1962 (SVE_VL_MIN): Likewise.
1963 (SVE_VL_MAX): Likewise.
1964 (SVE_NUM_ZREGS): Likewise.
1965 (SVE_NUM_PREGS): Likewise.
1966 (sve_vl_valid): Likewise.
1967 (struct user_sve_header): Likewise.
1969 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1970 Richard Bunt <Richard.Bunt@arm.com>
1972 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1973 was requested by GDB.
1975 2018-06-15 Tom de Vries <tdevries@suse.de>
1977 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1979 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1981 * gnulib/update-gnulib.sh: Print expected versions of
1984 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1986 * arch-utils.c (default_type_align): Use type_length_units.
1987 * gdbtypes.c (type_align): Use type_length_units.
1989 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1991 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1992 of 'define' command.
1994 2018-06-14 Tom de Vries <tdevries@suse.de>
1997 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1998 get_no_prettyformat_print_options.
2000 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2002 * sparc-nat.h: Include target.h.
2003 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2004 <fetch_registers>: Remove this argument in function call.
2005 <store_registers>: Remove this argument in function call, remove
2007 <low_forget_process>: Call sparc64_forget_process instead of
2008 sparc_forget_process.
2010 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2012 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2013 (procfs_target::make_corefile_notes): Adjust to new
2014 target_read_alloc return type.
2016 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2017 Stephen Roberts <stephen.roberts@arm.com>
2020 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2021 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2022 Move should_notify_stop local into more inner scope.
2024 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2025 Stephen Roberts <stephen.roberts@arm.com>
2028 * infrun.c (resume_1): Add call to mark_async_event_handler.
2030 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2032 * infrun.c (do_target_wait): Change old version of $pc printed.
2034 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2036 * dwarf2read.c (read_index_from_section): Rename to...
2037 (read_gdb_index_from_section): ... this, update all callers.
2038 (dwarf2_read_index): Rename to...
2039 (dwarf2_read_gdb_index): ... this, update all callers.
2041 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2043 * gdb/hppa-linux-nat.c
2044 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2045 hppa_linux_nat_target::fetch_registers.
2047 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2049 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2050 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2051 (AARCH64_DWARF_SVE_FFR): Likewise.
2052 (AARCH64_DWARF_SVE_P0): Likewise.
2053 (AARCH64_DWARF_SVE_Z0): Likewise.
2055 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2057 * common/common-regcache.h (raw_compare): New function.
2058 * regcache.c (regcache::raw_compare): Likewise.
2059 * regcache.h (regcache::raw_compare): New declaration.
2061 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2063 * common/common-regcache.h (reg_buffer_common): New structure.
2064 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2065 (reg_buffer::raw_supply): Likewise.
2066 (reg_buffer::raw_supply_integer): Likewise.
2067 (reg_buffer::raw_supply_zeroed): Likewise.
2068 (reg_buffer::raw_collect): Likewise.
2069 (reg_buffer::raw_collect_integer): Likewise.
2070 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2071 (reg_buffer::raw_supply): Likewise.
2072 (reg_buffer::raw_supply_integer): Likewise.
2073 (reg_buffer::raw_supply_zeroed): Likewise.
2074 (reg_buffer::raw_collect): Likewise.
2075 (reg_buffer::raw_collect_integer): Likewise.
2077 2018-06-10 Tom Tromey <tom@tromey.com>
2079 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2080 (class remote_state) <stop_reply_queue>: Now std::vector.
2081 (remote_state::~remote_state)
2082 (remote_target::stop_reply_queue_length): Update.
2083 (struct queue_iter_param, remove_child_of_pending_fork)
2084 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2085 (check_pending_event_prevents_wildcard_vcont_callback)
2086 (remove_stop_reply_for_inferior)
2087 (remove_stop_reply_of_remote_state)
2088 (remote_notif_remove_once_on_match)
2089 (stop_reply_match_ptid_and_ws)
2090 (remote_kill_child_of_pending_fork): Remove.
2091 (remote_target::remove_new_fork_children)
2092 (remote_target::check_pending_events_prevent_wildcard_vcont)
2093 (remote_target::discard_pending_stop_replies)
2094 (remote_target::discard_pending_stop_replies_in_queue)
2095 (remote_target::remote_notif_remove_queued_reply)
2096 (remote_target::queued_stop_reply)
2097 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2098 (remote_target::wait, remote_target::kill_new_fork_children)
2099 (remote_target::async): Update.
2101 2018-06-10 Tom Tromey <tom@tromey.com>
2103 * record-full.c (record_full_arch_list_cleanups): Remove.
2104 (record_full_message): Use try/catch.
2105 (record_full_wait_cleanups): Remove.
2106 (record_full_wait_1): Use try/catch.
2107 (record_full_restore): Likewise.
2109 2018-06-10 Tom Tromey <tom@tromey.com>
2111 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2112 declare VEC. Add constructor.
2113 <in_target_beneath>: Now bool.
2114 (record_full_breakpoints): Now a std::vector, static.
2115 (record_full_sync_record_breakpoints)
2116 (record_full_init_record_breakpoints)
2117 (record_full_target::insert_breakpoint)
2118 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2120 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2122 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2123 * serial.c (serial_interface_lookup): Remove struct keyword.
2125 2018-06-10 Tom Tromey <tom@tromey.com>
2127 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2129 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2131 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2133 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2134 "beneath" as a method.
2135 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2136 Use "beneath" as a method.
2138 2018-06-10 Tom Tromey <tom@tromey.com>
2140 * tracefile.c (struct trace_file_writer_deleter): New.
2141 <operator()>: Rename from trace_file_writer_xfree.
2142 (trace_file_writer_up): New typedef.
2143 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2145 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2147 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2148 <m_registers, m_register_status>: Change type to
2150 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2153 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2155 * common/common-regcache.h (enum register_status): Add
2156 underlying type "signed char".
2157 * regcache.h (reg_buffer) <m_register_status>: Change type to
2159 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2160 register_status instead of signed char.
2161 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2162 (reg_buffer::get_register_status): Remove cast.
2163 (readable_regcache::raw_read): Remove cast.
2164 (readable_regcache::cooked_read): Remove cast.
2166 2018-06-09 Tom Tromey <tom@tromey.com>
2168 * source.c (reverse_search_command, forward_search_command): Use
2171 2018-06-09 Tom Tromey <tom@tromey.com>
2173 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2174 (serial_ops_list): Now static, std::vector.
2175 (serial_interface_lookup, serial_add_interface): Update.
2177 2018-06-09 Tom Tromey <tom@tromey.com>
2179 * dwarf2read.c (process_cu_includes): Update.
2180 (process_full_comp_unit): Update.
2181 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2184 2018-06-08 Paul Koning <paul_koning@dell.com>
2188 * python/python.c (do_start_initialization):
2189 Avoid call to internal Python API.
2190 (init__gdb_module): New function.
2192 2018-06-08 Gary Benson <gbenson@redhat.com>
2194 * linux-thread-db.c (valprint.h): New include.
2195 (struct check_thread_db_info): New structure.
2196 (check_thread_db_on_load, tdb_testinfo): New static globals.
2197 (check_thread_db, check_thread_db_callback): New functions.
2198 (try_thread_db_load_1): Run integrity checks if requested.
2199 (maintenance_check_libthread_db): New function.
2200 (_initialize_thread_db): Register "maint check libthread-db"
2201 and "maint set/show check-libthread-db".
2202 * NEWS: Mention the above new commands.
2204 2018-06-08 Tom Tromey <tom@tromey.com>
2206 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2209 2018-06-08 Tom Tromey <tom@tromey.com>
2211 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2213 2018-06-08 Tom Tromey <tom@tromey.com>
2215 * common/btrace-common.h (struct btrace_data): Add constructor,
2216 destructor, move assignment operator.
2217 <empty, clear, fini>: New methods.
2218 <format>: Initialize.
2219 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2220 (btrace_data_empty): Don't declare.
2221 * common/btrace-common.c (btrace_data_init): Remove.
2222 (btrace_data::fini): Rename from btrace_data_fini.
2223 (btrace_data::empty): Rename from btrace_data_empty.
2224 (btrace_data::clear): Rename from btrace_data_clear. Return
2226 * btrace.h (make_cleanup_btrace_data): Don't declare.
2227 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2228 (parse_xml_btrace): Update.
2229 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2230 (maint_btrace_clear_packet_history_cmd): Update.
2232 2018-06-07 Pedro Alves <palves@redhat.com>
2234 * target.h (target_ops) <beneath>: Now a method. All references
2236 (class target_stack): New.
2237 * target.c (g_target_stack): New.
2238 (g_current_top_target): Delete.
2239 (current_top_target): Get the top target out of g_target_stack.
2240 (target_stack::push, target_stack::unpush): New.
2241 (push_target, unpush_target): Reimplement.
2242 (target_is_pushed): Reimplement in terms of g_target_stack.
2243 (target_ops::beneath, target_stack::find_beneath): New.
2245 2018-06-07 Pedro Alves <palves@redhat.com>
2247 * target.h (find_target_beneath): Delete declaration.
2248 * target.c (find_target_beneath): Delete definition.
2249 * aix-thread.c: All callers of find_target_beneath adjusted to
2250 call target_ops::beneath instead.
2251 * bsd-uthread.c: Likewise.
2252 * linux-thread-db.c: Likewise.
2253 * ravenscar-thread.c: Likewise.
2254 * sol-thread.c: Likewise.
2255 * spu-multiarch.c: Likewise.
2257 2018-06-07 Pedro Alves <palves@redhat.com>
2259 * target.h (target_ops) <beneath>: Now a method. All references
2261 (target_ops) <m_beneath>: New.
2262 * target.c (target_ops::beneath): New.
2263 * corelow.c: Adjust all references to target_ops::beneath.
2264 * linux-thread-db.c: Likewise.
2265 * make-target-delegates: Likewise.
2266 * record-btrace.c: Likewise.
2267 * record-full.c: Likewise.
2268 * remote.c: Likewise.
2269 * target.c: Likewise.
2270 * target-delegates.c: Regenerate.
2272 2018-06-07 Pedro Alves <palves@redhat.com>
2274 * target.h (target_stack): Delete.
2275 (current_top_target): Declare function.
2276 * target.c (target_stack): Delete.
2277 (g_current_top_target): New.
2278 (current_top_target): New function.
2279 * auxv.c: Use current_top_target instead of target_stack
2281 * avr-tdep.c: Likewise.
2282 * breakpoint.c: Likewise.
2283 * corefile.c: Likewise.
2284 * elfread.c: Likewise.
2286 * exceptions.c: Likewise.
2287 * frame.c: Likewise.
2288 * gdbarch-selftests.c: Likewise.
2289 * gnu-v3-abi.c: Likewise.
2290 * ia64-tdep.c: Likewise.
2291 * ia64-vms-tdep.c: Likewise.
2292 * infcall.c: Likewise.
2293 * infcmd.c: Likewise.
2294 * infrun.c: Likewise.
2295 * linespec.c: Likewise.
2296 * linux-tdep.c: Likewise.
2297 * minsyms.c: Likewise.
2298 * ppc-linux-nat.c: Likewise.
2299 * ppc-linux-tdep.c: Likewise.
2300 * procfs.c: Likewise.
2301 * regcache.c: Likewise.
2302 * remote.c: Likewise.
2303 * rs6000-tdep.c: Likewise.
2304 * s390-linux-nat.c: Likewise.
2305 * s390-tdep.c: Likewise.
2306 * solib-aix.c: Likewise.
2307 * solib-darwin.c: Likewise.
2308 * solib-dsbt.c: Likewise.
2309 * solib-spu.c: Likewise.
2310 * solib-svr4.c: Likewise.
2311 * solib-target.c: Likewise.
2312 * sparc-tdep.c: Likewise.
2313 * sparc64-tdep.c: Likewise.
2314 * spu-tdep.c: Likewise.
2315 * symfile.c: Likewise.
2316 * symtab.c: Likewise.
2317 * target-descriptions.c: Likewise.
2318 * target-memory.c: Likewise.
2319 * target.c: Likewise.
2320 * target.h: Likewise.
2321 * tracefile-tfile.c: Likewise.
2322 * tracepoint.c: Likewise.
2323 * valops.c: Likewise.
2324 * valprint.c: Likewise.
2325 * value.c: Likewise.
2326 * windows-tdep.c: Likewise.
2327 * mi/mi-main.c: Likewise.
2329 2018-06-07 Tom Tromey <tom@tromey.com>
2331 * valprint.h (build_address_symbolic): Declare.
2332 * printcmd.c (print_address_symbolic): Update.
2333 (build_address_symbolic): Change "name" and "filename" to
2335 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2337 * defs.h (build_address_symbolic): Remove declaration.
2339 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2341 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2342 (aarch64_vnv_type): Add function.
2343 (aarch64_pseudo_register_name): Add V regs for SVE.
2344 (aarch64_pseudo_register_type): Likewise.
2345 (aarch64_pseudo_register_reggroup_p): Likewise.
2346 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2347 (aarch64_pseudo_read_value): Add V regs for SVE.
2348 (aarch64_pseudo_write_2): Use V0 offset for SVE
2349 (aarch64_pseudo_write): Add V regs for SVE.
2350 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2352 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2354 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2355 (sve_vl_from_vq): Likewise.
2357 2018-06-05 Tom Tromey <tom@tromey.com>
2359 * cli/cli-cmds.c (show_version): Update.
2360 * top.c (print_gdb_version): Add "interactive" parameter.
2362 * main.c (captured_main_1): Update.
2363 * top.h (print_gdb_version): Add "interactive" parameter and a
2366 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2368 * common/enum-flags.h: Add trailing semicolon to example in
2371 2018-06-05 Tom Tromey <tom@tromey.com>
2374 * NEWS: Add entry about pager.
2375 * utils.c (pagination_disabled_for_command): New global.
2376 (prompt_for_continue): Allow "c" response to prompt.
2377 (reinitialize_more_filter): Clear
2378 pagination_disabled_for_command.
2379 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2381 2018-06-04 Tom Tromey <tom@tromey.com>
2383 * ada-lang.h (ada_lookup_symbol_list): Update.
2384 * ada-lang.c (resolve_subexp): Update.
2385 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2387 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2388 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2389 results parameter to std::vector.
2390 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2392 * ada-exp.y (block_lookup): Update.
2393 (select_possible_type_sym): Change type of syms. Remove nsyms
2395 (write_var_or_type, write_name_assoc): Update.
2397 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2399 * windows-nat.c (windows_nat_target::xfer_partial): Return
2400 TARGET_XFER_E_IO if we need to delegate to the target beneath
2401 but BENEATH is NULL.
2403 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2405 * Makefile.in (config.status): Add configure.nat as a
2408 2018-06-04 Tom Tromey <tom@tromey.com>
2410 * cp-name-parser.y (cpname_state): Add method declarations.
2411 (HANDLE_QUAL): Update.
2412 (cpname_state::d_grab, cpname_state::fill_comp)
2413 (cpname_state::make_operator, cpname_state::make_dtor)
2414 (cpname_state::make_builtin_type, cpname_state::make_name)
2415 (cpname_state::d_qualify, cpname_state::d_int_type)
2416 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2417 (%union): Move earlier.
2419 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2421 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2423 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2425 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2426 (aarch64_pseudo_write_1): Likewise.
2427 (aarch64_pseudo_read_value): Use helper.
2428 (aarch64_pseudo_write): Likewise.
2430 2018-06-04 Pedro Alves <palves@redhat.com>
2432 * darwin-nat.c (darwin_ops): Delete.
2433 (darwin_attach_pid): Use get_native_target.
2435 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2437 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2438 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2440 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2442 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2443 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2444 (aarch64_gdbarch_init): Check for SVE.
2445 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2447 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2449 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2450 * aarch64-tdep.h (aarch64_read_description): Likewise.
2451 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2452 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2453 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2454 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2455 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2457 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2459 * value.c (value_fetch_lazy_bitfield): New.
2460 (value_fetch_lazy_memory): New.
2461 (value_fetch_lazy_register): New.
2462 (value_fetch_lazy): Factor out to smaller functions.
2464 2018-06-01 Tom Tromey <tom@tromey.com>
2466 * cp-name-parser.y (backslashable, represented): Now const.
2468 2018-06-01 Tom Tromey <tom@tromey.com>
2470 * cp-name-parser.y: Include parser-defs.h.
2471 (parser_fprintf): Remove declaration.
2473 2018-06-01 Tom Tromey <tom@tromey.com>
2475 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2477 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2478 (global_result): Remove globals.
2479 (struct cpname_state): New.
2480 (yyparse): Don't declare.
2481 (yylex, yyerror): Move declarations after %union.
2482 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2483 (make_name): Add state parameter.
2485 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2487 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2489 (yylex): Add lvalp, state parameters.
2490 (yyerror): Add state parameter.
2491 (cp_demangled_name_to_comp): Update.
2493 2018-06-01 Tom Tromey <tom@tromey.com>
2495 * cp-name-parser.y (parser_fprintf): Declare.
2496 (GDB_YY_REMAP_PREFIX): Define.
2497 Include yy-remap.h. Don't redefine yy* identifiers.
2499 2018-06-01 Tom Tromey <tom@tromey.com>
2501 * python/py-type.c (typy_legacy_template_argument): Update.
2502 * cp-support.h (cp_demangled_name_to_comp): Update.
2503 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2504 parameter to be a "std::string *".
2507 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2509 * ada-lex.l: Include "diagnostics.h" instead of
2510 "common/diagnostics.h".
2511 * unittests/environ-selftests.c: Likewise.
2512 * common/diagnostics.h: Moved to ../include.
2514 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2516 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2517 to language_mode_manual while calling breakpoint_re_set_one.
2519 2018-06-01 Tom Tromey <tom@tromey.com>
2521 * valops.c (value_cast_structs, destructor_name_p): Update.
2522 * symtab.c (gdb_mangle_name): Update.
2523 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2525 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2526 (pascal_object_print_value_fields, pascal_object_print_value):
2528 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2529 * linespec.c (find_methods): Update.
2530 * gdbtypes.h (type_name_no_tag): Remove.
2531 (type_name_or_error): Rename from type_name_no_tag_or_error.
2532 * gdbtypes.c (type_name_no_tag): Remove.
2533 (type_name_or_error): Rename from type_name_no_tag_or_error.
2534 (lookup_struct_elt_type, check_typedef): Update.
2535 * expprint.c (print_subexp_standard): Update.
2536 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2537 * d-namespace.c (d_lookup_nested_symbol): Update.
2538 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2539 (cp_print_class_member): Update.
2540 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2541 * completer.c (add_struct_fields): Update.
2542 * c-typeprint.c (cp_type_print_derivation_info)
2543 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2545 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2546 (ada_prefer_type, ada_is_exception_sym): Update.
2548 2018-06-01 Tom Tromey <tom@tromey.com>
2550 * valops.c (enum_constant_from_type, value_namespace_elt)
2551 (value_maybe_namespace_elt): Update.
2552 * valarith.c (find_size_for_pointer_math): Update.
2553 * target-descriptions.c (make_gdb_type): Update.
2554 * symmisc.c (print_symbol): Update.
2555 * stabsread.c (define_symbol, read_type)
2556 (complain_about_struct_wipeout, add_undefined_type)
2557 (cleanup_undefined_types_1): Update.
2558 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2559 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2560 (rust_internal_print_type, rust_composite_type)
2561 (rust_evaluate_funcall, rust_evaluate_subexp)
2562 (rust_inclusive_range_type_p): Update.
2563 * python/py-type.c (typy_get_tag): Update.
2564 * p-typeprint.c (pascal_type_print_base): Update.
2565 * mdebugread.c (parse_symbol, parse_type): Update.
2566 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2568 * guile/scm-type.c (gdbscm_type_tag): Update.
2569 * go-lang.c (sixg_string_p): Update.
2570 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2572 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2573 (TYPE_TAG_NAME): Remove.
2574 * gdbtypes.c (type_name_no_tag): Simplify.
2575 (check_typedef, check_types_equal, recursive_dump_type)
2576 (copy_type_recursive, arch_composite_type): Update.
2577 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2578 in summary mode when needed.
2579 * eval.c (evaluate_funcall): Update.
2580 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2581 (process_structure_scope, read_enumeration_type)
2582 (read_namespace_type, read_module_type, determine_prefix): Update.
2583 * cp-support.c (inspect_type): Update.
2584 * coffread.c (process_coff_symbol, decode_base_type): Update.
2585 * c-varobj.c (c_is_path_expr_parent): Update.
2586 * c-typeprint.c (c_type_print_base_struct_union): Update.
2587 (c_type_print_base_1): Update. Print struct/class/union/enum in
2588 summary when using C language.
2589 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2590 (gen_maybe_namespace_elt): Update.
2591 * ada-lang.c (ada_type_name): Simplify.
2592 (empty_record, ada_template_to_fixed_record_type_1)
2593 (template_to_static_fixed_type)
2594 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2596 2018-06-01 Tom Tromey <tom@tromey.com>
2598 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2600 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2601 (c_print_type): Update.
2602 (c_print_type): New overload.
2603 (c_type_print_varspec_prefix, c_type_print_args)
2604 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2605 (c_type_print_base_struct_union, c_type_print_base_1)
2606 (cp_type_print_method_args): Add "language" parameter.
2607 (c_type_print_base): Update.
2608 * c-lang.h (c_print_type): Add new overload.
2610 2018-06-01 Tom Tromey <tom@tromey.com>
2612 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2613 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2615 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2617 * aarch64-tdep.c (aarch64_sve_register_names): New const
2619 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2620 (AARCH64_SVE_Z_REGS_NUM): New define.
2621 (AARCH64_SVE_P_REGS_NUM): Likewise.
2622 (AARCH64_SVE_NUM_REGS): Likewise.
2624 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2626 * nat/linux-ptrace.h [__alpha__]
2627 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2630 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2632 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2633 the endianness selected.
2634 * NEWS: Document `set endian auto' mode operation update.
2636 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2638 * Makefile.in: Add new header.
2639 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2640 (sve_vl_from_vg): Likewise.
2641 (sve_vq_from_vl): Likewise.
2642 (sve_vl_from_vq): Likewise.
2643 (sve_vq_from_vg): Likewise.
2644 (sve_vg_from_vq): Likewise.
2645 * configure.nat: Add new c file.
2646 * nat/aarch64-sve-linux-ptrace.c: New file.
2647 * nat/aarch64-sve-linux-ptrace.h: New file.
2649 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2651 * aarch64-linux-nat.c (aarch64_linux_read_description):
2653 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2655 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2656 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2657 (aarch64_gdbarch_init): Add parmeter zero.
2658 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2659 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2660 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2662 * doc/gdb.texinfo: Describe SVE feature
2663 * features/aarch64-sve.c: New file.
2665 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2668 * gdbarch.sh (significant_addr_bit): Default to zero when
2669 not set by target architecture.
2670 * gdbarch.c: Re-generated.
2671 * utils.c (address_significant): Update.
2673 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2675 * stack.c (func_command): Remove trailing newline in call to error.
2677 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2679 * regcache.h (regcache_raw_collect): Remove, update callers to
2680 use regcache::raw_collect.
2681 * regcache.c (regcache_raw_collect): Remove.
2683 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2685 * regcache.h (regcache_raw_supply): Remove, update callers to
2686 use detached_regcache::raw_supply.
2687 * regcache.c (regcache_raw_supply): Remove.
2689 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2691 * regcache.h (regcache_cooked_write_part): Remove, update
2692 callers to use regcache::cooked_write_part.
2693 * regcache.c (regcache_cooked_write_part): Remove.
2695 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2697 * regcache.h (regcache_cooked_read_part): Remove, update callers
2698 to use readable_regcache::cooked_read_part.
2699 * regcache.c (regcache_cooked_read_part): Remove.
2701 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2703 * regcache.h (regcache_cooked_read_value): Remove, update
2704 callers to use readable_regcache::cooked_read_value.
2705 * regcache.c (regcache_cooked_read_value): Remove.
2707 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2709 * regcache.h (regcache_cooked_write): Remove, update callers to
2710 use regcache::cooked_write.
2711 * regcache.c (regcache_cooked_write): Remove.
2713 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2715 * regcache.h (regcache_invalidate): Remove, update callers to
2716 use detached_regcache::invalidate instead.
2717 * regcache.c (regcache_invalidate): Remove.
2719 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2721 * regcache.h (regcache_raw_write_part): Remove, update callers
2722 to use regcache::raw_write_part instead.
2723 * regcache.c (regcache_raw_write_part): Remove.
2725 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2727 * regcache.h (regcache_raw_read_part): Remove, update callers to
2728 use readable_regcache::raw_read_part instead.
2729 * regcache.c (regcache_raw_read_part): Remove.
2731 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2733 * regcache.h (regcache_cooked_read): Remove, update callers to
2734 use readable_regcache::cooked_read instead.
2735 * regcache.c (regcache_cooked_read): Remove.
2737 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2739 * regcache.h (regcache_raw_write): Remove, update callers to use
2740 regcache::raw_write instead.
2741 * regcache.c (regcache_raw_write): Remove.
2743 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2745 * regcache.h (regcache_raw_read): Remove, update callers to use
2746 readable_regcache::raw_read instead.
2747 * regcache.c (regcache_raw_read): Remove.
2749 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2751 * regcache.h (regcache_raw_update): Remove, update callers to
2752 use readable_regcache::raw_update instead.
2753 * regcache.c (regcache_raw_update): Remove.
2755 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2757 * regcache.h (regcache_register_status): Remove, update callers
2758 to use reg_buffer::get_register_status directly instead.
2759 * regcache.c (regcache_register_status): Remove.
2761 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2763 * regcache.h (regcache_get_ptid): Remove, update all callers to
2764 call regcache::ptid instead.
2765 * regcache.c (regcache_get_ptid): Remove.
2767 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2769 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2771 2018-05-30 Pedro Alves <palves@redhat.com>
2773 * common/common-exceptions.h (exception_rethrow): Use
2776 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2778 * breakpoint.c (print_solib_event, check_status_catch_solib):
2779 Remove struct keyword in range-based for loops.
2780 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2781 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2783 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2785 * symfile.c (addr_info_make_relative): Likewise.
2786 * thread.c (value_in_thread_stack_temporaries): Likewise.
2788 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2791 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2792 aggregate type to get its real type before accessing it.
2794 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2796 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2797 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2798 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2799 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2800 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2801 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2802 * printcmd.c (info_address_command): Likewise.
2804 2018-05-29 Tom Tromey <tom@tromey.com>
2806 * windows-nat.c (handle_exception): Update fall-through comment.
2808 2018-05-29 Tom Tromey <tom@tromey.com>
2810 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2811 (struct program_space) <added_solibs>: Now a std::vector.
2812 * breakpoint.c (print_solib_event): Update.
2813 (check_status_catch_solib): Update.
2814 * progspace.c (clear_program_space_solib_cache): Update.
2815 * solib.c (update_solib_list): Update.
2817 2018-05-29 Tom Tromey <tom@tromey.com>
2819 * python/py-type.c (typy_richcompare): Update.
2820 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2821 * gdbtypes.h (types_deeply_equal): Return bool.
2822 (types_equal): Likewise.
2823 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2825 (check_types_equal): Change worklist to std::vector. Return
2827 (struct type_equality_entry): Add constructor.
2828 (compare_maybe_null_strings): Return bool.
2829 (check_types_worklist): Return bool. Change worklist to
2831 (types_deeply_equal): Use std::vector.
2832 (types_equal): Return bool.
2833 (compare_maybe_null_strings): Simplify.
2835 2018-05-29 Tom Tromey <tom@tromey.com>
2837 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2839 2018-05-29 Tom Tromey <tom@tromey.com>
2841 * objc-lang.h: Don't include cp-support.h.
2842 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2845 2018-05-27 Tom Tromey <tom@tromey.com>
2847 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2849 2018-05-25 Tom Tromey <tom@tromey.com>
2851 * value.c (value::location): Initialize.
2853 2018-05-25 Tom Tromey <tom@tromey.com>
2855 * dbxread.c (init_bincl_list): Remove.
2856 (bincl_list): Now a std::vector.
2857 (bincls_allocated, next_bincl): Remove.
2858 (free_bincl_list, do_free_bincl_list_cleanup)
2859 (make_cleanup_free_bincl_list): Remove.
2860 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2862 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2863 (struct header_file_location): Add constructor.
2864 (add_bincl_to_list): Remove.
2866 2018-05-25 Tom Tromey <tom@tromey.com>
2868 * tui/tui.c (tui_enable): Update.
2869 * mi/mi-interp.c (mi_interp::init): Update.
2870 * interps.h (class interp) <name>: New method.
2871 <m_name>: Rename from name.
2872 (~scoped_restore_interp): Update.
2873 * interps.c (interp::interp): Update.
2874 (interp_add, interp_set, interp_lookup_existing)
2875 (current_interp_named_p): Update.
2877 2018-05-25 Tom Tromey <tom@tromey.com>
2879 * interps.c (interp_name): Remove.
2880 * mi/mi-interp.c (mi_interp::init): Update.
2881 * interps.h (interp_name): Remove.
2882 (~scoped_restore_interp): Update.
2883 * tui/tui.c (tui_enable): Update.
2885 2018-05-25 Tom Tromey <tom@tromey.com>
2887 * utils.c (fputs_maybe_filtered): Update.
2888 * linespec.c (decode_line_full): Update.
2889 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2890 (mi_print_breakpoint_for_event, mi_solib_loaded)
2891 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2892 (mi_user_selected_context_changed): Update.
2893 * mi/mi-main.c (mi_execute_command): Update.
2894 * cli/cli-script.c (execute_control_command): Update.
2895 * python/python.c (execute_gdb_command): Update.
2896 * solib.c (info_sharedlibrary_command): Update.
2897 * interps.c (interp_ui_out): Remove.
2898 * interps.h (interp_ui_out): Remove.
2900 2018-05-25 Tom Tromey <tom@tromey.com>
2902 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2903 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2904 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2906 2018-05-25 Tom Tromey <tom@tromey.com>
2908 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2909 * interps.c (interp_exec): Use scoped_restore.
2911 2018-05-25 Tom Tromey <tom@tromey.com>
2913 * remote.c (remote_target::remote_file_get): Use
2915 (remote_target::remote_file_put): Likewise.
2917 2018-05-25 Tom Tromey <tom@tromey.com>
2919 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2921 (get_pe_section_index, add_pe_exported_sym): Update.
2922 (read_pe_exported_syms): Use gdb::def_vector.
2924 2018-05-25 Tom Tromey <tom@tromey.com>
2926 * frame.c (remove_prev_frame): Remove.
2927 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2929 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2931 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2933 * mips-linux-nat.c (supply_fpregset): Always call
2934 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2935 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2936 `mips_fill_fpregset'.
2937 * mips-linux-tdep.c (mips_supply_fpregset)
2938 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2939 (mips_fill_fpregset_wrapper): Remove functions.
2940 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2941 (mips_linux_fpregset): Remove variable.
2942 (mips_linux_iterate_over_regset_sections): Use
2943 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2944 (mips_linux_o32_sigframe_init): Remove comment.
2946 2018-05-25 Pedro Alves <palves@redhat.com>
2948 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2949 (struct readahead_cache, struct packet_reg, struct
2950 remote_arch_state, class remote_state): Move higher up in the
2952 (remote_target::m_remote_state): Now an object instead of a pointer.
2953 (remote_target::get_remote_state): Adjust.
2955 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2957 * stack.c (select_and_print_frame): Delete.
2958 (struct function_bounds): Move struct within function.
2959 (func_command): Most content moved into new function
2960 find_frame_for_function, use new function, print result, add
2962 (find_frame_for_function): New function, now returns a result.
2964 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2966 * stack.c (iterate_over_block_arg_vars): Fix comment.
2967 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2969 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2973 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2975 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2977 * frame.h (class scoped_restore_selected_frame): New class.
2978 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2979 of any exception, use scoped_restore_selected_frame to restore the
2982 2018-05-24 Pedro Alves <palves@redhat.com>
2984 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2987 2018-05-23 Tom Tromey <tom@tromey.com>
2989 * complaints.c (struct complaints): Remove.
2990 (symfile_complaint_book): Remove.
2991 (series): New global.
2992 (complaint_internal): Update.
2993 (clear_complaints): Update.
2995 2018-05-23 Tom Tromey <tom@tromey.com>
2997 * complaints.c (counters): New global.
2998 (struct complain): Remove.
2999 (struct complaints) <root>: Remove.
3000 (complaint_sentinel): Remove.
3001 (symfile_complaint_book): Update.
3002 (find_complaint) Remove.
3003 (complaint_internal, clear_complaints): Update.
3005 2018-05-23 Tom Tromey <tom@tromey.com>
3007 * complaints.c (struct complain) <file, line>: Remove.
3008 (find_complaint): Remove file, line parameters.
3009 (complaint_internal): Update.
3011 2018-05-23 Tom Tromey <tom@tromey.com>
3013 * complaints.c (vcomplaint): Remove.
3014 (complaint_internal) Merge in contents of vcomplaint.
3016 2018-05-23 Tom Tromey <tom@tromey.com>
3018 * complaints.c (struct complaints) <explanation>: Remove.
3019 (symfile_explanations): Remove.
3020 (symfile_complaint_book): Update.
3021 (vcomplaint): Update.
3022 (struct explanation): Remove.
3024 2018-05-23 Tom Tromey <tom@tromey.com>
3026 * complaints.c (symfile_complaints): Remove.
3027 (complaint_internal): Remove "complaints" parameter.
3028 (clear_complaints, vcomplaint): Remove "c" parameter.
3029 (get_complaints): Remove.
3030 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3031 (dwarf2_debug_line_missing_file_complaint)
3032 (dwarf2_debug_line_missing_end_sequence_complaint)
3033 (dwarf2_complex_location_expr_complaint)
3034 (dwarf2_const_value_length_mismatch_complaint)
3035 (dwarf2_section_buffer_overflow_complaint)
3036 (dwarf2_macro_malformed_definition_complaint)
3037 (dwarf2_invalid_attrib_class_complaint)
3038 (create_addrmap_from_index, dw2_symtab_iter_next)
3039 (dw2_expand_marked_cus)
3040 (dw2_debug_names_iterator::find_vec_in_debug_names)
3041 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3042 (create_debug_type_hash_table, init_cutu_and_read_dies)
3043 (partial_die_parent_scope, add_partial_enumeration)
3044 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3045 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3046 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3047 (create_cus_hash_table, create_dwp_hash_table)
3048 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3049 (dwarf2_rnglists_process, dwarf2_ranges_process)
3050 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3051 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3052 (handle_struct_member_die, process_structure_scope)
3053 (read_array_type, read_common_block, read_module_type)
3054 (read_tag_pointer_type, read_typedef, read_base_type)
3055 (read_subrange_type, load_partial_dies, partial_die_info::read)
3056 (partial_die_info::read, partial_die_info::read)
3057 (partial_die_info::read, read_checked_initial_length_and_offset)
3058 (dwarf2_string_attr, read_formatted_entries)
3059 (dwarf_decode_line_header)
3060 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3061 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3062 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3063 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3064 (get_signatured_type, get_DW_AT_signature_type)
3065 (decode_locdesc, file_file_name, consume_improper_spaces)
3066 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3067 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3068 (dwarf2_symbol_mark_computed, set_die_type)
3069 (read_attribute_value): Update.
3070 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3072 * dbxread.c (unknown_symtype_complaint)
3073 (lbrac_mismatch_complaint, repeated_header_complaint)
3074 (set_namestring, function_outside_compilation_unit_complaint)
3075 (read_dbx_symtab, process_one_symbol): Update.
3076 * gdbtypes.c (stub_noname_complaint): Update.
3077 * windows-nat.c (handle_unload_dll): Update.
3078 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3079 (decode_base_type): Update.
3080 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3081 (eb_complaint, record_include_begin, record_include_end)
3082 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3083 (process_xcoff_symbol, read_symbol)
3084 (function_outside_compilation_unit_complaint)
3085 (scan_xcoff_symtab): Update.
3086 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3087 * buildsym.c (finish_block_internal, make_blockvector)
3088 (end_symtab_get_static_block, augment_type_symtab): Update.
3089 * dtrace-probe.c (dtrace_process_dof)
3090 (dtrace_static_probe_ops::get_probes): Update.
3091 * complaints.h (struct complaint): Don't declare.
3092 (symfile_complaints): Remove.
3093 (complaint_internal): Remove "complaints" parameter.
3094 (complaint): Likewise.
3095 (clear_complaints): Likewise.
3096 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3097 (reread_symbols): Update.
3098 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3099 (dwarf2_frame_cache, decode_frame_entry): Update.
3100 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3101 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3102 (info_selectors_command): Update.
3103 * macrotab.c (macro_include, check_for_redefinition)
3104 (macro_undef): Update.
3105 * objfiles.c (filter_overlapping_sections): Update.
3106 * stabsread.c (invalid_cpp_abbrev_complaint)
3107 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3108 (define_symbol, error_type, read_type, rs6000_builtin_type)
3109 (stabs_method_name_from_physname, read_member_functions)
3110 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3111 (attach_fields_to_type, complain_about_struct_wipeout)
3112 (read_range_type, read_args, common_block_start)
3113 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3115 * mdebugread.c (index_complaint, unknown_ext_complaint)
3116 (basic_type_complaint, bad_tag_guess_complaint)
3117 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3118 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3119 (parse_procedure, parse_lines)
3120 (function_outside_compilation_unit_complaint)
3121 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3122 (bad_tag_guess_complaint, reg_value_complaint): Update.
3123 * cp-support.c (demangled_name_complaint): Update.
3124 * macroscope.c (sal_macro_scope): Update.
3125 * dwarf-index-write.c (class debug_names): Update.
3127 2018-05-23 Tom Tromey <tom@tromey.com>
3129 * complaints.c (clear_complaints): Remove "noisy" parameter.
3130 * complaints.h (clear_complaints): Update.
3131 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3132 (reread_symbols): Update.
3134 2018-05-23 Tom Tromey <tom@tromey.com>
3136 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3138 (vcomplaint, clear_complaints): Update.
3139 (symfile_explanations): Remove some messages.
3141 2018-05-23 Tom Tromey <tom@tromey.com>
3143 * complaints.c (internal_complaint): Remove.
3144 * complaints.h (internal_complaint): Remove.
3146 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3148 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3150 2018-05-22 Pedro Alves <palves@redhat.com>
3152 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3153 (remote_fileio_badfd, remote_fileio_return_errno)
3154 (remote_fileio_return_success, remote_fileio_func_open)
3155 (remote_fileio_func_open, remote_fileio_func_close)
3156 (remote_fileio_func_read, remote_fileio_func_write)
3157 (remote_fileio_func_lseek, remote_fileio_func_rename)
3158 (remote_fileio_func_unlink, remote_fileio_func_stat)
3159 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3160 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3161 remote_target parameter.
3162 (remote_fio_func_map) <func>: Add remote_target parameter.
3163 (do_remote_fileio_request, remote_fileio_request):
3164 * remote-fileio.h (remote_fileio_request):
3165 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3166 remote_target parameter.
3167 (remote_notif_process, handle_notification): Adjust to pass down
3169 (remote_notif_state_allocate): Add remote_target parameter. Save
3171 * remote-notif.h (struct remote_target): Forward declare.
3172 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3173 remote_target parameter.
3174 (struct remote_notif_state) <remote>: New field.
3175 (remote_notif_ack, remote_notif_parse): Add remote_target
3177 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3178 remote_target parameter.
3179 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3180 (threads_listing_context, rmt_thread_action, protocol_feature)
3181 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3182 (packet_result, struct threads_listing_context, remote_state):
3183 Move definitions and declarations higher up.
3184 (remote_target) <~remote_target>: Declare.
3185 (remote_download_command_source, remote_file_put, remote_file_get)
3186 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3187 (remote_hostio_pread_vFile, remote_hostio_send_command)
3188 (remote_hostio_set_filesystem, remote_hostio_open)
3189 (remote_hostio_close, remote_hostio_unlink, remote_state)
3190 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3191 (get_memory_write_packet_size, get_memory_read_packet_size)
3192 (append_pending_thread_resumptions, remote_detach_1)
3193 (append_resumption, remote_resume_with_vcont)
3194 (add_current_inferior_and_thread, wait_ns, wait_as)
3195 (process_stop_reply, remote_notice_new_inferior)
3196 (process_initial_stop_replies, remote_add_thread)
3197 (btrace_sync_conf, remote_btrace_maybe_reopen)
3198 (remove_new_fork_children, kill_new_fork_children)
3199 (discard_pending_stop_replies, stop_reply_queue_length)
3200 (check_pending_events_prevent_wildcard_vcont)
3201 (discard_pending_stop_replies_in_queue, stop_reply)
3202 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3203 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3204 (remote_interrupt_as, remote_interrupt_ns)
3205 (remote_get_noisy_reply, remote_query_attached)
3206 (remote_add_inferior, remote_current_thread, get_current_thread)
3207 (set_thread, set_general_thread, set_continue_thread)
3208 (set_general_process, write_ptid)
3209 (remote_unpack_thread_info_response, remote_get_threadinfo)
3210 (parse_threadlist_response, remote_get_threadlist)
3211 (remote_threadlist_iterator, remote_get_threads_with_ql)
3212 (remote_get_threads_with_qxfer)
3213 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3214 (get_offsets, remote_check_symbols, remote_supported_packet)
3215 (remote_query_supported, remote_packet_size)
3216 (remote_serial_quit_handler, remote_detach_pid)
3217 (remote_vcont_probe, remote_resume_with_hc)
3218 (send_interrupt_sequence, interrupt_query)
3219 (remote_notif_get_pending_events, fetch_register_using_p)
3220 (send_g_packet, process_g_packet, fetch_registers_using_g)
3221 (store_register_using_P, store_registers_using_G)
3222 (set_remote_traceframe, check_binary_download)
3223 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3224 (remote_xfer_live_readonly_partial, remote_read_bytes)
3225 (remote_send_printf, remote_flash_write, readchar)
3226 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3227 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3228 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3229 (extended_remote_disable_randomization, extended_remote_run)
3230 (send_environment_packet, extended_remote_environment_support)
3231 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3232 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3233 (packet_command): Now methods of ...
3234 (remote_target): ... this class.
3235 (m_remote_state) <remote_target>: New field.
3236 (struct remote_state) <stop_reply_queue,
3237 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3239 (remote_state::remote_state): Allocate stop_reply_queue.
3240 (remote_state): Delete global.
3241 (get_remote_state_raw): Delete.
3242 (remote_target::get_remote_state): Allocate m_remote_state on
3244 (get_current_remote_target): New.
3245 (remote_ops, extended_remote_ops): Delete.
3246 (wait_forever_enabled_p, remote_async_inferior_event_token):
3247 Delete, moved to struct remote_state.
3248 (remote_target::close): Delete self. Destruction bits split to
3250 (remote_target::~remote_target): ... this.
3251 (show_memory_packet_size): Adjust to use
3252 get_current_remote_target.
3253 (struct protocol_feature) <func>: Add remote_target parameter.
3254 All callers adjusted.
3255 (curr_quit_handler_target): New.
3256 (remote_serial_quit_handler): Reimplement.
3257 (remote_target::open_1): Adjust to use get_current_remote_target.
3258 Heap-allocate remote_target/extended_remote_target instances.
3259 (vcont_builder::vcont_builder): Add remote_target parameter, and
3260 save it in m_remote. All callers adjusted.
3261 (vcont_builder::m_remote): New field.
3262 (vcont_builder::restart, vcont_builder::flush)
3263 (vcont_builder::push_action): Use it.
3264 (remote_target::commit_resume): Use it.
3265 (struct queue_iter_param) <remote>: New field.
3266 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3267 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3268 (check_pending_event_prevents_wildcard_vcont_callback)
3269 (remote_target::check_pending_events_prevent_wildcard_vcont)
3270 (remote_target::discard_pending_stop_replies)
3271 (remote_target::discard_pending_stop_replies_in_queue)
3272 (remote_target::remote_notif_remove_queued_reply): Fill in
3274 (remote_notif_get_pending_events): New.
3275 (remote_target::readchar, remote_target::remote_serial_write):
3276 Save/restore curr_quit_handler_target.
3278 (kill_new_fork_children): Fill in 'remote' field.
3279 (packet_command): Use get_current_remote_target, defer to
3280 remote_target method of same name.
3281 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3282 parameter, and save it in m_remote. All callers adjusted.
3283 (scoped_remote_fd::release): Use m_remote.
3284 (scoped_remote_fd::m_remote): New field.
3285 (remote_file_put, remote_file_get, remote_file_delete): Use
3286 get_current_remote_target, defer to remote_target method of same
3288 (remote_btrace_reset): Add remote_state paremeter. Update all
3290 (remote_async_inferior_event_handler). Pass down 'data'.
3291 (remote_new_objfile): Use get_current_remote_target.
3292 (remote_target::vcont_r_supported): New.
3293 (set_range_stepping): Use get_current_remote_target and
3294 remote_target::vcont_r_supported.
3295 (_initialize_remote): Don't allocate 'remote_state' and
3296 'stop_reply_queue' globals.
3297 * remote.h (struct remote_target): Forward declare.
3298 (getpkt, putpkt, remote_notif_get_pending_events): Add
3299 'remote_target' parameter.
3301 2018-05-22 Pedro Alves <palves@redhat.com>
3303 * remote.c (vcont_builder): Now a class. Make all data members
3305 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3307 (vcont_builder_restart): Rename to ...
3308 (vcont_builder::restart): ... this.
3309 (vcont_builder_flush): Rename to ...
3310 (vcont_builder::flush): ... this.
3311 (vcont_builder_push_action): Rename to ...
3312 (vcont_builder::push_action): ... this.
3313 (remote_target::commit_resume): Adjust.
3315 2018-05-22 Pedro Alves <palves@redhat.com>
3317 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3318 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3319 (get_fixed_memory_packet_size): New.
3320 (get_memory_packet_size): Use it.
3321 (set_memory_packet_size): Don't override the config size with
3322 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3323 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3324 Don't refer to get_memory_packet_size if not connected to a remote
3325 target. Show "(default)" if configured size is 0.
3327 2018-05-22 Pedro Alves <palves@redhat.com>
3329 * remote.c (remote_target::mourn_inferior): Move
3330 discard_pending_stop_replies call here from ...
3331 (_initialize_remote): ... here.
3333 2018-05-22 Pedro Alves <palves@redhat.com>
3335 * remote.c (compare_section_command): Remove set_general_process
3338 2018-05-22 Pedro Alves <palves@redhat.com>
3340 * remote.c (struct packet_reg, struct remote_arch_state):
3341 Move higher up in the file.
3342 (remote_state) <m_arch_states>: Store remote_arch_state values
3343 instead of remote_arch_state pointers.
3344 (remote_state::get_remote_arch_state): Adjust.
3346 2018-05-22 Pedro Alves <palves@redhat.com>
3348 * remote.c: Include <unordered_map>.
3349 (remote_state): Now a class.
3350 (remote_state) <get_remote_arch_state>: Declare method.
3351 <get_remote_arch_state>: New field.
3352 (remote_arch_state) <remote_arch_state>: Declare ctor.
3353 <regs>: Now a unique_ptr.
3354 (remote_gdbarch_data_handle): Delete.
3355 (get_remote_arch_state): Delete.
3356 (remote_state::get_remote_arch_state): New.
3357 (get_remote_state): Adjust to call remote_state's
3358 get_remote_arch_state method.
3359 (init_remote_state): Delete, bits factored out to ...
3360 (remote_arch_state::remote_arch_state): ... this new method.
3361 (get_remote_packet_size, get_memory_packet_size)
3362 (process_g_packet, remote_target::fetch_registers)
3363 (remote_target::prepare_to_store, store_registers_using_G)
3364 (remote_target::store_registers, remote_target::get_trace_status):
3365 Adjust to call remote_state's method.
3366 (_initialize_remote): Remove reference to
3367 remote_gdbarch_data_handle.
3369 2018-05-22 Pedro Alves <palves@redhat.com>
3371 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3372 pread>: New method declarations.
3373 (remote_target::open_1): Adjust.
3374 (readahead_cache_invalidate): Rename to ...
3375 (readahead_cache::invalidate): ... this, and adjust to be a class
3377 (readahead_cache_invalidate_fd): Rename to ...
3378 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3380 (remote_hostio_pwrite): Adjust.
3381 (remote_hostio_pread_from_cache): Rename to ...
3382 (readahead_cache::pread): ... this, and adjust to be a class
3384 (remote_hostio_close): Adjust.
3386 2018-05-22 Pedro Alves <palves@redhat.com>
3388 * remote.c (remote_hostio_close_cleanup): Delete.
3389 (class scoped_remote_fd): New.
3390 (remote_file_put, remote_file_get): Use it.
3392 2018-05-22 Pedro Alves <palves@redhat.com>
3394 (struct vCont_action_support): Use bool and initialize all fields.
3395 (struct readahead_cache): Initialize all fields.
3396 (remote_state): Use bool and initialize all fields.
3397 (remote_state::remote_state, remote_state::~remote_state): New.
3398 (new_remote_state): Delete.
3399 (_initialize_remote): Use new to allocate remote_state.
3401 2018-05-22 Pedro Alves <palves@redhat.com>
3405 * c-exp.y: Include "c-support.h".
3406 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3407 of tolower. Use c_ident_is_alpha to scan names.
3408 * c-lang.c: Include "c-support.h".
3409 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3410 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3411 * c-support.h: New file, with bits factored out from ...
3412 * cp-name-parser.y: ... this file.
3413 Include "c-support.h".
3414 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3415 c-support.h and renamed.
3416 (symbol_end, yylex): Adjust.
3418 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3420 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3421 parameter type to CORE_ADDR.
3422 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3423 parameter type in declaration to CORE_ADDR.
3424 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3425 target_auxv_search to get AT_HWCAP and use the result to get the
3427 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3428 to CORE_ADDR. Remove the cast of the return value to unsigned
3429 long. Fix error predicate of target_auxv_search.
3430 (ppc_linux_nat_target::read_description): Change the type of the
3431 hwcap variable to CORE_ADDR.
3433 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3435 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3436 if the size of fpscr is larger than 32 bits.
3438 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3440 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3441 (ppc32_linux_vsxregmap): New global.
3442 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3443 regcache_supply_regset, and regcache_collect_regset.
3444 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3445 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3446 (fetch_vsx_register, store_vsx_register): Remove.
3447 (fetch_vsx_registers): Add regno parameter. Get regset using
3448 ppc_linux_vsxregset. Use regset to supply registers.
3449 (store_vsx_registers): Add regno parameter. Get regset using
3450 ppc_linux_vsxregset. Use regset to collect registers.
3451 (fetch_register): Call fetch_vsx_registers instead of
3453 (store_register): Call store_vsx_registers instead of
3455 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3456 new regno parameter.
3457 (store_ppc_registers): Call store_vsx_registers with -1 for the
3458 new regno parameter.
3459 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3460 (ppc_collect_vsxregset): Remove.
3462 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3464 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3466 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3467 for vector register offset fields.
3468 (ppc64_fbsd_reg_offsets): Likewise.
3469 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3470 to vector register offset fields.
3471 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3472 to vector register offset fields.
3473 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3474 vector register offset fields.
3475 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3476 initializers for vector register offset fields.
3477 (rs6000_aix64_reg_offsets): Likewise.
3478 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3479 (ppc_supply_vrregset): Remove.
3480 (ppc_collect_vrregset): Remove.
3481 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3482 (ppc_linux_vrregset) : New function.
3483 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3484 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3485 (ppc32_linux_vrregset): Remove.
3486 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3487 and use result instead of ppc32_linux_vrregset.
3488 (ppc32_linux_reg_offsets): Remove initializers for vector register
3490 (ppc64_linux_reg_offsets): Likewise.
3491 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3492 * ppc-linux-nat.c: Include regset.h.
3493 (gdb_vrregset_t): Adjust comment to account for little-endian
3495 (supply_vrregset, fill_vrregset): Remove.
3496 (fetch_altivec_register, store_altivec_register): Remove.
3497 (fetch_altivec_registers): Add regno parameter. Get regset using
3498 ppc_linux_vrregset. Use regset to supply registers.
3499 (store_altivec_registers): Add regno parameter. Get regset using
3500 ppc_linux_vrregset. Use regset to collect registers.
3501 (fetch_register): Call fetch_altivec_registers instead of
3502 fetch_altivec_register.
3503 (store_register): Call store_altivec_registers instead of
3504 store_altivec_register.
3505 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3506 the new regno parameter.
3507 (store_ppc_registers): Call store_altivec_registers with -1 for
3508 the new regno parameter.
3510 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3512 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3513 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3514 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3515 (gdb_vrregset_t): Change array type size to
3516 PPC_LINUX_SIZEOF_VRREGSET.
3517 (gdb_vsxregset_t): Change array type size to
3518 PPC_LINUX_SIZEOF_VSXREGSET.
3519 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3520 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3521 PPC_LINUX_SIZEOF_VSXREGSET.
3523 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3525 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3526 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3528 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3529 ppc_linux_target_wordsize with tid.
3530 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3532 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3533 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3534 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3535 tid parameter. Remove static specifier.
3536 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3537 (ppc_linux_target_wordsize): New declaration.
3539 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3541 * arch/ppc-linux-common.c: New file.
3542 * arch/ppc-linux-common.h: New file.
3543 * arch/ppc-linux-tdesc.h: New file.
3544 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3545 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3546 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3547 arch/ppc-linux-tdesc.h.
3548 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3549 arch/ppc-linux-tdesc.h.
3550 (ppc_linux_nat_target::read_description): Remove target
3551 description matching code. Fill a ppc_linux_features struct and
3552 call ppc_linux_match_description with it. Move comment about ISA
3553 2.05 to ppc-linux-common.c.
3554 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3555 arch/ppc-linux-tdesc.h.
3556 (ppc_linux_core_read_description): Remove target description
3557 matching code. Fill a ppc_linux_features struct and call
3558 ppc_linux_match_description with it.
3559 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3560 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3561 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3562 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3563 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3564 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3565 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3566 (tdesc_powerpc_e500l): Remove.
3568 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3570 * ada-lang.c (catch_assert_command): Pass empty string instead
3571 of NULL for excep_string argument.
3573 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3575 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3576 the width of the requested register exceeds the width of the
3579 2018-05-21 Tom Tromey <tom@tromey.com>
3581 * printcmd.c (output_command): Remove.
3582 (output_command_const): Rename to output_command.
3583 * valprint.h (output_command): Rename from output_command_const.
3584 * tracepoint.c (trace_dump_actions): Call output_command.
3586 2018-05-21 Tom Tromey <tom@tromey.com>
3588 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3589 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3590 * ada-lang.h (create_ada_exception_catchpoint): Update.
3591 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3593 (create_excep_cond_exprs, ~ada_catchpoint)
3594 (should_stop_exception, print_one_exception)
3595 (print_mention_exception, print_recreate_exception): Update.
3596 (ada_get_next_arg): Remove.
3597 (catch_ada_exception_command_split): Use std::string. Change type
3598 of "excep_string", "cond_string".
3599 (catch_ada_exception_command): Update.
3600 (create_ada_exception_catchpoint): Change type of excep_string.
3601 (ada_exception_sal): Remove excep_string parameter.
3602 (~ada_catchpoint): Remove.
3604 2018-05-21 Tom Tromey <tom@tromey.com>
3606 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3609 2018-05-21 Tom Tromey <tom@tromey.com>
3611 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3612 Return unique_xmalloc_ptr.
3613 (print_it_exception): Update.
3615 2018-05-21 Tom Tromey <tom@tromey.com>
3617 * tracepoint.c (trace_dump_actions): Use std::string.
3619 2018-05-21 Tom Tromey <tom@tromey.com>
3621 * symfile.c (reread_symbols): Use std::string for original_name.
3623 2018-05-21 Tom Tromey <tom@tromey.com>
3625 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3626 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3629 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3631 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3633 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3634 * objfiles.c (get_objfile_bfd_data): Allocate
3635 objfile_per_bfd_storage with obstack_new when allocating on
3638 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3640 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3642 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3643 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3644 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3645 (add_pending): Likewise.
3646 (parse_symbol): Likewise.
3647 (parse_partial_symbols): Likewise.
3648 (psymtab_to_symtab_1): Likewise.
3649 (new_psymtab): Likewise.
3650 (elfmdebug_build_psymtabs): Likewise.
3651 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3652 * objfiles.c (get_objfile_bfd_data): Likewise.
3653 (objfile_register_static_link): Likewise.
3654 * psymtab.c (allocate_psymtab): Likewise.
3655 * stabsread.c (read_member_functions): Likewise.
3656 * xcoffread.c (xcoff_end_psymtab): Likewise.
3658 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3660 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3661 compiler supports std::is_trivially_constructible.
3662 * common/poison.h: Include obstack.h.
3663 (IsMallocable): Define to is_trivially_constructible if the
3664 compiler supports it, define to true_type otherwise.
3668 (XOBNEWVEC): Redefine.
3669 * gdb_obstack.h (obstack_zalloc): New.
3670 (OBSTACK_ZALLOC): Redefine.
3671 (obstack_calloc): New.
3672 (OBSTACK_CALLOC): Redefine.
3674 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3675 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3677 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3678 obstack_calloc/obstack_zalloc.
3679 (gdbarch_obstack_zalloc): Remove.
3680 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3682 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3684 * stack.c (backtrace_command_1): Remove useless variable int i.
3686 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3688 * stack.c (print_frame_info): Fix comment.
3690 2018-05-18 Tom Tromey <tom@tromey.com>
3692 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3693 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3694 (~dwarf2_per_objfile): Update
3695 (dwarf2_get_dwz_file): Use new.
3696 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3699 2018-05-18 Tom Tromey <tom@tromey.com>
3701 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3703 * dwarf2read.c (struct dwp_file): Add constructor and
3705 (open_and_init_dwp_file): Return a unique_ptr.
3706 (dwarf2_per_objfile, create_dwp_hash_table)
3707 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3708 (lookup_dwo_unit_in_dwp): Update.
3709 (open_and_init_dwp_file, get_dwp_file): Update.
3711 2018-05-18 Tom Tromey <tom@tromey.com>
3713 * dwarf2read.c (dwarf2_per_objfile): Update.
3714 (struct mapped_index): Add initializers.
3715 (dwarf2_read_index): Use new.
3716 (dw2_symtab_iter_init): Update.
3717 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3720 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3722 * dwarf2read.c (mapped_index) <total_size>: Remove.
3724 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3726 * unittests/format_pieces-selftests.c (test_format_specifier):
3729 2018-05-18 Tom Tromey <tom@tromey.com>
3731 * c-typeprint.c (maybe_print_hole): New function.
3732 (c_print_type_struct_field_offset): Update.
3733 (c_type_print_base_struct_union): Call maybe_print_hole.
3735 2018-05-17 Keith Seitz <keiths@redhat.com>
3737 * breakpoint.c (build_bpstat_chain): New function, moved from
3739 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3740 If no stop chain is passed, call build_bpstat_chain to build it.
3741 * breakpoint.h (build_bpstat_chain): Declare.
3742 (bpstat_stop_status): Move documentation here from breakpoint.c.
3743 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3744 build the stop chain and pass it to skip_inline_frames.
3745 Pass this stop chain to bpstat_stop_status.
3746 * inline-frame.c: Include breakpoint.h.
3747 (stopped_by_user_bp_inline_frame): New function.
3748 (skip_inline_frames): Add parameter `stop_chain'.
3749 Move documention to inline-frame.h.
3750 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3751 whether the frame should be elided.
3752 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3753 Add moved documentation and update for new parameter.
3755 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3758 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3759 unittests/format_pieces-selftests.c.
3760 * common/format.h (format_piece) <operator==>: New.
3761 (format_pieces) <operator[]>: Remove.
3762 * common/format.c (format_pieces::format_pieces): Handle \e.
3763 * unittests/format_pieces-selftests.c: New.
3765 2018-05-17 Tom Tromey <tom@tromey.com>
3768 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3769 (dw2_instantiate_symtab): Add skip_partial parameter.
3770 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3771 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3772 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3773 (dw2_expand_symtabs_matching_one)
3774 (dw2_find_pc_sect_compunit_symtab)
3775 (dw2_debug_names_lookup_symbol)
3776 (dw2_debug_names_expand_symtabs_for_function): Update.
3777 (init_cutu_and_read_dies): Add skip_partial parameter.
3778 (process_psymtab_comp_unit, build_type_psymtabs_1)
3779 (process_skeletonless_type_unit, load_partial_comp_unit)
3780 (psymtab_to_symtab_1): Update.
3781 (load_full_comp_unit): Add skip_partial parameter.
3782 (process_imported_unit_die, dwarf2_read_addr_index)
3783 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3784 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3785 (read_signatured_type): Update.
3787 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3789 * value.c (release_value): Remove unused variable.
3790 (record_latest_value): Likewise.
3791 (access_value_history): Likewise.
3792 (preserve_values): Likewise.
3794 2018-05-17 Tom Tromey <tom@tromey.com>
3796 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3799 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3802 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3803 Also handle registers whose width is not a multiple of
3805 (linux_nat_trad_target::store_register): Likewise.
3807 2018-05-16 Tom Tromey <tom@tromey.com>
3809 * gdbcore.h (core_bfd): Redefine.
3810 * corelow.c (core_target::close): Update.
3811 (core_target_open): Update.
3812 * progspace.h (struct program_space) <cbfd>: Now a
3815 2018-05-16 Tom Tromey <tom@tromey.com>
3818 * symfile-add-flags.h (enum symfile_add_flags)
3819 <SYMFILE_NOT_FILENAME>: New constant.
3820 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3821 objfile name from BFD.
3822 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3823 * minidebug.c (find_separate_debug_file_in_section): Put
3824 ".gnu_debugdata" into BFD's file name.
3826 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3828 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3831 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3834 * aarch64-tdep.c (aarch64_analyze_prologue,
3835 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3836 Indicate not interested in errors.
3838 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3840 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3841 Supply the MIPS_ZERO_REGNUM register.
3843 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3845 * mips-tdep.c (mask_address_var): Make variable static.
3847 2018-05-14 Tom Tromey <tom@tromey.com>
3849 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3851 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3853 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3854 FXSAVE_ADDR for the mxcsr register.
3856 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3858 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3860 2018-05-11 Pedro Alves <palves@redhat.com>
3862 * corelow.c (core_target) <core_target>: No longer inline.
3863 Initialize m_core_gdbarch, m_core_vec and build the section table
3865 <~core_target>: New.
3866 <core_gdbarch, get_core_register_section>: New methods.
3867 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3868 factored out from ...
3869 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3871 (sniff_core_bfd): Add gdbarch parameter.
3872 (core_close): Delete, merged into ...
3873 (core_target::close): ... here. Delete self.
3874 (core_close_cleanup): Delete.
3875 (core_target_open): Allocate a core_target on the heap. Use a
3876 unique_ptr instead of a cleanup. Bits moved into the core_target
3877 ctor. Adjust to use core_target methods instead of globals.
3878 (get_core_register_section): Rename to ...
3879 (core_target::get_core_register_section): ... this and adjust.
3880 (struct get_core_registers_cb_data): New.
3881 (get_core_registers_cb): Use it. Use bool.
3882 (core_target::fetch_registers, core_target::files_info)
3883 (core_target::xfer_partial, core_target::read_description)
3884 (core_target::pid_to, core_target::thread_name): Adjust to
3885 reference class fields instead of globals.
3886 * target.h (struct target_ops_deleter, target_ops_up): New.
3888 2018-05-11 Pedro Alves <palves@redhat.com>
3890 * corefile.c (core_file_command): Move to corelow.c.
3891 * corelow.c (the_core_target): Delete.
3892 (core_file_command): Moved from corefile.c. Check exec_bfd
3893 instead of the_core_target. Use target_detach instead of calling
3894 into the_core_target directly.
3895 (maybe_say_no_core_file_now): New.
3896 (core_target::detach): Use it.
3897 (_initialize_corelow): Remove references to the_core_target.
3898 * gdbcore.h (the_core_target): Delete.
3900 2018-05-11 Tom Tromey <tromey@redhat.com>
3901 Pedro Alves <palves@redhat.com>
3903 * corefile.c (core_bfd): Remove.
3904 * gdbcore.h (core_bfd): Now a macro.
3905 * progspace.h (struct program_space) <cbfd>: New field.
3907 2018-05-11 Tom Tromey <tom@tromey.com>
3909 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3912 2018-05-10 Tom Tromey <tom@tromey.com>
3914 * configure: Rebuild.
3915 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3917 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3920 * regformats/regdat.sh: Adjust script, following the addition
3921 of the new expedite_regs parameter to init_target_desc.
3923 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3926 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3927 set_gdbarch_significant_addr_bit.
3928 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3929 set_gdbarch_significant_addr_bit.
3930 * utils.c (address_significant): Update to sign extend addr.
3932 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3934 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3935 (xtensa_linux_init_abi): Limit tdep->num_regs by
3936 tdep->num_nopriv_regs.
3937 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3938 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3941 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3943 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3945 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3947 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3948 (I387_MXCSR_INIT_VAL): New constant.
3949 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3950 buffer if it was supplied by the inferior.
3951 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3952 (i387_xsave_get_clear_bv): New function.
3953 (i387_supply_xsave): Only read x87 control registers from the
3954 xsave buffer if the feature is enabled, and the state will have
3955 been written, otherwise, provide a suitable default.
3956 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3957 including x87 control registers. Update control registers if they
3958 have changed from the default value, and mark features as enabled
3960 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3962 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3964 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3966 2018-05-07 Tom Tromey <tom@tromey.com>
3968 * configure: Rebuild.
3969 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3971 2018-05-07 Tom Tromey <tom@tromey.com>
3974 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3975 bit. Use correct value for VDIV.
3977 2018-05-04 Tom Tromey <tom@tromey.com>
3979 * configure: Rebuild.
3980 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3982 2018-05-04 Tom Tromey <tom@tromey.com>
3984 * linux-record.c (record_linux_system_call) <case
3985 RECORD_SYS_RECVFROM>: Add "break".
3987 2018-05-04 Tom Tromey <tom@tromey.com>
3989 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3990 Add missing "break".
3991 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3992 Add missing "break".
3994 2018-05-04 Tom Tromey <tom@tromey.com>
3996 * rs6000-tdep.c (ppc_process_record_op4)
3997 (ppc_process_record_op63): Add fall-through comment.
3999 2018-05-04 Tom Tromey <tom@tromey.com>
4001 * i386-tdep.c (i386_process_record): Add fall-through comment.
4003 2018-05-04 Tom Tromey <tom@tromey.com>
4005 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4008 2018-05-04 Tom Tromey <tom@tromey.com>
4010 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4011 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4012 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4014 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4016 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4019 2018-05-04 Tom Tromey <tom@tromey.com>
4021 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4023 2018-05-04 Tom Tromey <tom@tromey.com>
4025 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4026 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4027 * symfile.c (section_is_mapped): Fix fall-through comment.
4028 * stabsread.c (define_symbol, read_member_functions): Fix
4029 fall-through comment.
4030 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4032 * remote.c (remote_wait_as): Fix fall-through comment.
4033 * p-exp.y (yylex): Fix fall-through comment.
4034 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4036 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4037 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4038 * jv-exp.y (yylex): Fix fall-through comment.
4039 * go-exp.y (lex_one_token): Fix fall-through comment.
4040 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4041 fall-through comment.
4042 * f-exp.y (yylex): Fix fall-through comment.
4043 * dwarf2read.c (process_die): Fix fall-through comments.
4044 * dbxread.c (process_one_symbol): Fix fall-through comment.
4045 * d-exp.y (lex_one_token): Fix fall-through comment.
4046 * cp-name-parser.y (yylex): Fix fall-through comment.
4047 * coffread.c (coff_symtab_read): Fix fall-through comment.
4048 * c-exp.y (lex_one_token): Fix fall-through comment.
4049 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4051 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4054 2018-05-04 Tom Tromey <tom@tromey.com>
4057 * NEWS: Mention gdb.execute change.
4058 * gdbcmd.h (execute_control_command): Don't declare.
4059 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4060 execute_control_commands, execute_control_commands_to_string.
4061 * cli/cli-script.h (execute_control_commands)
4062 (execute_control_commands_to_string): Declare.
4063 (execute_control_command): Add from_tty parameter.
4064 * cli/cli-script.c (execute_control_commands)
4065 (execute_control_commands_to_string): New functions.
4066 (execute_user_command): Use execute_control_commands.
4067 (execute_control_command_1): Add "from_tty" parameter. Update.
4068 (execute_control_command): Likewise.
4070 2018-05-04 Tom Tromey <tom@tromey.com>
4073 * NEWS: Mention that breakpoint commands are writable.
4074 * python/py-breakpoint.c (bppy_set_commands): New function.
4075 (breakpoint_object_getset) <"commands">: Use it.
4077 2018-05-04 Tom Tromey <tom@tromey.com>
4079 * tracepoint.c (actions_command): Update.
4080 * mi/mi-cmd-break.c (mi_command_line_array)
4081 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4082 (mi_read_next_line): Remove.
4083 (mi_cmd_break_commands): Update.
4084 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4086 * cli/cli-script.c (get_command_line): Update.
4087 (process_next_line): Use function_view. Constify.
4088 (recurse_read_control_structure, read_command_lines)
4089 (read_command_lines_1): Change argument types to function_view.
4090 (do_define_command, document_command): Update.
4091 * breakpoint.h (check_tracepoint_command): Don't declare.
4092 * breakpoint.c (check_tracepoint_command): Remove.
4093 (commands_command_1, create_tracepoint_from_upload): Update.
4095 2018-05-04 Tom Tromey <tom@tromey.com>
4098 * cli/cli-script.h (enum command_control_type) <define_control>:
4100 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4101 (build_command_line, execute_control_command_1)
4102 (process_next_line): Likewise.
4103 (do_define_command): New function, extracted from define_command.
4104 (define_command): Use it.
4106 2018-05-04 Tom Tromey <tom@tromey.com>
4108 * tracepoint.c (actions_command): Update.
4109 * cli/cli-script.h (read_command_lines): Update.
4110 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4111 (MAX_TMPBUF): Remove define.
4112 (define_command): Use string_printf.
4113 (document_command): Likewise.
4114 * breakpoint.c (commands_command_1): Update.
4116 2018-05-04 Tom Tromey <tom@tromey.com>
4118 * top.c (execute_command): Update.
4119 * cli/cli-script.h (print_command_lines): Now varargs.
4120 * cli/cli-script.c (print_command_lines): Now varargs.
4121 (execute_control_command_1) <case while_control, case if_control>:
4124 2018-05-04 Tom Tromey <tom@tromey.com>
4126 * tracepoint.c (all_tracepoint_actions): Rename from
4127 all_tracepoint_actions_and_cleanup. Change return type.
4128 (actions_command, encode_actions_1, encode_actions)
4129 (trace_dump_actions, tdump_command): Update.
4130 * remote.c (remote_download_command_source): Update.
4131 * python/python.c (gdbpy_eval_from_control_command)
4132 (python_command, python_interactive_command): Update.
4133 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4134 * guile/guile.c (guile_command)
4135 (gdbscm_eval_from_control_command, guile_command): Update.
4136 * compile/compile.c (compile_code_command)
4137 (compile_print_command, compile_to_object): Update.
4138 * cli/cli-script.h (struct command_lines_deleter): New.
4139 (counted_command_line): New typedef.
4140 (struct command_line): Add constructor, destructor.
4141 <body_list>: Remove.
4142 <body_list_0, body_list_1>: New members.
4143 (command_line_up): Remove typedef.
4144 (read_command_lines, read_command_lines_1, get_command_line):
4146 (copy_command_lines): Don't declare.
4147 * cli/cli-script.c (build_command_line): Use "new".
4148 (get_command_line): Return counted_command_line.
4149 (print_command_lines, execute_user_command)
4150 (execute_control_command_1, while_command, if_command): Update.
4151 (realloc_body_list): Remove.
4152 (process_next_line, recurse_read_control_structure): Update.
4153 (read_command_lines, read_command_lines_1): Return counted_command_line.
4154 (free_command_lines): Use "delete".
4155 (copy_command_lines): Remove.
4156 (define_command, document_command, show_user_1): Update.
4157 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4158 a counted_command_line.
4159 * breakpoint.h (counted_command_line): Remove typedef.
4160 (breakpoint_set_commands): Update.
4161 * breakpoint.c (check_no_tracepoint_commands)
4162 (validate_commands_for_breakpoint): Update.
4163 (breakpoint_set_commands): Change commands to be a
4164 counted_command_line.
4165 (commands_command_1, update_dprintf_command_list)
4166 (create_tracepoint_from_upload): Update.
4168 2018-05-04 Tom Tromey <tom@tromey.com>
4170 * cli/cli-decode.h (cmd_list_element): New constructor.
4171 (~cmd_list_element): New destructor.
4172 (struct cmd_list_element): Add initializers.
4173 * cli/cli-decode.c (do_add_cmd): Use "new".
4174 (delete_cmd): Use "delete".
4176 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4177 Pedro Alves <palves@redhat.com>
4179 PR breakpoints/19806 and support for PR external/20207.
4180 * NEWS: Mention Aarch64 watchpoint improvements.
4181 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4182 watchpoints and PR external/20207 watchpoints.
4183 * nat/aarch64-linux-hw-point.c
4184 (kernel_supports_any_contiguous_range): New.
4185 (aarch64_watchpoint_offset): New.
4186 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4187 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4188 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4189 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4190 next_addr_orig_p. Support PR external/20207 watchpoints.
4191 (aarch64_downgrade_regs): New.
4192 (aarch64_dr_state_insert_one_point): New parameters offset and
4194 (aarch64_dr_state_remove_one_point): Likewise.
4195 (aarch64_handle_breakpoint): Update caller.
4196 (aarch64_handle_aligned_watchpoint): Likewise.
4197 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4199 (aarch64_linux_set_debug_regs): Remove const from state. Call
4200 aarch64_downgrade_regs.
4201 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4202 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4203 (DR_CONTROL_MASK): ... this.
4204 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4205 (unsigned int aarch64_watchpoint_offset): New prototype.
4206 (aarch64_linux_set_debug_regs): Remove const from state.
4207 * utils.c (align_up, align_down): Move to ...
4208 * common/common-utils.c (align_up, align_down): ... here.
4209 * utils.h (align_up, align_down): Move to ...
4210 * common/common-utils.h (align_up, align_down): ... here.
4212 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4214 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4215 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4216 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4217 Re-implement to match the ABI as summarized in GCC's
4218 gcc/config/sparc/sparc.c. All callers updated.
4219 (sparc32_store_arguments): Remove assertion.
4221 2018-05-04 Tom Tromey <tom@tromey.com>
4223 * printcmd.c: Don't include tui.h.
4224 (decode_format): Use skip_spaces.
4226 2018-05-04 Tom Tromey <tom@tromey.com>
4229 * printcmd.c (last_count): New global.
4230 (x_command): Use saved count when repeating.
4232 2018-05-04 Tom Tromey <tom@tromey.com>
4234 * nto-procfs.c (do_closedir_cleanup): Remove.
4235 (procfs_pidlist): Use gdb_dir_up.
4236 * procfs.c (do_closedir_cleanup): Remove.
4237 (proc_update_threads): Use gdb_dir_up.
4238 * common/filestuff.h (struct gdb_dir_deleter): New.
4239 (gdb_dir_up): New typedef.
4241 2018-05-04 Tom Tromey <tom@tromey.com>
4243 * ada-lang.c (print_mention_exception): Use std::string.
4245 2018-05-04 Tom Tromey <tom@tromey.com>
4247 * ada-lang.c (create_excep_cond_exprs): Update.
4248 (ada_exception_catchpoint_cond_string): Use std::string.
4250 2018-05-04 Tom Tromey <tom@tromey.com>
4252 * ada-lang.c (xget_renaming_scope): Return std::string.
4253 (old_renaming_is_invisible): Update.
4255 2018-05-04 Tom Tromey <tom@tromey.com>
4257 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4258 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4260 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4262 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4264 2018-05-04 Tom Tromey <tom@tromey.com>
4266 * remote.c (remote_query_supported_append): Change type.
4267 (remote_check_symbols): Update.
4269 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4272 * configure.ac: Prepend libpython.
4273 * python/python-config.py: Likewise.
4274 * configure: Regenerate.
4276 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4278 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4280 2018-05-03 Pedro Alves <palves@redhat.com>
4283 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4284 override. Write 'true' instead of '1'.
4285 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4288 2018-05-02 Pedro Alves <palves@redhat.com>
4290 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4291 add_inf_child_target.
4292 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4293 add_inf_child_target.
4294 * aix-thread.c (aix_thread_target_info): New.
4295 (aix_thread_target) <shortname, longname, doc>: Delete.
4297 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4298 add_inf_child_target.
4299 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4300 add_inf_child_target.
4301 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4302 add_inf_child_target.
4303 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4304 add_inf_child_target.
4305 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4306 add_inf_child_target.
4307 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4308 add_inf_child_target.
4309 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4310 add_inf_child_target.
4311 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4312 add_inf_child_target.
4313 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4314 add_inf_child_target.
4315 * bfd-target.c (target_bfd_target_info): New.
4316 (target_bfd) <shortname, longname, doc>: Delete.
4318 * bsd-kvm.c (bsd_kvm_target_info): New.
4319 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4321 (bsd_kvm_target::open): Rename to ...
4322 (bsd_kvm_target_open): ... this. Adjust.
4323 * bsd-uthread.c (bsd_uthread_target_info): New.
4324 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4326 * corefile.c (core_file_command): Adjust.
4327 * corelow.c (core_target_info): New.
4328 (core_target) <shortname, longname, doc>: Delete.
4330 (core_target::open): Rename to ...
4331 (core_target_open): ... this. Adjust.
4332 * ctf.c (ctf_target_info): New.
4333 (ctf_target) <shortname, longname, doc>: Delete.
4335 (ctf_target::open): Rename to ...
4336 (ctf_target_open): ... this.
4337 (_initialize_ctf): Adjust.
4338 * exec.c (exec_target_info): New.
4339 (exec_target) <shortname, longname, doc>: Delete.
4341 (exec_target::open): Rename to ...
4342 (exec_target_open): ... this.
4343 * gdbcore.h (core_target_open): Declare.
4344 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4345 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4346 add_inf_child_target.
4347 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4348 add_inf_child_target.
4349 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4350 add_inf_child_target.
4351 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4352 add_inf_child_target.
4353 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4354 add_inf_child_target.
4355 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4356 add_inf_child_target.
4357 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4358 add_inf_child_target.
4359 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4360 add_inf_child_target.
4361 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4362 add_inf_child_target.
4363 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4364 add_inf_child_target.
4365 * inf-child.c (inf_child_target_info): New.
4366 (inf_child_target::info): New.
4367 (inf_child_open_target): Remove 'target' parameter. Use
4368 get_native_target instead.
4369 (inf_child_target::open): Delete.
4370 (add_inf_child_target): New.
4371 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4374 (add_inf_child_target): Declare.
4375 (inf_child_open_target): Declare.
4376 * linux-thread-db.c (thread_db_target_info): New.
4377 (thread_db_target) <shortname, longname, doc>: Delete.
4379 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4380 add_inf_child_target.
4381 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4382 add_inf_child_target.
4383 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4384 add_inf_child_target.
4385 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4386 add_inf_child_target.
4387 * make-target-delegates (print_class): Adjust.
4388 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4389 add_inf_child_target.
4390 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4391 add_inf_child_target.
4392 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4393 add_inf_child_target.
4394 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4395 add_inf_child_target.
4396 * nto-procfs.c (nto_native_target_info): New.
4397 (nto_procfs_target_native) <shortname, longname, doc>:
4400 (nto_procfs_target_info): New.
4401 (nto_procfs_target_procfs) <shortname, longname, doc>:
4404 (init_procfs_targets): Adjust.
4405 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4406 add_inf_child_target.
4407 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4408 add_inf_child_target.
4409 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4410 add_inf_child_target.
4411 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4412 add_inf_child_target.
4413 * ravenscar-thread.c (ravenscar_target_info): New.
4414 (ravenscar_thread_target) <shortname, longname, doc>:
4417 * record-btrace.c (record_btrace_target_info):
4418 (record_btrace_target) <shortname, longname, doc>: Delete.
4420 (record_btrace_target::open): Rename to ...
4421 (record_btrace_target_open): ... this. Adjust.
4422 * record-full.c (record_longname, record_doc): New.
4423 (record_full_base_target) <shortname, longname, doc>: Delete.
4425 (record_full_target_info): New.
4426 (record_full_target): <shortname>: Delete.
4428 (record_full_core_open_1, record_full_open_1): Update comments.
4429 (record_full_base_target::open): Rename to ...
4430 (record_full_open): ... this.
4431 (cmd_record_full_restore): Update.
4432 (_initialize_record_full): Update.
4433 * remote-sim.c (remote_sim_target_info): New.
4434 (gdbsim_target) <shortname, longname, doc>: Delete.
4436 (gdbsim_target::open): Rename to ...
4437 (gdbsim_target_open): ... this.
4438 (_initialize_remote_sim): Adjust.
4439 * remote.c (remote_doc): New.
4440 (remote_target_info): New.
4441 (remote_target) <shortname, longname, doc>: Delete.
4443 (extended_remote_target_info): New.
4444 (extended_remote_target) <shortname, longname, doc>: Delete.
4446 (remote_target::open_1): Make static. Adjust.
4447 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4448 * s390-linux-nat.c (_initialize_s390_nat): Use
4449 add_inf_child_target.
4450 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4451 add_inf_child_target.
4452 * sol-thread.c (thread_db_target_info): New.
4453 (sol_thread_target) <shortname, longname, doc>: Delete.
4455 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4456 add_inf_child_target.
4457 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4458 add_inf_child_target.
4459 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4460 add_inf_child_target.
4461 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4462 add_inf_child_target.
4463 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4464 add_inf_child_target.
4465 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4466 add_inf_child_target.
4467 * spu-linux-nat.c (_initialize_spu_nat): Use
4468 add_inf_child_target.
4469 * spu-multiarch.c (spu_multiarch_target_info): New.
4470 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4472 * target-delegates.c: Regenerate.
4473 * target.c: Include <unordered_map>.
4474 (target_ops_p): Delete.
4475 (DEF_VEC_P(target_ops_p)): Delete.
4476 (target_factories): New.
4477 (test_target_info): New.
4478 (test_target_ops::info): New.
4479 (open_target): Adjust to use target_factories.
4480 (add_target_with_completer): Rename to ...
4481 (add_target): ... this. Change prototype. Register target_info
4482 and open callback in target_factories. Register target_info in
4483 command context instead of target_ops.
4484 (add_target): Delete old implementation.
4485 (add_deprecated_target_alias): Change prototype. Adjust.
4486 (the_native_target): New.
4487 (set_native_target, get_native_target): New.
4488 (find_default_run_target): Use the_native_target.
4489 (find_attach_target, find_run_target): Simplify.
4490 (target_ops::open): Delete.
4491 (dummy_target_info): New.
4492 (dummy_target::shortname, dummy_target::longname)
4493 (dummy_target::doc): Delete.
4494 (dummy_target::info): New.
4495 (debug_target::shortname, debug_target::longname)
4496 (debug_target::doc): Delete.
4497 (debug_target::info): New.
4498 * target.h (struct target_info): New.
4499 (target_ops::~target_ops): Add comment.
4500 (target_ops::info): New.
4501 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4502 longer virtual. Implement in terms of target_info.
4503 (set_native_target, get_native_target): Declare.
4504 (target_open_ftype): New.
4505 (add_target, add_target_with_completer)
4506 (add_deprecated_target_alias): Change prototype.
4507 (test_target) <shortname, longname, doc>: Delete.
4509 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4510 add_inf_child_target.
4511 * tracefile-tfile.c (tfile_target_info): New.
4512 (tfile_target) <shortname, longname, doc>: Delete.
4514 (tfile_target::open): Rename to ...
4515 (tfile_target_open): ... this.
4516 (_initialize_tracefile_tfile): Adjust.
4517 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4518 add_inf_child_target.
4519 * windows-nat.c (_initialize_windows_nat): Use
4520 add_inf_child_target.
4521 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4522 add_inf_child_target.
4524 2018-05-02 Pedro Alves <palves@redhat.com>
4526 * linux-nat.h (linux_nat_target) <low_new_thread,
4527 low_delete_thread, low_new_fork, low_forget_process,
4528 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4529 New virtual methods.
4530 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4531 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4532 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4533 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4534 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4536 * linux-fork.c (delete_fork): Adjust to call low method.
4537 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4538 (linux_nat_new_fork, linux_nat_forget_process_hook)
4539 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4540 (linux_nat_status_is_event):
4541 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4542 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4544 (sigtrap_is_event): Rename to ...
4545 (linux_nat_target::low_status_is_event): ... this.
4546 (linux_nat_set_status_is_event): Delete.
4547 (save_stop_reason, linux_nat_wait_1)
4548 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4550 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4551 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4552 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4553 (linux_nat_set_prepare_to_resume): Delete.
4554 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4555 low virtual methods.
4556 * amd64-linux-nat.c: Likewise.
4557 * arm-linux-nat.c: Likewise.
4558 * i386-linux-nat.c: Likewise.
4559 * ia64-linux-nat.c: Likewise.
4560 * mips-linux-nat.c: Likewise.
4561 * ppc-linux-nat.c: Likewise.
4562 * s390-linux-nat.c: Likewise.
4563 * sparc64-linux-nat.c: Likewise.
4564 * x86-linux-nat.c: Likewise.
4565 * x86-linux-nat.h: Include "nat/x86-linux.h".
4566 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4567 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4570 2018-05-02 Pedro Alves <palves@redhat.com>
4572 * target.h (target_ops)
4573 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4574 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4575 stopped_by_watchpoint, have_continuable_watchpoint,
4576 stopped_data_address, watchpoint_addr_within_range,
4577 can_accel_watchpoint_condition, can_run, thread_alive,
4578 has_all_memory, has_memory, has_stack, has_registers,
4579 has_execution, can_async_p, is_async_p, supports_non_stop,
4580 always_non_stop_p, can_execute_reverse, supports_multi_process,
4581 supports_enable_disable_tracepoint,
4582 supports_disable_randomization, supports_string_tracing,
4583 supports_evaluation_of_breakpoint_conditions,
4584 can_run_breakpoint_commands, filesystem_is_local,
4585 can_download_tracepoint, get_trace_state_variable_value,
4586 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4587 record_is_replaying, record_will_replay,
4588 augmented_libraries_svr4_read>: Adjust to return bool.
4589 * aarch64-linux-nat.c: All implementations adjusted.
4590 * aix-thread.c: All implementations adjusted.
4591 * arm-linux-nat.c: All implementations adjusted.
4592 * breakpoint.c: All implementations adjusted.
4593 * bsd-kvm.c: All implementations adjusted.
4594 * bsd-uthread.c: All implementations adjusted.
4595 * corelow.c: All implementations adjusted.
4596 * ctf.c: All implementations adjusted.
4597 * darwin-nat.c: All implementations adjusted.
4598 * darwin-nat.h: All implementations adjusted.
4599 * exec.c: All implementations adjusted.
4600 * fbsd-nat.c: All implementations adjusted.
4601 * fbsd-nat.h: All implementations adjusted.
4602 * gnu-nat.c: All implementations adjusted.
4603 * gnu-nat.h: All implementations adjusted.
4604 * go32-nat.c: All implementations adjusted.
4605 * ia64-linux-nat.c: All implementations adjusted.
4606 * inf-child.c: All implementations adjusted.
4607 * inf-child.h: All implementations adjusted.
4608 * inf-ptrace.c: All implementations adjusted.
4609 * inf-ptrace.h: All implementations adjusted.
4610 * linux-nat.c: All implementations adjusted.
4611 * linux-nat.h: All implementations adjusted.
4612 * mips-linux-nat.c: All implementations adjusted.
4613 * nto-procfs.c: All implementations adjusted.
4614 * ppc-linux-nat.c: All implementations adjusted.
4615 * procfs.c: All implementations adjusted.
4616 * ravenscar-thread.c: All implementations adjusted.
4617 * record-btrace.c: All implementations adjusted.
4618 * record-full.c: All implementations adjusted.
4619 * remote-sim.c: All implementations adjusted.
4620 * remote.c: All implementations adjusted.
4621 * s390-linux-nat.c: All implementations adjusted.
4622 * sol-thread.c: All implementations adjusted.
4623 * spu-multiarch.c: All implementations adjusted.
4624 * target-delegates.c: All implementations adjusted.
4625 * target.c: All implementations adjusted.
4626 * target.h: All implementations adjusted.
4627 * tracefile-tfile.c: All implementations adjusted.
4628 * tracefile.c: All implementations adjusted.
4629 * tracefile.h: All implementations adjusted.
4630 * windows-nat.c: All implementations adjusted.
4631 * x86-linux-nat.h: All implementations adjusted.
4632 * x86-nat.h: All implementations adjusted.
4634 2018-05-02 Pedro Alves <palves@redhat.com>
4636 * make-target-delegates (scan_target_h): Don't trim lines here.
4637 Replace sequences of tabs and/or whitespace with a single
4639 (top level, parsing methods): Trim each line before processing it
4642 2018-05-02 Pedro Alves <palves@redhat.com>
4643 John Baldwin <jhb@freebsd.org>
4645 * target.h (enum strata) <debug_stratum>: New.
4646 (struct target_ops) <all delegation methods>: Replace by C++
4647 virtual methods, and drop "to_" prefix. All references updated
4649 <to_shortname, to_longname, to_doc, to_data,
4650 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4651 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4652 virtual methods. All references updated throughout.
4653 <can_attach, supports_terminal_ours, can_create_inferior,
4654 get_thread_control_capabilities, attach_no_wait>: New
4656 <insert_breakpoint, remove_breakpoint>: Now
4657 TARGET_DEFAULT_NORETURN methods.
4658 <info_proc>: Now returns bool.
4660 (OPS_MAGIC): Delete.
4661 (current_target): Delete. All references replaced by references
4663 (target_stack): ... this. New.
4664 (target_shortname, target_longname): Adjust.
4665 (target_can_run): Now a function declaration.
4666 (default_child_has_all_memory, default_child_has_memory)
4667 (default_child_has_stack, default_child_has_registers)
4668 (default_child_has_execution): Remove target_ops parameter.
4669 (complete_target_initialization): Delete.
4670 (memory_breakpoint_target): New template class.
4671 (test_target_ops): Refactor as a C++ class with virtual methods.
4672 * make-target-delegates (NAME_PART): Tighten.
4673 (POINTER_PART, CP_SYMBOL): New.
4674 (SIMPLE_RETURN_PART): Reimplement.
4675 (VEC_RETURN_PART): Expect less.
4676 (RETURN_PART, VIRTUAL_PART): New.
4677 (METHOD): Adjust to C++ virtual methods.
4678 (scan_target_h): Remove reference to C99.
4679 (dname): Output "target_ops::" prefix.
4680 (write_function_header): Adjust to output a C++ class method.
4681 (write_declaration): New.
4682 (write_delegator): Adjust to output a C++ class method.
4683 (tdname): Output "dummy_target::" prefix.
4684 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4686 (tdefault_names, debug_names): Delete.
4687 (return_types, tdefaults, styles, argtypes_array): New.
4688 (top level): All methods are delegators.
4690 (top level): Print dummy_target and debug_target classes.
4691 * target-delegates.c: Regenerate.
4692 * target-debug.h (target_debug_print_enum_info_proc_what)
4693 (target_debug_print_thread_control_capabilities)
4694 (target_debug_print_thread_info_p): New.
4695 * target.c (dummy_target): Delete.
4696 (the_dummy_target, the_debug_target): New.
4697 (target_stack): Now extern.
4698 (set_targetdebug): Push/unpush debug target.
4699 (default_child_has_all_memory, default_child_has_memory)
4700 (default_child_has_stack, default_child_has_registers)
4701 (default_child_has_execution): Remove target_ops parameter.
4702 (complete_target_initialization): Delete.
4703 (add_target_with_completer): No longer call
4704 complete_target_initialization.
4705 (target_supports_terminal_ours): Use regular delegation.
4706 (update_current_target): Delete.
4707 (push_target): No longer check magic number. Don't call
4708 update_current_target.
4709 (unpush_target): Don't call update_current_target.
4710 (target_is_pushed): No longer check magic number.
4711 (target_require_runnable): Skip for all stratums over
4713 (target_ops::info_proc): New.
4714 (target_info_proc): Use find_target_at and
4715 find_default_run_target.
4716 (target_supports_disable_randomization): Use regular delegation.
4717 (target_get_osdata): Use find_target_at.
4718 (target_ops::open, target_ops::close, target_ops::can_attach)
4719 (target_ops::attach, target_ops::can_create_inferior)
4720 (target_ops::create_inferior, target_ops::can_run)
4721 (target_can_run): New.
4722 (default_fileio_target): Use regular delegation.
4723 (target_ops::fileio_open, target_ops::fileio_pwrite)
4724 (target_ops::fileio_pread, target_ops::fileio_fstat)
4725 (target_ops::fileio_close, target_ops::fileio_unlink)
4726 (target_ops::fileio_readlink): New.
4727 (target_fileio_open_1, target_fileio_unlink)
4728 (target_fileio_readlink): Always call the target method. Handle
4730 (return_zero, return_zero_has_execution): Delete.
4731 (init_dummy_target): Delete.
4732 (dummy_target::dummy_target, dummy_target::shortname)
4733 (dummy_target::longname, dummy_target::doc)
4734 (debug_target::debug_target, debug_target::shortname)
4735 (debug_target::longname, debug_target::doc): New.
4736 (target_supports_delete_record): Use regular delegation.
4737 (setup_target_debug): Delete.
4738 (maintenance_print_target_stack): Skip debug_stratum.
4739 (initialize_targets): Instantiate the_dummy_target and
4741 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4743 (target_auxv_search, fprint_target_auxv): Adjust.
4744 (info_auxv_command): Adjust to use target_stack.
4745 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4746 * exceptions.c (print_flush): Handle a NULL target_stack.
4747 * regcache.c (target_ops_no_register): Refactor as class with
4750 * exec.c (exec_target): New class.
4751 (exec_ops): Now an exec_target.
4752 (exec_open, exec_close_1, exec_get_section_table)
4753 (exec_xfer_partial, exec_files_info, exec_has_memory)
4754 (exec_make_note_section): Refactor as exec_target methods.
4755 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4757 (exec_target::find_memory_regions): New.
4758 (_initialize_exec): Don't call init_exec_ops.
4759 * gdbcore.h (exec_file_clear): Delete.
4761 * corefile.c (core_target): Delete.
4762 (core_file_command): Adjust.
4763 * corelow.c (core_target): New class.
4764 (the_core_target): New.
4765 (core_close): Remove target_ops parameter.
4766 (core_close_cleanup): Adjust.
4767 (core_target::close): New.
4768 (core_open, core_detach, get_core_registers, core_files_info)
4769 (core_xfer_partial, core_thread_alive, core_read_description)
4770 (core_pid_to_str, core_thread_name, core_has_memory)
4771 (core_has_stack, core_has_registers, core_info_proc): Rework as
4772 core_target methods.
4773 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4774 (_initialize_corelow): Initialize the_core_target.
4775 * gdbcore.h (core_target): Delete.
4776 (the_core_target): New.
4778 * ctf.c: (ctf_target): New class.
4779 (ctf_ops): Now a ctf_target.
4780 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4781 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4782 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4784 (init_ctf_ops): Delete.
4785 (_initialize_ctf): Don't call it.
4786 * tracefile-tfile.c (tfile_target): New class.
4787 (tfile_ops): Now a tfile_target.
4788 (tfile_open, tfile_close, tfile_files_info)
4789 (tfile_get_tracepoint_status, tfile_trace_find)
4790 (tfile_fetch_registers, tfile_xfer_partial)
4791 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4792 Refactor as tfile_target methods.
4793 (tfile_xfer_partial_features): Remove target_ops parameter.
4794 (init_tfile_ops): Delete.
4795 (_initialize_tracefile_tfile): Don't call it.
4796 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4797 (tracefile_has_stack, tracefile_has_registers)
4798 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4799 tracefile_target methods.
4800 (init_tracefile_ops): Delete.
4801 (tracefile_target::tracefile_target): New.
4802 * tracefile.h: Include "target.h".
4803 (tracefile_target): New class.
4804 (init_tracefile_ops): Delete.
4806 * spu-multiarch.c (spu_multiarch_target): New class.
4807 (spu_ops): Now a spu_multiarch_target.
4808 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4809 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4810 (spu_search_memory, spu_mourn_inferior): Refactor as
4811 spu_multiarch_target methods.
4812 (init_spu_ops): Delete.
4813 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4814 complete_target_initialization.
4816 * ravenscar-thread.c (ravenscar_thread_target): New class.
4817 (ravenscar_ops): Now a ravenscar_thread_target.
4818 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4819 (ravenscar_thread_alive, ravenscar_pid_to_str)
4820 (ravenscar_fetch_registers, ravenscar_store_registers)
4821 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4822 (ravenscar_stopped_by_hw_breakpoint)
4823 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4824 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4825 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4827 (init_ravenscar_thread_ops): Delete.
4828 (_initialize_ravenscar): Remove references to
4829 init_ravenscar_thread_ops and complete_target_initialization.
4831 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4832 (bsd_uthread_target): New class.
4833 (bsd_uthread_ops): Now a bsd_uthread_target.
4834 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4835 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4836 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4837 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4838 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4839 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4840 (bsd_uthread_target): Delete function.
4841 (_initialize_bsd_uthread): Remove reference to
4842 complete_target_initialization.
4844 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4845 (target_bfd): ... this new class.
4846 (target_bfd_xfer_partial, target_bfd_get_section_table)
4847 (target_bfd_close): Refactor as target_bfd methods.
4848 (target_bfd::~target_bfd): New.
4849 (target_bfd_reopen): Adjust.
4850 (target_bfd::close): New.
4852 * record-btrace.c (record_btrace_target): New class.
4853 (record_btrace_ops): Now a record_btrace_target.
4854 (record_btrace_open, record_btrace_stop_recording)
4855 (record_btrace_disconnect, record_btrace_close)
4856 (record_btrace_async, record_btrace_info)
4857 (record_btrace_insn_history, record_btrace_insn_history_range)
4858 (record_btrace_insn_history_from, record_btrace_call_history)
4859 (record_btrace_call_history_range)
4860 (record_btrace_call_history_from, record_btrace_record_method)
4861 (record_btrace_is_replaying, record_btrace_will_replay)
4862 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4863 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4864 (record_btrace_store_registers, record_btrace_prepare_to_store)
4865 (record_btrace_to_get_unwinder)
4866 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4867 (record_btrace_commit_resume, record_btrace_wait)
4868 (record_btrace_stop, record_btrace_can_execute_reverse)
4869 (record_btrace_stopped_by_sw_breakpoint)
4870 (record_btrace_supports_stopped_by_sw_breakpoint)
4871 (record_btrace_stopped_by_hw_breakpoint)
4872 (record_btrace_supports_stopped_by_hw_breakpoint)
4873 (record_btrace_update_thread_list, record_btrace_thread_alive)
4874 (record_btrace_goto_begin, record_btrace_goto_end)
4875 (record_btrace_goto, record_btrace_stop_replaying_all)
4876 (record_btrace_execution_direction)
4877 (record_btrace_prepare_to_generate_core)
4878 (record_btrace_done_generating_core): Refactor as
4879 record_btrace_target methods.
4880 (init_record_btrace_ops): Delete.
4881 (_initialize_record_btrace): Remove reference to
4882 init_record_btrace_ops.
4883 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4884 the execution_direction global.
4885 (record_full_base_target, record_full_target)
4886 (record_full_core_target): New classes.
4887 (record_full_ops): Now a record_full_target.
4888 (record_full_core_ops): Now a record_full_core_target.
4889 (record_full_target::detach, record_full_target::disconnect)
4890 (record_full_core_target::disconnect)
4891 (record_full_target::mourn_inferior, record_full_target::kill):
4893 (record_full_open, record_full_close, record_full_async): Refactor
4894 as methods of the record_full_base_target class.
4895 (record_full_resume, record_full_commit_resume): Refactor
4896 as methods of the record_full_target class.
4897 (record_full_wait, record_full_stopped_by_watchpoint)
4898 (record_full_stopped_data_address)
4899 (record_full_stopped_by_sw_breakpoint)
4900 (record_full_supports_stopped_by_sw_breakpoint)
4901 (record_full_stopped_by_hw_breakpoint)
4902 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4903 methods of the record_full_base_target class.
4904 (record_full_store_registers, record_full_xfer_partial)
4905 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4906 Refactor as methods of the record_full_target class.
4907 (record_full_can_execute_reverse, record_full_get_bookmark)
4908 (record_full_goto_bookmark, record_full_execution_direction)
4909 (record_full_record_method, record_full_info, record_full_delete)
4910 (record_full_is_replaying, record_full_will_replay)
4911 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4912 (record_full_stop_replaying): Refactor as methods of the
4913 record_full_base_target class.
4914 (record_full_core_resume, record_full_core_kill)
4915 (record_full_core_fetch_registers)
4916 (record_full_core_prepare_to_store)
4917 (record_full_core_store_registers, record_full_core_xfer_partial)
4918 (record_full_core_insert_breakpoint)
4919 (record_full_core_remove_breakpoint)
4920 (record_full_core_has_execution): Refactor
4921 as methods of the record_full_core_target class.
4922 (record_full_base_target::supports_delete_record): New.
4923 (init_record_full_ops): Delete.
4924 (init_record_full_core_ops): Delete.
4925 (record_full_save): Refactor as method of the
4926 record_full_base_target class.
4927 (_initialize_record_full): Remove references to
4928 init_record_full_ops and init_record_full_core_ops.
4930 * remote.c (remote_target, extended_remote_target): New classes.
4931 (remote_ops): Now a remote_target.
4932 (extended_remote_ops): Now an extended_remote_target.
4933 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4934 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4935 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4936 (remote_pass_signals, remote_set_syscall_catchpoint)
4937 (remote_program_signals, )
4938 (remote_thread_always_alive): Remove target_ops parameter.
4939 (remote_thread_alive, remote_thread_name)
4940 (remote_update_thread_list, remote_threads_extra_info)
4941 (remote_static_tracepoint_marker_at)
4942 (remote_static_tracepoint_markers_by_strid)
4943 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4944 (remote_open): Refactor as methods of remote_target.
4945 (extended_remote_open, extended_remote_detach)
4946 (extended_remote_attach, extended_remote_post_attach):
4947 (extended_remote_supports_disable_randomization)
4948 (extended_remote_create_inferior): : Refactor as method of
4949 extended_remote_target.
4950 (remote_set_permissions, remote_open_1, remote_detach)
4951 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4952 (remote_resume, remote_commit_resume, remote_stop)
4953 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4954 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4955 (remote_prepare_to_store, remote_store_registers)
4956 (remote_flash_erase, remote_flash_done, remote_files_info)
4957 (remote_kill, remote_mourn, remote_insert_breakpoint)
4958 (remote_remove_breakpoint, remote_insert_watchpoint)
4959 (remote_watchpoint_addr_within_range)
4960 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4961 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4962 (remote_supports_stopped_by_sw_breakpoint)
4963 (remote_stopped_by_hw_breakpoint)
4964 (remote_supports_stopped_by_hw_breakpoint)
4965 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4966 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4967 (remote_verify_memory): Refactor as methods of remote_target.
4968 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4970 (remote_xfer_partial, remote_get_memory_xfer_limit)
4971 (remote_search_memory, remote_rcmd, remote_memory_map)
4972 (remote_pid_to_str, remote_get_thread_local_address)
4973 (remote_get_tib_address, remote_read_description): Refactor as
4974 methods of remote_target.
4975 (remote_target::fileio_open, remote_target::fileio_pwrite)
4976 (remote_target::fileio_pread, remote_target::fileio_close): New.
4977 (remote_hostio_readlink, remote_hostio_fstat)
4978 (remote_filesystem_is_local, remote_can_execute_reverse)
4979 (remote_supports_non_stop, remote_supports_disable_randomization)
4980 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4981 (remote_supports_enable_disable_tracepoint)
4982 (remote_supports_string_tracing)
4983 (remote_can_run_breakpoint_commands, remote_trace_init)
4984 (remote_download_tracepoint, remote_can_download_tracepoint)
4985 (remote_download_trace_state_variable, remote_enable_tracepoint)
4986 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4987 (remote_trace_start, remote_get_trace_status)
4988 (remote_get_tracepoint_status, remote_trace_stop)
4989 (remote_trace_find, remote_get_trace_state_variable_value)
4990 (remote_save_trace_data, remote_get_raw_trace_data)
4991 (remote_set_disconnected_tracing, remote_core_of_thread)
4992 (remote_set_circular_trace_buffer, remote_traceframe_info)
4993 (remote_get_min_fast_tracepoint_insn_len)
4994 (remote_set_trace_buffer_size, remote_set_trace_notes)
4995 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4996 (remote_disable_btrace, remote_teardown_btrace)
4997 (remote_read_btrace, remote_btrace_conf)
4998 (remote_augmented_libraries_svr4_read, remote_load)
4999 (remote_pid_to_exec_file, remote_can_do_single_step)
5000 (remote_execution_direction, remote_thread_handle_to_thread_info):
5001 Refactor as methods of remote_target.
5002 (init_remote_ops, init_extended_remote_ops): Delete.
5003 (remote_can_async_p, remote_is_async_p, remote_async)
5004 (remote_thread_events, remote_upload_tracepoints)
5005 (remote_upload_trace_state_variables): Refactor as methods of
5007 (_initialize_remote): Remove references to init_remote_ops and
5008 init_extended_remote_ops.
5010 * remote-sim.c (gdbsim_target): New class.
5011 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5012 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5013 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5014 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5015 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5016 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5017 Refactor as methods of gdbsim_target.
5018 (gdbsim_ops): Now a gdbsim_target.
5019 (init_gdbsim_ops): Delete.
5020 (gdbsim_cntrl_c): Adjust.
5021 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5023 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5024 (the_amd64_linux_nat_target): New.
5025 (amd64_linux_fetch_inferior_registers)
5026 (amd64_linux_store_inferior_registers): Refactor as methods of
5027 amd64_linux_nat_target.
5028 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5029 * i386-linux-nat.c: Don't include "linux-nat.h".
5030 (i386_linux_nat_target): New class.
5031 (the_i386_linux_nat_target): New.
5032 (i386_linux_fetch_inferior_registers)
5033 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5034 as methods of i386_linux_nat_target.
5035 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5036 * inf-child.c (inf_child_ops): Delete.
5037 (inf_child_fetch_inferior_registers)
5038 (inf_child_store_inferior_registers): Delete.
5039 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5040 methods of inf_child_target.
5041 (inf_child_target::supports_terminal_ours)
5042 (inf_child_target::terminal_init)
5043 (inf_child_target::terminal_inferior)
5044 (inf_child_target::terminal_ours_for_output)
5045 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5046 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5048 (inf_child_open, inf_child_disconnect, inf_child_close)
5049 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5050 (inf_child_post_startup_inferior, inf_child_can_run)
5051 (inf_child_pid_to_exec_file): Refactor as methods of
5053 (inf_child_follow_fork): Delete.
5054 (inf_child_target::can_create_inferior)
5055 (inf_child_target::can_attach): New.
5056 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5057 (inf_child_target::has_stack, inf_child_target::has_registers)
5058 (inf_child_target::has_execution): New.
5059 (inf_child_fileio_open, inf_child_fileio_pwrite)
5060 (inf_child_fileio_pread, inf_child_fileio_fstat)
5061 (inf_child_fileio_close, inf_child_fileio_unlink)
5062 (inf_child_fileio_readlink, inf_child_use_agent)
5063 (inf_child_can_use_agent): Refactor as methods of
5065 (return_zero, inf_child_target): Delete.
5066 (inf_child_target::inf_child_target): New.
5067 * inf-child.h: Include "target.h".
5068 (inf_child_target): Delete function prototype.
5069 (inf_child_target): New class.
5070 (inf_child_open_target, inf_child_mourn_inferior)
5071 (inf_child_maybe_unpush_target): Delete.
5072 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5073 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5074 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5075 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5076 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5077 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5078 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5079 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5080 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5081 methods of inf_ptrace_target.
5082 (inf_ptrace_target): Delete function.
5083 * inf-ptrace.h: Include "inf-child.h".
5084 (inf_ptrace_target): Delete function declaration.
5085 (inf_ptrace_target): New class.
5086 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5087 * linux-nat.c (linux_target): New.
5088 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5089 (linux_nat_target::~linux_nat_target): New.
5090 (linux_child_post_attach, linux_child_post_startup_inferior)
5091 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5092 (linux_child_remove_fork_catchpoint)
5093 (linux_child_insert_vfork_catchpoint)
5094 (linux_child_remove_vfork_catchpoint)
5095 (linux_child_insert_exec_catchpoint)
5096 (linux_child_remove_exec_catchpoint)
5097 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5098 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5099 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5100 (linux_nat_stopped_data_address)
5101 (linux_nat_stopped_by_sw_breakpoint)
5102 (linux_nat_supports_stopped_by_sw_breakpoint)
5103 (linux_nat_stopped_by_hw_breakpoint)
5104 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5105 (linux_nat_kill, linux_nat_mourn_inferior)
5106 (linux_nat_xfer_partial, linux_nat_thread_alive)
5107 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5108 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5109 (linux_child_static_tracepoint_markers_by_strid)
5110 (linux_nat_is_async_p, linux_nat_can_async_p)
5111 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5112 (linux_nat_supports_multi_process)
5113 (linux_nat_supports_disable_randomization, linux_nat_async)
5114 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5115 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5116 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5117 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5118 methods of linux_nat_target.
5119 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5120 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5122 (check_stopped_by_watchpoint): Adjust.
5123 (linux_xfer_partial): Delete.
5124 (linux_target_install_ops, linux_target, linux_nat_add_target):
5126 (linux_nat_target::linux_nat_target): New.
5127 * linux-nat.h: Include "inf-ptrace.h".
5128 (linux_nat_target): New.
5129 (linux_target, linux_target_install_ops, linux_nat_add_target):
5130 Delete function declarations.
5131 (linux_target): Declare global.
5132 * linux-thread-db.c (thread_db_target): New.
5133 (thread_db_target::thread_db_target): New.
5134 (thread_db_ops): Delete.
5135 (the_thread_db_target): New.
5136 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5137 (thread_db_update_thread_list, thread_db_pid_to_str)
5138 (thread_db_extra_thread_info)
5139 (thread_db_thread_handle_to_thread_info)
5140 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5141 (thread_db_resume): Refactor as methods of thread_db_target.
5142 (init_thread_db_ops): Delete.
5143 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5144 * x86-linux-nat.c: Don't include "linux-nat.h".
5145 (super_post_startup_inferior): Delete.
5146 (x86_linux_nat_target::~x86_linux_nat_target): New.
5147 (x86_linux_child_post_startup_inferior)
5148 (x86_linux_read_description, x86_linux_enable_btrace)
5149 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5150 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5151 methods of x86_linux_nat_target.
5152 (x86_linux_create_target): Delete. Bits folded ...
5153 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5155 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5156 (x86_linux_nat_target): New class.
5157 (x86_linux_create_target): Delete.
5158 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5159 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5160 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5161 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5162 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5163 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5165 (x86_use_watchpoints): Delete.
5166 * x86-nat.h: Include "breakpoint.h" and "target.h".
5167 (x86_use_watchpoints): Delete.
5168 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5169 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5170 (x86_insert_watchpoint, x86_remove_watchpoint)
5171 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5172 (x86_stopped_by_hw_breakpoint): New declarations.
5173 (x86_nat_target): New template class.
5175 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5176 (the_ppc_linux_nat_target): New.
5177 (ppc_linux_fetch_inferior_registers)
5178 (ppc_linux_can_use_hw_breakpoint)
5179 (ppc_linux_region_ok_for_hw_watchpoint)
5180 (ppc_linux_ranged_break_num_registers)
5181 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5182 (ppc_linux_insert_mask_watchpoint)
5183 (ppc_linux_remove_mask_watchpoint)
5184 (ppc_linux_can_accel_watchpoint_condition)
5185 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5186 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5187 (ppc_linux_watchpoint_addr_within_range)
5188 (ppc_linux_masked_watch_num_registers)
5189 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5190 (ppc_linux_read_description): Refactor as methods of
5191 ppc_linux_nat_target.
5192 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5194 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5195 (procfs_target): New class.
5196 (the_procfs_target): New.
5197 (procfs_target): Delete function.
5198 (procfs_auxv_parse, procfs_attach, procfs_detach)
5199 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5200 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5201 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5202 (procfs_create_inferior, procfs_update_thread_list)
5203 (procfs_thread_alive, procfs_pid_to_str)
5204 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5205 (procfs_stopped_data_address, procfs_insert_watchpoint)
5206 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5207 (proc_find_memory_regions, procfs_info_proc)
5208 (procfs_make_note_section): Refactor as methods of procfs_target.
5209 (_initialize_procfs): Adjust.
5210 * sol-thread.c (sol_thread_target): New class.
5211 (sol_thread_ops): Now a sol_thread_target.
5212 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5213 (sol_thread_fetch_registers, sol_thread_store_registers)
5214 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5215 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5216 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5217 (init_sol_thread_ops): Delete.
5218 (_initialize_sol_thread): Adjust. Remove references to
5219 init_sol_thread_ops and complete_target_initialization.
5221 * windows-nat.c (windows_nat_target): New class.
5222 (windows_fetch_inferior_registers)
5223 (windows_store_inferior_registers, windows_resume, windows_wait)
5224 (windows_attach, windows_detach, windows_pid_to_exec_file)
5225 (windows_files_info, windows_create_inferior)
5226 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5227 (windows_close, windows_pid_to_str, windows_xfer_partial)
5228 (windows_get_tib_address, windows_get_ada_task_ptid)
5229 (windows_thread_name, windows_thread_alive): Refactor as
5230 windows_nat_target methods.
5231 (do_initial_windows_stuff): Adjust.
5232 (windows_target): Delete function.
5233 (_initialize_windows_nat): Adjust.
5235 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5236 (darwin_mourn_inferior, darwin_kill_inferior)
5237 (darwin_create_inferior, darwin_attach, darwin_detach)
5238 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5239 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5240 (darwin_supports_multi_process): Refactor as darwin_nat_target
5242 (darwin_resume_to, darwin_files_info): Delete.
5243 (_initialize_darwin_inferior): Rename to ...
5244 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5245 * darwin-nat.h: Include "inf-child.h".
5246 (darwin_nat_target): New class.
5247 (darwin_complete_target): Delete.
5248 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5249 (darwin_target): New.
5250 (i386_darwin_fetch_inferior_registers)
5251 (i386_darwin_store_inferior_registers): Refactor as methods of
5253 (darwin_complete_target): Delete, with ...
5254 (_initialize_i386_darwin_nat): ... bits factored out here.
5256 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5257 (the_alpha_linux_nat_target): New.
5258 (alpha_linux_register_u_offset): Refactor as
5259 alpha_linux_nat_target method.
5260 (_initialize_alpha_linux_nat): Adjust.
5261 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5262 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5263 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5264 methods of linux_nat_trad_target.
5265 (linux_trad_target): Delete.
5266 * linux-nat-trad.h (linux_trad_target): Delete function.
5267 (linux_nat_trad_target): New class.
5268 * mips-linux-nat.c (mips_linux_nat_target): New class.
5269 (super_fetch_registers, super_store_registers, super_close):
5271 (the_mips_linux_nat_target): New.
5272 (mips64_linux_regsets_fetch_registers)
5273 (mips64_linux_regsets_store_registers)
5274 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5275 (mips_linux_register_u_offset, mips_linux_read_description)
5276 (mips_linux_can_use_hw_breakpoint)
5277 (mips_linux_stopped_by_watchpoint)
5278 (mips_linux_stopped_data_address)
5279 (mips_linux_region_ok_for_hw_watchpoint)
5280 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5281 (mips_linux_close): Refactor as methods of mips_linux_nat.
5282 (_initialize_mips_linux_nat): Adjust to C++ification.
5284 * aix-thread.c (aix_thread_target): New class.
5285 (aix_thread_ops): Now an aix_thread_target.
5286 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5287 (aix_thread_fetch_registers, aix_thread_store_registers)
5288 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5289 (aix_thread_thread_alive, aix_thread_pid_to_str)
5290 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5291 Refactor as methods of aix_thread_target.
5292 (init_aix_thread_ops): Delete.
5293 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5294 and complete_target_initialization.
5295 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5296 (rs6000_nat_target): New class.
5297 (the_rs6000_nat_target): New.
5298 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5299 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5300 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5301 (super_create_inferior): Delete.
5302 (_initialize_rs6000_nat): Adjust to C++ification.
5304 * arm-linux-nat.c (arm_linux_nat_target): New class.
5305 (the_arm_linux_nat_target): New.
5306 (arm_linux_fetch_inferior_registers)
5307 (arm_linux_store_inferior_registers, arm_linux_read_description)
5308 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5309 (arm_linux_remove_hw_breakpoint)
5310 (arm_linux_region_ok_for_hw_watchpoint)
5311 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5312 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5313 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5314 arm_linux_nat_target.
5315 (_initialize_arm_linux_nat): Adjust to C++ification.
5317 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5318 (the_aarch64_linux_nat_target): New.
5319 (aarch64_linux_fetch_inferior_registers)
5320 (aarch64_linux_store_inferior_registers)
5321 (aarch64_linux_child_post_startup_inferior)
5322 (aarch64_linux_read_description)
5323 (aarch64_linux_can_use_hw_breakpoint)
5324 (aarch64_linux_insert_hw_breakpoint)
5325 (aarch64_linux_remove_hw_breakpoint)
5326 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5327 (aarch64_linux_region_ok_for_hw_watchpoint)
5328 (aarch64_linux_stopped_data_address)
5329 (aarch64_linux_stopped_by_watchpoint)
5330 (aarch64_linux_watchpoint_addr_within_range)
5331 (aarch64_linux_can_do_single_step): Refactor as methods of
5332 aarch64_linux_nat_target.
5333 (super_post_startup_inferior): Delete.
5334 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5336 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5337 (the_hppa_linux_nat_target): New.
5338 (hppa_linux_fetch_inferior_registers)
5339 (hppa_linux_store_inferior_registers): Refactor as methods of
5340 hppa_linux_nat_target.
5341 (_initialize_hppa_linux_nat): Adjust to C++ification.
5343 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5344 (the_ia64_linux_nat_target): New.
5345 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5346 (ia64_linux_stopped_data_address)
5347 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5348 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5349 ia64_linux_nat_target methods.
5350 (super_xfer_partial): Delete.
5351 (_initialize_ia64_linux_nat): Adjust to C++ification.
5353 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5354 (the_m32r_linux_nat_target): New.
5355 (m32r_linux_fetch_inferior_registers)
5356 (m32r_linux_store_inferior_registers): Refactor as
5357 m32r_linux_nat_target methods.
5358 (_initialize_m32r_linux_nat): Adjust to C++ification.
5360 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5361 (the_m68k_linux_nat_target): New.
5362 (m68k_linux_fetch_inferior_registers)
5363 (m68k_linux_store_inferior_registers): Refactor as
5364 m68k_linux_nat_target methods.
5365 (_initialize_m68k_linux_nat): Adjust to C++ification.
5367 * s390-linux-nat.c (s390_linux_nat_target): New class.
5368 (the_s390_linux_nat_target): New.
5369 (s390_linux_fetch_inferior_registers)
5370 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5371 (s390_insert_watchpoint, s390_remove_watchpoint)
5372 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5373 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5374 (s390_auxv_parse, s390_read_description): Refactor as methods of
5375 s390_linux_nat_target.
5376 (_initialize_s390_nat): Adjust to C++ification.
5378 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5379 (the_sparc_linux_nat_target): New.
5380 (_initialize_sparc_linux_nat): Adjust to C++ification.
5381 * sparc-nat.c (sparc_fetch_inferior_registers)
5382 (sparc_store_inferior_registers): Remove target_ops parameter.
5383 * sparc-nat.h (sparc_fetch_inferior_registers)
5384 (sparc_store_inferior_registers): Remove target_ops parameter.
5385 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5386 (the_sparc64_linux_nat_target): New.
5387 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5389 * spu-linux-nat.c (spu_linux_nat_target): New class.
5390 (the_spu_linux_nat_target): New.
5391 (spu_child_post_startup_inferior, spu_child_post_attach)
5392 (spu_child_wait, spu_fetch_inferior_registers)
5393 (spu_store_inferior_registers, spu_xfer_partial)
5394 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5396 (_initialize_spu_nat): Adjust to C++ification.
5398 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5399 (the_tilegx_linux_nat_target): New.
5400 (fetch_inferior_registers, store_inferior_registers):
5401 Refactor as methods.
5402 (_initialize_tile_linux_nat): Adjust to C++ification.
5404 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5405 (the_xtensa_linux_nat_target): New.
5406 (xtensa_linux_fetch_inferior_registers)
5407 (xtensa_linux_store_inferior_registers): Refactor as
5408 xtensa_linux_nat_target methods.
5409 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5411 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5412 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5413 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5414 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5415 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5416 (fbsd_stopped_by_sw_breakpoint)
5417 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5418 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5419 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5420 (fbsd_post_startup_inferior, fbsd_post_attach)
5421 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5422 (fbsd_set_syscall_catchpoint)
5423 (super_xfer_partial, super_resume, super_wait)
5424 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5425 (fbsd_handle_debug_trap): Remove target_ops parameter.
5426 (fbsd_nat_add_target): Delete.
5427 * fbsd-nat.h: Include "inf-ptrace.h".
5428 (fbsd_nat_add_target): Delete.
5429 (USE_SIGTRAP_SIGINFO): Define.
5430 (fbsd_nat_target): New class.
5432 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5433 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5434 (amd64bsd_target): Delete.
5435 * amd64-bsd-nat.h: New file.
5436 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5438 (amd64_fbsd_nat_target): New class.
5439 (the_amd64_fbsd_nat_target): New.
5440 (amd64fbsd_read_description): Refactor as method of
5441 amd64_fbsd_nat_target.
5442 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5443 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5444 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5445 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5446 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5447 (i386bsd_target): Delete.
5448 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5449 (i386bsd_fetch_inferior_registers)
5450 (i386bsd_store_inferior_registers): Declare.
5451 (i386_bsd_nat_target): New class.
5452 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5453 (the_i386_fbsd_nat_target): New.
5454 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5455 i386_fbsd_nat_target methods.
5456 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5457 (_initialize_i386fbsd_nat): Adjust to C++ification.
5458 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5459 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5460 (_initialize_x86_bsd_nat): Adjust to C++ification.
5461 * x86-bsd-nat.h: Include "x86-nat.h".
5462 (x86bsd_target): Delete declaration.
5463 (x86bsd_nat_target): New class.
5465 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5466 (the_aarch64_fbsd_nat_target): New.
5467 (aarch64_fbsd_fetch_inferior_registers)
5468 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5469 aarch64_fbsd_nat_target.
5470 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5471 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5472 (the_alpha_bsd_nat_target): New.
5473 (alphabsd_fetch_inferior_registers)
5474 (alphabsd_store_inferior_registers): Refactor as
5475 alpha_bsd_nat_target methods.
5476 (_initialize_alphabsd_nat): Refactor as methods of
5477 alpha_bsd_nat_target.
5478 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5479 (the_amd64_nbsd_nat_target): New.
5480 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5481 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5482 (the_amd64_obsd_nat_target): New.
5483 (_initialize_amd64obsd_nat): Adjust to C++ification.
5484 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5485 (the_arm_fbsd_nat_target): New.
5486 (arm_fbsd_fetch_inferior_registers)
5487 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5488 (_initialize_arm_fbsd_nat): Refactor as methods of
5489 arm_fbsd_nat_target.
5490 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5491 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5492 (the_arm_netbsd_nat_target): New.
5493 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5494 arm_netbsd_nat_target.
5495 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5496 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5497 (the_hppa_nbsd_nat_target): New.
5498 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5499 hppa_nbsd_nat_target methods.
5500 (_initialize_hppanbsd_nat): Adjust to C++ification.
5501 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5502 (the_hppa_obsd_nat_target): New.
5503 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5504 methods of hppa_obsd_nat_target.
5505 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5507 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5508 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5510 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5511 (_initialize_i386obsd_nat): Use add_target.
5512 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5513 (the_m68k_bsd_nat_target): New.
5514 (m68kbsd_fetch_inferior_registers)
5515 (m68kbsd_store_inferior_registers): Refactor as methods of
5516 m68k_bsd_nat_target.
5517 (_initialize_m68kbsd_nat): Adjust to C++ification.
5518 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5519 (the_mips_fbsd_nat_target): New.
5520 (mips_fbsd_fetch_inferior_registers)
5521 (mips_fbsd_store_inferior_registers): Refactor as methods of
5522 mips_fbsd_nat_target.
5523 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5525 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5526 (the_mips_nbsd_nat_target): New.
5527 (mipsnbsd_fetch_inferior_registers)
5528 (mipsnbsd_store_inferior_registers): Refactor as methods of
5529 mips_nbsd_nat_target.
5530 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5531 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5532 (the_mips64_obsd_nat_target): New.
5533 (mips64obsd_fetch_inferior_registers)
5534 (mips64obsd_store_inferior_registers): Refactor as methods of
5535 mips64_obsd_nat_target.
5536 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5538 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5540 * nbsd-nat.h: Include "inf-ptrace.h".
5541 (nbsd_nat_target): New class.
5542 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5543 (obsd_wait): Refactor as methods of obsd_nat_target.
5544 (obsd_add_target): Delete.
5545 * obsd-nat.h: Include "inf-ptrace.h".
5546 (obsd_nat_target): New class.
5547 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5548 (the_ppc_fbsd_nat_target): New.
5549 (ppcfbsd_fetch_inferior_registers)
5550 (ppcfbsd_store_inferior_registers): Refactor as methods of
5551 ppc_fbsd_nat_target.
5552 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5554 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5555 (the_ppc_nbsd_nat_target): New.
5556 (ppcnbsd_fetch_inferior_registers)
5557 (ppcnbsd_store_inferior_registers): Refactor as methods of
5558 ppc_nbsd_nat_target.
5559 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5560 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5561 (the_ppc_obsd_nat_target): New.
5562 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5563 methods of ppc_obsd_nat_target.
5564 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5566 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5567 (the_sh_nbsd_nat_target): New.
5568 (shnbsd_fetch_inferior_registers)
5569 (shnbsd_store_inferior_registers): Refactor as methods of
5571 (_initialize_shnbsd_nat): Adjust to C++ification.
5572 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5573 (inf_ptrace_xfer_partial): Delete.
5574 (sparc_xfer_partial, sparc_target): Delete.
5575 * sparc-nat.h (sparc_fetch_inferior_registers)
5576 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5577 (sparc_target): Delete function declaration.
5578 (sparc_target): New template class.
5579 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5580 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5581 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5582 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5584 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5585 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5586 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5587 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5589 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5590 (the_vax_bsd_nat_target): New.
5591 (vaxbsd_fetch_inferior_registers)
5592 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5594 (_initialize_vaxbsd_nat): Adjust to C++ification.
5596 * bsd-kvm.c (bsd_kvm_target): New class.
5597 (bsd_kvm_ops): Now a bsd_kvm_target.
5598 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5599 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5600 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5602 (bsd_kvm_return_one): Delete.
5603 (bsd_kvm_add_target): Adjust to C++ification.
5605 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5606 (nto_procfs_target_procfs): New classes.
5607 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5608 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5609 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5610 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5611 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5612 (procfs_remove_hw_breakpoint, procfs_resume)
5613 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5614 (procfs_kill_inferior, procfs_store_registers)
5615 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5616 as methods of nto_procfs_target.
5617 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5618 (nto_native_ops): Delete.
5619 (procfs_open, procfs_native_open): Delete.
5620 (nto_native_ops): Now an nto_procfs_target_native.
5621 (init_procfs_targets): Adjust to C++ification.
5622 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5623 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5624 Refactor as methods of nto_procfs_target.
5626 * go32-nat.c (go32_nat_target): New class.
5627 (the_go32_nat_target): New.
5628 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5629 (go32_store_registers, go32_xfer_partial, go32_files_info)
5630 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5631 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5632 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5633 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5634 (go32_target): Delete.
5635 (_initialize_go32_nat): Adjust to C++ification.
5637 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5638 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5639 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5640 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5642 (gnu_target): Delete.
5643 * gnu-nat.h (gnu_target): Delete.
5644 (gnu_nat_target): New class.
5645 * i386-gnu-nat.c (gnu_base_target): New.
5646 (i386_gnu_nat_target): New class.
5647 (the_i386_gnu_nat_target): New.
5648 (_initialize_i386gnu_nat): Adjust to C++ification.
5650 2018-05-02 Pedro Alves <palves@redhat.com>
5652 * bfd-target.c (target_bfd_xclose): Rename to ...
5653 (target_bfd_close): ... this.
5654 (target_bfd_reopen): Adjust.
5655 * target.c (target_close): Remove references to to_xclose.
5656 * target.h (target_ops::to_xclose): Delete.
5657 (target_ops::to_close): Update comments.
5659 2018-05-02 Pedro Alves <palves@redhat.com>
5661 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5663 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5664 * inf-ptrace.c (inf_ptrace_register_u_offset)
5665 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5666 (inf_ptrace_store_register, inf_ptrace_store_registers)
5667 (inf_ptrace_trad_target): Move to ...
5668 * linux-nat-trad.c: ... this new file.
5669 * linux-nat-trad.h: New file.
5670 * linux-nat.c (linux_target_install_ops): Make extern.
5671 (linux_trad_target): Delete.
5672 * linux-nat.h (linux_trad_target): Delete declaration.
5673 (linux_target_install_ops): Declare.
5674 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5677 2018-05-02 Pedro Alves <palves@redhat.com>
5679 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5680 procfs_target/add_target here.
5681 * procfs.c (procfs_target): Make static.
5682 (_initialize_procfs): Call add_target here.
5683 * procfs.h (struct target_ops): Remove forward declaration.
5684 (procfs_target): Remove declaration.
5685 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5687 2018-05-02 Pedro Alves <palves@redhat.com>
5689 * procfs.c (procfs_stopped_by_watchpoint)
5690 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5691 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5693 (procfs_use_watchpoints): Delete, move contents...
5694 (procfs_target): ... here.
5695 * procfs.h (procfs_use_watchpoints): Delete declaration.
5696 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5697 procfs_use_watchpoints.
5698 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5699 procfs_use_watchpoints.
5701 2018-05-02 Tom Tromey <tom@tromey.com>
5704 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5705 and var_zuinteger_unlimited.
5706 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5707 and PARAM_ZUINTEGER_UNLIMITED.
5708 (set_parameter_value): Handle var_zuinteger and
5709 var_zuinteger_unlimited.
5710 (add_setshow_generic): Likewise.
5711 (parmpy_init): Likewise.
5713 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5716 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5717 pointer is not null before dereferencing it.
5719 2018-04-30 Tom Tromey <tom@tromey.com>
5721 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5724 2018-04-30 Tom Tromey <tom@tromey.com>
5726 * breakpoint.c (mention): Remove use of is_mi_like_p.
5727 (print_mention_ranged_breakpoint): Likewise.
5728 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5731 2018-04-30 Tom Tromey <tom@tromey.com>
5733 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5735 2018-04-30 Tom Tromey <tom@tromey.com>
5737 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5738 (info_spu_event_command): Remove some uses of is_mi_like_p.
5740 2018-04-30 Tom Tromey <tom@tromey.com>
5742 * python/py-framefilter.c (py_print_single_arg)
5743 (enumerate_locals, py_print_args, py_print_frame): Remove some
5744 uses of is_mi_like_p.
5746 2018-04-30 Tom Tromey <tom@tromey.com>
5749 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5750 * ui-out.h (ui_out::is_mi_like_p): Now const.
5751 (ui_out::do_is_mi_like_p): Now const.
5752 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5754 2018-04-30 Tom Tromey <tom@tromey.com>
5756 * varobj.c (varobj_set_visualizer): Use new_reference.
5757 * python/python.c (gdbpy_decode_line): Use new_reference.
5758 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5761 2018-04-30 Tom Tromey <tom@tromey.com>
5763 * varobj.c (install_new_value): Use new_reference.
5764 * value.h (value_incref): Return void. Swap intro comment with
5766 * value.c (set_value_parent): Use new_reference.
5767 (value_incref): Return void. Update intro comment.
5768 (release_value): Use new_reference.
5769 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5771 2018-04-30 Tom Tromey <tom@tromey.com>
5773 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5774 * gdb_bfd.h (new_bfd_ref): Remove.
5775 (gdb_bfd_open): Update comment.
5776 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5777 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5778 (gdb_bfd_fdopenr): Use new_reference.
5779 * exec.c (exec_file_attach): Use new_reference.
5781 2018-04-30 Tom Tromey <tom@tromey.com>
5783 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5786 2018-04-30 Tom Tromey <tom@tromey.com>
5788 * jit.c (jit_read_code_entry): Use type_align.
5789 * i386-tdep.c (i386_gdbarch_init): Don't call
5790 set_gdbarch_long_long_align_bit.
5791 * gdbarch.sh: Remove long_long_align_bit.
5792 * gdbarch.c, gdbarch.h: Rebuild.
5793 * arc-tdep.c (arc_type_align): New function.
5794 (arc_gdbarch_init): Use arc_type_align. Don't call
5795 set_gdbarch_long_long_align_bit.
5797 2018-04-30 Tom Tromey <tom@tromey.com>
5799 * rust-lang.c (rust_type_alignment): Remove.
5800 (rust_composite_type): Use type_align.
5802 2018-04-30 Tom Tromey <tom@tromey.com>
5804 * NEWS: Mention Type.align.
5805 * python/py-type.c (typy_get_alignof): New function.
5806 (type_object_getset): Add "alignof".
5808 2018-04-30 Tom Tromey <tom@tromey.com>
5812 * std-operator.def (UNOP_ALIGNOF): New operator.
5813 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5815 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5816 * c-lang.c (c_op_print_tab): Add alignof.
5817 * c-exp.y (ALIGNOF): New token.
5818 (exp): Add "ALIGNOF" production.
5819 (ident_tokens): Add _Alignof and alignof.
5821 2018-04-30 Tom Tromey <tom@tromey.com>
5823 * i386-tdep.c (i386_type_align): New function.
5824 (i386_gdbarch_init): Update.
5825 * gdbarch.sh (type_align): New method.
5826 * gdbarch.c, gdbarch.h: Rebuild.
5827 * arch-utils.h (default_type_align): Declare.
5828 * arch-utils.c (default_type_align): New function.
5829 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5830 (struct type) <align_log2>: New field.
5831 <instance_flags>: Now a bitfield.
5832 (TYPE_RAW_ALIGN): New macro.
5833 (type_align, type_raw_align, set_type_align): Declare.
5834 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5836 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5837 (get_alignment, maybe_set_alignment): New functions.
5838 (read_structure_type, read_enumeration_type, read_array_type)
5839 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5840 (read_subrange_type, read_base_type): Set type alignment.
5842 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5844 * dwarf2read.c (read_index_from_section): Use bool.
5846 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5849 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5852 2018-04-29 John Reiser <jreiser@BitWagon.com>
5855 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5856 last step, and do it atomically.
5858 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5860 * compile/compile-c-types.c (convert_int, convert_float):
5863 2018-04-27 Tom Tromey <tom@tromey.com>
5866 * rust-lang.c (rust_inclusive_range_type_p): New function.
5867 (rust_range): Handle inclusive ranges.
5868 (rust_compute_range): Likewise.
5869 * rust-exp.y (struct rust_op) <inclusive>: New field.
5870 (DOTDOTEQ): New constant.
5871 (range_expr): Add "..=" productions.
5872 (operator_tokens): Add "..=" token.
5873 (ast_range): Add "inclusive" parameter.
5874 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5876 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5878 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5879 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5881 * expprint.c (print_subexp_standard): Handle new bounds values.
5882 (dump_subexp_body_standard): Likewise.
5884 2018-04-27 Tom Tromey <tom@tromey.com>
5886 * configure: Rebuild.
5887 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5888 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5890 (class symbol_needs_eval_context): Likewise.
5891 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5892 (mock_mapped_index::symbol_name_at): Use "override". Remove
5894 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5896 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5897 * aarch64-tdep.c (instruction_reader::read): Use "override".
5898 (instruction_reader_test::read): Likewise.
5899 * arm-tdep.c (instruction_reader::read): Use "override".
5900 (instruction_reader_thumb::read): Likewise.
5902 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5905 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5906 instead of remote_send.
5907 (remote_send): Remove.
5909 2018-04-26 Pedro Alves <palves@redhat.com>
5911 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5912 find_function_start_sal instead of find_pc_line.
5914 2018-04-26 Pedro Alves <palves@redhat.com>
5916 * breakpoint.c (set_breakpoint_location_function): Handle
5918 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5919 * elfread.c (elf_symtab_read): Give data symbols with
5920 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5921 (elf_rel_plt_read): Update comment.
5922 * linespec.c (convert_linespec_to_sals): Handle
5924 (minsym_found): Handle mst_data_gnu_ifunc.
5925 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5926 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5927 * parse.c (find_minsym_type_and_address): Handle
5929 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5930 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5931 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5933 <mst_data_gnu_ifunc>: New enumerator.
5935 2018-04-26 Pedro Alves <palves@redhat.com>
5937 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5938 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5939 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5941 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5942 (lookup_minimal_symbol_by_pc): Adjust.
5943 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5944 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5945 * minsyms.h (lookup_msym_prefer): New enum.
5946 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5947 parameter by a lookup_msym_prefer parameter.
5949 2018-04-26 Pedro Alves <palves@redhat.com>
5951 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5952 ends in "@plt" instead of looking at the symbol's section.
5954 2018-04-26 Pedro Alves <palves@redhat.com>
5956 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5958 (find_pc_partial_function_gnu_ifunc): Rename to ...
5959 (find_pc_partial_function): ... this, and remove references to
5961 (find_pc_partial_function): Delete old implementation.
5962 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5964 2018-04-26 Pedro Alves <palves@redhat.com>
5966 * linespec.c (struct bound_minimal_symbol_search_key): New.
5967 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5968 skip first line if we found a GNU ifunc minimal symbol by name.
5969 (compare_msymbols): Change parameters to work with a destructured
5971 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5974 2018-04-26 Pedro Alves <palves@redhat.com>
5976 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5977 ifunc targets here. Instead, if we have an ifunc minsym, use its
5979 (add_location_to_breakpoint): Store the minsym and the objfile in
5980 the breakpoint location.
5981 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5982 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5983 Record the minsym in the sal.
5984 * symtab.h (symtab_and_line) <msymbol>: New field.
5986 2018-04-26 Pedro Alves <palves@redhat.com>
5988 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5989 unless we actually resolved the ifunc.
5991 2018-04-26 Pedro Alves <palves@redhat.com>
5993 * c-exp.y (variable production): Prefer ifunc minsyms over
5994 regular function symbols.
5995 * symtab.c (find_gnu_ifunc): New function.
5996 * minsyms.h (lookup_msym_prefer): New enum.
5997 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5998 parameter by a lookup_msym_prefer parameter.
5999 * symtab.h (find_gnu_ifunc): New declaration.
6001 2018-04-26 Pedro Alves <palves@redhat.com>
6003 * blockframe.c (find_gnu_ifunc_target_type): New function.
6004 (find_function_type): New.
6005 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6006 return a value with a memory address.
6007 (eval_call): For calls to GNU ifunc functions, try to find the
6008 type of the target function from the type that the resolver
6010 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6012 * infcall.c (find_function_return_type): Delete.
6013 (find_function_addr): Add 'function_type' parameter. For calls to
6014 GNU ifunc functions, try to find the type of the target function
6015 from the type that the resolver returns, and return it via
6017 (call_function_by_hand_dummy): Adjust to use the function type
6018 returned by find_function_addr.
6019 (find_function_addr): Add 'function_type' parameter and move
6021 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6024 2018-04-26 Pedro Alves <palves@redhat.com>
6026 * c-exp.y (variable production): Skip finding an alias for ifunc
6029 2018-04-26 Pedro Alves <palves@redhat.com>
6031 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6033 2018-04-25 Pedro Alves <palves@redhat.com>
6035 * infcmd.c (kill_command): Print the pid as string, not the whole
6036 thread's ptid. Add comment. s/has been killed/killed/ in output
6038 * remote.c (remote_detach_1): Print the pid as string, not the
6039 whole thread's ptid.
6041 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6042 Sergio Durigan Junior <sergiodj@redhat.com>
6043 Pedro Alves <palves@redhat.com>
6045 * infcmd.c (kill_command): Print message when inferior has
6047 * inferior.c (print_inferior_events): Remove 'static'. Set as
6049 (add_inferior): Improve message printed when
6050 'print_inferior_events' is on.
6051 (exit_inferior): Remove message printed when
6052 'print_inferior_events' is on.
6053 (detach_inferior): Improve message printed when
6054 'print_inferior_events' is on.
6055 (initialize_inferiors): Use 'add_inferior_silent' to set
6056 'current_inferior_'.
6057 * inferior.h (print_inferior_events): Declare here as
6059 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6060 '[Detaching...]' messages when 'print_inferior_events' is on.
6061 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6062 as prefix/suffix for messages. Remove periods. Fix erroneous
6063 'Detaching after fork from child...', replace it by '... from
6065 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6066 prefix/suffix when printing 'Detaching...' messages. Print
6067 them when 'print_inferior_events' is on.
6068 * remote.c (remote_detach_1): Print message when detaching
6069 from inferior and '!is_fork_parent'.
6071 2018-04-24 Tom Tromey <tom@tromey.com>
6073 * cli-out.h: Reindent.
6075 2018-04-24 Tom Tromey <tom@tromey.com>
6077 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6078 (cli_ui_out::do_field_string): Use fputs_filtered.
6079 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6081 2018-04-23 Tom Tromey <tom@tromey.com>
6083 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6084 gdb::unique_xmalloc_ptr.
6086 2018-04-23 Tom Tromey <tom@tromey.com>
6088 * configure: Rebuild.
6090 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6093 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6094 prepare_for_testing. Set normal_bp to r_debug_state if target
6097 2018-04-21 Pedro Alves <palves@redhat.com>
6098 Rajendra SY <rajendra.sy@gmail.com>
6100 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6101 * remote.c (extended_remote_attach): In all-stop mode, mark the
6102 thread as executing.
6104 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6106 * thread.c (thread_apply_all_command): Fix comment.
6107 (thread_command): Fix comment.
6109 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6111 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6113 * features/aarch64-core.c (create_feature_aarch64_core):
6115 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6117 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6119 * features/i386/32bit-avx512.c
6120 (create_feature_i386_32bit_avx512): Likewise.
6121 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6123 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6125 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6127 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6129 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6131 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6133 * features/i386/64bit-avx512.c
6134 (create_feature_i386_64bit_avx512): Likewise.
6135 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6137 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6139 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6141 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6143 * features/i386/64bit-segments.c
6144 (create_feature_i386_64bit_segments): Likewise.
6145 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6147 * features/i386/x32-core.c
6148 (create_feature_i386_x32_core): Likewise.
6149 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6150 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6151 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6152 * target-descriptions.c: In generated code, don't pass xml
6155 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6157 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6158 (print_xml_feature::visit_post): Likewise.
6159 (print_xml_feature::visit): Likewise.
6160 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6161 (print_xml_feature): Add new class.
6162 * regformats/regdat.sh: Null xmltarget on feature targets.
6163 * target-descriptions.c (struct target_desc): Add xmltarget.
6164 (maintenance_check_tdesc_xml_convert): Add unittest function.
6165 (tdesc_get_features_xml): Add function to get xml.
6166 (maintenance_check_xml_descriptions): Test xml generation.
6167 * xml-tdesc.c (string_read_description_xml): Add function.
6168 * xml-tdesc.h (string_read_description_xml): Add declaration.
6170 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6172 * features/Makefile: Add feature marker to targets with new style
6173 target descriptions.
6174 * regformats/aarch64.dat: Regenerate.
6175 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6176 * regformats/i386/amd64-avx-linux.dat: Likewise.
6177 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6178 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6179 * regformats/i386/amd64-linux.dat: Likewise.
6180 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6181 * regformats/i386/amd64.dat: Likewise.
6182 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6183 * regformats/i386/i386-avx-linux.dat: Likewise.
6184 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6185 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6186 * regformats/i386/i386-linux.dat: Likewise.
6187 * regformats/i386/i386-mmx-linux.dat: Likewise.
6188 * regformats/i386/i386-mpx-linux.dat: Likewise.
6189 * regformats/i386/i386.dat: Likewise.
6190 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6191 * regformats/i386/x32-avx-linux.dat: Likewise.
6192 * regformats/i386/x32-linux.dat: Likewise.
6193 * regformats/tic6x-c62x-linux.dat: Likewise.
6194 * regformats/tic6x-c64x-linux.dat: Likewise.
6195 * regformats/tic6x-c64xp-linux.dat: Likewise.
6196 * regformats/regdat.sh: Parse feature marker.
6198 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6200 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6201 (tdesc_osabi_name): Likewise.
6202 * target-descriptions.c (tdesc_architecture_name): Add new
6204 (tdesc_osabi_name): Likewise.
6206 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6208 * common/tdesc.c (tdesc_predefined_type): Move to here.
6209 (tdesc_named_type): Likewise.
6210 (tdesc_create_vector): Likewise.
6211 (tdesc_create_struct): Likewise.
6212 (tdesc_set_struct_size): Likewise.
6213 (tdesc_create_union): Likewise.
6214 (tdesc_create_flags): Likewise.
6215 (tdesc_create_enum): Likewise.
6216 (tdesc_add_field): Likewise.
6217 (tdesc_add_typed_bitfield): Likewise.
6218 (tdesc_add_bitfield): Likewise.
6219 (tdesc_add_flag): Likewise.
6220 (tdesc_add_enum_value): Likewise.
6221 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6222 (struct tdesc_type_vector): Likewise.
6223 (struct tdesc_type_field): Likewise.
6224 (struct tdesc_type_with_fields): Likewise.
6225 (tdesc_create_enum): Add declaration.
6226 (tdesc_add_typed_bitfield): Likewise.
6227 (tdesc_add_enum_value): Likewise.
6228 * target-descriptions.c (tdesc_type_field): Move from here.
6229 (tdesc_type_builtin): Likewise.
6230 (tdesc_type_vector): Likewise.
6231 (tdesc_type_with_fields): Likewise.
6232 (tdesc_predefined_types): Likewise.
6233 (tdesc_named_type): Likewise.
6234 (tdesc_create_vector): Likewise.
6235 (tdesc_create_struct): Likewise.
6236 (tdesc_set_struct_size): Likewise.
6237 (tdesc_create_union): Likewise.
6238 (tdesc_create_flags): Likewise.
6239 (tdesc_create_enum): Likewise.
6240 (tdesc_add_field): Likewise.
6241 (tdesc_add_typed_bitfield): Likewise.
6242 (tdesc_add_bitfield): Likewise.
6243 (tdesc_add_flag): Likewise.
6244 (tdesc_add_enum_value): Likewise.
6245 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6246 (tdesc_add_typed_bitfield): Likewise.
6247 (tdesc_add_enum_value): Likewise.
6249 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6251 * common/tdesc.c (tdesc_feature::accept): Move to here.
6252 (tdesc_feature::operator==): Likewise.
6253 (tdesc_create_reg): Likewise.
6254 * common/tdesc.h (tdesc_type_kind): Likewise.
6255 (struct tdesc_type): Likewise.
6256 (struct tdesc_feature): Likewise.
6257 * regformats/regdat.sh: Create a feature.
6258 * target-descriptions.c (tdesc_type_kind): Move from here.
6259 (tdesc_type): Likewise.
6260 (tdesc_type_up): Likewise.
6261 (tdesc_feature): Likewise.
6262 (tdesc_create_reg): Likewise.
6264 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6266 * Makefile.in: Add arch/tdesc.c
6267 * common/tdesc.c: New file.
6268 * common/tdesc.h (tdesc_element_visitor): Move to here.
6269 (tdesc_element): Likewise.
6270 (tdesc_reg): Likewise.
6271 (tdesc_reg_up): Likewise.
6272 * regformats/regdef.h (reg): Add offset to constructors.
6273 * target-descriptions.c (tdesc_element_visitor): Move from here.
6274 (tdesc_element): Likewise.
6275 (tdesc_reg): Likewise.
6276 (tdesc_reg_up): Likewise.
6278 2018-04-17 Tom Tromey <tom@tromey.com>
6280 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6283 2018-04-17 Tom Tromey <tom@tromey.com>
6285 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6287 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6289 * symtab.c (print_symbol_info): Skip printing filename and line
6290 number when `last' is NULL.
6291 (symtab_symbol_info): Use empty string instead of NULL for first
6292 invocation of print_symbol_info.
6293 (rbreak_command): Pass NULL to `last' parameter of
6296 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6298 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6301 2018-04-16 Pedro Alves <palves@redhat.com>
6303 * MAINTAINERS (sh): Remove.
6304 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6305 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6306 (ALLDEPFILES): Remove sh64-tdep.c.
6307 * NEWS: Mentions that support for SH-5/SH64 is removed.
6308 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6309 (sh*-*-openbsd*): Ditto.
6310 (sh64-*-elf*): Remove.
6312 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6313 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6314 * sh-tdep.c: No longer include "sh64-tdep.h".
6315 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6316 * sh64-tdep.c, sh64-tdep.h: Remove files.
6318 2018-04-16 Pedro Alves <palves@redhat.com>
6320 * MAINTAINERS: Remove m88k.
6321 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6322 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6323 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6324 * NEWS: Mention that support for m88k was removed.
6325 * configure.host (m88*-*-*): Remove support.
6326 * configure.nat (m88k-*-*): Remove support.
6327 * configure.tgt (m88*-*-openbsd*): Remove.
6328 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6330 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6332 * configure.tgt (x86_tobjs): New variable.
6333 (amd64_tobjs, i386_tobjs): Use it.
6335 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6337 * symtab.c (print_symbol_info): Precede the symbol definition by
6338 the line number when available.
6339 * NEWS: Advertise this enhancement.
6341 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6343 * NEWS (New options): announce set/show record btrace cpu.
6344 * btrace.c: Include record-btrace.h.
6345 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6346 the vendor is unknown.
6347 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6348 Maybe overwrite the btrace configuration's cpu.
6349 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6350 (btrace_fetch): Add cpu parameter. Update callers.
6351 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6352 Maybe overwrite the btrace configuration's cpu. Skip enabling
6353 errata workarounds if the vendor is unknown.
6354 * python/py-record-btrace.c: Include record-btrace.h.
6355 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6356 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6357 * record-btrace.c (record_btrace_cpu_state_kind): New.
6358 (record_btrace_cpu): New.
6359 (set_record_btrace_cpu_cmdlist): New.
6360 (record_btrace_get_cpu): New.
6361 (require_btrace_thread, record_btrace_info)
6362 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6363 (cmd_set_record_btrace_cpu_none): New.
6364 (cmd_set_record_btrace_cpu_auto): New.
6365 (cmd_set_record_btrace_cpu): New.
6366 (cmd_show_record_btrace_cpu): New.
6367 (_initialize_record_btrace): Initialize set/show record btrace cpu
6369 * record-btrace.h (record_btrace_get_cpu): New.
6371 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6373 * record.c (set_record_command): Fix typo in message.
6375 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6377 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6379 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6381 * infrun.c (process_event_stop_test): Call
6382 gdbarch_in_indirect_branch_thunk.
6383 * gdbarch.sh (in_indirect_branch_thunk): New.
6384 * gdbarch.c: Regenerated.
6385 * gdbarch.h: Regenerated.
6388 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6389 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6390 (ALLDEPFILES): Add x86-tdep.c.
6391 * arch-utils.h (default_in_indirect_branch_thunk): New.
6392 * arch-utils.c (default_in_indirect_branch_thunk): New.
6393 * i386-tdep: Include x86-tdep.h.
6394 (i386_in_indirect_branch_thunk): New.
6395 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6397 * amd64-tdep: Include x86-tdep.h.
6398 (amd64_in_indirect_branch_thunk): New.
6399 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6401 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6404 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6405 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6406 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6409 2018-04-12 Tom Tromey <tom@tromey.com>
6411 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6412 (rust_evaluate_subexp): Likewise.
6414 2018-04-12 Pedro Alves <palves@redhat.com>
6416 * procfs.c (procfs_detach): Make forward declaration's prototype
6417 match definition's protototype.
6418 (proc_get_LDT_entry): Remove stale do_cleanups call.
6420 2018-04-12 Pedro Alves <palves@redhat.com>
6422 * target.h (target_ops::to_has_exited): Delete.
6423 (target_has_exited): Delete.
6424 * target-delegates.c: Regenerate.
6426 2018-04-11 Pedro Alves <palves@redhat.com>
6428 * target.c (fileio_fh_t::t): Add comment.
6429 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6430 (target_fileio_close): Handle a NULL target.
6431 (invalidate_fileio_fh): New.
6432 (target_close): Call it.
6433 * remote.c (remote_hostio_send_command): No longer check whether
6434 remote_desc is open.
6436 2018-04-11 Pedro Alves <palves@redhat.com>
6438 * target.c (fileio_fh_t): Make it a named struct instead of a
6440 (fileio_fh_t::is_closed): New method.
6441 (DEF_VEC_O (fileio_fh_t)): Remove.
6442 (fileio_fhandles): Now a std::vector.
6443 (is_closed_fileio_fh): Delete.
6444 (acquire_fileio_fd): Adjust. Rename parameters.
6445 (release_fileio_fd): Adjust.
6446 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6447 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6448 (target_fileio_close): Adjust.
6450 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6452 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6455 2018-04-10 Pedro Alves <palves@redhat.com>
6457 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6458 (scoped_finish_thread_state): New class.
6459 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6461 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6462 (fetch_inferior_event, normal_stop): Likewise.
6463 * thread.c (finish_thread_state_cleanup): Delete.
6465 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6466 Pedro Alves <palves@redhat.com>
6468 * value.c: Include "selftest.h" and "common/array-view.h".
6469 (struct range) <operator ==>: New.
6470 (test_ranges_contain): New.
6471 (check_ranges_vector): New.
6472 (test_insert_into_bit_range_vector): New.
6473 (_initialize_values): Register selftests.
6474 * common/array-view.h (operator==, operator!=): New.
6476 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6478 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6480 * inline-frame.c: Include <algorithm>.
6481 (struct inline_state): Add constructor.
6482 (inline_state_s): Remove.
6483 (DEF_VEC_O(inline_state_s)): Remove.
6484 (inline_states): Change type to std::vector.
6485 (find_inline_frame_state): Adjust to std::vector.
6486 (allocate_inline_frame_state): Remove.
6487 (clear_inline_frame_state): Adjust to std::vector.
6488 (skip_inline_frames): Adjust to std::vector.
6490 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6492 * tracepoint.h (struct trace_state_variable): Add constructor.
6493 <name>: Change type to std::string.
6494 * tracepoint.c (tsv_s): Remove.
6495 (DEF_VEC_O(tsv_s)): Remove.
6496 (tvariables): Change to std::vector.
6497 (create_trace_state_variable): Adjust to std::vector.
6498 (find_trace_state_variable): Likewise.
6499 (find_trace_state_variable_by_number): Likewise.
6500 (delete_trace_state_variable): Likewise.
6501 (trace_variable_command): Adjust to std::string.
6502 (delete_trace_variable_command): Likewise.
6503 (tvariables_info_1): Adjust to std::vector.
6504 (save_trace_state_variables): Likewise.
6505 (start_tracing): Likewise.
6506 (merge_uploaded_trace_state_variables): Adjust to std::vector
6508 * target.h (struct target_ops)
6509 <to_download_trace_state_variable>: Pass reference to
6510 trace_state_variable.
6511 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6512 * target-delegates.c: Re-generate.
6513 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6514 (mi_tsv_deleted): Likewise.
6515 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6516 * remote.c (remote_download_trace_state_variable): Change
6517 pointer to reference and adjust.
6518 * make-target-delegates (parse_argtypes): Handle references.
6519 (write_function_header): Likewise.
6520 (munge_type): Likewise.
6522 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6524 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6525 string_view-selftests.c.
6526 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6528 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6529 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6530 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6531 * unittests/basic_string_view/element_access/char/1.cc:
6533 * unittests/basic_string_view/element_access/char/empty.cc:
6535 * unittests/basic_string_view/element_access/char/front_back.cc:
6537 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6538 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6540 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6542 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6544 * unittests/basic_string_view/operations/compare/char/1.cc:
6546 * unittests/basic_string_view/operations/compare/char/13650.cc:
6548 * unittests/basic_string_view/operations/copy/char/1.cc:
6550 * unittests/basic_string_view/operations/data/char/1.cc:
6552 * unittests/basic_string_view/operations/find/char/1.cc:
6554 * unittests/basic_string_view/operations/find/char/2.cc:
6556 * unittests/basic_string_view/operations/find/char/3.cc:
6558 * unittests/basic_string_view/operations/find/char/4.cc:
6560 * unittests/basic_string_view/operations/rfind/char/1.cc:
6562 * unittests/basic_string_view/operations/rfind/char/2.cc:
6564 * unittests/basic_string_view/operations/rfind/char/3.cc:
6566 * unittests/basic_string_view/operations/substr/char/1.cc:
6568 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6569 * unittests/string_view-selftests.c: New file.
6571 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6573 * unittests/basic_string_view/capacity/1.cc: New file.
6574 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6575 * unittests/basic_string_view/cons/char/1.cc: New file.
6576 * unittests/basic_string_view/cons/char/2.cc: New file.
6577 * unittests/basic_string_view/cons/char/3.cc: New file.
6578 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6579 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6580 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6581 * unittests/basic_string_view/element_access/char/1.cc: New file.
6582 * unittests/basic_string_view/element_access/char/2.cc: New file.
6583 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6584 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6585 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6586 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6587 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6588 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6589 * unittests/basic_string_view/include.cc: New file.
6590 * unittests/basic_string_view/inserters/char/1.cc: New file.
6591 * unittests/basic_string_view/inserters/char/2.cc: New file.
6592 * unittests/basic_string_view/inserters/char/3.cc: New file.
6593 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6594 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6595 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6596 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6597 * unittests/basic_string_view/literals/types.cc: New file.
6598 * unittests/basic_string_view/literals/values.cc: New file.
6599 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6600 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6601 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6602 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6603 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6604 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6605 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6606 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6607 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6608 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6609 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6610 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6611 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6612 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6613 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6614 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6615 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6616 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6617 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6618 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6619 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6620 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6621 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6622 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6623 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6624 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6625 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6626 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6627 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6628 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6629 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6630 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6631 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6632 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6633 * unittests/basic_string_view/operators/char/2.cc: New file.
6634 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6635 * unittests/basic_string_view/range_access/char/1.cc: New file.
6636 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6637 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6638 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6639 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6640 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6641 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6642 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6643 * unittests/basic_string_view/typedefs.cc: New file.
6644 * unittests/basic_string_view/types/1.cc: New file.
6646 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6648 * common/gdb_string_view.h: Remove libstdc++ implementation
6649 details, adjust to gdb reality.
6650 * common/gdb_string_view.tcc: Likewise.
6651 * cli/cli-script.c (struct string_view): Remove.
6652 (user_args) <m_args>: Change element type to gdb::string_view.
6653 (user_args::insert_args): Adjust.
6655 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6657 * common/gdb_string_view.h: New file.
6658 * common/gdb_string_view.tcc: New file.
6660 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6662 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6663 * configure: Re-generate.
6665 2018-04-09 Pedro Alves <palves@redhat.com>
6667 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6668 (set_target_gdbarch): Call
6669 gdb::observers::architecture_changed.notify instead of
6670 observer_notify_architecture_changed.
6672 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6674 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6675 (do_restore_current_traceframe_cleanup): Remove.
6676 (restore_current_traceframe_cleanup_dtor): Remove.
6677 (make_cleanup_restore_current_traceframe): Remove.
6678 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6680 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6681 * infrun.c (fetch_inferior_event): Use
6682 scoped_restore_current_traceframe.
6684 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6686 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6688 <n_allocated_type_units>: Remove.
6689 <all_type_units>: Change to std::vector.
6690 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6691 to std::vector change.
6692 (dwarf2_per_objfile::get_cutu): Likewise.
6693 (dwarf2_per_objfile::get_tu): Likewise.
6694 (create_signatured_type_table_from_index): Likewise.
6695 (create_signatured_type_table_from_debug_names): Likewise.
6696 (dw2_symtab_iter_next): Likewise.
6697 (dw2_print_stats): Likewise.
6698 (dw2_expand_all_symtabs): Likewise.
6699 (dw2_expand_marked_cus): Likewise.
6700 (dw2_debug_names_iterator::next): Likewise.
6701 (dwarf2_initialize_objfile): Likewise.
6702 (add_signatured_type_cu_to_table): Likewise.
6703 (create_all_type_units): Likewise.
6704 (add_type_unit): Likewise.
6705 (struct tu_abbrev_offset): Add constructor.
6706 (build_type_psymtabs_1): Adjust to std::vector change.
6707 (print_tu_stats): Likewise.
6708 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6709 (write_debug_names): Likewise.
6711 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6713 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6714 Make an std::vector.
6715 <n_comp_units>: Remove.
6716 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6717 to std::vector change.
6718 (dwarf2_per_objfile::get_cutu): Likewise.
6719 (dwarf2_per_objfile::get_cu): Likewise.
6720 (create_cus_from_index): Likewise.
6721 (create_addrmap_from_index): Likewise.
6722 (create_addrmap_from_aranges): Likewise.
6723 (dwarf2_read_index): Likewise.
6724 (dw2_find_last_source_symtab): Likewise.
6725 (dw2_map_symtabs_matching_filename): Likewise.
6726 (dw2_symtab_iter_next): Likewise.
6727 (dw2_print_stats): Likewise.
6728 (dw2_expand_all_symtabs): Likewise.
6729 (dw2_expand_symtabs_with_fullname): Likewise.
6730 (dw2_expand_marked_cus): Likewise.
6731 (dw2_map_symbol_filenames): Likewise.
6732 (create_cus_from_debug_names): Likewise.
6733 (dwarf2_read_debug_names): Likewise.
6734 (dw2_debug_names_iterator::next): Likewise.
6735 (dwarf2_initialize_objfile): Likewise.
6736 (set_partial_user): Likewise.
6737 (dwarf2_build_psymtabs_hard): Likewise.
6738 (read_comp_units_from_section): Remove arguments, adjust to
6740 (create_all_comp_units): Adjust to std::vector and
6741 read_comp_units_from_section changes.
6742 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6744 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6745 (psyms_seen_size): Likewise.
6746 (write_gdbindex): Likewise.
6747 (write_debug_names): Likewise.
6749 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6751 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6752 with dwarf2_per_objfile.
6753 (create_cus_from_index): Likewise.
6754 (create_signatured_type_table_from_index): Likewise.
6755 (dwarf2_read_index): Likewise.
6756 (dwarf2_initialize_objfile): Likewise.
6757 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6758 per_cu rather than get_dwarf2_per_objfile.
6760 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6762 * dwarf2read.h (struct signatured_type): Forward declare.
6763 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6765 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6766 (dw2_get_cutu): ...this.
6767 (dwarf2_per_objfile::get_cu): Rename from...
6768 (dw2_get_cu): ...this.
6769 (dwarf2_per_objfile::get_tu): New.
6770 (create_addrmap_from_index): Adjust.
6771 (create_addrmap_from_aranges): Adjust.
6772 (dw2_find_last_source_symtab): Adjust.
6773 (dw2_map_symtabs_matching_filename): Adjust.
6774 (dw2_symtab_iter_next): Adjust.
6775 (dw2_print_stats): Adjust.
6776 (dw2_expand_all_symtabs): Adjust.
6777 (dw2_expand_symtabs_with_fullname): Adjust.
6778 (dw2_expand_marked_cus): Adjust.
6779 (dw_expand_symtabs_matching_file_matcher): Adjust.
6780 (dw2_map_symbol_filenames): Adjust.
6781 (dw2_debug_names_iterator::next): Adjust.
6782 (dwarf2_initialize_objfile): Adjust.
6783 (set_partial_user): Adjust.
6784 (dwarf2_build_psymtabs_hard): Adjust.
6786 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6788 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6789 Remove unused variables.
6790 (dw2_map_symtabs_matching_filename): Likewise.
6791 (dwarf2_record_block_ranges): Likewise.
6792 (dwarf2_read_addr_index): Likewise.
6793 (follow_die_offset): Likewise.
6795 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6797 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6798 to symbol_file_add_main.
6800 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6803 * mi/mi-console.c (do_fputc_async_safe): New.
6804 (mi_console_file::write_async_safe): New.
6805 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6806 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6808 * ui-file.c (ui_file::putstrn): Adjust call to
6809 fputstrn_unfiltered.
6810 * utils.c (printchar): Replace do_fputs and do_fprintf
6811 parameters by do_fputc.
6812 (fputstr_filtered): Adjust call to printchar.
6813 (fputstr_unfiltered): Likewise.
6814 (fputstrn_filtered): Likewise.
6815 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6817 * utils.h (do_fputc_ftype): New typedef.
6818 (fputstrn_unfiltered): Add do_fputc parameter.
6820 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6822 * regformats/i386/i386-avx.dat: Remove.
6824 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6827 * amd64-tdep.c (amd64_none_init_abi): New function.
6828 (amd64_x32_none_init_abi): New function.
6829 (_initialize_amd64_tdep): Register handlers for x86-64 and
6830 x64_32 with GDB_OSABI_NONE.
6831 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6832 GDB_OSABI_NONE osabi.
6834 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6837 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6839 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6840 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6842 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6844 * common/byte-vector.h (char_vector): New type.
6845 * target.h (target_read_alloc): Return
6846 gdb::optional<byte_vector>.
6847 (target_read_stralloc): Return gdb::optional<char_vector>.
6848 (target_get_osdata): Return gdb::optional<char_vector>.
6849 * target.c (target_read_alloc_1): Templatize. Replacement
6850 manual memory management with vector.
6851 (target_read_alloc): Change return type, adjust.
6852 (target_read_stralloc): Change return type, adjust.
6853 (target_get_osdata): Change return type, adjust.
6854 * auxv.c (struct auxv_info) <length>: Remove.
6855 <data>: Change type to gdb::optional<byte_vector>.
6856 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6857 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6858 (target_auxv_search): Adjust.
6859 (fprint_target_auxv): Adjust.
6860 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6861 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6862 (linux_make_corefile_notes): Adjust.
6863 * osdata.c (get_osdata): Adjust.
6864 * remote.c (remote_get_threads_with_qxfer): Adjust.
6865 (remote_memory_map): Adjust.
6866 (remote_traceframe_info): Adjust.
6867 (btrace_read_config): Adjust.
6868 (remote_read_btrace): Adjust.
6869 (remote_pid_to_exec_file): Adjust.
6870 * solib-aix.c (solib_aix_get_library_list): Adjust.
6871 * solib-dsbt.c (decode_loadmap): Don't free buf.
6872 (dsbt_get_initial_loadmaps): Adjust.
6873 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6874 * solib-target.c (solib_target_current_sos): Adjust.
6875 * tracepoint.c (sdata_make_value): Adjust.
6876 * xml-support.c (xinclude_start_include): Adjust.
6877 (xml_fetch_content_from_file): Adjust.
6878 * xml-support.h (xml_fetch_another): Change return type.
6879 (xml_fetch_content_from_file): Change return type.
6880 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6881 * xml-tdesc.c (file_read_description_xml): Adjust.
6882 (fetch_available_features_from_target): Change return type.
6883 (target_fetch_description_xml): Adjust.
6884 (target_read_description_xml): Adjust.
6886 2018-04-06 Tom Tromey <tom@tromey.com>
6888 * value.c (~value): Update.
6889 (struct value) <contents>: Now unique_xmalloc_ptr.
6890 (value_contents_bits_eq, allocate_value_contents)
6891 (value_contents_raw, value_contents_all_raw)
6892 (value_contents_for_printing, value_contents_for_printing_const)
6893 (set_value_enclosing_type): Update.
6895 2018-04-06 Tom Tromey <tom@tromey.com>
6897 * value.c (range_s): Remove typedef, VEC.
6898 (struct range): Add operator<.
6899 (range_lessthan): Remove.
6900 (ranges_contain): Change type.
6902 (struct value) <unavailable, optimized_out>: Now std::vector.
6903 (value_entirely_available)
6904 (value_entirely_covered_by_range_vector)
6905 (value_entirely_unavailable, value_entirely_optimized_out):
6907 (insert_into_bit_range_vector): Change argument type.
6908 (find_first_range_overlap): Likewise.
6909 (struct ranges_and_idx, value_contents_bits_eq)
6910 (require_not_optimized_out, require_available): Update.
6911 (ranges_copy_adjusted): Change argument types.
6912 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6914 2018-04-06 Tom Tromey <tom@tromey.com>
6916 * value.c (~value): Update.
6917 (struct value) <parent>: Now a value_ref_ptr.
6918 (value_parent, set_value_parent, value_address, value_copy):
6921 2018-04-06 Tom Tromey <tom@tromey.com>
6923 * value.c (struct value): Add constructor, destructor, and member
6925 (allocate_value_lazy, value_decref): Update.
6927 2018-04-06 Tom Tromey <tom@tromey.com>
6929 * value.c (struct value) <released, next>: Remove.
6930 (all_values): Now a std::vector.
6931 (allocate_value_lazy): Update.
6932 (value_next): Remove.
6933 (value_mark, value_free_to_mark, release_value)
6934 (value_release_to_mark): Update.
6936 2018-04-06 Tom Tromey <tom@tromey.com>
6938 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6939 (free_value_chain): Remove.
6940 * value.c (free_value_chain): Remove.
6941 (value_release_to_mark): Return a std::vector.
6942 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6944 (check_condition): Update.
6945 * eval.c (fetch_subexp_value): Change "val_chain" to a
6947 * breakpoint.c (update_watchpoint): Update.
6948 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6950 2018-04-06 Tom Tromey <tom@tromey.com>
6952 * value.h (free_all_values): Remove.
6953 * value.c (free_all_values): Remove.
6955 2018-04-06 Tom Tromey <tom@tromey.com>
6957 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6958 (value_history_chain, value_history_count): Remove.
6959 (value_history): New global.
6960 (record_latest_value, access_value_history, show_values)
6961 (preserve_values): Update.
6963 2018-04-06 Tom Tromey <tom@tromey.com>
6965 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6966 * varobj.c (varobj_set_display_format, varobj_set_value)
6967 (install_default_visualizer, construct_visualizer)
6968 (install_new_value, ~varobj, varobj_get_value_type)
6969 (my_value_of_variable, varobj_editable_p): Update.
6970 * c-varobj.c (c_describe_child, c_value_of_variable)
6971 (cplus_number_of_children, cplus_describe_child): Update.
6972 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6973 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6974 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6976 2018-04-06 Tom Tromey <tom@tromey.com>
6978 * printcmd.c (last_examine_address): Change type to
6980 (do_examine, x_command): Update.
6982 2018-04-06 Tom Tromey <tom@tromey.com>
6984 * value.c (release_value): Update.
6985 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6986 (struct bpstats) <val>: Now a value_ref_ptr.
6987 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6988 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6989 (~watchpoint, print_it_watchpoint, watch_command_1)
6990 (invalidate_bp_value_on_memory_change): Update.
6992 2018-04-06 Tom Tromey <tom@tromey.com>
6994 * varobj.c (varobj_clear_saved_item)
6995 (update_dynamic_varobj_children, install_new_value, ~varobj):
6997 * value.h (value_incref): Move declaration earlier.
6998 (value_decref): Rename from value_free.
6999 (struct value_ref_policy): New.
7000 (value_ref_ptr): New typedef.
7001 (struct value_deleter): Remove.
7002 (gdb_value_up): Remove typedef.
7003 (release_value): Change return type.
7004 (release_value_or_incref): Remove.
7005 * value.c (set_value_parent): Update.
7006 (value_incref): Change return type.
7007 (value_decref): Rename from value_free.
7008 (value_free_to_mark, free_all_values, free_value_chain): Update.
7009 (release_value): Return value_ref_ptr.
7010 (release_value_or_incref): Remove.
7011 (record_latest_value, set_internalvar, clear_internalvar):
7013 * stack.c (info_frame_command): Don't call value_free.
7014 * python/py-value.c (valpy_dealloc, valpy_new)
7015 (value_to_value_object): Update.
7016 * printcmd.c (do_examine): Update.
7017 * opencl-lang.c (lval_func_free_closure): Update.
7018 * mi/mi-main.c (register_changed_p): Don't call value_free.
7019 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7020 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7021 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7023 * guile/scm-value.c (vlscm_free_value_smob)
7024 (vlscm_scm_from_value): Update.
7025 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7026 (frame_unwind_register_unsigned, get_frame_register_bytes)
7027 (put_frame_register_bytes): Don't call value_free.
7028 * findvar.c (address_from_register): Don't call value_free.
7029 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7030 * dwarf2loc.c (entry_data_value_free_closure)
7031 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7032 (dwarf2_evaluate_loc_desc_full): Update.
7033 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7034 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7035 (~watchpoint, watch_command_1)
7036 (invalidate_bp_value_on_memory_change): Update.
7037 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7039 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7042 * warning.m4: Add -Wno-error=deprecated-register.
7043 * configure: Re-generate.
7045 2018-04-05 Tom Tromey <tom@tromey.com>
7047 * linespec.h: Remove include of "vec.h".
7049 2018-04-05 Tom Tromey <tom@tromey.com>
7051 * linespec.c (typep): Remove typedef.
7052 (find_methods, find_superclass_methods): Take a std::vector.
7053 (find_method): Use std::vector.
7055 2018-04-05 Tom Tromey <tom@tromey.com>
7057 * utils.c (compare_strings): Remove.
7058 * utils.h (compare_strings): Remove.
7059 * objc-lang.h (find_imps): Update.
7060 * objc-lang.c (find_methods): Take a std::vector.
7061 (uniquify_strings, find_imps): Likewise.
7062 * linespec.c (find_methods): Take a std::vector.
7063 (decode_objc): Use std::vector.
7064 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7066 (find_method, find_function_symbols): Use std::vector.
7068 2018-04-05 Tom Tromey <tom@tromey.com>
7070 * completer.c (completion_tracker::completion_tracker): Remove
7072 (completion_tracker::discard_completions): Likewise.
7073 * breakpoint.c (ambiguous_names_p): Remove cast.
7074 * ada-lang.c (_initialize_ada_language): Remove cast.
7075 * utils.h (streq): Update.
7076 (streq_hash): Add new declaration.
7077 * utils.c (streq): Return bool.
7078 (streq_hash): New function.
7080 2018-04-05 Tom Tromey <tom@tromey.com>
7082 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7083 Remove a string copy.
7085 2018-04-05 Tom Tromey <tom@tromey.com>
7087 * linespec.c (filter_results): Use std::vector.
7088 (decode_line_2, decode_line_full): Update.
7090 2018-04-05 Tom Tromey <tom@tromey.com>
7092 * linespec.c (canonical_to_fullform): Return std::string.
7093 (filter_results): Update.
7094 (struct decode_line_2_item): Add constructor.
7095 <fullform, displayform>: Now std::string.
7096 (decode_line_2_compare_items): Now a std::sort comparator.
7097 (decode_line_2): Update.
7099 2018-04-05 Tom Tromey <tom@tromey.com>
7101 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7102 (unexpected_linespec_error): Update.
7103 (linespec_parse_basic, parse_linespec): Update.
7105 2018-04-05 Tom Tromey <tom@tromey.com>
7107 * linespec.c (linespec_parse_basic): Reindent.
7109 2018-04-05 Tom Tromey <tom@tromey.com>
7111 * minsyms.h (iterate_over_minimal_symbols): Update.
7112 * minsyms.c (iterate_over_minimal_symbols): Take a
7114 * linespec.c (struct collect_minsyms): Remove.
7115 (compare_msyms): Now a std::sort comparator.
7116 (add_minsym): Add parameters.
7117 (search_minsyms_for_name): Update. Use std::vector.
7119 2018-04-03 Tom Tromey <tom@tromey.com>
7121 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7124 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7126 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7128 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7131 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7132 printing static type.
7134 2018-04-01 Tom Tromey <tom@tromey.com>
7136 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7137 (rs6000_xfer_shared_libraries): Update.
7139 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7141 * common/gdb_vecs.h (char_ptr): Remove.
7142 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7144 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7146 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7148 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7150 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7152 * tracepoint.h (struct uploaded_tp): Initialize fields.
7153 <actions, step_actions, cmd_strings>: Change type to
7154 std::vector<char *>.
7155 * tracepoint.c (get_uploaded_tp): Allocate with new.
7156 (free_uploaded_tps): Free with delete.
7157 (parse_tracepoint_definition): Adjust to std::vector change.
7158 * breakpoint.c (read_uploaded_action): Likewise.
7159 (create_tracepoint_from_upload): Likewise.
7160 * ctf.c (ctf_write_uploaded_tp): Likewise.
7161 (SET_ARRAY_FIELD): Likewise.
7162 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7164 2018-03-30 Tom Tromey <tom@tromey.com>
7166 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7168 (svr4_keep_data_in_core): Update.
7169 (svr4_read_so_list): Update.
7171 2018-03-30 Tom Tromey <tom@tromey.com>
7173 * windows-nat.c (handle_output_debug_string, handle_exception):
7175 * target.h (target_read_string): Update.
7176 * target.c (target_read_string): Change "string" to
7178 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7180 * solib-frv.c (frv_current_sos): Update.
7181 * solib-dsbt.c (dsbt_current_sos): Update.
7182 * solib-darwin.c (darwin_current_sos): Update.
7183 * linux-thread-db.c (inferior_has_bug): Update.
7184 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7185 Update. Remove alloca.
7186 * ada-lang.c (ada_main_name): Update.
7188 2018-03-30 Tom Tromey <tom@tromey.com>
7190 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7191 (struct dwo_file_deleter): New.
7192 (dwo_file_up): New typedef.
7193 (open_and_init_dwo_file): Use dwo_file_up.
7194 (free_dwo_file_cleanup): Remove.
7196 2018-03-30 Tom Tromey <tom@tromey.com>
7198 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7199 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7201 2018-03-30 Tom Tromey <tom@tromey.com>
7203 * dwarf2read.c (class free_cached_comp_units): New class.
7204 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7205 (free_cached_comp_units): Remove function.
7207 2018-03-30 Tom Tromey <tom@tromey.com>
7209 * utils.h (make_cleanup_unpush_target): Remove.
7210 * inf-ptrace.c (struct target_unpusher): New.
7211 (target_unpush_up) New typedef.
7212 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7214 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7216 2018-03-27 Tom Tromey <tom@tromey.com>
7218 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7220 2018-03-27 Pedro Alves <palves@redhat.com>
7221 Tom Tromey <tom@tromey.com>
7223 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7224 destructor. Now a class.
7225 (gdb_readline_wrapper_cleanup): Remove function.
7226 (gdb_readline_wrapper): Remove cleanups.
7228 2018-03-27 Tom Tromey <tom@tromey.com>
7230 * typeprint.h (struct type_print_options) <local_typedefs,
7231 global_typedefs>: Remove "struct" keyword.
7232 (class typedef_hash_table): New class.
7233 (recursively_update_typedef_hash, add_template_parameters)
7234 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7235 (find_typedef_in_hash): Don't declare.
7236 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7237 (typedef_hash_table::recursively_update): Rename from
7238 recursively_update_typedef_hash. Now a member.
7239 (typedef_hash_table::add_template_parameters): Rename from
7240 add_template_parameters. Now a member.
7241 (typedef_hash_table::typedef_hash_table): Now a constructor;
7242 rename from create_typedef_hash.
7243 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7244 rename from free_typedef_hash.
7245 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7246 (do_free_global_table): Remove.
7247 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7248 from copy_type_recursive.
7249 (create_global_typedef_table): Remove.
7250 (typedef_hash_table::find_global_typedef): Now a member of
7252 (typedef_hash_table::find_typedef): Rename from
7253 find_typedef_in_hash; now a member.
7254 (whatis_exp): Update.
7255 * extension.h (struct ext_lang_type_printers): Add constructor and
7257 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7259 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7260 Now a constructor; rename from start_ext_lang_type_printers.
7261 (ext_lang_type_printers): Now a destructor; rename from
7262 free_ext_lang_type_printers.
7263 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7265 (c_type_print_base_struct_union): Update. Remove cleanups.
7267 2018-03-27 Tom Tromey <tom@tromey.com>
7269 * dwarf-index-write.c: Include <cmath>.
7271 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7273 * NEWS: Add entry describing new "set|show varsize-limit" command.
7274 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7276 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7279 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7281 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7283 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7284 * dwarf-index-common.c: New file.
7285 * dwarf-index-common.h: New file.
7286 * dwarf-index-write.c: New file.
7287 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7288 (struct dwarf2_section_info): Move from here.
7289 (dwarf2_section_info_def): Likewise.
7290 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7291 (offset_type): Likewise.
7292 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7293 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7294 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7295 (byte_swap): Likewise.
7296 (MAYBE_SWAP): Likewise.
7297 (dwarf2_per_cu_ptr): Likewise.
7298 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7299 (struct tu_stats): Likewise.
7300 (struct dwarf2_per_objfile): Likewise.
7301 (struct dwarf2_per_cu_data): Likewise.
7302 (struct signatured_type): Likewise.
7303 (sig_type_ptr): Likewise.
7304 (DEF_VEC_P (sig_type_ptr)): Likewise.
7305 (INDEX4_SUFFIX): Likewise.
7306 (INDEX5_SUFFIX): Likewise.
7307 (DEBUG_STR_SUFFIX): Likewise.
7308 (dwarf2_read_section): Make non-static.
7309 (mapped_index_string_hash): Move from here.
7310 (dwarf5_djb_hash): Likewise.
7311 (file_write): Likewise.
7312 (class data_buf): Likewise.
7313 (struct symtab_index_entry): Likewise.
7314 (struct mapped_symtab): Likewise.
7315 (find_slot): Likewise.
7316 (hash_expand): Likewise.
7317 (add_index_entry): Likewise.
7318 (uniquify_cu_indices): Likewise.
7319 (class c_str_view): Likewise.
7320 (class c_str_view_hasher): Likewise.
7321 (class vector_hasher): Likewise.
7322 (write_hash_table): Likewise.
7323 (psym_index_map): Likewise.
7324 (struct addrmap_index_data): Likewise.
7325 (add_address_entry): Likewise.
7326 (add_address_entry_worker): Likewise.
7327 (write_address_map): Likewise.
7328 (symbol_kind): Likewise.
7329 (write_psymbols): Likewise.
7330 (struct signatured_type_index_data): Likewise.
7331 (write_one_signatured_type): Likewise.
7332 (recursively_count_psymbols): Likewise.
7333 (recursively_write_psymbols): Likewise.
7334 (class debug_names): Likewise.
7335 (check_dwarf64_offsets): Likewise.
7336 (psyms_seen_size): Likewise.
7337 (write_gdbindex): Likewise.
7338 (write_debug_names): Likewise.
7339 (assert_file_size): Likewise.
7340 (write_psymtabs_to_index): Likewise.
7341 (save_gdb_index_command): Likewise.
7342 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7344 * dwarf2read.h: New file.
7346 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7349 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7350 symbol name if the CU's language stores symbol names in linkage
7352 * language.h (struct language_defn)
7353 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7354 all instances of this struct.
7356 2018-03-26 Tom Tromey <tom@tromey.com>
7358 * stack.c (backtrace_command_1): Remove verbose code.
7360 2018-03-26 Tom Tromey <tom@tromey.com>
7362 * python/py-framefilter.c (py_print_type): Don't catch
7363 exceptions. Return void.
7364 (py_print_value): Likewise.
7365 (py_print_single_arg): Likewise.
7366 (enumerate_args): Don't catch exceptions.
7367 (py_print_args): Likewise.
7368 (py_print_frame): Likewise.
7369 (gdbpy_apply_frame_filter): Catch exceptions here.
7371 2018-03-26 Tom Tromey <tom@tromey.com>
7373 * stack.c (_initialize_stack): Remove trailing newlines from help
7374 text. Add "Usage" line to "backtrace" help.
7376 2018-03-26 Tom Tromey <tom@tromey.com>
7379 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7381 2018-03-26 Tom Tromey <tom@tromey.com>
7383 * python/py-framefilter.c (py_print_single_arg): Return
7384 EXT_LANG_BT_ERROR from catch.
7386 2018-03-26 Tom Tromey <tom@tromey.com>
7389 * stack.c (backtrace_command_1): Move some code into no-filters
7392 2018-03-26 Tom Tromey <tom@tromey.com>
7394 * python/py-framefilter.c (throw_quit_or_print_exception): New
7396 (gdbpy_apply_frame_filter): Use it.
7398 2018-03-26 Tom Tromey <tom@tromey.com>
7401 * python/py-framefilter.c (py_print_type, py_print_value)
7402 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7405 2018-03-26 Tom Tromey <tom@tromey.com>
7407 * python/py-framefilter.c (enumerate_args): Use
7408 gdb::unique_xmalloc_ptr.
7410 2018-03-26 Tom Tromey <tom@tromey.com>
7412 * python/py-framefilter.c (py_print_frame): Return
7414 (gdbpy_apply_frame_filter): Update comment.
7415 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7417 <EXT_LANG_BT_NO_FILTERS>: Change value.
7419 2018-03-26 Tom Tromey <tom@tromey.com>
7422 * stack.c (backtrace_command): Parse "hide" argument.
7423 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7424 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7427 2018-03-26 Tom Tromey <tom@tromey.com>
7429 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7431 (backtrace_command): Remove "fulltrace", add "flags".
7433 2018-03-26 Tom Tromey <tom@tromey.com>
7435 * stack.c (backtrace_command): Rewrite command line parsing.
7437 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7439 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7441 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7443 * filename-seen-cache.h: Add include guard.
7445 2018-03-26 Keith Seitz <keiths@redhat.com>
7447 * symfile.c (place_section): Remove "struct" from section_addr_info
7449 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7450 "struct" keyword from section_addr_info.
7452 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7454 * regformats/regdef.h (reg): Add constructors.
7456 2018-03-25 Pedro Alves <palves@redhat.com>
7458 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7459 if then/else bodies in var_func_name extraction.
7461 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7463 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7464 lookup_minimal_symbol() to find symbol entry.
7465 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7467 2018-03-23 Keith Seitz <keiths@redhat.com>
7470 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7471 nested type definitions for C++, too.
7473 2018-03-23 Tom Tromey <tom@tromey.com>
7475 * machoread.c (struct oso_el): Add a constructor. Don't define as
7477 (macho_register_oso): Remove.
7478 (macho_symtab_read): Take a std::vector.
7479 (oso_el_compare_name): Now a std::sort comparator.
7480 (macho_symfile_read_all_oso): Take a std::vector.
7481 (macho_symfile_read): Use std::vector. Remove cleanups.
7483 2018-03-22 Tom Tromey <tom@tromey.com>
7485 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7486 (record_full_goto_bookmark): Use std::string.
7488 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7491 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7494 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7496 * rs6000-tdep.c (store_insn_p): New function.
7497 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7498 and cr_reg to their unshifted values. Use store_insn_p to
7499 match LR saves using either R1 or fdata->alloca_reg. Use
7500 store_insn_p to match CR saves. Set alloca_reg_offset
7501 when alloca_reg and framep are set. Remove lr_reg shift
7502 when assigning to fdata->lr_register.
7504 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7506 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7507 command line args instead of emitting a warning.
7509 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7511 * tracepoint.h (struct static_tracepoint_marker): Initialize
7512 fields, define default constructor, move constructor and move
7513 assignment, disable the rest.
7514 <str_id, extra>: Make std::string.
7515 (release_static_tracepoint_marker): Remove.
7516 (free_current_marker): Remove.
7517 * tracepoint.c (free_current_marker): Remove.
7518 (parse_static_tracepoint_marker_definition): Adjust to
7519 std::string, use new hex2str overload.
7520 (release_static_tracepoint_marker): Remove.
7521 (print_one_static_tracepoint_marker): Get marker by reference
7522 and adjust to std::string.
7523 (info_static_tracepoint_markers_command): Adjust to std::vector
7525 * target.h (static_tracepoint_marker_p): Remove typedef.
7526 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7527 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7529 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7531 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7532 (target_debug_print_std_vector_static_tracepoint_marker): New.
7533 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7535 (target_debug_print_static_tracepoint_marker_p): ... this.
7536 * target-delegates.c: Re-generate.
7537 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7539 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7540 (decode_static_tracepoint_spec): Adjust to std::vector.
7541 (tracepoint_print_one_detail): Adjust to std::string.
7542 (strace_marker_decode_location): Adjust to std::string.
7543 (update_static_tracepoint): Adjust to std::string, remove call
7544 to release_static_tracepoint_marker.
7545 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7546 Adjust to std::vector.
7547 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7548 (remote_static_tracepoint_markers_by_strid): Adjust to
7550 * common/rsp-low.h (hex2str): New overload with explicit count
7552 * common/rsp-low.c (hex2str): New overload with explicit count
7554 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7555 (_initialize_rsp_low_selftests): Add test_hex2str test.
7556 * unittests/tracepoint-selftests.c
7557 (test_parse_static_tracepoint_marker_definition): Adjust to
7560 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7562 * tracepoint.c (parse_static_tracepoint_marker_definition):
7563 Consider case where the definition is followed by more
7565 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7566 tracepoint-selftests.c.
7567 * unittests/tracepoint-selftests.c: New.
7569 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7571 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7574 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7576 * symtab.c (find_pc_sect_line): fixed indentation.
7578 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7580 * symtab.c (find_pc_sect_line): now uses binary search.
7582 2018-03-19 Tom Tromey <tom@tromey.com>
7584 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7587 2018-03-19 Pedro Alves <palves@redhat.com>
7588 Tom Tromey <tom@tromey.com>
7590 * unittests/observable-selftests.c: New file.
7591 * common/observable.h: New file.
7592 * observable.h: New file.
7593 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7594 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7595 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7596 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7597 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7598 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7599 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7600 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7601 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7602 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7603 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7604 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7605 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7606 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7607 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7608 tui/tui-interp.c, valops.c: Update all users.
7609 * tui/tui-hooks.c (tui_bp_created_observer)
7610 (tui_bp_deleted_observer, tui_bp_modified_observer)
7611 (tui_inferior_exit_observer, tui_before_prompt_observer)
7612 (tui_normal_stop_observer, tui_register_changed_observer):
7614 (tui_observers_token): New global.
7615 (attach_or_detach, tui_attach_detach_observers): New functions.
7616 (tui_install_hooks, tui_remove_hooks): Use
7617 tui_attach_detach_observers.
7618 * record-btrace.c (record_btrace_thread_observer): Remove.
7619 (record_btrace_thread_observer_token): New global.
7620 * observer.sh: Remove.
7621 * observer.c: Rename to observable.c.
7622 * observable.c (namespace gdb_observers): Define new objects.
7623 (observer_debug): Move into gdb_observers namespace.
7624 (struct observer, struct observer_list, xalloc_observer_list_node)
7625 (xfree_observer_list_node, generic_observer_attach)
7626 (generic_observer_detach, generic_observer_notify): Remove.
7627 (_initialize_observer): Update.
7628 Don't include observer.inc.
7629 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7630 (clean mostlyclean): Likewise.
7631 (observer.h, observer.inc): Remove targets.
7632 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7633 (COMMON_SFILES): Use observable.c, not observer.c.
7634 * .gitignore: Remove observer.h.
7636 2018-03-18 Tom Tromey <tom@tromey.com>
7638 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7640 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7642 2018-03-17 Tom Tromey <tom@tromey.com>
7644 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7646 2018-03-17 Tom Tromey <tom@tromey.com>
7648 * target.c (class scoped_target_fd): New.
7649 (target_fileio_close_cleanup): Remove.
7650 (target_fileio_read_alloc_1): Use scoped_target_fd.
7652 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7654 * silent-rules.mk: New.
7655 * Makefile.in: Include silent-rules.mk
7656 (srcdir, VPATH, top_srcdir): Move up.
7657 (COMPILE): Add ECHO_CXX.
7658 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7659 (init.c): Add ECHO_INIT_C.
7660 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7661 (version.c): Add ECHO_GEN.
7662 (printcmd.o): Add ECHO_CXX.
7663 (target-float.o): Add ECHO_CXX.
7664 (ada-exp.o): Add ECHO_CXX.
7665 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7666 (insight$(EXEEXT)): Add ECHO_CXXLD.
7667 * gnulib/configure.ac: Add AM_SILENT_RULES.
7668 * gnulib/aclocal.m4: Re-generate.
7669 * gnulib/configure: Re-generate.
7670 * gnulib/import/Makefile.in: Re-generate.
7672 2018-03-16 Tom Tromey <tom@tromey.com>
7674 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7675 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7676 * utils.c (do_free_section_addr_info)
7677 (make_cleanup_free_section_addr_info): Remove.
7678 * symfile.h (struct other_sections): Add constructor.
7679 (struct section_addr_info): Remove.
7680 (section_addr_info): New typedef.
7681 (struct sym_fns) <sym_offsets>: Change type of parameter.
7682 (build_section_addr_info_from_objfile)
7683 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7684 (default_symfile_offsets, symbol_file_add)
7685 (symbol_file_add_from_bfd)
7686 (build_section_addr_info_from_section_table): Update.
7687 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7688 * symfile.c (alloc_section_addr_info): Remove.
7689 (build_section_addr_info_from_section_table): Change return type.
7691 (build_section_addr_info_from_bfd)
7692 (build_section_addr_info_from_objfile): Likewise.
7693 (free_section_addr_info): Remove.
7694 (relative_addr_info_to_section_offsets): Change type of "addrs".
7695 (addrs_section_compar): Now a std::sort comparator.
7696 (addrs_section_sort): Change return type.
7697 (addr_info_make_relative): Change type of "addrs". Update.
7698 (default_symfile_offsets, syms_from_objfile_1)
7699 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7700 (symbol_file_add_separate): Update.
7701 (symbol_file_add): Change type of "addrs". Update.
7702 (add_symbol_file_command): Update. Remove cleanups.
7703 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7705 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7706 * solib.c (solib_read_symbols): Update.
7707 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7708 * machoread.c (macho_symfile_offsets): Update.
7709 * jit.c (jit_bfd_try_read_symtab): Update.
7711 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7713 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7714 unittests/utils-selftests.c.
7715 * unittests/utils-selftests.c: New file.
7717 2018-03-14 Tom Tromey <tom@tromey.com>
7720 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7723 2018-03-14 Tom Tromey <tom@tromey.com>
7726 * printcmd.c (printf_pointer): Allow "-" in format.
7728 2018-03-14 Tom Tromey <tom@tromey.com>
7730 * printcmd.c (_initialize_printcmd): Add usage to printf.
7732 2018-03-14 Yao Qi <qiyao@sourceware.org>
7734 * MAINTAINERS: Update my email address.
7736 2018-03-13 Tom Tromey <tom@tromey.com>
7738 * machoread.c (macho_check_dsym): Change filenamep to a
7740 (macho_symfile_read): Update.
7741 * symfile.c (load_command): Use std::string.
7743 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7745 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7746 to error message string.
7747 (riscv_register_name): Use xsnprintf instead of sprintf.
7748 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7750 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7752 (riscv_push_dummy_call): Likewise.
7754 2018-03-12 Tom Tromey <tom@tromey.com>
7756 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7757 Use gdb::byte_vector.
7758 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7760 2018-03-12 Yao Qi <yao.qi@linaro.org>
7762 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7763 parameter type to readable_regcache.
7764 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7767 2018-03-11 Tom Tromey <tom@tromey.com>
7769 * dwarf2read.c (struct nextfield): Add initializers.
7770 (struct nextfnfield): Remove.
7771 (struct fnfieldlist): Add initializers. Remove "length" and
7772 "head", use std::vector.
7773 (struct decl_field_list): Remove.
7774 (struct field_info): Add initializers.
7775 <fields, baseclasses>: Now std::vector.
7776 <nbaseclasses, nfnfields, typedef_field_list_count,
7777 nested_types_list_count>: Remove.
7778 (dwarf2_add_field, dwarf2_add_type_defn)
7779 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7780 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7781 (process_structure_scope): Update.
7783 2018-03-11 Tom Tromey <tom@tromey.com>
7785 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7786 for use by std::sort.
7787 (build_type_psymtabs_1): Use std::vector.
7789 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7791 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7792 and LIBMPFR in the printed configuration.
7794 2018-03-08 Tom Tromey <tom@tromey.com>
7796 * source.c (get_filename_and_charpos): Use scoped_fd.
7797 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7798 (procfs_pidlist): Likewise.
7799 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7800 (iterate_over_mappings): Likewise.
7802 2018-03-08 Tom Tromey <tom@tromey.com>
7804 * infcall.c (struct call_return_meta_info)
7805 <stack_temporaries_enabled>: Remove.
7806 (get_call_return_value, call_function_by_hand_dummy): Update.
7807 * thread.c (disable_thread_stack_temporaries): Remove.
7808 (enable_thread_stack_temporaries): Remove.
7809 (thread_stack_temporaries_enabled_p): Return bool.
7810 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7811 (get_last_thread_stack_temporary): Update.
7812 * eval.c (evaluate_subexp): Update.
7813 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7814 class, not a function.
7815 (value_ptr, value_vec): Remove typedefs.
7816 (class thread_info) <stack_temporaries_enabled>: Now bool.
7817 <stack_temporaries>: Now a std::vector.
7818 (thread_stack_temporaries_enabled_p)
7819 (value_in_thread_stack_temporaries): Return bool.
7821 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7823 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7824 (getpkt_or_notif_sane_1): Likewise.
7826 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7828 * build-id.c (build_id_to_debug_bfd): Use std::string.
7830 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7832 * build-id.c (find_separate_debug_file_by_buildid): Return
7834 * build-id.h (find_separate_debug_file_by_buildid): Return
7836 * coffread.c (coff_symfile_read): Adjust to std::string.
7837 * elfread.c (elf_symfile_read): Adjust to std::string.
7838 * symfile.c (separate_debug_file_exists): Change parameter to
7840 (find_separate_debug_file): Return std::string.
7841 (find_separate_debug_file_by_debuglink): Return std::string.
7842 * symfile.h (find_separate_debug_file_by_debuglink): Return
7845 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7847 * common/xml-utils.c (xml_escape_text): Move code to...
7848 (xml_escape_text_append): ... this new function.
7849 * common/xml-utils.h (xml_escape_text_append): New declaration.
7850 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7852 (_initialize_xml_utils): register test_xml_escape_text_append as
7855 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7857 * defs.h: Remove MAX_REGISTER_SIZE.
7858 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7860 * python/py-unwind.c (pyuw_sniffer): Likewise.
7862 2018-03-07 Tom Tromey <tom@tromey.com>
7864 * linux-tdep.c (linux_info_proc): Update.
7865 * target.h (struct target_ops) <to_fileio_readlink>: Return
7867 (target_fileio_readlink): Return optional<string>.
7868 * remote.c (remote_hostio_readlink): Return optional<string>.
7869 * inf-child.c (inf_child_fileio_readlink): Return
7871 * target.c (target_fileio_readlink): Return optional<string>.
7873 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7875 * regcache.c (cooked_read_test): Add riscv to the list of
7876 architectures that have a save_reggroup.
7878 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7880 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7881 value is not a dynamic class object.
7883 2018-03-06 Tom Tromey <tom@tromey.com>
7885 * rust-exp.y: Formatting fixes.
7887 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7889 * riscv-tdep.c (riscv_register_name): Remove target description
7891 (riscv_gdbarch_init): Remove target description check.
7893 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7895 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7897 * riscv-tdep.h: Likewise.
7899 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7901 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7902 (riscv_pseudo_register_write): Delete.
7903 (riscv_gdbarch_init): Remove all use of pseudo registers.
7905 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7907 * record-btrace.c (btrace_print_lines): Replace cleanup
7908 parameter with RAII equivalents.
7909 (btrace_insn_history): Replace cleanup with RAII equivalents.
7910 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7911 make_cleanup_ui_out_tuple_begin_end): Remove.
7912 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7913 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7914 make_cleanup_ui_out_list_begin_end): Remove.
7916 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7918 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7919 parameter types to std::vector. Use bool.
7920 (record_btrace_wait): Replace VEC(tp_t) with
7921 std::vector<thread_info *>.
7922 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7924 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7926 * record-btrace.c (record_btrace_disable_callback): Remove.
7927 (struct scoped_btrace_disable): New.
7928 (record_btrace_open): Use scoped_btrace_disable.
7930 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7932 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7933 reading values from registers.
7935 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7937 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7940 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7942 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7943 change parameter type. Use GDB's print functions, and use
7944 core_addr_to_string where appropriate.
7945 (riscv_push_dummy_call): Use core_addr_to_string where
7946 appropriate, update call to riscv_print_arg_location, and reindent
7948 (riscv_return_value): Update call to riscv_print_arg_location.
7950 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7951 Tim Newsome <tim@sifive.com>
7952 Albert Ou <a0u@eecs.berkeley.edu>
7953 Darius Rad <darius@bluespec.com>
7955 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7956 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7957 (ALLDEPFILES): Add riscv-tdep.c
7958 * configure.tgt: Add riscv support.
7959 * riscv-tdep.c: New file.
7960 * riscv-tdep.h: New file.
7961 * NEWS: Mention new target.
7962 * MAINTAINERS: Add entry for riscv.
7964 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7966 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7967 fields within aggregates.
7969 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7971 * record-btrace.c (btrace_print_lines): Change type of flags to
7972 gdb_disassembly_flags.
7974 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7976 * fbsd-nat.c: Include "inf-ptrace.h".
7977 (USE_SIGTRAP_SIGINFO): Conditionally define.
7978 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7979 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7980 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7982 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7984 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7986 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7987 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7988 "supports_stopped_by_hw_breakpoint" target methods.
7990 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7992 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7993 * fbsd-nat.c (debug_fbsd_nat): New variable.
7994 (show_fbsd_nat_debug): New function.
7995 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7996 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7998 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8000 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8001 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8003 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8004 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8007 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8009 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8010 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8012 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8014 * charset.c (struct charset_vector): New.
8015 (charsets): Change type to charset_vector.
8016 (find_charset_names): Adjust.
8018 (_initialize_charset): Adjust.
8020 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8022 * progspace.h (struct program_space) <deleted_solibs>: Change
8023 type to std::vector<std::string>.
8024 * progspace.c (clear_program_space_solib_cache): Adjust.
8025 * breakpoint.c (print_solib_event): Adjust.
8026 (check_status_catch_solib): Adjust.
8027 * solib.c (update_solib_list): Adjust.
8028 * ui-out.h (class ui_out) <field_string>: New overload.
8029 * ui-out.c (ui_out::field_string): New overload.
8031 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8033 * progspace.h (struct program_space): Add constructor and
8034 destructor, initialize fields.
8035 (add_program_space): Remove.
8036 * progspace.c (add_program_space): Rename to...
8037 (program_space::program_space): ... this.
8038 (release_program_space): Rename to...
8039 (program_space::~program_space): ... this.
8040 (delete_program_space): Use delete to delete program_space.
8041 (initialize_progspace): Use new to allocate program_space.
8042 * inferior.c (add_inferior_with_spaces): Likewise.
8043 (clone_inferior_command): Likewise.
8044 * infrun.c (follow_fork_inferior): Likewise.
8045 (handle_vfork_child_exec_or_exit): Likewise.
8047 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8049 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8050 (delim_string_to_char_ptr_vec): Return std::vector of
8051 gdb::unique_xmalloc_ptr.
8052 (dirnames_to_char_ptr_vec_append): Take std::vector of
8053 gdb::unique_xmalloc_ptr.
8054 (dirnames_to_char_ptr_vec): Return std::vector of
8055 gdb::unique_xmalloc_ptr.
8056 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8057 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8058 (delim_string_to_char_ptr_vec): Return an std::vector of
8059 gdb::unique_xmalloc_ptr, adjust the code.
8060 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8061 gdb::unique_xmalloc_ptr, adjust the code.
8062 (dirnames_to_char_ptr_vec): Return an std::vector of
8063 gdb::unique_xmalloc_ptr, adjust the code.
8064 * auto-load.c (auto_load_safe_path_vec): Change type to
8065 std::vector of gdb::unique_xmalloc_ptr.
8066 (auto_load_expand_dir_vars): Return an std::vector of
8067 gdb::unique_xmalloc_ptr, adjust the code.
8068 (auto_load_safe_path_vec_update): Adjust.
8069 (filename_is_in_auto_load_safe_path_vec): Adjust.
8070 (auto_load_objfile_script_1): Adjust.
8071 * build-id.c (build_id_to_debug_bfd): Adjust.
8072 * linux-thread-db.c (thread_db_load_search): Adjust.
8073 * source.c (add_path): Adjust.
8075 * symfile.c (find_separate_debug_file): Adjust.
8076 * utils.c (do_free_char_ptr_vec): Remove.
8077 (make_cleanup_free_char_ptr_vec): Remove.
8079 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8082 * common/pathstuff.c: Conditionally include "<windows.h>".
8084 2018-03-01 Georg Sauthoff <mail@georg.so>
8087 * gcore.in: Quote variables and switch interpreter to bash.
8089 2018-03-01 Tom Tromey <tom@tromey.com>
8091 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8092 assertion. Add assertion for discriminant_index.
8093 (quirk_rust_enum): Use correct base type name in univariant case.
8095 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8097 * record.c (get_call_history_modifiers): Return a
8099 (cmd_record_call_history): Adjust.
8100 * record-btrace.c (record_btrace_call_history): Adjust.
8101 (record_btrace_call_history_range): Adjust.
8102 (record_btrace_call_history_from): Adjust.
8103 * target-debug.h (target_debug_print_record_print_flags): New.
8104 * target-delegates.c: Re-generate.
8105 * target.c (target_call_history): Change flags type.
8106 (target_call_history_from): Likewise.
8107 (target_call_history_range): Likewise.
8108 * target.h (struct target_ops) <target_call_history>: Likewise.
8109 (target_call_history_from): Likewise.
8110 (target_call_history_range): Likewise.
8112 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8113 Simon Marchi <simon.marchi@polymtl.ca>
8115 * common/common-utils.c: Include "sys/stat.h".
8116 (is_regular_file): Move here from "source.c"; change return
8118 * common/common-utils.h (is_regular_file): New prototype.
8119 * common/pathstuff.c (contains_dir_separator): New function.
8120 * common/pathstuff.h (contains_dir_separator): New prototype.
8121 * source.c: Don't include "sys/stat.h".
8122 (is_regular_file): Move to "common/common-utils.c".
8124 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8126 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8127 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8128 * auto-load.c: Include "common/pathstuff.h".
8129 * common/common-def.h (current_directory): Move here.
8130 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8132 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8134 * common/pathstuff.c: New file.
8135 * common/pathstuff.h: New file.
8136 * compile/compile.c: Include "common/pathstuff.h".
8137 * defs.h (current_directory): Move to "common/common-defs.h".
8138 * dwarf2read.c: Include "common/pathstuff.h".
8140 * guile/scm-safe-call.c: Likewise.
8141 * linux-thread-db.c: Likewise.
8143 * nto-tdep.c: Likewise.
8144 * objfiles.c: Likewise.
8145 * source.c: Likewise.
8146 * symtab.c: Likewise.
8147 * utils.c: Include "common/pathstuff.h".
8148 (gdb_realpath): Move to "common/pathstuff.c".
8149 (gdb_realpath_keepfile): Likewise.
8150 (gdb_abspath): Likewise.
8151 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8152 (gdb_realpath_keepfile): Likewise.
8153 (gdb_abspath): Likewise.
8155 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8157 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8158 wildcard process pid for super_resume for kernels with a
8161 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8163 * compile/compile.c (get_args): Add additional comments
8164 explaining function.
8166 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8167 Tom Tromey <tom@tromey.com>
8169 * target.h (memory_write_request_s): Remove typedef. Don't define
8171 (target_write_memory_blocks): Change argument to std::vector.
8172 (struct memory_write_request): Add constructor.
8173 * target-memory.c (compare_block_starting_address): Return bool.
8174 Change argument types.
8175 (claim_memory): Change arguments to use std::vector.
8176 (split_regular_and_flash_blocks, blocks_to_erase)
8177 (compute_garbled_blocks): Likewise.
8178 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8179 (target_write_memory_blocks): Change argument to std::vector.
8180 * symfile.c (struct load_section_data): Add constructor and
8181 destructor. Use std::vector for "requests".
8182 (struct load_progress_data): Add initializers.
8183 (load_section_callback): Update. Use "new".
8184 (clear_memory_write_data): Remove.
8185 (generic_load): Update.
8187 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8189 * arch/aarch64.h: Use common/tdesc.h.
8191 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8193 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8194 architecture with a 64-bit ABI.
8196 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8198 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8199 ahead of target description loading.
8201 2018-02-26 Tom Tromey <tom@tromey.com>
8203 * stack.c (backtrace_command_1): Update.
8204 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8206 * python/py-framefilter.c (py_print_frame)
8207 (gdbpy_apply_frame_filter): Change type of "flags".
8208 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8210 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8211 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8212 * extension.h (enum frame_filter_flag): Rename from
8214 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8215 (apply_ext_lang_frame_filter): Change type of "flags".
8216 * extension.c (apply_ext_lang_frame_filter): Change type of
8218 * extension-priv.h (struct extension_language_ops)
8219 <apply_frame_filter>: Change type of "flags".
8221 2018-02-26 Tom Tromey <tom@tromey.com>
8224 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8225 off-by-one in py_end computation.
8226 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8228 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8231 2018-02-26 Tom Tromey <tom@tromey.com>
8233 * dwarf2read.c (struct variant_field): New.
8234 (struct nextfield) <variant>: New field.
8235 (dwarf2_add_field): Handle DW_TAG_variant_part.
8236 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8237 discriminated union.
8238 (read_structure_type): Handle DW_TAG_variant_part.
8239 (handle_struct_member_die): New function, extracted from
8240 process_structure_scope. Handle DW_TAG_variant.
8241 (process_structure_scope): Handle discriminated unions. Call
8242 handle_struct_member_die.
8244 2018-02-26 Tom Tromey <tom@tromey.com>
8246 * rust-lang.h (rust_last_path_segment): Declare.
8247 * rust-lang.c (rust_last_path_segment): Now public. Change
8249 (struct disr_info): Remove.
8250 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8251 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8252 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8253 (rust_enum_p, rust_enum_variant): New function.
8254 (rust_underscore_fields): Remove "offset" parameter.
8255 (rust_print_enum): New function.
8256 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8257 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8258 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8260 (rust_internal_print_type): New function, from rust_print_type.
8262 (rust_print_type): Call rust_internal_print_type.
8263 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8264 Update enum handling.
8265 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8266 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8267 (rust_union_quirks): New functions.
8268 (process_full_comp_unit, process_full_type_unit): Call
8270 (process_structure_scope): Update rust_unions if necessary.
8272 2018-02-26 Tom Tromey <tom@tromey.com>
8274 * value.h (value_union_variant): Declare.
8275 * valops.c (value_union_variant): New function.
8276 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8277 (struct discriminant_info): New.
8278 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8280 (struct main_type) <flag_discriminated_union>: New field.
8282 2018-02-26 Tom Tromey <tom@tromey.com>
8284 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8285 unittests/unpack-selftests.c.
8286 * unittests/unpack-selftests.c: New file.
8287 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8289 2018-02-26 Yao Qi <yao.qi@linaro.org>
8291 * dwarf2read.c (struct partial_die_info) <read>: New method.
8292 (read_partial_die): Remove the declaration.
8293 (load_partial_dies): Update.
8294 (partial_die_info::partial_die_info):
8295 (read_partial_die): Change it to partial_die_info::read.
8297 2018-02-26 Yao Qi <yao.qi@linaro.org>
8299 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8300 (fixup_partial_die): Remove declaration.
8301 (scan_partial_symbols): Update.
8302 (partial_die_parent_scope): Likewise.
8303 (partial_die_full_name): Likewise.
8304 (fixup_partial_die): Change it to partial_die_info::fixup.
8306 2018-02-26 Yao Qi <yao.qi@linaro.org>
8308 * dwarf2read.c (read_partial_die): Update the declaration.
8309 (load_partial_dies): Caller update.
8310 (read_partial_die): Remove one argument abbrev_len.
8312 2018-02-26 Yao Qi <yao.qi@linaro.org>
8314 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8315 assignment operator.
8316 (load_partial_dies): Use ctor and copy ctor.
8317 (read_partial_die): Update.
8318 (dwarf2_cu::find_partial_die): Use ctor.
8320 2018-02-26 Yao Qi <yao.qi@linaro.org>
8322 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8323 (find_partial_die_in_comp_unit): Change it to
8324 dwarf2_cu::find_partial_die.
8325 (find_partial_die): Update.
8327 2018-02-26 Yao Qi <yao.qi@linaro.org>
8329 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8332 2018-02-26 Yao Qi <yao.qi@linaro.org>
8334 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8336 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8338 * arch/amd64.h: Use common/tdesc.h.
8339 * arch/i386.c: Likewise.
8340 * arch/i386.h: Likewise.
8341 * arch/tic6x.c: Likewise.
8342 * arch/tdesc.h: Move file from here...
8343 * common/tdesc.h: ...to here.
8344 * features/aarch64-core.c: Regenerate.
8345 * features/aarch64-fpu.c: Regenerate.
8346 * features/i386/32bit-avx.c: Regenerate.
8347 * features/i386/32bit-avx512.c: Regenerate.
8348 * features/i386/32bit-core.c: Regenerate.
8349 * features/i386/32bit-linux.c: Regenerate.
8350 * features/i386/32bit-mpx.c: Regenerate.
8351 * features/i386/32bit-pkeys.c: Regenerate.
8352 * features/i386/32bit-sse.c: Regenerate.
8353 * features/i386/64bit-avx.c: Regenerate.
8354 * features/i386/64bit-avx512.c: Regenerate.
8355 * features/i386/64bit-core.c: Regenerate.
8356 * features/i386/64bit-linux.c: Regenerate.
8357 * features/i386/64bit-mpx.c: Regenerate.
8358 * features/i386/64bit-pkeys.c: Regenerate.
8359 * features/i386/64bit-segments.c: Regenerate.
8360 * features/i386/64bit-sse.c: Regenerate.
8361 * features/i386/x32-core.c: Regenerate.
8362 * features/tic6x-c6xp.c: Regenerate.
8363 * features/tic6x-core.c: Regenerate.
8364 * features/tic6x-gp.c: Regenerate.
8365 * target-descriptions.c: Use common/tdesc.h.
8366 * target-descriptions.h: Likewise.
8368 2018-02-24 Tom Tromey <tom@tromey.com>
8370 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8371 (try_thread_db_load_from_dir, thread_db_load_search): Use
8373 (info_auto_load_libthread_db_compare): Return bool. Change
8375 (info_auto_load_libthread_db): Use std::vector, std::string.
8378 2018-02-24 Tom Tromey <tom@tromey.com>
8380 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8382 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8384 * gdbarch.c: Rebuild.
8385 * gdbarch.h: Rebuild.
8386 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8387 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8388 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8391 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8393 * gdbtypes.h (sect_offset): Change type to uint64_t.
8394 (sect_offset_str): New function.
8395 * dwarf2read.c (create_addrmap_from_aranges): Use
8397 (error_check_comp_unit_head): Likewise.
8398 (create_debug_type_hash_table): Likewise.
8399 (read_cutu_die_from_dwo): Likewise.
8400 (init_cutu_and_read_dies): Likewise.
8401 (init_cutu_and_read_dies_no_follow): Likewise.
8402 (process_psymtab_comp_unit_reader): Likewise.
8403 (partial_die_parent_scope): Likewise.
8404 (peek_die_abbrev): Likewise.
8405 (process_queue): Likewise.
8406 (dwarf2_physname): Likewise.
8407 (read_namespace_alias): Likewise.
8408 (read_import_statement): Likewise.
8409 (create_dwo_cu_reader): Likewise.
8410 (create_cus_hash_table): Likewise.
8411 (lookup_dwo_cutu): Likewise.
8412 (inherit_abstract_dies): Likewise.
8413 (read_func_scope): Likewise.
8414 (read_call_site_scope): Likewise.
8415 (dwarf2_add_member_fn): Likewise.
8416 (read_common_block): Likewise.
8417 (read_module_type): Likewise.
8418 (read_typedef): Likewise.
8419 (read_subrange_type): Likewise.
8420 (load_partial_dies): Likewise.
8421 (read_partial_die): Likewise.
8422 (find_partial_die): Likewise.
8423 (read_str_index): Likewise.
8424 (dwarf2_string_attr): Likewise.
8425 (build_error_marker_type): Likewise.
8426 (lookup_die_type): Likewise.
8427 (dump_die_shallow): Likewise.
8428 (follow_die_ref): Likewise.
8429 (dwarf2_fetch_die_loc_sect_off): Likewise.
8430 (dwarf2_fetch_constant_bytes): Likewise.
8431 (follow_die_sig): Likewise.
8432 (get_signatured_type): Likewise.
8433 (get_DW_AT_signature_type): Likewise.
8434 (dwarf2_find_containing_comp_unit): Likewise.
8435 (set_die_type): Likewise.
8437 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8439 * arch/aarch64.c: Include "common-defs.h".
8440 * arch/amd64.c: Likewise.
8441 * arch/i386.c: Likewise.
8443 2018-02-21 Tom Tromey <tom@tromey.com>
8445 * value.h: (extract_field_op): Update.
8446 * eval.c (extract_field_op): Return a const char *.
8447 * expression.h (parse_expression_for_completion): Update.
8448 * completer.c (complete_expression): Update.
8449 (add_struct_fields): Make fieldname const.
8450 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8451 (mark_completion_tag, parse_exp_in_context_1): Update.
8452 (parse_expression_for_completion): Change "name" to
8453 unique_xmalloc_ptr*.
8455 2018-02-21 Tom Tromey <tom@tromey.com>
8457 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8459 2018-02-21 Yao Qi <yao.qi@linaro.org>
8461 * avr-tdep.c (avr_read_pc): Change parameter type to
8463 * gdbarch.sh (read_pc): Likewise.
8464 * gdbarch.c: Re-generated.
8465 * gdbarch.h: Re-generated.
8466 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8468 * ia64-tdep.c (ia64_read_pc): Likewise.
8469 * mips-tdep.c (mips_read_pc): Likewise.
8470 * spu-tdep.c (spu_read_pc): Likewise.
8472 2018-02-21 Yao Qi <yao.qi@linaro.org>
8474 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8475 * regcache-dump.c: New file.
8476 * regcache.c: Move register_dump to regcache-dump.c.
8477 (maintenance_print_registers): Likewise.
8478 (maintenance_print_raw_registers): Likewise.
8479 (maintenance_print_cooked_registers): Likewise.
8480 (maintenance_print_register_groups): Likewise.
8481 (maintenance_print_remote_registers): Likewise.
8482 (_initialize_regcache): Likewise.
8483 * regcache.h (register_dump): Moved from regcache.c.
8485 2018-02-21 Yao Qi <yao.qi@linaro.org>
8487 * regcache.c (regcache::regcache): Update.
8488 (regcache::invalidate): Move it to detached_regcache::invalidate.
8489 (get_thread_arch_aspace_regcache): Update.
8490 (regcache::raw_update): Update.
8491 (regcache::cooked_read): Remove some code.
8492 (regcache::cooked_read_value): Likewise.
8493 (regcache::raw_write): Remove assert on m_readonly_p.
8494 (regcache::raw_supply_integer): Move it to
8495 detached_regcache::raw_supply_integer.
8496 (regcache::raw_supply_zeroed): Likewise.
8497 * regcache.h (detached_regcache) <raw_supply_integer>: New
8499 <raw_supply_zeroed, invalidate>: Likewise.
8500 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8501 <invalidate>: Likewise.
8502 <m_readonly_p>: Removed.
8504 2018-02-21 Yao Qi <yao.qi@linaro.org>
8506 * infcmd.c (get_return_value): Let stop_regs point to
8507 get_current_regcache.
8508 * regcache.c (regcache::regcache): Remove.
8509 (register_dump_reg_buffer): New class.
8510 (regcache_print): Adjust.
8511 * regcache.h (regcache): Remove constructors.
8513 2018-02-21 Yao Qi <yao.qi@linaro.org>
8515 * regcache.c (class register_dump): New class.
8516 (register_dump_regcache, register_dump_none): New class.
8517 (register_dump_remote, register_dump_groups): New class.
8518 (regcache_print): Update.
8519 * regcache.h (regcache_dump_what): Move it to regcache.c.
8520 (regcache) <dump>: Remove.
8522 2018-02-21 Yao Qi <yao.qi@linaro.org>
8524 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8526 (jit_unwind_reg_set_impl): Call raw_supply.
8527 (jit_frame_sniffer): Use reg_buffer_rw.
8528 * record-full.c (record_full_core_regbuf): Change its type.
8529 (record_full_core_open_1): Use reg_buffer_rw.
8530 (record_full_close): Likewise.
8531 (record_full_core_fetch_registers): Use regcache->raw_supply.
8532 (record_full_core_store_registers): Likewise.
8533 * regcache.c (regcache::get_register_status): Move it to
8535 (regcache_raw_set_cached_value): Remove.
8536 (regcache::raw_set_cached_value): Remove.
8537 (regcache::raw_write): Call raw_supply.
8538 (regcache::raw_supply): Move it to reg_buffer_rw.
8539 * regcache.h (regcache_raw_set_cached_value): Remove.
8540 (reg_buffer_rw): New class.
8542 2018-02-21 Yao Qi <yao.qi@linaro.org>
8544 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8545 readonly_detached_regcache.
8546 (dummy_frame_prev_register): Use regcache->cooked_read.
8547 * frame.c (frame_save_as_regcache): Change return type.
8548 (frame_pop): Update.
8549 * frame.h (frame_save_as_regcache): Update declaration.
8550 * inferior.h (get_infcall_suspend_state_regcache): Update
8552 * infrun.c (infcall_suspend_state) <registers>: use
8553 readonly_detached_regcache.
8554 (save_infcall_suspend_state): Don't use regcache_dup.
8555 (get_infcall_suspend_state_regcache): Change return type.
8556 * linux-fork.c (struct fork_info) <savedregs>: Change to
8557 readonly_detached_regcache.
8559 (fork_save_infrun_state): Don't use regcache_dup.
8560 (info_checkpoints_command): Adjust.
8561 * mi/mi-main.c (register_changed_p): Update declaration.
8562 (mi_cmd_data_list_changed_registers): Use
8563 readonly_detached_regcache.
8564 (register_changed_p): Change parameter type to
8565 readonly_detached_regcache.
8566 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8567 readonly_detached_regcache.
8568 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8569 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8571 (regcache::save): Move it to reg_buffer.
8572 (regcache::restore): Change parameter type.
8573 (regcache_dup): Remove.
8574 * regcache.h (reg_buffer) <save>: New method.
8575 (readonly_detached_regcache): New class.
8576 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8577 readonly_detached_regcache.
8578 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8580 2018-02-21 Yao Qi <yao.qi@linaro.org>
8582 * frame.c (frame_save_as_regcache): Use regcache method save.
8583 (frame_pop): Use regcache method restore.
8584 * infrun.c (restore_infcall_suspend_state): Likewise.
8585 * linux-fork.c (fork_load_infrun_state): Likewise.
8586 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8588 * regcache.c (regcache_save): Remove.
8589 (regcache::restore): More asserts.
8590 (regcache_cpy): Remove.
8591 * regcache.h (regcache_save): Remove the declaration.
8592 (regcache::restore): Move from private to public.
8593 Remove the friend declaration of regcache_cpy.
8594 (regcache_cpy): Remove declaration.
8596 2018-02-21 Yao Qi <yao.qi@linaro.org>
8598 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8599 parameter type to 'readable_regcache *'.
8600 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8601 * arm-tdep.c (arm_neon_quad_read): Likewise.
8602 (arm_pseudo_read): Likewise.
8603 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8604 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8605 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8606 * gdbarch.c: Re-generated.
8607 * gdbarch.h: Re-generated.
8608 * gdbarch.sh (pseudo_register_read): Change parameter type to
8609 'readable_regcache *'.
8610 (pseudo_register_read_value): Likewise.
8611 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8612 (h8300_pseudo_register_read): Likewise.
8613 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8614 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8615 (i386_pseudo_register_read_into_value): Likewise.
8616 (i386_pseudo_register_read_value): Likewise.
8617 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8619 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8620 * m32c-tdep.c (m32c_raw_read): Likewise.
8621 (m32c_read_flg): Likewise.
8622 (m32c_banked_register): Likewise.
8623 (m32c_banked_read): Likewise.
8624 (m32c_sb_read): Likewise.
8625 (m32c_part_read): Likewise.
8626 (m32c_cat_read): Likewise.
8627 (m32c_r3r2r1r0_read): Likewise.
8628 (m32c_pseudo_register_read): Likewise.
8629 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8630 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8631 (mep_pseudo_cr64_read): Likewise.
8632 (mep_pseudo_register_read): Likewise.
8633 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8634 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8635 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8636 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8637 (regcache::cooked_read): Likewise.
8638 (regcache::cooked_read_value): Likewise.
8639 (regcache_cooked_read_signed):
8640 (regcache::cooked_read): Likewise.
8641 * regcache.h (readable_regcache): New class.
8642 (regcache): Inherit readable_regcache. Move some methods to
8644 * rl78-tdep.c (rl78_pseudo_register_read): Change
8645 parameter type to 'readable_regcache *'.
8646 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8647 (e500_pseudo_register_read): Change parameter type to
8648 'readable_regcache *'.
8649 (dfp_pseudo_register_read): Likewise.
8650 (vsx_pseudo_register_read): Likewise.
8651 (efpr_pseudo_register_read): Likewise.
8652 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8653 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8654 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8655 (sh64_pseudo_register_read): Likewise.
8656 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8657 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8658 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8659 (spu_pseudo_register_read): Likewise.
8660 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8661 (xtensa_pseudo_register_read): Likewise.
8663 2018-02-21 Yao Qi <yao.qi@linaro.org>
8665 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8666 (regcache::arch): Move it to reg_buffer::arch.
8667 (regcache::register_buffer): Likewise.
8668 (regcache::assert_regnum): Likewise.
8669 (regcache::num_raw_registers): Likewise.
8670 * regcache.h (reg_buffer): New class.
8671 (regcache): Inherit reg_buffer.
8673 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8675 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8676 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8678 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8680 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8682 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8684 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8685 (SFILES): Remove common/*.c files.
8686 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8687 * common/common.host: Add common reference.
8688 * configure.ac: Likewise.
8689 * configure: Regenerate.
8691 2018-02-16 Yao Qi <yao.qi@linaro.org>
8693 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8694 (block_initialize_namespace): Use new.
8695 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8696 (dwarf2_free_objfile): Use delete.
8697 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8698 (copy_type_recursive): Use new.
8699 * gdb_obstack.h (allocate_on_obstack): New.
8701 2018-02-15 Yao Qi <yao.qi@linaro.org>
8704 * inferior.c (exit_inferior_1): Reset inf->control.
8706 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8708 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8711 2018-02-14 Pedro Alves <palves@redhat.com>
8713 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8714 frame_cleanup_after_sniffer on exception.
8716 2018-02-14 Tom Tromey <tom@tromey.com>
8718 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8720 (solib_bfd_open): Make pathname const.
8721 * solib.c (solib_bfd_open): Make pathname const.
8722 * solib-spu.c (spu_bfd_fopen): Make name const.
8723 (spu_bfd_open): Make pathname const.
8724 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8725 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8727 2018-02-14 Tom Tromey <tom@tromey.com>
8729 * symfile.c (symfile_bfd_open): Update.
8730 * source.h (openp, source_full_path_of, find_and_open_source):
8731 Change argument type to unique_xmalloc_ptr.
8732 * source.c (openp): Take a unique_xmalloc_ptr.
8733 (source_full_path_of, find_and_open_source): Likewise.
8734 (open_source_file, symtab_to_fullname): Update.
8735 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8737 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8738 (exec_file_find): Update.
8739 * psymtab.c (psymtab_to_fullname): Update.
8740 * nto-tdep.h (nto_find_and_open_solib): Update.
8741 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8743 * exec.c (exec_file_attach): Update.
8744 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8745 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8747 2018-02-14 Tom Tromey <tom@tromey.com>
8749 * solib.c: Include source.h.
8750 * nto-tdep.c: Include source.h.
8751 * mi/mi-cmd-env.c: Include source.h.
8752 * infcmd.c: Include source.h.
8753 * exec.c: Include source.h.
8754 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8755 (add_path, directory_switch, source_path, init_source_path): Move
8757 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8758 (add_path, directory_switch, source_path, init_source_path):
8761 2018-02-14 Tom Tromey <tom@tromey.com>
8763 * solist.h (exec_file_find, solib_find): Return
8765 (solib_bfd_fopen): Take a const char *.
8766 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8767 (exec_file_find, solib_find): Likewise.
8768 (solib_bfd_fopen): Do not take ownership of "pathname".
8769 (solib_bfd_open): Use unique_xmalloc_ptr.
8770 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8771 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8772 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8773 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8775 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8777 * ada-lang.c (name_match_type_from_name): Remove reference to
8778 ada_name_for_lookup in function's documentation.
8779 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8781 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8783 * defs.h (enum openp_flags): New enum.
8784 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8785 Move to enum openp_flags.
8786 (openp_flags): New enum flags.
8787 (openp): Change parameter type to openp_flags.
8788 * source.c (openp): Change parameter type to openp_flags.
8789 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8790 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8792 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8794 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8797 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8799 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8801 (class dwarf2_queue_guard): ...the destructor of this new class.
8802 (dw2_do_instantiate_symtab): Create instance of the new class
8803 dwarf2_queue_guard, remove cleanup.
8805 2018-02-09 Tom Tromey <tom@tromey.com>
8807 * source.c (find_source_lines): Don't reference past the end of
8810 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8812 * remote.c (remote_btrace_maybe_reopen): Change error message.
8813 * btrace.c (btrace_enable): Likewise.
8814 (parse_xml_btrace): Likewise.
8815 (parse_xml_btrace_conf): Likewise.
8817 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8819 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8820 (linux_enable_pt, linux_enable_bts): Call
8821 diagnose_perf_event_open_fail.
8823 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8825 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8826 Remove parameter and change return type. Update callers. Move it.
8827 (linux_enable_bts, linux_enable_pt): Improve error message.
8828 (linux_enable_pt): Remove zero buffer size check.
8829 (linux_enable_btrace): Improve error messages. Remove NULL return
8832 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8834 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8835 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8836 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8837 (linux_supports_pt, linux_supports_btrace): Remove.
8838 (linux_enable_bts): Call cpu_supports_bts.
8839 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8840 * remote.c (remote_supports_btrace): Remove.
8841 (init_remote_ops): Remove remote_supports_btrace.
8842 * target-delegates.c: Regenerated.
8843 * target.c (target_supports_btrace): Remove.
8844 * target.h (target_ops) <to_supports_btrace>: Remove
8845 (target_supports_btrace): Remove.
8846 * x86-linux-nat.c (x86_linux_create_target): Remove
8847 linux_supports_btrace.
8849 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8851 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8853 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8854 exception and use message in own exception.
8856 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8858 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8859 (perf_event_pt_event_type): Use gdb_file_up.
8860 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8861 scoped_fd, and scoped_mmap.
8863 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8865 * common/scoped_mmap.h: New.
8866 * unittests/scoped_mmap-selftest.c: New.
8867 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8868 unittests/scoped_mmap-selftest.c.
8870 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8872 * common/scoped_fd.h: New.
8873 * unittests/scoped_fd-selftest.c: New.
8874 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8875 unittests/scoped_fd-selftest.c.
8877 2018-02-09 Tom Tromey <tom@tromey.com>
8879 * auto-load.c (auto_load_section_scripts): Use
8880 gdb::unique_xmalloc_ptr.
8882 2018-02-09 Tom Tromey <tom@tromey.com>
8884 * auto-load.c (execute_script_contents): Use std::string.
8886 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8888 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8889 Python function, rather than a new command.
8891 2018-02-08 Tom Tromey <tom@tromey.com>
8893 * solib.c (solib_find_1): Use std::string.
8894 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8896 2018-02-08 Tom Tromey <tom@tromey.com>
8898 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8900 2018-02-08 Tom Tromey <tom@tromey.com>
8902 * source.c (find_source_lines): Use gdb::def_vector.
8904 2018-02-08 Tom Tromey <tom@tromey.com>
8906 * macrocmd.c (struct temporary_macro_definition): New.
8907 (macro_define_command): Use temporary_macro_definition. Remove
8909 (free_macro_definition_ptr): Remove.
8911 2018-02-08 Tom Tromey <tom@tromey.com>
8913 * macroexp.c (maybe_expand): Use std::string.
8915 2018-02-08 Tom Tromey <tom@tromey.com>
8917 * macroexp.c (struct macro_buffer): Add initializers for some
8919 (init_buffer, init_shared_buffer, free_buffer)
8920 (free_buffer_return_text): Remove.
8921 (macro_buffer): New constructors.
8922 (~macro_buffer): New destructor.
8923 (macro_buffer::set_shared): New method.
8924 (macro_buffer::resize_buffer, macro_buffer::appendc)
8925 (macro_buffer::appendmem): Now methods, not free functions.
8926 (set_token, append_tokens_without_splicing, stringify)
8927 (macro_stringify): Update.
8928 (gather_arguments): Change return type. Remove argc_p argument,
8929 add args_ptr argument. Use std::vector.
8930 (substitute_args): Remove argc argument. Accept std::vector.
8931 (expand): Update. Use std::vector.
8932 (scan, macro_expand, macro_expand_next): Update.
8934 2018-02-08 Tom Tromey <tom@tromey.com>
8936 * symtab.c (default_collect_symbol_completion_matches_break_on):
8937 Use unique_xmalloc_ptr.
8938 * macroscope.h: (sal_macro_scope, user_macro_scope)
8939 (default_macro_scope): Return unique_xmalloc_ptr.
8940 * macroscope.c (sal_macro_scope, user_macro_scope)
8941 (default_macro_scope): Return unique_xmalloc_ptr.
8942 * macroexp.h (macro_expand, macro_expand_once): Return
8944 * macroexp.c (macro_expand, macro_expand_once): Return
8946 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8947 (info_macro_command, info_macros_command): Use
8949 * compile/compile-c-support.c (write_macro_definitions): Use
8951 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8953 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8955 * value.c (value_static_field): Assign field type instead of
8956 containing type when returning an optimized out value.
8958 2018-02-06 Yao Qi <yao.qi@linaro.org>
8960 * ft32-tdep.c (ft32_read_pc): Remove.
8961 (ft32_write_pc): Remove.
8962 (ft32_gdbarch_init): Update.
8963 * m32r-tdep.c (m32r_read_pc): Remove.
8964 (m32r_gdbarch_init): Update.
8965 * mep-tdep.c (mep_read_pc): Remove.
8966 (mep_gdbarch_init): Update.
8967 * microblaze-tdep.c (microblaze_write_pc): Remove.
8968 (microblaze_gdbarch_init): Update.
8969 * mn10300-tdep.c (mn10300_read_pc): Remove.
8970 (mn10300_write_pc): Remove.
8971 (mn10300_gdbarch_init): Update.
8972 * moxie-tdep.c (moxie_read_pc): Remove.
8973 (moxie_write_pc): Remove.
8974 (moxie_gdbarch_init): Update.
8976 2018-02-06 Yao Qi <yao.qi@linaro.org>
8978 * expprint.c (print_subexp_standard): Handle
8979 OP_F77_UNDETERMINED_ARGLIST.
8980 (dump_subexp_body_standard): Likewise.
8982 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8984 * target-descriptions.c (tdesc_element_visitor) Add empty
8986 (tdesc_type): Move make_gdb_type from here.
8987 (tdesc_type_builtin): Likewise.
8988 (tdesc_type_vector): Likewise.
8989 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8990 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8991 (make_gdb_type_union): Likewise.
8992 (make_gdb_type_flags): Likewise.
8993 (make_gdb_type_enum): Likewise.
8994 (make_gdb_type): New function.
8995 (tdesc_register_type): Use static make_gdb_type.
8997 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8999 * infcmd.c (default_print_one_register_info): Align natural-format
9000 column values consistently one under another.
9001 (pad_to_column): New function.
9003 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9005 * dwarf2read.c (dwarf2_physname): Move commment.
9007 2018-02-01 Leszek Swirski <leszeks@google.com>
9009 * varobj.c (varobj_formatted_print_options): Allow recursive
9010 pretty printing if pretty printing is enabled.
9012 2018-02-01 Leszek Swirski <leszeks@google.com>
9014 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9015 names after a structop as a filename.
9017 2018-02-01 Yao Qi <yao.qi@linaro.org>
9019 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9020 (arm_record_coproc_data_proc): Likewise.
9022 2018-02-01 Yao Qi <yao.qi@linaro.org>
9024 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9026 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9028 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9029 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9031 2018-01-31 Pedro Alves <palves@redhat.com>
9033 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9034 * inflow.c (child_terminal_save_inferior): Wrap reference to
9035 tcgetpgrp in HAVE_TERMIOS_H.
9036 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9038 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9039 always iterate over all inferiors.
9040 (gdbsim_cntrl_c): Adjust.
9041 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9043 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9045 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9046 index type is objfile-owned if the element type is as well.
9048 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9052 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9054 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9055 "features/s390x-linux64.c".
9056 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9057 s390_linux32 and s390x_linux64.
9058 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9060 * s390-tdep.c: Include "features/s390-linux32.c" and
9061 "features/s390x-linux64.c".
9062 (s390_tdesc_valid): Add check for tdesc_has_registers.
9063 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9064 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9065 tdesc_s390x_linux64.
9066 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9067 tdesc_s390x_linux64 to...
9068 * s390-tdep.h: ...here.
9070 2018-01-30 Pedro Alves <palves@redhat.com>
9073 * config.in, configure: Regenerate.
9074 * configure.ac: Check for getpgid.
9075 * go32-nat.c (go32_pass_ctrlc): New.
9076 (go32_target): Install it.
9077 * inf-child.c (inf_child_target): Install
9078 child_terminal_save_inferior, child_pass_ctrlc and
9080 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9081 (inf_ptrace_target): No longer install it.
9082 * infcmd.c (interrupt_target_1): Adjust.
9083 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9084 (child_interrupt): Declare.
9085 (inferior::terminal_state): New.
9086 * inflow.c (struct terminal_info): Update comments.
9087 (inferior_process_group): Delete.
9088 (terminal_is_ours): Delete.
9089 (gdb_tty_state): New.
9090 (child_terminal_init): Adjust.
9091 (is_gdb_terminal, sharing_input_terminal_1)
9092 (sharing_input_terminal): New functions.
9093 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9094 Set the process's actual process group in the foreground if
9095 possible. Handle is_ours_for_output/is_ours distinction. Don't
9096 mark terminal as the inferior's if not sharing GDB's terminal.
9097 Don't check attach_flag.
9098 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9099 pass down a target_terminal_state.
9100 (child_terminal_save_inferior): New, factored out from ...
9101 (child_terminal_ours_1): ... this. Handle
9102 target_terminal_state::is_ours_for_output.
9103 (child_interrupt, child_pass_ctrlc): New.
9104 (inflow_inferior_exit): Clear the inferior's terminal_state.
9105 (copy_terminal_info): Copy the inferior's terminal state.
9106 (_initialize_inflow): Remove reference to terminal_is_ours.
9107 * inflow.h (inferior_process_group): Delete.
9108 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9109 * procfs.c (procfs_target): Don't install procfs_interrupt.
9110 (procfs_interrupt): Delete.
9111 * remote.c (remote_serial_quit_handler): Adjust.
9112 (remote_interrupt): Remove ptid parameter. Adjust.
9113 * target-delegates.c: Regenerate.
9114 * target.c: Include "terminal.h".
9115 (target_terminal::terminal_state): Rename to ...
9116 (target_terminal::m_terminal_state): ... this.
9117 (target_terminal::init): Adjust.
9118 (target_terminal::inferior): Adjust to per-inferior
9120 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9121 (target_terminal::ours, target_terminal::ours_for_output): Use
9122 target_terminal_is_ours_kind.
9123 (target_interrupt): Remove ptid parameter. Adjust.
9124 (default_target_pass_ctrlc): Adjust.
9125 * target.h (target_ops::to_terminal_save_inferior): New field.
9126 (target_ops::to_interrupt): Remove ptid_t parameter.
9127 (target_interrupt): Remove ptid_t parameter. Update comment.
9128 (target_pass_ctrlc): Update comment.
9129 * target/target.h (target_terminal_state): New scoped enum,
9131 (target_terminal::terminal_state): ... here.
9132 (target_terminal::inferior): Update comments.
9133 (target_terminal::restore_inferior): New.
9134 (target_terminal::is_inferior, target_terminal::is_ours)
9135 (target_terminal::is_ours_for_output): Adjust.
9136 (target_terminal::scoped_restore_terminal_state): Adjust to
9137 rename, and call restore_inferior() instead of inferior().
9138 (target_terminal::scoped_restore_terminal_state::m_state): Change
9140 (target_terminal::terminal_state): Rename to ...
9141 (target_terminal::m_terminal_state): ... this and change type.
9143 2018-01-30 Pedro Alves <palves@redhat.com>
9145 * linux-nat.c (wait_for_signal): New function.
9146 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9148 (async_terminal_is_ours)
9149 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9150 (linux_nat_add_target): Don't override
9151 to_terminal_inferior/to_terminal_ours.
9153 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9155 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9157 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9159 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9160 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9161 dwarf2_per_objfile_free here.
9162 (dwarf2_per_objfile_free): Remove.
9163 (_initialize_dwarf2_read): Don't register
9164 dwarf2_per_objfile_free as a registry cleanup.
9166 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9168 Avoid compilation errors in MinGW native builds
9170 The error is triggered by including python-internal.h, and the
9173 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9174 from build-gnulib/import/math.h:27,
9175 from d:/usr/Python26/include/pyport.h:235,
9176 from d:/usr/Python26/include/Python.h:58,
9177 from python/python-internal.h:94,
9178 from python/py-arch.c:24:
9179 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9183 This happens because Python headers define 'hypot' to expand t
9184 '_hypot' in the Windows builds.
9185 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9186 'hypoth'. This avoids a compilation error.
9188 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9190 * MAINTAINERS (Write After Approval): Fix ordering.
9192 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9194 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9196 2018-01-26 Alan Modra <amodra@gmail.com>
9198 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9199 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9200 Remove nop. Make const. Comment.
9201 (powerpc32_plt_stub_so_2): New.
9202 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9203 Correct count. Update uses.
9204 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9205 Move common code reading PLT entry word. Correct
9206 powerpc32_plt_stub PLT address calculation.
9207 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9208 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9209 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9210 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9211 (ppc64_standard_linkage8): Likewise.
9212 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9213 Correct insns description.
9214 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9216 2018-01-24 Pedro Alves <palves@redhat.com>
9218 GCC PR libstdc++/83906
9219 * gdbtypes.c (operator==(const dynamic_prop &,
9220 const dynamic_prop &)): New.
9221 (operator==(const range_bounds &, const range_bounds &)): New.
9222 (check_types_equal): Use them instead of memcmp.
9223 * gdbtypes.h (operator==(const dynamic_prop &,
9224 const dynamic_prop &)): Declare.
9225 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9226 (operator==(const range_bounds &, const range_bounds &)): Declare.
9227 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9229 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9231 * s390-linux-tdep.c (s390_record_address_mask)
9232 (s390_record_calc_disp_common, s390_record_calc_disp)
9233 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9234 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9235 (s390_process_record): Move to s390-tdep.c.
9236 (s390_linux_init_abi_any): Adjust.
9237 * s390-tdep.c (s390_record_address_mask)
9238 (s390_record_calc_disp_common, s390_record_calc_disp)
9239 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9240 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9241 (s390_process_record): Moved from s390-linux-tdep.c
9242 (s390_gdbarch_init): Adjust.
9244 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9246 * s390-linux-nat.c (s390-tdep.h): New include.
9247 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9248 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9249 (ALLDEPFILES): Add s390-tdep.c.
9250 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9251 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9252 * s390-tdep.h: ...this. New file.
9253 * s390-linux-tdep.c (s390-tdep.h): New include.
9254 (_initialize_s390_tdep): Rename to...
9255 (_initialize_s390_linux_tdep): ...this and adjust.
9256 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9257 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9259 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9260 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9261 (s390_is_partial_instruction, s390_software_single_step)
9262 (is_non_branch_ril, s390_displaced_step_copy_insn)
9263 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9264 (s390_prologue_data, s390_addr, s390_store, s390_load)
9265 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9266 (s390_register_call_saved, s390_guess_tracepoint_registers)
9267 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9268 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9269 (s390_pseudo_register_name, s390_pseudo_register_type)
9270 (s390_pseudo_register_read, s390_pseudo_register_write)
9271 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9272 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9273 (s390_addr_bits_remove, s390_address_class_type_flags)
9274 (s390_address_class_type_flags_to_name)
9275 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9276 (s390_function_arg_float, s390_function_arg_vector)
9277 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9278 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9279 (s390_frame_align, s390_register_return_value, s390_return_value)
9280 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9281 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9282 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9283 (s390_trad_frame_prev_register, s390_unwind_cache)
9284 (s390_prologue_frame_unwind_cache)
9285 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9286 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9287 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9288 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9289 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9290 (s390_frame_base_address, s390_local_base_address)
9291 (s390_frame_base, s390_gcc_target_options)
9292 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9293 (s390_validate_reg_range, s390_tdesc_valid)
9294 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9295 * s390-tdep.c: ...this. New file.
9297 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9299 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9300 (s390_process_record, s390_gdbarch_tdep_alloc)
9301 (s390_linux_init_abi_any): Use/set new hook.
9303 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9305 * s390-linux-tdep.c (osabi.h): New include.
9306 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9307 (s390_linux_init_abi_any): New functions.
9308 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9310 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9312 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9313 tdesc_has_registers check
9315 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9317 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9318 (s390_validate_reg_range): New macro.
9319 (s390_gdbarch_init): Adjust.
9321 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9323 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9324 (s390_gdbarch_tdep_alloc): Adjust.
9325 (s390_gdbarch_init): Adjust.
9327 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9329 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9330 <have_tdb>: Change type to bool.
9331 (s390_gdbarch_tdep_alloc): Adjust.
9332 (s390_gdbarch_init): Adjust.
9334 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9336 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9337 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9338 (s390_gdbarch_tdep_alloc): New function.
9339 (s390_gdbarch_init): Allocate tdep at start and use its fields
9340 instead of separate variables.
9342 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9344 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9345 when looking for cached gdbarch and add comment for remaining.
9347 2018-01-22 Pedro Alves <palves@redhat.com>
9348 Sergio Durigan Junior <sergiodj@redhat.com>
9350 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9353 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9355 * MAINTAINERS: Update my company e-mail address.
9357 2018-01-22 Yao Qi <yao.qi@linaro.org>
9359 * regcache.c (cooked_write_test): New function.
9360 (_initialize_regcache): Register the test.
9362 2018-01-22 Yao Qi <yao.qi@linaro.org>
9364 * ia64-tdep.c (ia64_pseudo_register_read): Call
9365 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9366 * m32c-tdep.c (m32c_cat_read): Likewise.
9367 (m32c_r3r2r1r0_read): Likewise.
9368 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9369 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9371 2018-01-22 Yao Qi <yao.qi@linaro.org>
9373 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9374 method raw_read instead of regcache_raw_read.
9375 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9376 * arm-tdep.c (arm_neon_quad_read): Likewise.
9377 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9378 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9379 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9380 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9381 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9382 (i386_pseudo_register_read_into_value): Likewise.
9383 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9384 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9385 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9386 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9387 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9388 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9389 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9390 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9391 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9393 2018-01-22 Yao Qi <yao.qi@linaro.org>
9395 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9396 * configure.tgt: Remove target mt.
9397 * mt-tdep.c: Remove.
9398 * regcache.c (cooked_read_test): Remove the check for mt.
9400 2018-01-22 Yao Qi <yao.qi@linaro.org>
9402 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9403 instead of gdbarch_pseudo_register_read_value.
9405 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9407 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9410 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9412 * linespec.c (create_sals_line_offset): Remove code that preserved
9413 the symtab_and_line's line number.
9415 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9417 * varobj.c (varobj_create): Don't set valid_block when creating a
9420 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9422 * varobj.c (varobj_create): Remove out of date comment.
9424 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9427 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9428 updating innermost block.
9429 * parse.c (innermost_block_tracker::update): Take extra type
9430 parameter, and check types match before updating innermost block.
9431 (write_dollar_variable): Update innermost block for registers.
9432 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9433 (innermost_block_tracker::innermost_block_tracker): Initialise
9435 (innermost_block_tracker::reset): Take type parameter.
9436 (innermost_block_tracker::update): Take type parameter, and pass
9437 type through as needed.
9438 (innermost_block_tracker::m_types): New member.
9439 * varobj.c (varobj_create): Pass type when reseting innermost
9442 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9444 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9445 * ada-lang.c (resolve_subexp): Likewise.
9446 * breakpoint.c (set_breakpoint_condition) Likewise.
9447 (watch_command_1) Likewise.
9448 * c-exp.y (variable): Likewise.
9449 * d-exp.y (PrimaryExpression): Likewise.
9450 * f-exp.y (variable): Likewise.
9451 * go-exp.y (variable): Likewise.
9452 * m2-exp.y (variable): Likewise.
9453 * objfiles.c (objfile::~objfile): Likewise.
9454 * p-exp.y (variable): Likewise.
9455 * parse.c (innermost_block): Change type.
9456 * parser-defs.h (class innermost_block_tracker): New.
9457 (innermost_block): Change to innermost_block_tracker.
9458 * printcmd.c (display_command): Switch to innermost_block API.
9459 (do_one_display): Likewise.
9460 * rust-exp.y (do_one_display): Likewise.
9461 * symfile.c (clear_symtab_users): Likewise.
9462 * varobj.c (varobj_create): Switch to innermost_block API, replace
9463 use of innermost_block with block stored on varobj object.
9465 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9467 * expression.h (innermost_block): Remove declaration.
9468 * varobj.c: Add 'parser-defs.h' include.
9470 2018-01-19 Tom Tromey <tom@tromey.com>
9472 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9473 symbols in the static and global blocks.
9475 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9477 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9478 gdb_ptrace.h, and move including gdb_wait.h ...
9479 * nat/linux-ptrace.h: ... to here.
9481 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9483 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9484 inf_ptrace_detach_success.
9485 (inf_ptrace_detach_success): Add inferior parameter, use it
9486 instead of inferior_ptid, pass it to detach_inferior.
9487 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9489 * inferior.c (detach_inferior): Add overload that takes an
9491 * inferior.h (detach_inferior): Likewise.
9492 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9493 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9494 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9496 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9498 * target.h (struct target_ops) <to_detach>: Add inferior
9500 (target_detach): Likewise.
9501 * target.c (dispose_inferior): Pass inferior down.
9502 (target_detach): Pass inferior down. Assert that it is equal to
9503 the current inferior.
9504 * aix-thread.c (aix_thread_detach): Pass inferior down.
9505 * corefile.c (core_file_command): Pass current_inferior() down.
9506 * corelow.c (core_detach): Add inferior parameter.
9507 * darwin-nat.c (darwin_detach): Likewise.
9508 * gnu-nat.c (gnu_detach): Likewise.
9509 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9510 * infcmd.c (detach_command): Pass current_inferior() down to
9512 * infrun.c (follow_fork_inferior): Pass parent_inf to
9514 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9516 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9517 * linux-thread-db.c (thread_db_detach): Likewise.
9518 * nto-procfs.c (procfs_detach): Likewise.
9519 * procfs.c (procfs_detach): Likewise.
9520 * record.c (record_detach): Likewise.
9521 * record.h (struct inferior): Forward-declare.
9522 (record_detach): Add inferior parameter.
9523 * remote-sim.c (gdbsim_detach): Likewise.
9524 * remote.c (remote_detach_1): Likewise.
9525 (remote_detach): Likewise.
9526 (extended_remote_detach): Likewise.
9527 * sol-thread.c (sol_thread_detach): Likewise.
9528 * target-debug.h (target_debug_print_inferior_p): New macro.
9529 * target-delegates.c: Re-generate.
9530 * top.c (kill_or_detach): Pass inferior down to target_detach.
9531 * windows-nat.c (windows_detach): Add inferior parameter.
9533 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9535 * target.h (struct target_ops) <to_detach>: Remove args
9537 (target_detach): Likewise.
9538 * target.c (dispose_inferior): Adjust.
9539 (target_detach): Remove args parameter, adjust.
9540 * aix-thread.c (aix_thread_detach): Adjust.
9541 * corefile.c (core_file_command): Adjust.
9542 * corelow.c (core_detach): Adjust.
9543 * darwin-nat.c (darwin_detach): Adjust.
9544 * gnu-nat.c (gnu_detach): Adjust.
9545 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9546 * infcmd.c (detach_command): Adjust
9547 * infrun.c (follow_fork_inferior): Adjust.
9548 (handle_vfork_child_exec_or_exit): Adjust.
9549 * linux-fork.c (linux_fork_detach): Remove args parameter.
9550 * linux-fork.h (linux_fork_detach): Likewise.
9551 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9552 * linux-thread-db.c (thread_db_detach): Likewise.
9553 * nto-procfs.c (procfs_detach): Likewise.
9554 * procfs.c (procfs_detach): Likewise.
9555 (do_detach): Remove signo parameter.
9556 * record.c (record_detach): Remove args parameter.
9557 * record.h (record_detach): Likewise.
9558 * remote-sim.c (gdbsim_detach): Likewise.
9559 * remote.c (remote_detach_1): Likewise.
9560 (remote_detach): Likewise.
9561 (extended_remote_detach): Likewise.
9562 * sol-thread.c (sol_thread_detach): Likewise.
9563 * target-delegates.c: Re-generate.
9564 * top.c (struct qt_args) <args>: Remove field.
9565 (kill_or_detach): Don't pass args.
9566 (quit_force): Don't set args.
9567 * windows-nat.c (windows_detach): Remove args parameter.
9569 2018-01-19 Yao Qi <yao.qi@linaro.org>
9571 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9572 (arm_linux_init_abi): Install it.
9574 2018-01-19 Yao Qi <yao.qi@linaro.org>
9576 * osabi.c (gdb_osabi_names): Extend the regexp for
9577 arm-linux-gnueabihf.
9579 2018-01-18 Yao Qi <yao.qi@linaro.org>
9581 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9583 (abbrev_table::add_abbrev): Update.
9584 (abbrev_table::lookup_abbrev): Update.
9586 2018-01-18 Yao Qi <yao.qi@linaro.org>
9588 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9590 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9592 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9595 2018-01-17 Tom Tromey <tom@tromey.com>
9597 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9599 2018-01-17 Tom Tromey <tom@tromey.com>
9601 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9602 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9603 (create_array_type_with_stride): Update.
9604 * dwarf2read.c (set_die_type): Update.
9606 2018-01-17 Tom Tromey <tom@tromey.com>
9608 * dwarf2read.c (delayed_method_info): Remove typedef.
9609 (dwarf2_cu::method_info): Now a std::vector.
9610 (add_to_method_list): Update.
9611 (free_delayed_list): Remove.
9612 (compute_delayed_physnames): Update.
9613 (process_full_comp_unit, process_full_type_unit): Clear the method
9614 list. Remove cleanups.
9615 (psymtab_include_file_name): Add name_holder parameter. Use
9617 (dwarf_decode_lines): Update.
9619 2018-01-17 Tom Tromey <tom@tromey.com>
9620 Simon Marchi <simon.marchi@ericsson.com>
9622 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9623 (dwarf2_per_objfile::free_cached_comp_units)
9624 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9625 (init_cutu_and_read_dies_no_follow): Update.
9626 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9627 (dwarf2_cu::~dwarf2_cu): New.
9628 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9629 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9631 2018-01-17 Tom Tromey <tom@tromey.com>
9632 Simon Marchi <simon.marchi@ericsson.com>
9634 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9635 (struct die_reader_specs) <abbrev_table>: New member.
9636 (struct abbrev_table): Add constructor.
9637 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9638 <abbrev_obstack>: Now an auto_obstack.
9639 (abbrev_table_up): New typedef.
9640 (init_cu_die_reader): Add abbrev_table parameter.
9641 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9642 Add result_dwo_abbrev_table.
9643 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9644 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9646 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9648 (skip_children): Update.
9649 (abbrev_table::alloc_abbrev): Rename from
9650 abbrev_table_alloc_abbrev.
9651 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9652 (abbrev_table::lookup_abbrev): Rename from
9653 abbrev_table_lookup_abbrev.
9654 (abbrev_table_read_table): Return abbrev_table_up.
9655 (abbrev_table_free, abbrev_table_free_cleanup)
9656 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9657 (load_partial_dies): Update.
9659 2018-01-17 Tom Tromey <tom@tromey.com>
9661 * dwarf2read.c (dwarf2_compute_name): Update comment.
9662 (read_func_scope, read_variable): Update.
9663 (new_symbol): Remove.
9664 (new_symbol_full): Rename to new_symbol.
9666 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9669 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9670 a warning instead of throwing an error, set section size to 0 and return
9672 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9674 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9676 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9678 (linux_ptrace_attach_fail_reason_string): Likewise.
9679 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9681 (linux_ptrace_attach_fail_reason_string): Likewise.
9682 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9684 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9686 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9688 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9691 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9692 checking for fs_base/gs_base fields in struct user_regs_struct.
9693 * configure: Regenerate.
9695 2018-01-17 Yao Qi <yao.qi@linaro.org>
9697 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9699 (aarch64_linux_init_abi): Install it to gdbarch hook
9702 2018-01-15 Pedro Alves <palves@redhat.com>
9704 * common/signals-state-save-restore.c
9705 (save_original_signals_state): Fix typos.
9707 2017-01-12 Tom Tromey <tom@tromey.com>
9708 Sergio Durigan Junior <sergiodj@redhat.com>
9710 * Makefile.in (install-only): Install gdb-add-index.
9712 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9714 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9716 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9718 * infrun.c (keep_going_pass_signal): Clear step-over info when
9719 insert_breakpoints fails.
9721 2018-01-11 Pedro Alves <palves@redhat.com>
9724 * infrun.c (resume): Rename to ...
9725 (resume_1): ... this.
9726 (resume): Reimplement as wrapper around resume_1.
9728 2018-01-11 Pedro Alves <palves@redhat.com>
9731 * remote.c (remote_parse_stop_reply): Default to the last-set
9732 general thread instead of to 'magic_null_ptid'.
9734 2018-01-10 Pedro Alves <palves@redhat.com>
9736 * language.h (language_get_symbol_name_matcher): Rename ...
9737 (get_symbol_name_matcher): ... this.
9738 * language.c (language_get_symbol_name_matcher): Ditto.
9739 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9742 2018-01-10 Pedro Alves <palves@redhat.com>
9746 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9747 Adjust to use language_get_symbol_name_matcher instead of
9748 language_defn::la_get_symbol_name_matcher.
9749 * language.c (language_get_symbol_name_matcher): If in Ada mode
9750 and the lookup name is a verbatim match, return Ada's matcher.
9751 * language.h (language_get_symbol_name_matcher): Adjust comment.
9752 (ada_lookup_name_info::verbatim_p):: New method.
9754 2018-01-10 Pedro Alves <palves@redhat.com>
9757 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9758 minsym's language is language_auto or language_cplus, pass down
9759 language_ada instead.
9760 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9762 2018-01-10 Pedro Alves <palves@redhat.com>
9765 * minsyms.c (linkage_name_str): New function.
9766 (iterate_over_minimal_symbols): Use it.
9768 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9770 * NEWS: Document that 'info proc' now works on FreeBSD.
9772 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9774 * configure.ac: Check for kinfo_getfile in libutil.
9775 * configure: Regenerate.
9776 * config.in: Regenerate.
9777 * fbsd-nat.c: Include "fbsd-tdep.h".
9778 (fbsd_fetch_cmdline): New.
9779 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9780 rather than calling error.
9781 (fbsd_info_proc): New.
9782 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9783 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9784 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9786 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9788 * fbsd-nat.c (struct free_deleter): Remove.
9789 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9791 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9793 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9794 NULL for an empty pathname.
9796 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9798 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9799 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9800 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9801 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9802 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9803 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9804 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9805 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9806 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9807 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9808 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9809 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9810 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9811 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9812 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9814 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9816 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9817 (gnu_xfer_auxv): New function.
9818 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9821 2018-01-08 Yao Qi <yao.qi@linaro.org>
9822 Simon Marchi <simon.marchi@ericsson.com>
9824 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9826 (COMMON_OBS): Remove selftest.o.
9827 * configure.ac: Append selftest-arch.c and common/selftest.c to
9828 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9829 * configure: Re-generated.
9830 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9832 (maintenance_info_selftests): Likewise.
9834 2018-01-08 Xavier Roirand <roirand@adacore.com>
9836 * ada-valprint.c (val_print_packed_array_elements): Use
9837 proper number of elements when printing an array indexed
9838 by an enumeration type.
9840 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9842 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9843 (dw2_get_file_names_reader): Adjust.
9844 (lookup_dwo_signatured_type): Adjust.
9845 (lookup_dwp_signatured_type): Adjust.
9846 (lookup_signatured_type): Adjust.
9847 (create_type_unit_group): Adjust.
9848 (get_type_unit_group): Adjust.
9849 (process_psymtab_comp_unit_reader): Adjust.
9850 (build_type_psymtabs_reader): Adjust.
9851 (scan_partial_symbols): Adjust.
9852 (add_partial_symbol): Adjust.
9853 (add_partial_subprogram): Adjust.
9854 (peek_die_abbrev): Adjust.
9855 (fixup_go_packaging): Adjust.
9856 (process_imported_unit_die): Adjust.
9857 (dwarf2_compute_name): Adjust.
9858 (dwarf2_physname): Adjust.
9859 (read_import_statement): Adjust.
9860 (handle_DW_AT_stmt_list): Adjust.
9861 (read_file_scope): Adjust.
9862 (read_func_scope): Adjust.
9863 (read_lexical_block_scope): Adjust.
9864 (read_call_site_scope): Adjust.
9865 (read_variable): Adjust.
9866 (dwarf2_rnglists_process): Adjust.
9867 (dwarf2_ranges_process): Adjust.
9868 (dwarf2_ranges_read): Adjust.
9869 (dwarf2_get_pc_bounds): Adjust.
9870 (dwarf2_record_block_ranges): Adjust.
9871 (dwarf2_add_field): Adjust.
9872 (dwarf2_add_member_fn): Adjust.
9873 (read_structure_type): Adjust.
9874 (process_structure_scope): Adjust.
9875 (read_enumeration_type): Adjust.
9876 (read_array_type): Adjust.
9877 (mark_common_block_symbol_computed): Adjust.
9878 (read_common_block): Adjust.
9879 (read_namespace_type): Adjust.
9880 (read_namespace): Adjust.
9881 (read_module_type): Adjust.
9882 (read_tag_pointer_type): Adjust.
9883 (read_tag_ptr_to_member_type): Adjust.
9884 (read_tag_string_type): Adjust.
9885 (read_subroutine_type): Adjust.
9886 (read_typedef): Adjust.
9887 (read_base_type): Adjust.
9888 (attr_to_dynamic_prop): Adjust.
9889 (read_subrange_type): Adjust.
9890 (read_unspecified_type): Adjust.
9891 (dwarf2_read_abbrevs): Adjust.
9892 (load_partial_dies): Adjust.
9893 (read_partial_die): Adjust.
9894 (find_partial_die): Adjust.
9895 (guess_partial_die_structure_name): Adjust.
9896 (fixup_partial_die): Adjust.
9897 (read_attribute_value): Adjust.
9898 (read_addr_index): Adjust.
9899 (read_addr_index_from_leb128): Adjust.
9900 (read_str_index): Adjust.
9901 (dwarf2_string_attr): Adjust.
9902 (get_debug_line_section): Adjust.
9903 (dwarf_decode_line_header): Adjust.
9904 (lnp_state_machine::check_line_address): Adjust.
9905 (dwarf_decode_lines_1): Adjust.
9906 (dwarf_decode_lines): Adjust.
9907 (dwarf2_start_symtab): Adjust.
9908 (var_decode_location): Adjust.
9909 (new_symbol_full): Adjust.
9910 (dwarf2_const_value_data): Adjust.
9911 (dwarf2_const_value_attr): Adjust.
9912 (dwarf2_const_value): Adjust.
9914 (die_containing_type): Adjust.
9915 (build_error_marker_type): Adjust.
9916 (lookup_die_type): Adjust.
9917 (guess_full_die_structure_name): Adjust.
9918 (anonymous_struct_prefix): Adjust.
9919 (determine_prefix): Adjust.
9920 (dwarf2_name): Adjust.
9921 (follow_die_ref_or_sig): Adjust.
9922 (follow_die_offset): Adjust.
9923 (follow_die_ref): Adjust.
9924 (follow_die_sig_1): Adjust.
9925 (follow_die_sig): Adjust.
9926 (get_signatured_type): Adjust.
9927 (get_DW_AT_signature_type): Adjust.
9928 (decode_locdesc): Adjust.
9929 (dwarf_decode_macros): Adjust.
9930 (cu_debug_loc_section): Adjust.
9931 (fill_in_loclist_baton): Adjust.
9932 (dwarf2_symbol_mark_computed): Adjust.
9933 (init_one_comp_unit): Don't assign
9934 dwarf2_cu::dwarf2_per_objfile.
9935 (set_die_type): Adjust.
9937 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9939 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9940 <dwarf2_per_objfile>: New field.
9941 (dwarf2_per_objfile): Remove global.
9942 (get_dwarf2_per_objfile): New function.
9943 (set_dwarf2_per_objfile): New function.
9944 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9946 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9947 (read_abbrev_offset): Likewise.
9948 (read_indirect_string): Likewise.
9949 (read_indirect_line_string): Likewise.
9950 (read_indirect_string_at_offset): Likewise.
9951 (read_indirect_string_from_dwz): Likewise.
9952 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9954 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9955 (create_all_comp_units): Change objfile parameter to
9957 (create_all_type_units): Likewise.
9958 (process_queue): Add dwarf2_per_objfile parameter.
9959 (read_and_check_comp_unit_head): Likewise.
9960 (lookup_dwo_unit_in_dwp): Likewise.
9961 (get_dwp_file): Likewise.
9962 (process_cu_includes): Likewise.
9963 (struct free_dwo_file_cleanup_data): New struct.
9964 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9965 set_dwarf2_per_objfile.
9966 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9967 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9968 context, adjust calls.
9969 (dw2_instantiate_symtab): Likewise.
9970 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9971 (dw2_get_cu): Likewise.
9972 (create_cu_from_index_list): Change objfile parameter to
9974 (create_cus_from_index_list): Get dwarf2_per_objfile from
9975 context, adjust calls.
9976 (create_cus_from_index): Likewise.
9977 (create_signatured_type_table_from_index): Change objfile
9978 parameter to dwarf2_per_objfile.
9979 (create_signatured_type_table_from_debug_names): Change objfile
9980 parameter to dwarf2_per_objfile.
9981 (create_addrmap_from_index): Likewise.
9982 (create_addrmap_from_aranges): Likewise.
9983 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9984 (dw2_setup): Remove.
9985 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9987 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9988 get_dwarf2_per_objfile.
9989 (dw2_forget_cached_source_info): Likewise.
9990 (dw2_map_symtabs_matching_filename): Likewise.
9991 (struct dw2_symtab_iterator) <index>: Remove.
9992 <dwarf2_per_objfile>: New field.
9993 (dw2_symtab_iter_init): Replace index parameter with
9995 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9996 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9997 (dw2_print_stats): Likewise.
9998 (dw2_dump): Likewise.
9999 (dw2_expand_symtabs_for_function): Likewise.
10000 (dw2_expand_all_symtabs): Likewise.
10001 (dw2_expand_symtabs_with_fullname): Likewise.
10002 (dw2_expand_marked_cus): Replace index and objfile parameters
10003 with dwarf2_per_objfile.
10004 (dw_expand_symtabs_matching_file_matcher): Add
10005 dwarf2_per_objfile parameter and adjust calls.
10006 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10008 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10009 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10011 (create_cus_from_debug_names_list): Replace objfile parameter
10012 with dwarf2_per_objfile and adjust calls.
10013 (create_cus_from_debug_names): Likewise.
10014 (dwarf2_read_debug_names): Likewise.
10015 (mapped_debug_names::namei_to_name): Adjust call.
10016 (dw2_debug_names_iterator::next): Likewise.
10017 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10018 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10019 (dw2_debug_names_dump): Likewise.
10020 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10021 (dw2_debug_names_expand_symtabs_matching): Likewise.
10022 (dwarf2_initialize_objfile): Likewise.
10023 (dwarf2_build_psymtabs): Likewise.
10024 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10026 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10027 (read_and_check_comp_unit_head): Likewise.
10028 (read_abbrev_offset): Likewise.
10029 (create_debug_type_hash_table): Likewise.
10030 (create_debug_types_hash_table): Likewise.
10031 (create_all_type_units): Replace objfile parameter with
10032 dwarf2_per_objfile.
10033 (add_type_unit): Add dwarf2_per_objfile parameter.
10034 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10035 with dwarf2_per_objfile.
10036 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10037 (lookup_dwp_signatured_type): Likewise.
10038 (lookup_signatured_type): Likewise.
10039 (read_cutu_die_from_dwo): Likewise.
10040 (init_tu_and_read_dwo_dies): Likewise.
10041 (init_cutu_and_read_dies): Likewise.
10042 (init_cutu_and_read_dies_no_follow): Likewise.
10043 (allocate_type_unit_groups_table): Add objfile parameter.
10044 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10045 (get_type_unit_group): Likewise.
10046 (process_psymtab_comp_unit): Update call.
10047 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10048 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10049 (print_tu_stats): Likewise.
10050 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10051 in void* parameter.
10052 (build_type_psymtabs): Change objfile parameter to
10053 dwarf2_per_objfile.
10054 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10055 passed in void* parameter.
10056 (process_skeletonless_type_units): Change objfile parameter to
10057 dwarf2_per_objfile.
10058 (set_partial_user): Likewise.
10059 (dwarf2_build_psymtabs_hard): Likewise.
10060 (read_comp_units_from_section): Likewise.
10061 (create_all_comp_units): Likewise.
10062 (scan_partial_symbols): Update calls.
10063 (add_partial_symbol): Likewise.
10064 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10065 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10066 (process_queue): Add dwarf2_per_objfile parameter.
10067 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10068 (compute_compunit_symtab_includes): Likewise.
10069 (process_cu_includes): Add dwarf2_per_objfile parameter.
10070 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10071 (process_full_type_unit): Likewise.
10072 (process_imported_unit_die): Update call.
10073 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10074 (read_file_scope): Likewise.
10075 (allocate_dwo_file_hash_table): Add objfile parameter.
10076 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10077 (create_cus_hash_table): Likewise.
10078 (create_dwp_hash_table): Likewise.
10079 (create_dwo_unit_in_dwp_v1): Likewise.
10080 (create_dwp_v2_section): Likewise.
10081 (create_dwo_unit_in_dwp_v2): Likewise.
10082 (lookup_dwo_unit_in_dwp): Likewise.
10083 (try_open_dwop_file): Likewise.
10084 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10085 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10086 cleanup to include a reference to dwarf2_per_objfile.
10087 (open_dwp_file): Add dwarf2_per_objfile parameter.
10088 (open_and_init_dwp_file): Likewise.
10089 (get_dwp_file): Likewise.
10090 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10091 (queue_and_load_all_dwo_tus): Update call.
10092 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10094 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10095 (dwarf2_ranges_process): Likewise.
10096 (dwarf2_get_pc_bounds): Likewise.
10097 (mark_common_block_symbol_computed): Likewise.
10098 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10099 (dwarf2_read_abbrevs): Update call.
10100 (read_partial_die): Use dwarf2_per_objfile from cu.
10101 (find_partial_die): Likewise.
10102 (fixup_partial_die): Likewise.
10103 (read_attribute_value): Likewise.
10104 (read_indirect_string_at_offset_from): Add objfile parameter.
10105 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10107 (read_indirect_string_from_dwz): Add objfile parameter.
10108 (read_indirect_string): Add objfile parameter.
10109 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10110 (read_addr_index): Use dwarf2_per_objfile from cu.
10111 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10113 (read_str_index): Use dwarf2_per_objfile from cu.
10114 (get_debug_line_section): Likewise.
10115 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10116 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10117 (new_symbol_full): Use dwarf2_per_objfile from cu.
10118 (build_error_marker_type): Likewise.
10119 (lookup_die_type): Likewise.
10120 (determine_prefix): Likewise.
10121 (follow_die_offset): Likewise.
10122 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10123 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10124 (dwarf2_fetch_die_type_sect_off): Likewise.
10125 (dwarf2_get_die_type): Likewise.
10126 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10127 (get_signatured_type): Likewise.
10128 (get_DW_AT_signature_type): Likewise.
10129 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10130 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10131 (cu_debug_loc_section): Likewise.
10132 (fill_in_loclist_baton): Likewise.
10133 (dwarf2_symbol_mark_computed): Likewise.
10134 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10135 dwarf2_per_objfile.
10136 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10138 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10139 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10140 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10141 (set_die_type): Use dwarf2_free_objfile from cu.
10142 (get_die_type_at_offset): Likewise.
10143 (dwarf2_per_objfile_free): Don't assign global variable.
10144 (debug_names) <constructor>: Add dwarf2_per_objfile
10145 parameter, update m_debugstrlookup construction.
10146 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10148 <m_dwarf2_per_objfile>: New field.
10149 <lookup>: Use m_dwarf2_per_objfile.
10150 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10151 (psyms_seen_size): Likewise.
10152 (write_gdbindex): Replace objfile parameter with
10153 dwarf2_per_objfile.
10154 (write_debug_names): Likewise.
10155 (write_psymtabs_to_index): Likewise.
10156 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10159 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10161 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10162 <dwarf2_per_objfile>: New field.
10163 (struct dwarf2_per_cu_data) <objfile>: Remove.
10164 <dwarf2_per_objfile>: New field.
10165 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10167 (create_signatured_type_table_from_index): Likewise.
10168 (create_debug_type_hash_table): Likewise.
10169 (fill_in_sig_entry_from_dwo_entry): Likewise.
10170 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10171 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10173 (create_partial_symtab): Access objfile through
10174 dwarf2_per_objfile.
10175 (process_psymtab_comp_unit_reader): Likewise.
10176 (read_comp_units_from_section): Likewise.
10177 (scan_partial_symbols): Likewise.
10178 (add_partial_symbol): Likewise.
10179 (add_partial_subprogram): Likewise.
10180 (peek_die_abbrev): Likewise.
10181 (fixup_go_packaging): Likewise.
10182 (process_full_comp_unit): Likewise.
10183 (process_full_type_unit): Likewise.
10184 (process_imported_unit_die): Likewise.
10185 (dwarf2_compute_name): Likewise.
10186 (dwarf2_physname): Likewise.
10187 (read_import_statement): Likewise.
10188 (create_cus_hash_table): Assign dwarf2_physname instead of
10190 (read_func_scope): Access objfile through dwarf2_per_objfile.
10191 (read_lexical_block_scope): Likewise.
10192 (read_call_site_scope): Likewise.
10193 (read_variable): Likewise.
10194 (dwarf2_rnglists_process): Likewise.
10195 (dwarf2_ranges_process): Likewise.
10196 (dwarf2_ranges_read): Likewise.
10197 (dwarf2_record_block_ranges): Likewise.
10198 (dwarf2_add_field): Likewise.
10199 (dwarf2_add_member_fn): Likewise.
10200 (read_structure_type): Likewise.
10201 (process_structure_scope): Likewise.
10202 (read_enumeration_type): Likewise.
10203 (read_array_type): Likewise.
10204 (read_common_block): Likewise.
10205 (read_namespace_type): Likewise.
10206 (read_namespace): Likewise.
10207 (read_module_type): Likewise.
10208 (read_tag_pointer_type): Likewise.
10209 (read_tag_ptr_to_member_type): Likewise.
10210 (read_tag_string_type): Likewise.
10211 (read_subroutine_type): Likewise.
10212 (read_typedef): Likewise.
10213 (read_base_type): Likewise.
10214 (attr_to_dynamic_prop): Likewise.
10215 (read_subrange_type): Likewise.
10216 (read_unspecified_type): Likewise.
10217 (load_partial_dies): Likewise.
10218 (read_partial_die): Likewise.
10219 (find_partial_die): Likewise.
10220 (guess_partial_die_structure_name): Likewise.
10221 (fixup_partial_die): Likewise.
10222 (read_attribute_value): Likewise.
10223 (read_addr_index_from_leb128): Likewise.
10224 (dwarf2_read_addr_index): Likewise.
10225 (dwarf2_string_attr): Likewise.
10226 (lnp_state_machine::check_line_address): Likewise.
10227 (dwarf_decode_lines_1): Likewise.
10228 (dwarf_decode_lines): Likewise.
10229 (dwarf2_start_symtab): Likewise.
10230 (var_decode_location): Likewise.
10231 (new_symbol_full): Likewise.
10232 (dwarf2_const_value_data): Likewise.
10233 (dwarf2_const_value_attr): Likewise.
10234 (dwarf2_const_value): Likewise.
10235 (die_type): Likewise.
10236 (die_containing_type): Likewise.
10237 (lookup_die_type): Likewise.
10238 (guess_full_die_structure_name): Likewise.
10239 (anonymous_struct_prefix): Likewise.
10240 (dwarf2_name): Likewise.
10241 (follow_die_ref_or_sig): Likewise.
10242 (follow_die_offset): Likewise.
10243 (follow_die_ref): Likewise.
10244 (dwarf2_fetch_die_loc_sect_off): Likewise.
10245 (dwarf2_fetch_constant_bytes): Likewise.
10246 (dwarf2_fetch_die_type_sect_off): Likewise.
10247 (dwarf2_get_die_type): Likewise.
10248 (follow_die_sig): Likewise.
10249 (decode_locdesc): Likewise.
10250 (dwarf2_per_cu_objfile): Likewise.
10251 (dwarf2_per_cu_text_offset): Likewise.
10252 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10254 (set_die_type): Access objfile through
10255 dwarf2_per_objfile.
10257 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10259 * valprint.c (converted_character_d): Remove typedef.
10260 (DEF_VEC_O (converted_character_d)): Remove.
10261 (count_next_character): Use std::vector.
10262 (print_converted_chars_to_obstack): Likewise.
10263 (generic_printstr): Likewise.
10265 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10267 * xml-support.h (struct gdb_xml_value): Add constructor.
10268 <value>: Change type to unique_xmalloc_ptr.
10269 (gdb_xml_value_s): Remove typedef.
10270 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10271 (gdb_xml_element_start_handler): Change parameter type to
10273 (xml_find_attribute): Likewise.
10274 * xml-support.c (xml_find_attribute): Change parameter type to
10275 std::vector and adjust.
10276 (gdb_xml_values_cleanup): Remove.
10277 (gdb_xml_parser::start_element): Adjust to std::vector.
10278 (xinclude_start_include): Change paraeter type to std::vector
10280 * btrace.c (check_xml_btrace_version): Likewise.
10281 (parse_xml_btrace_block): Likewise.
10282 (parse_xml_btrace_pt_config_cpu): Likewise.
10283 (parse_xml_btrace_pt): Likewise.
10284 (parse_xml_btrace_conf_bts): Likewise.
10285 (parse_xml_btrace_conf_pt): Likewise.
10286 * memory-map.c (memory_map_start_memory): Likewise.
10287 (memory_map_start_property): Likewise.
10288 * osdata.c (osdata_start_osdata): Likewise.
10289 (osdata_start_item): Likewise.
10290 (osdata_start_column): Likewise.
10291 * remote.c (start_thread): Likewise.
10292 * solib-aix.c (library_list_start_library): Likewise.
10293 (library_list_start_list): Likewise.
10294 * solib-svr4.c (library_list_start_library): Likewise.
10295 (svr4_library_list_start_list): Likewise.
10296 * solib-target.c (library_list_start_segment): Likewise.
10297 (library_list_start_section): Likewise.
10298 (library_list_start_library): Likewise.
10299 (library_list_start_list): Likewise.
10300 * tracepoint.c (traceframe_info_start_memory): Likewise.
10301 (traceframe_info_start_tvar): Likewise.
10302 * xml-syscall.c (syscall_start_syscall): Likewise.
10303 * xml-tdesc.c (tdesc_start_target): Likewise.
10304 (tdesc_start_feature): Likewise.
10305 (tdesc_start_reg): Likewise.
10306 (tdesc_start_union): Likewise.
10307 (tdesc_start_struct): Likewise.
10308 (tdesc_start_flags): Likewise.
10309 (tdesc_start_enum): Likewise.
10310 (tdesc_start_field): Likewise.
10311 (tdesc_start_enum_value): Likewise.
10312 (tdesc_start_vector): Likewise.
10314 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10316 * extension.h (struct xmethod_worker) <clone>: Remove.
10317 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10319 (python_xmethod_worker::clone): Remove.
10320 * valops.c (find_overload_match): Use std::move instead of
10323 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10325 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10326 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10327 <free_xmethod_worker_data>: Remove.
10328 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10329 <get_xmethod_arg_types>: Remove.
10330 <get_xmethod_result_type>: Remove.
10331 <invoke_xmethod>: Remove.
10332 * extension.c (new_xmethod_worker): Remove.
10333 (clone_xmethod_worker): Remove.
10334 (get_matching_xmethod_workers): Return void, pass std::vector by
10336 (get_xmethod_arg_types): Rename to...
10337 (xmethod_worker::get_arg_types): ... this, and adjust.
10338 (get_xmethod_result_type): Rename to...
10339 (xmethod_worker::get_result_type): ... this, and adjust.
10340 (invoke_xmethod): Remove.
10341 (free_xmethod_worker): Remove.
10342 (free_xmethod_worker_vec): Remove.
10343 * extension.h (enum ext_lang_rc): Move here from
10345 (struct xmethod_worker): Add constructor and destructor.
10348 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10349 virtual pure methods.
10350 <get_arg_types, get_result_type>: New methods.
10351 (xmethod_worker_ptr): Remove typedef.
10352 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10353 (xmethod_worker_vec): Remove typedef.
10354 (xmethod_worker_up): New typedef.
10355 (invoke_xmethod): Remove.
10356 (clone_xmethod_worker): Remove.
10357 (free_xmethod_worker): Remove.
10358 (free_xmethod_worker_vec): Remove.
10359 (get_xmethod_arg_types): Remove.
10360 (get_xmethod_result_type): Remove.
10361 * valops.c (find_method_list): Use std::vector, don't use
10362 intermediate vector.
10363 (value_find_oload_method_list): Use std::vector.
10364 (find_overload_match): Use std::vector.
10365 (find_oload_champ): Use std::vector.
10366 * value.c (value_free): Use operator delete.
10367 (value_of_xmethod): Rename to...
10368 (value_from_xmethod): ... this. Don't assign
10369 xmethod_worker::value, take rvalue-reference.
10370 (result_type_of_xmethod): Adjust.
10371 (call_xmethod): Adjust.
10372 * value.h: Include extension.h.
10373 (struct xmethod_worker): Don't forward-declare.
10374 (value_of_xmethod): Rename to...
10375 (value_from_xmethod): ... this, take rvalue-reference.
10376 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10377 (struct python_xmethod_worker): ... this, add constructor and
10379 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10380 (gdbpy_free_xmethod_worker_data): Rename to...
10381 (python_xmethod_worker::~python_xmethod_worker): ... this and
10383 (gdbpy_clone_xmethod_worker_data): Rename to...
10384 (python_xmethod_worker::clone): ... this and adjust.
10385 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10387 (gdbpy_get_xmethod_arg_types): Rename to...
10388 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10389 (gdbpy_get_xmethod_result_type): Rename to...
10390 (python_xmethod_worker::do_get_result_type): ... this and
10392 (gdbpy_invoke_xmethod): Rename to...
10393 (python_xmethod_worker::invoke): ... this and adjust.
10394 (new_python_xmethod_worker): Rename to...
10395 (python_xmethod_worker::python_xmethod_worker): ... this and
10397 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10399 (gdbpy_free_xmethod_worker_data): Remove.
10400 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10401 (gdbpy_get_xmethod_arg_types): Remove.
10402 (gdbpy_get_xmethod_result_type): Remove.
10403 (gdbpy_invoke_xmethod): Remove.
10404 * python/python.c (python_extension_ops): Remove obsolete
10407 2018-01-05 Pedro Alves <palves@redhat.com>
10410 * common/signals-state-save-restore.c
10411 (save_original_signals_state): New parameter 'quiet'. Warn if we
10412 find a custom handler preinstalled, instead of internal erroring.
10413 But only warn if !quiet.
10414 * common/signals-state-save-restore.h
10415 (save_original_signals_state): New parameter 'quiet'.
10416 * main.c (captured_main_1): Move save_original_signals_state call
10417 after option handling, and pass QUIET.
10419 2018-01-05 Pedro Alves <palves@redhat.com>
10421 * spu-tdep.c (spu_catch_start): Pass
10422 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10424 2018-01-05 Pedro Alves <palves@redhat.com>
10427 * ada-lang.c (literal_symbol_name_matcher): New function.
10428 (ada_get_symbol_name_matcher): Use it for
10429 symbol_name_match_type::SEARCH_NAME.
10430 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10431 it down instead of assuming symbol_name_match_type::FULL.
10432 * block.h (block_lookup_symbol): New parameter 'match_type'.
10433 * c-valprint.c (print_unpacked_pointer): Use
10434 lookup_symbol_search_name instead of lookup_symbol.
10435 * compile/compile-object-load.c (get_out_value_type): Pass down
10436 symbol_name_match_type::SEARCH_NAME.
10437 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10438 symbol_name_match_type::FULL.
10439 * cp-support.c (cp_get_symbol_name_matcher): Handle
10440 symbol_name_match_type::SEARCH_NAME.
10441 * infrun.c (insert_exception_resume_breakpoint): Use
10442 lookup_symbol_search_name.
10443 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10444 * psymtab.c (maintenance_check_psymtabs): Use
10445 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10446 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10447 SYMBOL_SEARCH_NAME.
10448 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10449 if symbol_name_match_type::SEARCH_NAME.
10450 (lookup_symbol_in_language): Pass down
10451 symbol_name_match_type::FULL.
10452 (lookup_symbol_search_name): New.
10453 (lookup_language_this): Pass down
10454 symbol_name_match_type::SEARCH_NAME.
10455 (lookup_symbol_aux, lookup_local_symbol): New parameter
10456 'match_type'. Pass it down.
10457 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10458 (lookup_symbol_search_name): New declaration.
10459 (lookup_symbol_in_block): New 'match_type' parameter.
10461 2018-01-05 Pedro Alves <palves@redhat.com>
10464 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10466 (ada_lookup_symbol): Reimplement in terms of
10467 ada_lookup_symbol_list, bits factored out from
10468 ada_lookup_encoded_symbol.
10470 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10472 * ada-exp.y (write_object_renaming): When subscripting an array
10473 using a symbol as the index, pass the block in call to
10474 ada_lookup_encoded_symbol when looking that symbol up.
10476 2018-01-05 Jerome Guitton <guitton@adacore.com>
10478 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10481 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10483 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10484 the case where VALUE_LVAL (val0) is not lval_memory.
10486 2018-01-05 Xavier Roirand <roirand@adacore.com>
10488 * ada-valprint.c (print_optional_low_bound): Handle
10489 character-indexed array printing like boolean-indexed array
10492 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10494 * NEWS: Create a new section for the next release branch.
10495 Rename the section of the current branch, now that it has
10498 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10500 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10501 * version.in: Bump version to 8.1.50.DATE-git.
10503 2018-01-03 Xavier Roirand <roirand@adacore.com>
10505 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10507 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10509 (default_exception_support_info) <catch_handlers_sym>: Add field.
10510 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10511 (ada_exception_name_addr_1): Add "catch handlers" handling.
10512 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10513 Update all callers.
10514 (create_excep_cond_exprs) <ex>: Add parameter.
10515 (re_set_exception): Update create_excep_cond_exprs call.
10516 (print_it_exception, print_one_exception, print_mention_exception)
10517 (print_recreate_exception): Add "catch handler" handling.
10518 (allocate_location_catch_handlers, re_set_catch_handlers)
10519 (check_status_catch_handlers, print_it_catch_handlers)
10520 (print_one_catch_handlers, print_mention_catch_handlers)
10521 (print_recreate_catch_handlers): New function.
10522 (catch_handlers_breakpoint_ops): New variable.
10523 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10524 Add parameter. Add "catch handler" handling.
10525 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10526 Add "catch handler" handling.
10527 (ada_exception_catchpoint_cond_string): Add "catch handler"
10529 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10531 (catch_ada_handlers_command): New function.
10532 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10533 operations structure.
10534 (_initialize_ada_language): Add "catch handlers" command entry.
10535 * NEWS: Document "catch handlers" feature.
10537 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10539 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10540 account when creating the array type of the slice.
10541 (ada_value_slice): Likewise.
10543 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10545 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10547 (create_array_type_with_stride): Add byte_stride_prop parameter.
10548 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10549 New parameter. Update all callers in this file.
10550 (array_type_has_dynamic_stride): New function.
10551 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10552 of arrays with dynamic byte strides.
10553 * dwarf2read.c (read_array_type): Add support for dynamic
10554 DW_AT_byte_stride attributes.
10556 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10558 * dwarf2read.c (read_unspecified_type): Treat
10559 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10561 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10563 Update copyright year range in all GDB files.
10565 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10567 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10568 and gdb/testsuite/gdb.base/step-line.c.
10570 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10572 * copyright.py (main): Dump the contents of
10573 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10574 even if BY_HAND is empty.
10576 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10578 * top.c (print_gdb_version): Update Copyright year in version
10581 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10583 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10585 For older changes see ChangeLog-2017.
10591 version-control: never