1 2018-06-01 Tom Tromey <tom@tromey.com>
3 * valops.c (enum_constant_from_type, value_namespace_elt)
4 (value_maybe_namespace_elt): Update.
5 * valarith.c (find_size_for_pointer_math): Update.
6 * target-descriptions.c (make_gdb_type): Update.
7 * symmisc.c (print_symbol): Update.
8 * stabsread.c (define_symbol, read_type)
9 (complain_about_struct_wipeout, add_undefined_type)
10 (cleanup_undefined_types_1): Update.
11 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
12 (rust_range_type_p, val_print_struct, rust_print_struct_def)
13 (rust_internal_print_type, rust_composite_type)
14 (rust_evaluate_funcall, rust_evaluate_subexp)
15 (rust_inclusive_range_type_p): Update.
16 * python/py-type.c (typy_get_tag): Update.
17 * p-typeprint.c (pascal_type_print_base): Update.
18 * mdebugread.c (parse_symbol, parse_type): Update.
19 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
21 * guile/scm-type.c (gdbscm_type_tag): Update.
22 * go-lang.c (sixg_string_p): Update.
23 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
25 * gdbtypes.h (struct main_type) <tag_name>: Remove.
26 (TYPE_TAG_NAME): Remove.
27 * gdbtypes.c (type_name_no_tag): Simplify.
28 (check_typedef, check_types_equal, recursive_dump_type)
29 (copy_type_recursive, arch_composite_type): Update.
30 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
31 in summary mode when needed.
32 * eval.c (evaluate_funcall): Update.
33 * dwarf2read.c (fixup_go_packaging, read_structure_type)
34 (process_structure_scope, read_enumeration_type)
35 (read_namespace_type, read_module_type, determine_prefix): Update.
36 * cp-support.c (inspect_type): Update.
37 * coffread.c (process_coff_symbol, decode_base_type): Update.
38 * c-varobj.c (c_is_path_expr_parent): Update.
39 * c-typeprint.c (c_type_print_base_struct_union): Update.
40 (c_type_print_base_1): Update. Print struct/class/union/enum in
41 summary when using C language.
42 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
43 (gen_maybe_namespace_elt): Update.
44 * ada-lang.c (ada_type_name): Simplify.
45 (empty_record, ada_template_to_fixed_record_type_1)
46 (template_to_static_fixed_type)
47 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
49 2018-06-01 Tom Tromey <tom@tromey.com>
51 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
53 * c-typeprint.c (c_print_type_1): Add "language" parameter.
54 (c_print_type): Update.
55 (c_print_type): New overload.
56 (c_type_print_varspec_prefix, c_type_print_args)
57 (c_type_print_varspec_suffix, c_print_type_no_offsets)
58 (c_type_print_base_struct_union, c_type_print_base_1)
59 (cp_type_print_method_args): Add "language" parameter.
60 (c_type_print_base): Update.
61 * c-lang.h (c_print_type): Add new overload.
63 2018-06-01 Tom Tromey <tom@tromey.com>
65 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
66 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
68 2018-06-01 Alan Hayward <alan.hayward@arm.com>
70 * aarch64-tdep.c (aarch64_sve_register_names): New const
72 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
73 (AARCH64_SVE_Z_REGS_NUM): New define.
74 (AARCH64_SVE_P_REGS_NUM): Likewise.
75 (AARCH64_SVE_NUM_REGS): Likewise.
77 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
79 * nat/linux-ptrace.h [__alpha__]
80 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
83 2018-05-31 Maciej W. Rozycki <macro@mips.com>
85 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
86 the endianness selected.
87 * NEWS: Document `set endian auto' mode operation update.
89 2018-05-31 Alan Hayward <alan.hayward@arm.com>
91 * Makefile.in: Add new header.
92 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
93 (sve_vl_from_vg): Likewise.
94 (sve_vq_from_vl): Likewise.
95 (sve_vl_from_vq): Likewise.
96 (sve_vq_from_vg): Likewise.
97 (sve_vg_from_vq): Likewise.
98 * configure.nat: Add new c file.
99 * nat/aarch64-sve-linux-ptrace.c: New file.
100 * nat/aarch64-sve-linux-ptrace.h: New file.
102 2018-05-31 Alan Hayward <alan.hayward@arm.com>
104 * aarch64-linux-nat.c (aarch64_linux_read_description):
106 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
108 * aarch64-tdep.c (tdesc_aarch64_list): Add.
109 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
110 (aarch64_gdbarch_init): Add parmeter zero.
111 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
112 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
113 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
115 * doc/gdb.texinfo: Describe SVE feature
116 * features/aarch64-sve.c: New file.
118 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
121 * gdbarch.sh (significant_addr_bit): Default to zero when
122 not set by target architecture.
123 * gdbarch.c: Re-generated.
124 * utils.c (address_significant): Update.
126 2018-05-30 Joel Brobecker <brobecker@adacore.com>
128 * stack.c (func_command): Remove trailing newline in call to error.
130 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
132 * regcache.h (regcache_raw_collect): Remove, update callers to
133 use regcache::raw_collect.
134 * regcache.c (regcache_raw_collect): Remove.
136 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
138 * regcache.h (regcache_raw_supply): Remove, update callers to
139 use detached_regcache::raw_supply.
140 * regcache.c (regcache_raw_supply): Remove.
142 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
144 * regcache.h (regcache_cooked_write_part): Remove, update
145 callers to use regcache::cooked_write_part.
146 * regcache.c (regcache_cooked_write_part): Remove.
148 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
150 * regcache.h (regcache_cooked_read_part): Remove, update callers
151 to use readable_regcache::cooked_read_part.
152 * regcache.c (regcache_cooked_read_part): Remove.
154 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
156 * regcache.h (regcache_cooked_read_value): Remove, update
157 callers to use readable_regcache::cooked_read_value.
158 * regcache.c (regcache_cooked_read_value): Remove.
160 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
162 * regcache.h (regcache_cooked_write): Remove, update callers to
163 use regcache::cooked_write.
164 * regcache.c (regcache_cooked_write): Remove.
166 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
168 * regcache.h (regcache_invalidate): Remove, update callers to
169 use detached_regcache::invalidate instead.
170 * regcache.c (regcache_invalidate): Remove.
172 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
174 * regcache.h (regcache_raw_write_part): Remove, update callers
175 to use regcache::raw_write_part instead.
176 * regcache.c (regcache_raw_write_part): Remove.
178 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
180 * regcache.h (regcache_raw_read_part): Remove, update callers to
181 use readable_regcache::raw_read_part instead.
182 * regcache.c (regcache_raw_read_part): Remove.
184 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
186 * regcache.h (regcache_cooked_read): Remove, update callers to
187 use readable_regcache::cooked_read instead.
188 * regcache.c (regcache_cooked_read): Remove.
190 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
192 * regcache.h (regcache_raw_write): Remove, update callers to use
193 regcache::raw_write instead.
194 * regcache.c (regcache_raw_write): Remove.
196 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
198 * regcache.h (regcache_raw_read): Remove, update callers to use
199 readable_regcache::raw_read instead.
200 * regcache.c (regcache_raw_read): Remove.
202 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
204 * regcache.h (regcache_raw_update): Remove, update callers to
205 use readable_regcache::raw_update instead.
206 * regcache.c (regcache_raw_update): Remove.
208 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
210 * regcache.h (regcache_register_status): Remove, update callers
211 to use reg_buffer::get_register_status directly instead.
212 * regcache.c (regcache_register_status): Remove.
214 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
216 * regcache.h (regcache_get_ptid): Remove, update all callers to
217 call regcache::ptid instead.
218 * regcache.c (regcache_get_ptid): Remove.
220 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
222 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
224 2018-05-30 Pedro Alves <palves@redhat.com>
226 * common/common-exceptions.h (exception_rethrow): Use
229 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
231 * breakpoint.c (print_solib_event, check_status_catch_solib):
232 Remove struct keyword in range-based for loops.
233 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
234 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
236 * linespec.c (find_superclass_methods, search_minsyms_for_name):
238 * symfile.c (addr_info_make_relative): Likewise.
239 * thread.c (value_in_thread_stack_temporaries): Likewise.
241 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
243 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
244 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
245 * coff-pe-read.c (add_pe_forwarded_sym): Replace
246 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
247 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
248 * jit.c (jit_breakpoint_re_set_internal): Likewise.
249 * printcmd.c (info_address_command): Likewise.
251 2018-05-29 Tom Tromey <tom@tromey.com>
253 * windows-nat.c (handle_exception): Update fall-through comment.
255 2018-05-29 Tom Tromey <tom@tromey.com>
257 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
258 (struct program_space) <added_solibs>: Now a std::vector.
259 * breakpoint.c (print_solib_event): Update.
260 (check_status_catch_solib): Update.
261 * progspace.c (clear_program_space_solib_cache): Update.
262 * solib.c (update_solib_list): Update.
264 2018-05-29 Tom Tromey <tom@tromey.com>
266 * python/py-type.c (typy_richcompare): Update.
267 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
268 * gdbtypes.h (types_deeply_equal): Return bool.
269 (types_equal): Likewise.
270 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
272 (check_types_equal): Change worklist to std::vector. Return
274 (struct type_equality_entry): Add constructor.
275 (compare_maybe_null_strings): Return bool.
276 (check_types_worklist): Return bool. Change worklist to
278 (types_deeply_equal): Use std::vector.
279 (types_equal): Return bool.
280 (compare_maybe_null_strings): Simplify.
282 2018-05-29 Tom Tromey <tom@tromey.com>
284 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
286 2018-05-29 Tom Tromey <tom@tromey.com>
288 * objc-lang.h: Don't include cp-support.h.
289 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
292 2018-05-27 Tom Tromey <tom@tromey.com>
294 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
296 2018-05-25 Tom Tromey <tom@tromey.com>
298 * value.c (value::location): Initialize.
300 2018-05-25 Tom Tromey <tom@tromey.com>
302 * dbxread.c (init_bincl_list): Remove.
303 (bincl_list): Now a std::vector.
304 (bincls_allocated, next_bincl): Remove.
305 (free_bincl_list, do_free_bincl_list_cleanup)
306 (make_cleanup_free_bincl_list): Remove.
307 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
309 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
310 (struct header_file_location): Add constructor.
311 (add_bincl_to_list): Remove.
313 2018-05-25 Tom Tromey <tom@tromey.com>
315 * tui/tui.c (tui_enable): Update.
316 * mi/mi-interp.c (mi_interp::init): Update.
317 * interps.h (class interp) <name>: New method.
318 <m_name>: Rename from name.
319 (~scoped_restore_interp): Update.
320 * interps.c (interp::interp): Update.
321 (interp_add, interp_set, interp_lookup_existing)
322 (current_interp_named_p): Update.
324 2018-05-25 Tom Tromey <tom@tromey.com>
326 * interps.c (interp_name): Remove.
327 * mi/mi-interp.c (mi_interp::init): Update.
328 * interps.h (interp_name): Remove.
329 (~scoped_restore_interp): Update.
330 * tui/tui.c (tui_enable): Update.
332 2018-05-25 Tom Tromey <tom@tromey.com>
334 * utils.c (fputs_maybe_filtered): Update.
335 * linespec.c (decode_line_full): Update.
336 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
337 (mi_print_breakpoint_for_event, mi_solib_loaded)
338 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
339 (mi_user_selected_context_changed): Update.
340 * mi/mi-main.c (mi_execute_command): Update.
341 * cli/cli-script.c (execute_control_command): Update.
342 * python/python.c (execute_gdb_command): Update.
343 * solib.c (info_sharedlibrary_command): Update.
344 * interps.c (interp_ui_out): Remove.
345 * interps.h (interp_ui_out): Remove.
347 2018-05-25 Tom Tromey <tom@tromey.com>
349 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
350 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
351 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
353 2018-05-25 Tom Tromey <tom@tromey.com>
355 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
356 * interps.c (interp_exec): Use scoped_restore.
358 2018-05-25 Tom Tromey <tom@tromey.com>
360 * remote.c (remote_target::remote_file_get): Use
362 (remote_target::remote_file_put): Likewise.
364 2018-05-25 Tom Tromey <tom@tromey.com>
366 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
368 (get_pe_section_index, add_pe_exported_sym): Update.
369 (read_pe_exported_syms): Use gdb::def_vector.
371 2018-05-25 Tom Tromey <tom@tromey.com>
373 * frame.c (remove_prev_frame): Remove.
374 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
376 2018-05-25 Maciej W. Rozycki <macro@mips.com>
378 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
380 * mips-linux-nat.c (supply_fpregset): Always call
381 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
382 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
383 `mips_fill_fpregset'.
384 * mips-linux-tdep.c (mips_supply_fpregset)
385 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
386 (mips_fill_fpregset_wrapper): Remove functions.
387 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
388 (mips_linux_fpregset): Remove variable.
389 (mips_linux_iterate_over_regset_sections): Use
390 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
391 (mips_linux_o32_sigframe_init): Remove comment.
393 2018-05-25 Pedro Alves <palves@redhat.com>
395 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
396 (struct readahead_cache, struct packet_reg, struct
397 remote_arch_state, class remote_state): Move higher up in the
399 (remote_target::m_remote_state): Now an object instead of a pointer.
400 (remote_target::get_remote_state): Adjust.
402 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
404 * stack.c (select_and_print_frame): Delete.
405 (struct function_bounds): Move struct within function.
406 (func_command): Most content moved into new function
407 find_frame_for_function, use new function, print result, add
409 (find_frame_for_function): New function, now returns a result.
411 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
413 * stack.c (iterate_over_block_arg_vars): Fix comment.
414 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
416 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
420 (scoped_restore_selected_frame::scoped_restore_selected_frame):
422 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
424 * frame.h (class scoped_restore_selected_frame): New class.
425 * stack.c (print_frame_local_vars): Remove catching and rethrowing
426 of any exception, use scoped_restore_selected_frame to restore the
429 2018-05-24 Pedro Alves <palves@redhat.com>
431 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
434 2018-05-23 Tom Tromey <tom@tromey.com>
436 * complaints.c (struct complaints): Remove.
437 (symfile_complaint_book): Remove.
438 (series): New global.
439 (complaint_internal): Update.
440 (clear_complaints): Update.
442 2018-05-23 Tom Tromey <tom@tromey.com>
444 * complaints.c (counters): New global.
445 (struct complain): Remove.
446 (struct complaints) <root>: Remove.
447 (complaint_sentinel): Remove.
448 (symfile_complaint_book): Update.
449 (find_complaint) Remove.
450 (complaint_internal, clear_complaints): Update.
452 2018-05-23 Tom Tromey <tom@tromey.com>
454 * complaints.c (struct complain) <file, line>: Remove.
455 (find_complaint): Remove file, line parameters.
456 (complaint_internal): Update.
458 2018-05-23 Tom Tromey <tom@tromey.com>
460 * complaints.c (vcomplaint): Remove.
461 (complaint_internal) Merge in contents of vcomplaint.
463 2018-05-23 Tom Tromey <tom@tromey.com>
465 * complaints.c (struct complaints) <explanation>: Remove.
466 (symfile_explanations): Remove.
467 (symfile_complaint_book): Update.
468 (vcomplaint): Update.
469 (struct explanation): Remove.
471 2018-05-23 Tom Tromey <tom@tromey.com>
473 * complaints.c (symfile_complaints): Remove.
474 (complaint_internal): Remove "complaints" parameter.
475 (clear_complaints, vcomplaint): Remove "c" parameter.
476 (get_complaints): Remove.
477 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
478 (dwarf2_debug_line_missing_file_complaint)
479 (dwarf2_debug_line_missing_end_sequence_complaint)
480 (dwarf2_complex_location_expr_complaint)
481 (dwarf2_const_value_length_mismatch_complaint)
482 (dwarf2_section_buffer_overflow_complaint)
483 (dwarf2_macro_malformed_definition_complaint)
484 (dwarf2_invalid_attrib_class_complaint)
485 (create_addrmap_from_index, dw2_symtab_iter_next)
486 (dw2_expand_marked_cus)
487 (dw2_debug_names_iterator::find_vec_in_debug_names)
488 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
489 (create_debug_type_hash_table, init_cutu_and_read_dies)
490 (partial_die_parent_scope, add_partial_enumeration)
491 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
492 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
493 (read_import_statement, read_file_scope, create_dwo_cu_reader)
494 (create_cus_hash_table, create_dwp_hash_table)
495 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
496 (dwarf2_rnglists_process, dwarf2_ranges_process)
497 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
498 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
499 (handle_struct_member_die, process_structure_scope)
500 (read_array_type, read_common_block, read_module_type)
501 (read_tag_pointer_type, read_typedef, read_base_type)
502 (read_subrange_type, load_partial_dies, partial_die_info::read)
503 (partial_die_info::read, partial_die_info::read)
504 (partial_die_info::read, read_checked_initial_length_and_offset)
505 (dwarf2_string_attr, read_formatted_entries)
506 (dwarf_decode_line_header)
507 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
508 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
509 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
510 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
511 (get_signatured_type, get_DW_AT_signature_type)
512 (decode_locdesc, file_file_name, consume_improper_spaces)
513 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
514 (dwarf_decode_macro_bytes, dwarf_decode_macros)
515 (dwarf2_symbol_mark_computed, set_die_type)
516 (read_attribute_value): Update.
517 * stap-probe.c (handle_stap_probe, get_stap_base_address):
519 * dbxread.c (unknown_symtype_complaint)
520 (lbrac_mismatch_complaint, repeated_header_complaint)
521 (set_namestring, function_outside_compilation_unit_complaint)
522 (read_dbx_symtab, process_one_symbol): Update.
523 * gdbtypes.c (stub_noname_complaint): Update.
524 * windows-nat.c (handle_unload_dll): Update.
525 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
526 (decode_base_type): Update.
527 * xcoffread.c (bf_notfound_complaint, ef_complaint)
528 (eb_complaint, record_include_begin, record_include_end)
529 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
530 (process_xcoff_symbol, read_symbol)
531 (function_outside_compilation_unit_complaint)
532 (scan_xcoff_symtab): Update.
533 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
534 * buildsym.c (finish_block_internal, make_blockvector)
535 (end_symtab_get_static_block, augment_type_symtab): Update.
536 * dtrace-probe.c (dtrace_process_dof)
537 (dtrace_static_probe_ops::get_probes): Update.
538 * complaints.h (struct complaint): Don't declare.
539 (symfile_complaints): Remove.
540 (complaint_internal): Remove "complaints" parameter.
541 (complaint): Likewise.
542 (clear_complaints): Likewise.
543 * symfile.c (syms_from_objfile_1, finish_new_objfile)
544 (reread_symbols): Update.
545 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
546 (dwarf2_frame_cache, decode_frame_entry): Update.
547 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
548 * objc-lang.c (lookup_objc_class, lookup_child_selector)
549 (info_selectors_command): Update.
550 * macrotab.c (macro_include, check_for_redefinition)
551 (macro_undef): Update.
552 * objfiles.c (filter_overlapping_sections): Update.
553 * stabsread.c (invalid_cpp_abbrev_complaint)
554 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
555 (define_symbol, error_type, read_type, rs6000_builtin_type)
556 (stabs_method_name_from_physname, read_member_functions)
557 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
558 (attach_fields_to_type, complain_about_struct_wipeout)
559 (read_range_type, read_args, common_block_start)
560 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
562 * mdebugread.c (index_complaint, unknown_ext_complaint)
563 (basic_type_complaint, bad_tag_guess_complaint)
564 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
565 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
566 (parse_procedure, parse_lines)
567 (function_outside_compilation_unit_complaint)
568 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
569 (bad_tag_guess_complaint, reg_value_complaint): Update.
570 * cp-support.c (demangled_name_complaint): Update.
571 * macroscope.c (sal_macro_scope): Update.
572 * dwarf-index-write.c (class debug_names): Update.
574 2018-05-23 Tom Tromey <tom@tromey.com>
576 * complaints.c (clear_complaints): Remove "noisy" parameter.
577 * complaints.h (clear_complaints): Update.
578 * symfile.c (syms_from_objfile_1, finish_new_objfile)
579 (reread_symbols): Update.
581 2018-05-23 Tom Tromey <tom@tromey.com>
583 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
585 (vcomplaint, clear_complaints): Update.
586 (symfile_explanations): Remove some messages.
588 2018-05-23 Tom Tromey <tom@tromey.com>
590 * complaints.c (internal_complaint): Remove.
591 * complaints.h (internal_complaint): Remove.
593 2018-05-22 Maciej W. Rozycki <macro@mips.com>
595 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
597 2018-05-22 Pedro Alves <palves@redhat.com>
599 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
600 (remote_fileio_badfd, remote_fileio_return_errno)
601 (remote_fileio_return_success, remote_fileio_func_open)
602 (remote_fileio_func_open, remote_fileio_func_close)
603 (remote_fileio_func_read, remote_fileio_func_write)
604 (remote_fileio_func_lseek, remote_fileio_func_rename)
605 (remote_fileio_func_unlink, remote_fileio_func_stat)
606 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
607 (remote_fileio_func_isatty, remote_fileio_func_system): Add
608 remote_target parameter.
609 (remote_fio_func_map) <func>: Add remote_target parameter.
610 (do_remote_fileio_request, remote_fileio_request):
611 * remote-fileio.h (remote_fileio_request):
612 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
613 remote_target parameter.
614 (remote_notif_process, handle_notification): Adjust to pass down
616 (remote_notif_state_allocate): Add remote_target parameter. Save
618 * remote-notif.h (struct remote_target): Forward declare.
619 (struct notif_client) <parse, ack, can_get_pending_events>: Add
620 remote_target parameter.
621 (struct remote_notif_state) <remote>: New field.
622 (remote_notif_ack, remote_notif_parse): Add remote_target
624 (remote_notif_state_allocate, remote_notif_state_allocate): Add
625 remote_target parameter.
626 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
627 (threads_listing_context, rmt_thread_action, protocol_feature)
628 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
629 (packet_result, struct threads_listing_context, remote_state):
630 Move definitions and declarations higher up.
631 (remote_target) <~remote_target>: Declare.
632 (remote_download_command_source, remote_file_put, remote_file_get)
633 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
634 (remote_hostio_pread_vFile, remote_hostio_send_command)
635 (remote_hostio_set_filesystem, remote_hostio_open)
636 (remote_hostio_close, remote_hostio_unlink, remote_state)
637 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
638 (get_memory_write_packet_size, get_memory_read_packet_size)
639 (append_pending_thread_resumptions, remote_detach_1)
640 (append_resumption, remote_resume_with_vcont)
641 (add_current_inferior_and_thread, wait_ns, wait_as)
642 (process_stop_reply, remote_notice_new_inferior)
643 (process_initial_stop_replies, remote_add_thread)
644 (btrace_sync_conf, remote_btrace_maybe_reopen)
645 (remove_new_fork_children, kill_new_fork_children)
646 (discard_pending_stop_replies, stop_reply_queue_length)
647 (check_pending_events_prevent_wildcard_vcont)
648 (discard_pending_stop_replies_in_queue, stop_reply)
649 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
650 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
651 (remote_interrupt_as, remote_interrupt_ns)
652 (remote_get_noisy_reply, remote_query_attached)
653 (remote_add_inferior, remote_current_thread, get_current_thread)
654 (set_thread, set_general_thread, set_continue_thread)
655 (set_general_process, write_ptid)
656 (remote_unpack_thread_info_response, remote_get_threadinfo)
657 (parse_threadlist_response, remote_get_threadlist)
658 (remote_threadlist_iterator, remote_get_threads_with_ql)
659 (remote_get_threads_with_qxfer)
660 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
661 (get_offsets, remote_check_symbols, remote_supported_packet)
662 (remote_query_supported, remote_packet_size)
663 (remote_serial_quit_handler, remote_detach_pid)
664 (remote_vcont_probe, remote_resume_with_hc)
665 (send_interrupt_sequence, interrupt_query)
666 (remote_notif_get_pending_events, fetch_register_using_p)
667 (send_g_packet, process_g_packet, fetch_registers_using_g)
668 (store_register_using_P, store_registers_using_G)
669 (set_remote_traceframe, check_binary_download)
670 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
671 (remote_xfer_live_readonly_partial, remote_read_bytes)
672 (remote_send_printf, remote_flash_write, readchar)
673 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
674 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
675 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
676 (extended_remote_disable_randomization, extended_remote_run)
677 (send_environment_packet, extended_remote_environment_support)
678 (extended_remote_set_inferior_cwd, remote_write_qxfer)
679 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
680 (packet_command): Now methods of ...
681 (remote_target): ... this class.
682 (m_remote_state) <remote_target>: New field.
683 (struct remote_state) <stop_reply_queue,
684 remote_async_inferior_event_token, wait_forever_enabled_p>: New
686 (remote_state::remote_state): Allocate stop_reply_queue.
687 (remote_state): Delete global.
688 (get_remote_state_raw): Delete.
689 (remote_target::get_remote_state): Allocate m_remote_state on
691 (get_current_remote_target): New.
692 (remote_ops, extended_remote_ops): Delete.
693 (wait_forever_enabled_p, remote_async_inferior_event_token):
694 Delete, moved to struct remote_state.
695 (remote_target::close): Delete self. Destruction bits split to
697 (remote_target::~remote_target): ... this.
698 (show_memory_packet_size): Adjust to use
699 get_current_remote_target.
700 (struct protocol_feature) <func>: Add remote_target parameter.
701 All callers adjusted.
702 (curr_quit_handler_target): New.
703 (remote_serial_quit_handler): Reimplement.
704 (remote_target::open_1): Adjust to use get_current_remote_target.
705 Heap-allocate remote_target/extended_remote_target instances.
706 (vcont_builder::vcont_builder): Add remote_target parameter, and
707 save it in m_remote. All callers adjusted.
708 (vcont_builder::m_remote): New field.
709 (vcont_builder::restart, vcont_builder::flush)
710 (vcont_builder::push_action): Use it.
711 (remote_target::commit_resume): Use it.
712 (struct queue_iter_param) <remote>: New field.
713 (remote_target::remove_new_fork_children): Fill in 'remote' field.
714 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
715 (check_pending_event_prevents_wildcard_vcont_callback)
716 (remote_target::check_pending_events_prevent_wildcard_vcont)
717 (remote_target::discard_pending_stop_replies)
718 (remote_target::discard_pending_stop_replies_in_queue)
719 (remote_target::remote_notif_remove_queued_reply): Fill in
721 (remote_notif_get_pending_events): New.
722 (remote_target::readchar, remote_target::remote_serial_write):
723 Save/restore curr_quit_handler_target.
725 (kill_new_fork_children): Fill in 'remote' field.
726 (packet_command): Use get_current_remote_target, defer to
727 remote_target method of same name.
728 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
729 parameter, and save it in m_remote. All callers adjusted.
730 (scoped_remote_fd::release): Use m_remote.
731 (scoped_remote_fd::m_remote): New field.
732 (remote_file_put, remote_file_get, remote_file_delete): Use
733 get_current_remote_target, defer to remote_target method of same
735 (remote_btrace_reset): Add remote_state paremeter. Update all
737 (remote_async_inferior_event_handler). Pass down 'data'.
738 (remote_new_objfile): Use get_current_remote_target.
739 (remote_target::vcont_r_supported): New.
740 (set_range_stepping): Use get_current_remote_target and
741 remote_target::vcont_r_supported.
742 (_initialize_remote): Don't allocate 'remote_state' and
743 'stop_reply_queue' globals.
744 * remote.h (struct remote_target): Forward declare.
745 (getpkt, putpkt, remote_notif_get_pending_events): Add
746 'remote_target' parameter.
748 2018-05-22 Pedro Alves <palves@redhat.com>
750 * remote.c (vcont_builder): Now a class. Make all data members
752 (vcont_builder) <vcont_builder, restart, flush, push_action>:
754 (vcont_builder_restart): Rename to ...
755 (vcont_builder::restart): ... this.
756 (vcont_builder_flush): Rename to ...
757 (vcont_builder::flush): ... this.
758 (vcont_builder_push_action): Rename to ...
759 (vcont_builder::push_action): ... this.
760 (remote_target::commit_resume): Adjust.
762 2018-05-22 Pedro Alves <palves@redhat.com>
764 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
765 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
766 (get_fixed_memory_packet_size): New.
767 (get_memory_packet_size): Use it.
768 (set_memory_packet_size): Don't override the config size with
769 DEFAULT_MAX_MEMORY_PACKET_SIZE.
770 (show_memory_packet_size): Use get_fixed_memory_packet_size.
771 Don't refer to get_memory_packet_size if not connected to a remote
772 target. Show "(default)" if configured size is 0.
774 2018-05-22 Pedro Alves <palves@redhat.com>
776 * remote.c (remote_target::mourn_inferior): Move
777 discard_pending_stop_replies call here from ...
778 (_initialize_remote): ... here.
780 2018-05-22 Pedro Alves <palves@redhat.com>
782 * remote.c (compare_section_command): Remove set_general_process
785 2018-05-22 Pedro Alves <palves@redhat.com>
787 * remote.c (struct packet_reg, struct remote_arch_state):
788 Move higher up in the file.
789 (remote_state) <m_arch_states>: Store remote_arch_state values
790 instead of remote_arch_state pointers.
791 (remote_state::get_remote_arch_state): Adjust.
793 2018-05-22 Pedro Alves <palves@redhat.com>
795 * remote.c: Include <unordered_map>.
796 (remote_state): Now a class.
797 (remote_state) <get_remote_arch_state>: Declare method.
798 <get_remote_arch_state>: New field.
799 (remote_arch_state) <remote_arch_state>: Declare ctor.
800 <regs>: Now a unique_ptr.
801 (remote_gdbarch_data_handle): Delete.
802 (get_remote_arch_state): Delete.
803 (remote_state::get_remote_arch_state): New.
804 (get_remote_state): Adjust to call remote_state's
805 get_remote_arch_state method.
806 (init_remote_state): Delete, bits factored out to ...
807 (remote_arch_state::remote_arch_state): ... this new method.
808 (get_remote_packet_size, get_memory_packet_size)
809 (process_g_packet, remote_target::fetch_registers)
810 (remote_target::prepare_to_store, store_registers_using_G)
811 (remote_target::store_registers, remote_target::get_trace_status):
812 Adjust to call remote_state's method.
813 (_initialize_remote): Remove reference to
814 remote_gdbarch_data_handle.
816 2018-05-22 Pedro Alves <palves@redhat.com>
818 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
819 pread>: New method declarations.
820 (remote_target::open_1): Adjust.
821 (readahead_cache_invalidate): Rename to ...
822 (readahead_cache::invalidate): ... this, and adjust to be a class
824 (readahead_cache_invalidate_fd): Rename to ...
825 (readahead_cache::invalidate_fd): ... this, and adjust to be a
827 (remote_hostio_pwrite): Adjust.
828 (remote_hostio_pread_from_cache): Rename to ...
829 (readahead_cache::pread): ... this, and adjust to be a class
831 (remote_hostio_close): Adjust.
833 2018-05-22 Pedro Alves <palves@redhat.com>
835 * remote.c (remote_hostio_close_cleanup): Delete.
836 (class scoped_remote_fd): New.
837 (remote_file_put, remote_file_get): Use it.
839 2018-05-22 Pedro Alves <palves@redhat.com>
841 (struct vCont_action_support): Use bool and initialize all fields.
842 (struct readahead_cache): Initialize all fields.
843 (remote_state): Use bool and initialize all fields.
844 (remote_state::remote_state, remote_state::~remote_state): New.
845 (new_remote_state): Delete.
846 (_initialize_remote): Use new to allocate remote_state.
848 2018-05-22 Pedro Alves <palves@redhat.com>
852 * c-exp.y: Include "c-support.h".
853 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
854 of tolower. Use c_ident_is_alpha to scan names.
855 * c-lang.c: Include "c-support.h".
856 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
857 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
858 * c-support.h: New file, with bits factored out from ...
859 * cp-name-parser.y: ... this file.
860 Include "c-support.h".
861 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
862 c-support.h and renamed.
863 (symbol_end, yylex): Adjust.
865 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
867 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
868 parameter type to CORE_ADDR.
869 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
870 parameter type in declaration to CORE_ADDR.
871 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
872 target_auxv_search to get AT_HWCAP and use the result to get the
874 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
875 to CORE_ADDR. Remove the cast of the return value to unsigned
876 long. Fix error predicate of target_auxv_search.
877 (ppc_linux_nat_target::read_description): Change the type of the
878 hwcap variable to CORE_ADDR.
880 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
882 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
883 if the size of fpscr is larger than 32 bits.
885 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
887 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
888 (ppc32_linux_vsxregmap): New global.
889 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
890 regcache_supply_regset, and regcache_collect_regset.
891 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
892 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
893 (fetch_vsx_register, store_vsx_register): Remove.
894 (fetch_vsx_registers): Add regno parameter. Get regset using
895 ppc_linux_vsxregset. Use regset to supply registers.
896 (store_vsx_registers): Add regno parameter. Get regset using
897 ppc_linux_vsxregset. Use regset to collect registers.
898 (fetch_register): Call fetch_vsx_registers instead of
900 (store_register): Call store_vsx_registers instead of
902 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
904 (store_ppc_registers): Call store_vsx_registers with -1 for the
906 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
907 (ppc_collect_vsxregset): Remove.
909 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
911 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
913 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
914 for vector register offset fields.
915 (ppc64_fbsd_reg_offsets): Likewise.
916 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
917 to vector register offset fields.
918 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
919 to vector register offset fields.
920 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
921 vector register offset fields.
922 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
923 initializers for vector register offset fields.
924 (rs6000_aix64_reg_offsets): Likewise.
925 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
926 (ppc_supply_vrregset): Remove.
927 (ppc_collect_vrregset): Remove.
928 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
929 (ppc_linux_vrregset) : New function.
930 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
931 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
932 (ppc32_linux_vrregset): Remove.
933 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
934 and use result instead of ppc32_linux_vrregset.
935 (ppc32_linux_reg_offsets): Remove initializers for vector register
937 (ppc64_linux_reg_offsets): Likewise.
938 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
939 * ppc-linux-nat.c: Include regset.h.
940 (gdb_vrregset_t): Adjust comment to account for little-endian
942 (supply_vrregset, fill_vrregset): Remove.
943 (fetch_altivec_register, store_altivec_register): Remove.
944 (fetch_altivec_registers): Add regno parameter. Get regset using
945 ppc_linux_vrregset. Use regset to supply registers.
946 (store_altivec_registers): Add regno parameter. Get regset using
947 ppc_linux_vrregset. Use regset to collect registers.
948 (fetch_register): Call fetch_altivec_registers instead of
949 fetch_altivec_register.
950 (store_register): Call store_altivec_registers instead of
951 store_altivec_register.
952 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
953 the new regno parameter.
954 (store_ppc_registers): Call store_altivec_registers with -1 for
955 the new regno parameter.
957 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
959 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
960 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
961 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
962 (gdb_vrregset_t): Change array type size to
963 PPC_LINUX_SIZEOF_VRREGSET.
964 (gdb_vsxregset_t): Change array type size to
965 PPC_LINUX_SIZEOF_VSXREGSET.
966 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
967 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
968 PPC_LINUX_SIZEOF_VSXREGSET.
970 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
972 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
973 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
975 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
976 ppc_linux_target_wordsize with tid.
977 (ppc_linux_nat_target::read_description): Call ppc_linux_target
979 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
980 (ppc64_64bit_inferior_p): Add static and inline specifiers.
981 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
982 tid parameter. Remove static specifier.
983 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
984 (ppc_linux_target_wordsize): New declaration.
986 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
988 * arch/ppc-linux-common.c: New file.
989 * arch/ppc-linux-common.h: New file.
990 * arch/ppc-linux-tdesc.h: New file.
991 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
992 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
993 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
994 arch/ppc-linux-tdesc.h.
995 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
996 arch/ppc-linux-tdesc.h.
997 (ppc_linux_nat_target::read_description): Remove target
998 description matching code. Fill a ppc_linux_features struct and
999 call ppc_linux_match_description with it. Move comment about ISA
1000 2.05 to ppc-linux-common.c.
1001 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
1002 arch/ppc-linux-tdesc.h.
1003 (ppc_linux_core_read_description): Remove target description
1004 matching code. Fill a ppc_linux_features struct and call
1005 ppc_linux_match_description with it.
1006 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1007 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1008 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1009 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1010 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1011 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1012 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1013 (tdesc_powerpc_e500l): Remove.
1015 2018-05-22 Joel Brobecker <brobecker@adacore.com>
1017 * ada-lang.c (catch_assert_command): Pass empty string instead
1018 of NULL for excep_string argument.
1020 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1022 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
1023 the width of the requested register exceeds the width of the
1026 2018-05-21 Tom Tromey <tom@tromey.com>
1028 * printcmd.c (output_command): Remove.
1029 (output_command_const): Rename to output_command.
1030 * valprint.h (output_command): Rename from output_command_const.
1031 * tracepoint.c (trace_dump_actions): Call output_command.
1033 2018-05-21 Tom Tromey <tom@tromey.com>
1035 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1036 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
1037 * ada-lang.h (create_ada_exception_catchpoint): Update.
1038 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
1040 (create_excep_cond_exprs, ~ada_catchpoint)
1041 (should_stop_exception, print_one_exception)
1042 (print_mention_exception, print_recreate_exception): Update.
1043 (ada_get_next_arg): Remove.
1044 (catch_ada_exception_command_split): Use std::string. Change type
1045 of "excep_string", "cond_string".
1046 (catch_ada_exception_command): Update.
1047 (create_ada_exception_catchpoint): Change type of excep_string.
1048 (ada_exception_sal): Remove excep_string parameter.
1049 (~ada_catchpoint): Remove.
1051 2018-05-21 Tom Tromey <tom@tromey.com>
1053 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1056 2018-05-21 Tom Tromey <tom@tromey.com>
1058 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1059 Return unique_xmalloc_ptr.
1060 (print_it_exception): Update.
1062 2018-05-21 Tom Tromey <tom@tromey.com>
1064 * tracepoint.c (trace_dump_actions): Use std::string.
1066 2018-05-21 Tom Tromey <tom@tromey.com>
1068 * symfile.c (reread_symbols): Use std::string for original_name.
1070 2018-05-21 Tom Tromey <tom@tromey.com>
1072 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1073 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
1076 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
1078 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1080 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1081 * objfiles.c (get_objfile_bfd_data): Allocate
1082 objfile_per_bfd_storage with obstack_new when allocating on
1085 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1087 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1089 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1090 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1091 * mdebugread.c (mdebug_build_psymtabs): Likewise.
1092 (add_pending): Likewise.
1093 (parse_symbol): Likewise.
1094 (parse_partial_symbols): Likewise.
1095 (psymtab_to_symtab_1): Likewise.
1096 (new_psymtab): Likewise.
1097 (elfmdebug_build_psymtabs): Likewise.
1098 * minsyms.c (terminate_minimal_symbol_table): Likewise.
1099 * objfiles.c (get_objfile_bfd_data): Likewise.
1100 (objfile_register_static_link): Likewise.
1101 * psymtab.c (allocate_psymtab): Likewise.
1102 * stabsread.c (read_member_functions): Likewise.
1103 * xcoffread.c (xcoff_end_psymtab): Likewise.
1105 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1107 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1108 compiler supports std::is_trivially_constructible.
1109 * common/poison.h: Include obstack.h.
1110 (IsMallocable): Define to is_trivially_constructible if the
1111 compiler supports it, define to true_type otherwise.
1115 (XOBNEWVEC): Redefine.
1116 * gdb_obstack.h (obstack_zalloc): New.
1117 (OBSTACK_ZALLOC): Redefine.
1118 (obstack_calloc): New.
1119 (OBSTACK_CALLOC): Redefine.
1121 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1122 (gdbarch_obstack): New declaration in gdbarch.h, definition in
1124 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1125 obstack_calloc/obstack_zalloc.
1126 (gdbarch_obstack_zalloc): Remove.
1127 * target-descriptions.c (tdesc_data_init): Use obstack_new.
1129 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1131 * stack.c (backtrace_command_1): Remove useless variable int i.
1133 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1135 * stack.c (print_frame_info): Fix comment.
1137 2018-05-18 Tom Tromey <tom@tromey.com>
1139 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1140 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1141 (~dwarf2_per_objfile): Update
1142 (dwarf2_get_dwz_file): Use new.
1143 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1146 2018-05-18 Tom Tromey <tom@tromey.com>
1148 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1150 * dwarf2read.c (struct dwp_file): Add constructor and
1152 (open_and_init_dwp_file): Return a unique_ptr.
1153 (dwarf2_per_objfile, create_dwp_hash_table)
1154 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1155 (lookup_dwo_unit_in_dwp): Update.
1156 (open_and_init_dwp_file, get_dwp_file): Update.
1158 2018-05-18 Tom Tromey <tom@tromey.com>
1160 * dwarf2read.c (dwarf2_per_objfile): Update.
1161 (struct mapped_index): Add initializers.
1162 (dwarf2_read_index): Use new.
1163 (dw2_symtab_iter_init): Update.
1164 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1167 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1169 * dwarf2read.c (mapped_index) <total_size>: Remove.
1171 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1173 * unittests/format_pieces-selftests.c (test_format_specifier):
1176 2018-05-18 Tom Tromey <tom@tromey.com>
1178 * c-typeprint.c (maybe_print_hole): New function.
1179 (c_print_type_struct_field_offset): Update.
1180 (c_type_print_base_struct_union): Call maybe_print_hole.
1182 2018-05-17 Keith Seitz <keiths@redhat.com>
1184 * breakpoint.c (build_bpstat_chain): New function, moved from
1186 (bpstat_stop_status): Add optional parameter, `stop_chain'.
1187 If no stop chain is passed, call build_bpstat_chain to build it.
1188 * breakpoint.h (build_bpstat_chain): Declare.
1189 (bpstat_stop_status): Move documentation here from breakpoint.c.
1190 * infrun.c (handle_signal_stop): Before eliding inlined frames,
1191 build the stop chain and pass it to skip_inline_frames.
1192 Pass this stop chain to bpstat_stop_status.
1193 * inline-frame.c: Include breakpoint.h.
1194 (stopped_by_user_bp_inline_frame): New function.
1195 (skip_inline_frames): Add parameter `stop_chain'.
1196 Move documention to inline-frame.h.
1197 If non-NULL, use stopped_by_user_bp_inline_frame to determine
1198 whether the frame should be elided.
1199 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1200 Add moved documentation and update for new parameter.
1202 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1205 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1206 unittests/format_pieces-selftests.c.
1207 * common/format.h (format_piece) <operator==>: New.
1208 (format_pieces) <operator[]>: Remove.
1209 * common/format.c (format_pieces::format_pieces): Handle \e.
1210 * unittests/format_pieces-selftests.c: New.
1212 2018-05-17 Tom Tromey <tom@tromey.com>
1215 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1216 (dw2_instantiate_symtab): Add skip_partial parameter.
1217 (dw2_find_last_source_symtab, dw2_map_expand_apply)
1218 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1219 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1220 (dw2_expand_symtabs_matching_one)
1221 (dw2_find_pc_sect_compunit_symtab)
1222 (dw2_debug_names_lookup_symbol)
1223 (dw2_debug_names_expand_symtabs_for_function): Update.
1224 (init_cutu_and_read_dies): Add skip_partial parameter.
1225 (process_psymtab_comp_unit, build_type_psymtabs_1)
1226 (process_skeletonless_type_unit, load_partial_comp_unit)
1227 (psymtab_to_symtab_1): Update.
1228 (load_full_comp_unit): Add skip_partial parameter.
1229 (process_imported_unit_die, dwarf2_read_addr_index)
1230 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1231 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1232 (read_signatured_type): Update.
1234 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1236 * value.c (release_value): Remove unused variable.
1237 (record_latest_value): Likewise.
1238 (access_value_history): Likewise.
1239 (preserve_values): Likewise.
1241 2018-05-17 Tom Tromey <tom@tromey.com>
1243 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1246 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1249 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1250 Also handle registers whose width is not a multiple of
1252 (linux_nat_trad_target::store_register): Likewise.
1254 2018-05-16 Tom Tromey <tom@tromey.com>
1256 * gdbcore.h (core_bfd): Redefine.
1257 * corelow.c (core_target::close): Update.
1258 (core_target_open): Update.
1259 * progspace.h (struct program_space) <cbfd>: Now a
1262 2018-05-16 Tom Tromey <tom@tromey.com>
1265 * symfile-add-flags.h (enum symfile_add_flags)
1266 <SYMFILE_NOT_FILENAME>: New constant.
1267 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
1268 objfile name from BFD.
1269 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1270 * minidebug.c (find_separate_debug_file_in_section): Put
1271 ".gnu_debugdata" into BFD's file name.
1273 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
1275 * regcache.c (regcache_read_ftype, regcache_write_ftype):
1278 2018-05-15 Tamar Christina <tamar.christina@arm.com>
1281 * aarch64-tdep.c (aarch64_analyze_prologue,
1282 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
1283 Indicate not interested in errors.
1285 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1287 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
1288 Supply the MIPS_ZERO_REGNUM register.
1290 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1292 * mips-tdep.c (mask_address_var): Make variable static.
1294 2018-05-14 Tom Tromey <tom@tromey.com>
1296 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
1298 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
1300 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
1301 FXSAVE_ADDR for the mxcsr register.
1303 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
1305 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
1307 2018-05-11 Pedro Alves <palves@redhat.com>
1309 * corelow.c (core_target) <core_target>: No longer inline.
1310 Initialize m_core_gdbarch, m_core_vec and build the section table
1312 <~core_target>: New.
1313 <core_gdbarch, get_core_register_section>: New methods.
1314 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
1315 factored out from ...
1316 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
1318 (sniff_core_bfd): Add gdbarch parameter.
1319 (core_close): Delete, merged into ...
1320 (core_target::close): ... here. Delete self.
1321 (core_close_cleanup): Delete.
1322 (core_target_open): Allocate a core_target on the heap. Use a
1323 unique_ptr instead of a cleanup. Bits moved into the core_target
1324 ctor. Adjust to use core_target methods instead of globals.
1325 (get_core_register_section): Rename to ...
1326 (core_target::get_core_register_section): ... this and adjust.
1327 (struct get_core_registers_cb_data): New.
1328 (get_core_registers_cb): Use it. Use bool.
1329 (core_target::fetch_registers, core_target::files_info)
1330 (core_target::xfer_partial, core_target::read_description)
1331 (core_target::pid_to, core_target::thread_name): Adjust to
1332 reference class fields instead of globals.
1333 * target.h (struct target_ops_deleter, target_ops_up): New.
1335 2018-05-11 Pedro Alves <palves@redhat.com>
1337 * corefile.c (core_file_command): Move to corelow.c.
1338 * corelow.c (the_core_target): Delete.
1339 (core_file_command): Moved from corefile.c. Check exec_bfd
1340 instead of the_core_target. Use target_detach instead of calling
1341 into the_core_target directly.
1342 (maybe_say_no_core_file_now): New.
1343 (core_target::detach): Use it.
1344 (_initialize_corelow): Remove references to the_core_target.
1345 * gdbcore.h (the_core_target): Delete.
1347 2018-05-11 Tom Tromey <tromey@redhat.com>
1348 Pedro Alves <palves@redhat.com>
1350 * corefile.c (core_bfd): Remove.
1351 * gdbcore.h (core_bfd): Now a macro.
1352 * progspace.h (struct program_space) <cbfd>: New field.
1354 2018-05-11 Tom Tromey <tom@tromey.com>
1356 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
1359 2018-05-10 Tom Tromey <tom@tromey.com>
1361 * configure: Rebuild.
1362 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
1364 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1367 * regformats/regdat.sh: Adjust script, following the addition
1368 of the new expedite_regs parameter to init_target_desc.
1370 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
1373 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
1374 set_gdbarch_significant_addr_bit.
1375 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
1376 set_gdbarch_significant_addr_bit.
1377 * utils.c (address_significant): Update to sign extend addr.
1379 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
1381 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
1382 (xtensa_linux_init_abi): Limit tdep->num_regs by
1383 tdep->num_nopriv_regs.
1384 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
1385 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
1388 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
1390 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
1392 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1394 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
1395 (I387_MXCSR_INIT_VAL): New constant.
1396 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
1397 buffer if it was supplied by the inferior.
1398 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
1399 (i387_xsave_get_clear_bv): New function.
1400 (i387_supply_xsave): Only read x87 control registers from the
1401 xsave buffer if the feature is enabled, and the state will have
1402 been written, otherwise, provide a suitable default.
1403 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
1404 including x87 control registers. Update control registers if they
1405 have changed from the default value, and mark features as enabled
1407 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
1409 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1411 * spu-tdep.c (info_spu_event_command): Fix output formatting.
1413 2018-05-07 Tom Tromey <tom@tromey.com>
1415 * configure: Rebuild.
1416 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
1418 2018-05-07 Tom Tromey <tom@tromey.com>
1421 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
1422 bit. Use correct value for VDIV.
1424 2018-05-04 Tom Tromey <tom@tromey.com>
1426 * configure: Rebuild.
1427 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
1429 2018-05-04 Tom Tromey <tom@tromey.com>
1431 * linux-record.c (record_linux_system_call) <case
1432 RECORD_SYS_RECVFROM>: Add "break".
1434 2018-05-04 Tom Tromey <tom@tromey.com>
1436 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
1437 Add missing "break".
1438 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
1439 Add missing "break".
1441 2018-05-04 Tom Tromey <tom@tromey.com>
1443 * rs6000-tdep.c (ppc_process_record_op4)
1444 (ppc_process_record_op63): Add fall-through comment.
1446 2018-05-04 Tom Tromey <tom@tromey.com>
1448 * i386-tdep.c (i386_process_record): Add fall-through comment.
1450 2018-05-04 Tom Tromey <tom@tromey.com>
1452 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
1455 2018-05-04 Tom Tromey <tom@tromey.com>
1457 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
1458 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
1459 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
1461 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
1463 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
1466 2018-05-04 Tom Tromey <tom@tromey.com>
1468 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
1470 2018-05-04 Tom Tromey <tom@tromey.com>
1472 * s390-tdep.c (s390_process_record): Fix fall-through comments.
1473 * xcoffread.c (scan_xcoff_symtab): Move comment later.
1474 * symfile.c (section_is_mapped): Fix fall-through comment.
1475 * stabsread.c (define_symbol, read_member_functions): Fix
1476 fall-through comment.
1477 * s390-linux-tdep.c (s390_process_record): Fix fall-through
1479 * remote.c (remote_wait_as): Fix fall-through comment.
1480 * p-exp.y (yylex): Fix fall-through comment.
1481 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
1483 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
1484 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
1485 * jv-exp.y (yylex): Fix fall-through comment.
1486 * go-exp.y (lex_one_token): Fix fall-through comment.
1487 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
1488 fall-through comment.
1489 * f-exp.y (yylex): Fix fall-through comment.
1490 * dwarf2read.c (process_die): Fix fall-through comments.
1491 * dbxread.c (process_one_symbol): Fix fall-through comment.
1492 * d-exp.y (lex_one_token): Fix fall-through comment.
1493 * cp-name-parser.y (yylex): Fix fall-through comment.
1494 * coffread.c (coff_symtab_read): Fix fall-through comment.
1495 * c-exp.y (lex_one_token): Fix fall-through comment.
1496 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
1498 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
1501 2018-05-04 Tom Tromey <tom@tromey.com>
1504 * NEWS: Mention gdb.execute change.
1505 * gdbcmd.h (execute_control_command): Don't declare.
1506 * python/python.c (execute_gdb_command): Use read_command_lines_1,
1507 execute_control_commands, execute_control_commands_to_string.
1508 * cli/cli-script.h (execute_control_commands)
1509 (execute_control_commands_to_string): Declare.
1510 (execute_control_command): Add from_tty parameter.
1511 * cli/cli-script.c (execute_control_commands)
1512 (execute_control_commands_to_string): New functions.
1513 (execute_user_command): Use execute_control_commands.
1514 (execute_control_command_1): Add "from_tty" parameter. Update.
1515 (execute_control_command): Likewise.
1517 2018-05-04 Tom Tromey <tom@tromey.com>
1520 * NEWS: Mention that breakpoint commands are writable.
1521 * python/py-breakpoint.c (bppy_set_commands): New function.
1522 (breakpoint_object_getset) <"commands">: Use it.
1524 2018-05-04 Tom Tromey <tom@tromey.com>
1526 * tracepoint.c (actions_command): Update.
1527 * mi/mi-cmd-break.c (mi_command_line_array)
1528 (mi_command_line_array_cnt, mi_command_line_array_ptr)
1529 (mi_read_next_line): Remove.
1530 (mi_cmd_break_commands): Update.
1531 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
1533 * cli/cli-script.c (get_command_line): Update.
1534 (process_next_line): Use function_view. Constify.
1535 (recurse_read_control_structure, read_command_lines)
1536 (read_command_lines_1): Change argument types to function_view.
1537 (do_define_command, document_command): Update.
1538 * breakpoint.h (check_tracepoint_command): Don't declare.
1539 * breakpoint.c (check_tracepoint_command): Remove.
1540 (commands_command_1, create_tracepoint_from_upload): Update.
1542 2018-05-04 Tom Tromey <tom@tromey.com>
1545 * cli/cli-script.h (enum command_control_type) <define_control>:
1547 * cli/cli-script.c (multi_line_command_p): Handle define_control.
1548 (build_command_line, execute_control_command_1)
1549 (process_next_line): Likewise.
1550 (do_define_command): New function, extracted from define_command.
1551 (define_command): Use it.
1553 2018-05-04 Tom Tromey <tom@tromey.com>
1555 * tracepoint.c (actions_command): Update.
1556 * cli/cli-script.h (read_command_lines): Update.
1557 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
1558 (MAX_TMPBUF): Remove define.
1559 (define_command): Use string_printf.
1560 (document_command): Likewise.
1561 * breakpoint.c (commands_command_1): Update.
1563 2018-05-04 Tom Tromey <tom@tromey.com>
1565 * top.c (execute_command): Update.
1566 * cli/cli-script.h (print_command_lines): Now varargs.
1567 * cli/cli-script.c (print_command_lines): Now varargs.
1568 (execute_control_command_1) <case while_control, case if_control>:
1571 2018-05-04 Tom Tromey <tom@tromey.com>
1573 * tracepoint.c (all_tracepoint_actions): Rename from
1574 all_tracepoint_actions_and_cleanup. Change return type.
1575 (actions_command, encode_actions_1, encode_actions)
1576 (trace_dump_actions, tdump_command): Update.
1577 * remote.c (remote_download_command_source): Update.
1578 * python/python.c (gdbpy_eval_from_control_command)
1579 (python_command, python_interactive_command): Update.
1580 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1581 * guile/guile.c (guile_command)
1582 (gdbscm_eval_from_control_command, guile_command): Update.
1583 * compile/compile.c (compile_code_command)
1584 (compile_print_command, compile_to_object): Update.
1585 * cli/cli-script.h (struct command_lines_deleter): New.
1586 (counted_command_line): New typedef.
1587 (struct command_line): Add constructor, destructor.
1588 <body_list>: Remove.
1589 <body_list_0, body_list_1>: New members.
1590 (command_line_up): Remove typedef.
1591 (read_command_lines, read_command_lines_1, get_command_line):
1593 (copy_command_lines): Don't declare.
1594 * cli/cli-script.c (build_command_line): Use "new".
1595 (get_command_line): Return counted_command_line.
1596 (print_command_lines, execute_user_command)
1597 (execute_control_command_1, while_command, if_command): Update.
1598 (realloc_body_list): Remove.
1599 (process_next_line, recurse_read_control_structure): Update.
1600 (read_command_lines, read_command_lines_1): Return counted_command_line.
1601 (free_command_lines): Use "delete".
1602 (copy_command_lines): Remove.
1603 (define_command, document_command, show_user_1): Update.
1604 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
1605 a counted_command_line.
1606 * breakpoint.h (counted_command_line): Remove typedef.
1607 (breakpoint_set_commands): Update.
1608 * breakpoint.c (check_no_tracepoint_commands)
1609 (validate_commands_for_breakpoint): Update.
1610 (breakpoint_set_commands): Change commands to be a
1611 counted_command_line.
1612 (commands_command_1, update_dprintf_command_list)
1613 (create_tracepoint_from_upload): Update.
1615 2018-05-04 Tom Tromey <tom@tromey.com>
1617 * cli/cli-decode.h (cmd_list_element): New constructor.
1618 (~cmd_list_element): New destructor.
1619 (struct cmd_list_element): Add initializers.
1620 * cli/cli-decode.c (do_add_cmd): Use "new".
1621 (delete_cmd): Use "delete".
1623 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1624 Pedro Alves <palves@redhat.com>
1626 PR breakpoints/19806 and support for PR external/20207.
1627 * NEWS: Mention Aarch64 watchpoint improvements.
1628 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
1629 watchpoints and PR external/20207 watchpoints.
1630 * nat/aarch64-linux-hw-point.c
1631 (kernel_supports_any_contiguous_range): New.
1632 (aarch64_watchpoint_offset): New.
1633 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
1634 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
1635 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
1636 (aarch64_align_watchpoint): New parameters aligned_offset_p and
1637 next_addr_orig_p. Support PR external/20207 watchpoints.
1638 (aarch64_downgrade_regs): New.
1639 (aarch64_dr_state_insert_one_point): New parameters offset and
1641 (aarch64_dr_state_remove_one_point): Likewise.
1642 (aarch64_handle_breakpoint): Update caller.
1643 (aarch64_handle_aligned_watchpoint): Likewise.
1644 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
1646 (aarch64_linux_set_debug_regs): Remove const from state. Call
1647 aarch64_downgrade_regs.
1648 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
1649 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
1650 (DR_CONTROL_MASK): ... this.
1651 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
1652 (unsigned int aarch64_watchpoint_offset): New prototype.
1653 (aarch64_linux_set_debug_regs): Remove const from state.
1654 * utils.c (align_up, align_down): Move to ...
1655 * common/common-utils.c (align_up, align_down): ... here.
1656 * utils.h (align_up, align_down): Move to ...
1657 * common/common-utils.h (align_up, align_down): ... here.
1659 2018-05-04 Joel Brobecker <brobecker@adacore.com>
1661 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
1662 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
1663 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
1664 Re-implement to match the ABI as summarized in GCC's
1665 gcc/config/sparc/sparc.c. All callers updated.
1666 (sparc32_store_arguments): Remove assertion.
1668 2018-05-04 Tom Tromey <tom@tromey.com>
1670 * printcmd.c: Don't include tui.h.
1671 (decode_format): Use skip_spaces.
1673 2018-05-04 Tom Tromey <tom@tromey.com>
1676 * printcmd.c (last_count): New global.
1677 (x_command): Use saved count when repeating.
1679 2018-05-04 Tom Tromey <tom@tromey.com>
1681 * nto-procfs.c (do_closedir_cleanup): Remove.
1682 (procfs_pidlist): Use gdb_dir_up.
1683 * procfs.c (do_closedir_cleanup): Remove.
1684 (proc_update_threads): Use gdb_dir_up.
1685 * common/filestuff.h (struct gdb_dir_deleter): New.
1686 (gdb_dir_up): New typedef.
1688 2018-05-04 Tom Tromey <tom@tromey.com>
1690 * ada-lang.c (print_mention_exception): Use std::string.
1692 2018-05-04 Tom Tromey <tom@tromey.com>
1694 * ada-lang.c (create_excep_cond_exprs): Update.
1695 (ada_exception_catchpoint_cond_string): Use std::string.
1697 2018-05-04 Tom Tromey <tom@tromey.com>
1699 * ada-lang.c (xget_renaming_scope): Return std::string.
1700 (old_renaming_is_invisible): Update.
1702 2018-05-04 Tom Tromey <tom@tromey.com>
1704 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
1705 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
1707 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
1709 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
1711 2018-05-04 Tom Tromey <tom@tromey.com>
1713 * remote.c (remote_query_supported_append): Change type.
1714 (remote_check_symbols): Update.
1716 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
1719 * configure.ac: Prepend libpython.
1720 * python/python-config.py: Likewise.
1721 * configure: Regenerate.
1723 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
1725 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
1727 2018-05-03 Pedro Alves <palves@redhat.com>
1730 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
1731 override. Write 'true' instead of '1'.
1732 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
1735 2018-05-02 Pedro Alves <palves@redhat.com>
1737 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
1738 add_inf_child_target.
1739 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
1740 add_inf_child_target.
1741 * aix-thread.c (aix_thread_target_info): New.
1742 (aix_thread_target) <shortname, longname, doc>: Delete.
1744 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
1745 add_inf_child_target.
1746 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
1747 add_inf_child_target.
1748 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
1749 add_inf_child_target.
1750 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
1751 add_inf_child_target.
1752 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
1753 add_inf_child_target.
1754 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
1755 add_inf_child_target.
1756 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
1757 add_inf_child_target.
1758 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
1759 add_inf_child_target.
1760 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
1761 add_inf_child_target.
1762 * bfd-target.c (target_bfd_target_info): New.
1763 (target_bfd) <shortname, longname, doc>: Delete.
1765 * bsd-kvm.c (bsd_kvm_target_info): New.
1766 (bsd_kvm_target) <shortname, longname, doc>: Delete.
1768 (bsd_kvm_target::open): Rename to ...
1769 (bsd_kvm_target_open): ... this. Adjust.
1770 * bsd-uthread.c (bsd_uthread_target_info): New.
1771 (bsd_uthread_target) <shortname, longname, doc>: Delete.
1773 * corefile.c (core_file_command): Adjust.
1774 * corelow.c (core_target_info): New.
1775 (core_target) <shortname, longname, doc>: Delete.
1777 (core_target::open): Rename to ...
1778 (core_target_open): ... this. Adjust.
1779 * ctf.c (ctf_target_info): New.
1780 (ctf_target) <shortname, longname, doc>: Delete.
1782 (ctf_target::open): Rename to ...
1783 (ctf_target_open): ... this.
1784 (_initialize_ctf): Adjust.
1785 * exec.c (exec_target_info): New.
1786 (exec_target) <shortname, longname, doc>: Delete.
1788 (exec_target::open): Rename to ...
1789 (exec_target_open): ... this.
1790 * gdbcore.h (core_target_open): Declare.
1791 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
1792 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
1793 add_inf_child_target.
1794 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
1795 add_inf_child_target.
1796 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
1797 add_inf_child_target.
1798 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
1799 add_inf_child_target.
1800 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
1801 add_inf_child_target.
1802 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
1803 add_inf_child_target.
1804 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
1805 add_inf_child_target.
1806 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
1807 add_inf_child_target.
1808 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
1809 add_inf_child_target.
1810 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
1811 add_inf_child_target.
1812 * inf-child.c (inf_child_target_info): New.
1813 (inf_child_target::info): New.
1814 (inf_child_open_target): Remove 'target' parameter. Use
1815 get_native_target instead.
1816 (inf_child_target::open): Delete.
1817 (add_inf_child_target): New.
1818 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
1821 (add_inf_child_target): Declare.
1822 (inf_child_open_target): Declare.
1823 * linux-thread-db.c (thread_db_target_info): New.
1824 (thread_db_target) <shortname, longname, doc>: Delete.
1826 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
1827 add_inf_child_target.
1828 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
1829 add_inf_child_target.
1830 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
1831 add_inf_child_target.
1832 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
1833 add_inf_child_target.
1834 * make-target-delegates (print_class): Adjust.
1835 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
1836 add_inf_child_target.
1837 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
1838 add_inf_child_target.
1839 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
1840 add_inf_child_target.
1841 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
1842 add_inf_child_target.
1843 * nto-procfs.c (nto_native_target_info): New.
1844 (nto_procfs_target_native) <shortname, longname, doc>:
1847 (nto_procfs_target_info): New.
1848 (nto_procfs_target_procfs) <shortname, longname, doc>:
1851 (init_procfs_targets): Adjust.
1852 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
1853 add_inf_child_target.
1854 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
1855 add_inf_child_target.
1856 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
1857 add_inf_child_target.
1858 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
1859 add_inf_child_target.
1860 * ravenscar-thread.c (ravenscar_target_info): New.
1861 (ravenscar_thread_target) <shortname, longname, doc>:
1864 * record-btrace.c (record_btrace_target_info):
1865 (record_btrace_target) <shortname, longname, doc>: Delete.
1867 (record_btrace_target::open): Rename to ...
1868 (record_btrace_target_open): ... this. Adjust.
1869 * record-full.c (record_longname, record_doc): New.
1870 (record_full_base_target) <shortname, longname, doc>: Delete.
1872 (record_full_target_info): New.
1873 (record_full_target): <shortname>: Delete.
1875 (record_full_core_open_1, record_full_open_1): Update comments.
1876 (record_full_base_target::open): Rename to ...
1877 (record_full_open): ... this.
1878 (cmd_record_full_restore): Update.
1879 (_initialize_record_full): Update.
1880 * remote-sim.c (remote_sim_target_info): New.
1881 (gdbsim_target) <shortname, longname, doc>: Delete.
1883 (gdbsim_target::open): Rename to ...
1884 (gdbsim_target_open): ... this.
1885 (_initialize_remote_sim): Adjust.
1886 * remote.c (remote_doc): New.
1887 (remote_target_info): New.
1888 (remote_target) <shortname, longname, doc>: Delete.
1890 (extended_remote_target_info): New.
1891 (extended_remote_target) <shortname, longname, doc>: Delete.
1893 (remote_target::open_1): Make static. Adjust.
1894 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
1895 * s390-linux-nat.c (_initialize_s390_nat): Use
1896 add_inf_child_target.
1897 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
1898 add_inf_child_target.
1899 * sol-thread.c (thread_db_target_info): New.
1900 (sol_thread_target) <shortname, longname, doc>: Delete.
1902 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
1903 add_inf_child_target.
1904 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
1905 add_inf_child_target.
1906 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
1907 add_inf_child_target.
1908 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
1909 add_inf_child_target.
1910 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
1911 add_inf_child_target.
1912 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
1913 add_inf_child_target.
1914 * spu-linux-nat.c (_initialize_spu_nat): Use
1915 add_inf_child_target.
1916 * spu-multiarch.c (spu_multiarch_target_info): New.
1917 (spu_multiarch_target) <shortname, longname, doc>: Delete.
1919 * target-delegates.c: Regenerate.
1920 * target.c: Include <unordered_map>.
1921 (target_ops_p): Delete.
1922 (DEF_VEC_P(target_ops_p)): Delete.
1923 (target_factories): New.
1924 (test_target_info): New.
1925 (test_target_ops::info): New.
1926 (open_target): Adjust to use target_factories.
1927 (add_target_with_completer): Rename to ...
1928 (add_target): ... this. Change prototype. Register target_info
1929 and open callback in target_factories. Register target_info in
1930 command context instead of target_ops.
1931 (add_target): Delete old implementation.
1932 (add_deprecated_target_alias): Change prototype. Adjust.
1933 (the_native_target): New.
1934 (set_native_target, get_native_target): New.
1935 (find_default_run_target): Use the_native_target.
1936 (find_attach_target, find_run_target): Simplify.
1937 (target_ops::open): Delete.
1938 (dummy_target_info): New.
1939 (dummy_target::shortname, dummy_target::longname)
1940 (dummy_target::doc): Delete.
1941 (dummy_target::info): New.
1942 (debug_target::shortname, debug_target::longname)
1943 (debug_target::doc): Delete.
1944 (debug_target::info): New.
1945 * target.h (struct target_info): New.
1946 (target_ops::~target_ops): Add comment.
1947 (target_ops::info): New.
1948 (target_ops::shortname, target_ops::longname, target_ops::doc): No
1949 longer virtual. Implement in terms of target_info.
1950 (set_native_target, get_native_target): Declare.
1951 (target_open_ftype): New.
1952 (add_target, add_target_with_completer)
1953 (add_deprecated_target_alias): Change prototype.
1954 (test_target) <shortname, longname, doc>: Delete.
1956 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
1957 add_inf_child_target.
1958 * tracefile-tfile.c (tfile_target_info): New.
1959 (tfile_target) <shortname, longname, doc>: Delete.
1961 (tfile_target::open): Rename to ...
1962 (tfile_target_open): ... this.
1963 (_initialize_tracefile_tfile): Adjust.
1964 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
1965 add_inf_child_target.
1966 * windows-nat.c (_initialize_windows_nat): Use
1967 add_inf_child_target.
1968 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
1969 add_inf_child_target.
1971 2018-05-02 Pedro Alves <palves@redhat.com>
1973 * linux-nat.h (linux_nat_target) <low_new_thread,
1974 low_delete_thread, low_new_fork, low_forget_process,
1975 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
1976 New virtual methods.
1977 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1978 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
1979 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
1980 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1981 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
1983 * linux-fork.c (delete_fork): Adjust to call low method.
1984 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
1985 (linux_nat_new_fork, linux_nat_forget_process_hook)
1986 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
1987 (linux_nat_status_is_event):
1988 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
1989 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
1991 (sigtrap_is_event): Rename to ...
1992 (linux_nat_target::low_status_is_event): ... this.
1993 (linux_nat_set_status_is_event): Delete.
1994 (save_stop_reason, linux_nat_wait_1)
1995 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
1997 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1998 (linux_nat_set_new_fork, linux_nat_set_forget_process)
1999 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2000 (linux_nat_set_prepare_to_resume): Delete.
2001 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
2002 low virtual methods.
2003 * amd64-linux-nat.c: Likewise.
2004 * arm-linux-nat.c: Likewise.
2005 * i386-linux-nat.c: Likewise.
2006 * ia64-linux-nat.c: Likewise.
2007 * mips-linux-nat.c: Likewise.
2008 * ppc-linux-nat.c: Likewise.
2009 * s390-linux-nat.c: Likewise.
2010 * sparc64-linux-nat.c: Likewise.
2011 * x86-linux-nat.c: Likewise.
2012 * x86-linux-nat.h: Include "nat/x86-linux.h".
2013 (x86_linux_nat_target) <low_new_fork, low_forget_process,
2014 low_prepare_to_resume, low_new_thread, low_delete_thread>:
2017 2018-05-02 Pedro Alves <palves@redhat.com>
2019 * target.h (target_ops)
2020 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2021 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
2022 stopped_by_watchpoint, have_continuable_watchpoint,
2023 stopped_data_address, watchpoint_addr_within_range,
2024 can_accel_watchpoint_condition, can_run, thread_alive,
2025 has_all_memory, has_memory, has_stack, has_registers,
2026 has_execution, can_async_p, is_async_p, supports_non_stop,
2027 always_non_stop_p, can_execute_reverse, supports_multi_process,
2028 supports_enable_disable_tracepoint,
2029 supports_disable_randomization, supports_string_tracing,
2030 supports_evaluation_of_breakpoint_conditions,
2031 can_run_breakpoint_commands, filesystem_is_local,
2032 can_download_tracepoint, get_trace_state_variable_value,
2033 set_trace_notes, get_tib_address, use_agent, can_use_agent,
2034 record_is_replaying, record_will_replay,
2035 augmented_libraries_svr4_read>: Adjust to return bool.
2036 * aarch64-linux-nat.c: All implementations adjusted.
2037 * aix-thread.c: All implementations adjusted.
2038 * arm-linux-nat.c: All implementations adjusted.
2039 * breakpoint.c: All implementations adjusted.
2040 * bsd-kvm.c: All implementations adjusted.
2041 * bsd-uthread.c: All implementations adjusted.
2042 * corelow.c: All implementations adjusted.
2043 * ctf.c: All implementations adjusted.
2044 * darwin-nat.c: All implementations adjusted.
2045 * darwin-nat.h: All implementations adjusted.
2046 * exec.c: All implementations adjusted.
2047 * fbsd-nat.c: All implementations adjusted.
2048 * fbsd-nat.h: All implementations adjusted.
2049 * gnu-nat.c: All implementations adjusted.
2050 * gnu-nat.h: All implementations adjusted.
2051 * go32-nat.c: All implementations adjusted.
2052 * ia64-linux-nat.c: All implementations adjusted.
2053 * inf-child.c: All implementations adjusted.
2054 * inf-child.h: All implementations adjusted.
2055 * inf-ptrace.c: All implementations adjusted.
2056 * inf-ptrace.h: All implementations adjusted.
2057 * linux-nat.c: All implementations adjusted.
2058 * linux-nat.h: All implementations adjusted.
2059 * mips-linux-nat.c: All implementations adjusted.
2060 * nto-procfs.c: All implementations adjusted.
2061 * ppc-linux-nat.c: All implementations adjusted.
2062 * procfs.c: All implementations adjusted.
2063 * ravenscar-thread.c: All implementations adjusted.
2064 * record-btrace.c: All implementations adjusted.
2065 * record-full.c: All implementations adjusted.
2066 * remote-sim.c: All implementations adjusted.
2067 * remote.c: All implementations adjusted.
2068 * s390-linux-nat.c: All implementations adjusted.
2069 * sol-thread.c: All implementations adjusted.
2070 * spu-multiarch.c: All implementations adjusted.
2071 * target-delegates.c: All implementations adjusted.
2072 * target.c: All implementations adjusted.
2073 * target.h: All implementations adjusted.
2074 * tracefile-tfile.c: All implementations adjusted.
2075 * tracefile.c: All implementations adjusted.
2076 * tracefile.h: All implementations adjusted.
2077 * windows-nat.c: All implementations adjusted.
2078 * x86-linux-nat.h: All implementations adjusted.
2079 * x86-nat.h: All implementations adjusted.
2081 2018-05-02 Pedro Alves <palves@redhat.com>
2083 * make-target-delegates (scan_target_h): Don't trim lines here.
2084 Replace sequences of tabs and/or whitespace with a single
2086 (top level, parsing methods): Trim each line before processing it
2089 2018-05-02 Pedro Alves <palves@redhat.com>
2090 John Baldwin <jhb@freebsd.org>
2092 * target.h (enum strata) <debug_stratum>: New.
2093 (struct target_ops) <all delegation methods>: Replace by C++
2094 virtual methods, and drop "to_" prefix. All references updated
2096 <to_shortname, to_longname, to_doc, to_data,
2097 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2098 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2099 virtual methods. All references updated throughout.
2100 <can_attach, supports_terminal_ours, can_create_inferior,
2101 get_thread_control_capabilities, attach_no_wait>: New
2103 <insert_breakpoint, remove_breakpoint>: Now
2104 TARGET_DEFAULT_NORETURN methods.
2105 <info_proc>: Now returns bool.
2107 (OPS_MAGIC): Delete.
2108 (current_target): Delete. All references replaced by references
2110 (target_stack): ... this. New.
2111 (target_shortname, target_longname): Adjust.
2112 (target_can_run): Now a function declaration.
2113 (default_child_has_all_memory, default_child_has_memory)
2114 (default_child_has_stack, default_child_has_registers)
2115 (default_child_has_execution): Remove target_ops parameter.
2116 (complete_target_initialization): Delete.
2117 (memory_breakpoint_target): New template class.
2118 (test_target_ops): Refactor as a C++ class with virtual methods.
2119 * make-target-delegates (NAME_PART): Tighten.
2120 (POINTER_PART, CP_SYMBOL): New.
2121 (SIMPLE_RETURN_PART): Reimplement.
2122 (VEC_RETURN_PART): Expect less.
2123 (RETURN_PART, VIRTUAL_PART): New.
2124 (METHOD): Adjust to C++ virtual methods.
2125 (scan_target_h): Remove reference to C99.
2126 (dname): Output "target_ops::" prefix.
2127 (write_function_header): Adjust to output a C++ class method.
2128 (write_declaration): New.
2129 (write_delegator): Adjust to output a C++ class method.
2130 (tdname): Output "dummy_target::" prefix.
2131 (write_tdefault, write_debugmethod): Adjust to output a C++ class
2133 (tdefault_names, debug_names): Delete.
2134 (return_types, tdefaults, styles, argtypes_array): New.
2135 (top level): All methods are delegators.
2137 (top level): Print dummy_target and debug_target classes.
2138 * target-delegates.c: Regenerate.
2139 * target-debug.h (target_debug_print_enum_info_proc_what)
2140 (target_debug_print_thread_control_capabilities)
2141 (target_debug_print_thread_info_p): New.
2142 * target.c (dummy_target): Delete.
2143 (the_dummy_target, the_debug_target): New.
2144 (target_stack): Now extern.
2145 (set_targetdebug): Push/unpush debug target.
2146 (default_child_has_all_memory, default_child_has_memory)
2147 (default_child_has_stack, default_child_has_registers)
2148 (default_child_has_execution): Remove target_ops parameter.
2149 (complete_target_initialization): Delete.
2150 (add_target_with_completer): No longer call
2151 complete_target_initialization.
2152 (target_supports_terminal_ours): Use regular delegation.
2153 (update_current_target): Delete.
2154 (push_target): No longer check magic number. Don't call
2155 update_current_target.
2156 (unpush_target): Don't call update_current_target.
2157 (target_is_pushed): No longer check magic number.
2158 (target_require_runnable): Skip for all stratums over
2160 (target_ops::info_proc): New.
2161 (target_info_proc): Use find_target_at and
2162 find_default_run_target.
2163 (target_supports_disable_randomization): Use regular delegation.
2164 (target_get_osdata): Use find_target_at.
2165 (target_ops::open, target_ops::close, target_ops::can_attach)
2166 (target_ops::attach, target_ops::can_create_inferior)
2167 (target_ops::create_inferior, target_ops::can_run)
2168 (target_can_run): New.
2169 (default_fileio_target): Use regular delegation.
2170 (target_ops::fileio_open, target_ops::fileio_pwrite)
2171 (target_ops::fileio_pread, target_ops::fileio_fstat)
2172 (target_ops::fileio_close, target_ops::fileio_unlink)
2173 (target_ops::fileio_readlink): New.
2174 (target_fileio_open_1, target_fileio_unlink)
2175 (target_fileio_readlink): Always call the target method. Handle
2177 (return_zero, return_zero_has_execution): Delete.
2178 (init_dummy_target): Delete.
2179 (dummy_target::dummy_target, dummy_target::shortname)
2180 (dummy_target::longname, dummy_target::doc)
2181 (debug_target::debug_target, debug_target::shortname)
2182 (debug_target::longname, debug_target::doc): New.
2183 (target_supports_delete_record): Use regular delegation.
2184 (setup_target_debug): Delete.
2185 (maintenance_print_target_stack): Skip debug_stratum.
2186 (initialize_targets): Instantiate the_dummy_target and
2188 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
2190 (target_auxv_search, fprint_target_auxv): Adjust.
2191 (info_auxv_command): Adjust to use target_stack.
2192 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2193 * exceptions.c (print_flush): Handle a NULL target_stack.
2194 * regcache.c (target_ops_no_register): Refactor as class with
2197 * exec.c (exec_target): New class.
2198 (exec_ops): Now an exec_target.
2199 (exec_open, exec_close_1, exec_get_section_table)
2200 (exec_xfer_partial, exec_files_info, exec_has_memory)
2201 (exec_make_note_section): Refactor as exec_target methods.
2202 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2204 (exec_target::find_memory_regions): New.
2205 (_initialize_exec): Don't call init_exec_ops.
2206 * gdbcore.h (exec_file_clear): Delete.
2208 * corefile.c (core_target): Delete.
2209 (core_file_command): Adjust.
2210 * corelow.c (core_target): New class.
2211 (the_core_target): New.
2212 (core_close): Remove target_ops parameter.
2213 (core_close_cleanup): Adjust.
2214 (core_target::close): New.
2215 (core_open, core_detach, get_core_registers, core_files_info)
2216 (core_xfer_partial, core_thread_alive, core_read_description)
2217 (core_pid_to_str, core_thread_name, core_has_memory)
2218 (core_has_stack, core_has_registers, core_info_proc): Rework as
2219 core_target methods.
2220 (ignore, core_remove_breakpoint, init_core_ops): Delete.
2221 (_initialize_corelow): Initialize the_core_target.
2222 * gdbcore.h (core_target): Delete.
2223 (the_core_target): New.
2225 * ctf.c: (ctf_target): New class.
2226 (ctf_ops): Now a ctf_target.
2227 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2228 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2229 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2231 (init_ctf_ops): Delete.
2232 (_initialize_ctf): Don't call it.
2233 * tracefile-tfile.c (tfile_target): New class.
2234 (tfile_ops): Now a tfile_target.
2235 (tfile_open, tfile_close, tfile_files_info)
2236 (tfile_get_tracepoint_status, tfile_trace_find)
2237 (tfile_fetch_registers, tfile_xfer_partial)
2238 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2239 Refactor as tfile_target methods.
2240 (tfile_xfer_partial_features): Remove target_ops parameter.
2241 (init_tfile_ops): Delete.
2242 (_initialize_tracefile_tfile): Don't call it.
2243 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2244 (tracefile_has_stack, tracefile_has_registers)
2245 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2246 tracefile_target methods.
2247 (init_tracefile_ops): Delete.
2248 (tracefile_target::tracefile_target): New.
2249 * tracefile.h: Include "target.h".
2250 (tracefile_target): New class.
2251 (init_tracefile_ops): Delete.
2253 * spu-multiarch.c (spu_multiarch_target): New class.
2254 (spu_ops): Now a spu_multiarch_target.
2255 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2256 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2257 (spu_search_memory, spu_mourn_inferior): Refactor as
2258 spu_multiarch_target methods.
2259 (init_spu_ops): Delete.
2260 (_initialize_spu_multiarch): Remove references to init_spu_ops,
2261 complete_target_initialization.
2263 * ravenscar-thread.c (ravenscar_thread_target): New class.
2264 (ravenscar_ops): Now a ravenscar_thread_target.
2265 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2266 (ravenscar_thread_alive, ravenscar_pid_to_str)
2267 (ravenscar_fetch_registers, ravenscar_store_registers)
2268 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2269 (ravenscar_stopped_by_hw_breakpoint)
2270 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2271 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2272 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2274 (init_ravenscar_thread_ops): Delete.
2275 (_initialize_ravenscar): Remove references to
2276 init_ravenscar_thread_ops and complete_target_initialization.
2278 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
2279 (bsd_uthread_target): New class.
2280 (bsd_uthread_ops): Now a bsd_uthread_target.
2281 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
2282 (bsd_uthread_close, bsd_uthread_mourn_inferior)
2283 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
2284 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
2285 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
2286 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
2287 (bsd_uthread_target): Delete function.
2288 (_initialize_bsd_uthread): Remove reference to
2289 complete_target_initialization.
2291 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
2292 (target_bfd): ... this new class.
2293 (target_bfd_xfer_partial, target_bfd_get_section_table)
2294 (target_bfd_close): Refactor as target_bfd methods.
2295 (target_bfd::~target_bfd): New.
2296 (target_bfd_reopen): Adjust.
2297 (target_bfd::close): New.
2299 * record-btrace.c (record_btrace_target): New class.
2300 (record_btrace_ops): Now a record_btrace_target.
2301 (record_btrace_open, record_btrace_stop_recording)
2302 (record_btrace_disconnect, record_btrace_close)
2303 (record_btrace_async, record_btrace_info)
2304 (record_btrace_insn_history, record_btrace_insn_history_range)
2305 (record_btrace_insn_history_from, record_btrace_call_history)
2306 (record_btrace_call_history_range)
2307 (record_btrace_call_history_from, record_btrace_record_method)
2308 (record_btrace_is_replaying, record_btrace_will_replay)
2309 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
2310 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
2311 (record_btrace_store_registers, record_btrace_prepare_to_store)
2312 (record_btrace_to_get_unwinder)
2313 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
2314 (record_btrace_commit_resume, record_btrace_wait)
2315 (record_btrace_stop, record_btrace_can_execute_reverse)
2316 (record_btrace_stopped_by_sw_breakpoint)
2317 (record_btrace_supports_stopped_by_sw_breakpoint)
2318 (record_btrace_stopped_by_hw_breakpoint)
2319 (record_btrace_supports_stopped_by_hw_breakpoint)
2320 (record_btrace_update_thread_list, record_btrace_thread_alive)
2321 (record_btrace_goto_begin, record_btrace_goto_end)
2322 (record_btrace_goto, record_btrace_stop_replaying_all)
2323 (record_btrace_execution_direction)
2324 (record_btrace_prepare_to_generate_core)
2325 (record_btrace_done_generating_core): Refactor as
2326 record_btrace_target methods.
2327 (init_record_btrace_ops): Delete.
2328 (_initialize_record_btrace): Remove reference to
2329 init_record_btrace_ops.
2330 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
2331 the execution_direction global.
2332 (record_full_base_target, record_full_target)
2333 (record_full_core_target): New classes.
2334 (record_full_ops): Now a record_full_target.
2335 (record_full_core_ops): Now a record_full_core_target.
2336 (record_full_target::detach, record_full_target::disconnect)
2337 (record_full_core_target::disconnect)
2338 (record_full_target::mourn_inferior, record_full_target::kill):
2340 (record_full_open, record_full_close, record_full_async): Refactor
2341 as methods of the record_full_base_target class.
2342 (record_full_resume, record_full_commit_resume): Refactor
2343 as methods of the record_full_target class.
2344 (record_full_wait, record_full_stopped_by_watchpoint)
2345 (record_full_stopped_data_address)
2346 (record_full_stopped_by_sw_breakpoint)
2347 (record_full_supports_stopped_by_sw_breakpoint)
2348 (record_full_stopped_by_hw_breakpoint)
2349 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
2350 methods of the record_full_base_target class.
2351 (record_full_store_registers, record_full_xfer_partial)
2352 (record_full_insert_breakpoint, record_full_remove_breakpoint):
2353 Refactor as methods of the record_full_target class.
2354 (record_full_can_execute_reverse, record_full_get_bookmark)
2355 (record_full_goto_bookmark, record_full_execution_direction)
2356 (record_full_record_method, record_full_info, record_full_delete)
2357 (record_full_is_replaying, record_full_will_replay)
2358 (record_full_goto_begin, record_full_goto_end, record_full_goto)
2359 (record_full_stop_replaying): Refactor as methods of the
2360 record_full_base_target class.
2361 (record_full_core_resume, record_full_core_kill)
2362 (record_full_core_fetch_registers)
2363 (record_full_core_prepare_to_store)
2364 (record_full_core_store_registers, record_full_core_xfer_partial)
2365 (record_full_core_insert_breakpoint)
2366 (record_full_core_remove_breakpoint)
2367 (record_full_core_has_execution): Refactor
2368 as methods of the record_full_core_target class.
2369 (record_full_base_target::supports_delete_record): New.
2370 (init_record_full_ops): Delete.
2371 (init_record_full_core_ops): Delete.
2372 (record_full_save): Refactor as method of the
2373 record_full_base_target class.
2374 (_initialize_record_full): Remove references to
2375 init_record_full_ops and init_record_full_core_ops.
2377 * remote.c (remote_target, extended_remote_target): New classes.
2378 (remote_ops): Now a remote_target.
2379 (extended_remote_ops): Now an extended_remote_target.
2380 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
2381 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
2382 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
2383 (remote_pass_signals, remote_set_syscall_catchpoint)
2384 (remote_program_signals, )
2385 (remote_thread_always_alive): Remove target_ops parameter.
2386 (remote_thread_alive, remote_thread_name)
2387 (remote_update_thread_list, remote_threads_extra_info)
2388 (remote_static_tracepoint_marker_at)
2389 (remote_static_tracepoint_markers_by_strid)
2390 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
2391 (remote_open): Refactor as methods of remote_target.
2392 (extended_remote_open, extended_remote_detach)
2393 (extended_remote_attach, extended_remote_post_attach):
2394 (extended_remote_supports_disable_randomization)
2395 (extended_remote_create_inferior): : Refactor as method of
2396 extended_remote_target.
2397 (remote_set_permissions, remote_open_1, remote_detach)
2398 (remote_follow_fork, remote_follow_exec, remote_disconnect)
2399 (remote_resume, remote_commit_resume, remote_stop)
2400 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
2401 (remote_terminal_ours, remote_wait, remote_fetch_registers)
2402 (remote_prepare_to_store, remote_store_registers)
2403 (remote_flash_erase, remote_flash_done, remote_files_info)
2404 (remote_kill, remote_mourn, remote_insert_breakpoint)
2405 (remote_remove_breakpoint, remote_insert_watchpoint)
2406 (remote_watchpoint_addr_within_range)
2407 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
2408 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
2409 (remote_supports_stopped_by_sw_breakpoint)
2410 (remote_stopped_by_hw_breakpoint)
2411 (remote_supports_stopped_by_hw_breakpoint)
2412 (remote_stopped_by_watchpoint, remote_stopped_data_address)
2413 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
2414 (remote_verify_memory): Refactor as methods of remote_target.
2415 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
2417 (remote_xfer_partial, remote_get_memory_xfer_limit)
2418 (remote_search_memory, remote_rcmd, remote_memory_map)
2419 (remote_pid_to_str, remote_get_thread_local_address)
2420 (remote_get_tib_address, remote_read_description): Refactor as
2421 methods of remote_target.
2422 (remote_target::fileio_open, remote_target::fileio_pwrite)
2423 (remote_target::fileio_pread, remote_target::fileio_close): New.
2424 (remote_hostio_readlink, remote_hostio_fstat)
2425 (remote_filesystem_is_local, remote_can_execute_reverse)
2426 (remote_supports_non_stop, remote_supports_disable_randomization)
2427 (remote_supports_multi_process, remote_supports_cond_breakpoints)
2428 (remote_supports_enable_disable_tracepoint)
2429 (remote_supports_string_tracing)
2430 (remote_can_run_breakpoint_commands, remote_trace_init)
2431 (remote_download_tracepoint, remote_can_download_tracepoint)
2432 (remote_download_trace_state_variable, remote_enable_tracepoint)
2433 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
2434 (remote_trace_start, remote_get_trace_status)
2435 (remote_get_tracepoint_status, remote_trace_stop)
2436 (remote_trace_find, remote_get_trace_state_variable_value)
2437 (remote_save_trace_data, remote_get_raw_trace_data)
2438 (remote_set_disconnected_tracing, remote_core_of_thread)
2439 (remote_set_circular_trace_buffer, remote_traceframe_info)
2440 (remote_get_min_fast_tracepoint_insn_len)
2441 (remote_set_trace_buffer_size, remote_set_trace_notes)
2442 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
2443 (remote_disable_btrace, remote_teardown_btrace)
2444 (remote_read_btrace, remote_btrace_conf)
2445 (remote_augmented_libraries_svr4_read, remote_load)
2446 (remote_pid_to_exec_file, remote_can_do_single_step)
2447 (remote_execution_direction, remote_thread_handle_to_thread_info):
2448 Refactor as methods of remote_target.
2449 (init_remote_ops, init_extended_remote_ops): Delete.
2450 (remote_can_async_p, remote_is_async_p, remote_async)
2451 (remote_thread_events, remote_upload_tracepoints)
2452 (remote_upload_trace_state_variables): Refactor as methods of
2454 (_initialize_remote): Remove references to init_remote_ops and
2455 init_extended_remote_ops.
2457 * remote-sim.c (gdbsim_target): New class.
2458 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
2459 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
2460 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
2461 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
2462 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
2463 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
2464 Refactor as methods of gdbsim_target.
2465 (gdbsim_ops): Now a gdbsim_target.
2466 (init_gdbsim_ops): Delete.
2467 (gdbsim_cntrl_c): Adjust.
2468 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
2470 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
2471 (the_amd64_linux_nat_target): New.
2472 (amd64_linux_fetch_inferior_registers)
2473 (amd64_linux_store_inferior_registers): Refactor as methods of
2474 amd64_linux_nat_target.
2475 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
2476 * i386-linux-nat.c: Don't include "linux-nat.h".
2477 (i386_linux_nat_target): New class.
2478 (the_i386_linux_nat_target): New.
2479 (i386_linux_fetch_inferior_registers)
2480 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
2481 as methods of i386_linux_nat_target.
2482 (_initialize_i386_linux_nat): Adjust. Set linux_target.
2483 * inf-child.c (inf_child_ops): Delete.
2484 (inf_child_fetch_inferior_registers)
2485 (inf_child_store_inferior_registers): Delete.
2486 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
2487 methods of inf_child_target.
2488 (inf_child_target::supports_terminal_ours)
2489 (inf_child_target::terminal_init)
2490 (inf_child_target::terminal_inferior)
2491 (inf_child_target::terminal_ours_for_output)
2492 (inf_child_target::terminal_ours, inf_child_target::interrupt)
2493 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
2495 (inf_child_open, inf_child_disconnect, inf_child_close)
2496 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
2497 (inf_child_post_startup_inferior, inf_child_can_run)
2498 (inf_child_pid_to_exec_file): Refactor as methods of
2500 (inf_child_follow_fork): Delete.
2501 (inf_child_target::can_create_inferior)
2502 (inf_child_target::can_attach): New.
2503 (inf_child_target::has_all_memory, inf_child_target::has_memory)
2504 (inf_child_target::has_stack, inf_child_target::has_registers)
2505 (inf_child_target::has_execution): New.
2506 (inf_child_fileio_open, inf_child_fileio_pwrite)
2507 (inf_child_fileio_pread, inf_child_fileio_fstat)
2508 (inf_child_fileio_close, inf_child_fileio_unlink)
2509 (inf_child_fileio_readlink, inf_child_use_agent)
2510 (inf_child_can_use_agent): Refactor as methods of
2512 (return_zero, inf_child_target): Delete.
2513 (inf_child_target::inf_child_target): New.
2514 * inf-child.h: Include "target.h".
2515 (inf_child_target): Delete function prototype.
2516 (inf_child_target): New class.
2517 (inf_child_open_target, inf_child_mourn_inferior)
2518 (inf_child_maybe_unpush_target): Delete.
2519 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
2520 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
2521 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
2522 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
2523 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
2524 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
2525 (inf_ptrace_wait, inf_ptrace_xfer_partial)
2526 (inf_ptrace_thread_alive, inf_ptrace_files_info)
2527 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
2528 methods of inf_ptrace_target.
2529 (inf_ptrace_target): Delete function.
2530 * inf-ptrace.h: Include "inf-child.h".
2531 (inf_ptrace_target): Delete function declaration.
2532 (inf_ptrace_target): New class.
2533 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
2534 * linux-nat.c (linux_target): New.
2535 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
2536 (linux_nat_target::~linux_nat_target): New.
2537 (linux_child_post_attach, linux_child_post_startup_inferior)
2538 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
2539 (linux_child_remove_fork_catchpoint)
2540 (linux_child_insert_vfork_catchpoint)
2541 (linux_child_remove_vfork_catchpoint)
2542 (linux_child_insert_exec_catchpoint)
2543 (linux_child_remove_exec_catchpoint)
2544 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
2545 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
2546 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
2547 (linux_nat_stopped_data_address)
2548 (linux_nat_stopped_by_sw_breakpoint)
2549 (linux_nat_supports_stopped_by_sw_breakpoint)
2550 (linux_nat_stopped_by_hw_breakpoint)
2551 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
2552 (linux_nat_kill, linux_nat_mourn_inferior)
2553 (linux_nat_xfer_partial, linux_nat_thread_alive)
2554 (linux_nat_update_thread_list, linux_nat_pid_to_str)
2555 (linux_nat_thread_name, linux_child_pid_to_exec_file)
2556 (linux_child_static_tracepoint_markers_by_strid)
2557 (linux_nat_is_async_p, linux_nat_can_async_p)
2558 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
2559 (linux_nat_supports_multi_process)
2560 (linux_nat_supports_disable_randomization, linux_nat_async)
2561 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
2562 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
2563 (linux_nat_fileio_open, linux_nat_fileio_readlink)
2564 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
2565 methods of linux_nat_target.
2566 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
2567 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
2569 (check_stopped_by_watchpoint): Adjust.
2570 (linux_xfer_partial): Delete.
2571 (linux_target_install_ops, linux_target, linux_nat_add_target):
2573 (linux_nat_target::linux_nat_target): New.
2574 * linux-nat.h: Include "inf-ptrace.h".
2575 (linux_nat_target): New.
2576 (linux_target, linux_target_install_ops, linux_nat_add_target):
2577 Delete function declarations.
2578 (linux_target): Declare global.
2579 * linux-thread-db.c (thread_db_target): New.
2580 (thread_db_target::thread_db_target): New.
2581 (thread_db_ops): Delete.
2582 (the_thread_db_target): New.
2583 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
2584 (thread_db_update_thread_list, thread_db_pid_to_str)
2585 (thread_db_extra_thread_info)
2586 (thread_db_thread_handle_to_thread_info)
2587 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
2588 (thread_db_resume): Refactor as methods of thread_db_target.
2589 (init_thread_db_ops): Delete.
2590 (_initialize_thread_db): Remove reference to init_thread_db_ops.
2591 * x86-linux-nat.c: Don't include "linux-nat.h".
2592 (super_post_startup_inferior): Delete.
2593 (x86_linux_nat_target::~x86_linux_nat_target): New.
2594 (x86_linux_child_post_startup_inferior)
2595 (x86_linux_read_description, x86_linux_enable_btrace)
2596 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
2597 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
2598 methods of x86_linux_nat_target.
2599 (x86_linux_create_target): Delete. Bits folded ...
2600 (x86_linux_add_target): ... here. Now takes a linux_nat_target
2602 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
2603 (x86_linux_nat_target): New class.
2604 (x86_linux_create_target): Delete.
2605 (x86_linux_add_target): Now takes a linux_nat_target pointer.
2606 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
2607 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
2608 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
2609 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
2610 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
2612 (x86_use_watchpoints): Delete.
2613 * x86-nat.h: Include "breakpoint.h" and "target.h".
2614 (x86_use_watchpoints): Delete.
2615 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
2616 (x86_stopped_by_watchpoint, x86_stopped_data_address)
2617 (x86_insert_watchpoint, x86_remove_watchpoint)
2618 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
2619 (x86_stopped_by_hw_breakpoint): New declarations.
2620 (x86_nat_target): New template class.
2622 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
2623 (the_ppc_linux_nat_target): New.
2624 (ppc_linux_fetch_inferior_registers)
2625 (ppc_linux_can_use_hw_breakpoint)
2626 (ppc_linux_region_ok_for_hw_watchpoint)
2627 (ppc_linux_ranged_break_num_registers)
2628 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
2629 (ppc_linux_insert_mask_watchpoint)
2630 (ppc_linux_remove_mask_watchpoint)
2631 (ppc_linux_can_accel_watchpoint_condition)
2632 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
2633 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
2634 (ppc_linux_watchpoint_addr_within_range)
2635 (ppc_linux_masked_watch_num_registers)
2636 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
2637 (ppc_linux_read_description): Refactor as methods of
2638 ppc_linux_nat_target.
2639 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
2641 * procfs.c (procfs_xfer_partial): Delete forward declaration.
2642 (procfs_target): New class.
2643 (the_procfs_target): New.
2644 (procfs_target): Delete function.
2645 (procfs_auxv_parse, procfs_attach, procfs_detach)
2646 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
2647 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
2648 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
2649 (procfs_create_inferior, procfs_update_thread_list)
2650 (procfs_thread_alive, procfs_pid_to_str)
2651 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
2652 (procfs_stopped_data_address, procfs_insert_watchpoint)
2653 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
2654 (proc_find_memory_regions, procfs_info_proc)
2655 (procfs_make_note_section): Refactor as methods of procfs_target.
2656 (_initialize_procfs): Adjust.
2657 * sol-thread.c (sol_thread_target): New class.
2658 (sol_thread_ops): Now a sol_thread_target.
2659 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
2660 (sol_thread_fetch_registers, sol_thread_store_registers)
2661 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
2662 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
2663 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
2664 (init_sol_thread_ops): Delete.
2665 (_initialize_sol_thread): Adjust. Remove references to
2666 init_sol_thread_ops and complete_target_initialization.
2668 * windows-nat.c (windows_nat_target): New class.
2669 (windows_fetch_inferior_registers)
2670 (windows_store_inferior_registers, windows_resume, windows_wait)
2671 (windows_attach, windows_detach, windows_pid_to_exec_file)
2672 (windows_files_info, windows_create_inferior)
2673 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
2674 (windows_close, windows_pid_to_str, windows_xfer_partial)
2675 (windows_get_tib_address, windows_get_ada_task_ptid)
2676 (windows_thread_name, windows_thread_alive): Refactor as
2677 windows_nat_target methods.
2678 (do_initial_windows_stuff): Adjust.
2679 (windows_target): Delete function.
2680 (_initialize_windows_nat): Adjust.
2682 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
2683 (darwin_mourn_inferior, darwin_kill_inferior)
2684 (darwin_create_inferior, darwin_attach, darwin_detach)
2685 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
2686 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
2687 (darwin_supports_multi_process): Refactor as darwin_nat_target
2689 (darwin_resume_to, darwin_files_info): Delete.
2690 (_initialize_darwin_inferior): Rename to ...
2691 (_initialize_darwin_nat): ... this. Adjust to C++ification.
2692 * darwin-nat.h: Include "inf-child.h".
2693 (darwin_nat_target): New class.
2694 (darwin_complete_target): Delete.
2695 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
2696 (darwin_target): New.
2697 (i386_darwin_fetch_inferior_registers)
2698 (i386_darwin_store_inferior_registers): Refactor as methods of
2700 (darwin_complete_target): Delete, with ...
2701 (_initialize_i386_darwin_nat): ... bits factored out here.
2703 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
2704 (the_alpha_linux_nat_target): New.
2705 (alpha_linux_register_u_offset): Refactor as
2706 alpha_linux_nat_target method.
2707 (_initialize_alpha_linux_nat): Adjust.
2708 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
2709 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2710 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
2711 methods of linux_nat_trad_target.
2712 (linux_trad_target): Delete.
2713 * linux-nat-trad.h (linux_trad_target): Delete function.
2714 (linux_nat_trad_target): New class.
2715 * mips-linux-nat.c (mips_linux_nat_target): New class.
2716 (super_fetch_registers, super_store_registers, super_close):
2718 (the_mips_linux_nat_target): New.
2719 (mips64_linux_regsets_fetch_registers)
2720 (mips64_linux_regsets_store_registers)
2721 (mips64_linux_fetch_registers, mips64_linux_store_registers)
2722 (mips_linux_register_u_offset, mips_linux_read_description)
2723 (mips_linux_can_use_hw_breakpoint)
2724 (mips_linux_stopped_by_watchpoint)
2725 (mips_linux_stopped_data_address)
2726 (mips_linux_region_ok_for_hw_watchpoint)
2727 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
2728 (mips_linux_close): Refactor as methods of mips_linux_nat.
2729 (_initialize_mips_linux_nat): Adjust to C++ification.
2731 * aix-thread.c (aix_thread_target): New class.
2732 (aix_thread_ops): Now an aix_thread_target.
2733 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
2734 (aix_thread_fetch_registers, aix_thread_store_registers)
2735 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
2736 (aix_thread_thread_alive, aix_thread_pid_to_str)
2737 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
2738 Refactor as methods of aix_thread_target.
2739 (init_aix_thread_ops): Delete.
2740 (_initialize_aix_thread): Remove references to init_aix_thread_ops
2741 and complete_target_initialization.
2742 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
2743 (rs6000_nat_target): New class.
2744 (the_rs6000_nat_target): New.
2745 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
2746 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
2747 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
2748 (super_create_inferior): Delete.
2749 (_initialize_rs6000_nat): Adjust to C++ification.
2751 * arm-linux-nat.c (arm_linux_nat_target): New class.
2752 (the_arm_linux_nat_target): New.
2753 (arm_linux_fetch_inferior_registers)
2754 (arm_linux_store_inferior_registers, arm_linux_read_description)
2755 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
2756 (arm_linux_remove_hw_breakpoint)
2757 (arm_linux_region_ok_for_hw_watchpoint)
2758 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
2759 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
2760 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
2761 arm_linux_nat_target.
2762 (_initialize_arm_linux_nat): Adjust to C++ification.
2764 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
2765 (the_aarch64_linux_nat_target): New.
2766 (aarch64_linux_fetch_inferior_registers)
2767 (aarch64_linux_store_inferior_registers)
2768 (aarch64_linux_child_post_startup_inferior)
2769 (aarch64_linux_read_description)
2770 (aarch64_linux_can_use_hw_breakpoint)
2771 (aarch64_linux_insert_hw_breakpoint)
2772 (aarch64_linux_remove_hw_breakpoint)
2773 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
2774 (aarch64_linux_region_ok_for_hw_watchpoint)
2775 (aarch64_linux_stopped_data_address)
2776 (aarch64_linux_stopped_by_watchpoint)
2777 (aarch64_linux_watchpoint_addr_within_range)
2778 (aarch64_linux_can_do_single_step): Refactor as methods of
2779 aarch64_linux_nat_target.
2780 (super_post_startup_inferior): Delete.
2781 (_initialize_aarch64_linux_nat): Adjust to C++ification.
2783 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
2784 (the_hppa_linux_nat_target): New.
2785 (hppa_linux_fetch_inferior_registers)
2786 (hppa_linux_store_inferior_registers): Refactor as methods of
2787 hppa_linux_nat_target.
2788 (_initialize_hppa_linux_nat): Adjust to C++ification.
2790 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
2791 (the_ia64_linux_nat_target): New.
2792 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
2793 (ia64_linux_stopped_data_address)
2794 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
2795 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
2796 ia64_linux_nat_target methods.
2797 (super_xfer_partial): Delete.
2798 (_initialize_ia64_linux_nat): Adjust to C++ification.
2800 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
2801 (the_m32r_linux_nat_target): New.
2802 (m32r_linux_fetch_inferior_registers)
2803 (m32r_linux_store_inferior_registers): Refactor as
2804 m32r_linux_nat_target methods.
2805 (_initialize_m32r_linux_nat): Adjust to C++ification.
2807 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
2808 (the_m68k_linux_nat_target): New.
2809 (m68k_linux_fetch_inferior_registers)
2810 (m68k_linux_store_inferior_registers): Refactor as
2811 m68k_linux_nat_target methods.
2812 (_initialize_m68k_linux_nat): Adjust to C++ification.
2814 * s390-linux-nat.c (s390_linux_nat_target): New class.
2815 (the_s390_linux_nat_target): New.
2816 (s390_linux_fetch_inferior_registers)
2817 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
2818 (s390_insert_watchpoint, s390_remove_watchpoint)
2819 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
2820 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
2821 (s390_auxv_parse, s390_read_description): Refactor as methods of
2822 s390_linux_nat_target.
2823 (_initialize_s390_nat): Adjust to C++ification.
2825 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
2826 (the_sparc_linux_nat_target): New.
2827 (_initialize_sparc_linux_nat): Adjust to C++ification.
2828 * sparc-nat.c (sparc_fetch_inferior_registers)
2829 (sparc_store_inferior_registers): Remove target_ops parameter.
2830 * sparc-nat.h (sparc_fetch_inferior_registers)
2831 (sparc_store_inferior_registers): Remove target_ops parameter.
2832 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
2833 (the_sparc64_linux_nat_target): New.
2834 (_initialize_sparc64_linux_nat): Adjust to C++ification.
2836 * spu-linux-nat.c (spu_linux_nat_target): New class.
2837 (the_spu_linux_nat_target): New.
2838 (spu_child_post_startup_inferior, spu_child_post_attach)
2839 (spu_child_wait, spu_fetch_inferior_registers)
2840 (spu_store_inferior_registers, spu_xfer_partial)
2841 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
2843 (_initialize_spu_nat): Adjust to C++ification.
2845 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
2846 (the_tilegx_linux_nat_target): New.
2847 (fetch_inferior_registers, store_inferior_registers):
2848 Refactor as methods.
2849 (_initialize_tile_linux_nat): Adjust to C++ification.
2851 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
2852 (the_xtensa_linux_nat_target): New.
2853 (xtensa_linux_fetch_inferior_registers)
2854 (xtensa_linux_store_inferior_registers): Refactor as
2855 xtensa_linux_nat_target methods.
2856 (_initialize_xtensa_linux_nat): Adjust to C++ification.
2858 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
2859 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
2860 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
2861 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
2862 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
2863 (fbsd_stopped_by_sw_breakpoint)
2864 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
2865 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
2866 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
2867 (fbsd_post_startup_inferior, fbsd_post_attach)
2868 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
2869 (fbsd_set_syscall_catchpoint)
2870 (super_xfer_partial, super_resume, super_wait)
2871 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
2872 (fbsd_handle_debug_trap): Remove target_ops parameter.
2873 (fbsd_nat_add_target): Delete.
2874 * fbsd-nat.h: Include "inf-ptrace.h".
2875 (fbsd_nat_add_target): Delete.
2876 (USE_SIGTRAP_SIGINFO): Define.
2877 (fbsd_nat_target): New class.
2879 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
2880 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
2881 (amd64bsd_target): Delete.
2882 * amd64-bsd-nat.h: New file.
2883 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
2885 (amd64_fbsd_nat_target): New class.
2886 (the_amd64_fbsd_nat_target): New.
2887 (amd64fbsd_read_description): Refactor as method of
2888 amd64_fbsd_nat_target.
2889 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2890 (_initialize_amd64fbsd_nat): Adjust to C++ification.
2891 * amd64-nat.h (amd64bsd_target): Delete function declaration.
2892 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
2893 (i386bsd_store_inferior_registers): Remove target_ops parameter.
2894 (i386bsd_target): Delete.
2895 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
2896 (i386bsd_fetch_inferior_registers)
2897 (i386bsd_store_inferior_registers): Declare.
2898 (i386_bsd_nat_target): New class.
2899 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
2900 (the_i386_fbsd_nat_target): New.
2901 (i386fbsd_resume, i386fbsd_read_description): Refactor as
2902 i386_fbsd_nat_target methods.
2903 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2904 (_initialize_i386fbsd_nat): Adjust to C++ification.
2905 * x86-bsd-nat.c (super_mourn_inferior): Delete.
2906 (x86bsd_mourn_inferior, x86bsd_target): Delete.
2907 (_initialize_x86_bsd_nat): Adjust to C++ification.
2908 * x86-bsd-nat.h: Include "x86-nat.h".
2909 (x86bsd_target): Delete declaration.
2910 (x86bsd_nat_target): New class.
2912 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
2913 (the_aarch64_fbsd_nat_target): New.
2914 (aarch64_fbsd_fetch_inferior_registers)
2915 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
2916 aarch64_fbsd_nat_target.
2917 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
2918 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
2919 (the_alpha_bsd_nat_target): New.
2920 (alphabsd_fetch_inferior_registers)
2921 (alphabsd_store_inferior_registers): Refactor as
2922 alpha_bsd_nat_target methods.
2923 (_initialize_alphabsd_nat): Refactor as methods of
2924 alpha_bsd_nat_target.
2925 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
2926 (the_amd64_nbsd_nat_target): New.
2927 (_initialize_amd64nbsd_nat): Adjust to C++ification.
2928 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
2929 (the_amd64_obsd_nat_target): New.
2930 (_initialize_amd64obsd_nat): Adjust to C++ification.
2931 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
2932 (the_arm_fbsd_nat_target): New.
2933 (arm_fbsd_fetch_inferior_registers)
2934 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
2935 (_initialize_arm_fbsd_nat): Refactor as methods of
2936 arm_fbsd_nat_target.
2937 (_initialize_arm_fbsd_nat): Adjust to C++ification.
2938 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
2939 (the_arm_netbsd_nat_target): New.
2940 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
2941 arm_netbsd_nat_target.
2942 (_initialize_arm_netbsd_nat): Adjust to C++ification.
2943 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
2944 (the_hppa_nbsd_nat_target): New.
2945 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
2946 hppa_nbsd_nat_target methods.
2947 (_initialize_hppanbsd_nat): Adjust to C++ification.
2948 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
2949 (the_hppa_obsd_nat_target): New.
2950 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
2951 methods of hppa_obsd_nat_target.
2952 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
2954 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
2955 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
2957 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
2958 (_initialize_i386obsd_nat): Use add_target.
2959 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
2960 (the_m68k_bsd_nat_target): New.
2961 (m68kbsd_fetch_inferior_registers)
2962 (m68kbsd_store_inferior_registers): Refactor as methods of
2963 m68k_bsd_nat_target.
2964 (_initialize_m68kbsd_nat): Adjust to C++ification.
2965 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
2966 (the_mips_fbsd_nat_target): New.
2967 (mips_fbsd_fetch_inferior_registers)
2968 (mips_fbsd_store_inferior_registers): Refactor as methods of
2969 mips_fbsd_nat_target.
2970 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
2972 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
2973 (the_mips_nbsd_nat_target): New.
2974 (mipsnbsd_fetch_inferior_registers)
2975 (mipsnbsd_store_inferior_registers): Refactor as methods of
2976 mips_nbsd_nat_target.
2977 (_initialize_mipsnbsd_nat): Adjust to C++ification.
2978 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
2979 (the_mips64_obsd_nat_target): New.
2980 (mips64obsd_fetch_inferior_registers)
2981 (mips64obsd_store_inferior_registers): Refactor as methods of
2982 mips64_obsd_nat_target.
2983 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
2985 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
2987 * nbsd-nat.h: Include "inf-ptrace.h".
2988 (nbsd_nat_target): New class.
2989 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
2990 (obsd_wait): Refactor as methods of obsd_nat_target.
2991 (obsd_add_target): Delete.
2992 * obsd-nat.h: Include "inf-ptrace.h".
2993 (obsd_nat_target): New class.
2994 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
2995 (the_ppc_fbsd_nat_target): New.
2996 (ppcfbsd_fetch_inferior_registers)
2997 (ppcfbsd_store_inferior_registers): Refactor as methods of
2998 ppc_fbsd_nat_target.
2999 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
3001 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
3002 (the_ppc_nbsd_nat_target): New.
3003 (ppcnbsd_fetch_inferior_registers)
3004 (ppcnbsd_store_inferior_registers): Refactor as methods of
3005 ppc_nbsd_nat_target.
3006 (_initialize_ppcnbsd_nat): Adjust to C++ification.
3007 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
3008 (the_ppc_obsd_nat_target): New.
3009 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
3010 methods of ppc_obsd_nat_target.
3011 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
3013 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
3014 (the_sh_nbsd_nat_target): New.
3015 (shnbsd_fetch_inferior_registers)
3016 (shnbsd_store_inferior_registers): Refactor as methods of
3018 (_initialize_shnbsd_nat): Adjust to C++ification.
3019 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
3020 (inf_ptrace_xfer_partial): Delete.
3021 (sparc_xfer_partial, sparc_target): Delete.
3022 * sparc-nat.h (sparc_fetch_inferior_registers)
3023 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
3024 (sparc_target): Delete function declaration.
3025 (sparc_target): New template class.
3026 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
3027 (_initialize_sparcnbsd_nat): Adjust to C++ification.
3028 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
3029 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
3031 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
3032 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
3033 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
3034 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
3036 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
3037 (the_vax_bsd_nat_target): New.
3038 (vaxbsd_fetch_inferior_registers)
3039 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
3041 (_initialize_vaxbsd_nat): Adjust to C++ification.
3043 * bsd-kvm.c (bsd_kvm_target): New class.
3044 (bsd_kvm_ops): Now a bsd_kvm_target.
3045 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
3046 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
3047 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3049 (bsd_kvm_return_one): Delete.
3050 (bsd_kvm_add_target): Adjust to C++ification.
3052 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3053 (nto_procfs_target_procfs): New classes.
3054 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3055 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3056 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3057 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3058 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3059 (procfs_remove_hw_breakpoint, procfs_resume)
3060 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3061 (procfs_kill_inferior, procfs_store_registers)
3062 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3063 as methods of nto_procfs_target.
3064 (nto_procfs_ops): Now an nto_procfs_target_procfs.
3065 (nto_native_ops): Delete.
3066 (procfs_open, procfs_native_open): Delete.
3067 (nto_native_ops): Now an nto_procfs_target_native.
3068 (init_procfs_targets): Adjust to C++ification.
3069 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3070 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3071 Refactor as methods of nto_procfs_target.
3073 * go32-nat.c (go32_nat_target): New class.
3074 (the_go32_nat_target): New.
3075 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3076 (go32_store_registers, go32_xfer_partial, go32_files_info)
3077 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3078 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3079 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3080 (go32_pid_to_str): Refactor as methods of go32_nat_target.
3081 (go32_target): Delete.
3082 (_initialize_go32_nat): Adjust to C++ification.
3084 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3085 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3086 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3087 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3089 (gnu_target): Delete.
3090 * gnu-nat.h (gnu_target): Delete.
3091 (gnu_nat_target): New class.
3092 * i386-gnu-nat.c (gnu_base_target): New.
3093 (i386_gnu_nat_target): New class.
3094 (the_i386_gnu_nat_target): New.
3095 (_initialize_i386gnu_nat): Adjust to C++ification.
3097 2018-05-02 Pedro Alves <palves@redhat.com>
3099 * bfd-target.c (target_bfd_xclose): Rename to ...
3100 (target_bfd_close): ... this.
3101 (target_bfd_reopen): Adjust.
3102 * target.c (target_close): Remove references to to_xclose.
3103 * target.h (target_ops::to_xclose): Delete.
3104 (target_ops::to_close): Update comments.
3106 2018-05-02 Pedro Alves <palves@redhat.com>
3108 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3110 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3111 * inf-ptrace.c (inf_ptrace_register_u_offset)
3112 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3113 (inf_ptrace_store_register, inf_ptrace_store_registers)
3114 (inf_ptrace_trad_target): Move to ...
3115 * linux-nat-trad.c: ... this new file.
3116 * linux-nat-trad.h: New file.
3117 * linux-nat.c (linux_target_install_ops): Make extern.
3118 (linux_trad_target): Delete.
3119 * linux-nat.h (linux_trad_target): Delete declaration.
3120 (linux_target_install_ops): Declare.
3121 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3124 2018-05-02 Pedro Alves <palves@redhat.com>
3126 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3127 procfs_target/add_target here.
3128 * procfs.c (procfs_target): Make static.
3129 (_initialize_procfs): Call add_target here.
3130 * procfs.h (struct target_ops): Remove forward declaration.
3131 (procfs_target): Remove declaration.
3132 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3134 2018-05-02 Pedro Alves <palves@redhat.com>
3136 * procfs.c (procfs_stopped_by_watchpoint)
3137 (procfs_insert_watchpoint, procfs_remove_watchpoint)
3138 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3140 (procfs_use_watchpoints): Delete, move contents...
3141 (procfs_target): ... here.
3142 * procfs.h (procfs_use_watchpoints): Delete declaration.
3143 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3144 procfs_use_watchpoints.
3145 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3146 procfs_use_watchpoints.
3148 2018-05-02 Tom Tromey <tom@tromey.com>
3151 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3152 and var_zuinteger_unlimited.
3153 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3154 and PARAM_ZUINTEGER_UNLIMITED.
3155 (set_parameter_value): Handle var_zuinteger and
3156 var_zuinteger_unlimited.
3157 (add_setshow_generic): Likewise.
3158 (parmpy_init): Likewise.
3160 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
3163 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3164 pointer is not null before dereferencing it.
3166 2018-04-30 Tom Tromey <tom@tromey.com>
3168 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3171 2018-04-30 Tom Tromey <tom@tromey.com>
3173 * breakpoint.c (mention): Remove use of is_mi_like_p.
3174 (print_mention_ranged_breakpoint): Likewise.
3175 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3178 2018-04-30 Tom Tromey <tom@tromey.com>
3180 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3182 2018-04-30 Tom Tromey <tom@tromey.com>
3184 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3185 (info_spu_event_command): Remove some uses of is_mi_like_p.
3187 2018-04-30 Tom Tromey <tom@tromey.com>
3189 * python/py-framefilter.c (py_print_single_arg)
3190 (enumerate_locals, py_print_args, py_print_frame): Remove some
3191 uses of is_mi_like_p.
3193 2018-04-30 Tom Tromey <tom@tromey.com>
3196 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3197 * ui-out.h (ui_out::is_mi_like_p): Now const.
3198 (ui_out::do_is_mi_like_p): Now const.
3199 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3201 2018-04-30 Tom Tromey <tom@tromey.com>
3203 * varobj.c (varobj_set_visualizer): Use new_reference.
3204 * python/python.c (gdbpy_decode_line): Use new_reference.
3205 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3208 2018-04-30 Tom Tromey <tom@tromey.com>
3210 * varobj.c (install_new_value): Use new_reference.
3211 * value.h (value_incref): Return void. Swap intro comment with
3213 * value.c (set_value_parent): Use new_reference.
3214 (value_incref): Return void. Update intro comment.
3215 (release_value): Use new_reference.
3216 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3218 2018-04-30 Tom Tromey <tom@tromey.com>
3220 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3221 * gdb_bfd.h (new_bfd_ref): Remove.
3222 (gdb_bfd_open): Update comment.
3223 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3224 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3225 (gdb_bfd_fdopenr): Use new_reference.
3226 * exec.c (exec_file_attach): Use new_reference.
3228 2018-04-30 Tom Tromey <tom@tromey.com>
3230 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3233 2018-04-30 Tom Tromey <tom@tromey.com>
3235 * jit.c (jit_read_code_entry): Use type_align.
3236 * i386-tdep.c (i386_gdbarch_init): Don't call
3237 set_gdbarch_long_long_align_bit.
3238 * gdbarch.sh: Remove long_long_align_bit.
3239 * gdbarch.c, gdbarch.h: Rebuild.
3240 * arc-tdep.c (arc_type_align): New function.
3241 (arc_gdbarch_init): Use arc_type_align. Don't call
3242 set_gdbarch_long_long_align_bit.
3244 2018-04-30 Tom Tromey <tom@tromey.com>
3246 * rust-lang.c (rust_type_alignment): Remove.
3247 (rust_composite_type): Use type_align.
3249 2018-04-30 Tom Tromey <tom@tromey.com>
3251 * NEWS: Mention Type.align.
3252 * python/py-type.c (typy_get_alignof): New function.
3253 (type_object_getset): Add "alignof".
3255 2018-04-30 Tom Tromey <tom@tromey.com>
3259 * std-operator.def (UNOP_ALIGNOF): New operator.
3260 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3262 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3263 * c-lang.c (c_op_print_tab): Add alignof.
3264 * c-exp.y (ALIGNOF): New token.
3265 (exp): Add "ALIGNOF" production.
3266 (ident_tokens): Add _Alignof and alignof.
3268 2018-04-30 Tom Tromey <tom@tromey.com>
3270 * i386-tdep.c (i386_type_align): New function.
3271 (i386_gdbarch_init): Update.
3272 * gdbarch.sh (type_align): New method.
3273 * gdbarch.c, gdbarch.h: Rebuild.
3274 * arch-utils.h (default_type_align): Declare.
3275 * arch-utils.c (default_type_align): New function.
3276 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
3277 (struct type) <align_log2>: New field.
3278 <instance_flags>: Now a bitfield.
3279 (TYPE_RAW_ALIGN): New macro.
3280 (type_align, type_raw_align, set_type_align): Declare.
3281 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
3283 * dwarf2read.c (quirk_rust_enum): Set type alignment.
3284 (get_alignment, maybe_set_alignment): New functions.
3285 (read_structure_type, read_enumeration_type, read_array_type)
3286 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
3287 (read_subrange_type, read_base_type): Set type alignment.
3289 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
3291 * dwarf2read.c (read_index_from_section): Use bool.
3293 2018-04-29 Fabian Groffen <grobian@gentoo.org>
3296 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
3299 2018-04-29 John Reiser <jreiser@BitWagon.com>
3302 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
3303 last step, and do it atomically.
3305 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
3307 * compile/compile-c-types.c (convert_int, convert_float):
3310 2018-04-27 Tom Tromey <tom@tromey.com>
3313 * rust-lang.c (rust_inclusive_range_type_p): New function.
3314 (rust_range): Handle inclusive ranges.
3315 (rust_compute_range): Likewise.
3316 * rust-exp.y (struct rust_op) <inclusive>: New field.
3317 (DOTDOTEQ): New constant.
3318 (range_expr): Add "..=" productions.
3319 (operator_tokens): Add "..=" token.
3320 (ast_range): Add "inclusive" parameter.
3321 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
3323 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
3325 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
3326 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
3328 * expprint.c (print_subexp_standard): Handle new bounds values.
3329 (dump_subexp_body_standard): Likewise.
3331 2018-04-27 Tom Tromey <tom@tromey.com>
3333 * configure: Rebuild.
3334 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
3335 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
3337 (class symbol_needs_eval_context): Likewise.
3338 * dwarf2read.c (mock_mapped_index::symbol_name_count)
3339 (mock_mapped_index::symbol_name_at): Use "override". Remove
3341 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
3343 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
3344 * aarch64-tdep.c (instruction_reader::read): Use "override".
3345 (instruction_reader_test::read): Likewise.
3346 * arm-tdep.c (instruction_reader::read): Use "override".
3347 (instruction_reader_thumb::read): Likewise.
3349 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
3352 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
3353 instead of remote_send.
3354 (remote_send): Remove.
3356 2018-04-26 Pedro Alves <palves@redhat.com>
3358 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
3359 find_function_start_sal instead of find_pc_line.
3361 2018-04-26 Pedro Alves <palves@redhat.com>
3363 * breakpoint.c (set_breakpoint_location_function): Handle
3365 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
3366 * elfread.c (elf_symtab_read): Give data symbols with
3367 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
3368 (elf_rel_plt_read): Update comment.
3369 * linespec.c (convert_linespec_to_sals): Handle
3371 (minsym_found): Handle mst_data_gnu_ifunc.
3372 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
3373 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
3374 * parse.c (find_minsym_type_and_address): Handle
3376 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
3377 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
3378 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
3380 <mst_data_gnu_ifunc>: New enumerator.
3382 2018-04-26 Pedro Alves <palves@redhat.com>
3384 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
3385 (lookup_minimal_symbol_by_pc_section): ... this. Replace
3386 'want_trampoline' parameter by a lookup_msym_prefer parameter.
3388 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
3389 (lookup_minimal_symbol_by_pc): Adjust.
3390 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
3391 (lookup_solib_trampoline_symbol_by_pc): Adjust.
3392 * minsyms.h (lookup_msym_prefer): New enum.
3393 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3394 parameter by a lookup_msym_prefer parameter.
3396 2018-04-26 Pedro Alves <palves@redhat.com>
3398 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
3399 ends in "@plt" instead of looking at the symbol's section.
3401 2018-04-26 Pedro Alves <palves@redhat.com>
3403 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
3405 (find_pc_partial_function_gnu_ifunc): Rename to ...
3406 (find_pc_partial_function): ... this, and remove references to
3408 (find_pc_partial_function): Delete old implementation.
3409 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
3411 2018-04-26 Pedro Alves <palves@redhat.com>
3413 * linespec.c (struct bound_minimal_symbol_search_key): New.
3414 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
3415 skip first line if we found a GNU ifunc minimal symbol by name.
3416 (compare_msymbols): Change parameters to work with a destructured
3418 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
3421 2018-04-26 Pedro Alves <palves@redhat.com>
3423 * breakpoint.c (set_breakpoint_location_function): Don't resolve
3424 ifunc targets here. Instead, if we have an ifunc minsym, use its
3426 (add_location_to_breakpoint): Store the minsym and the objfile in
3427 the breakpoint location.
3428 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
3429 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
3430 Record the minsym in the sal.
3431 * symtab.h (symtab_and_line) <msymbol>: New field.
3433 2018-04-26 Pedro Alves <palves@redhat.com>
3435 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
3436 unless we actually resolved the ifunc.
3438 2018-04-26 Pedro Alves <palves@redhat.com>
3440 * c-exp.y (variable production): Prefer ifunc minsyms over
3441 regular function symbols.
3442 * symtab.c (find_gnu_ifunc): New function.
3443 * minsyms.h (lookup_msym_prefer): New enum.
3444 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3445 parameter by a lookup_msym_prefer parameter.
3446 * symtab.h (find_gnu_ifunc): New declaration.
3448 2018-04-26 Pedro Alves <palves@redhat.com>
3450 * blockframe.c (find_gnu_ifunc_target_type): New function.
3451 (find_function_type): New.
3452 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
3453 return a value with a memory address.
3454 (eval_call): For calls to GNU ifunc functions, try to find the
3455 type of the target function from the type that the resolver
3457 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
3459 * infcall.c (find_function_return_type): Delete.
3460 (find_function_addr): Add 'function_type' parameter. For calls to
3461 GNU ifunc functions, try to find the type of the target function
3462 from the type that the resolver returns, and return it via
3464 (call_function_by_hand_dummy): Adjust to use the function type
3465 returned by find_function_addr.
3466 (find_function_addr): Add 'function_type' parameter and move
3468 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
3471 2018-04-26 Pedro Alves <palves@redhat.com>
3473 * c-exp.y (variable production): Skip finding an alias for ifunc
3476 2018-04-26 Pedro Alves <palves@redhat.com>
3478 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
3480 2018-04-25 Pedro Alves <palves@redhat.com>
3482 * infcmd.c (kill_command): Print the pid as string, not the whole
3483 thread's ptid. Add comment. s/has been killed/killed/ in output
3485 * remote.c (remote_detach_1): Print the pid as string, not the
3486 whole thread's ptid.
3488 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3489 Sergio Durigan Junior <sergiodj@redhat.com>
3490 Pedro Alves <palves@redhat.com>
3492 * infcmd.c (kill_command): Print message when inferior has
3494 * inferior.c (print_inferior_events): Remove 'static'. Set as
3496 (add_inferior): Improve message printed when
3497 'print_inferior_events' is on.
3498 (exit_inferior): Remove message printed when
3499 'print_inferior_events' is on.
3500 (detach_inferior): Improve message printed when
3501 'print_inferior_events' is on.
3502 (initialize_inferiors): Use 'add_inferior_silent' to set
3503 'current_inferior_'.
3504 * inferior.h (print_inferior_events): Declare here as
3506 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
3507 '[Detaching...]' messages when 'print_inferior_events' is on.
3508 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
3509 as prefix/suffix for messages. Remove periods. Fix erroneous
3510 'Detaching after fork from child...', replace it by '... from
3512 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
3513 prefix/suffix when printing 'Detaching...' messages. Print
3514 them when 'print_inferior_events' is on.
3515 * remote.c (remote_detach_1): Print message when detaching
3516 from inferior and '!is_fork_parent'.
3518 2018-04-24 Tom Tromey <tom@tromey.com>
3520 * cli-out.h: Reindent.
3522 2018-04-24 Tom Tromey <tom@tromey.com>
3524 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
3525 (cli_ui_out::do_field_string): Use fputs_filtered.
3526 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
3528 2018-04-23 Tom Tromey <tom@tromey.com>
3530 * guile/scm-frame.c (gdbscm_frame_read_var): Use
3531 gdb::unique_xmalloc_ptr.
3533 2018-04-23 Tom Tromey <tom@tromey.com>
3535 * configure: Rebuild.
3537 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
3540 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
3541 prepare_for_testing. Set normal_bp to r_debug_state if target
3544 2018-04-21 Pedro Alves <palves@redhat.com>
3545 Rajendra SY <rajendra.sy@gmail.com>
3547 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
3548 * remote.c (extended_remote_attach): In all-stop mode, mark the
3549 thread as executing.
3551 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3553 * thread.c (thread_apply_all_command): Fix comment.
3554 (thread_command): Fix comment.
3556 2018-04-10 Alan Hayward <alan.hayward@arm.com>
3558 * common/tdesc.h (tdesc_create_feature): Remove xml filename
3560 * features/aarch64-core.c (create_feature_aarch64_core):
3562 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
3564 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
3566 * features/i386/32bit-avx512.c
3567 (create_feature_i386_32bit_avx512): Likewise.
3568 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
3570 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
3572 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
3574 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
3576 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
3578 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
3580 * features/i386/64bit-avx512.c
3581 (create_feature_i386_64bit_avx512): Likewise.
3582 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
3584 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
3586 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
3588 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
3590 * features/i386/64bit-segments.c
3591 (create_feature_i386_64bit_segments): Likewise.
3592 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
3594 * features/i386/x32-core.c
3595 (create_feature_i386_x32_core): Likewise.
3596 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
3597 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
3598 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
3599 * target-descriptions.c: In generated code, don't pass xml
3602 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3604 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
3605 (print_xml_feature::visit_post): Likewise.
3606 (print_xml_feature::visit): Likewise.
3607 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
3608 (print_xml_feature): Add new class.
3609 * regformats/regdat.sh: Null xmltarget on feature targets.
3610 * target-descriptions.c (struct target_desc): Add xmltarget.
3611 (maintenance_check_tdesc_xml_convert): Add unittest function.
3612 (tdesc_get_features_xml): Add function to get xml.
3613 (maintenance_check_xml_descriptions): Test xml generation.
3614 * xml-tdesc.c (string_read_description_xml): Add function.
3615 * xml-tdesc.h (string_read_description_xml): Add declaration.
3617 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3619 * features/Makefile: Add feature marker to targets with new style
3620 target descriptions.
3621 * regformats/aarch64.dat: Regenerate.
3622 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
3623 * regformats/i386/amd64-avx-linux.dat: Likewise.
3624 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
3625 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
3626 * regformats/i386/amd64-linux.dat: Likewise.
3627 * regformats/i386/amd64-mpx-linux.dat: Likewise.
3628 * regformats/i386/amd64.dat: Likewise.
3629 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
3630 * regformats/i386/i386-avx-linux.dat: Likewise.
3631 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
3632 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
3633 * regformats/i386/i386-linux.dat: Likewise.
3634 * regformats/i386/i386-mmx-linux.dat: Likewise.
3635 * regformats/i386/i386-mpx-linux.dat: Likewise.
3636 * regformats/i386/i386.dat: Likewise.
3637 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
3638 * regformats/i386/x32-avx-linux.dat: Likewise.
3639 * regformats/i386/x32-linux.dat: Likewise.
3640 * regformats/tic6x-c62x-linux.dat: Likewise.
3641 * regformats/tic6x-c64x-linux.dat: Likewise.
3642 * regformats/tic6x-c64xp-linux.dat: Likewise.
3643 * regformats/regdat.sh: Parse feature marker.
3645 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3647 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
3648 (tdesc_osabi_name): Likewise.
3649 * target-descriptions.c (tdesc_architecture_name): Add new
3651 (tdesc_osabi_name): Likewise.
3653 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3655 * common/tdesc.c (tdesc_predefined_type): Move to here.
3656 (tdesc_named_type): Likewise.
3657 (tdesc_create_vector): Likewise.
3658 (tdesc_create_struct): Likewise.
3659 (tdesc_set_struct_size): Likewise.
3660 (tdesc_create_union): Likewise.
3661 (tdesc_create_flags): Likewise.
3662 (tdesc_create_enum): Likewise.
3663 (tdesc_add_field): Likewise.
3664 (tdesc_add_typed_bitfield): Likewise.
3665 (tdesc_add_bitfield): Likewise.
3666 (tdesc_add_flag): Likewise.
3667 (tdesc_add_enum_value): Likewise.
3668 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
3669 (struct tdesc_type_vector): Likewise.
3670 (struct tdesc_type_field): Likewise.
3671 (struct tdesc_type_with_fields): Likewise.
3672 (tdesc_create_enum): Add declaration.
3673 (tdesc_add_typed_bitfield): Likewise.
3674 (tdesc_add_enum_value): Likewise.
3675 * target-descriptions.c (tdesc_type_field): Move from here.
3676 (tdesc_type_builtin): Likewise.
3677 (tdesc_type_vector): Likewise.
3678 (tdesc_type_with_fields): Likewise.
3679 (tdesc_predefined_types): Likewise.
3680 (tdesc_named_type): Likewise.
3681 (tdesc_create_vector): Likewise.
3682 (tdesc_create_struct): Likewise.
3683 (tdesc_set_struct_size): Likewise.
3684 (tdesc_create_union): Likewise.
3685 (tdesc_create_flags): Likewise.
3686 (tdesc_create_enum): Likewise.
3687 (tdesc_add_field): Likewise.
3688 (tdesc_add_typed_bitfield): Likewise.
3689 (tdesc_add_bitfield): Likewise.
3690 (tdesc_add_flag): Likewise.
3691 (tdesc_add_enum_value): Likewise.
3692 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
3693 (tdesc_add_typed_bitfield): Likewise.
3694 (tdesc_add_enum_value): Likewise.
3696 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3698 * common/tdesc.c (tdesc_feature::accept): Move to here.
3699 (tdesc_feature::operator==): Likewise.
3700 (tdesc_create_reg): Likewise.
3701 * common/tdesc.h (tdesc_type_kind): Likewise.
3702 (struct tdesc_type): Likewise.
3703 (struct tdesc_feature): Likewise.
3704 * regformats/regdat.sh: Create a feature.
3705 * target-descriptions.c (tdesc_type_kind): Move from here.
3706 (tdesc_type): Likewise.
3707 (tdesc_type_up): Likewise.
3708 (tdesc_feature): Likewise.
3709 (tdesc_create_reg): Likewise.
3711 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3713 * Makefile.in: Add arch/tdesc.c
3714 * common/tdesc.c: New file.
3715 * common/tdesc.h (tdesc_element_visitor): Move to here.
3716 (tdesc_element): Likewise.
3717 (tdesc_reg): Likewise.
3718 (tdesc_reg_up): Likewise.
3719 * regformats/regdef.h (reg): Add offset to constructors.
3720 * target-descriptions.c (tdesc_element_visitor): Move from here.
3721 (tdesc_element): Likewise.
3722 (tdesc_reg): Likewise.
3723 (tdesc_reg_up): Likewise.
3725 2018-04-17 Tom Tromey <tom@tromey.com>
3727 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
3730 2018-04-17 Tom Tromey <tom@tromey.com>
3732 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
3734 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
3736 * symtab.c (print_symbol_info): Skip printing filename and line
3737 number when `last' is NULL.
3738 (symtab_symbol_info): Use empty string instead of NULL for first
3739 invocation of print_symbol_info.
3740 (rbreak_command): Pass NULL to `last' parameter of
3743 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
3745 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
3748 2018-04-16 Pedro Alves <palves@redhat.com>
3750 * MAINTAINERS (sh): Remove.
3751 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
3752 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
3753 (ALLDEPFILES): Remove sh64-tdep.c.
3754 * NEWS: Mentions that support for SH-5/SH64 is removed.
3755 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
3756 (sh*-*-openbsd*): Ditto.
3757 (sh64-*-elf*): Remove.
3759 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
3760 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
3761 * sh-tdep.c: No longer include "sh64-tdep.h".
3762 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
3763 * sh64-tdep.c, sh64-tdep.h: Remove files.
3765 2018-04-16 Pedro Alves <palves@redhat.com>
3767 * MAINTAINERS: Remove m88k.
3768 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
3769 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
3770 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
3771 * NEWS: Mention that support for m88k was removed.
3772 * configure.host (m88*-*-*): Remove support.
3773 * configure.nat (m88k-*-*): Remove support.
3774 * configure.tgt (m88*-*-openbsd*): Remove.
3775 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
3777 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
3779 * configure.tgt (x86_tobjs): New variable.
3780 (amd64_tobjs, i386_tobjs): Use it.
3782 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3784 * symtab.c (print_symbol_info): Precede the symbol definition by
3785 the line number when available.
3786 * NEWS: Advertise this enhancement.
3788 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3790 * NEWS (New options): announce set/show record btrace cpu.
3791 * btrace.c: Include record-btrace.h.
3792 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
3793 the vendor is unknown.
3794 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
3795 Maybe overwrite the btrace configuration's cpu.
3796 (btrace_compute_ftrace): Add cpu parameter. Update callers.
3797 (btrace_fetch): Add cpu parameter. Update callers.
3798 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
3799 Maybe overwrite the btrace configuration's cpu. Skip enabling
3800 errata workarounds if the vendor is unknown.
3801 * python/py-record-btrace.c: Include record-btrace.h.
3802 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
3803 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
3804 * record-btrace.c (record_btrace_cpu_state_kind): New.
3805 (record_btrace_cpu): New.
3806 (set_record_btrace_cpu_cmdlist): New.
3807 (record_btrace_get_cpu): New.
3808 (require_btrace_thread, record_btrace_info)
3809 (record_btrace_resume_thread): Call record_btrace_get_cpu.
3810 (cmd_set_record_btrace_cpu_none): New.
3811 (cmd_set_record_btrace_cpu_auto): New.
3812 (cmd_set_record_btrace_cpu): New.
3813 (cmd_show_record_btrace_cpu): New.
3814 (_initialize_record_btrace): Initialize set/show record btrace cpu
3816 * record-btrace.h (record_btrace_get_cpu): New.
3818 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3820 * record.c (set_record_command): Fix typo in message.
3822 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3824 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
3826 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3828 * infrun.c (process_event_stop_test): Call
3829 gdbarch_in_indirect_branch_thunk.
3830 * gdbarch.sh (in_indirect_branch_thunk): New.
3831 * gdbarch.c: Regenerated.
3832 * gdbarch.h: Regenerated.
3835 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
3836 (HFILES_NO_SRCDIR): Add x86-tdep.h.
3837 (ALLDEPFILES): Add x86-tdep.c.
3838 * arch-utils.h (default_in_indirect_branch_thunk): New.
3839 * arch-utils.c (default_in_indirect_branch_thunk): New.
3840 * i386-tdep: Include x86-tdep.h.
3841 (i386_in_indirect_branch_thunk): New.
3842 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
3844 * amd64-tdep: Include x86-tdep.h.
3845 (amd64_in_indirect_branch_thunk): New.
3846 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
3848 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3851 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
3852 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
3853 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
3856 2018-04-12 Tom Tromey <tom@tromey.com>
3858 * rust-lang.c (rust_print_struct_def): Remove univariant code.
3859 (rust_evaluate_subexp): Likewise.
3861 2018-04-12 Pedro Alves <palves@redhat.com>
3863 * procfs.c (procfs_detach): Make forward declaration's prototype
3864 match definition's protototype.
3865 (proc_get_LDT_entry): Remove stale do_cleanups call.
3867 2018-04-12 Pedro Alves <palves@redhat.com>
3869 * target.h (target_ops::to_has_exited): Delete.
3870 (target_has_exited): Delete.
3871 * target-delegates.c: Regenerate.
3873 2018-04-11 Pedro Alves <palves@redhat.com>
3875 * target.c (fileio_fh_t::t): Add comment.
3876 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3877 (target_fileio_close): Handle a NULL target.
3878 (invalidate_fileio_fh): New.
3879 (target_close): Call it.
3880 * remote.c (remote_hostio_send_command): No longer check whether
3881 remote_desc is open.
3883 2018-04-11 Pedro Alves <palves@redhat.com>
3885 * target.c (fileio_fh_t): Make it a named struct instead of a
3887 (fileio_fh_t::is_closed): New method.
3888 (DEF_VEC_O (fileio_fh_t)): Remove.
3889 (fileio_fhandles): Now a std::vector.
3890 (is_closed_fileio_fh): Delete.
3891 (acquire_fileio_fd): Adjust. Rename parameters.
3892 (release_fileio_fd): Adjust.
3893 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
3894 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3895 (target_fileio_close): Adjust.
3897 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
3899 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
3902 2018-04-10 Pedro Alves <palves@redhat.com>
3904 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
3905 (scoped_finish_thread_state): New class.
3906 * infcmd.c (run_command_1): Use it instead of finish_thread_state
3908 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
3909 (fetch_inferior_event, normal_stop): Likewise.
3910 * thread.c (finish_thread_state_cleanup): Delete.
3912 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3913 Pedro Alves <palves@redhat.com>
3915 * value.c: Include "selftest.h" and "common/array-view.h".
3916 (struct range) <operator ==>: New.
3917 (test_ranges_contain): New.
3918 (check_ranges_vector): New.
3919 (test_insert_into_bit_range_vector): New.
3920 (_initialize_values): Register selftests.
3921 * common/array-view.h (operator==, operator!=): New.
3923 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3925 * common/gdb_vecs.h (unordered_remove): Add overload that takes
3927 * inline-frame.c: Include <algorithm>.
3928 (struct inline_state): Add constructor.
3929 (inline_state_s): Remove.
3930 (DEF_VEC_O(inline_state_s)): Remove.
3931 (inline_states): Change type to std::vector.
3932 (find_inline_frame_state): Adjust to std::vector.
3933 (allocate_inline_frame_state): Remove.
3934 (clear_inline_frame_state): Adjust to std::vector.
3935 (skip_inline_frames): Adjust to std::vector.
3937 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3939 * tracepoint.h (struct trace_state_variable): Add constructor.
3940 <name>: Change type to std::string.
3941 * tracepoint.c (tsv_s): Remove.
3942 (DEF_VEC_O(tsv_s)): Remove.
3943 (tvariables): Change to std::vector.
3944 (create_trace_state_variable): Adjust to std::vector.
3945 (find_trace_state_variable): Likewise.
3946 (find_trace_state_variable_by_number): Likewise.
3947 (delete_trace_state_variable): Likewise.
3948 (trace_variable_command): Adjust to std::string.
3949 (delete_trace_variable_command): Likewise.
3950 (tvariables_info_1): Adjust to std::vector.
3951 (save_trace_state_variables): Likewise.
3952 (start_tracing): Likewise.
3953 (merge_uploaded_trace_state_variables): Adjust to std::vector
3955 * target.h (struct target_ops)
3956 <to_download_trace_state_variable>: Pass reference to
3957 trace_state_variable.
3958 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
3959 * target-delegates.c: Re-generate.
3960 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
3961 (mi_tsv_deleted): Likewise.
3962 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
3963 * remote.c (remote_download_trace_state_variable): Change
3964 pointer to reference and adjust.
3965 * make-target-delegates (parse_argtypes): Handle references.
3966 (write_function_header): Likewise.
3967 (munge_type): Likewise.
3969 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3971 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3972 string_view-selftests.c.
3973 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
3975 * unittests/basic_string_view/cons/char/1.cc: Likewise.
3976 * unittests/basic_string_view/cons/char/2.cc: Likewise.
3977 * unittests/basic_string_view/cons/char/3.cc: Likewise.
3978 * unittests/basic_string_view/element_access/char/1.cc:
3980 * unittests/basic_string_view/element_access/char/empty.cc:
3982 * unittests/basic_string_view/element_access/char/front_back.cc:
3984 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
3985 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
3987 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
3989 * unittests/basic_string_view/modifiers/swap/char/1.cc:
3991 * unittests/basic_string_view/operations/compare/char/1.cc:
3993 * unittests/basic_string_view/operations/compare/char/13650.cc:
3995 * unittests/basic_string_view/operations/copy/char/1.cc:
3997 * unittests/basic_string_view/operations/data/char/1.cc:
3999 * unittests/basic_string_view/operations/find/char/1.cc:
4001 * unittests/basic_string_view/operations/find/char/2.cc:
4003 * unittests/basic_string_view/operations/find/char/3.cc:
4005 * unittests/basic_string_view/operations/find/char/4.cc:
4007 * unittests/basic_string_view/operations/rfind/char/1.cc:
4009 * unittests/basic_string_view/operations/rfind/char/2.cc:
4011 * unittests/basic_string_view/operations/rfind/char/3.cc:
4013 * unittests/basic_string_view/operations/substr/char/1.cc:
4015 * unittests/basic_string_view/operators/char/2.cc: Likewise.
4016 * unittests/string_view-selftests.c: New file.
4018 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4020 * unittests/basic_string_view/capacity/1.cc: New file.
4021 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
4022 * unittests/basic_string_view/cons/char/1.cc: New file.
4023 * unittests/basic_string_view/cons/char/2.cc: New file.
4024 * unittests/basic_string_view/cons/char/3.cc: New file.
4025 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
4026 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
4027 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
4028 * unittests/basic_string_view/element_access/char/1.cc: New file.
4029 * unittests/basic_string_view/element_access/char/2.cc: New file.
4030 * unittests/basic_string_view/element_access/char/empty.cc: New file.
4031 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
4032 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
4033 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
4034 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
4035 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
4036 * unittests/basic_string_view/include.cc: New file.
4037 * unittests/basic_string_view/inserters/char/1.cc: New file.
4038 * unittests/basic_string_view/inserters/char/2.cc: New file.
4039 * unittests/basic_string_view/inserters/char/3.cc: New file.
4040 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
4041 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
4042 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
4043 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
4044 * unittests/basic_string_view/literals/types.cc: New file.
4045 * unittests/basic_string_view/literals/values.cc: New file.
4046 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
4047 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4048 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4049 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4050 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4051 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4052 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4053 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4054 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4055 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4056 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4057 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4058 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4059 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4060 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4061 * unittests/basic_string_view/operations/data/char/1.cc: New file.
4062 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4063 * unittests/basic_string_view/operations/find/char/1.cc: New file.
4064 * unittests/basic_string_view/operations/find/char/2.cc: New file.
4065 * unittests/basic_string_view/operations/find/char/3.cc: New file.
4066 * unittests/basic_string_view/operations/find/char/4.cc: New file.
4067 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4068 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4069 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4070 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4071 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4072 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4073 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4074 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4075 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4076 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4077 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4078 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4079 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4080 * unittests/basic_string_view/operators/char/2.cc: New file.
4081 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4082 * unittests/basic_string_view/range_access/char/1.cc: New file.
4083 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4084 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4085 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4086 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4087 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4088 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4089 * unittests/basic_string_view/requirements/typedefs.cc: New file.
4090 * unittests/basic_string_view/typedefs.cc: New file.
4091 * unittests/basic_string_view/types/1.cc: New file.
4093 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4095 * common/gdb_string_view.h: Remove libstdc++ implementation
4096 details, adjust to gdb reality.
4097 * common/gdb_string_view.tcc: Likewise.
4098 * cli/cli-script.c (struct string_view): Remove.
4099 (user_args) <m_args>: Change element type to gdb::string_view.
4100 (user_args::insert_args): Adjust.
4102 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4104 * common/gdb_string_view.h: New file.
4105 * common/gdb_string_view.tcc: New file.
4107 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4109 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4110 * configure: Re-generate.
4112 2018-04-09 Pedro Alves <palves@redhat.com>
4114 * gdbarch.sh: Include "observable.h" instead of "observer.h".
4115 (set_target_gdbarch): Call
4116 gdb::observers::architecture_changed.notify instead of
4117 observer_notify_architecture_changed.
4119 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4121 * tracepoint.c (struct current_traceframe_cleanup): Remove.
4122 (do_restore_current_traceframe_cleanup): Remove.
4123 (restore_current_traceframe_cleanup_dtor): Remove.
4124 (make_cleanup_restore_current_traceframe): Remove.
4125 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4127 * tracepoint.h (struct scoped_restore_current_traceframe): New.
4128 * infrun.c (fetch_inferior_event): Use
4129 scoped_restore_current_traceframe.
4131 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4133 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4135 <n_allocated_type_units>: Remove.
4136 <all_type_units>: Change to std::vector.
4137 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4138 to std::vector change.
4139 (dwarf2_per_objfile::get_cutu): Likewise.
4140 (dwarf2_per_objfile::get_tu): Likewise.
4141 (create_signatured_type_table_from_index): Likewise.
4142 (create_signatured_type_table_from_debug_names): Likewise.
4143 (dw2_symtab_iter_next): Likewise.
4144 (dw2_print_stats): Likewise.
4145 (dw2_expand_all_symtabs): Likewise.
4146 (dw2_expand_marked_cus): Likewise.
4147 (dw2_debug_names_iterator::next): Likewise.
4148 (dwarf2_initialize_objfile): Likewise.
4149 (add_signatured_type_cu_to_table): Likewise.
4150 (create_all_type_units): Likewise.
4151 (add_type_unit): Likewise.
4152 (struct tu_abbrev_offset): Add constructor.
4153 (build_type_psymtabs_1): Adjust to std::vector change.
4154 (print_tu_stats): Likewise.
4155 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4156 (write_debug_names): Likewise.
4158 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4160 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4161 Make an std::vector.
4162 <n_comp_units>: Remove.
4163 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4164 to std::vector change.
4165 (dwarf2_per_objfile::get_cutu): Likewise.
4166 (dwarf2_per_objfile::get_cu): Likewise.
4167 (create_cus_from_index): Likewise.
4168 (create_addrmap_from_index): Likewise.
4169 (create_addrmap_from_aranges): Likewise.
4170 (dwarf2_read_index): Likewise.
4171 (dw2_find_last_source_symtab): Likewise.
4172 (dw2_map_symtabs_matching_filename): Likewise.
4173 (dw2_symtab_iter_next): Likewise.
4174 (dw2_print_stats): Likewise.
4175 (dw2_expand_all_symtabs): Likewise.
4176 (dw2_expand_symtabs_with_fullname): Likewise.
4177 (dw2_expand_marked_cus): Likewise.
4178 (dw2_map_symbol_filenames): Likewise.
4179 (create_cus_from_debug_names): Likewise.
4180 (dwarf2_read_debug_names): Likewise.
4181 (dw2_debug_names_iterator::next): Likewise.
4182 (dwarf2_initialize_objfile): Likewise.
4183 (set_partial_user): Likewise.
4184 (dwarf2_build_psymtabs_hard): Likewise.
4185 (read_comp_units_from_section): Remove arguments, adjust to
4187 (create_all_comp_units): Adjust to std::vector and
4188 read_comp_units_from_section changes.
4189 (dwarf2_find_containing_comp_unit): Adjust to std::vector
4191 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4192 (psyms_seen_size): Likewise.
4193 (write_gdbindex): Likewise.
4194 (write_debug_names): Likewise.
4196 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4198 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4199 with dwarf2_per_objfile.
4200 (create_cus_from_index): Likewise.
4201 (create_signatured_type_table_from_index): Likewise.
4202 (dwarf2_read_index): Likewise.
4203 (dwarf2_initialize_objfile): Likewise.
4204 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
4205 per_cu rather than get_dwarf2_per_objfile.
4207 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4209 * dwarf2read.h (struct signatured_type): Forward declare.
4210 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4212 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4213 (dw2_get_cutu): ...this.
4214 (dwarf2_per_objfile::get_cu): Rename from...
4215 (dw2_get_cu): ...this.
4216 (dwarf2_per_objfile::get_tu): New.
4217 (create_addrmap_from_index): Adjust.
4218 (create_addrmap_from_aranges): Adjust.
4219 (dw2_find_last_source_symtab): Adjust.
4220 (dw2_map_symtabs_matching_filename): Adjust.
4221 (dw2_symtab_iter_next): Adjust.
4222 (dw2_print_stats): Adjust.
4223 (dw2_expand_all_symtabs): Adjust.
4224 (dw2_expand_symtabs_with_fullname): Adjust.
4225 (dw2_expand_marked_cus): Adjust.
4226 (dw_expand_symtabs_matching_file_matcher): Adjust.
4227 (dw2_map_symbol_filenames): Adjust.
4228 (dw2_debug_names_iterator::next): Adjust.
4229 (dwarf2_initialize_objfile): Adjust.
4230 (set_partial_user): Adjust.
4231 (dwarf2_build_psymtabs_hard): Adjust.
4233 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4235 * dwarf2read.c (create_signatured_type_table_from_debug_names):
4236 Remove unused variables.
4237 (dw2_map_symtabs_matching_filename): Likewise.
4238 (dwarf2_record_block_ranges): Likewise.
4239 (dwarf2_read_addr_index): Likewise.
4240 (follow_die_offset): Likewise.
4242 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4244 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4245 to symbol_file_add_main.
4247 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4250 * mi/mi-console.c (do_fputc_async_safe): New.
4251 (mi_console_file::write_async_safe): New.
4252 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4253 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4255 * ui-file.c (ui_file::putstrn): Adjust call to
4256 fputstrn_unfiltered.
4257 * utils.c (printchar): Replace do_fputs and do_fprintf
4258 parameters by do_fputc.
4259 (fputstr_filtered): Adjust call to printchar.
4260 (fputstr_unfiltered): Likewise.
4261 (fputstrn_filtered): Likewise.
4262 (fputstrn_unfiltered): Add do_fputc parameter, pass to
4264 * utils.h (do_fputc_ftype): New typedef.
4265 (fputstrn_unfiltered): Add do_fputc parameter.
4267 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4269 * regformats/i386/i386-avx.dat: Remove.
4271 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4274 * amd64-tdep.c (amd64_none_init_abi): New function.
4275 (amd64_x32_none_init_abi): New function.
4276 (_initialize_amd64_tdep): Register handlers for x86-64 and
4277 x64_32 with GDB_OSABI_NONE.
4278 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
4279 GDB_OSABI_NONE osabi.
4281 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4284 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
4286 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
4287 * osabi.c (gdb_osabi_names): Add "unknown" entry.
4289 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4291 * common/byte-vector.h (char_vector): New type.
4292 * target.h (target_read_alloc): Return
4293 gdb::optional<byte_vector>.
4294 (target_read_stralloc): Return gdb::optional<char_vector>.
4295 (target_get_osdata): Return gdb::optional<char_vector>.
4296 * target.c (target_read_alloc_1): Templatize. Replacement
4297 manual memory management with vector.
4298 (target_read_alloc): Change return type, adjust.
4299 (target_read_stralloc): Change return type, adjust.
4300 (target_get_osdata): Change return type, adjust.
4301 * auxv.c (struct auxv_info) <length>: Remove.
4302 <data>: Change type to gdb::optional<byte_vector>.
4303 (auxv_inferior_data_cleanup): Free auxv_info with delete.
4304 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
4305 (target_auxv_search): Adjust.
4306 (fprint_target_auxv): Adjust.
4307 * avr-tdep.c (avr_io_reg_read_command): Adjust.
4308 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
4309 (linux_make_corefile_notes): Adjust.
4310 * osdata.c (get_osdata): Adjust.
4311 * remote.c (remote_get_threads_with_qxfer): Adjust.
4312 (remote_memory_map): Adjust.
4313 (remote_traceframe_info): Adjust.
4314 (btrace_read_config): Adjust.
4315 (remote_read_btrace): Adjust.
4316 (remote_pid_to_exec_file): Adjust.
4317 * solib-aix.c (solib_aix_get_library_list): Adjust.
4318 * solib-dsbt.c (decode_loadmap): Don't free buf.
4319 (dsbt_get_initial_loadmaps): Adjust.
4320 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
4321 * solib-target.c (solib_target_current_sos): Adjust.
4322 * tracepoint.c (sdata_make_value): Adjust.
4323 * xml-support.c (xinclude_start_include): Adjust.
4324 (xml_fetch_content_from_file): Adjust.
4325 * xml-support.h (xml_fetch_another): Change return type.
4326 (xml_fetch_content_from_file): Change return type.
4327 * xml-syscall.c (xml_init_syscalls_info): Adjust.
4328 * xml-tdesc.c (file_read_description_xml): Adjust.
4329 (fetch_available_features_from_target): Change return type.
4330 (target_fetch_description_xml): Adjust.
4331 (target_read_description_xml): Adjust.
4333 2018-04-06 Tom Tromey <tom@tromey.com>
4335 * value.c (~value): Update.
4336 (struct value) <contents>: Now unique_xmalloc_ptr.
4337 (value_contents_bits_eq, allocate_value_contents)
4338 (value_contents_raw, value_contents_all_raw)
4339 (value_contents_for_printing, value_contents_for_printing_const)
4340 (set_value_enclosing_type): Update.
4342 2018-04-06 Tom Tromey <tom@tromey.com>
4344 * value.c (range_s): Remove typedef, VEC.
4345 (struct range): Add operator<.
4346 (range_lessthan): Remove.
4347 (ranges_contain): Change type.
4349 (struct value) <unavailable, optimized_out>: Now std::vector.
4350 (value_entirely_available)
4351 (value_entirely_covered_by_range_vector)
4352 (value_entirely_unavailable, value_entirely_optimized_out):
4354 (insert_into_bit_range_vector): Change argument type.
4355 (find_first_range_overlap): Likewise.
4356 (struct ranges_and_idx, value_contents_bits_eq)
4357 (require_not_optimized_out, require_available): Update.
4358 (ranges_copy_adjusted): Change argument types.
4359 (value_optimized_out, value_copy, value_fetch_lazy): Update.
4361 2018-04-06 Tom Tromey <tom@tromey.com>
4363 * value.c (~value): Update.
4364 (struct value) <parent>: Now a value_ref_ptr.
4365 (value_parent, set_value_parent, value_address, value_copy):
4368 2018-04-06 Tom Tromey <tom@tromey.com>
4370 * value.c (struct value): Add constructor, destructor, and member
4372 (allocate_value_lazy, value_decref): Update.
4374 2018-04-06 Tom Tromey <tom@tromey.com>
4376 * value.c (struct value) <released, next>: Remove.
4377 (all_values): Now a std::vector.
4378 (allocate_value_lazy): Update.
4379 (value_next): Remove.
4380 (value_mark, value_free_to_mark, release_value)
4381 (value_release_to_mark): Update.
4383 2018-04-06 Tom Tromey <tom@tromey.com>
4385 * value.h (fetch_subexp_value, value_release_to_mark): Update.
4386 (free_value_chain): Remove.
4387 * value.c (free_value_chain): Remove.
4388 (value_release_to_mark): Return a std::vector.
4389 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
4391 (check_condition): Update.
4392 * eval.c (fetch_subexp_value): Change "val_chain" to a
4394 * breakpoint.c (update_watchpoint): Update.
4395 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
4397 2018-04-06 Tom Tromey <tom@tromey.com>
4399 * value.h (free_all_values): Remove.
4400 * value.c (free_all_values): Remove.
4402 2018-04-06 Tom Tromey <tom@tromey.com>
4404 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
4405 (value_history_chain, value_history_count): Remove.
4406 (value_history): New global.
4407 (record_latest_value, access_value_history, show_values)
4408 (preserve_values): Update.
4410 2018-04-06 Tom Tromey <tom@tromey.com>
4412 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
4413 * varobj.c (varobj_set_display_format, varobj_set_value)
4414 (install_default_visualizer, construct_visualizer)
4415 (install_new_value, ~varobj, varobj_get_value_type)
4416 (my_value_of_variable, varobj_editable_p): Update.
4417 * c-varobj.c (c_describe_child, c_value_of_variable)
4418 (cplus_number_of_children, cplus_describe_child): Update.
4419 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
4420 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
4421 (ada_value_of_variable, ada_value_is_changeable_p): Update.
4423 2018-04-06 Tom Tromey <tom@tromey.com>
4425 * printcmd.c (last_examine_address): Change type to
4427 (do_examine, x_command): Update.
4429 2018-04-06 Tom Tromey <tom@tromey.com>
4431 * value.c (release_value): Update.
4432 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
4433 (struct bpstats) <val>: Now a value_ref_ptr.
4434 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4435 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4436 (~watchpoint, print_it_watchpoint, watch_command_1)
4437 (invalidate_bp_value_on_memory_change): Update.
4439 2018-04-06 Tom Tromey <tom@tromey.com>
4441 * varobj.c (varobj_clear_saved_item)
4442 (update_dynamic_varobj_children, install_new_value, ~varobj):
4444 * value.h (value_incref): Move declaration earlier.
4445 (value_decref): Rename from value_free.
4446 (struct value_ref_policy): New.
4447 (value_ref_ptr): New typedef.
4448 (struct value_deleter): Remove.
4449 (gdb_value_up): Remove typedef.
4450 (release_value): Change return type.
4451 (release_value_or_incref): Remove.
4452 * value.c (set_value_parent): Update.
4453 (value_incref): Change return type.
4454 (value_decref): Rename from value_free.
4455 (value_free_to_mark, free_all_values, free_value_chain): Update.
4456 (release_value): Return value_ref_ptr.
4457 (release_value_or_incref): Remove.
4458 (record_latest_value, set_internalvar, clear_internalvar):
4460 * stack.c (info_frame_command): Don't call value_free.
4461 * python/py-value.c (valpy_dealloc, valpy_new)
4462 (value_to_value_object): Update.
4463 * printcmd.c (do_examine): Update.
4464 * opencl-lang.c (lval_func_free_closure): Update.
4465 * mi/mi-main.c (register_changed_p): Don't call value_free.
4466 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
4467 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
4468 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
4470 * guile/scm-value.c (vlscm_free_value_smob)
4471 (vlscm_scm_from_value): Update.
4472 * frame.c (frame_register_unwind, frame_unwind_register_signed)
4473 (frame_unwind_register_unsigned, get_frame_register_bytes)
4474 (put_frame_register_bytes): Don't call value_free.
4475 * findvar.c (address_from_register): Don't call value_free.
4476 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
4477 * dwarf2loc.c (entry_data_value_free_closure)
4478 (value_of_dwarf_reg_entry, free_pieced_value_closure)
4479 (dwarf2_evaluate_loc_desc_full): Update.
4480 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4481 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4482 (~watchpoint, watch_command_1)
4483 (invalidate_bp_value_on_memory_change): Update.
4484 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
4486 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
4489 * warning.m4: Add -Wno-error=deprecated-register.
4490 * configure: Re-generate.
4492 2018-04-05 Tom Tromey <tom@tromey.com>
4494 * linespec.h: Remove include of "vec.h".
4496 2018-04-05 Tom Tromey <tom@tromey.com>
4498 * linespec.c (typep): Remove typedef.
4499 (find_methods, find_superclass_methods): Take a std::vector.
4500 (find_method): Use std::vector.
4502 2018-04-05 Tom Tromey <tom@tromey.com>
4504 * utils.c (compare_strings): Remove.
4505 * utils.h (compare_strings): Remove.
4506 * objc-lang.h (find_imps): Update.
4507 * objc-lang.c (find_methods): Take a std::vector.
4508 (uniquify_strings, find_imps): Likewise.
4509 * linespec.c (find_methods): Take a std::vector.
4510 (decode_objc): Use std::vector.
4511 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
4513 (find_method, find_function_symbols): Use std::vector.
4515 2018-04-05 Tom Tromey <tom@tromey.com>
4517 * completer.c (completion_tracker::completion_tracker): Remove
4519 (completion_tracker::discard_completions): Likewise.
4520 * breakpoint.c (ambiguous_names_p): Remove cast.
4521 * ada-lang.c (_initialize_ada_language): Remove cast.
4522 * utils.h (streq): Update.
4523 (streq_hash): Add new declaration.
4524 * utils.c (streq): Return bool.
4525 (streq_hash): New function.
4527 2018-04-05 Tom Tromey <tom@tromey.com>
4529 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
4530 Remove a string copy.
4532 2018-04-05 Tom Tromey <tom@tromey.com>
4534 * linespec.c (filter_results): Use std::vector.
4535 (decode_line_2, decode_line_full): Update.
4537 2018-04-05 Tom Tromey <tom@tromey.com>
4539 * linespec.c (canonical_to_fullform): Return std::string.
4540 (filter_results): Update.
4541 (struct decode_line_2_item): Add constructor.
4542 <fullform, displayform>: Now std::string.
4543 (decode_line_2_compare_items): Now a std::sort comparator.
4544 (decode_line_2): Update.
4546 2018-04-05 Tom Tromey <tom@tromey.com>
4548 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
4549 (unexpected_linespec_error): Update.
4550 (linespec_parse_basic, parse_linespec): Update.
4552 2018-04-05 Tom Tromey <tom@tromey.com>
4554 * linespec.c (linespec_parse_basic): Reindent.
4556 2018-04-05 Tom Tromey <tom@tromey.com>
4558 * minsyms.h (iterate_over_minimal_symbols): Update.
4559 * minsyms.c (iterate_over_minimal_symbols): Take a
4561 * linespec.c (struct collect_minsyms): Remove.
4562 (compare_msyms): Now a std::sort comparator.
4563 (add_minsym): Add parameters.
4564 (search_minsyms_for_name): Update. Use std::vector.
4566 2018-04-03 Tom Tromey <tom@tromey.com>
4568 * mipsread.c (read_alphacoff_dynamic_symtab): Use
4571 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4573 * MAINTAINERS (Write After Approval): Add Weimin Pan.
4575 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4578 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
4579 printing static type.
4581 2018-04-01 Tom Tromey <tom@tromey.com>
4583 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
4584 (rs6000_xfer_shared_libraries): Update.
4586 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
4588 * common/gdb_vecs.h (char_ptr): Remove.
4589 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
4591 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4593 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
4595 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
4597 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4599 * tracepoint.h (struct uploaded_tp): Initialize fields.
4600 <actions, step_actions, cmd_strings>: Change type to
4601 std::vector<char *>.
4602 * tracepoint.c (get_uploaded_tp): Allocate with new.
4603 (free_uploaded_tps): Free with delete.
4604 (parse_tracepoint_definition): Adjust to std::vector change.
4605 * breakpoint.c (read_uploaded_action): Likewise.
4606 (create_tracepoint_from_upload): Likewise.
4607 * ctf.c (ctf_write_uploaded_tp): Likewise.
4608 (SET_ARRAY_FIELD): Likewise.
4609 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
4611 2018-03-30 Tom Tromey <tom@tromey.com>
4613 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
4615 (svr4_keep_data_in_core): Update.
4616 (svr4_read_so_list): Update.
4618 2018-03-30 Tom Tromey <tom@tromey.com>
4620 * windows-nat.c (handle_output_debug_string, handle_exception):
4622 * target.h (target_read_string): Update.
4623 * target.c (target_read_string): Change "string" to
4625 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
4627 * solib-frv.c (frv_current_sos): Update.
4628 * solib-dsbt.c (dsbt_current_sos): Update.
4629 * solib-darwin.c (darwin_current_sos): Update.
4630 * linux-thread-db.c (inferior_has_bug): Update.
4631 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
4632 Update. Remove alloca.
4633 * ada-lang.c (ada_main_name): Update.
4635 2018-03-30 Tom Tromey <tom@tromey.com>
4637 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
4638 (struct dwo_file_deleter): New.
4639 (dwo_file_up): New typedef.
4640 (open_and_init_dwo_file): Use dwo_file_up.
4641 (free_dwo_file_cleanup): Remove.
4643 2018-03-30 Tom Tromey <tom@tromey.com>
4645 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
4646 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
4648 2018-03-30 Tom Tromey <tom@tromey.com>
4650 * dwarf2read.c (class free_cached_comp_units): New class.
4651 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
4652 (free_cached_comp_units): Remove function.
4654 2018-03-30 Tom Tromey <tom@tromey.com>
4656 * utils.h (make_cleanup_unpush_target): Remove.
4657 * inf-ptrace.c (struct target_unpusher): New.
4658 (target_unpush_up) New typedef.
4659 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
4661 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
4663 2018-03-27 Tom Tromey <tom@tromey.com>
4665 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
4667 2018-03-27 Pedro Alves <palves@redhat.com>
4668 Tom Tromey <tom@tromey.com>
4670 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
4671 destructor. Now a class.
4672 (gdb_readline_wrapper_cleanup): Remove function.
4673 (gdb_readline_wrapper): Remove cleanups.
4675 2018-03-27 Tom Tromey <tom@tromey.com>
4677 * typeprint.h (struct type_print_options) <local_typedefs,
4678 global_typedefs>: Remove "struct" keyword.
4679 (class typedef_hash_table): New class.
4680 (recursively_update_typedef_hash, add_template_parameters)
4681 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
4682 (find_typedef_in_hash): Don't declare.
4683 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
4684 (typedef_hash_table::recursively_update): Rename from
4685 recursively_update_typedef_hash. Now a member.
4686 (typedef_hash_table::add_template_parameters): Rename from
4687 add_template_parameters. Now a member.
4688 (typedef_hash_table::typedef_hash_table): Now a constructor;
4689 rename from create_typedef_hash.
4690 (typedef_hash_table::~typedef_hash_table): Now a destructor;
4691 rename from free_typedef_hash.
4692 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
4693 (do_free_global_table): Remove.
4694 (typedef_hash_table::typedef_hash_table): New constructor; renamed
4695 from copy_type_recursive.
4696 (create_global_typedef_table): Remove.
4697 (typedef_hash_table::find_global_typedef): Now a member of
4699 (typedef_hash_table::find_typedef): Rename from
4700 find_typedef_in_hash; now a member.
4701 (whatis_exp): Update.
4702 * extension.h (struct ext_lang_type_printers): Add constructor and
4704 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
4706 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
4707 Now a constructor; rename from start_ext_lang_type_printers.
4708 (ext_lang_type_printers): Now a destructor; rename from
4709 free_ext_lang_type_printers.
4710 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
4712 (c_type_print_base_struct_union): Update. Remove cleanups.
4714 2018-03-27 Tom Tromey <tom@tromey.com>
4716 * dwarf-index-write.c: Include <cmath>.
4718 2018-03-27 Joel Brobecker <brobecker@adacore.com>
4720 * NEWS: Add entry describing new "set|show varsize-limit" command.
4721 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
4723 * printcmd.c (_initialize_printcmd): Add "set var" alias of
4726 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
4728 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
4730 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
4731 * dwarf-index-common.c: New file.
4732 * dwarf-index-common.h: New file.
4733 * dwarf-index-write.c: New file.
4734 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
4735 (struct dwarf2_section_info): Move from here.
4736 (dwarf2_section_info_def): Likewise.
4737 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
4738 (offset_type): Likewise.
4739 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
4740 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
4741 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
4742 (byte_swap): Likewise.
4743 (MAYBE_SWAP): Likewise.
4744 (dwarf2_per_cu_ptr): Likewise.
4745 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
4746 (struct tu_stats): Likewise.
4747 (struct dwarf2_per_objfile): Likewise.
4748 (struct dwarf2_per_cu_data): Likewise.
4749 (struct signatured_type): Likewise.
4750 (sig_type_ptr): Likewise.
4751 (DEF_VEC_P (sig_type_ptr)): Likewise.
4752 (INDEX4_SUFFIX): Likewise.
4753 (INDEX5_SUFFIX): Likewise.
4754 (DEBUG_STR_SUFFIX): Likewise.
4755 (dwarf2_read_section): Make non-static.
4756 (mapped_index_string_hash): Move from here.
4757 (dwarf5_djb_hash): Likewise.
4758 (file_write): Likewise.
4759 (class data_buf): Likewise.
4760 (struct symtab_index_entry): Likewise.
4761 (struct mapped_symtab): Likewise.
4762 (find_slot): Likewise.
4763 (hash_expand): Likewise.
4764 (add_index_entry): Likewise.
4765 (uniquify_cu_indices): Likewise.
4766 (class c_str_view): Likewise.
4767 (class c_str_view_hasher): Likewise.
4768 (class vector_hasher): Likewise.
4769 (write_hash_table): Likewise.
4770 (psym_index_map): Likewise.
4771 (struct addrmap_index_data): Likewise.
4772 (add_address_entry): Likewise.
4773 (add_address_entry_worker): Likewise.
4774 (write_address_map): Likewise.
4775 (symbol_kind): Likewise.
4776 (write_psymbols): Likewise.
4777 (struct signatured_type_index_data): Likewise.
4778 (write_one_signatured_type): Likewise.
4779 (recursively_count_psymbols): Likewise.
4780 (recursively_write_psymbols): Likewise.
4781 (class debug_names): Likewise.
4782 (check_dwarf64_offsets): Likewise.
4783 (psyms_seen_size): Likewise.
4784 (write_gdbindex): Likewise.
4785 (write_debug_names): Likewise.
4786 (assert_file_size): Likewise.
4787 (write_psymtabs_to_index): Likewise.
4788 (save_gdb_index_command): Likewise.
4789 (_initialize_dwarf2_read): Don't register the "save gdb-index"
4791 * dwarf2read.h: New file.
4793 2018-03-27 Joel Brobecker <brobecker@adacore.com>
4796 * dwarf2read.c (dwarf2_physname): Do not return the demangled
4797 symbol name if the CU's language stores symbol names in linkage
4799 * language.h (struct language_defn)
4800 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
4801 all instances of this struct.
4803 2018-03-26 Tom Tromey <tom@tromey.com>
4805 * stack.c (backtrace_command_1): Remove verbose code.
4807 2018-03-26 Tom Tromey <tom@tromey.com>
4809 * python/py-framefilter.c (py_print_type): Don't catch
4810 exceptions. Return void.
4811 (py_print_value): Likewise.
4812 (py_print_single_arg): Likewise.
4813 (enumerate_args): Don't catch exceptions.
4814 (py_print_args): Likewise.
4815 (py_print_frame): Likewise.
4816 (gdbpy_apply_frame_filter): Catch exceptions here.
4818 2018-03-26 Tom Tromey <tom@tromey.com>
4820 * stack.c (_initialize_stack): Remove trailing newlines from help
4821 text. Add "Usage" line to "backtrace" help.
4823 2018-03-26 Tom Tromey <tom@tromey.com>
4826 * python/py-framefilter.c (py_print_args): Call wrap_hint.
4828 2018-03-26 Tom Tromey <tom@tromey.com>
4830 * python/py-framefilter.c (py_print_single_arg): Return
4831 EXT_LANG_BT_ERROR from catch.
4833 2018-03-26 Tom Tromey <tom@tromey.com>
4836 * stack.c (backtrace_command_1): Move some code into no-filters
4839 2018-03-26 Tom Tromey <tom@tromey.com>
4841 * python/py-framefilter.c (throw_quit_or_print_exception): New
4843 (gdbpy_apply_frame_filter): Use it.
4845 2018-03-26 Tom Tromey <tom@tromey.com>
4848 * python/py-framefilter.c (py_print_type, py_print_value)
4849 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
4852 2018-03-26 Tom Tromey <tom@tromey.com>
4854 * python/py-framefilter.c (enumerate_args): Use
4855 gdb::unique_xmalloc_ptr.
4857 2018-03-26 Tom Tromey <tom@tromey.com>
4859 * python/py-framefilter.c (py_print_frame): Return
4861 (gdbpy_apply_frame_filter): Update comment.
4862 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
4864 <EXT_LANG_BT_NO_FILTERS>: Change value.
4866 2018-03-26 Tom Tromey <tom@tromey.com>
4869 * stack.c (backtrace_command): Parse "hide" argument.
4870 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
4871 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
4874 2018-03-26 Tom Tromey <tom@tromey.com>
4876 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
4878 (backtrace_command): Remove "fulltrace", add "flags".
4880 2018-03-26 Tom Tromey <tom@tromey.com>
4882 * stack.c (backtrace_command): Rewrite command line parsing.
4884 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
4886 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
4888 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
4890 * filename-seen-cache.h: Add include guard.
4892 2018-03-26 Keith Seitz <keiths@redhat.com>
4894 * symfile.c (place_section): Remove "struct" from section_addr_info
4896 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
4897 "struct" keyword from section_addr_info.
4899 2018-03-26 Alan Hayward <alan.hayward@arm.com>
4901 * regformats/regdef.h (reg): Add constructors.
4903 2018-03-25 Pedro Alves <palves@redhat.com>
4905 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
4906 if then/else bodies in var_func_name extraction.
4908 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
4910 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
4911 lookup_minimal_symbol() to find symbol entry.
4912 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
4914 2018-03-23 Keith Seitz <keiths@redhat.com>
4917 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
4918 nested type definitions for C++, too.
4920 2018-03-23 Tom Tromey <tom@tromey.com>
4922 * machoread.c (struct oso_el): Add a constructor. Don't define as
4924 (macho_register_oso): Remove.
4925 (macho_symtab_read): Take a std::vector.
4926 (oso_el_compare_name): Now a std::sort comparator.
4927 (macho_symfile_read_all_oso): Take a std::vector.
4928 (macho_symfile_read): Use std::vector. Remove cleanups.
4930 2018-03-22 Tom Tromey <tom@tromey.com>
4932 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
4933 (record_full_goto_bookmark): Use std::string.
4935 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4938 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
4941 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4943 * rs6000-tdep.c (store_insn_p): New function.
4944 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
4945 and cr_reg to their unshifted values. Use store_insn_p to
4946 match LR saves using either R1 or fdata->alloca_reg. Use
4947 store_insn_p to match CR saves. Set alloca_reg_offset
4948 when alloca_reg and framep are set. Remove lr_reg shift
4949 when assigning to fdata->lr_register.
4951 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4953 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
4954 command line args instead of emitting a warning.
4956 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4958 * tracepoint.h (struct static_tracepoint_marker): Initialize
4959 fields, define default constructor, move constructor and move
4960 assignment, disable the rest.
4961 <str_id, extra>: Make std::string.
4962 (release_static_tracepoint_marker): Remove.
4963 (free_current_marker): Remove.
4964 * tracepoint.c (free_current_marker): Remove.
4965 (parse_static_tracepoint_marker_definition): Adjust to
4966 std::string, use new hex2str overload.
4967 (release_static_tracepoint_marker): Remove.
4968 (print_one_static_tracepoint_marker): Get marker by reference
4969 and adjust to std::string.
4970 (info_static_tracepoint_markers_command): Adjust to std::vector
4972 * target.h (static_tracepoint_marker_p): Remove typedef.
4973 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
4974 (struct target_ops) <to_static_tracepoint_marker_at>: Return
4976 <to_static_tracepoint_markers_by_strid>: Return std::vector.
4978 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
4979 (target_debug_print_std_vector_static_tracepoint_marker): New.
4980 (target_debug_print_struct_static_tracepoint_marker_p): Rename
4982 (target_debug_print_static_tracepoint_marker_p): ... this.
4983 * target-delegates.c: Re-generate.
4984 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
4986 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
4987 (decode_static_tracepoint_spec): Adjust to std::vector.
4988 (tracepoint_print_one_detail): Adjust to std::string.
4989 (strace_marker_decode_location): Adjust to std::string.
4990 (update_static_tracepoint): Adjust to std::string, remove call
4991 to release_static_tracepoint_marker.
4992 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4993 Adjust to std::vector.
4994 * remote.c (remote_static_tracepoint_marker_at): Return bool.
4995 (remote_static_tracepoint_markers_by_strid): Adjust to
4997 * common/rsp-low.h (hex2str): New overload with explicit count
4999 * common/rsp-low.c (hex2str): New overload with explicit count
5001 * unittests/rsp-low-selftests.c (test_hex2str): New function.
5002 (_initialize_rsp_low_selftests): Add test_hex2str test.
5003 * unittests/tracepoint-selftests.c
5004 (test_parse_static_tracepoint_marker_definition): Adjust to
5007 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5009 * tracepoint.c (parse_static_tracepoint_marker_definition):
5010 Consider case where the definition is followed by more
5012 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5013 tracepoint-selftests.c.
5014 * unittests/tracepoint-selftests.c: New.
5016 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5018 * MAINTAINERS (Write After Approval): Add Pedro Franco de
5021 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5023 * symtab.c (find_pc_sect_line): fixed indentation.
5025 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5027 * symtab.c (find_pc_sect_line): now uses binary search.
5029 2018-03-19 Tom Tromey <tom@tromey.com>
5031 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
5034 2018-03-19 Pedro Alves <palves@redhat.com>
5035 Tom Tromey <tom@tromey.com>
5037 * unittests/observable-selftests.c: New file.
5038 * common/observable.h: New file.
5039 * observable.h: New file.
5040 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
5041 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
5042 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
5043 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
5044 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
5045 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
5046 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
5047 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5048 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5049 python/py-breakpoint.c, python/py-finishbreakpoint.c,
5050 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5051 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5052 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5053 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5054 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5055 tui/tui-interp.c, valops.c: Update all users.
5056 * tui/tui-hooks.c (tui_bp_created_observer)
5057 (tui_bp_deleted_observer, tui_bp_modified_observer)
5058 (tui_inferior_exit_observer, tui_before_prompt_observer)
5059 (tui_normal_stop_observer, tui_register_changed_observer):
5061 (tui_observers_token): New global.
5062 (attach_or_detach, tui_attach_detach_observers): New functions.
5063 (tui_install_hooks, tui_remove_hooks): Use
5064 tui_attach_detach_observers.
5065 * record-btrace.c (record_btrace_thread_observer): Remove.
5066 (record_btrace_thread_observer_token): New global.
5067 * observer.sh: Remove.
5068 * observer.c: Rename to observable.c.
5069 * observable.c (namespace gdb_observers): Define new objects.
5070 (observer_debug): Move into gdb_observers namespace.
5071 (struct observer, struct observer_list, xalloc_observer_list_node)
5072 (xfree_observer_list_node, generic_observer_attach)
5073 (generic_observer_detach, generic_observer_notify): Remove.
5074 (_initialize_observer): Update.
5075 Don't include observer.inc.
5076 * Makefile.in (generated_files): Remove observer.h, observer.inc.
5077 (clean mostlyclean): Likewise.
5078 (observer.h, observer.inc): Remove targets.
5079 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5080 (COMMON_SFILES): Use observable.c, not observer.c.
5081 * .gitignore: Remove observer.h.
5083 2018-03-18 Tom Tromey <tom@tromey.com>
5085 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5087 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5089 2018-03-17 Tom Tromey <tom@tromey.com>
5091 * auto-load.c (auto_load_objfile_script_1): Use std::string.
5093 2018-03-17 Tom Tromey <tom@tromey.com>
5095 * target.c (class scoped_target_fd): New.
5096 (target_fileio_close_cleanup): Remove.
5097 (target_fileio_read_alloc_1): Use scoped_target_fd.
5099 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5101 * silent-rules.mk: New.
5102 * Makefile.in: Include silent-rules.mk
5103 (srcdir, VPATH, top_srcdir): Move up.
5104 (COMPILE): Add ECHO_CXX.
5105 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5106 (init.c): Add ECHO_INIT_C.
5107 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5108 (version.c): Add ECHO_GEN.
5109 (printcmd.o): Add ECHO_CXX.
5110 (target-float.o): Add ECHO_CXX.
5111 (ada-exp.o): Add ECHO_CXX.
5112 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5113 (insight$(EXEEXT)): Add ECHO_CXXLD.
5114 * gnulib/configure.ac: Add AM_SILENT_RULES.
5115 * gnulib/aclocal.m4: Re-generate.
5116 * gnulib/configure: Re-generate.
5117 * gnulib/import/Makefile.in: Re-generate.
5119 2018-03-16 Tom Tromey <tom@tromey.com>
5121 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5122 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5123 * utils.c (do_free_section_addr_info)
5124 (make_cleanup_free_section_addr_info): Remove.
5125 * symfile.h (struct other_sections): Add constructor.
5126 (struct section_addr_info): Remove.
5127 (section_addr_info): New typedef.
5128 (struct sym_fns) <sym_offsets>: Change type of parameter.
5129 (build_section_addr_info_from_objfile)
5130 (relative_addr_info_to_section_offsets, addr_info_make_relative)
5131 (default_symfile_offsets, symbol_file_add)
5132 (symbol_file_add_from_bfd)
5133 (build_section_addr_info_from_section_table): Update.
5134 (alloc_section_addr_info, free_section_addr_info): Don't declare.
5135 * symfile.c (alloc_section_addr_info): Remove.
5136 (build_section_addr_info_from_section_table): Change return type.
5138 (build_section_addr_info_from_bfd)
5139 (build_section_addr_info_from_objfile): Likewise.
5140 (free_section_addr_info): Remove.
5141 (relative_addr_info_to_section_offsets): Change type of "addrs".
5142 (addrs_section_compar): Now a std::sort comparator.
5143 (addrs_section_sort): Change return type.
5144 (addr_info_make_relative): Change type of "addrs". Update.
5145 (default_symfile_offsets, syms_from_objfile_1)
5146 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5147 (symbol_file_add_separate): Update.
5148 (symbol_file_add): Change type of "addrs". Update.
5149 (add_symbol_file_command): Update. Remove cleanups.
5150 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
5152 * symfile-debug.c (debug_sym_offsets): Change type of "info".
5153 * solib.c (solib_read_symbols): Update.
5154 * objfiles.c (objfile_relocate): Update. Remove cleanups.
5155 * machoread.c (macho_symfile_offsets): Update.
5156 * jit.c (jit_bfd_try_read_symtab): Update.
5158 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
5160 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5161 unittests/utils-selftests.c.
5162 * unittests/utils-selftests.c: New file.
5164 2018-03-14 Tom Tromey <tom@tromey.com>
5167 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5170 2018-03-14 Tom Tromey <tom@tromey.com>
5173 * printcmd.c (printf_pointer): Allow "-" in format.
5175 2018-03-14 Tom Tromey <tom@tromey.com>
5177 * printcmd.c (_initialize_printcmd): Add usage to printf.
5179 2018-03-14 Yao Qi <qiyao@sourceware.org>
5181 * MAINTAINERS: Update my email address.
5183 2018-03-13 Tom Tromey <tom@tromey.com>
5185 * machoread.c (macho_check_dsym): Change filenamep to a
5187 (macho_symfile_read): Update.
5188 * symfile.c (load_command): Use std::string.
5190 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
5192 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5193 to error message string.
5194 (riscv_register_name): Use xsnprintf instead of sprintf.
5195 (riscv_insn::fetch_instruction): Use gdb_assert instead of
5197 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5199 (riscv_push_dummy_call): Likewise.
5201 2018-03-12 Tom Tromey <tom@tromey.com>
5203 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5204 Use gdb::byte_vector.
5205 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5207 2018-03-12 Yao Qi <yao.qi@linaro.org>
5209 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5210 parameter type to readable_regcache.
5211 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5214 2018-03-11 Tom Tromey <tom@tromey.com>
5216 * dwarf2read.c (struct nextfield): Add initializers.
5217 (struct nextfnfield): Remove.
5218 (struct fnfieldlist): Add initializers. Remove "length" and
5219 "head", use std::vector.
5220 (struct decl_field_list): Remove.
5221 (struct field_info): Add initializers.
5222 <fields, baseclasses>: Now std::vector.
5223 <nbaseclasses, nfnfields, typedef_field_list_count,
5224 nested_types_list_count>: Remove.
5225 (dwarf2_add_field, dwarf2_add_type_defn)
5226 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5227 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5228 (process_structure_scope): Update.
5230 2018-03-11 Tom Tromey <tom@tromey.com>
5232 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5233 for use by std::sort.
5234 (build_type_psymtabs_1): Use std::vector.
5236 2018-03-09 Eli Zaretskii <eliz@gnu.org>
5238 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5239 and LIBMPFR in the printed configuration.
5241 2018-03-08 Tom Tromey <tom@tromey.com>
5243 * source.c (get_filename_and_charpos): Use scoped_fd.
5244 * nto-procfs.c (procfs_open_1): Use scoped_fd.
5245 (procfs_pidlist): Likewise.
5246 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5247 (iterate_over_mappings): Likewise.
5249 2018-03-08 Tom Tromey <tom@tromey.com>
5251 * infcall.c (struct call_return_meta_info)
5252 <stack_temporaries_enabled>: Remove.
5253 (get_call_return_value, call_function_by_hand_dummy): Update.
5254 * thread.c (disable_thread_stack_temporaries): Remove.
5255 (enable_thread_stack_temporaries): Remove.
5256 (thread_stack_temporaries_enabled_p): Return bool.
5257 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5258 (get_last_thread_stack_temporary): Update.
5259 * eval.c (evaluate_subexp): Update.
5260 * gdbthread.h (class enable_thread_stack_temporaries): Now a
5261 class, not a function.
5262 (value_ptr, value_vec): Remove typedefs.
5263 (class thread_info) <stack_temporaries_enabled>: Now bool.
5264 <stack_temporaries>: Now a std::vector.
5265 (thread_stack_temporaries_enabled_p)
5266 (value_in_thread_stack_temporaries): Return bool.
5268 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
5270 * remote.c (putpkt_binary): Fix omitted bytes reporting.
5271 (getpkt_or_notif_sane_1): Likewise.
5273 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5275 * build-id.c (build_id_to_debug_bfd): Use std::string.
5277 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5279 * build-id.c (find_separate_debug_file_by_buildid): Return
5281 * build-id.h (find_separate_debug_file_by_buildid): Return
5283 * coffread.c (coff_symfile_read): Adjust to std::string.
5284 * elfread.c (elf_symfile_read): Adjust to std::string.
5285 * symfile.c (separate_debug_file_exists): Change parameter to
5287 (find_separate_debug_file): Return std::string.
5288 (find_separate_debug_file_by_debuglink): Return std::string.
5289 * symfile.h (find_separate_debug_file_by_debuglink): Return
5292 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5294 * common/xml-utils.c (xml_escape_text): Move code to...
5295 (xml_escape_text_append): ... this new function.
5296 * common/xml-utils.h (xml_escape_text_append): New declaration.
5297 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
5299 (_initialize_xml_utils): register test_xml_escape_text_append as
5302 2018-03-07 Alan Hayward <alan.hayward@arm.com>
5304 * defs.h: Remove MAX_REGISTER_SIZE.
5305 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
5307 * python/py-unwind.c (pyuw_sniffer): Likewise.
5309 2018-03-07 Tom Tromey <tom@tromey.com>
5311 * linux-tdep.c (linux_info_proc): Update.
5312 * target.h (struct target_ops) <to_fileio_readlink>: Return
5314 (target_fileio_readlink): Return optional<string>.
5315 * remote.c (remote_hostio_readlink): Return optional<string>.
5316 * inf-child.c (inf_child_fileio_readlink): Return
5318 * target.c (target_fileio_readlink): Return optional<string>.
5320 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
5322 * regcache.c (cooked_read_test): Add riscv to the list of
5323 architectures that have a save_reggroup.
5325 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
5327 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
5328 value is not a dynamic class object.
5330 2018-03-06 Tom Tromey <tom@tromey.com>
5332 * rust-exp.y: Formatting fixes.
5334 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5336 * riscv-tdep.c (riscv_register_name): Remove target description
5338 (riscv_gdbarch_init): Remove target description check.
5340 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5342 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
5344 * riscv-tdep.h: Likewise.
5346 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5348 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
5349 (riscv_pseudo_register_write): Delete.
5350 (riscv_gdbarch_init): Remove all use of pseudo registers.
5352 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5354 * record-btrace.c (btrace_print_lines): Replace cleanup
5355 parameter with RAII equivalents.
5356 (btrace_insn_history): Replace cleanup with RAII equivalents.
5357 * ui-out.h (make_cleanup_ui_out_list_begin_end,
5358 make_cleanup_ui_out_tuple_begin_end): Remove.
5359 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
5360 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
5361 make_cleanup_ui_out_list_begin_end): Remove.
5363 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5365 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
5366 parameter types to std::vector. Use bool.
5367 (record_btrace_wait): Replace VEC(tp_t) with
5368 std::vector<thread_info *>.
5369 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
5371 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5373 * record-btrace.c (record_btrace_disable_callback): Remove.
5374 (struct scoped_btrace_disable): New.
5375 (record_btrace_open): Use scoped_btrace_disable.
5377 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5379 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
5380 reading values from registers.
5382 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5384 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
5387 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5389 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
5390 change parameter type. Use GDB's print functions, and use
5391 core_addr_to_string where appropriate.
5392 (riscv_push_dummy_call): Use core_addr_to_string where
5393 appropriate, update call to riscv_print_arg_location, and reindent
5395 (riscv_return_value): Update call to riscv_print_arg_location.
5397 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5398 Tim Newsome <tim@sifive.com>
5399 Albert Ou <a0u@eecs.berkeley.edu>
5400 Darius Rad <darius@bluespec.com>
5402 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
5403 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
5404 (ALLDEPFILES): Add riscv-tdep.c
5405 * configure.tgt: Add riscv support.
5406 * riscv-tdep.c: New file.
5407 * riscv-tdep.h: New file.
5408 * NEWS: Mention new target.
5409 * MAINTAINERS: Add entry for riscv.
5411 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5413 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
5414 fields within aggregates.
5416 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
5418 * record-btrace.c (btrace_print_lines): Change type of flags to
5419 gdb_disassembly_flags.
5421 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5423 * fbsd-nat.c: Include "inf-ptrace.h".
5424 (USE_SIGTRAP_SIGINFO): Conditionally define.
5425 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
5426 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
5427 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
5429 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
5431 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
5433 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
5434 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
5435 "supports_stopped_by_hw_breakpoint" target methods.
5437 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5439 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
5440 * fbsd-nat.c (debug_fbsd_nat): New variable.
5441 (show_fbsd_nat_debug): New function.
5442 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
5443 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
5445 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5447 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
5448 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
5450 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
5451 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
5454 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5456 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
5457 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
5459 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5461 * charset.c (struct charset_vector): New.
5462 (charsets): Change type to charset_vector.
5463 (find_charset_names): Adjust.
5465 (_initialize_charset): Adjust.
5467 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5469 * progspace.h (struct program_space) <deleted_solibs>: Change
5470 type to std::vector<std::string>.
5471 * progspace.c (clear_program_space_solib_cache): Adjust.
5472 * breakpoint.c (print_solib_event): Adjust.
5473 (check_status_catch_solib): Adjust.
5474 * solib.c (update_solib_list): Adjust.
5475 * ui-out.h (class ui_out) <field_string>: New overload.
5476 * ui-out.c (ui_out::field_string): New overload.
5478 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5480 * progspace.h (struct program_space): Add constructor and
5481 destructor, initialize fields.
5482 (add_program_space): Remove.
5483 * progspace.c (add_program_space): Rename to...
5484 (program_space::program_space): ... this.
5485 (release_program_space): Rename to...
5486 (program_space::~program_space): ... this.
5487 (delete_program_space): Use delete to delete program_space.
5488 (initialize_progspace): Use new to allocate program_space.
5489 * inferior.c (add_inferior_with_spaces): Likewise.
5490 (clone_inferior_command): Likewise.
5491 * infrun.c (follow_fork_inferior): Likewise.
5492 (handle_vfork_child_exec_or_exit): Likewise.
5494 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5496 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
5497 (delim_string_to_char_ptr_vec): Return std::vector of
5498 gdb::unique_xmalloc_ptr.
5499 (dirnames_to_char_ptr_vec_append): Take std::vector of
5500 gdb::unique_xmalloc_ptr.
5501 (dirnames_to_char_ptr_vec): Return std::vector of
5502 gdb::unique_xmalloc_ptr.
5503 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
5504 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
5505 (delim_string_to_char_ptr_vec): Return an std::vector of
5506 gdb::unique_xmalloc_ptr, adjust the code.
5507 (dirnames_to_char_ptr_vec_append): Take an std::vector of
5508 gdb::unique_xmalloc_ptr, adjust the code.
5509 (dirnames_to_char_ptr_vec): Return an std::vector of
5510 gdb::unique_xmalloc_ptr, adjust the code.
5511 * auto-load.c (auto_load_safe_path_vec): Change type to
5512 std::vector of gdb::unique_xmalloc_ptr.
5513 (auto_load_expand_dir_vars): Return an std::vector of
5514 gdb::unique_xmalloc_ptr, adjust the code.
5515 (auto_load_safe_path_vec_update): Adjust.
5516 (filename_is_in_auto_load_safe_path_vec): Adjust.
5517 (auto_load_objfile_script_1): Adjust.
5518 * build-id.c (build_id_to_debug_bfd): Adjust.
5519 * linux-thread-db.c (thread_db_load_search): Adjust.
5520 * source.c (add_path): Adjust.
5522 * symfile.c (find_separate_debug_file): Adjust.
5523 * utils.c (do_free_char_ptr_vec): Remove.
5524 (make_cleanup_free_char_ptr_vec): Remove.
5526 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
5529 * common/pathstuff.c: Conditionally include "<windows.h>".
5531 2018-03-01 Georg Sauthoff <mail@georg.so>
5534 * gcore.in: Quote variables and switch interpreter to bash.
5536 2018-03-01 Tom Tromey <tom@tromey.com>
5538 * dwarf2read.c (alloc_discriminant_info): Fix default_index
5539 assertion. Add assertion for discriminant_index.
5540 (quirk_rust_enum): Use correct base type name in univariant case.
5542 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
5544 * record.c (get_call_history_modifiers): Return a
5546 (cmd_record_call_history): Adjust.
5547 * record-btrace.c (record_btrace_call_history): Adjust.
5548 (record_btrace_call_history_range): Adjust.
5549 (record_btrace_call_history_from): Adjust.
5550 * target-debug.h (target_debug_print_record_print_flags): New.
5551 * target-delegates.c: Re-generate.
5552 * target.c (target_call_history): Change flags type.
5553 (target_call_history_from): Likewise.
5554 (target_call_history_range): Likewise.
5555 * target.h (struct target_ops) <target_call_history>: Likewise.
5556 (target_call_history_from): Likewise.
5557 (target_call_history_range): Likewise.
5559 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5560 Simon Marchi <simon.marchi@polymtl.ca>
5562 * common/common-utils.c: Include "sys/stat.h".
5563 (is_regular_file): Move here from "source.c"; change return
5565 * common/common-utils.h (is_regular_file): New prototype.
5566 * common/pathstuff.c (contains_dir_separator): New function.
5567 * common/pathstuff.h (contains_dir_separator): New prototype.
5568 * source.c: Don't include "sys/stat.h".
5569 (is_regular_file): Move to "common/common-utils.c".
5571 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5573 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
5574 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
5575 * auto-load.c: Include "common/pathstuff.h".
5576 * common/common-def.h (current_directory): Move here.
5577 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
5579 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
5581 * common/pathstuff.c: New file.
5582 * common/pathstuff.h: New file.
5583 * compile/compile.c: Include "common/pathstuff.h".
5584 * defs.h (current_directory): Move to "common/common-defs.h".
5585 * dwarf2read.c: Include "common/pathstuff.h".
5587 * guile/scm-safe-call.c: Likewise.
5588 * linux-thread-db.c: Likewise.
5590 * nto-tdep.c: Likewise.
5591 * objfiles.c: Likewise.
5592 * source.c: Likewise.
5593 * symtab.c: Likewise.
5594 * utils.c: Include "common/pathstuff.h".
5595 (gdb_realpath): Move to "common/pathstuff.c".
5596 (gdb_realpath_keepfile): Likewise.
5597 (gdb_abspath): Likewise.
5598 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
5599 (gdb_realpath_keepfile): Likewise.
5600 (gdb_abspath): Likewise.
5602 2018-02-28 John Baldwin <jhb@FreeBSD.org>
5604 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
5605 wildcard process pid for super_resume for kernels with a
5608 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
5610 * compile/compile.c (get_args): Add additional comments
5611 explaining function.
5613 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
5614 Tom Tromey <tom@tromey.com>
5616 * target.h (memory_write_request_s): Remove typedef. Don't define
5618 (target_write_memory_blocks): Change argument to std::vector.
5619 (struct memory_write_request): Add constructor.
5620 * target-memory.c (compare_block_starting_address): Return bool.
5621 Change argument types.
5622 (claim_memory): Change arguments to use std::vector.
5623 (split_regular_and_flash_blocks, blocks_to_erase)
5624 (compute_garbled_blocks): Likewise.
5625 (cleanup_request_data, cleanup_write_requests_vector): Remove.
5626 (target_write_memory_blocks): Change argument to std::vector.
5627 * symfile.c (struct load_section_data): Add constructor and
5628 destructor. Use std::vector for "requests".
5629 (struct load_progress_data): Add initializers.
5630 (load_section_callback): Update. Use "new".
5631 (clear_memory_write_data): Remove.
5632 (generic_load): Update.
5634 2018-02-27 Alan Hayward <alan.hayward@arm.com>
5636 * arch/aarch64.h: Use common/tdesc.h.
5638 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5640 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
5641 architecture with a 64-bit ABI.
5643 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5645 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
5646 ahead of target description loading.
5648 2018-02-26 Tom Tromey <tom@tromey.com>
5650 * stack.c (backtrace_command_1): Update.
5651 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
5653 * python/py-framefilter.c (py_print_frame)
5654 (gdbpy_apply_frame_filter): Change type of "flags".
5655 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
5657 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
5658 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
5659 * extension.h (enum frame_filter_flag): Rename from
5661 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
5662 (apply_ext_lang_frame_filter): Change type of "flags".
5663 * extension.c (apply_ext_lang_frame_filter): Change type of
5665 * extension-priv.h (struct extension_language_ops)
5666 <apply_frame_filter>: Change type of "flags".
5668 2018-02-26 Tom Tromey <tom@tromey.com>
5671 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
5672 off-by-one in py_end computation.
5673 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
5675 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
5678 2018-02-26 Tom Tromey <tom@tromey.com>
5680 * dwarf2read.c (struct variant_field): New.
5681 (struct nextfield) <variant>: New field.
5682 (dwarf2_add_field): Handle DW_TAG_variant_part.
5683 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
5684 discriminated union.
5685 (read_structure_type): Handle DW_TAG_variant_part.
5686 (handle_struct_member_die): New function, extracted from
5687 process_structure_scope. Handle DW_TAG_variant.
5688 (process_structure_scope): Handle discriminated unions. Call
5689 handle_struct_member_die.
5691 2018-02-26 Tom Tromey <tom@tromey.com>
5693 * rust-lang.h (rust_last_path_segment): Declare.
5694 * rust-lang.c (rust_last_path_segment): Now public. Change
5696 (struct disr_info): Remove.
5697 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
5698 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
5699 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
5700 (rust_enum_p, rust_enum_variant): New function.
5701 (rust_underscore_fields): Remove "offset" parameter.
5702 (rust_print_enum): New function.
5703 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
5704 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
5705 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
5707 (rust_internal_print_type): New function, from rust_print_type.
5709 (rust_print_type): Call rust_internal_print_type.
5710 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
5711 Update enum handling.
5712 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
5713 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
5714 (rust_union_quirks): New functions.
5715 (process_full_comp_unit, process_full_type_unit): Call
5717 (process_structure_scope): Update rust_unions if necessary.
5719 2018-02-26 Tom Tromey <tom@tromey.com>
5721 * value.h (value_union_variant): Declare.
5722 * valops.c (value_union_variant): New function.
5723 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
5724 (struct discriminant_info): New.
5725 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
5727 (struct main_type) <flag_discriminated_union>: New field.
5729 2018-02-26 Tom Tromey <tom@tromey.com>
5731 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5732 unittests/unpack-selftests.c.
5733 * unittests/unpack-selftests.c: New file.
5734 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
5736 2018-02-26 Yao Qi <yao.qi@linaro.org>
5738 * dwarf2read.c (struct partial_die_info) <read>: New method.
5739 (read_partial_die): Remove the declaration.
5740 (load_partial_dies): Update.
5741 (partial_die_info::partial_die_info):
5742 (read_partial_die): Change it to partial_die_info::read.
5744 2018-02-26 Yao Qi <yao.qi@linaro.org>
5746 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
5747 (fixup_partial_die): Remove declaration.
5748 (scan_partial_symbols): Update.
5749 (partial_die_parent_scope): Likewise.
5750 (partial_die_full_name): Likewise.
5751 (fixup_partial_die): Change it to partial_die_info::fixup.
5753 2018-02-26 Yao Qi <yao.qi@linaro.org>
5755 * dwarf2read.c (read_partial_die): Update the declaration.
5756 (load_partial_dies): Caller update.
5757 (read_partial_die): Remove one argument abbrev_len.
5759 2018-02-26 Yao Qi <yao.qi@linaro.org>
5761 * dwarf2read.c (struct partial_die_info): Add ctor, delete
5762 assignment operator.
5763 (load_partial_dies): Use ctor and copy ctor.
5764 (read_partial_die): Update.
5765 (dwarf2_cu::find_partial_die): Use ctor.
5767 2018-02-26 Yao Qi <yao.qi@linaro.org>
5769 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
5770 (find_partial_die_in_comp_unit): Change it to
5771 dwarf2_cu::find_partial_die.
5772 (find_partial_die): Update.
5774 2018-02-26 Yao Qi <yao.qi@linaro.org>
5776 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
5779 2018-02-26 Yao Qi <yao.qi@linaro.org>
5781 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
5783 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5785 * arch/amd64.h: Use common/tdesc.h.
5786 * arch/i386.c: Likewise.
5787 * arch/i386.h: Likewise.
5788 * arch/tic6x.c: Likewise.
5789 * arch/tdesc.h: Move file from here...
5790 * common/tdesc.h: ...to here.
5791 * features/aarch64-core.c: Regenerate.
5792 * features/aarch64-fpu.c: Regenerate.
5793 * features/i386/32bit-avx.c: Regenerate.
5794 * features/i386/32bit-avx512.c: Regenerate.
5795 * features/i386/32bit-core.c: Regenerate.
5796 * features/i386/32bit-linux.c: Regenerate.
5797 * features/i386/32bit-mpx.c: Regenerate.
5798 * features/i386/32bit-pkeys.c: Regenerate.
5799 * features/i386/32bit-sse.c: Regenerate.
5800 * features/i386/64bit-avx.c: Regenerate.
5801 * features/i386/64bit-avx512.c: Regenerate.
5802 * features/i386/64bit-core.c: Regenerate.
5803 * features/i386/64bit-linux.c: Regenerate.
5804 * features/i386/64bit-mpx.c: Regenerate.
5805 * features/i386/64bit-pkeys.c: Regenerate.
5806 * features/i386/64bit-segments.c: Regenerate.
5807 * features/i386/64bit-sse.c: Regenerate.
5808 * features/i386/x32-core.c: Regenerate.
5809 * features/tic6x-c6xp.c: Regenerate.
5810 * features/tic6x-core.c: Regenerate.
5811 * features/tic6x-gp.c: Regenerate.
5812 * target-descriptions.c: Use common/tdesc.h.
5813 * target-descriptions.h: Likewise.
5815 2018-02-24 Tom Tromey <tom@tromey.com>
5817 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
5818 (try_thread_db_load_from_dir, thread_db_load_search): Use
5820 (info_auto_load_libthread_db_compare): Return bool. Change
5822 (info_auto_load_libthread_db): Use std::vector, std::string.
5825 2018-02-24 Tom Tromey <tom@tromey.com>
5827 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
5829 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
5831 * gdbarch.c: Rebuild.
5832 * gdbarch.h: Rebuild.
5833 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
5834 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
5835 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
5838 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
5840 * gdbtypes.h (sect_offset): Change type to uint64_t.
5841 (sect_offset_str): New function.
5842 * dwarf2read.c (create_addrmap_from_aranges): Use
5844 (error_check_comp_unit_head): Likewise.
5845 (create_debug_type_hash_table): Likewise.
5846 (read_cutu_die_from_dwo): Likewise.
5847 (init_cutu_and_read_dies): Likewise.
5848 (init_cutu_and_read_dies_no_follow): Likewise.
5849 (process_psymtab_comp_unit_reader): Likewise.
5850 (partial_die_parent_scope): Likewise.
5851 (peek_die_abbrev): Likewise.
5852 (process_queue): Likewise.
5853 (dwarf2_physname): Likewise.
5854 (read_namespace_alias): Likewise.
5855 (read_import_statement): Likewise.
5856 (create_dwo_cu_reader): Likewise.
5857 (create_cus_hash_table): Likewise.
5858 (lookup_dwo_cutu): Likewise.
5859 (inherit_abstract_dies): Likewise.
5860 (read_func_scope): Likewise.
5861 (read_call_site_scope): Likewise.
5862 (dwarf2_add_member_fn): Likewise.
5863 (read_common_block): Likewise.
5864 (read_module_type): Likewise.
5865 (read_typedef): Likewise.
5866 (read_subrange_type): Likewise.
5867 (load_partial_dies): Likewise.
5868 (read_partial_die): Likewise.
5869 (find_partial_die): Likewise.
5870 (read_str_index): Likewise.
5871 (dwarf2_string_attr): Likewise.
5872 (build_error_marker_type): Likewise.
5873 (lookup_die_type): Likewise.
5874 (dump_die_shallow): Likewise.
5875 (follow_die_ref): Likewise.
5876 (dwarf2_fetch_die_loc_sect_off): Likewise.
5877 (dwarf2_fetch_constant_bytes): Likewise.
5878 (follow_die_sig): Likewise.
5879 (get_signatured_type): Likewise.
5880 (get_DW_AT_signature_type): Likewise.
5881 (dwarf2_find_containing_comp_unit): Likewise.
5882 (set_die_type): Likewise.
5884 2018-02-21 John Baldwin <jhb@FreeBSD.org>
5886 * arch/aarch64.c: Include "common-defs.h".
5887 * arch/amd64.c: Likewise.
5888 * arch/i386.c: Likewise.
5890 2018-02-21 Tom Tromey <tom@tromey.com>
5892 * value.h: (extract_field_op): Update.
5893 * eval.c (extract_field_op): Return a const char *.
5894 * expression.h (parse_expression_for_completion): Update.
5895 * completer.c (complete_expression): Update.
5896 (add_struct_fields): Make fieldname const.
5897 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
5898 (mark_completion_tag, parse_exp_in_context_1): Update.
5899 (parse_expression_for_completion): Change "name" to
5900 unique_xmalloc_ptr*.
5902 2018-02-21 Tom Tromey <tom@tromey.com>
5904 * infcall.c (call_function_by_hand_dummy): Use std::vector.
5906 2018-02-21 Yao Qi <yao.qi@linaro.org>
5908 * avr-tdep.c (avr_read_pc): Change parameter type to
5910 * gdbarch.sh (read_pc): Likewise.
5911 * gdbarch.c: Re-generated.
5912 * gdbarch.h: Re-generated.
5913 * hppa-tdep.c (hppa_read_pc): Change parameter type to
5915 * ia64-tdep.c (ia64_read_pc): Likewise.
5916 * mips-tdep.c (mips_read_pc): Likewise.
5917 * spu-tdep.c (spu_read_pc): Likewise.
5919 2018-02-21 Yao Qi <yao.qi@linaro.org>
5921 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
5922 * regcache-dump.c: New file.
5923 * regcache.c: Move register_dump to regcache-dump.c.
5924 (maintenance_print_registers): Likewise.
5925 (maintenance_print_raw_registers): Likewise.
5926 (maintenance_print_cooked_registers): Likewise.
5927 (maintenance_print_register_groups): Likewise.
5928 (maintenance_print_remote_registers): Likewise.
5929 (_initialize_regcache): Likewise.
5930 * regcache.h (register_dump): Moved from regcache.c.
5932 2018-02-21 Yao Qi <yao.qi@linaro.org>
5934 * regcache.c (regcache::regcache): Update.
5935 (regcache::invalidate): Move it to detached_regcache::invalidate.
5936 (get_thread_arch_aspace_regcache): Update.
5937 (regcache::raw_update): Update.
5938 (regcache::cooked_read): Remove some code.
5939 (regcache::cooked_read_value): Likewise.
5940 (regcache::raw_write): Remove assert on m_readonly_p.
5941 (regcache::raw_supply_integer): Move it to
5942 detached_regcache::raw_supply_integer.
5943 (regcache::raw_supply_zeroed): Likewise.
5944 * regcache.h (detached_regcache) <raw_supply_integer>: New
5946 <raw_supply_zeroed, invalidate>: Likewise.
5947 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
5948 <invalidate>: Likewise.
5949 <m_readonly_p>: Removed.
5951 2018-02-21 Yao Qi <yao.qi@linaro.org>
5953 * infcmd.c (get_return_value): Let stop_regs point to
5954 get_current_regcache.
5955 * regcache.c (regcache::regcache): Remove.
5956 (register_dump_reg_buffer): New class.
5957 (regcache_print): Adjust.
5958 * regcache.h (regcache): Remove constructors.
5960 2018-02-21 Yao Qi <yao.qi@linaro.org>
5962 * regcache.c (class register_dump): New class.
5963 (register_dump_regcache, register_dump_none): New class.
5964 (register_dump_remote, register_dump_groups): New class.
5965 (regcache_print): Update.
5966 * regcache.h (regcache_dump_what): Move it to regcache.c.
5967 (regcache) <dump>: Remove.
5969 2018-02-21 Yao Qi <yao.qi@linaro.org>
5971 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
5973 (jit_unwind_reg_set_impl): Call raw_supply.
5974 (jit_frame_sniffer): Use reg_buffer_rw.
5975 * record-full.c (record_full_core_regbuf): Change its type.
5976 (record_full_core_open_1): Use reg_buffer_rw.
5977 (record_full_close): Likewise.
5978 (record_full_core_fetch_registers): Use regcache->raw_supply.
5979 (record_full_core_store_registers): Likewise.
5980 * regcache.c (regcache::get_register_status): Move it to
5982 (regcache_raw_set_cached_value): Remove.
5983 (regcache::raw_set_cached_value): Remove.
5984 (regcache::raw_write): Call raw_supply.
5985 (regcache::raw_supply): Move it to reg_buffer_rw.
5986 * regcache.h (regcache_raw_set_cached_value): Remove.
5987 (reg_buffer_rw): New class.
5989 2018-02-21 Yao Qi <yao.qi@linaro.org>
5991 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
5992 readonly_detached_regcache.
5993 (dummy_frame_prev_register): Use regcache->cooked_read.
5994 * frame.c (frame_save_as_regcache): Change return type.
5995 (frame_pop): Update.
5996 * frame.h (frame_save_as_regcache): Update declaration.
5997 * inferior.h (get_infcall_suspend_state_regcache): Update
5999 * infrun.c (infcall_suspend_state) <registers>: use
6000 readonly_detached_regcache.
6001 (save_infcall_suspend_state): Don't use regcache_dup.
6002 (get_infcall_suspend_state_regcache): Change return type.
6003 * linux-fork.c (struct fork_info) <savedregs>: Change to
6004 readonly_detached_regcache.
6006 (fork_save_infrun_state): Don't use regcache_dup.
6007 (info_checkpoints_command): Adjust.
6008 * mi/mi-main.c (register_changed_p): Update declaration.
6009 (mi_cmd_data_list_changed_registers): Use
6010 readonly_detached_regcache.
6011 (register_changed_p): Change parameter type to
6012 readonly_detached_regcache.
6013 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
6014 readonly_detached_regcache.
6015 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
6016 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
6018 (regcache::save): Move it to reg_buffer.
6019 (regcache::restore): Change parameter type.
6020 (regcache_dup): Remove.
6021 * regcache.h (reg_buffer) <save>: New method.
6022 (readonly_detached_regcache): New class.
6023 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
6024 readonly_detached_regcache.
6025 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
6027 2018-02-21 Yao Qi <yao.qi@linaro.org>
6029 * frame.c (frame_save_as_regcache): Use regcache method save.
6030 (frame_pop): Use regcache method restore.
6031 * infrun.c (restore_infcall_suspend_state): Likewise.
6032 * linux-fork.c (fork_load_infrun_state): Likewise.
6033 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
6035 * regcache.c (regcache_save): Remove.
6036 (regcache::restore): More asserts.
6037 (regcache_cpy): Remove.
6038 * regcache.h (regcache_save): Remove the declaration.
6039 (regcache::restore): Move from private to public.
6040 Remove the friend declaration of regcache_cpy.
6041 (regcache_cpy): Remove declaration.
6043 2018-02-21 Yao Qi <yao.qi@linaro.org>
6045 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
6046 parameter type to 'readable_regcache *'.
6047 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6048 * arm-tdep.c (arm_neon_quad_read): Likewise.
6049 (arm_pseudo_read): Likewise.
6050 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6051 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6052 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6053 * gdbarch.c: Re-generated.
6054 * gdbarch.h: Re-generated.
6055 * gdbarch.sh (pseudo_register_read): Change parameter type to
6056 'readable_regcache *'.
6057 (pseudo_register_read_value): Likewise.
6058 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6059 (h8300_pseudo_register_read): Likewise.
6060 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6061 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6062 (i386_pseudo_register_read_into_value): Likewise.
6063 (i386_pseudo_register_read_value): Likewise.
6064 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6066 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6067 * m32c-tdep.c (m32c_raw_read): Likewise.
6068 (m32c_read_flg): Likewise.
6069 (m32c_banked_register): Likewise.
6070 (m32c_banked_read): Likewise.
6071 (m32c_sb_read): Likewise.
6072 (m32c_part_read): Likewise.
6073 (m32c_cat_read): Likewise.
6074 (m32c_r3r2r1r0_read): Likewise.
6075 (m32c_pseudo_register_read): Likewise.
6076 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6077 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6078 (mep_pseudo_cr64_read): Likewise.
6079 (mep_pseudo_register_read): Likewise.
6080 * mips-tdep.c (mips_pseudo_register_read): Likewise.
6081 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6082 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6083 * regcache.c (regcache::raw_read): Move it to readable_regcache.
6084 (regcache::cooked_read): Likewise.
6085 (regcache::cooked_read_value): Likewise.
6086 (regcache_cooked_read_signed):
6087 (regcache::cooked_read): Likewise.
6088 * regcache.h (readable_regcache): New class.
6089 (regcache): Inherit readable_regcache. Move some methods to
6091 * rl78-tdep.c (rl78_pseudo_register_read): Change
6092 parameter type to 'readable_regcache *'.
6093 * rs6000-tdep.c (do_regcache_raw_read): Remove.
6094 (e500_pseudo_register_read): Change parameter type to
6095 'readable_regcache *'.
6096 (dfp_pseudo_register_read): Likewise.
6097 (vsx_pseudo_register_read): Likewise.
6098 (efpr_pseudo_register_read): Likewise.
6099 * s390-tdep.c (s390_pseudo_register_read): Likewise.
6100 * sh-tdep.c (sh_pseudo_register_read): Likewise.
6101 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6102 (sh64_pseudo_register_read): Likewise.
6103 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6104 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6105 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6106 (spu_pseudo_register_read): Likewise.
6107 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6108 (xtensa_pseudo_register_read): Likewise.
6110 2018-02-21 Yao Qi <yao.qi@linaro.org>
6112 * regcache.c (regcache::regcache): Call reg_buffer ctor.
6113 (regcache::arch): Move it to reg_buffer::arch.
6114 (regcache::register_buffer): Likewise.
6115 (regcache::assert_regnum): Likewise.
6116 (regcache::num_raw_registers): Likewise.
6117 * regcache.h (reg_buffer): New class.
6118 (regcache): Inherit reg_buffer.
6120 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
6122 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6123 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6125 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
6127 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6129 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6131 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6132 (SFILES): Remove common/*.c files.
6133 (COMMON_OBS): Remove some *.o files built from common/*.c files.
6134 * common/common.host: Add common reference.
6135 * configure.ac: Likewise.
6136 * configure: Regenerate.
6138 2018-02-16 Yao Qi <yao.qi@linaro.org>
6140 * block.c (block_namespace_info): Inherit allocate_on_obstack.
6141 (block_initialize_namespace): Use new.
6142 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6143 (dwarf2_free_objfile): Use delete.
6144 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6145 (copy_type_recursive): Use new.
6146 * gdb_obstack.h (allocate_on_obstack): New.
6148 2018-02-15 Yao Qi <yao.qi@linaro.org>
6151 * inferior.c (exit_inferior_1): Reset inf->control.
6153 2018-02-15 Joel Brobecker <brobecker@adacore.com>
6155 * ada-lang.c (ada_to_fixed_value_create): Delete advance
6158 2018-02-14 Pedro Alves <palves@redhat.com>
6160 * frame-unwind.c (frame_unwind_try_unwinder): Always call
6161 frame_cleanup_after_sniffer on exception.
6163 2018-02-14 Tom Tromey <tom@tromey.com>
6165 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6167 (solib_bfd_open): Make pathname const.
6168 * solib.c (solib_bfd_open): Make pathname const.
6169 * solib-spu.c (spu_bfd_fopen): Make name const.
6170 (spu_bfd_open): Make pathname const.
6171 * solib-darwin.c (darwin_bfd_open): Make pathname const.
6172 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6174 2018-02-14 Tom Tromey <tom@tromey.com>
6176 * symfile.c (symfile_bfd_open): Update.
6177 * source.h (openp, source_full_path_of, find_and_open_source):
6178 Change argument type to unique_xmalloc_ptr.
6179 * source.c (openp): Take a unique_xmalloc_ptr.
6180 (source_full_path_of, find_and_open_source): Likewise.
6181 (open_source_file, symtab_to_fullname): Update.
6182 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6184 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6185 (exec_file_find): Update.
6186 * psymtab.c (psymtab_to_fullname): Update.
6187 * nto-tdep.h (nto_find_and_open_solib): Update.
6188 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6190 * exec.c (exec_file_attach): Update.
6191 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6192 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6194 2018-02-14 Tom Tromey <tom@tromey.com>
6196 * solib.c: Include source.h.
6197 * nto-tdep.c: Include source.h.
6198 * mi/mi-cmd-env.c: Include source.h.
6199 * infcmd.c: Include source.h.
6200 * exec.c: Include source.h.
6201 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6202 (add_path, directory_switch, source_path, init_source_path): Move
6204 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6205 (add_path, directory_switch, source_path, init_source_path):
6208 2018-02-14 Tom Tromey <tom@tromey.com>
6210 * solist.h (exec_file_find, solib_find): Return
6212 (solib_bfd_fopen): Take a const char *.
6213 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6214 (exec_file_find, solib_find): Likewise.
6215 (solib_bfd_fopen): Do not take ownership of "pathname".
6216 (solib_bfd_open): Use unique_xmalloc_ptr.
6217 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6218 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6219 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6220 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6222 2018-02-14 Joel Brobecker <brobecker@adacore.com>
6224 * ada-lang.c (name_match_type_from_name): Remove reference to
6225 ada_name_for_lookup in function's documentation.
6226 * ada-lang.h (ada_name_for_lookup): Delete declaration.
6228 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6230 * defs.h (enum openp_flags): New enum.
6231 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6232 Move to enum openp_flags.
6233 (openp_flags): New enum flags.
6234 (openp): Change parameter type to openp_flags.
6235 * source.c (openp): Change parameter type to openp_flags.
6236 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6237 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6239 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6241 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6244 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
6246 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6248 (class dwarf2_queue_guard): ...the destructor of this new class.
6249 (dw2_do_instantiate_symtab): Create instance of the new class
6250 dwarf2_queue_guard, remove cleanup.
6252 2018-02-09 Tom Tromey <tom@tromey.com>
6254 * source.c (find_source_lines): Don't reference past the end of
6257 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6259 * remote.c (remote_btrace_maybe_reopen): Change error message.
6260 * btrace.c (btrace_enable): Likewise.
6261 (parse_xml_btrace): Likewise.
6262 (parse_xml_btrace_conf): Likewise.
6264 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6266 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6267 (linux_enable_pt, linux_enable_bts): Call
6268 diagnose_perf_event_open_fail.
6270 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6272 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6273 Remove parameter and change return type. Update callers. Move it.
6274 (linux_enable_bts, linux_enable_pt): Improve error message.
6275 (linux_enable_pt): Remove zero buffer size check.
6276 (linux_enable_btrace): Improve error messages. Remove NULL return
6279 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6281 * btrace.c (btrace_enable): Remove target_supports_btrace call.
6282 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
6283 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
6284 (linux_supports_pt, linux_supports_btrace): Remove.
6285 (linux_enable_bts): Call cpu_supports_bts.
6286 * nat/linux-btrace.h (linux_supports_btrace): Remove.
6287 * remote.c (remote_supports_btrace): Remove.
6288 (init_remote_ops): Remove remote_supports_btrace.
6289 * target-delegates.c: Regenerated.
6290 * target.c (target_supports_btrace): Remove.
6291 * target.h (target_ops) <to_supports_btrace>: Remove
6292 (target_supports_btrace): Remove.
6293 * x86-linux-nat.c (x86_linux_create_target): Remove
6294 linux_supports_btrace.
6296 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6298 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
6300 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
6301 exception and use message in own exception.
6303 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6305 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
6306 (perf_event_pt_event_type): Use gdb_file_up.
6307 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
6308 scoped_fd, and scoped_mmap.
6310 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6312 * common/scoped_mmap.h: New.
6313 * unittests/scoped_mmap-selftest.c: New.
6314 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6315 unittests/scoped_mmap-selftest.c.
6317 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6319 * common/scoped_fd.h: New.
6320 * unittests/scoped_fd-selftest.c: New.
6321 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6322 unittests/scoped_fd-selftest.c.
6324 2018-02-09 Tom Tromey <tom@tromey.com>
6326 * auto-load.c (auto_load_section_scripts): Use
6327 gdb::unique_xmalloc_ptr.
6329 2018-02-09 Tom Tromey <tom@tromey.com>
6331 * auto-load.c (execute_script_contents): Use std::string.
6333 2018-02-09 Joel Brobecker <brobecker@adacore.com>
6335 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
6336 Python function, rather than a new command.
6338 2018-02-08 Tom Tromey <tom@tromey.com>
6340 * solib.c (solib_find_1): Use std::string.
6341 (solib_bfd_fopen): Use unique_xmalloc_ptr.
6343 2018-02-08 Tom Tromey <tom@tromey.com>
6345 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
6347 2018-02-08 Tom Tromey <tom@tromey.com>
6349 * source.c (find_source_lines): Use gdb::def_vector.
6351 2018-02-08 Tom Tromey <tom@tromey.com>
6353 * macrocmd.c (struct temporary_macro_definition): New.
6354 (macro_define_command): Use temporary_macro_definition. Remove
6356 (free_macro_definition_ptr): Remove.
6358 2018-02-08 Tom Tromey <tom@tromey.com>
6360 * macroexp.c (maybe_expand): Use std::string.
6362 2018-02-08 Tom Tromey <tom@tromey.com>
6364 * macroexp.c (struct macro_buffer): Add initializers for some
6366 (init_buffer, init_shared_buffer, free_buffer)
6367 (free_buffer_return_text): Remove.
6368 (macro_buffer): New constructors.
6369 (~macro_buffer): New destructor.
6370 (macro_buffer::set_shared): New method.
6371 (macro_buffer::resize_buffer, macro_buffer::appendc)
6372 (macro_buffer::appendmem): Now methods, not free functions.
6373 (set_token, append_tokens_without_splicing, stringify)
6374 (macro_stringify): Update.
6375 (gather_arguments): Change return type. Remove argc_p argument,
6376 add args_ptr argument. Use std::vector.
6377 (substitute_args): Remove argc argument. Accept std::vector.
6378 (expand): Update. Use std::vector.
6379 (scan, macro_expand, macro_expand_next): Update.
6381 2018-02-08 Tom Tromey <tom@tromey.com>
6383 * symtab.c (default_collect_symbol_completion_matches_break_on):
6384 Use unique_xmalloc_ptr.
6385 * macroscope.h: (sal_macro_scope, user_macro_scope)
6386 (default_macro_scope): Return unique_xmalloc_ptr.
6387 * macroscope.c (sal_macro_scope, user_macro_scope)
6388 (default_macro_scope): Return unique_xmalloc_ptr.
6389 * macroexp.h (macro_expand, macro_expand_once): Return
6391 * macroexp.c (macro_expand, macro_expand_once): Return
6393 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6394 (info_macro_command, info_macros_command): Use
6396 * compile/compile-c-support.c (write_macro_definitions): Use
6398 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
6400 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
6402 * value.c (value_static_field): Assign field type instead of
6403 containing type when returning an optimized out value.
6405 2018-02-06 Yao Qi <yao.qi@linaro.org>
6407 * ft32-tdep.c (ft32_read_pc): Remove.
6408 (ft32_write_pc): Remove.
6409 (ft32_gdbarch_init): Update.
6410 * m32r-tdep.c (m32r_read_pc): Remove.
6411 (m32r_gdbarch_init): Update.
6412 * mep-tdep.c (mep_read_pc): Remove.
6413 (mep_gdbarch_init): Update.
6414 * microblaze-tdep.c (microblaze_write_pc): Remove.
6415 (microblaze_gdbarch_init): Update.
6416 * mn10300-tdep.c (mn10300_read_pc): Remove.
6417 (mn10300_write_pc): Remove.
6418 (mn10300_gdbarch_init): Update.
6419 * moxie-tdep.c (moxie_read_pc): Remove.
6420 (moxie_write_pc): Remove.
6421 (moxie_gdbarch_init): Update.
6423 2018-02-06 Yao Qi <yao.qi@linaro.org>
6425 * expprint.c (print_subexp_standard): Handle
6426 OP_F77_UNDETERMINED_ARGLIST.
6427 (dump_subexp_body_standard): Likewise.
6429 2018-02-05 Alan Hayward <alan.hayward@arm.com>
6431 * target-descriptions.c (tdesc_element_visitor) Add empty
6433 (tdesc_type): Move make_gdb_type from here.
6434 (tdesc_type_builtin): Likewise.
6435 (tdesc_type_vector): Likewise.
6436 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
6437 (make_gdb_type_struct): Move from tdesc_type_with_fields.
6438 (make_gdb_type_union): Likewise.
6439 (make_gdb_type_flags): Likewise.
6440 (make_gdb_type_enum): Likewise.
6441 (make_gdb_type): New function.
6442 (tdesc_register_type): Use static make_gdb_type.
6444 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
6446 * infcmd.c (default_print_one_register_info): Align natural-format
6447 column values consistently one under another.
6448 (pad_to_column): New function.
6450 2018-02-05 Joel Brobecker <brobecker@adacore.com>
6452 * dwarf2read.c (dwarf2_physname): Move commment.
6454 2018-02-01 Leszek Swirski <leszeks@google.com>
6456 * varobj.c (varobj_formatted_print_options): Allow recursive
6457 pretty printing if pretty printing is enabled.
6459 2018-02-01 Leszek Swirski <leszeks@google.com>
6461 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
6462 names after a structop as a filename.
6464 2018-02-01 Yao Qi <yao.qi@linaro.org>
6466 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
6467 (arm_record_coproc_data_proc): Likewise.
6469 2018-02-01 Yao Qi <yao.qi@linaro.org>
6471 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
6473 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
6475 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
6476 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
6478 2018-01-31 Pedro Alves <palves@redhat.com>
6480 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
6481 * inflow.c (child_terminal_save_inferior): Wrap reference to
6482 tcgetpgrp in HAVE_TERMIOS_H.
6483 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
6485 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
6486 always iterate over all inferiors.
6487 (gdbsim_cntrl_c): Adjust.
6488 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
6490 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6492 * gdbtypes.c (lookup_array_range_type): Make sure the array's
6493 index type is objfile-owned if the element type is as well.
6495 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6499 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
6501 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
6502 "features/s390x-linux64.c".
6503 (_initialize_s390_linux_tdep): Remove initialization of tdescs
6504 s390_linux32 and s390x_linux64.
6505 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
6507 * s390-tdep.c: Include "features/s390-linux32.c" and
6508 "features/s390x-linux64.c".
6509 (s390_tdesc_valid): Add check for tdesc_has_registers.
6510 (s390_gdbarch_init): Make sure there is always a valid tdesc.
6511 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
6512 tdesc_s390x_linux64.
6513 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
6514 tdesc_s390x_linux64 to...
6515 * s390-tdep.h: ...here.
6517 2018-01-30 Pedro Alves <palves@redhat.com>
6520 * config.in, configure: Regenerate.
6521 * configure.ac: Check for getpgid.
6522 * go32-nat.c (go32_pass_ctrlc): New.
6523 (go32_target): Install it.
6524 * inf-child.c (inf_child_target): Install
6525 child_terminal_save_inferior, child_pass_ctrlc and
6527 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
6528 (inf_ptrace_target): No longer install it.
6529 * infcmd.c (interrupt_target_1): Adjust.
6530 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
6531 (child_interrupt): Declare.
6532 (inferior::terminal_state): New.
6533 * inflow.c (struct terminal_info): Update comments.
6534 (inferior_process_group): Delete.
6535 (terminal_is_ours): Delete.
6536 (gdb_tty_state): New.
6537 (child_terminal_init): Adjust.
6538 (is_gdb_terminal, sharing_input_terminal_1)
6539 (sharing_input_terminal): New functions.
6540 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
6541 Set the process's actual process group in the foreground if
6542 possible. Handle is_ours_for_output/is_ours distinction. Don't
6543 mark terminal as the inferior's if not sharing GDB's terminal.
6544 Don't check attach_flag.
6545 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
6546 pass down a target_terminal_state.
6547 (child_terminal_save_inferior): New, factored out from ...
6548 (child_terminal_ours_1): ... this. Handle
6549 target_terminal_state::is_ours_for_output.
6550 (child_interrupt, child_pass_ctrlc): New.
6551 (inflow_inferior_exit): Clear the inferior's terminal_state.
6552 (copy_terminal_info): Copy the inferior's terminal state.
6553 (_initialize_inflow): Remove reference to terminal_is_ours.
6554 * inflow.h (inferior_process_group): Delete.
6555 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
6556 * procfs.c (procfs_target): Don't install procfs_interrupt.
6557 (procfs_interrupt): Delete.
6558 * remote.c (remote_serial_quit_handler): Adjust.
6559 (remote_interrupt): Remove ptid parameter. Adjust.
6560 * target-delegates.c: Regenerate.
6561 * target.c: Include "terminal.h".
6562 (target_terminal::terminal_state): Rename to ...
6563 (target_terminal::m_terminal_state): ... this.
6564 (target_terminal::init): Adjust.
6565 (target_terminal::inferior): Adjust to per-inferior
6567 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
6568 (target_terminal::ours, target_terminal::ours_for_output): Use
6569 target_terminal_is_ours_kind.
6570 (target_interrupt): Remove ptid parameter. Adjust.
6571 (default_target_pass_ctrlc): Adjust.
6572 * target.h (target_ops::to_terminal_save_inferior): New field.
6573 (target_ops::to_interrupt): Remove ptid_t parameter.
6574 (target_interrupt): Remove ptid_t parameter. Update comment.
6575 (target_pass_ctrlc): Update comment.
6576 * target/target.h (target_terminal_state): New scoped enum,
6578 (target_terminal::terminal_state): ... here.
6579 (target_terminal::inferior): Update comments.
6580 (target_terminal::restore_inferior): New.
6581 (target_terminal::is_inferior, target_terminal::is_ours)
6582 (target_terminal::is_ours_for_output): Adjust.
6583 (target_terminal::scoped_restore_terminal_state): Adjust to
6584 rename, and call restore_inferior() instead of inferior().
6585 (target_terminal::scoped_restore_terminal_state::m_state): Change
6587 (target_terminal::terminal_state): Rename to ...
6588 (target_terminal::m_terminal_state): ... this and change type.
6590 2018-01-30 Pedro Alves <palves@redhat.com>
6592 * linux-nat.c (wait_for_signal): New function.
6593 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
6595 (async_terminal_is_ours)
6596 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
6597 (linux_nat_add_target): Don't override
6598 to_terminal_inferior/to_terminal_ours.
6600 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
6602 * remote.c (remote_follow_fork): Don't call "detach_inferior".
6604 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
6606 * dwarf2read.c (free_dwo_files): Add forward-declaration.
6607 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
6608 dwarf2_per_objfile_free here.
6609 (dwarf2_per_objfile_free): Remove.
6610 (_initialize_dwarf2_read): Don't register
6611 dwarf2_per_objfile_free as a registry cleanup.
6613 2018-01-27 Eli Zaretskii <eliz@gnu.org>
6615 Avoid compilation errors in MinGW native builds
6617 The error is triggered by including python-internal.h, and the
6620 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
6621 from build-gnulib/import/math.h:27,
6622 from d:/usr/Python26/include/pyport.h:235,
6623 from d:/usr/Python26/include/Python.h:58,
6624 from python/python-internal.h:94,
6625 from python/py-arch.c:24:
6626 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
6630 This happens because Python headers define 'hypot' to expand t
6631 '_hypot' in the Windows builds.
6632 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
6633 'hypoth'. This avoids a compilation error.
6635 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6637 * MAINTAINERS (Write After Approval): Fix ordering.
6639 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6641 * MAINTAINERS (Write After Approval): Add Alan Hayward.
6643 2018-01-26 Alan Modra <amodra@gmail.com>
6645 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
6646 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
6647 Remove nop. Make const. Comment.
6648 (powerpc32_plt_stub_so_2): New.
6649 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
6650 Correct count. Update uses.
6651 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
6652 Move common code reading PLT entry word. Correct
6653 powerpc32_plt_stub PLT address calculation.
6654 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
6655 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
6656 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
6657 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
6658 (ppc64_standard_linkage8): Likewise.
6659 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
6660 Correct insns description.
6661 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
6663 2018-01-24 Pedro Alves <palves@redhat.com>
6665 GCC PR libstdc++/83906
6666 * gdbtypes.c (operator==(const dynamic_prop &,
6667 const dynamic_prop &)): New.
6668 (operator==(const range_bounds &, const range_bounds &)): New.
6669 (check_types_equal): Use them instead of memcmp.
6670 * gdbtypes.h (operator==(const dynamic_prop &,
6671 const dynamic_prop &)): Declare.
6672 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
6673 (operator==(const range_bounds &, const range_bounds &)): Declare.
6674 (operator!=(const range_bounds &, const range_bounds &)): Declare.
6676 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6678 * s390-linux-tdep.c (s390_record_address_mask)
6679 (s390_record_calc_disp_common, s390_record_calc_disp)
6680 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6681 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6682 (s390_process_record): Move to s390-tdep.c.
6683 (s390_linux_init_abi_any): Adjust.
6684 * s390-tdep.c (s390_record_address_mask)
6685 (s390_record_calc_disp_common, s390_record_calc_disp)
6686 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6687 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6688 (s390_process_record): Moved from s390-linux-tdep.c
6689 (s390_gdbarch_init): Adjust.
6691 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6693 * s390-linux-nat.c (s390-tdep.h): New include.
6694 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
6695 (HFILES_NO_SRCDIR): Add s390-tdep.h.
6696 (ALLDEPFILES): Add s390-tdep.c.
6697 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
6698 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
6699 * s390-tdep.h: ...this. New file.
6700 * s390-linux-tdep.c (s390-tdep.h): New include.
6701 (_initialize_s390_tdep): Rename to...
6702 (_initialize_s390_linux_tdep): ...this and adjust.
6703 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
6704 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
6706 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
6707 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
6708 (s390_is_partial_instruction, s390_software_single_step)
6709 (is_non_branch_ril, s390_displaced_step_copy_insn)
6710 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
6711 (s390_prologue_data, s390_addr, s390_store, s390_load)
6712 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
6713 (s390_register_call_saved, s390_guess_tracepoint_registers)
6714 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
6715 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
6716 (s390_pseudo_register_name, s390_pseudo_register_type)
6717 (s390_pseudo_register_read, s390_pseudo_register_write)
6718 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
6719 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
6720 (s390_addr_bits_remove, s390_address_class_type_flags)
6721 (s390_address_class_type_flags_to_name)
6722 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
6723 (s390_function_arg_float, s390_function_arg_vector)
6724 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
6725 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
6726 (s390_frame_align, s390_register_return_value, s390_return_value)
6727 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
6728 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
6729 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
6730 (s390_trad_frame_prev_register, s390_unwind_cache)
6731 (s390_prologue_frame_unwind_cache)
6732 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
6733 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
6734 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
6735 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
6736 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
6737 (s390_frame_base_address, s390_local_base_address)
6738 (s390_frame_base, s390_gcc_target_options)
6739 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
6740 (s390_validate_reg_range, s390_tdesc_valid)
6741 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
6742 * s390-tdep.c: ...this. New file.
6744 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6746 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
6747 (s390_process_record, s390_gdbarch_tdep_alloc)
6748 (s390_linux_init_abi_any): Use/set new hook.
6750 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6752 * s390-linux-tdep.c (osabi.h): New include.
6753 (s390_linux_init_abi_31, s390_linux_init_abi_64)
6754 (s390_linux_init_abi_any): New functions.
6755 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
6757 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6759 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
6760 tdesc_has_registers check
6762 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6764 * s390-linux-tdep.c (s390_tdesc_valid): New function.
6765 (s390_validate_reg_range): New macro.
6766 (s390_gdbarch_init): Adjust.
6768 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6770 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
6771 (s390_gdbarch_tdep_alloc): Adjust.
6772 (s390_gdbarch_init): Adjust.
6774 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6776 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
6777 <have_tdb>: Change type to bool.
6778 (s390_gdbarch_tdep_alloc): Adjust.
6779 (s390_gdbarch_init): Adjust.
6781 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6783 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
6784 (gdbarch_tdep) <have_upper, have_vx>: New fields.
6785 (s390_gdbarch_tdep_alloc): New function.
6786 (s390_gdbarch_init): Allocate tdep at start and use its fields
6787 instead of separate variables.
6789 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6791 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
6792 when looking for cached gdbarch and add comment for remaining.
6794 2018-01-22 Pedro Alves <palves@redhat.com>
6795 Sergio Durigan Junior <sergiodj@redhat.com>
6797 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
6800 2018-01-22 Maciej W. Rozycki <macro@mips.com>
6802 * MAINTAINERS: Update my company e-mail address.
6804 2018-01-22 Yao Qi <yao.qi@linaro.org>
6806 * regcache.c (cooked_write_test): New function.
6807 (_initialize_regcache): Register the test.
6809 2018-01-22 Yao Qi <yao.qi@linaro.org>
6811 * ia64-tdep.c (ia64_pseudo_register_read): Call
6812 regcache->cooked_read instead of regcache_cooked_read_unsigned.
6813 * m32c-tdep.c (m32c_cat_read): Likewise.
6814 (m32c_r3r2r1r0_read): Likewise.
6815 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6816 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6818 2018-01-22 Yao Qi <yao.qi@linaro.org>
6820 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
6821 method raw_read instead of regcache_raw_read.
6822 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6823 * arm-tdep.c (arm_neon_quad_read): Likewise.
6824 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6825 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6826 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6827 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
6828 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6829 (i386_pseudo_register_read_into_value): Likewise.
6830 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6831 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6832 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6833 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
6834 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
6835 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6836 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6837 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6838 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
6840 2018-01-22 Yao Qi <yao.qi@linaro.org>
6842 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
6843 * configure.tgt: Remove target mt.
6844 * mt-tdep.c: Remove.
6845 * regcache.c (cooked_read_test): Remove the check for mt.
6847 2018-01-22 Yao Qi <yao.qi@linaro.org>
6849 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
6850 instead of gdbarch_pseudo_register_read_value.
6852 2018-01-22 Joel Brobecker <brobecker@adacore.com>
6854 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
6857 2018-01-22 Joel Brobecker <brobecker@adacore.com>
6859 * linespec.c (create_sals_line_offset): Remove code that preserved
6860 the symtab_and_line's line number.
6862 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6864 * varobj.c (varobj_create): Don't set valid_block when creating a
6867 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6869 * varobj.c (varobj_create): Remove out of date comment.
6871 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6874 * ada-exp.y (write_var_from_sym): Pass extra parameter when
6875 updating innermost block.
6876 * parse.c (innermost_block_tracker::update): Take extra type
6877 parameter, and check types match before updating innermost block.
6878 (write_dollar_variable): Update innermost block for registers.
6879 * parser-defs.h (enum innermost_block_tracker_type): New enum.
6880 (innermost_block_tracker::innermost_block_tracker): Initialise
6882 (innermost_block_tracker::reset): Take type parameter.
6883 (innermost_block_tracker::update): Take type parameter, and pass
6884 type through as needed.
6885 (innermost_block_tracker::m_types): New member.
6886 * varobj.c (varobj_create): Pass type when reseting innermost
6889 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6891 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
6892 * ada-lang.c (resolve_subexp): Likewise.
6893 * breakpoint.c (set_breakpoint_condition) Likewise.
6894 (watch_command_1) Likewise.
6895 * c-exp.y (variable): Likewise.
6896 * d-exp.y (PrimaryExpression): Likewise.
6897 * f-exp.y (variable): Likewise.
6898 * go-exp.y (variable): Likewise.
6899 * m2-exp.y (variable): Likewise.
6900 * objfiles.c (objfile::~objfile): Likewise.
6901 * p-exp.y (variable): Likewise.
6902 * parse.c (innermost_block): Change type.
6903 * parser-defs.h (class innermost_block_tracker): New.
6904 (innermost_block): Change to innermost_block_tracker.
6905 * printcmd.c (display_command): Switch to innermost_block API.
6906 (do_one_display): Likewise.
6907 * rust-exp.y (do_one_display): Likewise.
6908 * symfile.c (clear_symtab_users): Likewise.
6909 * varobj.c (varobj_create): Switch to innermost_block API, replace
6910 use of innermost_block with block stored on varobj object.
6912 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6914 * expression.h (innermost_block): Remove declaration.
6915 * varobj.c: Add 'parser-defs.h' include.
6917 2018-01-19 Tom Tromey <tom@tromey.com>
6919 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
6920 symbols in the static and global blocks.
6922 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6924 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
6925 gdb_ptrace.h, and move including gdb_wait.h ...
6926 * nat/linux-ptrace.h: ... to here.
6928 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6930 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
6931 inf_ptrace_detach_success.
6932 (inf_ptrace_detach_success): Add inferior parameter, use it
6933 instead of inferior_ptid, pass it to detach_inferior.
6934 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
6936 * inferior.c (detach_inferior): Add overload that takes an
6938 * inferior.h (detach_inferior): Likewise.
6939 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
6940 use inferior_ptid, adjust call to inf_ptrace_detach_success.
6941 * linux-thread-db.c (thread_db_detach): Use inf parameter.
6943 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6945 * target.h (struct target_ops) <to_detach>: Add inferior
6947 (target_detach): Likewise.
6948 * target.c (dispose_inferior): Pass inferior down.
6949 (target_detach): Pass inferior down. Assert that it is equal to
6950 the current inferior.
6951 * aix-thread.c (aix_thread_detach): Pass inferior down.
6952 * corefile.c (core_file_command): Pass current_inferior() down.
6953 * corelow.c (core_detach): Add inferior parameter.
6954 * darwin-nat.c (darwin_detach): Likewise.
6955 * gnu-nat.c (gnu_detach): Likewise.
6956 * inf-ptrace.c (inf_ptrace_detach): Likewise.
6957 * infcmd.c (detach_command): Pass current_inferior() down to
6959 * infrun.c (follow_fork_inferior): Pass parent_inf to
6961 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
6963 * linux-nat.c (linux_nat_detach): Add inferior parameter.
6964 * linux-thread-db.c (thread_db_detach): Likewise.
6965 * nto-procfs.c (procfs_detach): Likewise.
6966 * procfs.c (procfs_detach): Likewise.
6967 * record.c (record_detach): Likewise.
6968 * record.h (struct inferior): Forward-declare.
6969 (record_detach): Add inferior parameter.
6970 * remote-sim.c (gdbsim_detach): Likewise.
6971 * remote.c (remote_detach_1): Likewise.
6972 (remote_detach): Likewise.
6973 (extended_remote_detach): Likewise.
6974 * sol-thread.c (sol_thread_detach): Likewise.
6975 * target-debug.h (target_debug_print_inferior_p): New macro.
6976 * target-delegates.c: Re-generate.
6977 * top.c (kill_or_detach): Pass inferior down to target_detach.
6978 * windows-nat.c (windows_detach): Add inferior parameter.
6980 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6982 * target.h (struct target_ops) <to_detach>: Remove args
6984 (target_detach): Likewise.
6985 * target.c (dispose_inferior): Adjust.
6986 (target_detach): Remove args parameter, adjust.
6987 * aix-thread.c (aix_thread_detach): Adjust.
6988 * corefile.c (core_file_command): Adjust.
6989 * corelow.c (core_detach): Adjust.
6990 * darwin-nat.c (darwin_detach): Adjust.
6991 * gnu-nat.c (gnu_detach): Adjust.
6992 * inf-ptrace.c (inf_ptrace_detach): Adjust.
6993 * infcmd.c (detach_command): Adjust
6994 * infrun.c (follow_fork_inferior): Adjust.
6995 (handle_vfork_child_exec_or_exit): Adjust.
6996 * linux-fork.c (linux_fork_detach): Remove args parameter.
6997 * linux-fork.h (linux_fork_detach): Likewise.
6998 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
6999 * linux-thread-db.c (thread_db_detach): Likewise.
7000 * nto-procfs.c (procfs_detach): Likewise.
7001 * procfs.c (procfs_detach): Likewise.
7002 (do_detach): Remove signo parameter.
7003 * record.c (record_detach): Remove args parameter.
7004 * record.h (record_detach): Likewise.
7005 * remote-sim.c (gdbsim_detach): Likewise.
7006 * remote.c (remote_detach_1): Likewise.
7007 (remote_detach): Likewise.
7008 (extended_remote_detach): Likewise.
7009 * sol-thread.c (sol_thread_detach): Likewise.
7010 * target-delegates.c: Re-generate.
7011 * top.c (struct qt_args) <args>: Remove field.
7012 (kill_or_detach): Don't pass args.
7013 (quit_force): Don't set args.
7014 * windows-nat.c (windows_detach): Remove args parameter.
7016 2018-01-19 Yao Qi <yao.qi@linaro.org>
7018 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
7019 (arm_linux_init_abi): Install it.
7021 2018-01-19 Yao Qi <yao.qi@linaro.org>
7023 * osabi.c (gdb_osabi_names): Extend the regexp for
7024 arm-linux-gnueabihf.
7026 2018-01-18 Yao Qi <yao.qi@linaro.org>
7028 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
7030 (abbrev_table::add_abbrev): Update.
7031 (abbrev_table::lookup_abbrev): Update.
7033 2018-01-18 Yao Qi <yao.qi@linaro.org>
7035 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
7037 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
7039 * compile/compile.c (compile_to_object): Convert "triplet_rx"
7042 2018-01-17 Tom Tromey <tom@tromey.com>
7044 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
7046 2018-01-17 Tom Tromey <tom@tromey.com>
7048 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7049 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7050 (create_array_type_with_stride): Update.
7051 * dwarf2read.c (set_die_type): Update.
7053 2018-01-17 Tom Tromey <tom@tromey.com>
7055 * dwarf2read.c (delayed_method_info): Remove typedef.
7056 (dwarf2_cu::method_info): Now a std::vector.
7057 (add_to_method_list): Update.
7058 (free_delayed_list): Remove.
7059 (compute_delayed_physnames): Update.
7060 (process_full_comp_unit, process_full_type_unit): Clear the method
7061 list. Remove cleanups.
7062 (psymtab_include_file_name): Add name_holder parameter. Use
7064 (dwarf_decode_lines): Update.
7066 2018-01-17 Tom Tromey <tom@tromey.com>
7067 Simon Marchi <simon.marchi@ericsson.com>
7069 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7070 (dwarf2_per_objfile::free_cached_comp_units)
7071 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7072 (init_cutu_and_read_dies_no_follow): Update.
7073 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7074 (dwarf2_cu::~dwarf2_cu): New.
7075 (free_heap_comp_unit, free_stack_comp_unit): Remove.
7076 (age_cached_comp_units, free_one_cached_comp_unit): Update.
7078 2018-01-17 Tom Tromey <tom@tromey.com>
7079 Simon Marchi <simon.marchi@ericsson.com>
7081 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7082 (struct die_reader_specs) <abbrev_table>: New member.
7083 (struct abbrev_table): Add constructor.
7084 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7085 <abbrev_obstack>: Now an auto_obstack.
7086 (abbrev_table_up): New typedef.
7087 (init_cu_die_reader): Add abbrev_table parameter.
7088 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7089 Add result_dwo_abbrev_table.
7090 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7091 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7093 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7095 (skip_children): Update.
7096 (abbrev_table::alloc_abbrev): Rename from
7097 abbrev_table_alloc_abbrev.
7098 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7099 (abbrev_table::lookup_abbrev): Rename from
7100 abbrev_table_lookup_abbrev.
7101 (abbrev_table_read_table): Return abbrev_table_up.
7102 (abbrev_table_free, abbrev_table_free_cleanup)
7103 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7104 (load_partial_dies): Update.
7106 2018-01-17 Tom Tromey <tom@tromey.com>
7108 * dwarf2read.c (dwarf2_compute_name): Update comment.
7109 (read_func_scope, read_variable): Update.
7110 (new_symbol): Remove.
7111 (new_symbol_full): Rename to new_symbol.
7113 2018-01-17 Mike Gulick <mgulick@mathworks.com>
7116 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7117 a warning instead of throwing an error, set section size to 0 and return
7119 * gdb_bfd.h (gdb_bfd_map_section): Update description.
7121 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7123 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7125 (linux_ptrace_attach_fail_reason_string): Likewise.
7126 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7128 (linux_ptrace_attach_fail_reason_string): Likewise.
7129 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7131 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7133 * linux-nat.c (linux_nat_attach): Remove xstrdup.
7135 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
7138 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7139 checking for fs_base/gs_base fields in struct user_regs_struct.
7140 * configure: Regenerate.
7142 2018-01-17 Yao Qi <yao.qi@linaro.org>
7144 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7146 (aarch64_linux_init_abi): Install it to gdbarch hook
7149 2018-01-15 Pedro Alves <palves@redhat.com>
7151 * common/signals-state-save-restore.c
7152 (save_original_signals_state): Fix typos.
7154 2017-01-12 Tom Tromey <tom@tromey.com>
7155 Sergio Durigan Junior <sergiodj@redhat.com>
7157 * Makefile.in (install-only): Install gdb-add-index.
7159 2018-01-12 John Baldwin <jhb@FreeBSD.org>
7161 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7163 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7165 * infrun.c (keep_going_pass_signal): Clear step-over info when
7166 insert_breakpoints fails.
7168 2018-01-11 Pedro Alves <palves@redhat.com>
7171 * infrun.c (resume): Rename to ...
7172 (resume_1): ... this.
7173 (resume): Reimplement as wrapper around resume_1.
7175 2018-01-11 Pedro Alves <palves@redhat.com>
7178 * remote.c (remote_parse_stop_reply): Default to the last-set
7179 general thread instead of to 'magic_null_ptid'.
7181 2018-01-10 Pedro Alves <palves@redhat.com>
7183 * language.h (language_get_symbol_name_matcher): Rename ...
7184 (get_symbol_name_matcher): ... this.
7185 * language.c (language_get_symbol_name_matcher): Ditto.
7186 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7189 2018-01-10 Pedro Alves <palves@redhat.com>
7193 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7194 Adjust to use language_get_symbol_name_matcher instead of
7195 language_defn::la_get_symbol_name_matcher.
7196 * language.c (language_get_symbol_name_matcher): If in Ada mode
7197 and the lookup name is a verbatim match, return Ada's matcher.
7198 * language.h (language_get_symbol_name_matcher): Adjust comment.
7199 (ada_lookup_name_info::verbatim_p):: New method.
7201 2018-01-10 Pedro Alves <palves@redhat.com>
7204 * ada-lang.c (ada_collect_symbol_completion_matches): If the
7205 minsym's language is language_auto or language_cplus, pass down
7206 language_ada instead.
7207 * symtab.c (compare_symbol_name): Don't frob symbol language here.
7209 2018-01-10 Pedro Alves <palves@redhat.com>
7212 * minsyms.c (linkage_name_str): New function.
7213 (iterate_over_minimal_symbols): Use it.
7215 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7217 * NEWS: Document that 'info proc' now works on FreeBSD.
7219 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7221 * configure.ac: Check for kinfo_getfile in libutil.
7222 * configure: Regenerate.
7223 * config.in: Regenerate.
7224 * fbsd-nat.c: Include "fbsd-tdep.h".
7225 (fbsd_fetch_cmdline): New.
7226 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7227 rather than calling error.
7228 (fbsd_info_proc): New.
7229 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7230 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7231 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7233 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7235 * fbsd-nat.c (struct free_deleter): Remove.
7236 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7238 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7240 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7241 NULL for an empty pathname.
7243 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7245 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7246 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7247 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7248 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7249 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7250 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7251 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7252 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7253 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7254 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7255 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7256 (fbsd_core_fetch_timeval, fbsd_print_sigset)
7257 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7258 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
7259 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7261 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
7263 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7264 (gnu_xfer_auxv): New function.
7265 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7268 2018-01-08 Yao Qi <yao.qi@linaro.org>
7269 Simon Marchi <simon.marchi@ericsson.com>
7271 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7273 (COMMON_OBS): Remove selftest.o.
7274 * configure.ac: Append selftest-arch.c and common/selftest.c to
7275 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
7276 * configure: Re-generated.
7277 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
7279 (maintenance_info_selftests): Likewise.
7281 2018-01-08 Xavier Roirand <roirand@adacore.com>
7283 * ada-valprint.c (val_print_packed_array_elements): Use
7284 proper number of elements when printing an array indexed
7285 by an enumeration type.
7287 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7289 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
7290 (dw2_get_file_names_reader): Adjust.
7291 (lookup_dwo_signatured_type): Adjust.
7292 (lookup_dwp_signatured_type): Adjust.
7293 (lookup_signatured_type): Adjust.
7294 (create_type_unit_group): Adjust.
7295 (get_type_unit_group): Adjust.
7296 (process_psymtab_comp_unit_reader): Adjust.
7297 (build_type_psymtabs_reader): Adjust.
7298 (scan_partial_symbols): Adjust.
7299 (add_partial_symbol): Adjust.
7300 (add_partial_subprogram): Adjust.
7301 (peek_die_abbrev): Adjust.
7302 (fixup_go_packaging): Adjust.
7303 (process_imported_unit_die): Adjust.
7304 (dwarf2_compute_name): Adjust.
7305 (dwarf2_physname): Adjust.
7306 (read_import_statement): Adjust.
7307 (handle_DW_AT_stmt_list): Adjust.
7308 (read_file_scope): Adjust.
7309 (read_func_scope): Adjust.
7310 (read_lexical_block_scope): Adjust.
7311 (read_call_site_scope): Adjust.
7312 (read_variable): Adjust.
7313 (dwarf2_rnglists_process): Adjust.
7314 (dwarf2_ranges_process): Adjust.
7315 (dwarf2_ranges_read): Adjust.
7316 (dwarf2_get_pc_bounds): Adjust.
7317 (dwarf2_record_block_ranges): Adjust.
7318 (dwarf2_add_field): Adjust.
7319 (dwarf2_add_member_fn): Adjust.
7320 (read_structure_type): Adjust.
7321 (process_structure_scope): Adjust.
7322 (read_enumeration_type): Adjust.
7323 (read_array_type): Adjust.
7324 (mark_common_block_symbol_computed): Adjust.
7325 (read_common_block): Adjust.
7326 (read_namespace_type): Adjust.
7327 (read_namespace): Adjust.
7328 (read_module_type): Adjust.
7329 (read_tag_pointer_type): Adjust.
7330 (read_tag_ptr_to_member_type): Adjust.
7331 (read_tag_string_type): Adjust.
7332 (read_subroutine_type): Adjust.
7333 (read_typedef): Adjust.
7334 (read_base_type): Adjust.
7335 (attr_to_dynamic_prop): Adjust.
7336 (read_subrange_type): Adjust.
7337 (read_unspecified_type): Adjust.
7338 (dwarf2_read_abbrevs): Adjust.
7339 (load_partial_dies): Adjust.
7340 (read_partial_die): Adjust.
7341 (find_partial_die): Adjust.
7342 (guess_partial_die_structure_name): Adjust.
7343 (fixup_partial_die): Adjust.
7344 (read_attribute_value): Adjust.
7345 (read_addr_index): Adjust.
7346 (read_addr_index_from_leb128): Adjust.
7347 (read_str_index): Adjust.
7348 (dwarf2_string_attr): Adjust.
7349 (get_debug_line_section): Adjust.
7350 (dwarf_decode_line_header): Adjust.
7351 (lnp_state_machine::check_line_address): Adjust.
7352 (dwarf_decode_lines_1): Adjust.
7353 (dwarf_decode_lines): Adjust.
7354 (dwarf2_start_symtab): Adjust.
7355 (var_decode_location): Adjust.
7356 (new_symbol_full): Adjust.
7357 (dwarf2_const_value_data): Adjust.
7358 (dwarf2_const_value_attr): Adjust.
7359 (dwarf2_const_value): Adjust.
7361 (die_containing_type): Adjust.
7362 (build_error_marker_type): Adjust.
7363 (lookup_die_type): Adjust.
7364 (guess_full_die_structure_name): Adjust.
7365 (anonymous_struct_prefix): Adjust.
7366 (determine_prefix): Adjust.
7367 (dwarf2_name): Adjust.
7368 (follow_die_ref_or_sig): Adjust.
7369 (follow_die_offset): Adjust.
7370 (follow_die_ref): Adjust.
7371 (follow_die_sig_1): Adjust.
7372 (follow_die_sig): Adjust.
7373 (get_signatured_type): Adjust.
7374 (get_DW_AT_signature_type): Adjust.
7375 (decode_locdesc): Adjust.
7376 (dwarf_decode_macros): Adjust.
7377 (cu_debug_loc_section): Adjust.
7378 (fill_in_loclist_baton): Adjust.
7379 (dwarf2_symbol_mark_computed): Adjust.
7380 (init_one_comp_unit): Don't assign
7381 dwarf2_cu::dwarf2_per_objfile.
7382 (set_die_type): Adjust.
7384 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7386 * dwarf2read.c (struct mapped_debug_names): Add constructor.
7387 <dwarf2_per_objfile>: New field.
7388 (dwarf2_per_objfile): Remove global.
7389 (get_dwarf2_per_objfile): New function.
7390 (set_dwarf2_per_objfile): New function.
7391 (dwarf2_build_psymtabs_hard): Change objfile parameter to
7393 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7394 (read_abbrev_offset): Likewise.
7395 (read_indirect_string): Likewise.
7396 (read_indirect_line_string): Likewise.
7397 (read_indirect_string_at_offset): Likewise.
7398 (read_indirect_string_from_dwz): Likewise.
7399 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7401 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7402 (create_all_comp_units): Change objfile parameter to
7404 (create_all_type_units): Likewise.
7405 (process_queue): Add dwarf2_per_objfile parameter.
7406 (read_and_check_comp_unit_head): Likewise.
7407 (lookup_dwo_unit_in_dwp): Likewise.
7408 (get_dwp_file): Likewise.
7409 (process_cu_includes): Likewise.
7410 (struct free_dwo_file_cleanup_data): New struct.
7411 (dwarf2_has_info): Use get_dwarf2_per_objfile and
7412 set_dwarf2_per_objfile.
7413 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
7414 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
7415 context, adjust calls.
7416 (dw2_instantiate_symtab): Likewise.
7417 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
7418 (dw2_get_cu): Likewise.
7419 (create_cu_from_index_list): Change objfile parameter to
7421 (create_cus_from_index_list): Get dwarf2_per_objfile from
7422 context, adjust calls.
7423 (create_cus_from_index): Likewise.
7424 (create_signatured_type_table_from_index): Change objfile
7425 parameter to dwarf2_per_objfile.
7426 (create_signatured_type_table_from_debug_names): Change objfile
7427 parameter to dwarf2_per_objfile.
7428 (create_addrmap_from_index): Likewise.
7429 (create_addrmap_from_aranges): Likewise.
7430 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
7431 (dw2_setup): Remove.
7432 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
7434 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
7435 get_dwarf2_per_objfile.
7436 (dw2_forget_cached_source_info): Likewise.
7437 (dw2_map_symtabs_matching_filename): Likewise.
7438 (struct dw2_symtab_iterator) <index>: Remove.
7439 <dwarf2_per_objfile>: New field.
7440 (dw2_symtab_iter_init): Replace index parameter with
7442 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
7443 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
7444 (dw2_print_stats): Likewise.
7445 (dw2_dump): Likewise.
7446 (dw2_expand_symtabs_for_function): Likewise.
7447 (dw2_expand_all_symtabs): Likewise.
7448 (dw2_expand_symtabs_with_fullname): Likewise.
7449 (dw2_expand_marked_cus): Replace index and objfile parameters
7450 with dwarf2_per_objfile.
7451 (dw_expand_symtabs_matching_file_matcher): Add
7452 dwarf2_per_objfile parameter and adjust calls.
7453 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
7455 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
7456 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
7458 (create_cus_from_debug_names_list): Replace objfile parameter
7459 with dwarf2_per_objfile and adjust calls.
7460 (create_cus_from_debug_names): Likewise.
7461 (dwarf2_read_debug_names): Likewise.
7462 (mapped_debug_names::namei_to_name): Adjust call.
7463 (dw2_debug_names_iterator::next): Likewise.
7464 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
7465 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
7466 (dw2_debug_names_dump): Likewise.
7467 (dw2_debug_names_expand_symtabs_for_function): Likewise.
7468 (dw2_debug_names_expand_symtabs_matching): Likewise.
7469 (dwarf2_initialize_objfile): Likewise.
7470 (dwarf2_build_psymtabs): Likewise.
7471 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
7473 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
7474 (read_and_check_comp_unit_head): Likewise.
7475 (read_abbrev_offset): Likewise.
7476 (create_debug_type_hash_table): Likewise.
7477 (create_debug_types_hash_table): Likewise.
7478 (create_all_type_units): Replace objfile parameter with
7480 (add_type_unit): Add dwarf2_per_objfile parameter.
7481 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
7482 with dwarf2_per_objfile.
7483 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
7484 (lookup_dwp_signatured_type): Likewise.
7485 (lookup_signatured_type): Likewise.
7486 (read_cutu_die_from_dwo): Likewise.
7487 (init_tu_and_read_dwo_dies): Likewise.
7488 (init_cutu_and_read_dies): Likewise.
7489 (init_cutu_and_read_dies_no_follow): Likewise.
7490 (allocate_type_unit_groups_table): Add objfile parameter.
7491 (create_type_unit_group): Use dwarf2_per_objfile from cu.
7492 (get_type_unit_group): Likewise.
7493 (process_psymtab_comp_unit): Update call.
7494 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
7495 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
7496 (print_tu_stats): Likewise.
7497 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
7499 (build_type_psymtabs): Change objfile parameter to
7501 (process_skeletonless_type_unit): Use dwarf2_per_objfile
7502 passed in void* parameter.
7503 (process_skeletonless_type_units): Change objfile parameter to
7505 (set_partial_user): Likewise.
7506 (dwarf2_build_psymtabs_hard): Likewise.
7507 (read_comp_units_from_section): Likewise.
7508 (create_all_comp_units): Likewise.
7509 (scan_partial_symbols): Update calls.
7510 (add_partial_symbol): Likewise.
7511 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
7512 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
7513 (process_queue): Add dwarf2_per_objfile parameter.
7514 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
7515 (compute_compunit_symtab_includes): Likewise.
7516 (process_cu_includes): Add dwarf2_per_objfile parameter.
7517 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
7518 (process_full_type_unit): Likewise.
7519 (process_imported_unit_die): Update call.
7520 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
7521 (read_file_scope): Likewise.
7522 (allocate_dwo_file_hash_table): Add objfile parameter.
7523 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
7524 (create_cus_hash_table): Likewise.
7525 (create_dwp_hash_table): Likewise.
7526 (create_dwo_unit_in_dwp_v1): Likewise.
7527 (create_dwp_v2_section): Likewise.
7528 (create_dwo_unit_in_dwp_v2): Likewise.
7529 (lookup_dwo_unit_in_dwp): Likewise.
7530 (try_open_dwop_file): Likewise.
7531 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
7532 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
7533 cleanup to include a reference to dwarf2_per_objfile.
7534 (open_dwp_file): Add dwarf2_per_objfile parameter.
7535 (open_and_init_dwp_file): Likewise.
7536 (get_dwp_file): Likewise.
7537 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
7538 (queue_and_load_all_dwo_tus): Update call.
7539 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
7541 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
7542 (dwarf2_ranges_process): Likewise.
7543 (dwarf2_get_pc_bounds): Likewise.
7544 (mark_common_block_symbol_computed): Likewise.
7545 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7546 (dwarf2_read_abbrevs): Update call.
7547 (read_partial_die): Use dwarf2_per_objfile from cu.
7548 (find_partial_die): Likewise.
7549 (fixup_partial_die): Likewise.
7550 (read_attribute_value): Likewise.
7551 (read_indirect_string_at_offset_from): Add objfile parameter.
7552 (read_indirect_string_at_offset): Add dwarf2_per_objfile
7554 (read_indirect_string_from_dwz): Add objfile parameter.
7555 (read_indirect_string): Add objfile parameter.
7556 (read_addr_index_1): Add dwarf2_per_objfile parameter.
7557 (read_addr_index): Use dwarf2_per_objfile from cu.
7558 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
7560 (read_str_index): Use dwarf2_per_objfile from cu.
7561 (get_debug_line_section): Likewise.
7562 (read_formatted_entries): Add dwarf2_per_objfile parameter.
7563 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
7564 (new_symbol_full): Use dwarf2_per_objfile from cu.
7565 (build_error_marker_type): Likewise.
7566 (lookup_die_type): Likewise.
7567 (determine_prefix): Likewise.
7568 (follow_die_offset): Likewise.
7569 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
7570 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
7571 (dwarf2_fetch_die_type_sect_off): Likewise.
7572 (dwarf2_get_die_type): Likewise.
7573 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
7574 (get_signatured_type): Likewise.
7575 (get_DW_AT_signature_type): Likewise.
7576 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
7577 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
7578 (cu_debug_loc_section): Likewise.
7579 (fill_in_loclist_baton): Likewise.
7580 (dwarf2_symbol_mark_computed): Likewise.
7581 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7583 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
7585 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7586 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
7587 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
7588 (set_die_type): Use dwarf2_free_objfile from cu.
7589 (get_die_type_at_offset): Likewise.
7590 (dwarf2_per_objfile_free): Don't assign global variable.
7591 (debug_names) <constructor>: Add dwarf2_per_objfile
7592 parameter, update m_debugstrlookup construction.
7593 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
7595 <m_dwarf2_per_objfile>: New field.
7596 <lookup>: Use m_dwarf2_per_objfile.
7597 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
7598 (psyms_seen_size): Likewise.
7599 (write_gdbindex): Replace objfile parameter with
7601 (write_debug_names): Likewise.
7602 (write_psymtabs_to_index): Likewise.
7603 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
7606 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7608 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
7609 <dwarf2_per_objfile>: New field.
7610 (struct dwarf2_per_cu_data) <objfile>: Remove.
7611 <dwarf2_per_objfile>: New field.
7612 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
7614 (create_signatured_type_table_from_index): Likewise.
7615 (create_debug_type_hash_table): Likewise.
7616 (fill_in_sig_entry_from_dwo_entry): Likewise.
7617 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
7618 (create_type_unit_group): Assign dwarf2_per_objfile instead of
7620 (create_partial_symtab): Access objfile through
7622 (process_psymtab_comp_unit_reader): Likewise.
7623 (read_comp_units_from_section): Likewise.
7624 (scan_partial_symbols): Likewise.
7625 (add_partial_symbol): Likewise.
7626 (add_partial_subprogram): Likewise.
7627 (peek_die_abbrev): Likewise.
7628 (fixup_go_packaging): Likewise.
7629 (process_full_comp_unit): Likewise.
7630 (process_full_type_unit): Likewise.
7631 (process_imported_unit_die): Likewise.
7632 (dwarf2_compute_name): Likewise.
7633 (dwarf2_physname): Likewise.
7634 (read_import_statement): Likewise.
7635 (create_cus_hash_table): Assign dwarf2_physname instead of
7637 (read_func_scope): Access objfile through dwarf2_per_objfile.
7638 (read_lexical_block_scope): Likewise.
7639 (read_call_site_scope): Likewise.
7640 (read_variable): Likewise.
7641 (dwarf2_rnglists_process): Likewise.
7642 (dwarf2_ranges_process): Likewise.
7643 (dwarf2_ranges_read): Likewise.
7644 (dwarf2_record_block_ranges): Likewise.
7645 (dwarf2_add_field): Likewise.
7646 (dwarf2_add_member_fn): Likewise.
7647 (read_structure_type): Likewise.
7648 (process_structure_scope): Likewise.
7649 (read_enumeration_type): Likewise.
7650 (read_array_type): Likewise.
7651 (read_common_block): Likewise.
7652 (read_namespace_type): Likewise.
7653 (read_namespace): Likewise.
7654 (read_module_type): Likewise.
7655 (read_tag_pointer_type): Likewise.
7656 (read_tag_ptr_to_member_type): Likewise.
7657 (read_tag_string_type): Likewise.
7658 (read_subroutine_type): Likewise.
7659 (read_typedef): Likewise.
7660 (read_base_type): Likewise.
7661 (attr_to_dynamic_prop): Likewise.
7662 (read_subrange_type): Likewise.
7663 (read_unspecified_type): Likewise.
7664 (load_partial_dies): Likewise.
7665 (read_partial_die): Likewise.
7666 (find_partial_die): Likewise.
7667 (guess_partial_die_structure_name): Likewise.
7668 (fixup_partial_die): Likewise.
7669 (read_attribute_value): Likewise.
7670 (read_addr_index_from_leb128): Likewise.
7671 (dwarf2_read_addr_index): Likewise.
7672 (dwarf2_string_attr): Likewise.
7673 (lnp_state_machine::check_line_address): Likewise.
7674 (dwarf_decode_lines_1): Likewise.
7675 (dwarf_decode_lines): Likewise.
7676 (dwarf2_start_symtab): Likewise.
7677 (var_decode_location): Likewise.
7678 (new_symbol_full): Likewise.
7679 (dwarf2_const_value_data): Likewise.
7680 (dwarf2_const_value_attr): Likewise.
7681 (dwarf2_const_value): Likewise.
7682 (die_type): Likewise.
7683 (die_containing_type): Likewise.
7684 (lookup_die_type): Likewise.
7685 (guess_full_die_structure_name): Likewise.
7686 (anonymous_struct_prefix): Likewise.
7687 (dwarf2_name): Likewise.
7688 (follow_die_ref_or_sig): Likewise.
7689 (follow_die_offset): Likewise.
7690 (follow_die_ref): Likewise.
7691 (dwarf2_fetch_die_loc_sect_off): Likewise.
7692 (dwarf2_fetch_constant_bytes): Likewise.
7693 (dwarf2_fetch_die_type_sect_off): Likewise.
7694 (dwarf2_get_die_type): Likewise.
7695 (follow_die_sig): Likewise.
7696 (decode_locdesc): Likewise.
7697 (dwarf2_per_cu_objfile): Likewise.
7698 (dwarf2_per_cu_text_offset): Likewise.
7699 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
7701 (set_die_type): Access objfile through
7704 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7706 * valprint.c (converted_character_d): Remove typedef.
7707 (DEF_VEC_O (converted_character_d)): Remove.
7708 (count_next_character): Use std::vector.
7709 (print_converted_chars_to_obstack): Likewise.
7710 (generic_printstr): Likewise.
7712 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7714 * xml-support.h (struct gdb_xml_value): Add constructor.
7715 <value>: Change type to unique_xmalloc_ptr.
7716 (gdb_xml_value_s): Remove typedef.
7717 (DEF_VEC_O (gdb_xml_value_s)): Remove.
7718 (gdb_xml_element_start_handler): Change parameter type to
7720 (xml_find_attribute): Likewise.
7721 * xml-support.c (xml_find_attribute): Change parameter type to
7722 std::vector and adjust.
7723 (gdb_xml_values_cleanup): Remove.
7724 (gdb_xml_parser::start_element): Adjust to std::vector.
7725 (xinclude_start_include): Change paraeter type to std::vector
7727 * btrace.c (check_xml_btrace_version): Likewise.
7728 (parse_xml_btrace_block): Likewise.
7729 (parse_xml_btrace_pt_config_cpu): Likewise.
7730 (parse_xml_btrace_pt): Likewise.
7731 (parse_xml_btrace_conf_bts): Likewise.
7732 (parse_xml_btrace_conf_pt): Likewise.
7733 * memory-map.c (memory_map_start_memory): Likewise.
7734 (memory_map_start_property): Likewise.
7735 * osdata.c (osdata_start_osdata): Likewise.
7736 (osdata_start_item): Likewise.
7737 (osdata_start_column): Likewise.
7738 * remote.c (start_thread): Likewise.
7739 * solib-aix.c (library_list_start_library): Likewise.
7740 (library_list_start_list): Likewise.
7741 * solib-svr4.c (library_list_start_library): Likewise.
7742 (svr4_library_list_start_list): Likewise.
7743 * solib-target.c (library_list_start_segment): Likewise.
7744 (library_list_start_section): Likewise.
7745 (library_list_start_library): Likewise.
7746 (library_list_start_list): Likewise.
7747 * tracepoint.c (traceframe_info_start_memory): Likewise.
7748 (traceframe_info_start_tvar): Likewise.
7749 * xml-syscall.c (syscall_start_syscall): Likewise.
7750 * xml-tdesc.c (tdesc_start_target): Likewise.
7751 (tdesc_start_feature): Likewise.
7752 (tdesc_start_reg): Likewise.
7753 (tdesc_start_union): Likewise.
7754 (tdesc_start_struct): Likewise.
7755 (tdesc_start_flags): Likewise.
7756 (tdesc_start_enum): Likewise.
7757 (tdesc_start_field): Likewise.
7758 (tdesc_start_enum_value): Likewise.
7759 (tdesc_start_vector): Likewise.
7761 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7763 * extension.h (struct xmethod_worker) <clone>: Remove.
7764 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
7766 (python_xmethod_worker::clone): Remove.
7767 * valops.c (find_overload_match): Use std::move instead of
7770 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7772 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
7773 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
7774 <free_xmethod_worker_data>: Remove.
7775 <get_matching_xmethod_workers>: Chance VEC to std::vector.
7776 <get_xmethod_arg_types>: Remove.
7777 <get_xmethod_result_type>: Remove.
7778 <invoke_xmethod>: Remove.
7779 * extension.c (new_xmethod_worker): Remove.
7780 (clone_xmethod_worker): Remove.
7781 (get_matching_xmethod_workers): Return void, pass std::vector by
7783 (get_xmethod_arg_types): Rename to...
7784 (xmethod_worker::get_arg_types): ... this, and adjust.
7785 (get_xmethod_result_type): Rename to...
7786 (xmethod_worker::get_result_type): ... this, and adjust.
7787 (invoke_xmethod): Remove.
7788 (free_xmethod_worker): Remove.
7789 (free_xmethod_worker_vec): Remove.
7790 * extension.h (enum ext_lang_rc): Move here from
7792 (struct xmethod_worker): Add constructor and destructor.
7795 <invoke, clone, do_get_result_type, do_get_arg_types>: New
7796 virtual pure methods.
7797 <get_arg_types, get_result_type>: New methods.
7798 (xmethod_worker_ptr): Remove typedef.
7799 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
7800 (xmethod_worker_vec): Remove typedef.
7801 (xmethod_worker_up): New typedef.
7802 (invoke_xmethod): Remove.
7803 (clone_xmethod_worker): Remove.
7804 (free_xmethod_worker): Remove.
7805 (free_xmethod_worker_vec): Remove.
7806 (get_xmethod_arg_types): Remove.
7807 (get_xmethod_result_type): Remove.
7808 * valops.c (find_method_list): Use std::vector, don't use
7809 intermediate vector.
7810 (value_find_oload_method_list): Use std::vector.
7811 (find_overload_match): Use std::vector.
7812 (find_oload_champ): Use std::vector.
7813 * value.c (value_free): Use operator delete.
7814 (value_of_xmethod): Rename to...
7815 (value_from_xmethod): ... this. Don't assign
7816 xmethod_worker::value, take rvalue-reference.
7817 (result_type_of_xmethod): Adjust.
7818 (call_xmethod): Adjust.
7819 * value.h: Include extension.h.
7820 (struct xmethod_worker): Don't forward-declare.
7821 (value_of_xmethod): Rename to...
7822 (value_from_xmethod): ... this, take rvalue-reference.
7823 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
7824 (struct python_xmethod_worker): ... this, add constructor and
7826 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
7827 (gdbpy_free_xmethod_worker_data): Rename to...
7828 (python_xmethod_worker::~python_xmethod_worker): ... this and
7830 (gdbpy_clone_xmethod_worker_data): Rename to...
7831 (python_xmethod_worker::clone): ... this and adjust.
7832 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
7834 (gdbpy_get_xmethod_arg_types): Rename to...
7835 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
7836 (gdbpy_get_xmethod_result_type): Rename to...
7837 (python_xmethod_worker::do_get_result_type): ... this and
7839 (gdbpy_invoke_xmethod): Rename to...
7840 (python_xmethod_worker::invoke): ... this and adjust.
7841 (new_python_xmethod_worker): Rename to...
7842 (python_xmethod_worker::python_xmethod_worker): ... this and
7844 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
7846 (gdbpy_free_xmethod_worker_data): Remove.
7847 (gdbpy_get_matching_xmethod_workers): Use std::vector.
7848 (gdbpy_get_xmethod_arg_types): Remove.
7849 (gdbpy_get_xmethod_result_type): Remove.
7850 (gdbpy_invoke_xmethod): Remove.
7851 * python/python.c (python_extension_ops): Remove obsolete
7854 2018-01-05 Pedro Alves <palves@redhat.com>
7857 * common/signals-state-save-restore.c
7858 (save_original_signals_state): New parameter 'quiet'. Warn if we
7859 find a custom handler preinstalled, instead of internal erroring.
7860 But only warn if !quiet.
7861 * common/signals-state-save-restore.h
7862 (save_original_signals_state): New parameter 'quiet'.
7863 * main.c (captured_main_1): Move save_original_signals_state call
7864 after option handling, and pass QUIET.
7866 2018-01-05 Pedro Alves <palves@redhat.com>
7868 * spu-tdep.c (spu_catch_start): Pass
7869 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
7871 2018-01-05 Pedro Alves <palves@redhat.com>
7874 * ada-lang.c (literal_symbol_name_matcher): New function.
7875 (ada_get_symbol_name_matcher): Use it for
7876 symbol_name_match_type::SEARCH_NAME.
7877 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
7878 it down instead of assuming symbol_name_match_type::FULL.
7879 * block.h (block_lookup_symbol): New parameter 'match_type'.
7880 * c-valprint.c (print_unpacked_pointer): Use
7881 lookup_symbol_search_name instead of lookup_symbol.
7882 * compile/compile-object-load.c (get_out_value_type): Pass down
7883 symbol_name_match_type::SEARCH_NAME.
7884 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
7885 symbol_name_match_type::FULL.
7886 * cp-support.c (cp_get_symbol_name_matcher): Handle
7887 symbol_name_match_type::SEARCH_NAME.
7888 * infrun.c (insert_exception_resume_breakpoint): Use
7889 lookup_symbol_search_name.
7890 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
7891 * psymtab.c (maintenance_check_psymtabs): Use
7892 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
7893 * stack.c (print_frame_args): Use lookup_symbol_search_name and
7895 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
7896 if symbol_name_match_type::SEARCH_NAME.
7897 (lookup_symbol_in_language): Pass down
7898 symbol_name_match_type::FULL.
7899 (lookup_symbol_search_name): New.
7900 (lookup_language_this): Pass down
7901 symbol_name_match_type::SEARCH_NAME.
7902 (lookup_symbol_aux, lookup_local_symbol): New parameter
7903 'match_type'. Pass it down.
7904 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
7905 (lookup_symbol_search_name): New declaration.
7906 (lookup_symbol_in_block): New 'match_type' parameter.
7908 2018-01-05 Pedro Alves <palves@redhat.com>
7911 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
7913 (ada_lookup_symbol): Reimplement in terms of
7914 ada_lookup_symbol_list, bits factored out from
7915 ada_lookup_encoded_symbol.
7917 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7919 * ada-exp.y (write_object_renaming): When subscripting an array
7920 using a symbol as the index, pass the block in call to
7921 ada_lookup_encoded_symbol when looking that symbol up.
7923 2018-01-05 Jerome Guitton <guitton@adacore.com>
7925 * ada-lang.c (ada_array_length): Use ada_index_type instead of
7928 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7930 * ada-lang.c (ada_to_fixed_value_create): Add handling of
7931 the case where VALUE_LVAL (val0) is not lval_memory.
7933 2018-01-05 Xavier Roirand <roirand@adacore.com>
7935 * ada-valprint.c (print_optional_low_bound): Handle
7936 character-indexed array printing like boolean-indexed array
7939 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7941 * NEWS: Create a new section for the next release branch.
7942 Rename the section of the current branch, now that it has
7945 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7947 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
7948 * version.in: Bump version to 8.1.50.DATE-git.
7950 2018-01-03 Xavier Roirand <roirand@adacore.com>
7952 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
7954 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
7956 (default_exception_support_info) <catch_handlers_sym>: Add field.
7957 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
7958 (ada_exception_name_addr_1): Add "catch handlers" handling.
7959 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
7961 (create_excep_cond_exprs) <ex>: Add parameter.
7962 (re_set_exception): Update create_excep_cond_exprs call.
7963 (print_it_exception, print_one_exception, print_mention_exception)
7964 (print_recreate_exception): Add "catch handler" handling.
7965 (allocate_location_catch_handlers, re_set_catch_handlers)
7966 (check_status_catch_handlers, print_it_catch_handlers)
7967 (print_one_catch_handlers, print_mention_catch_handlers)
7968 (print_recreate_catch_handlers): New function.
7969 (catch_handlers_breakpoint_ops): New variable.
7970 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
7971 Add parameter. Add "catch handler" handling.
7972 (ada_exception_sym_name, ada_exception_breakpoint_ops):
7973 Add "catch handler" handling.
7974 (ada_exception_catchpoint_cond_string): Add "catch handler"
7976 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
7978 (catch_ada_handlers_command): New function.
7979 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
7980 operations structure.
7981 (_initialize_ada_language): Add "catch handlers" command entry.
7982 * NEWS: Document "catch handlers" feature.
7984 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7986 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
7987 account when creating the array type of the slice.
7988 (ada_value_slice): Likewise.
7990 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7992 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
7994 (create_array_type_with_stride): Add byte_stride_prop parameter.
7995 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
7996 New parameter. Update all callers in this file.
7997 (array_type_has_dynamic_stride): New function.
7998 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
7999 of arrays with dynamic byte strides.
8000 * dwarf2read.c (read_array_type): Add support for dynamic
8001 DW_AT_byte_stride attributes.
8003 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8005 * dwarf2read.c (read_unspecified_type): Treat
8006 DW_TAG_enumeration_type DIEs from Ada units as stubs.
8008 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8010 Update copyright year range in all GDB files.
8012 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8014 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
8015 and gdb/testsuite/gdb.base/step-line.c.
8017 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8019 * copyright.py (main): Dump the contents of
8020 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
8021 even if BY_HAND is empty.
8023 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8025 * top.c (print_gdb_version): Update Copyright year in version
8028 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8030 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
8032 For older changes see ChangeLog-2017.
8038 version-control: never