1 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3 * aarch64-linux-nat.c (aarch64_linux_read_description):
5 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7 * aarch64-tdep.c (tdesc_aarch64_list): Add.
8 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
9 (aarch64_gdbarch_init): Add parmeter zero.
10 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
11 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
12 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
14 * doc/gdb.texinfo: Describe SVE feature
15 * features/aarch64-sve.c: New file.
17 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
20 * gdbarch.sh (significant_addr_bit): Default to zero when
21 not set by target architecture.
22 * gdbarch.c: Re-generated.
23 * utils.c (address_significant): Update.
25 2018-05-30 Joel Brobecker <brobecker@adacore.com>
27 * stack.c (func_command): Remove trailing newline in call to error.
29 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
31 * regcache.h (regcache_raw_collect): Remove, update callers to
32 use regcache::raw_collect.
33 * regcache.c (regcache_raw_collect): Remove.
35 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
37 * regcache.h (regcache_raw_supply): Remove, update callers to
38 use detached_regcache::raw_supply.
39 * regcache.c (regcache_raw_supply): Remove.
41 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
43 * regcache.h (regcache_cooked_write_part): Remove, update
44 callers to use regcache::cooked_write_part.
45 * regcache.c (regcache_cooked_write_part): Remove.
47 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
49 * regcache.h (regcache_cooked_read_part): Remove, update callers
50 to use readable_regcache::cooked_read_part.
51 * regcache.c (regcache_cooked_read_part): Remove.
53 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
55 * regcache.h (regcache_cooked_read_value): Remove, update
56 callers to use readable_regcache::cooked_read_value.
57 * regcache.c (regcache_cooked_read_value): Remove.
59 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
61 * regcache.h (regcache_cooked_write): Remove, update callers to
62 use regcache::cooked_write.
63 * regcache.c (regcache_cooked_write): Remove.
65 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
67 * regcache.h (regcache_invalidate): Remove, update callers to
68 use detached_regcache::invalidate instead.
69 * regcache.c (regcache_invalidate): Remove.
71 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
73 * regcache.h (regcache_raw_write_part): Remove, update callers
74 to use regcache::raw_write_part instead.
75 * regcache.c (regcache_raw_write_part): Remove.
77 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
79 * regcache.h (regcache_raw_read_part): Remove, update callers to
80 use readable_regcache::raw_read_part instead.
81 * regcache.c (regcache_raw_read_part): Remove.
83 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
85 * regcache.h (regcache_cooked_read): Remove, update callers to
86 use readable_regcache::cooked_read instead.
87 * regcache.c (regcache_cooked_read): Remove.
89 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
91 * regcache.h (regcache_raw_write): Remove, update callers to use
92 regcache::raw_write instead.
93 * regcache.c (regcache_raw_write): Remove.
95 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
97 * regcache.h (regcache_raw_read): Remove, update callers to use
98 readable_regcache::raw_read instead.
99 * regcache.c (regcache_raw_read): Remove.
101 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
103 * regcache.h (regcache_raw_update): Remove, update callers to
104 use readable_regcache::raw_update instead.
105 * regcache.c (regcache_raw_update): Remove.
107 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
109 * regcache.h (regcache_register_status): Remove, update callers
110 to use reg_buffer::get_register_status directly instead.
111 * regcache.c (regcache_register_status): Remove.
113 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
115 * regcache.h (regcache_get_ptid): Remove, update all callers to
116 call regcache::ptid instead.
117 * regcache.c (regcache_get_ptid): Remove.
119 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
121 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
123 2018-05-30 Pedro Alves <palves@redhat.com>
125 * common/common-exceptions.h (exception_rethrow): Use
128 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
130 * breakpoint.c (print_solib_event, check_status_catch_solib):
131 Remove struct keyword in range-based for loops.
132 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
133 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
135 * linespec.c (find_superclass_methods, search_minsyms_for_name):
137 * symfile.c (addr_info_make_relative): Likewise.
138 * thread.c (value_in_thread_stack_temporaries): Likewise.
140 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
142 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
143 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
144 * coff-pe-read.c (add_pe_forwarded_sym): Replace
145 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
146 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
147 * jit.c (jit_breakpoint_re_set_internal): Likewise.
148 * printcmd.c (info_address_command): Likewise.
150 2018-05-29 Tom Tromey <tom@tromey.com>
152 * windows-nat.c (handle_exception): Update fall-through comment.
154 2018-05-29 Tom Tromey <tom@tromey.com>
156 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
157 (struct program_space) <added_solibs>: Now a std::vector.
158 * breakpoint.c (print_solib_event): Update.
159 (check_status_catch_solib): Update.
160 * progspace.c (clear_program_space_solib_cache): Update.
161 * solib.c (update_solib_list): Update.
163 2018-05-29 Tom Tromey <tom@tromey.com>
165 * python/py-type.c (typy_richcompare): Update.
166 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
167 * gdbtypes.h (types_deeply_equal): Return bool.
168 (types_equal): Likewise.
169 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
171 (check_types_equal): Change worklist to std::vector. Return
173 (struct type_equality_entry): Add constructor.
174 (compare_maybe_null_strings): Return bool.
175 (check_types_worklist): Return bool. Change worklist to
177 (types_deeply_equal): Use std::vector.
178 (types_equal): Return bool.
179 (compare_maybe_null_strings): Simplify.
181 2018-05-29 Tom Tromey <tom@tromey.com>
183 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
185 2018-05-29 Tom Tromey <tom@tromey.com>
187 * objc-lang.h: Don't include cp-support.h.
188 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
191 2018-05-27 Tom Tromey <tom@tromey.com>
193 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
195 2018-05-25 Tom Tromey <tom@tromey.com>
197 * value.c (value::location): Initialize.
199 2018-05-25 Tom Tromey <tom@tromey.com>
201 * dbxread.c (init_bincl_list): Remove.
202 (bincl_list): Now a std::vector.
203 (bincls_allocated, next_bincl): Remove.
204 (free_bincl_list, do_free_bincl_list_cleanup)
205 (make_cleanup_free_bincl_list): Remove.
206 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
208 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
209 (struct header_file_location): Add constructor.
210 (add_bincl_to_list): Remove.
212 2018-05-25 Tom Tromey <tom@tromey.com>
214 * tui/tui.c (tui_enable): Update.
215 * mi/mi-interp.c (mi_interp::init): Update.
216 * interps.h (class interp) <name>: New method.
217 <m_name>: Rename from name.
218 (~scoped_restore_interp): Update.
219 * interps.c (interp::interp): Update.
220 (interp_add, interp_set, interp_lookup_existing)
221 (current_interp_named_p): Update.
223 2018-05-25 Tom Tromey <tom@tromey.com>
225 * interps.c (interp_name): Remove.
226 * mi/mi-interp.c (mi_interp::init): Update.
227 * interps.h (interp_name): Remove.
228 (~scoped_restore_interp): Update.
229 * tui/tui.c (tui_enable): Update.
231 2018-05-25 Tom Tromey <tom@tromey.com>
233 * utils.c (fputs_maybe_filtered): Update.
234 * linespec.c (decode_line_full): Update.
235 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
236 (mi_print_breakpoint_for_event, mi_solib_loaded)
237 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
238 (mi_user_selected_context_changed): Update.
239 * mi/mi-main.c (mi_execute_command): Update.
240 * cli/cli-script.c (execute_control_command): Update.
241 * python/python.c (execute_gdb_command): Update.
242 * solib.c (info_sharedlibrary_command): Update.
243 * interps.c (interp_ui_out): Remove.
244 * interps.h (interp_ui_out): Remove.
246 2018-05-25 Tom Tromey <tom@tromey.com>
248 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
249 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
250 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
252 2018-05-25 Tom Tromey <tom@tromey.com>
254 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
255 * interps.c (interp_exec): Use scoped_restore.
257 2018-05-25 Tom Tromey <tom@tromey.com>
259 * remote.c (remote_target::remote_file_get): Use
261 (remote_target::remote_file_put): Likewise.
263 2018-05-25 Tom Tromey <tom@tromey.com>
265 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
267 (get_pe_section_index, add_pe_exported_sym): Update.
268 (read_pe_exported_syms): Use gdb::def_vector.
270 2018-05-25 Tom Tromey <tom@tromey.com>
272 * frame.c (remove_prev_frame): Remove.
273 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
275 2018-05-25 Maciej W. Rozycki <macro@mips.com>
277 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
279 * mips-linux-nat.c (supply_fpregset): Always call
280 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
281 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
282 `mips_fill_fpregset'.
283 * mips-linux-tdep.c (mips_supply_fpregset)
284 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
285 (mips_fill_fpregset_wrapper): Remove functions.
286 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
287 (mips_linux_fpregset): Remove variable.
288 (mips_linux_iterate_over_regset_sections): Use
289 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
290 (mips_linux_o32_sigframe_init): Remove comment.
292 2018-05-25 Pedro Alves <palves@redhat.com>
294 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
295 (struct readahead_cache, struct packet_reg, struct
296 remote_arch_state, class remote_state): Move higher up in the
298 (remote_target::m_remote_state): Now an object instead of a pointer.
299 (remote_target::get_remote_state): Adjust.
301 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
303 * stack.c (select_and_print_frame): Delete.
304 (struct function_bounds): Move struct within function.
305 (func_command): Most content moved into new function
306 find_frame_for_function, use new function, print result, add
308 (find_frame_for_function): New function, now returns a result.
310 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
312 * stack.c (iterate_over_block_arg_vars): Fix comment.
313 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
315 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
319 (scoped_restore_selected_frame::scoped_restore_selected_frame):
321 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
323 * frame.h (class scoped_restore_selected_frame): New class.
324 * stack.c (print_frame_local_vars): Remove catching and rethrowing
325 of any exception, use scoped_restore_selected_frame to restore the
328 2018-05-24 Pedro Alves <palves@redhat.com>
330 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
333 2018-05-23 Tom Tromey <tom@tromey.com>
335 * complaints.c (struct complaints): Remove.
336 (symfile_complaint_book): Remove.
337 (series): New global.
338 (complaint_internal): Update.
339 (clear_complaints): Update.
341 2018-05-23 Tom Tromey <tom@tromey.com>
343 * complaints.c (counters): New global.
344 (struct complain): Remove.
345 (struct complaints) <root>: Remove.
346 (complaint_sentinel): Remove.
347 (symfile_complaint_book): Update.
348 (find_complaint) Remove.
349 (complaint_internal, clear_complaints): Update.
351 2018-05-23 Tom Tromey <tom@tromey.com>
353 * complaints.c (struct complain) <file, line>: Remove.
354 (find_complaint): Remove file, line parameters.
355 (complaint_internal): Update.
357 2018-05-23 Tom Tromey <tom@tromey.com>
359 * complaints.c (vcomplaint): Remove.
360 (complaint_internal) Merge in contents of vcomplaint.
362 2018-05-23 Tom Tromey <tom@tromey.com>
364 * complaints.c (struct complaints) <explanation>: Remove.
365 (symfile_explanations): Remove.
366 (symfile_complaint_book): Update.
367 (vcomplaint): Update.
368 (struct explanation): Remove.
370 2018-05-23 Tom Tromey <tom@tromey.com>
372 * complaints.c (symfile_complaints): Remove.
373 (complaint_internal): Remove "complaints" parameter.
374 (clear_complaints, vcomplaint): Remove "c" parameter.
375 (get_complaints): Remove.
376 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
377 (dwarf2_debug_line_missing_file_complaint)
378 (dwarf2_debug_line_missing_end_sequence_complaint)
379 (dwarf2_complex_location_expr_complaint)
380 (dwarf2_const_value_length_mismatch_complaint)
381 (dwarf2_section_buffer_overflow_complaint)
382 (dwarf2_macro_malformed_definition_complaint)
383 (dwarf2_invalid_attrib_class_complaint)
384 (create_addrmap_from_index, dw2_symtab_iter_next)
385 (dw2_expand_marked_cus)
386 (dw2_debug_names_iterator::find_vec_in_debug_names)
387 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
388 (create_debug_type_hash_table, init_cutu_and_read_dies)
389 (partial_die_parent_scope, add_partial_enumeration)
390 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
391 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
392 (read_import_statement, read_file_scope, create_dwo_cu_reader)
393 (create_cus_hash_table, create_dwp_hash_table)
394 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
395 (dwarf2_rnglists_process, dwarf2_ranges_process)
396 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
397 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
398 (handle_struct_member_die, process_structure_scope)
399 (read_array_type, read_common_block, read_module_type)
400 (read_tag_pointer_type, read_typedef, read_base_type)
401 (read_subrange_type, load_partial_dies, partial_die_info::read)
402 (partial_die_info::read, partial_die_info::read)
403 (partial_die_info::read, read_checked_initial_length_and_offset)
404 (dwarf2_string_attr, read_formatted_entries)
405 (dwarf_decode_line_header)
406 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
407 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
408 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
409 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
410 (get_signatured_type, get_DW_AT_signature_type)
411 (decode_locdesc, file_file_name, consume_improper_spaces)
412 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
413 (dwarf_decode_macro_bytes, dwarf_decode_macros)
414 (dwarf2_symbol_mark_computed, set_die_type)
415 (read_attribute_value): Update.
416 * stap-probe.c (handle_stap_probe, get_stap_base_address):
418 * dbxread.c (unknown_symtype_complaint)
419 (lbrac_mismatch_complaint, repeated_header_complaint)
420 (set_namestring, function_outside_compilation_unit_complaint)
421 (read_dbx_symtab, process_one_symbol): Update.
422 * gdbtypes.c (stub_noname_complaint): Update.
423 * windows-nat.c (handle_unload_dll): Update.
424 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
425 (decode_base_type): Update.
426 * xcoffread.c (bf_notfound_complaint, ef_complaint)
427 (eb_complaint, record_include_begin, record_include_end)
428 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
429 (process_xcoff_symbol, read_symbol)
430 (function_outside_compilation_unit_complaint)
431 (scan_xcoff_symtab): Update.
432 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
433 * buildsym.c (finish_block_internal, make_blockvector)
434 (end_symtab_get_static_block, augment_type_symtab): Update.
435 * dtrace-probe.c (dtrace_process_dof)
436 (dtrace_static_probe_ops::get_probes): Update.
437 * complaints.h (struct complaint): Don't declare.
438 (symfile_complaints): Remove.
439 (complaint_internal): Remove "complaints" parameter.
440 (complaint): Likewise.
441 (clear_complaints): Likewise.
442 * symfile.c (syms_from_objfile_1, finish_new_objfile)
443 (reread_symbols): Update.
444 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
445 (dwarf2_frame_cache, decode_frame_entry): Update.
446 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
447 * objc-lang.c (lookup_objc_class, lookup_child_selector)
448 (info_selectors_command): Update.
449 * macrotab.c (macro_include, check_for_redefinition)
450 (macro_undef): Update.
451 * objfiles.c (filter_overlapping_sections): Update.
452 * stabsread.c (invalid_cpp_abbrev_complaint)
453 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
454 (define_symbol, error_type, read_type, rs6000_builtin_type)
455 (stabs_method_name_from_physname, read_member_functions)
456 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
457 (attach_fields_to_type, complain_about_struct_wipeout)
458 (read_range_type, read_args, common_block_start)
459 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
461 * mdebugread.c (index_complaint, unknown_ext_complaint)
462 (basic_type_complaint, bad_tag_guess_complaint)
463 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
464 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
465 (parse_procedure, parse_lines)
466 (function_outside_compilation_unit_complaint)
467 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
468 (bad_tag_guess_complaint, reg_value_complaint): Update.
469 * cp-support.c (demangled_name_complaint): Update.
470 * macroscope.c (sal_macro_scope): Update.
471 * dwarf-index-write.c (class debug_names): Update.
473 2018-05-23 Tom Tromey <tom@tromey.com>
475 * complaints.c (clear_complaints): Remove "noisy" parameter.
476 * complaints.h (clear_complaints): Update.
477 * symfile.c (syms_from_objfile_1, finish_new_objfile)
478 (reread_symbols): Update.
480 2018-05-23 Tom Tromey <tom@tromey.com>
482 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
484 (vcomplaint, clear_complaints): Update.
485 (symfile_explanations): Remove some messages.
487 2018-05-23 Tom Tromey <tom@tromey.com>
489 * complaints.c (internal_complaint): Remove.
490 * complaints.h (internal_complaint): Remove.
492 2018-05-22 Maciej W. Rozycki <macro@mips.com>
494 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
496 2018-05-22 Pedro Alves <palves@redhat.com>
498 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
499 (remote_fileio_badfd, remote_fileio_return_errno)
500 (remote_fileio_return_success, remote_fileio_func_open)
501 (remote_fileio_func_open, remote_fileio_func_close)
502 (remote_fileio_func_read, remote_fileio_func_write)
503 (remote_fileio_func_lseek, remote_fileio_func_rename)
504 (remote_fileio_func_unlink, remote_fileio_func_stat)
505 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
506 (remote_fileio_func_isatty, remote_fileio_func_system): Add
507 remote_target parameter.
508 (remote_fio_func_map) <func>: Add remote_target parameter.
509 (do_remote_fileio_request, remote_fileio_request):
510 * remote-fileio.h (remote_fileio_request):
511 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
512 remote_target parameter.
513 (remote_notif_process, handle_notification): Adjust to pass down
515 (remote_notif_state_allocate): Add remote_target parameter. Save
517 * remote-notif.h (struct remote_target): Forward declare.
518 (struct notif_client) <parse, ack, can_get_pending_events>: Add
519 remote_target parameter.
520 (struct remote_notif_state) <remote>: New field.
521 (remote_notif_ack, remote_notif_parse): Add remote_target
523 (remote_notif_state_allocate, remote_notif_state_allocate): Add
524 remote_target parameter.
525 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
526 (threads_listing_context, rmt_thread_action, protocol_feature)
527 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
528 (packet_result, struct threads_listing_context, remote_state):
529 Move definitions and declarations higher up.
530 (remote_target) <~remote_target>: Declare.
531 (remote_download_command_source, remote_file_put, remote_file_get)
532 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
533 (remote_hostio_pread_vFile, remote_hostio_send_command)
534 (remote_hostio_set_filesystem, remote_hostio_open)
535 (remote_hostio_close, remote_hostio_unlink, remote_state)
536 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
537 (get_memory_write_packet_size, get_memory_read_packet_size)
538 (append_pending_thread_resumptions, remote_detach_1)
539 (append_resumption, remote_resume_with_vcont)
540 (add_current_inferior_and_thread, wait_ns, wait_as)
541 (process_stop_reply, remote_notice_new_inferior)
542 (process_initial_stop_replies, remote_add_thread)
543 (btrace_sync_conf, remote_btrace_maybe_reopen)
544 (remove_new_fork_children, kill_new_fork_children)
545 (discard_pending_stop_replies, stop_reply_queue_length)
546 (check_pending_events_prevent_wildcard_vcont)
547 (discard_pending_stop_replies_in_queue, stop_reply)
548 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
549 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
550 (remote_interrupt_as, remote_interrupt_ns)
551 (remote_get_noisy_reply, remote_query_attached)
552 (remote_add_inferior, remote_current_thread, get_current_thread)
553 (set_thread, set_general_thread, set_continue_thread)
554 (set_general_process, write_ptid)
555 (remote_unpack_thread_info_response, remote_get_threadinfo)
556 (parse_threadlist_response, remote_get_threadlist)
557 (remote_threadlist_iterator, remote_get_threads_with_ql)
558 (remote_get_threads_with_qxfer)
559 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
560 (get_offsets, remote_check_symbols, remote_supported_packet)
561 (remote_query_supported, remote_packet_size)
562 (remote_serial_quit_handler, remote_detach_pid)
563 (remote_vcont_probe, remote_resume_with_hc)
564 (send_interrupt_sequence, interrupt_query)
565 (remote_notif_get_pending_events, fetch_register_using_p)
566 (send_g_packet, process_g_packet, fetch_registers_using_g)
567 (store_register_using_P, store_registers_using_G)
568 (set_remote_traceframe, check_binary_download)
569 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
570 (remote_xfer_live_readonly_partial, remote_read_bytes)
571 (remote_send_printf, remote_flash_write, readchar)
572 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
573 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
574 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
575 (extended_remote_disable_randomization, extended_remote_run)
576 (send_environment_packet, extended_remote_environment_support)
577 (extended_remote_set_inferior_cwd, remote_write_qxfer)
578 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
579 (packet_command): Now methods of ...
580 (remote_target): ... this class.
581 (m_remote_state) <remote_target>: New field.
582 (struct remote_state) <stop_reply_queue,
583 remote_async_inferior_event_token, wait_forever_enabled_p>: New
585 (remote_state::remote_state): Allocate stop_reply_queue.
586 (remote_state): Delete global.
587 (get_remote_state_raw): Delete.
588 (remote_target::get_remote_state): Allocate m_remote_state on
590 (get_current_remote_target): New.
591 (remote_ops, extended_remote_ops): Delete.
592 (wait_forever_enabled_p, remote_async_inferior_event_token):
593 Delete, moved to struct remote_state.
594 (remote_target::close): Delete self. Destruction bits split to
596 (remote_target::~remote_target): ... this.
597 (show_memory_packet_size): Adjust to use
598 get_current_remote_target.
599 (struct protocol_feature) <func>: Add remote_target parameter.
600 All callers adjusted.
601 (curr_quit_handler_target): New.
602 (remote_serial_quit_handler): Reimplement.
603 (remote_target::open_1): Adjust to use get_current_remote_target.
604 Heap-allocate remote_target/extended_remote_target instances.
605 (vcont_builder::vcont_builder): Add remote_target parameter, and
606 save it in m_remote. All callers adjusted.
607 (vcont_builder::m_remote): New field.
608 (vcont_builder::restart, vcont_builder::flush)
609 (vcont_builder::push_action): Use it.
610 (remote_target::commit_resume): Use it.
611 (struct queue_iter_param) <remote>: New field.
612 (remote_target::remove_new_fork_children): Fill in 'remote' field.
613 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
614 (check_pending_event_prevents_wildcard_vcont_callback)
615 (remote_target::check_pending_events_prevent_wildcard_vcont)
616 (remote_target::discard_pending_stop_replies)
617 (remote_target::discard_pending_stop_replies_in_queue)
618 (remote_target::remote_notif_remove_queued_reply): Fill in
620 (remote_notif_get_pending_events): New.
621 (remote_target::readchar, remote_target::remote_serial_write):
622 Save/restore curr_quit_handler_target.
624 (kill_new_fork_children): Fill in 'remote' field.
625 (packet_command): Use get_current_remote_target, defer to
626 remote_target method of same name.
627 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
628 parameter, and save it in m_remote. All callers adjusted.
629 (scoped_remote_fd::release): Use m_remote.
630 (scoped_remote_fd::m_remote): New field.
631 (remote_file_put, remote_file_get, remote_file_delete): Use
632 get_current_remote_target, defer to remote_target method of same
634 (remote_btrace_reset): Add remote_state paremeter. Update all
636 (remote_async_inferior_event_handler). Pass down 'data'.
637 (remote_new_objfile): Use get_current_remote_target.
638 (remote_target::vcont_r_supported): New.
639 (set_range_stepping): Use get_current_remote_target and
640 remote_target::vcont_r_supported.
641 (_initialize_remote): Don't allocate 'remote_state' and
642 'stop_reply_queue' globals.
643 * remote.h (struct remote_target): Forward declare.
644 (getpkt, putpkt, remote_notif_get_pending_events): Add
645 'remote_target' parameter.
647 2018-05-22 Pedro Alves <palves@redhat.com>
649 * remote.c (vcont_builder): Now a class. Make all data members
651 (vcont_builder) <vcont_builder, restart, flush, push_action>:
653 (vcont_builder_restart): Rename to ...
654 (vcont_builder::restart): ... this.
655 (vcont_builder_flush): Rename to ...
656 (vcont_builder::flush): ... this.
657 (vcont_builder_push_action): Rename to ...
658 (vcont_builder::push_action): ... this.
659 (remote_target::commit_resume): Adjust.
661 2018-05-22 Pedro Alves <palves@redhat.com>
663 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
664 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
665 (get_fixed_memory_packet_size): New.
666 (get_memory_packet_size): Use it.
667 (set_memory_packet_size): Don't override the config size with
668 DEFAULT_MAX_MEMORY_PACKET_SIZE.
669 (show_memory_packet_size): Use get_fixed_memory_packet_size.
670 Don't refer to get_memory_packet_size if not connected to a remote
671 target. Show "(default)" if configured size is 0.
673 2018-05-22 Pedro Alves <palves@redhat.com>
675 * remote.c (remote_target::mourn_inferior): Move
676 discard_pending_stop_replies call here from ...
677 (_initialize_remote): ... here.
679 2018-05-22 Pedro Alves <palves@redhat.com>
681 * remote.c (compare_section_command): Remove set_general_process
684 2018-05-22 Pedro Alves <palves@redhat.com>
686 * remote.c (struct packet_reg, struct remote_arch_state):
687 Move higher up in the file.
688 (remote_state) <m_arch_states>: Store remote_arch_state values
689 instead of remote_arch_state pointers.
690 (remote_state::get_remote_arch_state): Adjust.
692 2018-05-22 Pedro Alves <palves@redhat.com>
694 * remote.c: Include <unordered_map>.
695 (remote_state): Now a class.
696 (remote_state) <get_remote_arch_state>: Declare method.
697 <get_remote_arch_state>: New field.
698 (remote_arch_state) <remote_arch_state>: Declare ctor.
699 <regs>: Now a unique_ptr.
700 (remote_gdbarch_data_handle): Delete.
701 (get_remote_arch_state): Delete.
702 (remote_state::get_remote_arch_state): New.
703 (get_remote_state): Adjust to call remote_state's
704 get_remote_arch_state method.
705 (init_remote_state): Delete, bits factored out to ...
706 (remote_arch_state::remote_arch_state): ... this new method.
707 (get_remote_packet_size, get_memory_packet_size)
708 (process_g_packet, remote_target::fetch_registers)
709 (remote_target::prepare_to_store, store_registers_using_G)
710 (remote_target::store_registers, remote_target::get_trace_status):
711 Adjust to call remote_state's method.
712 (_initialize_remote): Remove reference to
713 remote_gdbarch_data_handle.
715 2018-05-22 Pedro Alves <palves@redhat.com>
717 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
718 pread>: New method declarations.
719 (remote_target::open_1): Adjust.
720 (readahead_cache_invalidate): Rename to ...
721 (readahead_cache::invalidate): ... this, and adjust to be a class
723 (readahead_cache_invalidate_fd): Rename to ...
724 (readahead_cache::invalidate_fd): ... this, and adjust to be a
726 (remote_hostio_pwrite): Adjust.
727 (remote_hostio_pread_from_cache): Rename to ...
728 (readahead_cache::pread): ... this, and adjust to be a class
730 (remote_hostio_close): Adjust.
732 2018-05-22 Pedro Alves <palves@redhat.com>
734 * remote.c (remote_hostio_close_cleanup): Delete.
735 (class scoped_remote_fd): New.
736 (remote_file_put, remote_file_get): Use it.
738 2018-05-22 Pedro Alves <palves@redhat.com>
740 (struct vCont_action_support): Use bool and initialize all fields.
741 (struct readahead_cache): Initialize all fields.
742 (remote_state): Use bool and initialize all fields.
743 (remote_state::remote_state, remote_state::~remote_state): New.
744 (new_remote_state): Delete.
745 (_initialize_remote): Use new to allocate remote_state.
747 2018-05-22 Pedro Alves <palves@redhat.com>
751 * c-exp.y: Include "c-support.h".
752 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
753 of tolower. Use c_ident_is_alpha to scan names.
754 * c-lang.c: Include "c-support.h".
755 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
756 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
757 * c-support.h: New file, with bits factored out from ...
758 * cp-name-parser.y: ... this file.
759 Include "c-support.h".
760 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
761 c-support.h and renamed.
762 (symbol_end, yylex): Adjust.
764 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
766 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
767 parameter type to CORE_ADDR.
768 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
769 parameter type in declaration to CORE_ADDR.
770 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
771 target_auxv_search to get AT_HWCAP and use the result to get the
773 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
774 to CORE_ADDR. Remove the cast of the return value to unsigned
775 long. Fix error predicate of target_auxv_search.
776 (ppc_linux_nat_target::read_description): Change the type of the
777 hwcap variable to CORE_ADDR.
779 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
781 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
782 if the size of fpscr is larger than 32 bits.
784 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
786 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
787 (ppc32_linux_vsxregmap): New global.
788 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
789 regcache_supply_regset, and regcache_collect_regset.
790 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
791 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
792 (fetch_vsx_register, store_vsx_register): Remove.
793 (fetch_vsx_registers): Add regno parameter. Get regset using
794 ppc_linux_vsxregset. Use regset to supply registers.
795 (store_vsx_registers): Add regno parameter. Get regset using
796 ppc_linux_vsxregset. Use regset to collect registers.
797 (fetch_register): Call fetch_vsx_registers instead of
799 (store_register): Call store_vsx_registers instead of
801 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
803 (store_ppc_registers): Call store_vsx_registers with -1 for the
805 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
806 (ppc_collect_vsxregset): Remove.
808 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
810 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
812 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
813 for vector register offset fields.
814 (ppc64_fbsd_reg_offsets): Likewise.
815 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
816 to vector register offset fields.
817 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
818 to vector register offset fields.
819 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
820 vector register offset fields.
821 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
822 initializers for vector register offset fields.
823 (rs6000_aix64_reg_offsets): Likewise.
824 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
825 (ppc_supply_vrregset): Remove.
826 (ppc_collect_vrregset): Remove.
827 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
828 (ppc_linux_vrregset) : New function.
829 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
830 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
831 (ppc32_linux_vrregset): Remove.
832 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
833 and use result instead of ppc32_linux_vrregset.
834 (ppc32_linux_reg_offsets): Remove initializers for vector register
836 (ppc64_linux_reg_offsets): Likewise.
837 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
838 * ppc-linux-nat.c: Include regset.h.
839 (gdb_vrregset_t): Adjust comment to account for little-endian
841 (supply_vrregset, fill_vrregset): Remove.
842 (fetch_altivec_register, store_altivec_register): Remove.
843 (fetch_altivec_registers): Add regno parameter. Get regset using
844 ppc_linux_vrregset. Use regset to supply registers.
845 (store_altivec_registers): Add regno parameter. Get regset using
846 ppc_linux_vrregset. Use regset to collect registers.
847 (fetch_register): Call fetch_altivec_registers instead of
848 fetch_altivec_register.
849 (store_register): Call store_altivec_registers instead of
850 store_altivec_register.
851 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
852 the new regno parameter.
853 (store_ppc_registers): Call store_altivec_registers with -1 for
854 the new regno parameter.
856 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
858 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
859 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
860 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
861 (gdb_vrregset_t): Change array type size to
862 PPC_LINUX_SIZEOF_VRREGSET.
863 (gdb_vsxregset_t): Change array type size to
864 PPC_LINUX_SIZEOF_VSXREGSET.
865 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
866 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
867 PPC_LINUX_SIZEOF_VSXREGSET.
869 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
871 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
872 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
874 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
875 ppc_linux_target_wordsize with tid.
876 (ppc_linux_nat_target::read_description): Call ppc_linux_target
878 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
879 (ppc64_64bit_inferior_p): Add static and inline specifiers.
880 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
881 tid parameter. Remove static specifier.
882 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
883 (ppc_linux_target_wordsize): New declaration.
885 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
887 * arch/ppc-linux-common.c: New file.
888 * arch/ppc-linux-common.h: New file.
889 * arch/ppc-linux-tdesc.h: New file.
890 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
891 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
892 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
893 arch/ppc-linux-tdesc.h.
894 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
895 arch/ppc-linux-tdesc.h.
896 (ppc_linux_nat_target::read_description): Remove target
897 description matching code. Fill a ppc_linux_features struct and
898 call ppc_linux_match_description with it. Move comment about ISA
899 2.05 to ppc-linux-common.c.
900 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
901 arch/ppc-linux-tdesc.h.
902 (ppc_linux_core_read_description): Remove target description
903 matching code. Fill a ppc_linux_features struct and call
904 ppc_linux_match_description with it.
905 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
906 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
907 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
908 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
909 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
910 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
911 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
912 (tdesc_powerpc_e500l): Remove.
914 2018-05-22 Joel Brobecker <brobecker@adacore.com>
916 * ada-lang.c (catch_assert_command): Pass empty string instead
917 of NULL for excep_string argument.
919 2018-05-22 Maciej W. Rozycki <macro@mips.com>
921 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
922 the width of the requested register exceeds the width of the
925 2018-05-21 Tom Tromey <tom@tromey.com>
927 * printcmd.c (output_command): Remove.
928 (output_command_const): Rename to output_command.
929 * valprint.h (output_command): Rename from output_command_const.
930 * tracepoint.c (trace_dump_actions): Call output_command.
932 2018-05-21 Tom Tromey <tom@tromey.com>
934 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
935 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
936 * ada-lang.h (create_ada_exception_catchpoint): Update.
937 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
939 (create_excep_cond_exprs, ~ada_catchpoint)
940 (should_stop_exception, print_one_exception)
941 (print_mention_exception, print_recreate_exception): Update.
942 (ada_get_next_arg): Remove.
943 (catch_ada_exception_command_split): Use std::string. Change type
944 of "excep_string", "cond_string".
945 (catch_ada_exception_command): Update.
946 (create_ada_exception_catchpoint): Change type of excep_string.
947 (ada_exception_sal): Remove excep_string parameter.
948 (~ada_catchpoint): Remove.
950 2018-05-21 Tom Tromey <tom@tromey.com>
952 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
955 2018-05-21 Tom Tromey <tom@tromey.com>
957 * ada-lang.c (ada_exception_message_1, ada_exception_message):
958 Return unique_xmalloc_ptr.
959 (print_it_exception): Update.
961 2018-05-21 Tom Tromey <tom@tromey.com>
963 * tracepoint.c (trace_dump_actions): Use std::string.
965 2018-05-21 Tom Tromey <tom@tromey.com>
967 * symfile.c (reread_symbols): Use std::string for original_name.
969 2018-05-21 Tom Tromey <tom@tromey.com>
971 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
972 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
975 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
977 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
979 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
980 * objfiles.c (get_objfile_bfd_data): Allocate
981 objfile_per_bfd_storage with obstack_new when allocating on
984 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
986 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
988 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
989 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
990 * mdebugread.c (mdebug_build_psymtabs): Likewise.
991 (add_pending): Likewise.
992 (parse_symbol): Likewise.
993 (parse_partial_symbols): Likewise.
994 (psymtab_to_symtab_1): Likewise.
995 (new_psymtab): Likewise.
996 (elfmdebug_build_psymtabs): Likewise.
997 * minsyms.c (terminate_minimal_symbol_table): Likewise.
998 * objfiles.c (get_objfile_bfd_data): Likewise.
999 (objfile_register_static_link): Likewise.
1000 * psymtab.c (allocate_psymtab): Likewise.
1001 * stabsread.c (read_member_functions): Likewise.
1002 * xcoffread.c (xcoff_end_psymtab): Likewise.
1004 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1006 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1007 compiler supports std::is_trivially_constructible.
1008 * common/poison.h: Include obstack.h.
1009 (IsMallocable): Define to is_trivially_constructible if the
1010 compiler supports it, define to true_type otherwise.
1014 (XOBNEWVEC): Redefine.
1015 * gdb_obstack.h (obstack_zalloc): New.
1016 (OBSTACK_ZALLOC): Redefine.
1017 (obstack_calloc): New.
1018 (OBSTACK_CALLOC): Redefine.
1020 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1021 (gdbarch_obstack): New declaration in gdbarch.h, definition in
1023 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1024 obstack_calloc/obstack_zalloc.
1025 (gdbarch_obstack_zalloc): Remove.
1026 * target-descriptions.c (tdesc_data_init): Use obstack_new.
1028 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1030 * stack.c (backtrace_command_1): Remove useless variable int i.
1032 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1034 * stack.c (print_frame_info): Fix comment.
1036 2018-05-18 Tom Tromey <tom@tromey.com>
1038 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1039 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1040 (~dwarf2_per_objfile): Update
1041 (dwarf2_get_dwz_file): Use new.
1042 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1045 2018-05-18 Tom Tromey <tom@tromey.com>
1047 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1049 * dwarf2read.c (struct dwp_file): Add constructor and
1051 (open_and_init_dwp_file): Return a unique_ptr.
1052 (dwarf2_per_objfile, create_dwp_hash_table)
1053 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1054 (lookup_dwo_unit_in_dwp): Update.
1055 (open_and_init_dwp_file, get_dwp_file): Update.
1057 2018-05-18 Tom Tromey <tom@tromey.com>
1059 * dwarf2read.c (dwarf2_per_objfile): Update.
1060 (struct mapped_index): Add initializers.
1061 (dwarf2_read_index): Use new.
1062 (dw2_symtab_iter_init): Update.
1063 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1066 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1068 * dwarf2read.c (mapped_index) <total_size>: Remove.
1070 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1072 * unittests/format_pieces-selftests.c (test_format_specifier):
1075 2018-05-18 Tom Tromey <tom@tromey.com>
1077 * c-typeprint.c (maybe_print_hole): New function.
1078 (c_print_type_struct_field_offset): Update.
1079 (c_type_print_base_struct_union): Call maybe_print_hole.
1081 2018-05-17 Keith Seitz <keiths@redhat.com>
1083 * breakpoint.c (build_bpstat_chain): New function, moved from
1085 (bpstat_stop_status): Add optional parameter, `stop_chain'.
1086 If no stop chain is passed, call build_bpstat_chain to build it.
1087 * breakpoint.h (build_bpstat_chain): Declare.
1088 (bpstat_stop_status): Move documentation here from breakpoint.c.
1089 * infrun.c (handle_signal_stop): Before eliding inlined frames,
1090 build the stop chain and pass it to skip_inline_frames.
1091 Pass this stop chain to bpstat_stop_status.
1092 * inline-frame.c: Include breakpoint.h.
1093 (stopped_by_user_bp_inline_frame): New function.
1094 (skip_inline_frames): Add parameter `stop_chain'.
1095 Move documention to inline-frame.h.
1096 If non-NULL, use stopped_by_user_bp_inline_frame to determine
1097 whether the frame should be elided.
1098 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1099 Add moved documentation and update for new parameter.
1101 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1104 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1105 unittests/format_pieces-selftests.c.
1106 * common/format.h (format_piece) <operator==>: New.
1107 (format_pieces) <operator[]>: Remove.
1108 * common/format.c (format_pieces::format_pieces): Handle \e.
1109 * unittests/format_pieces-selftests.c: New.
1111 2018-05-17 Tom Tromey <tom@tromey.com>
1114 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1115 (dw2_instantiate_symtab): Add skip_partial parameter.
1116 (dw2_find_last_source_symtab, dw2_map_expand_apply)
1117 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1118 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1119 (dw2_expand_symtabs_matching_one)
1120 (dw2_find_pc_sect_compunit_symtab)
1121 (dw2_debug_names_lookup_symbol)
1122 (dw2_debug_names_expand_symtabs_for_function): Update.
1123 (init_cutu_and_read_dies): Add skip_partial parameter.
1124 (process_psymtab_comp_unit, build_type_psymtabs_1)
1125 (process_skeletonless_type_unit, load_partial_comp_unit)
1126 (psymtab_to_symtab_1): Update.
1127 (load_full_comp_unit): Add skip_partial parameter.
1128 (process_imported_unit_die, dwarf2_read_addr_index)
1129 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1130 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1131 (read_signatured_type): Update.
1133 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1135 * value.c (release_value): Remove unused variable.
1136 (record_latest_value): Likewise.
1137 (access_value_history): Likewise.
1138 (preserve_values): Likewise.
1140 2018-05-17 Tom Tromey <tom@tromey.com>
1142 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1145 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1148 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1149 Also handle registers whose width is not a multiple of
1151 (linux_nat_trad_target::store_register): Likewise.
1153 2018-05-16 Tom Tromey <tom@tromey.com>
1155 * gdbcore.h (core_bfd): Redefine.
1156 * corelow.c (core_target::close): Update.
1157 (core_target_open): Update.
1158 * progspace.h (struct program_space) <cbfd>: Now a
1161 2018-05-16 Tom Tromey <tom@tromey.com>
1164 * symfile-add-flags.h (enum symfile_add_flags)
1165 <SYMFILE_NOT_FILENAME>: New constant.
1166 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
1167 objfile name from BFD.
1168 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1169 * minidebug.c (find_separate_debug_file_in_section): Put
1170 ".gnu_debugdata" into BFD's file name.
1172 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
1174 * regcache.c (regcache_read_ftype, regcache_write_ftype):
1177 2018-05-15 Tamar Christina <tamar.christina@arm.com>
1180 * aarch64-tdep.c (aarch64_analyze_prologue,
1181 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
1182 Indicate not interested in errors.
1184 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1186 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
1187 Supply the MIPS_ZERO_REGNUM register.
1189 2018-05-15 Maciej W. Rozycki <macro@mips.com>
1191 * mips-tdep.c (mask_address_var): Make variable static.
1193 2018-05-14 Tom Tromey <tom@tromey.com>
1195 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
1197 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
1199 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
1200 FXSAVE_ADDR for the mxcsr register.
1202 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
1204 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
1206 2018-05-11 Pedro Alves <palves@redhat.com>
1208 * corelow.c (core_target) <core_target>: No longer inline.
1209 Initialize m_core_gdbarch, m_core_vec and build the section table
1211 <~core_target>: New.
1212 <core_gdbarch, get_core_register_section>: New methods.
1213 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
1214 factored out from ...
1215 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
1217 (sniff_core_bfd): Add gdbarch parameter.
1218 (core_close): Delete, merged into ...
1219 (core_target::close): ... here. Delete self.
1220 (core_close_cleanup): Delete.
1221 (core_target_open): Allocate a core_target on the heap. Use a
1222 unique_ptr instead of a cleanup. Bits moved into the core_target
1223 ctor. Adjust to use core_target methods instead of globals.
1224 (get_core_register_section): Rename to ...
1225 (core_target::get_core_register_section): ... this and adjust.
1226 (struct get_core_registers_cb_data): New.
1227 (get_core_registers_cb): Use it. Use bool.
1228 (core_target::fetch_registers, core_target::files_info)
1229 (core_target::xfer_partial, core_target::read_description)
1230 (core_target::pid_to, core_target::thread_name): Adjust to
1231 reference class fields instead of globals.
1232 * target.h (struct target_ops_deleter, target_ops_up): New.
1234 2018-05-11 Pedro Alves <palves@redhat.com>
1236 * corefile.c (core_file_command): Move to corelow.c.
1237 * corelow.c (the_core_target): Delete.
1238 (core_file_command): Moved from corefile.c. Check exec_bfd
1239 instead of the_core_target. Use target_detach instead of calling
1240 into the_core_target directly.
1241 (maybe_say_no_core_file_now): New.
1242 (core_target::detach): Use it.
1243 (_initialize_corelow): Remove references to the_core_target.
1244 * gdbcore.h (the_core_target): Delete.
1246 2018-05-11 Tom Tromey <tromey@redhat.com>
1247 Pedro Alves <palves@redhat.com>
1249 * corefile.c (core_bfd): Remove.
1250 * gdbcore.h (core_bfd): Now a macro.
1251 * progspace.h (struct program_space) <cbfd>: New field.
1253 2018-05-11 Tom Tromey <tom@tromey.com>
1255 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
1258 2018-05-10 Tom Tromey <tom@tromey.com>
1260 * configure: Rebuild.
1261 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
1263 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1266 * regformats/regdat.sh: Adjust script, following the addition
1267 of the new expedite_regs parameter to init_target_desc.
1269 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
1272 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
1273 set_gdbarch_significant_addr_bit.
1274 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
1275 set_gdbarch_significant_addr_bit.
1276 * utils.c (address_significant): Update to sign extend addr.
1278 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
1280 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
1281 (xtensa_linux_init_abi): Limit tdep->num_regs by
1282 tdep->num_nopriv_regs.
1283 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
1284 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
1287 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
1289 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
1291 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1293 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
1294 (I387_MXCSR_INIT_VAL): New constant.
1295 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
1296 buffer if it was supplied by the inferior.
1297 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
1298 (i387_xsave_get_clear_bv): New function.
1299 (i387_supply_xsave): Only read x87 control registers from the
1300 xsave buffer if the feature is enabled, and the state will have
1301 been written, otherwise, provide a suitable default.
1302 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
1303 including x87 control registers. Update control registers if they
1304 have changed from the default value, and mark features as enabled
1306 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
1308 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1310 * spu-tdep.c (info_spu_event_command): Fix output formatting.
1312 2018-05-07 Tom Tromey <tom@tromey.com>
1314 * configure: Rebuild.
1315 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
1317 2018-05-07 Tom Tromey <tom@tromey.com>
1320 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
1321 bit. Use correct value for VDIV.
1323 2018-05-04 Tom Tromey <tom@tromey.com>
1325 * configure: Rebuild.
1326 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
1328 2018-05-04 Tom Tromey <tom@tromey.com>
1330 * linux-record.c (record_linux_system_call) <case
1331 RECORD_SYS_RECVFROM>: Add "break".
1333 2018-05-04 Tom Tromey <tom@tromey.com>
1335 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
1336 Add missing "break".
1337 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
1338 Add missing "break".
1340 2018-05-04 Tom Tromey <tom@tromey.com>
1342 * rs6000-tdep.c (ppc_process_record_op4)
1343 (ppc_process_record_op63): Add fall-through comment.
1345 2018-05-04 Tom Tromey <tom@tromey.com>
1347 * i386-tdep.c (i386_process_record): Add fall-through comment.
1349 2018-05-04 Tom Tromey <tom@tromey.com>
1351 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
1354 2018-05-04 Tom Tromey <tom@tromey.com>
1356 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
1357 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
1358 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
1360 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
1362 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
1365 2018-05-04 Tom Tromey <tom@tromey.com>
1367 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
1369 2018-05-04 Tom Tromey <tom@tromey.com>
1371 * s390-tdep.c (s390_process_record): Fix fall-through comments.
1372 * xcoffread.c (scan_xcoff_symtab): Move comment later.
1373 * symfile.c (section_is_mapped): Fix fall-through comment.
1374 * stabsread.c (define_symbol, read_member_functions): Fix
1375 fall-through comment.
1376 * s390-linux-tdep.c (s390_process_record): Fix fall-through
1378 * remote.c (remote_wait_as): Fix fall-through comment.
1379 * p-exp.y (yylex): Fix fall-through comment.
1380 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
1382 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
1383 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
1384 * jv-exp.y (yylex): Fix fall-through comment.
1385 * go-exp.y (lex_one_token): Fix fall-through comment.
1386 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
1387 fall-through comment.
1388 * f-exp.y (yylex): Fix fall-through comment.
1389 * dwarf2read.c (process_die): Fix fall-through comments.
1390 * dbxread.c (process_one_symbol): Fix fall-through comment.
1391 * d-exp.y (lex_one_token): Fix fall-through comment.
1392 * cp-name-parser.y (yylex): Fix fall-through comment.
1393 * coffread.c (coff_symtab_read): Fix fall-through comment.
1394 * c-exp.y (lex_one_token): Fix fall-through comment.
1395 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
1397 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
1400 2018-05-04 Tom Tromey <tom@tromey.com>
1403 * NEWS: Mention gdb.execute change.
1404 * gdbcmd.h (execute_control_command): Don't declare.
1405 * python/python.c (execute_gdb_command): Use read_command_lines_1,
1406 execute_control_commands, execute_control_commands_to_string.
1407 * cli/cli-script.h (execute_control_commands)
1408 (execute_control_commands_to_string): Declare.
1409 (execute_control_command): Add from_tty parameter.
1410 * cli/cli-script.c (execute_control_commands)
1411 (execute_control_commands_to_string): New functions.
1412 (execute_user_command): Use execute_control_commands.
1413 (execute_control_command_1): Add "from_tty" parameter. Update.
1414 (execute_control_command): Likewise.
1416 2018-05-04 Tom Tromey <tom@tromey.com>
1419 * NEWS: Mention that breakpoint commands are writable.
1420 * python/py-breakpoint.c (bppy_set_commands): New function.
1421 (breakpoint_object_getset) <"commands">: Use it.
1423 2018-05-04 Tom Tromey <tom@tromey.com>
1425 * tracepoint.c (actions_command): Update.
1426 * mi/mi-cmd-break.c (mi_command_line_array)
1427 (mi_command_line_array_cnt, mi_command_line_array_ptr)
1428 (mi_read_next_line): Remove.
1429 (mi_cmd_break_commands): Update.
1430 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
1432 * cli/cli-script.c (get_command_line): Update.
1433 (process_next_line): Use function_view. Constify.
1434 (recurse_read_control_structure, read_command_lines)
1435 (read_command_lines_1): Change argument types to function_view.
1436 (do_define_command, document_command): Update.
1437 * breakpoint.h (check_tracepoint_command): Don't declare.
1438 * breakpoint.c (check_tracepoint_command): Remove.
1439 (commands_command_1, create_tracepoint_from_upload): Update.
1441 2018-05-04 Tom Tromey <tom@tromey.com>
1444 * cli/cli-script.h (enum command_control_type) <define_control>:
1446 * cli/cli-script.c (multi_line_command_p): Handle define_control.
1447 (build_command_line, execute_control_command_1)
1448 (process_next_line): Likewise.
1449 (do_define_command): New function, extracted from define_command.
1450 (define_command): Use it.
1452 2018-05-04 Tom Tromey <tom@tromey.com>
1454 * tracepoint.c (actions_command): Update.
1455 * cli/cli-script.h (read_command_lines): Update.
1456 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
1457 (MAX_TMPBUF): Remove define.
1458 (define_command): Use string_printf.
1459 (document_command): Likewise.
1460 * breakpoint.c (commands_command_1): Update.
1462 2018-05-04 Tom Tromey <tom@tromey.com>
1464 * top.c (execute_command): Update.
1465 * cli/cli-script.h (print_command_lines): Now varargs.
1466 * cli/cli-script.c (print_command_lines): Now varargs.
1467 (execute_control_command_1) <case while_control, case if_control>:
1470 2018-05-04 Tom Tromey <tom@tromey.com>
1472 * tracepoint.c (all_tracepoint_actions): Rename from
1473 all_tracepoint_actions_and_cleanup. Change return type.
1474 (actions_command, encode_actions_1, encode_actions)
1475 (trace_dump_actions, tdump_command): Update.
1476 * remote.c (remote_download_command_source): Update.
1477 * python/python.c (gdbpy_eval_from_control_command)
1478 (python_command, python_interactive_command): Update.
1479 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1480 * guile/guile.c (guile_command)
1481 (gdbscm_eval_from_control_command, guile_command): Update.
1482 * compile/compile.c (compile_code_command)
1483 (compile_print_command, compile_to_object): Update.
1484 * cli/cli-script.h (struct command_lines_deleter): New.
1485 (counted_command_line): New typedef.
1486 (struct command_line): Add constructor, destructor.
1487 <body_list>: Remove.
1488 <body_list_0, body_list_1>: New members.
1489 (command_line_up): Remove typedef.
1490 (read_command_lines, read_command_lines_1, get_command_line):
1492 (copy_command_lines): Don't declare.
1493 * cli/cli-script.c (build_command_line): Use "new".
1494 (get_command_line): Return counted_command_line.
1495 (print_command_lines, execute_user_command)
1496 (execute_control_command_1, while_command, if_command): Update.
1497 (realloc_body_list): Remove.
1498 (process_next_line, recurse_read_control_structure): Update.
1499 (read_command_lines, read_command_lines_1): Return counted_command_line.
1500 (free_command_lines): Use "delete".
1501 (copy_command_lines): Remove.
1502 (define_command, document_command, show_user_1): Update.
1503 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
1504 a counted_command_line.
1505 * breakpoint.h (counted_command_line): Remove typedef.
1506 (breakpoint_set_commands): Update.
1507 * breakpoint.c (check_no_tracepoint_commands)
1508 (validate_commands_for_breakpoint): Update.
1509 (breakpoint_set_commands): Change commands to be a
1510 counted_command_line.
1511 (commands_command_1, update_dprintf_command_list)
1512 (create_tracepoint_from_upload): Update.
1514 2018-05-04 Tom Tromey <tom@tromey.com>
1516 * cli/cli-decode.h (cmd_list_element): New constructor.
1517 (~cmd_list_element): New destructor.
1518 (struct cmd_list_element): Add initializers.
1519 * cli/cli-decode.c (do_add_cmd): Use "new".
1520 (delete_cmd): Use "delete".
1522 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1523 Pedro Alves <palves@redhat.com>
1525 PR breakpoints/19806 and support for PR external/20207.
1526 * NEWS: Mention Aarch64 watchpoint improvements.
1527 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
1528 watchpoints and PR external/20207 watchpoints.
1529 * nat/aarch64-linux-hw-point.c
1530 (kernel_supports_any_contiguous_range): New.
1531 (aarch64_watchpoint_offset): New.
1532 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
1533 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
1534 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
1535 (aarch64_align_watchpoint): New parameters aligned_offset_p and
1536 next_addr_orig_p. Support PR external/20207 watchpoints.
1537 (aarch64_downgrade_regs): New.
1538 (aarch64_dr_state_insert_one_point): New parameters offset and
1540 (aarch64_dr_state_remove_one_point): Likewise.
1541 (aarch64_handle_breakpoint): Update caller.
1542 (aarch64_handle_aligned_watchpoint): Likewise.
1543 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
1545 (aarch64_linux_set_debug_regs): Remove const from state. Call
1546 aarch64_downgrade_regs.
1547 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
1548 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
1549 (DR_CONTROL_MASK): ... this.
1550 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
1551 (unsigned int aarch64_watchpoint_offset): New prototype.
1552 (aarch64_linux_set_debug_regs): Remove const from state.
1553 * utils.c (align_up, align_down): Move to ...
1554 * common/common-utils.c (align_up, align_down): ... here.
1555 * utils.h (align_up, align_down): Move to ...
1556 * common/common-utils.h (align_up, align_down): ... here.
1558 2018-05-04 Joel Brobecker <brobecker@adacore.com>
1560 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
1561 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
1562 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
1563 Re-implement to match the ABI as summarized in GCC's
1564 gcc/config/sparc/sparc.c. All callers updated.
1565 (sparc32_store_arguments): Remove assertion.
1567 2018-05-04 Tom Tromey <tom@tromey.com>
1569 * printcmd.c: Don't include tui.h.
1570 (decode_format): Use skip_spaces.
1572 2018-05-04 Tom Tromey <tom@tromey.com>
1575 * printcmd.c (last_count): New global.
1576 (x_command): Use saved count when repeating.
1578 2018-05-04 Tom Tromey <tom@tromey.com>
1580 * nto-procfs.c (do_closedir_cleanup): Remove.
1581 (procfs_pidlist): Use gdb_dir_up.
1582 * procfs.c (do_closedir_cleanup): Remove.
1583 (proc_update_threads): Use gdb_dir_up.
1584 * common/filestuff.h (struct gdb_dir_deleter): New.
1585 (gdb_dir_up): New typedef.
1587 2018-05-04 Tom Tromey <tom@tromey.com>
1589 * ada-lang.c (print_mention_exception): Use std::string.
1591 2018-05-04 Tom Tromey <tom@tromey.com>
1593 * ada-lang.c (create_excep_cond_exprs): Update.
1594 (ada_exception_catchpoint_cond_string): Use std::string.
1596 2018-05-04 Tom Tromey <tom@tromey.com>
1598 * ada-lang.c (xget_renaming_scope): Return std::string.
1599 (old_renaming_is_invisible): Update.
1601 2018-05-04 Tom Tromey <tom@tromey.com>
1603 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
1604 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
1606 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
1608 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
1610 2018-05-04 Tom Tromey <tom@tromey.com>
1612 * remote.c (remote_query_supported_append): Change type.
1613 (remote_check_symbols): Update.
1615 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
1618 * configure.ac: Prepend libpython.
1619 * python/python-config.py: Likewise.
1620 * configure: Regenerate.
1622 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
1624 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
1626 2018-05-03 Pedro Alves <palves@redhat.com>
1629 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
1630 override. Write 'true' instead of '1'.
1631 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
1634 2018-05-02 Pedro Alves <palves@redhat.com>
1636 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
1637 add_inf_child_target.
1638 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
1639 add_inf_child_target.
1640 * aix-thread.c (aix_thread_target_info): New.
1641 (aix_thread_target) <shortname, longname, doc>: Delete.
1643 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
1644 add_inf_child_target.
1645 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
1646 add_inf_child_target.
1647 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
1648 add_inf_child_target.
1649 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
1650 add_inf_child_target.
1651 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
1652 add_inf_child_target.
1653 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
1654 add_inf_child_target.
1655 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
1656 add_inf_child_target.
1657 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
1658 add_inf_child_target.
1659 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
1660 add_inf_child_target.
1661 * bfd-target.c (target_bfd_target_info): New.
1662 (target_bfd) <shortname, longname, doc>: Delete.
1664 * bsd-kvm.c (bsd_kvm_target_info): New.
1665 (bsd_kvm_target) <shortname, longname, doc>: Delete.
1667 (bsd_kvm_target::open): Rename to ...
1668 (bsd_kvm_target_open): ... this. Adjust.
1669 * bsd-uthread.c (bsd_uthread_target_info): New.
1670 (bsd_uthread_target) <shortname, longname, doc>: Delete.
1672 * corefile.c (core_file_command): Adjust.
1673 * corelow.c (core_target_info): New.
1674 (core_target) <shortname, longname, doc>: Delete.
1676 (core_target::open): Rename to ...
1677 (core_target_open): ... this. Adjust.
1678 * ctf.c (ctf_target_info): New.
1679 (ctf_target) <shortname, longname, doc>: Delete.
1681 (ctf_target::open): Rename to ...
1682 (ctf_target_open): ... this.
1683 (_initialize_ctf): Adjust.
1684 * exec.c (exec_target_info): New.
1685 (exec_target) <shortname, longname, doc>: Delete.
1687 (exec_target::open): Rename to ...
1688 (exec_target_open): ... this.
1689 * gdbcore.h (core_target_open): Declare.
1690 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
1691 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
1692 add_inf_child_target.
1693 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
1694 add_inf_child_target.
1695 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
1696 add_inf_child_target.
1697 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
1698 add_inf_child_target.
1699 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
1700 add_inf_child_target.
1701 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
1702 add_inf_child_target.
1703 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
1704 add_inf_child_target.
1705 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
1706 add_inf_child_target.
1707 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
1708 add_inf_child_target.
1709 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
1710 add_inf_child_target.
1711 * inf-child.c (inf_child_target_info): New.
1712 (inf_child_target::info): New.
1713 (inf_child_open_target): Remove 'target' parameter. Use
1714 get_native_target instead.
1715 (inf_child_target::open): Delete.
1716 (add_inf_child_target): New.
1717 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
1720 (add_inf_child_target): Declare.
1721 (inf_child_open_target): Declare.
1722 * linux-thread-db.c (thread_db_target_info): New.
1723 (thread_db_target) <shortname, longname, doc>: Delete.
1725 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
1726 add_inf_child_target.
1727 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
1728 add_inf_child_target.
1729 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
1730 add_inf_child_target.
1731 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
1732 add_inf_child_target.
1733 * make-target-delegates (print_class): Adjust.
1734 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
1735 add_inf_child_target.
1736 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
1737 add_inf_child_target.
1738 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
1739 add_inf_child_target.
1740 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
1741 add_inf_child_target.
1742 * nto-procfs.c (nto_native_target_info): New.
1743 (nto_procfs_target_native) <shortname, longname, doc>:
1746 (nto_procfs_target_info): New.
1747 (nto_procfs_target_procfs) <shortname, longname, doc>:
1750 (init_procfs_targets): Adjust.
1751 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
1752 add_inf_child_target.
1753 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
1754 add_inf_child_target.
1755 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
1756 add_inf_child_target.
1757 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
1758 add_inf_child_target.
1759 * ravenscar-thread.c (ravenscar_target_info): New.
1760 (ravenscar_thread_target) <shortname, longname, doc>:
1763 * record-btrace.c (record_btrace_target_info):
1764 (record_btrace_target) <shortname, longname, doc>: Delete.
1766 (record_btrace_target::open): Rename to ...
1767 (record_btrace_target_open): ... this. Adjust.
1768 * record-full.c (record_longname, record_doc): New.
1769 (record_full_base_target) <shortname, longname, doc>: Delete.
1771 (record_full_target_info): New.
1772 (record_full_target): <shortname>: Delete.
1774 (record_full_core_open_1, record_full_open_1): Update comments.
1775 (record_full_base_target::open): Rename to ...
1776 (record_full_open): ... this.
1777 (cmd_record_full_restore): Update.
1778 (_initialize_record_full): Update.
1779 * remote-sim.c (remote_sim_target_info): New.
1780 (gdbsim_target) <shortname, longname, doc>: Delete.
1782 (gdbsim_target::open): Rename to ...
1783 (gdbsim_target_open): ... this.
1784 (_initialize_remote_sim): Adjust.
1785 * remote.c (remote_doc): New.
1786 (remote_target_info): New.
1787 (remote_target) <shortname, longname, doc>: Delete.
1789 (extended_remote_target_info): New.
1790 (extended_remote_target) <shortname, longname, doc>: Delete.
1792 (remote_target::open_1): Make static. Adjust.
1793 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
1794 * s390-linux-nat.c (_initialize_s390_nat): Use
1795 add_inf_child_target.
1796 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
1797 add_inf_child_target.
1798 * sol-thread.c (thread_db_target_info): New.
1799 (sol_thread_target) <shortname, longname, doc>: Delete.
1801 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
1802 add_inf_child_target.
1803 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
1804 add_inf_child_target.
1805 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
1806 add_inf_child_target.
1807 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
1808 add_inf_child_target.
1809 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
1810 add_inf_child_target.
1811 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
1812 add_inf_child_target.
1813 * spu-linux-nat.c (_initialize_spu_nat): Use
1814 add_inf_child_target.
1815 * spu-multiarch.c (spu_multiarch_target_info): New.
1816 (spu_multiarch_target) <shortname, longname, doc>: Delete.
1818 * target-delegates.c: Regenerate.
1819 * target.c: Include <unordered_map>.
1820 (target_ops_p): Delete.
1821 (DEF_VEC_P(target_ops_p)): Delete.
1822 (target_factories): New.
1823 (test_target_info): New.
1824 (test_target_ops::info): New.
1825 (open_target): Adjust to use target_factories.
1826 (add_target_with_completer): Rename to ...
1827 (add_target): ... this. Change prototype. Register target_info
1828 and open callback in target_factories. Register target_info in
1829 command context instead of target_ops.
1830 (add_target): Delete old implementation.
1831 (add_deprecated_target_alias): Change prototype. Adjust.
1832 (the_native_target): New.
1833 (set_native_target, get_native_target): New.
1834 (find_default_run_target): Use the_native_target.
1835 (find_attach_target, find_run_target): Simplify.
1836 (target_ops::open): Delete.
1837 (dummy_target_info): New.
1838 (dummy_target::shortname, dummy_target::longname)
1839 (dummy_target::doc): Delete.
1840 (dummy_target::info): New.
1841 (debug_target::shortname, debug_target::longname)
1842 (debug_target::doc): Delete.
1843 (debug_target::info): New.
1844 * target.h (struct target_info): New.
1845 (target_ops::~target_ops): Add comment.
1846 (target_ops::info): New.
1847 (target_ops::shortname, target_ops::longname, target_ops::doc): No
1848 longer virtual. Implement in terms of target_info.
1849 (set_native_target, get_native_target): Declare.
1850 (target_open_ftype): New.
1851 (add_target, add_target_with_completer)
1852 (add_deprecated_target_alias): Change prototype.
1853 (test_target) <shortname, longname, doc>: Delete.
1855 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
1856 add_inf_child_target.
1857 * tracefile-tfile.c (tfile_target_info): New.
1858 (tfile_target) <shortname, longname, doc>: Delete.
1860 (tfile_target::open): Rename to ...
1861 (tfile_target_open): ... this.
1862 (_initialize_tracefile_tfile): Adjust.
1863 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
1864 add_inf_child_target.
1865 * windows-nat.c (_initialize_windows_nat): Use
1866 add_inf_child_target.
1867 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
1868 add_inf_child_target.
1870 2018-05-02 Pedro Alves <palves@redhat.com>
1872 * linux-nat.h (linux_nat_target) <low_new_thread,
1873 low_delete_thread, low_new_fork, low_forget_process,
1874 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
1875 New virtual methods.
1876 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1877 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
1878 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
1879 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1880 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
1882 * linux-fork.c (delete_fork): Adjust to call low method.
1883 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
1884 (linux_nat_new_fork, linux_nat_forget_process_hook)
1885 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
1886 (linux_nat_status_is_event):
1887 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
1888 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
1890 (sigtrap_is_event): Rename to ...
1891 (linux_nat_target::low_status_is_event): ... this.
1892 (linux_nat_set_status_is_event): Delete.
1893 (save_stop_reason, linux_nat_wait_1)
1894 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
1896 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1897 (linux_nat_set_new_fork, linux_nat_set_forget_process)
1898 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1899 (linux_nat_set_prepare_to_resume): Delete.
1900 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
1901 low virtual methods.
1902 * amd64-linux-nat.c: Likewise.
1903 * arm-linux-nat.c: Likewise.
1904 * i386-linux-nat.c: Likewise.
1905 * ia64-linux-nat.c: Likewise.
1906 * mips-linux-nat.c: Likewise.
1907 * ppc-linux-nat.c: Likewise.
1908 * s390-linux-nat.c: Likewise.
1909 * sparc64-linux-nat.c: Likewise.
1910 * x86-linux-nat.c: Likewise.
1911 * x86-linux-nat.h: Include "nat/x86-linux.h".
1912 (x86_linux_nat_target) <low_new_fork, low_forget_process,
1913 low_prepare_to_resume, low_new_thread, low_delete_thread>:
1916 2018-05-02 Pedro Alves <palves@redhat.com>
1918 * target.h (target_ops)
1919 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1920 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
1921 stopped_by_watchpoint, have_continuable_watchpoint,
1922 stopped_data_address, watchpoint_addr_within_range,
1923 can_accel_watchpoint_condition, can_run, thread_alive,
1924 has_all_memory, has_memory, has_stack, has_registers,
1925 has_execution, can_async_p, is_async_p, supports_non_stop,
1926 always_non_stop_p, can_execute_reverse, supports_multi_process,
1927 supports_enable_disable_tracepoint,
1928 supports_disable_randomization, supports_string_tracing,
1929 supports_evaluation_of_breakpoint_conditions,
1930 can_run_breakpoint_commands, filesystem_is_local,
1931 can_download_tracepoint, get_trace_state_variable_value,
1932 set_trace_notes, get_tib_address, use_agent, can_use_agent,
1933 record_is_replaying, record_will_replay,
1934 augmented_libraries_svr4_read>: Adjust to return bool.
1935 * aarch64-linux-nat.c: All implementations adjusted.
1936 * aix-thread.c: All implementations adjusted.
1937 * arm-linux-nat.c: All implementations adjusted.
1938 * breakpoint.c: All implementations adjusted.
1939 * bsd-kvm.c: All implementations adjusted.
1940 * bsd-uthread.c: All implementations adjusted.
1941 * corelow.c: All implementations adjusted.
1942 * ctf.c: All implementations adjusted.
1943 * darwin-nat.c: All implementations adjusted.
1944 * darwin-nat.h: All implementations adjusted.
1945 * exec.c: All implementations adjusted.
1946 * fbsd-nat.c: All implementations adjusted.
1947 * fbsd-nat.h: All implementations adjusted.
1948 * gnu-nat.c: All implementations adjusted.
1949 * gnu-nat.h: All implementations adjusted.
1950 * go32-nat.c: All implementations adjusted.
1951 * ia64-linux-nat.c: All implementations adjusted.
1952 * inf-child.c: All implementations adjusted.
1953 * inf-child.h: All implementations adjusted.
1954 * inf-ptrace.c: All implementations adjusted.
1955 * inf-ptrace.h: All implementations adjusted.
1956 * linux-nat.c: All implementations adjusted.
1957 * linux-nat.h: All implementations adjusted.
1958 * mips-linux-nat.c: All implementations adjusted.
1959 * nto-procfs.c: All implementations adjusted.
1960 * ppc-linux-nat.c: All implementations adjusted.
1961 * procfs.c: All implementations adjusted.
1962 * ravenscar-thread.c: All implementations adjusted.
1963 * record-btrace.c: All implementations adjusted.
1964 * record-full.c: All implementations adjusted.
1965 * remote-sim.c: All implementations adjusted.
1966 * remote.c: All implementations adjusted.
1967 * s390-linux-nat.c: All implementations adjusted.
1968 * sol-thread.c: All implementations adjusted.
1969 * spu-multiarch.c: All implementations adjusted.
1970 * target-delegates.c: All implementations adjusted.
1971 * target.c: All implementations adjusted.
1972 * target.h: All implementations adjusted.
1973 * tracefile-tfile.c: All implementations adjusted.
1974 * tracefile.c: All implementations adjusted.
1975 * tracefile.h: All implementations adjusted.
1976 * windows-nat.c: All implementations adjusted.
1977 * x86-linux-nat.h: All implementations adjusted.
1978 * x86-nat.h: All implementations adjusted.
1980 2018-05-02 Pedro Alves <palves@redhat.com>
1982 * make-target-delegates (scan_target_h): Don't trim lines here.
1983 Replace sequences of tabs and/or whitespace with a single
1985 (top level, parsing methods): Trim each line before processing it
1988 2018-05-02 Pedro Alves <palves@redhat.com>
1989 John Baldwin <jhb@freebsd.org>
1991 * target.h (enum strata) <debug_stratum>: New.
1992 (struct target_ops) <all delegation methods>: Replace by C++
1993 virtual methods, and drop "to_" prefix. All references updated
1995 <to_shortname, to_longname, to_doc, to_data,
1996 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
1997 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
1998 virtual methods. All references updated throughout.
1999 <can_attach, supports_terminal_ours, can_create_inferior,
2000 get_thread_control_capabilities, attach_no_wait>: New
2002 <insert_breakpoint, remove_breakpoint>: Now
2003 TARGET_DEFAULT_NORETURN methods.
2004 <info_proc>: Now returns bool.
2006 (OPS_MAGIC): Delete.
2007 (current_target): Delete. All references replaced by references
2009 (target_stack): ... this. New.
2010 (target_shortname, target_longname): Adjust.
2011 (target_can_run): Now a function declaration.
2012 (default_child_has_all_memory, default_child_has_memory)
2013 (default_child_has_stack, default_child_has_registers)
2014 (default_child_has_execution): Remove target_ops parameter.
2015 (complete_target_initialization): Delete.
2016 (memory_breakpoint_target): New template class.
2017 (test_target_ops): Refactor as a C++ class with virtual methods.
2018 * make-target-delegates (NAME_PART): Tighten.
2019 (POINTER_PART, CP_SYMBOL): New.
2020 (SIMPLE_RETURN_PART): Reimplement.
2021 (VEC_RETURN_PART): Expect less.
2022 (RETURN_PART, VIRTUAL_PART): New.
2023 (METHOD): Adjust to C++ virtual methods.
2024 (scan_target_h): Remove reference to C99.
2025 (dname): Output "target_ops::" prefix.
2026 (write_function_header): Adjust to output a C++ class method.
2027 (write_declaration): New.
2028 (write_delegator): Adjust to output a C++ class method.
2029 (tdname): Output "dummy_target::" prefix.
2030 (write_tdefault, write_debugmethod): Adjust to output a C++ class
2032 (tdefault_names, debug_names): Delete.
2033 (return_types, tdefaults, styles, argtypes_array): New.
2034 (top level): All methods are delegators.
2036 (top level): Print dummy_target and debug_target classes.
2037 * target-delegates.c: Regenerate.
2038 * target-debug.h (target_debug_print_enum_info_proc_what)
2039 (target_debug_print_thread_control_capabilities)
2040 (target_debug_print_thread_info_p): New.
2041 * target.c (dummy_target): Delete.
2042 (the_dummy_target, the_debug_target): New.
2043 (target_stack): Now extern.
2044 (set_targetdebug): Push/unpush debug target.
2045 (default_child_has_all_memory, default_child_has_memory)
2046 (default_child_has_stack, default_child_has_registers)
2047 (default_child_has_execution): Remove target_ops parameter.
2048 (complete_target_initialization): Delete.
2049 (add_target_with_completer): No longer call
2050 complete_target_initialization.
2051 (target_supports_terminal_ours): Use regular delegation.
2052 (update_current_target): Delete.
2053 (push_target): No longer check magic number. Don't call
2054 update_current_target.
2055 (unpush_target): Don't call update_current_target.
2056 (target_is_pushed): No longer check magic number.
2057 (target_require_runnable): Skip for all stratums over
2059 (target_ops::info_proc): New.
2060 (target_info_proc): Use find_target_at and
2061 find_default_run_target.
2062 (target_supports_disable_randomization): Use regular delegation.
2063 (target_get_osdata): Use find_target_at.
2064 (target_ops::open, target_ops::close, target_ops::can_attach)
2065 (target_ops::attach, target_ops::can_create_inferior)
2066 (target_ops::create_inferior, target_ops::can_run)
2067 (target_can_run): New.
2068 (default_fileio_target): Use regular delegation.
2069 (target_ops::fileio_open, target_ops::fileio_pwrite)
2070 (target_ops::fileio_pread, target_ops::fileio_fstat)
2071 (target_ops::fileio_close, target_ops::fileio_unlink)
2072 (target_ops::fileio_readlink): New.
2073 (target_fileio_open_1, target_fileio_unlink)
2074 (target_fileio_readlink): Always call the target method. Handle
2076 (return_zero, return_zero_has_execution): Delete.
2077 (init_dummy_target): Delete.
2078 (dummy_target::dummy_target, dummy_target::shortname)
2079 (dummy_target::longname, dummy_target::doc)
2080 (debug_target::debug_target, debug_target::shortname)
2081 (debug_target::longname, debug_target::doc): New.
2082 (target_supports_delete_record): Use regular delegation.
2083 (setup_target_debug): Delete.
2084 (maintenance_print_target_stack): Skip debug_stratum.
2085 (initialize_targets): Instantiate the_dummy_target and
2087 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
2089 (target_auxv_search, fprint_target_auxv): Adjust.
2090 (info_auxv_command): Adjust to use target_stack.
2091 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2092 * exceptions.c (print_flush): Handle a NULL target_stack.
2093 * regcache.c (target_ops_no_register): Refactor as class with
2096 * exec.c (exec_target): New class.
2097 (exec_ops): Now an exec_target.
2098 (exec_open, exec_close_1, exec_get_section_table)
2099 (exec_xfer_partial, exec_files_info, exec_has_memory)
2100 (exec_make_note_section): Refactor as exec_target methods.
2101 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2103 (exec_target::find_memory_regions): New.
2104 (_initialize_exec): Don't call init_exec_ops.
2105 * gdbcore.h (exec_file_clear): Delete.
2107 * corefile.c (core_target): Delete.
2108 (core_file_command): Adjust.
2109 * corelow.c (core_target): New class.
2110 (the_core_target): New.
2111 (core_close): Remove target_ops parameter.
2112 (core_close_cleanup): Adjust.
2113 (core_target::close): New.
2114 (core_open, core_detach, get_core_registers, core_files_info)
2115 (core_xfer_partial, core_thread_alive, core_read_description)
2116 (core_pid_to_str, core_thread_name, core_has_memory)
2117 (core_has_stack, core_has_registers, core_info_proc): Rework as
2118 core_target methods.
2119 (ignore, core_remove_breakpoint, init_core_ops): Delete.
2120 (_initialize_corelow): Initialize the_core_target.
2121 * gdbcore.h (core_target): Delete.
2122 (the_core_target): New.
2124 * ctf.c: (ctf_target): New class.
2125 (ctf_ops): Now a ctf_target.
2126 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2127 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2128 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2130 (init_ctf_ops): Delete.
2131 (_initialize_ctf): Don't call it.
2132 * tracefile-tfile.c (tfile_target): New class.
2133 (tfile_ops): Now a tfile_target.
2134 (tfile_open, tfile_close, tfile_files_info)
2135 (tfile_get_tracepoint_status, tfile_trace_find)
2136 (tfile_fetch_registers, tfile_xfer_partial)
2137 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2138 Refactor as tfile_target methods.
2139 (tfile_xfer_partial_features): Remove target_ops parameter.
2140 (init_tfile_ops): Delete.
2141 (_initialize_tracefile_tfile): Don't call it.
2142 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2143 (tracefile_has_stack, tracefile_has_registers)
2144 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2145 tracefile_target methods.
2146 (init_tracefile_ops): Delete.
2147 (tracefile_target::tracefile_target): New.
2148 * tracefile.h: Include "target.h".
2149 (tracefile_target): New class.
2150 (init_tracefile_ops): Delete.
2152 * spu-multiarch.c (spu_multiarch_target): New class.
2153 (spu_ops): Now a spu_multiarch_target.
2154 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2155 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2156 (spu_search_memory, spu_mourn_inferior): Refactor as
2157 spu_multiarch_target methods.
2158 (init_spu_ops): Delete.
2159 (_initialize_spu_multiarch): Remove references to init_spu_ops,
2160 complete_target_initialization.
2162 * ravenscar-thread.c (ravenscar_thread_target): New class.
2163 (ravenscar_ops): Now a ravenscar_thread_target.
2164 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2165 (ravenscar_thread_alive, ravenscar_pid_to_str)
2166 (ravenscar_fetch_registers, ravenscar_store_registers)
2167 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2168 (ravenscar_stopped_by_hw_breakpoint)
2169 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2170 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2171 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2173 (init_ravenscar_thread_ops): Delete.
2174 (_initialize_ravenscar): Remove references to
2175 init_ravenscar_thread_ops and complete_target_initialization.
2177 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
2178 (bsd_uthread_target): New class.
2179 (bsd_uthread_ops): Now a bsd_uthread_target.
2180 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
2181 (bsd_uthread_close, bsd_uthread_mourn_inferior)
2182 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
2183 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
2184 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
2185 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
2186 (bsd_uthread_target): Delete function.
2187 (_initialize_bsd_uthread): Remove reference to
2188 complete_target_initialization.
2190 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
2191 (target_bfd): ... this new class.
2192 (target_bfd_xfer_partial, target_bfd_get_section_table)
2193 (target_bfd_close): Refactor as target_bfd methods.
2194 (target_bfd::~target_bfd): New.
2195 (target_bfd_reopen): Adjust.
2196 (target_bfd::close): New.
2198 * record-btrace.c (record_btrace_target): New class.
2199 (record_btrace_ops): Now a record_btrace_target.
2200 (record_btrace_open, record_btrace_stop_recording)
2201 (record_btrace_disconnect, record_btrace_close)
2202 (record_btrace_async, record_btrace_info)
2203 (record_btrace_insn_history, record_btrace_insn_history_range)
2204 (record_btrace_insn_history_from, record_btrace_call_history)
2205 (record_btrace_call_history_range)
2206 (record_btrace_call_history_from, record_btrace_record_method)
2207 (record_btrace_is_replaying, record_btrace_will_replay)
2208 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
2209 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
2210 (record_btrace_store_registers, record_btrace_prepare_to_store)
2211 (record_btrace_to_get_unwinder)
2212 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
2213 (record_btrace_commit_resume, record_btrace_wait)
2214 (record_btrace_stop, record_btrace_can_execute_reverse)
2215 (record_btrace_stopped_by_sw_breakpoint)
2216 (record_btrace_supports_stopped_by_sw_breakpoint)
2217 (record_btrace_stopped_by_hw_breakpoint)
2218 (record_btrace_supports_stopped_by_hw_breakpoint)
2219 (record_btrace_update_thread_list, record_btrace_thread_alive)
2220 (record_btrace_goto_begin, record_btrace_goto_end)
2221 (record_btrace_goto, record_btrace_stop_replaying_all)
2222 (record_btrace_execution_direction)
2223 (record_btrace_prepare_to_generate_core)
2224 (record_btrace_done_generating_core): Refactor as
2225 record_btrace_target methods.
2226 (init_record_btrace_ops): Delete.
2227 (_initialize_record_btrace): Remove reference to
2228 init_record_btrace_ops.
2229 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
2230 the execution_direction global.
2231 (record_full_base_target, record_full_target)
2232 (record_full_core_target): New classes.
2233 (record_full_ops): Now a record_full_target.
2234 (record_full_core_ops): Now a record_full_core_target.
2235 (record_full_target::detach, record_full_target::disconnect)
2236 (record_full_core_target::disconnect)
2237 (record_full_target::mourn_inferior, record_full_target::kill):
2239 (record_full_open, record_full_close, record_full_async): Refactor
2240 as methods of the record_full_base_target class.
2241 (record_full_resume, record_full_commit_resume): Refactor
2242 as methods of the record_full_target class.
2243 (record_full_wait, record_full_stopped_by_watchpoint)
2244 (record_full_stopped_data_address)
2245 (record_full_stopped_by_sw_breakpoint)
2246 (record_full_supports_stopped_by_sw_breakpoint)
2247 (record_full_stopped_by_hw_breakpoint)
2248 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
2249 methods of the record_full_base_target class.
2250 (record_full_store_registers, record_full_xfer_partial)
2251 (record_full_insert_breakpoint, record_full_remove_breakpoint):
2252 Refactor as methods of the record_full_target class.
2253 (record_full_can_execute_reverse, record_full_get_bookmark)
2254 (record_full_goto_bookmark, record_full_execution_direction)
2255 (record_full_record_method, record_full_info, record_full_delete)
2256 (record_full_is_replaying, record_full_will_replay)
2257 (record_full_goto_begin, record_full_goto_end, record_full_goto)
2258 (record_full_stop_replaying): Refactor as methods of the
2259 record_full_base_target class.
2260 (record_full_core_resume, record_full_core_kill)
2261 (record_full_core_fetch_registers)
2262 (record_full_core_prepare_to_store)
2263 (record_full_core_store_registers, record_full_core_xfer_partial)
2264 (record_full_core_insert_breakpoint)
2265 (record_full_core_remove_breakpoint)
2266 (record_full_core_has_execution): Refactor
2267 as methods of the record_full_core_target class.
2268 (record_full_base_target::supports_delete_record): New.
2269 (init_record_full_ops): Delete.
2270 (init_record_full_core_ops): Delete.
2271 (record_full_save): Refactor as method of the
2272 record_full_base_target class.
2273 (_initialize_record_full): Remove references to
2274 init_record_full_ops and init_record_full_core_ops.
2276 * remote.c (remote_target, extended_remote_target): New classes.
2277 (remote_ops): Now a remote_target.
2278 (extended_remote_ops): Now an extended_remote_target.
2279 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
2280 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
2281 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
2282 (remote_pass_signals, remote_set_syscall_catchpoint)
2283 (remote_program_signals, )
2284 (remote_thread_always_alive): Remove target_ops parameter.
2285 (remote_thread_alive, remote_thread_name)
2286 (remote_update_thread_list, remote_threads_extra_info)
2287 (remote_static_tracepoint_marker_at)
2288 (remote_static_tracepoint_markers_by_strid)
2289 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
2290 (remote_open): Refactor as methods of remote_target.
2291 (extended_remote_open, extended_remote_detach)
2292 (extended_remote_attach, extended_remote_post_attach):
2293 (extended_remote_supports_disable_randomization)
2294 (extended_remote_create_inferior): : Refactor as method of
2295 extended_remote_target.
2296 (remote_set_permissions, remote_open_1, remote_detach)
2297 (remote_follow_fork, remote_follow_exec, remote_disconnect)
2298 (remote_resume, remote_commit_resume, remote_stop)
2299 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
2300 (remote_terminal_ours, remote_wait, remote_fetch_registers)
2301 (remote_prepare_to_store, remote_store_registers)
2302 (remote_flash_erase, remote_flash_done, remote_files_info)
2303 (remote_kill, remote_mourn, remote_insert_breakpoint)
2304 (remote_remove_breakpoint, remote_insert_watchpoint)
2305 (remote_watchpoint_addr_within_range)
2306 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
2307 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
2308 (remote_supports_stopped_by_sw_breakpoint)
2309 (remote_stopped_by_hw_breakpoint)
2310 (remote_supports_stopped_by_hw_breakpoint)
2311 (remote_stopped_by_watchpoint, remote_stopped_data_address)
2312 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
2313 (remote_verify_memory): Refactor as methods of remote_target.
2314 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
2316 (remote_xfer_partial, remote_get_memory_xfer_limit)
2317 (remote_search_memory, remote_rcmd, remote_memory_map)
2318 (remote_pid_to_str, remote_get_thread_local_address)
2319 (remote_get_tib_address, remote_read_description): Refactor as
2320 methods of remote_target.
2321 (remote_target::fileio_open, remote_target::fileio_pwrite)
2322 (remote_target::fileio_pread, remote_target::fileio_close): New.
2323 (remote_hostio_readlink, remote_hostio_fstat)
2324 (remote_filesystem_is_local, remote_can_execute_reverse)
2325 (remote_supports_non_stop, remote_supports_disable_randomization)
2326 (remote_supports_multi_process, remote_supports_cond_breakpoints)
2327 (remote_supports_enable_disable_tracepoint)
2328 (remote_supports_string_tracing)
2329 (remote_can_run_breakpoint_commands, remote_trace_init)
2330 (remote_download_tracepoint, remote_can_download_tracepoint)
2331 (remote_download_trace_state_variable, remote_enable_tracepoint)
2332 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
2333 (remote_trace_start, remote_get_trace_status)
2334 (remote_get_tracepoint_status, remote_trace_stop)
2335 (remote_trace_find, remote_get_trace_state_variable_value)
2336 (remote_save_trace_data, remote_get_raw_trace_data)
2337 (remote_set_disconnected_tracing, remote_core_of_thread)
2338 (remote_set_circular_trace_buffer, remote_traceframe_info)
2339 (remote_get_min_fast_tracepoint_insn_len)
2340 (remote_set_trace_buffer_size, remote_set_trace_notes)
2341 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
2342 (remote_disable_btrace, remote_teardown_btrace)
2343 (remote_read_btrace, remote_btrace_conf)
2344 (remote_augmented_libraries_svr4_read, remote_load)
2345 (remote_pid_to_exec_file, remote_can_do_single_step)
2346 (remote_execution_direction, remote_thread_handle_to_thread_info):
2347 Refactor as methods of remote_target.
2348 (init_remote_ops, init_extended_remote_ops): Delete.
2349 (remote_can_async_p, remote_is_async_p, remote_async)
2350 (remote_thread_events, remote_upload_tracepoints)
2351 (remote_upload_trace_state_variables): Refactor as methods of
2353 (_initialize_remote): Remove references to init_remote_ops and
2354 init_extended_remote_ops.
2356 * remote-sim.c (gdbsim_target): New class.
2357 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
2358 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
2359 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
2360 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
2361 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
2362 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
2363 Refactor as methods of gdbsim_target.
2364 (gdbsim_ops): Now a gdbsim_target.
2365 (init_gdbsim_ops): Delete.
2366 (gdbsim_cntrl_c): Adjust.
2367 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
2369 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
2370 (the_amd64_linux_nat_target): New.
2371 (amd64_linux_fetch_inferior_registers)
2372 (amd64_linux_store_inferior_registers): Refactor as methods of
2373 amd64_linux_nat_target.
2374 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
2375 * i386-linux-nat.c: Don't include "linux-nat.h".
2376 (i386_linux_nat_target): New class.
2377 (the_i386_linux_nat_target): New.
2378 (i386_linux_fetch_inferior_registers)
2379 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
2380 as methods of i386_linux_nat_target.
2381 (_initialize_i386_linux_nat): Adjust. Set linux_target.
2382 * inf-child.c (inf_child_ops): Delete.
2383 (inf_child_fetch_inferior_registers)
2384 (inf_child_store_inferior_registers): Delete.
2385 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
2386 methods of inf_child_target.
2387 (inf_child_target::supports_terminal_ours)
2388 (inf_child_target::terminal_init)
2389 (inf_child_target::terminal_inferior)
2390 (inf_child_target::terminal_ours_for_output)
2391 (inf_child_target::terminal_ours, inf_child_target::interrupt)
2392 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
2394 (inf_child_open, inf_child_disconnect, inf_child_close)
2395 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
2396 (inf_child_post_startup_inferior, inf_child_can_run)
2397 (inf_child_pid_to_exec_file): Refactor as methods of
2399 (inf_child_follow_fork): Delete.
2400 (inf_child_target::can_create_inferior)
2401 (inf_child_target::can_attach): New.
2402 (inf_child_target::has_all_memory, inf_child_target::has_memory)
2403 (inf_child_target::has_stack, inf_child_target::has_registers)
2404 (inf_child_target::has_execution): New.
2405 (inf_child_fileio_open, inf_child_fileio_pwrite)
2406 (inf_child_fileio_pread, inf_child_fileio_fstat)
2407 (inf_child_fileio_close, inf_child_fileio_unlink)
2408 (inf_child_fileio_readlink, inf_child_use_agent)
2409 (inf_child_can_use_agent): Refactor as methods of
2411 (return_zero, inf_child_target): Delete.
2412 (inf_child_target::inf_child_target): New.
2413 * inf-child.h: Include "target.h".
2414 (inf_child_target): Delete function prototype.
2415 (inf_child_target): New class.
2416 (inf_child_open_target, inf_child_mourn_inferior)
2417 (inf_child_maybe_unpush_target): Delete.
2418 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
2419 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
2420 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
2421 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
2422 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
2423 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
2424 (inf_ptrace_wait, inf_ptrace_xfer_partial)
2425 (inf_ptrace_thread_alive, inf_ptrace_files_info)
2426 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
2427 methods of inf_ptrace_target.
2428 (inf_ptrace_target): Delete function.
2429 * inf-ptrace.h: Include "inf-child.h".
2430 (inf_ptrace_target): Delete function declaration.
2431 (inf_ptrace_target): New class.
2432 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
2433 * linux-nat.c (linux_target): New.
2434 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
2435 (linux_nat_target::~linux_nat_target): New.
2436 (linux_child_post_attach, linux_child_post_startup_inferior)
2437 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
2438 (linux_child_remove_fork_catchpoint)
2439 (linux_child_insert_vfork_catchpoint)
2440 (linux_child_remove_vfork_catchpoint)
2441 (linux_child_insert_exec_catchpoint)
2442 (linux_child_remove_exec_catchpoint)
2443 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
2444 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
2445 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
2446 (linux_nat_stopped_data_address)
2447 (linux_nat_stopped_by_sw_breakpoint)
2448 (linux_nat_supports_stopped_by_sw_breakpoint)
2449 (linux_nat_stopped_by_hw_breakpoint)
2450 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
2451 (linux_nat_kill, linux_nat_mourn_inferior)
2452 (linux_nat_xfer_partial, linux_nat_thread_alive)
2453 (linux_nat_update_thread_list, linux_nat_pid_to_str)
2454 (linux_nat_thread_name, linux_child_pid_to_exec_file)
2455 (linux_child_static_tracepoint_markers_by_strid)
2456 (linux_nat_is_async_p, linux_nat_can_async_p)
2457 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
2458 (linux_nat_supports_multi_process)
2459 (linux_nat_supports_disable_randomization, linux_nat_async)
2460 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
2461 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
2462 (linux_nat_fileio_open, linux_nat_fileio_readlink)
2463 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
2464 methods of linux_nat_target.
2465 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
2466 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
2468 (check_stopped_by_watchpoint): Adjust.
2469 (linux_xfer_partial): Delete.
2470 (linux_target_install_ops, linux_target, linux_nat_add_target):
2472 (linux_nat_target::linux_nat_target): New.
2473 * linux-nat.h: Include "inf-ptrace.h".
2474 (linux_nat_target): New.
2475 (linux_target, linux_target_install_ops, linux_nat_add_target):
2476 Delete function declarations.
2477 (linux_target): Declare global.
2478 * linux-thread-db.c (thread_db_target): New.
2479 (thread_db_target::thread_db_target): New.
2480 (thread_db_ops): Delete.
2481 (the_thread_db_target): New.
2482 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
2483 (thread_db_update_thread_list, thread_db_pid_to_str)
2484 (thread_db_extra_thread_info)
2485 (thread_db_thread_handle_to_thread_info)
2486 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
2487 (thread_db_resume): Refactor as methods of thread_db_target.
2488 (init_thread_db_ops): Delete.
2489 (_initialize_thread_db): Remove reference to init_thread_db_ops.
2490 * x86-linux-nat.c: Don't include "linux-nat.h".
2491 (super_post_startup_inferior): Delete.
2492 (x86_linux_nat_target::~x86_linux_nat_target): New.
2493 (x86_linux_child_post_startup_inferior)
2494 (x86_linux_read_description, x86_linux_enable_btrace)
2495 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
2496 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
2497 methods of x86_linux_nat_target.
2498 (x86_linux_create_target): Delete. Bits folded ...
2499 (x86_linux_add_target): ... here. Now takes a linux_nat_target
2501 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
2502 (x86_linux_nat_target): New class.
2503 (x86_linux_create_target): Delete.
2504 (x86_linux_add_target): Now takes a linux_nat_target pointer.
2505 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
2506 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
2507 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
2508 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
2509 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
2511 (x86_use_watchpoints): Delete.
2512 * x86-nat.h: Include "breakpoint.h" and "target.h".
2513 (x86_use_watchpoints): Delete.
2514 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
2515 (x86_stopped_by_watchpoint, x86_stopped_data_address)
2516 (x86_insert_watchpoint, x86_remove_watchpoint)
2517 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
2518 (x86_stopped_by_hw_breakpoint): New declarations.
2519 (x86_nat_target): New template class.
2521 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
2522 (the_ppc_linux_nat_target): New.
2523 (ppc_linux_fetch_inferior_registers)
2524 (ppc_linux_can_use_hw_breakpoint)
2525 (ppc_linux_region_ok_for_hw_watchpoint)
2526 (ppc_linux_ranged_break_num_registers)
2527 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
2528 (ppc_linux_insert_mask_watchpoint)
2529 (ppc_linux_remove_mask_watchpoint)
2530 (ppc_linux_can_accel_watchpoint_condition)
2531 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
2532 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
2533 (ppc_linux_watchpoint_addr_within_range)
2534 (ppc_linux_masked_watch_num_registers)
2535 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
2536 (ppc_linux_read_description): Refactor as methods of
2537 ppc_linux_nat_target.
2538 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
2540 * procfs.c (procfs_xfer_partial): Delete forward declaration.
2541 (procfs_target): New class.
2542 (the_procfs_target): New.
2543 (procfs_target): Delete function.
2544 (procfs_auxv_parse, procfs_attach, procfs_detach)
2545 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
2546 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
2547 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
2548 (procfs_create_inferior, procfs_update_thread_list)
2549 (procfs_thread_alive, procfs_pid_to_str)
2550 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
2551 (procfs_stopped_data_address, procfs_insert_watchpoint)
2552 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
2553 (proc_find_memory_regions, procfs_info_proc)
2554 (procfs_make_note_section): Refactor as methods of procfs_target.
2555 (_initialize_procfs): Adjust.
2556 * sol-thread.c (sol_thread_target): New class.
2557 (sol_thread_ops): Now a sol_thread_target.
2558 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
2559 (sol_thread_fetch_registers, sol_thread_store_registers)
2560 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
2561 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
2562 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
2563 (init_sol_thread_ops): Delete.
2564 (_initialize_sol_thread): Adjust. Remove references to
2565 init_sol_thread_ops and complete_target_initialization.
2567 * windows-nat.c (windows_nat_target): New class.
2568 (windows_fetch_inferior_registers)
2569 (windows_store_inferior_registers, windows_resume, windows_wait)
2570 (windows_attach, windows_detach, windows_pid_to_exec_file)
2571 (windows_files_info, windows_create_inferior)
2572 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
2573 (windows_close, windows_pid_to_str, windows_xfer_partial)
2574 (windows_get_tib_address, windows_get_ada_task_ptid)
2575 (windows_thread_name, windows_thread_alive): Refactor as
2576 windows_nat_target methods.
2577 (do_initial_windows_stuff): Adjust.
2578 (windows_target): Delete function.
2579 (_initialize_windows_nat): Adjust.
2581 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
2582 (darwin_mourn_inferior, darwin_kill_inferior)
2583 (darwin_create_inferior, darwin_attach, darwin_detach)
2584 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
2585 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
2586 (darwin_supports_multi_process): Refactor as darwin_nat_target
2588 (darwin_resume_to, darwin_files_info): Delete.
2589 (_initialize_darwin_inferior): Rename to ...
2590 (_initialize_darwin_nat): ... this. Adjust to C++ification.
2591 * darwin-nat.h: Include "inf-child.h".
2592 (darwin_nat_target): New class.
2593 (darwin_complete_target): Delete.
2594 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
2595 (darwin_target): New.
2596 (i386_darwin_fetch_inferior_registers)
2597 (i386_darwin_store_inferior_registers): Refactor as methods of
2599 (darwin_complete_target): Delete, with ...
2600 (_initialize_i386_darwin_nat): ... bits factored out here.
2602 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
2603 (the_alpha_linux_nat_target): New.
2604 (alpha_linux_register_u_offset): Refactor as
2605 alpha_linux_nat_target method.
2606 (_initialize_alpha_linux_nat): Adjust.
2607 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
2608 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2609 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
2610 methods of linux_nat_trad_target.
2611 (linux_trad_target): Delete.
2612 * linux-nat-trad.h (linux_trad_target): Delete function.
2613 (linux_nat_trad_target): New class.
2614 * mips-linux-nat.c (mips_linux_nat_target): New class.
2615 (super_fetch_registers, super_store_registers, super_close):
2617 (the_mips_linux_nat_target): New.
2618 (mips64_linux_regsets_fetch_registers)
2619 (mips64_linux_regsets_store_registers)
2620 (mips64_linux_fetch_registers, mips64_linux_store_registers)
2621 (mips_linux_register_u_offset, mips_linux_read_description)
2622 (mips_linux_can_use_hw_breakpoint)
2623 (mips_linux_stopped_by_watchpoint)
2624 (mips_linux_stopped_data_address)
2625 (mips_linux_region_ok_for_hw_watchpoint)
2626 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
2627 (mips_linux_close): Refactor as methods of mips_linux_nat.
2628 (_initialize_mips_linux_nat): Adjust to C++ification.
2630 * aix-thread.c (aix_thread_target): New class.
2631 (aix_thread_ops): Now an aix_thread_target.
2632 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
2633 (aix_thread_fetch_registers, aix_thread_store_registers)
2634 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
2635 (aix_thread_thread_alive, aix_thread_pid_to_str)
2636 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
2637 Refactor as methods of aix_thread_target.
2638 (init_aix_thread_ops): Delete.
2639 (_initialize_aix_thread): Remove references to init_aix_thread_ops
2640 and complete_target_initialization.
2641 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
2642 (rs6000_nat_target): New class.
2643 (the_rs6000_nat_target): New.
2644 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
2645 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
2646 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
2647 (super_create_inferior): Delete.
2648 (_initialize_rs6000_nat): Adjust to C++ification.
2650 * arm-linux-nat.c (arm_linux_nat_target): New class.
2651 (the_arm_linux_nat_target): New.
2652 (arm_linux_fetch_inferior_registers)
2653 (arm_linux_store_inferior_registers, arm_linux_read_description)
2654 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
2655 (arm_linux_remove_hw_breakpoint)
2656 (arm_linux_region_ok_for_hw_watchpoint)
2657 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
2658 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
2659 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
2660 arm_linux_nat_target.
2661 (_initialize_arm_linux_nat): Adjust to C++ification.
2663 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
2664 (the_aarch64_linux_nat_target): New.
2665 (aarch64_linux_fetch_inferior_registers)
2666 (aarch64_linux_store_inferior_registers)
2667 (aarch64_linux_child_post_startup_inferior)
2668 (aarch64_linux_read_description)
2669 (aarch64_linux_can_use_hw_breakpoint)
2670 (aarch64_linux_insert_hw_breakpoint)
2671 (aarch64_linux_remove_hw_breakpoint)
2672 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
2673 (aarch64_linux_region_ok_for_hw_watchpoint)
2674 (aarch64_linux_stopped_data_address)
2675 (aarch64_linux_stopped_by_watchpoint)
2676 (aarch64_linux_watchpoint_addr_within_range)
2677 (aarch64_linux_can_do_single_step): Refactor as methods of
2678 aarch64_linux_nat_target.
2679 (super_post_startup_inferior): Delete.
2680 (_initialize_aarch64_linux_nat): Adjust to C++ification.
2682 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
2683 (the_hppa_linux_nat_target): New.
2684 (hppa_linux_fetch_inferior_registers)
2685 (hppa_linux_store_inferior_registers): Refactor as methods of
2686 hppa_linux_nat_target.
2687 (_initialize_hppa_linux_nat): Adjust to C++ification.
2689 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
2690 (the_ia64_linux_nat_target): New.
2691 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
2692 (ia64_linux_stopped_data_address)
2693 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
2694 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
2695 ia64_linux_nat_target methods.
2696 (super_xfer_partial): Delete.
2697 (_initialize_ia64_linux_nat): Adjust to C++ification.
2699 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
2700 (the_m32r_linux_nat_target): New.
2701 (m32r_linux_fetch_inferior_registers)
2702 (m32r_linux_store_inferior_registers): Refactor as
2703 m32r_linux_nat_target methods.
2704 (_initialize_m32r_linux_nat): Adjust to C++ification.
2706 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
2707 (the_m68k_linux_nat_target): New.
2708 (m68k_linux_fetch_inferior_registers)
2709 (m68k_linux_store_inferior_registers): Refactor as
2710 m68k_linux_nat_target methods.
2711 (_initialize_m68k_linux_nat): Adjust to C++ification.
2713 * s390-linux-nat.c (s390_linux_nat_target): New class.
2714 (the_s390_linux_nat_target): New.
2715 (s390_linux_fetch_inferior_registers)
2716 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
2717 (s390_insert_watchpoint, s390_remove_watchpoint)
2718 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
2719 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
2720 (s390_auxv_parse, s390_read_description): Refactor as methods of
2721 s390_linux_nat_target.
2722 (_initialize_s390_nat): Adjust to C++ification.
2724 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
2725 (the_sparc_linux_nat_target): New.
2726 (_initialize_sparc_linux_nat): Adjust to C++ification.
2727 * sparc-nat.c (sparc_fetch_inferior_registers)
2728 (sparc_store_inferior_registers): Remove target_ops parameter.
2729 * sparc-nat.h (sparc_fetch_inferior_registers)
2730 (sparc_store_inferior_registers): Remove target_ops parameter.
2731 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
2732 (the_sparc64_linux_nat_target): New.
2733 (_initialize_sparc64_linux_nat): Adjust to C++ification.
2735 * spu-linux-nat.c (spu_linux_nat_target): New class.
2736 (the_spu_linux_nat_target): New.
2737 (spu_child_post_startup_inferior, spu_child_post_attach)
2738 (spu_child_wait, spu_fetch_inferior_registers)
2739 (spu_store_inferior_registers, spu_xfer_partial)
2740 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
2742 (_initialize_spu_nat): Adjust to C++ification.
2744 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
2745 (the_tilegx_linux_nat_target): New.
2746 (fetch_inferior_registers, store_inferior_registers):
2747 Refactor as methods.
2748 (_initialize_tile_linux_nat): Adjust to C++ification.
2750 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
2751 (the_xtensa_linux_nat_target): New.
2752 (xtensa_linux_fetch_inferior_registers)
2753 (xtensa_linux_store_inferior_registers): Refactor as
2754 xtensa_linux_nat_target methods.
2755 (_initialize_xtensa_linux_nat): Adjust to C++ification.
2757 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
2758 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
2759 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
2760 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
2761 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
2762 (fbsd_stopped_by_sw_breakpoint)
2763 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
2764 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
2765 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
2766 (fbsd_post_startup_inferior, fbsd_post_attach)
2767 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
2768 (fbsd_set_syscall_catchpoint)
2769 (super_xfer_partial, super_resume, super_wait)
2770 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
2771 (fbsd_handle_debug_trap): Remove target_ops parameter.
2772 (fbsd_nat_add_target): Delete.
2773 * fbsd-nat.h: Include "inf-ptrace.h".
2774 (fbsd_nat_add_target): Delete.
2775 (USE_SIGTRAP_SIGINFO): Define.
2776 (fbsd_nat_target): New class.
2778 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
2779 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
2780 (amd64bsd_target): Delete.
2781 * amd64-bsd-nat.h: New file.
2782 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
2784 (amd64_fbsd_nat_target): New class.
2785 (the_amd64_fbsd_nat_target): New.
2786 (amd64fbsd_read_description): Refactor as method of
2787 amd64_fbsd_nat_target.
2788 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2789 (_initialize_amd64fbsd_nat): Adjust to C++ification.
2790 * amd64-nat.h (amd64bsd_target): Delete function declaration.
2791 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
2792 (i386bsd_store_inferior_registers): Remove target_ops parameter.
2793 (i386bsd_target): Delete.
2794 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
2795 (i386bsd_fetch_inferior_registers)
2796 (i386bsd_store_inferior_registers): Declare.
2797 (i386_bsd_nat_target): New class.
2798 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
2799 (the_i386_fbsd_nat_target): New.
2800 (i386fbsd_resume, i386fbsd_read_description): Refactor as
2801 i386_fbsd_nat_target methods.
2802 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2803 (_initialize_i386fbsd_nat): Adjust to C++ification.
2804 * x86-bsd-nat.c (super_mourn_inferior): Delete.
2805 (x86bsd_mourn_inferior, x86bsd_target): Delete.
2806 (_initialize_x86_bsd_nat): Adjust to C++ification.
2807 * x86-bsd-nat.h: Include "x86-nat.h".
2808 (x86bsd_target): Delete declaration.
2809 (x86bsd_nat_target): New class.
2811 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
2812 (the_aarch64_fbsd_nat_target): New.
2813 (aarch64_fbsd_fetch_inferior_registers)
2814 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
2815 aarch64_fbsd_nat_target.
2816 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
2817 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
2818 (the_alpha_bsd_nat_target): New.
2819 (alphabsd_fetch_inferior_registers)
2820 (alphabsd_store_inferior_registers): Refactor as
2821 alpha_bsd_nat_target methods.
2822 (_initialize_alphabsd_nat): Refactor as methods of
2823 alpha_bsd_nat_target.
2824 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
2825 (the_amd64_nbsd_nat_target): New.
2826 (_initialize_amd64nbsd_nat): Adjust to C++ification.
2827 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
2828 (the_amd64_obsd_nat_target): New.
2829 (_initialize_amd64obsd_nat): Adjust to C++ification.
2830 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
2831 (the_arm_fbsd_nat_target): New.
2832 (arm_fbsd_fetch_inferior_registers)
2833 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
2834 (_initialize_arm_fbsd_nat): Refactor as methods of
2835 arm_fbsd_nat_target.
2836 (_initialize_arm_fbsd_nat): Adjust to C++ification.
2837 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
2838 (the_arm_netbsd_nat_target): New.
2839 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
2840 arm_netbsd_nat_target.
2841 (_initialize_arm_netbsd_nat): Adjust to C++ification.
2842 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
2843 (the_hppa_nbsd_nat_target): New.
2844 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
2845 hppa_nbsd_nat_target methods.
2846 (_initialize_hppanbsd_nat): Adjust to C++ification.
2847 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
2848 (the_hppa_obsd_nat_target): New.
2849 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
2850 methods of hppa_obsd_nat_target.
2851 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
2853 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
2854 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
2856 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
2857 (_initialize_i386obsd_nat): Use add_target.
2858 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
2859 (the_m68k_bsd_nat_target): New.
2860 (m68kbsd_fetch_inferior_registers)
2861 (m68kbsd_store_inferior_registers): Refactor as methods of
2862 m68k_bsd_nat_target.
2863 (_initialize_m68kbsd_nat): Adjust to C++ification.
2864 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
2865 (the_mips_fbsd_nat_target): New.
2866 (mips_fbsd_fetch_inferior_registers)
2867 (mips_fbsd_store_inferior_registers): Refactor as methods of
2868 mips_fbsd_nat_target.
2869 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
2871 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
2872 (the_mips_nbsd_nat_target): New.
2873 (mipsnbsd_fetch_inferior_registers)
2874 (mipsnbsd_store_inferior_registers): Refactor as methods of
2875 mips_nbsd_nat_target.
2876 (_initialize_mipsnbsd_nat): Adjust to C++ification.
2877 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
2878 (the_mips64_obsd_nat_target): New.
2879 (mips64obsd_fetch_inferior_registers)
2880 (mips64obsd_store_inferior_registers): Refactor as methods of
2881 mips64_obsd_nat_target.
2882 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
2884 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
2886 * nbsd-nat.h: Include "inf-ptrace.h".
2887 (nbsd_nat_target): New class.
2888 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
2889 (obsd_wait): Refactor as methods of obsd_nat_target.
2890 (obsd_add_target): Delete.
2891 * obsd-nat.h: Include "inf-ptrace.h".
2892 (obsd_nat_target): New class.
2893 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
2894 (the_ppc_fbsd_nat_target): New.
2895 (ppcfbsd_fetch_inferior_registers)
2896 (ppcfbsd_store_inferior_registers): Refactor as methods of
2897 ppc_fbsd_nat_target.
2898 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
2900 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
2901 (the_ppc_nbsd_nat_target): New.
2902 (ppcnbsd_fetch_inferior_registers)
2903 (ppcnbsd_store_inferior_registers): Refactor as methods of
2904 ppc_nbsd_nat_target.
2905 (_initialize_ppcnbsd_nat): Adjust to C++ification.
2906 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
2907 (the_ppc_obsd_nat_target): New.
2908 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
2909 methods of ppc_obsd_nat_target.
2910 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
2912 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
2913 (the_sh_nbsd_nat_target): New.
2914 (shnbsd_fetch_inferior_registers)
2915 (shnbsd_store_inferior_registers): Refactor as methods of
2917 (_initialize_shnbsd_nat): Adjust to C++ification.
2918 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
2919 (inf_ptrace_xfer_partial): Delete.
2920 (sparc_xfer_partial, sparc_target): Delete.
2921 * sparc-nat.h (sparc_fetch_inferior_registers)
2922 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
2923 (sparc_target): Delete function declaration.
2924 (sparc_target): New template class.
2925 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
2926 (_initialize_sparcnbsd_nat): Adjust to C++ification.
2927 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
2928 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
2930 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
2931 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
2932 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
2933 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
2935 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
2936 (the_vax_bsd_nat_target): New.
2937 (vaxbsd_fetch_inferior_registers)
2938 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
2940 (_initialize_vaxbsd_nat): Adjust to C++ification.
2942 * bsd-kvm.c (bsd_kvm_target): New class.
2943 (bsd_kvm_ops): Now a bsd_kvm_target.
2944 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
2945 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
2946 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
2948 (bsd_kvm_return_one): Delete.
2949 (bsd_kvm_add_target): Adjust to C++ification.
2951 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
2952 (nto_procfs_target_procfs): New classes.
2953 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
2954 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
2955 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
2956 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
2957 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
2958 (procfs_remove_hw_breakpoint, procfs_resume)
2959 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
2960 (procfs_kill_inferior, procfs_store_registers)
2961 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
2962 as methods of nto_procfs_target.
2963 (nto_procfs_ops): Now an nto_procfs_target_procfs.
2964 (nto_native_ops): Delete.
2965 (procfs_open, procfs_native_open): Delete.
2966 (nto_native_ops): Now an nto_procfs_target_native.
2967 (init_procfs_targets): Adjust to C++ification.
2968 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
2969 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
2970 Refactor as methods of nto_procfs_target.
2972 * go32-nat.c (go32_nat_target): New class.
2973 (the_go32_nat_target): New.
2974 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
2975 (go32_store_registers, go32_xfer_partial, go32_files_info)
2976 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
2977 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
2978 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
2979 (go32_pid_to_str): Refactor as methods of go32_nat_target.
2980 (go32_target): Delete.
2981 (_initialize_go32_nat): Adjust to C++ification.
2983 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
2984 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
2985 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
2986 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
2988 (gnu_target): Delete.
2989 * gnu-nat.h (gnu_target): Delete.
2990 (gnu_nat_target): New class.
2991 * i386-gnu-nat.c (gnu_base_target): New.
2992 (i386_gnu_nat_target): New class.
2993 (the_i386_gnu_nat_target): New.
2994 (_initialize_i386gnu_nat): Adjust to C++ification.
2996 2018-05-02 Pedro Alves <palves@redhat.com>
2998 * bfd-target.c (target_bfd_xclose): Rename to ...
2999 (target_bfd_close): ... this.
3000 (target_bfd_reopen): Adjust.
3001 * target.c (target_close): Remove references to to_xclose.
3002 * target.h (target_ops::to_xclose): Delete.
3003 (target_ops::to_close): Update comments.
3005 2018-05-02 Pedro Alves <palves@redhat.com>
3007 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3009 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3010 * inf-ptrace.c (inf_ptrace_register_u_offset)
3011 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3012 (inf_ptrace_store_register, inf_ptrace_store_registers)
3013 (inf_ptrace_trad_target): Move to ...
3014 * linux-nat-trad.c: ... this new file.
3015 * linux-nat-trad.h: New file.
3016 * linux-nat.c (linux_target_install_ops): Make extern.
3017 (linux_trad_target): Delete.
3018 * linux-nat.h (linux_trad_target): Delete declaration.
3019 (linux_target_install_ops): Declare.
3020 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3023 2018-05-02 Pedro Alves <palves@redhat.com>
3025 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3026 procfs_target/add_target here.
3027 * procfs.c (procfs_target): Make static.
3028 (_initialize_procfs): Call add_target here.
3029 * procfs.h (struct target_ops): Remove forward declaration.
3030 (procfs_target): Remove declaration.
3031 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3033 2018-05-02 Pedro Alves <palves@redhat.com>
3035 * procfs.c (procfs_stopped_by_watchpoint)
3036 (procfs_insert_watchpoint, procfs_remove_watchpoint)
3037 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3039 (procfs_use_watchpoints): Delete, move contents...
3040 (procfs_target): ... here.
3041 * procfs.h (procfs_use_watchpoints): Delete declaration.
3042 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3043 procfs_use_watchpoints.
3044 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3045 procfs_use_watchpoints.
3047 2018-05-02 Tom Tromey <tom@tromey.com>
3050 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3051 and var_zuinteger_unlimited.
3052 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3053 and PARAM_ZUINTEGER_UNLIMITED.
3054 (set_parameter_value): Handle var_zuinteger and
3055 var_zuinteger_unlimited.
3056 (add_setshow_generic): Likewise.
3057 (parmpy_init): Likewise.
3059 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
3062 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3063 pointer is not null before dereferencing it.
3065 2018-04-30 Tom Tromey <tom@tromey.com>
3067 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3070 2018-04-30 Tom Tromey <tom@tromey.com>
3072 * breakpoint.c (mention): Remove use of is_mi_like_p.
3073 (print_mention_ranged_breakpoint): Likewise.
3074 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3077 2018-04-30 Tom Tromey <tom@tromey.com>
3079 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3081 2018-04-30 Tom Tromey <tom@tromey.com>
3083 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3084 (info_spu_event_command): Remove some uses of is_mi_like_p.
3086 2018-04-30 Tom Tromey <tom@tromey.com>
3088 * python/py-framefilter.c (py_print_single_arg)
3089 (enumerate_locals, py_print_args, py_print_frame): Remove some
3090 uses of is_mi_like_p.
3092 2018-04-30 Tom Tromey <tom@tromey.com>
3095 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3096 * ui-out.h (ui_out::is_mi_like_p): Now const.
3097 (ui_out::do_is_mi_like_p): Now const.
3098 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3100 2018-04-30 Tom Tromey <tom@tromey.com>
3102 * varobj.c (varobj_set_visualizer): Use new_reference.
3103 * python/python.c (gdbpy_decode_line): Use new_reference.
3104 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3107 2018-04-30 Tom Tromey <tom@tromey.com>
3109 * varobj.c (install_new_value): Use new_reference.
3110 * value.h (value_incref): Return void. Swap intro comment with
3112 * value.c (set_value_parent): Use new_reference.
3113 (value_incref): Return void. Update intro comment.
3114 (release_value): Use new_reference.
3115 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3117 2018-04-30 Tom Tromey <tom@tromey.com>
3119 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3120 * gdb_bfd.h (new_bfd_ref): Remove.
3121 (gdb_bfd_open): Update comment.
3122 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3123 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3124 (gdb_bfd_fdopenr): Use new_reference.
3125 * exec.c (exec_file_attach): Use new_reference.
3127 2018-04-30 Tom Tromey <tom@tromey.com>
3129 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3132 2018-04-30 Tom Tromey <tom@tromey.com>
3134 * jit.c (jit_read_code_entry): Use type_align.
3135 * i386-tdep.c (i386_gdbarch_init): Don't call
3136 set_gdbarch_long_long_align_bit.
3137 * gdbarch.sh: Remove long_long_align_bit.
3138 * gdbarch.c, gdbarch.h: Rebuild.
3139 * arc-tdep.c (arc_type_align): New function.
3140 (arc_gdbarch_init): Use arc_type_align. Don't call
3141 set_gdbarch_long_long_align_bit.
3143 2018-04-30 Tom Tromey <tom@tromey.com>
3145 * rust-lang.c (rust_type_alignment): Remove.
3146 (rust_composite_type): Use type_align.
3148 2018-04-30 Tom Tromey <tom@tromey.com>
3150 * NEWS: Mention Type.align.
3151 * python/py-type.c (typy_get_alignof): New function.
3152 (type_object_getset): Add "alignof".
3154 2018-04-30 Tom Tromey <tom@tromey.com>
3158 * std-operator.def (UNOP_ALIGNOF): New operator.
3159 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3161 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3162 * c-lang.c (c_op_print_tab): Add alignof.
3163 * c-exp.y (ALIGNOF): New token.
3164 (exp): Add "ALIGNOF" production.
3165 (ident_tokens): Add _Alignof and alignof.
3167 2018-04-30 Tom Tromey <tom@tromey.com>
3169 * i386-tdep.c (i386_type_align): New function.
3170 (i386_gdbarch_init): Update.
3171 * gdbarch.sh (type_align): New method.
3172 * gdbarch.c, gdbarch.h: Rebuild.
3173 * arch-utils.h (default_type_align): Declare.
3174 * arch-utils.c (default_type_align): New function.
3175 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
3176 (struct type) <align_log2>: New field.
3177 <instance_flags>: Now a bitfield.
3178 (TYPE_RAW_ALIGN): New macro.
3179 (type_align, type_raw_align, set_type_align): Declare.
3180 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
3182 * dwarf2read.c (quirk_rust_enum): Set type alignment.
3183 (get_alignment, maybe_set_alignment): New functions.
3184 (read_structure_type, read_enumeration_type, read_array_type)
3185 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
3186 (read_subrange_type, read_base_type): Set type alignment.
3188 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
3190 * dwarf2read.c (read_index_from_section): Use bool.
3192 2018-04-29 Fabian Groffen <grobian@gentoo.org>
3195 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
3198 2018-04-29 John Reiser <jreiser@BitWagon.com>
3201 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
3202 last step, and do it atomically.
3204 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
3206 * compile/compile-c-types.c (convert_int, convert_float):
3209 2018-04-27 Tom Tromey <tom@tromey.com>
3212 * rust-lang.c (rust_inclusive_range_type_p): New function.
3213 (rust_range): Handle inclusive ranges.
3214 (rust_compute_range): Likewise.
3215 * rust-exp.y (struct rust_op) <inclusive>: New field.
3216 (DOTDOTEQ): New constant.
3217 (range_expr): Add "..=" productions.
3218 (operator_tokens): Add "..=" token.
3219 (ast_range): Add "inclusive" parameter.
3220 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
3222 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
3224 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
3225 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
3227 * expprint.c (print_subexp_standard): Handle new bounds values.
3228 (dump_subexp_body_standard): Likewise.
3230 2018-04-27 Tom Tromey <tom@tromey.com>
3232 * configure: Rebuild.
3233 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
3234 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
3236 (class symbol_needs_eval_context): Likewise.
3237 * dwarf2read.c (mock_mapped_index::symbol_name_count)
3238 (mock_mapped_index::symbol_name_at): Use "override". Remove
3240 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
3242 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
3243 * aarch64-tdep.c (instruction_reader::read): Use "override".
3244 (instruction_reader_test::read): Likewise.
3245 * arm-tdep.c (instruction_reader::read): Use "override".
3246 (instruction_reader_thumb::read): Likewise.
3248 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
3251 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
3252 instead of remote_send.
3253 (remote_send): Remove.
3255 2018-04-26 Pedro Alves <palves@redhat.com>
3257 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
3258 find_function_start_sal instead of find_pc_line.
3260 2018-04-26 Pedro Alves <palves@redhat.com>
3262 * breakpoint.c (set_breakpoint_location_function): Handle
3264 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
3265 * elfread.c (elf_symtab_read): Give data symbols with
3266 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
3267 (elf_rel_plt_read): Update comment.
3268 * linespec.c (convert_linespec_to_sals): Handle
3270 (minsym_found): Handle mst_data_gnu_ifunc.
3271 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
3272 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
3273 * parse.c (find_minsym_type_and_address): Handle
3275 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
3276 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
3277 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
3279 <mst_data_gnu_ifunc>: New enumerator.
3281 2018-04-26 Pedro Alves <palves@redhat.com>
3283 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
3284 (lookup_minimal_symbol_by_pc_section): ... this. Replace
3285 'want_trampoline' parameter by a lookup_msym_prefer parameter.
3287 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
3288 (lookup_minimal_symbol_by_pc): Adjust.
3289 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
3290 (lookup_solib_trampoline_symbol_by_pc): Adjust.
3291 * minsyms.h (lookup_msym_prefer): New enum.
3292 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3293 parameter by a lookup_msym_prefer parameter.
3295 2018-04-26 Pedro Alves <palves@redhat.com>
3297 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
3298 ends in "@plt" instead of looking at the symbol's section.
3300 2018-04-26 Pedro Alves <palves@redhat.com>
3302 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
3304 (find_pc_partial_function_gnu_ifunc): Rename to ...
3305 (find_pc_partial_function): ... this, and remove references to
3307 (find_pc_partial_function): Delete old implementation.
3308 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
3310 2018-04-26 Pedro Alves <palves@redhat.com>
3312 * linespec.c (struct bound_minimal_symbol_search_key): New.
3313 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
3314 skip first line if we found a GNU ifunc minimal symbol by name.
3315 (compare_msymbols): Change parameters to work with a destructured
3317 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
3320 2018-04-26 Pedro Alves <palves@redhat.com>
3322 * breakpoint.c (set_breakpoint_location_function): Don't resolve
3323 ifunc targets here. Instead, if we have an ifunc minsym, use its
3325 (add_location_to_breakpoint): Store the minsym and the objfile in
3326 the breakpoint location.
3327 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
3328 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
3329 Record the minsym in the sal.
3330 * symtab.h (symtab_and_line) <msymbol>: New field.
3332 2018-04-26 Pedro Alves <palves@redhat.com>
3334 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
3335 unless we actually resolved the ifunc.
3337 2018-04-26 Pedro Alves <palves@redhat.com>
3339 * c-exp.y (variable production): Prefer ifunc minsyms over
3340 regular function symbols.
3341 * symtab.c (find_gnu_ifunc): New function.
3342 * minsyms.h (lookup_msym_prefer): New enum.
3343 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
3344 parameter by a lookup_msym_prefer parameter.
3345 * symtab.h (find_gnu_ifunc): New declaration.
3347 2018-04-26 Pedro Alves <palves@redhat.com>
3349 * blockframe.c (find_gnu_ifunc_target_type): New function.
3350 (find_function_type): New.
3351 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
3352 return a value with a memory address.
3353 (eval_call): For calls to GNU ifunc functions, try to find the
3354 type of the target function from the type that the resolver
3356 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
3358 * infcall.c (find_function_return_type): Delete.
3359 (find_function_addr): Add 'function_type' parameter. For calls to
3360 GNU ifunc functions, try to find the type of the target function
3361 from the type that the resolver returns, and return it via
3363 (call_function_by_hand_dummy): Adjust to use the function type
3364 returned by find_function_addr.
3365 (find_function_addr): Add 'function_type' parameter and move
3367 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
3370 2018-04-26 Pedro Alves <palves@redhat.com>
3372 * c-exp.y (variable production): Skip finding an alias for ifunc
3375 2018-04-26 Pedro Alves <palves@redhat.com>
3377 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
3379 2018-04-25 Pedro Alves <palves@redhat.com>
3381 * infcmd.c (kill_command): Print the pid as string, not the whole
3382 thread's ptid. Add comment. s/has been killed/killed/ in output
3384 * remote.c (remote_detach_1): Print the pid as string, not the
3385 whole thread's ptid.
3387 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3388 Sergio Durigan Junior <sergiodj@redhat.com>
3389 Pedro Alves <palves@redhat.com>
3391 * infcmd.c (kill_command): Print message when inferior has
3393 * inferior.c (print_inferior_events): Remove 'static'. Set as
3395 (add_inferior): Improve message printed when
3396 'print_inferior_events' is on.
3397 (exit_inferior): Remove message printed when
3398 'print_inferior_events' is on.
3399 (detach_inferior): Improve message printed when
3400 'print_inferior_events' is on.
3401 (initialize_inferiors): Use 'add_inferior_silent' to set
3402 'current_inferior_'.
3403 * inferior.h (print_inferior_events): Declare here as
3405 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
3406 '[Detaching...]' messages when 'print_inferior_events' is on.
3407 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
3408 as prefix/suffix for messages. Remove periods. Fix erroneous
3409 'Detaching after fork from child...', replace it by '... from
3411 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
3412 prefix/suffix when printing 'Detaching...' messages. Print
3413 them when 'print_inferior_events' is on.
3414 * remote.c (remote_detach_1): Print message when detaching
3415 from inferior and '!is_fork_parent'.
3417 2018-04-24 Tom Tromey <tom@tromey.com>
3419 * cli-out.h: Reindent.
3421 2018-04-24 Tom Tromey <tom@tromey.com>
3423 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
3424 (cli_ui_out::do_field_string): Use fputs_filtered.
3425 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
3427 2018-04-23 Tom Tromey <tom@tromey.com>
3429 * guile/scm-frame.c (gdbscm_frame_read_var): Use
3430 gdb::unique_xmalloc_ptr.
3432 2018-04-23 Tom Tromey <tom@tromey.com>
3434 * configure: Rebuild.
3436 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
3439 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
3440 prepare_for_testing. Set normal_bp to r_debug_state if target
3443 2018-04-21 Pedro Alves <palves@redhat.com>
3444 Rajendra SY <rajendra.sy@gmail.com>
3446 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
3447 * remote.c (extended_remote_attach): In all-stop mode, mark the
3448 thread as executing.
3450 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3452 * thread.c (thread_apply_all_command): Fix comment.
3453 (thread_command): Fix comment.
3455 2018-04-10 Alan Hayward <alan.hayward@arm.com>
3457 * common/tdesc.h (tdesc_create_feature): Remove xml filename
3459 * features/aarch64-core.c (create_feature_aarch64_core):
3461 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
3463 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
3465 * features/i386/32bit-avx512.c
3466 (create_feature_i386_32bit_avx512): Likewise.
3467 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
3469 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
3471 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
3473 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
3475 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
3477 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
3479 * features/i386/64bit-avx512.c
3480 (create_feature_i386_64bit_avx512): Likewise.
3481 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
3483 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
3485 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
3487 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
3489 * features/i386/64bit-segments.c
3490 (create_feature_i386_64bit_segments): Likewise.
3491 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
3493 * features/i386/x32-core.c
3494 (create_feature_i386_x32_core): Likewise.
3495 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
3496 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
3497 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
3498 * target-descriptions.c: In generated code, don't pass xml
3501 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3503 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
3504 (print_xml_feature::visit_post): Likewise.
3505 (print_xml_feature::visit): Likewise.
3506 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
3507 (print_xml_feature): Add new class.
3508 * regformats/regdat.sh: Null xmltarget on feature targets.
3509 * target-descriptions.c (struct target_desc): Add xmltarget.
3510 (maintenance_check_tdesc_xml_convert): Add unittest function.
3511 (tdesc_get_features_xml): Add function to get xml.
3512 (maintenance_check_xml_descriptions): Test xml generation.
3513 * xml-tdesc.c (string_read_description_xml): Add function.
3514 * xml-tdesc.h (string_read_description_xml): Add declaration.
3516 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3518 * features/Makefile: Add feature marker to targets with new style
3519 target descriptions.
3520 * regformats/aarch64.dat: Regenerate.
3521 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
3522 * regformats/i386/amd64-avx-linux.dat: Likewise.
3523 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
3524 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
3525 * regformats/i386/amd64-linux.dat: Likewise.
3526 * regformats/i386/amd64-mpx-linux.dat: Likewise.
3527 * regformats/i386/amd64.dat: Likewise.
3528 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
3529 * regformats/i386/i386-avx-linux.dat: Likewise.
3530 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
3531 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
3532 * regformats/i386/i386-linux.dat: Likewise.
3533 * regformats/i386/i386-mmx-linux.dat: Likewise.
3534 * regformats/i386/i386-mpx-linux.dat: Likewise.
3535 * regformats/i386/i386.dat: Likewise.
3536 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
3537 * regformats/i386/x32-avx-linux.dat: Likewise.
3538 * regformats/i386/x32-linux.dat: Likewise.
3539 * regformats/tic6x-c62x-linux.dat: Likewise.
3540 * regformats/tic6x-c64x-linux.dat: Likewise.
3541 * regformats/tic6x-c64xp-linux.dat: Likewise.
3542 * regformats/regdat.sh: Parse feature marker.
3544 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3546 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
3547 (tdesc_osabi_name): Likewise.
3548 * target-descriptions.c (tdesc_architecture_name): Add new
3550 (tdesc_osabi_name): Likewise.
3552 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3554 * common/tdesc.c (tdesc_predefined_type): Move to here.
3555 (tdesc_named_type): Likewise.
3556 (tdesc_create_vector): Likewise.
3557 (tdesc_create_struct): Likewise.
3558 (tdesc_set_struct_size): Likewise.
3559 (tdesc_create_union): Likewise.
3560 (tdesc_create_flags): Likewise.
3561 (tdesc_create_enum): Likewise.
3562 (tdesc_add_field): Likewise.
3563 (tdesc_add_typed_bitfield): Likewise.
3564 (tdesc_add_bitfield): Likewise.
3565 (tdesc_add_flag): Likewise.
3566 (tdesc_add_enum_value): Likewise.
3567 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
3568 (struct tdesc_type_vector): Likewise.
3569 (struct tdesc_type_field): Likewise.
3570 (struct tdesc_type_with_fields): Likewise.
3571 (tdesc_create_enum): Add declaration.
3572 (tdesc_add_typed_bitfield): Likewise.
3573 (tdesc_add_enum_value): Likewise.
3574 * target-descriptions.c (tdesc_type_field): Move from here.
3575 (tdesc_type_builtin): Likewise.
3576 (tdesc_type_vector): Likewise.
3577 (tdesc_type_with_fields): Likewise.
3578 (tdesc_predefined_types): Likewise.
3579 (tdesc_named_type): Likewise.
3580 (tdesc_create_vector): Likewise.
3581 (tdesc_create_struct): Likewise.
3582 (tdesc_set_struct_size): Likewise.
3583 (tdesc_create_union): Likewise.
3584 (tdesc_create_flags): Likewise.
3585 (tdesc_create_enum): Likewise.
3586 (tdesc_add_field): Likewise.
3587 (tdesc_add_typed_bitfield): Likewise.
3588 (tdesc_add_bitfield): Likewise.
3589 (tdesc_add_flag): Likewise.
3590 (tdesc_add_enum_value): Likewise.
3591 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
3592 (tdesc_add_typed_bitfield): Likewise.
3593 (tdesc_add_enum_value): Likewise.
3595 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3597 * common/tdesc.c (tdesc_feature::accept): Move to here.
3598 (tdesc_feature::operator==): Likewise.
3599 (tdesc_create_reg): Likewise.
3600 * common/tdesc.h (tdesc_type_kind): Likewise.
3601 (struct tdesc_type): Likewise.
3602 (struct tdesc_feature): Likewise.
3603 * regformats/regdat.sh: Create a feature.
3604 * target-descriptions.c (tdesc_type_kind): Move from here.
3605 (tdesc_type): Likewise.
3606 (tdesc_type_up): Likewise.
3607 (tdesc_feature): Likewise.
3608 (tdesc_create_reg): Likewise.
3610 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3612 * Makefile.in: Add arch/tdesc.c
3613 * common/tdesc.c: New file.
3614 * common/tdesc.h (tdesc_element_visitor): Move to here.
3615 (tdesc_element): Likewise.
3616 (tdesc_reg): Likewise.
3617 (tdesc_reg_up): Likewise.
3618 * regformats/regdef.h (reg): Add offset to constructors.
3619 * target-descriptions.c (tdesc_element_visitor): Move from here.
3620 (tdesc_element): Likewise.
3621 (tdesc_reg): Likewise.
3622 (tdesc_reg_up): Likewise.
3624 2018-04-17 Tom Tromey <tom@tromey.com>
3626 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
3629 2018-04-17 Tom Tromey <tom@tromey.com>
3631 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
3633 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
3635 * symtab.c (print_symbol_info): Skip printing filename and line
3636 number when `last' is NULL.
3637 (symtab_symbol_info): Use empty string instead of NULL for first
3638 invocation of print_symbol_info.
3639 (rbreak_command): Pass NULL to `last' parameter of
3642 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
3644 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
3647 2018-04-16 Pedro Alves <palves@redhat.com>
3649 * MAINTAINERS (sh): Remove.
3650 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
3651 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
3652 (ALLDEPFILES): Remove sh64-tdep.c.
3653 * NEWS: Mentions that support for SH-5/SH64 is removed.
3654 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
3655 (sh*-*-openbsd*): Ditto.
3656 (sh64-*-elf*): Remove.
3658 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
3659 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
3660 * sh-tdep.c: No longer include "sh64-tdep.h".
3661 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
3662 * sh64-tdep.c, sh64-tdep.h: Remove files.
3664 2018-04-16 Pedro Alves <palves@redhat.com>
3666 * MAINTAINERS: Remove m88k.
3667 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
3668 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
3669 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
3670 * NEWS: Mention that support for m88k was removed.
3671 * configure.host (m88*-*-*): Remove support.
3672 * configure.nat (m88k-*-*): Remove support.
3673 * configure.tgt (m88*-*-openbsd*): Remove.
3674 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
3676 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
3678 * configure.tgt (x86_tobjs): New variable.
3679 (amd64_tobjs, i386_tobjs): Use it.
3681 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3683 * symtab.c (print_symbol_info): Precede the symbol definition by
3684 the line number when available.
3685 * NEWS: Advertise this enhancement.
3687 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3689 * NEWS (New options): announce set/show record btrace cpu.
3690 * btrace.c: Include record-btrace.h.
3691 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
3692 the vendor is unknown.
3693 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
3694 Maybe overwrite the btrace configuration's cpu.
3695 (btrace_compute_ftrace): Add cpu parameter. Update callers.
3696 (btrace_fetch): Add cpu parameter. Update callers.
3697 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
3698 Maybe overwrite the btrace configuration's cpu. Skip enabling
3699 errata workarounds if the vendor is unknown.
3700 * python/py-record-btrace.c: Include record-btrace.h.
3701 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
3702 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
3703 * record-btrace.c (record_btrace_cpu_state_kind): New.
3704 (record_btrace_cpu): New.
3705 (set_record_btrace_cpu_cmdlist): New.
3706 (record_btrace_get_cpu): New.
3707 (require_btrace_thread, record_btrace_info)
3708 (record_btrace_resume_thread): Call record_btrace_get_cpu.
3709 (cmd_set_record_btrace_cpu_none): New.
3710 (cmd_set_record_btrace_cpu_auto): New.
3711 (cmd_set_record_btrace_cpu): New.
3712 (cmd_show_record_btrace_cpu): New.
3713 (_initialize_record_btrace): Initialize set/show record btrace cpu
3715 * record-btrace.h (record_btrace_get_cpu): New.
3717 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3719 * record.c (set_record_command): Fix typo in message.
3721 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3723 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
3725 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3727 * infrun.c (process_event_stop_test): Call
3728 gdbarch_in_indirect_branch_thunk.
3729 * gdbarch.sh (in_indirect_branch_thunk): New.
3730 * gdbarch.c: Regenerated.
3731 * gdbarch.h: Regenerated.
3734 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
3735 (HFILES_NO_SRCDIR): Add x86-tdep.h.
3736 (ALLDEPFILES): Add x86-tdep.c.
3737 * arch-utils.h (default_in_indirect_branch_thunk): New.
3738 * arch-utils.c (default_in_indirect_branch_thunk): New.
3739 * i386-tdep: Include x86-tdep.h.
3740 (i386_in_indirect_branch_thunk): New.
3741 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
3743 * amd64-tdep: Include x86-tdep.h.
3744 (amd64_in_indirect_branch_thunk): New.
3745 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
3747 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3750 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
3751 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
3752 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
3755 2018-04-12 Tom Tromey <tom@tromey.com>
3757 * rust-lang.c (rust_print_struct_def): Remove univariant code.
3758 (rust_evaluate_subexp): Likewise.
3760 2018-04-12 Pedro Alves <palves@redhat.com>
3762 * procfs.c (procfs_detach): Make forward declaration's prototype
3763 match definition's protototype.
3764 (proc_get_LDT_entry): Remove stale do_cleanups call.
3766 2018-04-12 Pedro Alves <palves@redhat.com>
3768 * target.h (target_ops::to_has_exited): Delete.
3769 (target_has_exited): Delete.
3770 * target-delegates.c: Regenerate.
3772 2018-04-11 Pedro Alves <palves@redhat.com>
3774 * target.c (fileio_fh_t::t): Add comment.
3775 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3776 (target_fileio_close): Handle a NULL target.
3777 (invalidate_fileio_fh): New.
3778 (target_close): Call it.
3779 * remote.c (remote_hostio_send_command): No longer check whether
3780 remote_desc is open.
3782 2018-04-11 Pedro Alves <palves@redhat.com>
3784 * target.c (fileio_fh_t): Make it a named struct instead of a
3786 (fileio_fh_t::is_closed): New method.
3787 (DEF_VEC_O (fileio_fh_t)): Remove.
3788 (fileio_fhandles): Now a std::vector.
3789 (is_closed_fileio_fh): Delete.
3790 (acquire_fileio_fd): Adjust. Rename parameters.
3791 (release_fileio_fd): Adjust.
3792 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
3793 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3794 (target_fileio_close): Adjust.
3796 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
3798 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
3801 2018-04-10 Pedro Alves <palves@redhat.com>
3803 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
3804 (scoped_finish_thread_state): New class.
3805 * infcmd.c (run_command_1): Use it instead of finish_thread_state
3807 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
3808 (fetch_inferior_event, normal_stop): Likewise.
3809 * thread.c (finish_thread_state_cleanup): Delete.
3811 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3812 Pedro Alves <palves@redhat.com>
3814 * value.c: Include "selftest.h" and "common/array-view.h".
3815 (struct range) <operator ==>: New.
3816 (test_ranges_contain): New.
3817 (check_ranges_vector): New.
3818 (test_insert_into_bit_range_vector): New.
3819 (_initialize_values): Register selftests.
3820 * common/array-view.h (operator==, operator!=): New.
3822 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3824 * common/gdb_vecs.h (unordered_remove): Add overload that takes
3826 * inline-frame.c: Include <algorithm>.
3827 (struct inline_state): Add constructor.
3828 (inline_state_s): Remove.
3829 (DEF_VEC_O(inline_state_s)): Remove.
3830 (inline_states): Change type to std::vector.
3831 (find_inline_frame_state): Adjust to std::vector.
3832 (allocate_inline_frame_state): Remove.
3833 (clear_inline_frame_state): Adjust to std::vector.
3834 (skip_inline_frames): Adjust to std::vector.
3836 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3838 * tracepoint.h (struct trace_state_variable): Add constructor.
3839 <name>: Change type to std::string.
3840 * tracepoint.c (tsv_s): Remove.
3841 (DEF_VEC_O(tsv_s)): Remove.
3842 (tvariables): Change to std::vector.
3843 (create_trace_state_variable): Adjust to std::vector.
3844 (find_trace_state_variable): Likewise.
3845 (find_trace_state_variable_by_number): Likewise.
3846 (delete_trace_state_variable): Likewise.
3847 (trace_variable_command): Adjust to std::string.
3848 (delete_trace_variable_command): Likewise.
3849 (tvariables_info_1): Adjust to std::vector.
3850 (save_trace_state_variables): Likewise.
3851 (start_tracing): Likewise.
3852 (merge_uploaded_trace_state_variables): Adjust to std::vector
3854 * target.h (struct target_ops)
3855 <to_download_trace_state_variable>: Pass reference to
3856 trace_state_variable.
3857 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
3858 * target-delegates.c: Re-generate.
3859 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
3860 (mi_tsv_deleted): Likewise.
3861 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
3862 * remote.c (remote_download_trace_state_variable): Change
3863 pointer to reference and adjust.
3864 * make-target-delegates (parse_argtypes): Handle references.
3865 (write_function_header): Likewise.
3866 (munge_type): Likewise.
3868 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3870 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3871 string_view-selftests.c.
3872 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
3874 * unittests/basic_string_view/cons/char/1.cc: Likewise.
3875 * unittests/basic_string_view/cons/char/2.cc: Likewise.
3876 * unittests/basic_string_view/cons/char/3.cc: Likewise.
3877 * unittests/basic_string_view/element_access/char/1.cc:
3879 * unittests/basic_string_view/element_access/char/empty.cc:
3881 * unittests/basic_string_view/element_access/char/front_back.cc:
3883 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
3884 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
3886 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
3888 * unittests/basic_string_view/modifiers/swap/char/1.cc:
3890 * unittests/basic_string_view/operations/compare/char/1.cc:
3892 * unittests/basic_string_view/operations/compare/char/13650.cc:
3894 * unittests/basic_string_view/operations/copy/char/1.cc:
3896 * unittests/basic_string_view/operations/data/char/1.cc:
3898 * unittests/basic_string_view/operations/find/char/1.cc:
3900 * unittests/basic_string_view/operations/find/char/2.cc:
3902 * unittests/basic_string_view/operations/find/char/3.cc:
3904 * unittests/basic_string_view/operations/find/char/4.cc:
3906 * unittests/basic_string_view/operations/rfind/char/1.cc:
3908 * unittests/basic_string_view/operations/rfind/char/2.cc:
3910 * unittests/basic_string_view/operations/rfind/char/3.cc:
3912 * unittests/basic_string_view/operations/substr/char/1.cc:
3914 * unittests/basic_string_view/operators/char/2.cc: Likewise.
3915 * unittests/string_view-selftests.c: New file.
3917 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3919 * unittests/basic_string_view/capacity/1.cc: New file.
3920 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
3921 * unittests/basic_string_view/cons/char/1.cc: New file.
3922 * unittests/basic_string_view/cons/char/2.cc: New file.
3923 * unittests/basic_string_view/cons/char/3.cc: New file.
3924 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
3925 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
3926 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
3927 * unittests/basic_string_view/element_access/char/1.cc: New file.
3928 * unittests/basic_string_view/element_access/char/2.cc: New file.
3929 * unittests/basic_string_view/element_access/char/empty.cc: New file.
3930 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
3931 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
3932 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
3933 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
3934 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
3935 * unittests/basic_string_view/include.cc: New file.
3936 * unittests/basic_string_view/inserters/char/1.cc: New file.
3937 * unittests/basic_string_view/inserters/char/2.cc: New file.
3938 * unittests/basic_string_view/inserters/char/3.cc: New file.
3939 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
3940 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
3941 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
3942 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
3943 * unittests/basic_string_view/literals/types.cc: New file.
3944 * unittests/basic_string_view/literals/values.cc: New file.
3945 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
3946 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
3947 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
3948 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
3949 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
3950 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
3951 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
3952 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
3953 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
3954 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
3955 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
3956 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
3957 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
3958 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
3959 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
3960 * unittests/basic_string_view/operations/data/char/1.cc: New file.
3961 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
3962 * unittests/basic_string_view/operations/find/char/1.cc: New file.
3963 * unittests/basic_string_view/operations/find/char/2.cc: New file.
3964 * unittests/basic_string_view/operations/find/char/3.cc: New file.
3965 * unittests/basic_string_view/operations/find/char/4.cc: New file.
3966 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
3967 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
3968 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
3969 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
3970 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
3971 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
3972 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
3973 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
3974 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
3975 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
3976 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
3977 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
3978 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
3979 * unittests/basic_string_view/operators/char/2.cc: New file.
3980 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
3981 * unittests/basic_string_view/range_access/char/1.cc: New file.
3982 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
3983 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
3984 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
3985 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
3986 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
3987 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
3988 * unittests/basic_string_view/requirements/typedefs.cc: New file.
3989 * unittests/basic_string_view/typedefs.cc: New file.
3990 * unittests/basic_string_view/types/1.cc: New file.
3992 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3994 * common/gdb_string_view.h: Remove libstdc++ implementation
3995 details, adjust to gdb reality.
3996 * common/gdb_string_view.tcc: Likewise.
3997 * cli/cli-script.c (struct string_view): Remove.
3998 (user_args) <m_args>: Change element type to gdb::string_view.
3999 (user_args::insert_args): Adjust.
4001 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4003 * common/gdb_string_view.h: New file.
4004 * common/gdb_string_view.tcc: New file.
4006 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4008 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4009 * configure: Re-generate.
4011 2018-04-09 Pedro Alves <palves@redhat.com>
4013 * gdbarch.sh: Include "observable.h" instead of "observer.h".
4014 (set_target_gdbarch): Call
4015 gdb::observers::architecture_changed.notify instead of
4016 observer_notify_architecture_changed.
4018 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4020 * tracepoint.c (struct current_traceframe_cleanup): Remove.
4021 (do_restore_current_traceframe_cleanup): Remove.
4022 (restore_current_traceframe_cleanup_dtor): Remove.
4023 (make_cleanup_restore_current_traceframe): Remove.
4024 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4026 * tracepoint.h (struct scoped_restore_current_traceframe): New.
4027 * infrun.c (fetch_inferior_event): Use
4028 scoped_restore_current_traceframe.
4030 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4032 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4034 <n_allocated_type_units>: Remove.
4035 <all_type_units>: Change to std::vector.
4036 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4037 to std::vector change.
4038 (dwarf2_per_objfile::get_cutu): Likewise.
4039 (dwarf2_per_objfile::get_tu): Likewise.
4040 (create_signatured_type_table_from_index): Likewise.
4041 (create_signatured_type_table_from_debug_names): Likewise.
4042 (dw2_symtab_iter_next): Likewise.
4043 (dw2_print_stats): Likewise.
4044 (dw2_expand_all_symtabs): Likewise.
4045 (dw2_expand_marked_cus): Likewise.
4046 (dw2_debug_names_iterator::next): Likewise.
4047 (dwarf2_initialize_objfile): Likewise.
4048 (add_signatured_type_cu_to_table): Likewise.
4049 (create_all_type_units): Likewise.
4050 (add_type_unit): Likewise.
4051 (struct tu_abbrev_offset): Add constructor.
4052 (build_type_psymtabs_1): Adjust to std::vector change.
4053 (print_tu_stats): Likewise.
4054 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4055 (write_debug_names): Likewise.
4057 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4059 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4060 Make an std::vector.
4061 <n_comp_units>: Remove.
4062 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4063 to std::vector change.
4064 (dwarf2_per_objfile::get_cutu): Likewise.
4065 (dwarf2_per_objfile::get_cu): Likewise.
4066 (create_cus_from_index): Likewise.
4067 (create_addrmap_from_index): Likewise.
4068 (create_addrmap_from_aranges): Likewise.
4069 (dwarf2_read_index): Likewise.
4070 (dw2_find_last_source_symtab): Likewise.
4071 (dw2_map_symtabs_matching_filename): Likewise.
4072 (dw2_symtab_iter_next): Likewise.
4073 (dw2_print_stats): Likewise.
4074 (dw2_expand_all_symtabs): Likewise.
4075 (dw2_expand_symtabs_with_fullname): Likewise.
4076 (dw2_expand_marked_cus): Likewise.
4077 (dw2_map_symbol_filenames): Likewise.
4078 (create_cus_from_debug_names): Likewise.
4079 (dwarf2_read_debug_names): Likewise.
4080 (dw2_debug_names_iterator::next): Likewise.
4081 (dwarf2_initialize_objfile): Likewise.
4082 (set_partial_user): Likewise.
4083 (dwarf2_build_psymtabs_hard): Likewise.
4084 (read_comp_units_from_section): Remove arguments, adjust to
4086 (create_all_comp_units): Adjust to std::vector and
4087 read_comp_units_from_section changes.
4088 (dwarf2_find_containing_comp_unit): Adjust to std::vector
4090 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4091 (psyms_seen_size): Likewise.
4092 (write_gdbindex): Likewise.
4093 (write_debug_names): Likewise.
4095 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4097 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4098 with dwarf2_per_objfile.
4099 (create_cus_from_index): Likewise.
4100 (create_signatured_type_table_from_index): Likewise.
4101 (dwarf2_read_index): Likewise.
4102 (dwarf2_initialize_objfile): Likewise.
4103 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
4104 per_cu rather than get_dwarf2_per_objfile.
4106 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4108 * dwarf2read.h (struct signatured_type): Forward declare.
4109 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4111 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4112 (dw2_get_cutu): ...this.
4113 (dwarf2_per_objfile::get_cu): Rename from...
4114 (dw2_get_cu): ...this.
4115 (dwarf2_per_objfile::get_tu): New.
4116 (create_addrmap_from_index): Adjust.
4117 (create_addrmap_from_aranges): Adjust.
4118 (dw2_find_last_source_symtab): Adjust.
4119 (dw2_map_symtabs_matching_filename): Adjust.
4120 (dw2_symtab_iter_next): Adjust.
4121 (dw2_print_stats): Adjust.
4122 (dw2_expand_all_symtabs): Adjust.
4123 (dw2_expand_symtabs_with_fullname): Adjust.
4124 (dw2_expand_marked_cus): Adjust.
4125 (dw_expand_symtabs_matching_file_matcher): Adjust.
4126 (dw2_map_symbol_filenames): Adjust.
4127 (dw2_debug_names_iterator::next): Adjust.
4128 (dwarf2_initialize_objfile): Adjust.
4129 (set_partial_user): Adjust.
4130 (dwarf2_build_psymtabs_hard): Adjust.
4132 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4134 * dwarf2read.c (create_signatured_type_table_from_debug_names):
4135 Remove unused variables.
4136 (dw2_map_symtabs_matching_filename): Likewise.
4137 (dwarf2_record_block_ranges): Likewise.
4138 (dwarf2_read_addr_index): Likewise.
4139 (follow_die_offset): Likewise.
4141 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4143 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4144 to symbol_file_add_main.
4146 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4149 * mi/mi-console.c (do_fputc_async_safe): New.
4150 (mi_console_file::write_async_safe): New.
4151 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4152 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4154 * ui-file.c (ui_file::putstrn): Adjust call to
4155 fputstrn_unfiltered.
4156 * utils.c (printchar): Replace do_fputs and do_fprintf
4157 parameters by do_fputc.
4158 (fputstr_filtered): Adjust call to printchar.
4159 (fputstr_unfiltered): Likewise.
4160 (fputstrn_filtered): Likewise.
4161 (fputstrn_unfiltered): Add do_fputc parameter, pass to
4163 * utils.h (do_fputc_ftype): New typedef.
4164 (fputstrn_unfiltered): Add do_fputc parameter.
4166 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4168 * regformats/i386/i386-avx.dat: Remove.
4170 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4173 * amd64-tdep.c (amd64_none_init_abi): New function.
4174 (amd64_x32_none_init_abi): New function.
4175 (_initialize_amd64_tdep): Register handlers for x86-64 and
4176 x64_32 with GDB_OSABI_NONE.
4177 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
4178 GDB_OSABI_NONE osabi.
4180 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4183 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
4185 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
4186 * osabi.c (gdb_osabi_names): Add "unknown" entry.
4188 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4190 * common/byte-vector.h (char_vector): New type.
4191 * target.h (target_read_alloc): Return
4192 gdb::optional<byte_vector>.
4193 (target_read_stralloc): Return gdb::optional<char_vector>.
4194 (target_get_osdata): Return gdb::optional<char_vector>.
4195 * target.c (target_read_alloc_1): Templatize. Replacement
4196 manual memory management with vector.
4197 (target_read_alloc): Change return type, adjust.
4198 (target_read_stralloc): Change return type, adjust.
4199 (target_get_osdata): Change return type, adjust.
4200 * auxv.c (struct auxv_info) <length>: Remove.
4201 <data>: Change type to gdb::optional<byte_vector>.
4202 (auxv_inferior_data_cleanup): Free auxv_info with delete.
4203 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
4204 (target_auxv_search): Adjust.
4205 (fprint_target_auxv): Adjust.
4206 * avr-tdep.c (avr_io_reg_read_command): Adjust.
4207 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
4208 (linux_make_corefile_notes): Adjust.
4209 * osdata.c (get_osdata): Adjust.
4210 * remote.c (remote_get_threads_with_qxfer): Adjust.
4211 (remote_memory_map): Adjust.
4212 (remote_traceframe_info): Adjust.
4213 (btrace_read_config): Adjust.
4214 (remote_read_btrace): Adjust.
4215 (remote_pid_to_exec_file): Adjust.
4216 * solib-aix.c (solib_aix_get_library_list): Adjust.
4217 * solib-dsbt.c (decode_loadmap): Don't free buf.
4218 (dsbt_get_initial_loadmaps): Adjust.
4219 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
4220 * solib-target.c (solib_target_current_sos): Adjust.
4221 * tracepoint.c (sdata_make_value): Adjust.
4222 * xml-support.c (xinclude_start_include): Adjust.
4223 (xml_fetch_content_from_file): Adjust.
4224 * xml-support.h (xml_fetch_another): Change return type.
4225 (xml_fetch_content_from_file): Change return type.
4226 * xml-syscall.c (xml_init_syscalls_info): Adjust.
4227 * xml-tdesc.c (file_read_description_xml): Adjust.
4228 (fetch_available_features_from_target): Change return type.
4229 (target_fetch_description_xml): Adjust.
4230 (target_read_description_xml): Adjust.
4232 2018-04-06 Tom Tromey <tom@tromey.com>
4234 * value.c (~value): Update.
4235 (struct value) <contents>: Now unique_xmalloc_ptr.
4236 (value_contents_bits_eq, allocate_value_contents)
4237 (value_contents_raw, value_contents_all_raw)
4238 (value_contents_for_printing, value_contents_for_printing_const)
4239 (set_value_enclosing_type): Update.
4241 2018-04-06 Tom Tromey <tom@tromey.com>
4243 * value.c (range_s): Remove typedef, VEC.
4244 (struct range): Add operator<.
4245 (range_lessthan): Remove.
4246 (ranges_contain): Change type.
4248 (struct value) <unavailable, optimized_out>: Now std::vector.
4249 (value_entirely_available)
4250 (value_entirely_covered_by_range_vector)
4251 (value_entirely_unavailable, value_entirely_optimized_out):
4253 (insert_into_bit_range_vector): Change argument type.
4254 (find_first_range_overlap): Likewise.
4255 (struct ranges_and_idx, value_contents_bits_eq)
4256 (require_not_optimized_out, require_available): Update.
4257 (ranges_copy_adjusted): Change argument types.
4258 (value_optimized_out, value_copy, value_fetch_lazy): Update.
4260 2018-04-06 Tom Tromey <tom@tromey.com>
4262 * value.c (~value): Update.
4263 (struct value) <parent>: Now a value_ref_ptr.
4264 (value_parent, set_value_parent, value_address, value_copy):
4267 2018-04-06 Tom Tromey <tom@tromey.com>
4269 * value.c (struct value): Add constructor, destructor, and member
4271 (allocate_value_lazy, value_decref): Update.
4273 2018-04-06 Tom Tromey <tom@tromey.com>
4275 * value.c (struct value) <released, next>: Remove.
4276 (all_values): Now a std::vector.
4277 (allocate_value_lazy): Update.
4278 (value_next): Remove.
4279 (value_mark, value_free_to_mark, release_value)
4280 (value_release_to_mark): Update.
4282 2018-04-06 Tom Tromey <tom@tromey.com>
4284 * value.h (fetch_subexp_value, value_release_to_mark): Update.
4285 (free_value_chain): Remove.
4286 * value.c (free_value_chain): Remove.
4287 (value_release_to_mark): Return a std::vector.
4288 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
4290 (check_condition): Update.
4291 * eval.c (fetch_subexp_value): Change "val_chain" to a
4293 * breakpoint.c (update_watchpoint): Update.
4294 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
4296 2018-04-06 Tom Tromey <tom@tromey.com>
4298 * value.h (free_all_values): Remove.
4299 * value.c (free_all_values): Remove.
4301 2018-04-06 Tom Tromey <tom@tromey.com>
4303 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
4304 (value_history_chain, value_history_count): Remove.
4305 (value_history): New global.
4306 (record_latest_value, access_value_history, show_values)
4307 (preserve_values): Update.
4309 2018-04-06 Tom Tromey <tom@tromey.com>
4311 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
4312 * varobj.c (varobj_set_display_format, varobj_set_value)
4313 (install_default_visualizer, construct_visualizer)
4314 (install_new_value, ~varobj, varobj_get_value_type)
4315 (my_value_of_variable, varobj_editable_p): Update.
4316 * c-varobj.c (c_describe_child, c_value_of_variable)
4317 (cplus_number_of_children, cplus_describe_child): Update.
4318 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
4319 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
4320 (ada_value_of_variable, ada_value_is_changeable_p): Update.
4322 2018-04-06 Tom Tromey <tom@tromey.com>
4324 * printcmd.c (last_examine_address): Change type to
4326 (do_examine, x_command): Update.
4328 2018-04-06 Tom Tromey <tom@tromey.com>
4330 * value.c (release_value): Update.
4331 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
4332 (struct bpstats) <val>: Now a value_ref_ptr.
4333 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4334 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4335 (~watchpoint, print_it_watchpoint, watch_command_1)
4336 (invalidate_bp_value_on_memory_change): Update.
4338 2018-04-06 Tom Tromey <tom@tromey.com>
4340 * varobj.c (varobj_clear_saved_item)
4341 (update_dynamic_varobj_children, install_new_value, ~varobj):
4343 * value.h (value_incref): Move declaration earlier.
4344 (value_decref): Rename from value_free.
4345 (struct value_ref_policy): New.
4346 (value_ref_ptr): New typedef.
4347 (struct value_deleter): Remove.
4348 (gdb_value_up): Remove typedef.
4349 (release_value): Change return type.
4350 (release_value_or_incref): Remove.
4351 * value.c (set_value_parent): Update.
4352 (value_incref): Change return type.
4353 (value_decref): Rename from value_free.
4354 (value_free_to_mark, free_all_values, free_value_chain): Update.
4355 (release_value): Return value_ref_ptr.
4356 (release_value_or_incref): Remove.
4357 (record_latest_value, set_internalvar, clear_internalvar):
4359 * stack.c (info_frame_command): Don't call value_free.
4360 * python/py-value.c (valpy_dealloc, valpy_new)
4361 (value_to_value_object): Update.
4362 * printcmd.c (do_examine): Update.
4363 * opencl-lang.c (lval_func_free_closure): Update.
4364 * mi/mi-main.c (register_changed_p): Don't call value_free.
4365 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
4366 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
4367 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
4369 * guile/scm-value.c (vlscm_free_value_smob)
4370 (vlscm_scm_from_value): Update.
4371 * frame.c (frame_register_unwind, frame_unwind_register_signed)
4372 (frame_unwind_register_unsigned, get_frame_register_bytes)
4373 (put_frame_register_bytes): Don't call value_free.
4374 * findvar.c (address_from_register): Don't call value_free.
4375 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
4376 * dwarf2loc.c (entry_data_value_free_closure)
4377 (value_of_dwarf_reg_entry, free_pieced_value_closure)
4378 (dwarf2_evaluate_loc_desc_full): Update.
4379 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
4380 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
4381 (~watchpoint, watch_command_1)
4382 (invalidate_bp_value_on_memory_change): Update.
4383 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
4385 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
4388 * warning.m4: Add -Wno-error=deprecated-register.
4389 * configure: Re-generate.
4391 2018-04-05 Tom Tromey <tom@tromey.com>
4393 * linespec.h: Remove include of "vec.h".
4395 2018-04-05 Tom Tromey <tom@tromey.com>
4397 * linespec.c (typep): Remove typedef.
4398 (find_methods, find_superclass_methods): Take a std::vector.
4399 (find_method): Use std::vector.
4401 2018-04-05 Tom Tromey <tom@tromey.com>
4403 * utils.c (compare_strings): Remove.
4404 * utils.h (compare_strings): Remove.
4405 * objc-lang.h (find_imps): Update.
4406 * objc-lang.c (find_methods): Take a std::vector.
4407 (uniquify_strings, find_imps): Likewise.
4408 * linespec.c (find_methods): Take a std::vector.
4409 (decode_objc): Use std::vector.
4410 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
4412 (find_method, find_function_symbols): Use std::vector.
4414 2018-04-05 Tom Tromey <tom@tromey.com>
4416 * completer.c (completion_tracker::completion_tracker): Remove
4418 (completion_tracker::discard_completions): Likewise.
4419 * breakpoint.c (ambiguous_names_p): Remove cast.
4420 * ada-lang.c (_initialize_ada_language): Remove cast.
4421 * utils.h (streq): Update.
4422 (streq_hash): Add new declaration.
4423 * utils.c (streq): Return bool.
4424 (streq_hash): New function.
4426 2018-04-05 Tom Tromey <tom@tromey.com>
4428 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
4429 Remove a string copy.
4431 2018-04-05 Tom Tromey <tom@tromey.com>
4433 * linespec.c (filter_results): Use std::vector.
4434 (decode_line_2, decode_line_full): Update.
4436 2018-04-05 Tom Tromey <tom@tromey.com>
4438 * linespec.c (canonical_to_fullform): Return std::string.
4439 (filter_results): Update.
4440 (struct decode_line_2_item): Add constructor.
4441 <fullform, displayform>: Now std::string.
4442 (decode_line_2_compare_items): Now a std::sort comparator.
4443 (decode_line_2): Update.
4445 2018-04-05 Tom Tromey <tom@tromey.com>
4447 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
4448 (unexpected_linespec_error): Update.
4449 (linespec_parse_basic, parse_linespec): Update.
4451 2018-04-05 Tom Tromey <tom@tromey.com>
4453 * linespec.c (linespec_parse_basic): Reindent.
4455 2018-04-05 Tom Tromey <tom@tromey.com>
4457 * minsyms.h (iterate_over_minimal_symbols): Update.
4458 * minsyms.c (iterate_over_minimal_symbols): Take a
4460 * linespec.c (struct collect_minsyms): Remove.
4461 (compare_msyms): Now a std::sort comparator.
4462 (add_minsym): Add parameters.
4463 (search_minsyms_for_name): Update. Use std::vector.
4465 2018-04-03 Tom Tromey <tom@tromey.com>
4467 * mipsread.c (read_alphacoff_dynamic_symtab): Use
4470 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4472 * MAINTAINERS (Write After Approval): Add Weimin Pan.
4474 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
4477 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
4478 printing static type.
4480 2018-04-01 Tom Tromey <tom@tromey.com>
4482 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
4483 (rs6000_xfer_shared_libraries): Update.
4485 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
4487 * common/gdb_vecs.h (char_ptr): Remove.
4488 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
4490 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4492 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
4494 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
4496 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4498 * tracepoint.h (struct uploaded_tp): Initialize fields.
4499 <actions, step_actions, cmd_strings>: Change type to
4500 std::vector<char *>.
4501 * tracepoint.c (get_uploaded_tp): Allocate with new.
4502 (free_uploaded_tps): Free with delete.
4503 (parse_tracepoint_definition): Adjust to std::vector change.
4504 * breakpoint.c (read_uploaded_action): Likewise.
4505 (create_tracepoint_from_upload): Likewise.
4506 * ctf.c (ctf_write_uploaded_tp): Likewise.
4507 (SET_ARRAY_FIELD): Likewise.
4508 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
4510 2018-03-30 Tom Tromey <tom@tromey.com>
4512 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
4514 (svr4_keep_data_in_core): Update.
4515 (svr4_read_so_list): Update.
4517 2018-03-30 Tom Tromey <tom@tromey.com>
4519 * windows-nat.c (handle_output_debug_string, handle_exception):
4521 * target.h (target_read_string): Update.
4522 * target.c (target_read_string): Change "string" to
4524 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
4526 * solib-frv.c (frv_current_sos): Update.
4527 * solib-dsbt.c (dsbt_current_sos): Update.
4528 * solib-darwin.c (darwin_current_sos): Update.
4529 * linux-thread-db.c (inferior_has_bug): Update.
4530 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
4531 Update. Remove alloca.
4532 * ada-lang.c (ada_main_name): Update.
4534 2018-03-30 Tom Tromey <tom@tromey.com>
4536 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
4537 (struct dwo_file_deleter): New.
4538 (dwo_file_up): New typedef.
4539 (open_and_init_dwo_file): Use dwo_file_up.
4540 (free_dwo_file_cleanup): Remove.
4542 2018-03-30 Tom Tromey <tom@tromey.com>
4544 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
4545 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
4547 2018-03-30 Tom Tromey <tom@tromey.com>
4549 * dwarf2read.c (class free_cached_comp_units): New class.
4550 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
4551 (free_cached_comp_units): Remove function.
4553 2018-03-30 Tom Tromey <tom@tromey.com>
4555 * utils.h (make_cleanup_unpush_target): Remove.
4556 * inf-ptrace.c (struct target_unpusher): New.
4557 (target_unpush_up) New typedef.
4558 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
4560 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
4562 2018-03-27 Tom Tromey <tom@tromey.com>
4564 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
4566 2018-03-27 Pedro Alves <palves@redhat.com>
4567 Tom Tromey <tom@tromey.com>
4569 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
4570 destructor. Now a class.
4571 (gdb_readline_wrapper_cleanup): Remove function.
4572 (gdb_readline_wrapper): Remove cleanups.
4574 2018-03-27 Tom Tromey <tom@tromey.com>
4576 * typeprint.h (struct type_print_options) <local_typedefs,
4577 global_typedefs>: Remove "struct" keyword.
4578 (class typedef_hash_table): New class.
4579 (recursively_update_typedef_hash, add_template_parameters)
4580 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
4581 (find_typedef_in_hash): Don't declare.
4582 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
4583 (typedef_hash_table::recursively_update): Rename from
4584 recursively_update_typedef_hash. Now a member.
4585 (typedef_hash_table::add_template_parameters): Rename from
4586 add_template_parameters. Now a member.
4587 (typedef_hash_table::typedef_hash_table): Now a constructor;
4588 rename from create_typedef_hash.
4589 (typedef_hash_table::~typedef_hash_table): Now a destructor;
4590 rename from free_typedef_hash.
4591 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
4592 (do_free_global_table): Remove.
4593 (typedef_hash_table::typedef_hash_table): New constructor; renamed
4594 from copy_type_recursive.
4595 (create_global_typedef_table): Remove.
4596 (typedef_hash_table::find_global_typedef): Now a member of
4598 (typedef_hash_table::find_typedef): Rename from
4599 find_typedef_in_hash; now a member.
4600 (whatis_exp): Update.
4601 * extension.h (struct ext_lang_type_printers): Add constructor and
4603 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
4605 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
4606 Now a constructor; rename from start_ext_lang_type_printers.
4607 (ext_lang_type_printers): Now a destructor; rename from
4608 free_ext_lang_type_printers.
4609 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
4611 (c_type_print_base_struct_union): Update. Remove cleanups.
4613 2018-03-27 Tom Tromey <tom@tromey.com>
4615 * dwarf-index-write.c: Include <cmath>.
4617 2018-03-27 Joel Brobecker <brobecker@adacore.com>
4619 * NEWS: Add entry describing new "set|show varsize-limit" command.
4620 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
4622 * printcmd.c (_initialize_printcmd): Add "set var" alias of
4625 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
4627 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
4629 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
4630 * dwarf-index-common.c: New file.
4631 * dwarf-index-common.h: New file.
4632 * dwarf-index-write.c: New file.
4633 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
4634 (struct dwarf2_section_info): Move from here.
4635 (dwarf2_section_info_def): Likewise.
4636 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
4637 (offset_type): Likewise.
4638 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
4639 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
4640 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
4641 (byte_swap): Likewise.
4642 (MAYBE_SWAP): Likewise.
4643 (dwarf2_per_cu_ptr): Likewise.
4644 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
4645 (struct tu_stats): Likewise.
4646 (struct dwarf2_per_objfile): Likewise.
4647 (struct dwarf2_per_cu_data): Likewise.
4648 (struct signatured_type): Likewise.
4649 (sig_type_ptr): Likewise.
4650 (DEF_VEC_P (sig_type_ptr)): Likewise.
4651 (INDEX4_SUFFIX): Likewise.
4652 (INDEX5_SUFFIX): Likewise.
4653 (DEBUG_STR_SUFFIX): Likewise.
4654 (dwarf2_read_section): Make non-static.
4655 (mapped_index_string_hash): Move from here.
4656 (dwarf5_djb_hash): Likewise.
4657 (file_write): Likewise.
4658 (class data_buf): Likewise.
4659 (struct symtab_index_entry): Likewise.
4660 (struct mapped_symtab): Likewise.
4661 (find_slot): Likewise.
4662 (hash_expand): Likewise.
4663 (add_index_entry): Likewise.
4664 (uniquify_cu_indices): Likewise.
4665 (class c_str_view): Likewise.
4666 (class c_str_view_hasher): Likewise.
4667 (class vector_hasher): Likewise.
4668 (write_hash_table): Likewise.
4669 (psym_index_map): Likewise.
4670 (struct addrmap_index_data): Likewise.
4671 (add_address_entry): Likewise.
4672 (add_address_entry_worker): Likewise.
4673 (write_address_map): Likewise.
4674 (symbol_kind): Likewise.
4675 (write_psymbols): Likewise.
4676 (struct signatured_type_index_data): Likewise.
4677 (write_one_signatured_type): Likewise.
4678 (recursively_count_psymbols): Likewise.
4679 (recursively_write_psymbols): Likewise.
4680 (class debug_names): Likewise.
4681 (check_dwarf64_offsets): Likewise.
4682 (psyms_seen_size): Likewise.
4683 (write_gdbindex): Likewise.
4684 (write_debug_names): Likewise.
4685 (assert_file_size): Likewise.
4686 (write_psymtabs_to_index): Likewise.
4687 (save_gdb_index_command): Likewise.
4688 (_initialize_dwarf2_read): Don't register the "save gdb-index"
4690 * dwarf2read.h: New file.
4692 2018-03-27 Joel Brobecker <brobecker@adacore.com>
4695 * dwarf2read.c (dwarf2_physname): Do not return the demangled
4696 symbol name if the CU's language stores symbol names in linkage
4698 * language.h (struct language_defn)
4699 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
4700 all instances of this struct.
4702 2018-03-26 Tom Tromey <tom@tromey.com>
4704 * stack.c (backtrace_command_1): Remove verbose code.
4706 2018-03-26 Tom Tromey <tom@tromey.com>
4708 * python/py-framefilter.c (py_print_type): Don't catch
4709 exceptions. Return void.
4710 (py_print_value): Likewise.
4711 (py_print_single_arg): Likewise.
4712 (enumerate_args): Don't catch exceptions.
4713 (py_print_args): Likewise.
4714 (py_print_frame): Likewise.
4715 (gdbpy_apply_frame_filter): Catch exceptions here.
4717 2018-03-26 Tom Tromey <tom@tromey.com>
4719 * stack.c (_initialize_stack): Remove trailing newlines from help
4720 text. Add "Usage" line to "backtrace" help.
4722 2018-03-26 Tom Tromey <tom@tromey.com>
4725 * python/py-framefilter.c (py_print_args): Call wrap_hint.
4727 2018-03-26 Tom Tromey <tom@tromey.com>
4729 * python/py-framefilter.c (py_print_single_arg): Return
4730 EXT_LANG_BT_ERROR from catch.
4732 2018-03-26 Tom Tromey <tom@tromey.com>
4735 * stack.c (backtrace_command_1): Move some code into no-filters
4738 2018-03-26 Tom Tromey <tom@tromey.com>
4740 * python/py-framefilter.c (throw_quit_or_print_exception): New
4742 (gdbpy_apply_frame_filter): Use it.
4744 2018-03-26 Tom Tromey <tom@tromey.com>
4747 * python/py-framefilter.c (py_print_type, py_print_value)
4748 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
4751 2018-03-26 Tom Tromey <tom@tromey.com>
4753 * python/py-framefilter.c (enumerate_args): Use
4754 gdb::unique_xmalloc_ptr.
4756 2018-03-26 Tom Tromey <tom@tromey.com>
4758 * python/py-framefilter.c (py_print_frame): Return
4760 (gdbpy_apply_frame_filter): Update comment.
4761 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
4763 <EXT_LANG_BT_NO_FILTERS>: Change value.
4765 2018-03-26 Tom Tromey <tom@tromey.com>
4768 * stack.c (backtrace_command): Parse "hide" argument.
4769 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
4770 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
4773 2018-03-26 Tom Tromey <tom@tromey.com>
4775 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
4777 (backtrace_command): Remove "fulltrace", add "flags".
4779 2018-03-26 Tom Tromey <tom@tromey.com>
4781 * stack.c (backtrace_command): Rewrite command line parsing.
4783 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
4785 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
4787 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
4789 * filename-seen-cache.h: Add include guard.
4791 2018-03-26 Keith Seitz <keiths@redhat.com>
4793 * symfile.c (place_section): Remove "struct" from section_addr_info
4795 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
4796 "struct" keyword from section_addr_info.
4798 2018-03-26 Alan Hayward <alan.hayward@arm.com>
4800 * regformats/regdef.h (reg): Add constructors.
4802 2018-03-25 Pedro Alves <palves@redhat.com>
4804 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
4805 if then/else bodies in var_func_name extraction.
4807 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
4809 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
4810 lookup_minimal_symbol() to find symbol entry.
4811 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
4813 2018-03-23 Keith Seitz <keiths@redhat.com>
4816 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
4817 nested type definitions for C++, too.
4819 2018-03-23 Tom Tromey <tom@tromey.com>
4821 * machoread.c (struct oso_el): Add a constructor. Don't define as
4823 (macho_register_oso): Remove.
4824 (macho_symtab_read): Take a std::vector.
4825 (oso_el_compare_name): Now a std::sort comparator.
4826 (macho_symfile_read_all_oso): Take a std::vector.
4827 (macho_symfile_read): Use std::vector. Remove cleanups.
4829 2018-03-22 Tom Tromey <tom@tromey.com>
4831 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
4832 (record_full_goto_bookmark): Use std::string.
4834 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4837 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
4840 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4842 * rs6000-tdep.c (store_insn_p): New function.
4843 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
4844 and cr_reg to their unshifted values. Use store_insn_p to
4845 match LR saves using either R1 or fdata->alloca_reg. Use
4846 store_insn_p to match CR saves. Set alloca_reg_offset
4847 when alloca_reg and framep are set. Remove lr_reg shift
4848 when assigning to fdata->lr_register.
4850 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4852 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
4853 command line args instead of emitting a warning.
4855 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4857 * tracepoint.h (struct static_tracepoint_marker): Initialize
4858 fields, define default constructor, move constructor and move
4859 assignment, disable the rest.
4860 <str_id, extra>: Make std::string.
4861 (release_static_tracepoint_marker): Remove.
4862 (free_current_marker): Remove.
4863 * tracepoint.c (free_current_marker): Remove.
4864 (parse_static_tracepoint_marker_definition): Adjust to
4865 std::string, use new hex2str overload.
4866 (release_static_tracepoint_marker): Remove.
4867 (print_one_static_tracepoint_marker): Get marker by reference
4868 and adjust to std::string.
4869 (info_static_tracepoint_markers_command): Adjust to std::vector
4871 * target.h (static_tracepoint_marker_p): Remove typedef.
4872 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
4873 (struct target_ops) <to_static_tracepoint_marker_at>: Return
4875 <to_static_tracepoint_markers_by_strid>: Return std::vector.
4877 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
4878 (target_debug_print_std_vector_static_tracepoint_marker): New.
4879 (target_debug_print_struct_static_tracepoint_marker_p): Rename
4881 (target_debug_print_static_tracepoint_marker_p): ... this.
4882 * target-delegates.c: Re-generate.
4883 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
4885 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
4886 (decode_static_tracepoint_spec): Adjust to std::vector.
4887 (tracepoint_print_one_detail): Adjust to std::string.
4888 (strace_marker_decode_location): Adjust to std::string.
4889 (update_static_tracepoint): Adjust to std::string, remove call
4890 to release_static_tracepoint_marker.
4891 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4892 Adjust to std::vector.
4893 * remote.c (remote_static_tracepoint_marker_at): Return bool.
4894 (remote_static_tracepoint_markers_by_strid): Adjust to
4896 * common/rsp-low.h (hex2str): New overload with explicit count
4898 * common/rsp-low.c (hex2str): New overload with explicit count
4900 * unittests/rsp-low-selftests.c (test_hex2str): New function.
4901 (_initialize_rsp_low_selftests): Add test_hex2str test.
4902 * unittests/tracepoint-selftests.c
4903 (test_parse_static_tracepoint_marker_definition): Adjust to
4906 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4908 * tracepoint.c (parse_static_tracepoint_marker_definition):
4909 Consider case where the definition is followed by more
4911 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4912 tracepoint-selftests.c.
4913 * unittests/tracepoint-selftests.c: New.
4915 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4917 * MAINTAINERS (Write After Approval): Add Pedro Franco de
4920 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
4922 * symtab.c (find_pc_sect_line): fixed indentation.
4924 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
4926 * symtab.c (find_pc_sect_line): now uses binary search.
4928 2018-03-19 Tom Tromey <tom@tromey.com>
4930 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
4933 2018-03-19 Pedro Alves <palves@redhat.com>
4934 Tom Tromey <tom@tromey.com>
4936 * unittests/observable-selftests.c: New file.
4937 * common/observable.h: New file.
4938 * observable.h: New file.
4939 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
4940 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
4941 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
4942 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
4943 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
4944 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
4945 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
4946 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
4947 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
4948 python/py-breakpoint.c, python/py-finishbreakpoint.c,
4949 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
4950 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
4951 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
4952 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
4953 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
4954 tui/tui-interp.c, valops.c: Update all users.
4955 * tui/tui-hooks.c (tui_bp_created_observer)
4956 (tui_bp_deleted_observer, tui_bp_modified_observer)
4957 (tui_inferior_exit_observer, tui_before_prompt_observer)
4958 (tui_normal_stop_observer, tui_register_changed_observer):
4960 (tui_observers_token): New global.
4961 (attach_or_detach, tui_attach_detach_observers): New functions.
4962 (tui_install_hooks, tui_remove_hooks): Use
4963 tui_attach_detach_observers.
4964 * record-btrace.c (record_btrace_thread_observer): Remove.
4965 (record_btrace_thread_observer_token): New global.
4966 * observer.sh: Remove.
4967 * observer.c: Rename to observable.c.
4968 * observable.c (namespace gdb_observers): Define new objects.
4969 (observer_debug): Move into gdb_observers namespace.
4970 (struct observer, struct observer_list, xalloc_observer_list_node)
4971 (xfree_observer_list_node, generic_observer_attach)
4972 (generic_observer_detach, generic_observer_notify): Remove.
4973 (_initialize_observer): Update.
4974 Don't include observer.inc.
4975 * Makefile.in (generated_files): Remove observer.h, observer.inc.
4976 (clean mostlyclean): Likewise.
4977 (observer.h, observer.inc): Remove targets.
4978 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
4979 (COMMON_SFILES): Use observable.c, not observer.c.
4980 * .gitignore: Remove observer.h.
4982 2018-03-18 Tom Tromey <tom@tromey.com>
4984 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
4986 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
4988 2018-03-17 Tom Tromey <tom@tromey.com>
4990 * auto-load.c (auto_load_objfile_script_1): Use std::string.
4992 2018-03-17 Tom Tromey <tom@tromey.com>
4994 * target.c (class scoped_target_fd): New.
4995 (target_fileio_close_cleanup): Remove.
4996 (target_fileio_read_alloc_1): Use scoped_target_fd.
4998 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5000 * silent-rules.mk: New.
5001 * Makefile.in: Include silent-rules.mk
5002 (srcdir, VPATH, top_srcdir): Move up.
5003 (COMPILE): Add ECHO_CXX.
5004 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5005 (init.c): Add ECHO_INIT_C.
5006 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5007 (version.c): Add ECHO_GEN.
5008 (printcmd.o): Add ECHO_CXX.
5009 (target-float.o): Add ECHO_CXX.
5010 (ada-exp.o): Add ECHO_CXX.
5011 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5012 (insight$(EXEEXT)): Add ECHO_CXXLD.
5013 * gnulib/configure.ac: Add AM_SILENT_RULES.
5014 * gnulib/aclocal.m4: Re-generate.
5015 * gnulib/configure: Re-generate.
5016 * gnulib/import/Makefile.in: Re-generate.
5018 2018-03-16 Tom Tromey <tom@tromey.com>
5020 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5021 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5022 * utils.c (do_free_section_addr_info)
5023 (make_cleanup_free_section_addr_info): Remove.
5024 * symfile.h (struct other_sections): Add constructor.
5025 (struct section_addr_info): Remove.
5026 (section_addr_info): New typedef.
5027 (struct sym_fns) <sym_offsets>: Change type of parameter.
5028 (build_section_addr_info_from_objfile)
5029 (relative_addr_info_to_section_offsets, addr_info_make_relative)
5030 (default_symfile_offsets, symbol_file_add)
5031 (symbol_file_add_from_bfd)
5032 (build_section_addr_info_from_section_table): Update.
5033 (alloc_section_addr_info, free_section_addr_info): Don't declare.
5034 * symfile.c (alloc_section_addr_info): Remove.
5035 (build_section_addr_info_from_section_table): Change return type.
5037 (build_section_addr_info_from_bfd)
5038 (build_section_addr_info_from_objfile): Likewise.
5039 (free_section_addr_info): Remove.
5040 (relative_addr_info_to_section_offsets): Change type of "addrs".
5041 (addrs_section_compar): Now a std::sort comparator.
5042 (addrs_section_sort): Change return type.
5043 (addr_info_make_relative): Change type of "addrs". Update.
5044 (default_symfile_offsets, syms_from_objfile_1)
5045 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5046 (symbol_file_add_separate): Update.
5047 (symbol_file_add): Change type of "addrs". Update.
5048 (add_symbol_file_command): Update. Remove cleanups.
5049 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
5051 * symfile-debug.c (debug_sym_offsets): Change type of "info".
5052 * solib.c (solib_read_symbols): Update.
5053 * objfiles.c (objfile_relocate): Update. Remove cleanups.
5054 * machoread.c (macho_symfile_offsets): Update.
5055 * jit.c (jit_bfd_try_read_symtab): Update.
5057 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
5059 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5060 unittests/utils-selftests.c.
5061 * unittests/utils-selftests.c: New file.
5063 2018-03-14 Tom Tromey <tom@tromey.com>
5066 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5069 2018-03-14 Tom Tromey <tom@tromey.com>
5072 * printcmd.c (printf_pointer): Allow "-" in format.
5074 2018-03-14 Tom Tromey <tom@tromey.com>
5076 * printcmd.c (_initialize_printcmd): Add usage to printf.
5078 2018-03-14 Yao Qi <qiyao@sourceware.org>
5080 * MAINTAINERS: Update my email address.
5082 2018-03-13 Tom Tromey <tom@tromey.com>
5084 * machoread.c (macho_check_dsym): Change filenamep to a
5086 (macho_symfile_read): Update.
5087 * symfile.c (load_command): Use std::string.
5089 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
5091 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5092 to error message string.
5093 (riscv_register_name): Use xsnprintf instead of sprintf.
5094 (riscv_insn::fetch_instruction): Use gdb_assert instead of
5096 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5098 (riscv_push_dummy_call): Likewise.
5100 2018-03-12 Tom Tromey <tom@tromey.com>
5102 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5103 Use gdb::byte_vector.
5104 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5106 2018-03-12 Yao Qi <yao.qi@linaro.org>
5108 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5109 parameter type to readable_regcache.
5110 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5113 2018-03-11 Tom Tromey <tom@tromey.com>
5115 * dwarf2read.c (struct nextfield): Add initializers.
5116 (struct nextfnfield): Remove.
5117 (struct fnfieldlist): Add initializers. Remove "length" and
5118 "head", use std::vector.
5119 (struct decl_field_list): Remove.
5120 (struct field_info): Add initializers.
5121 <fields, baseclasses>: Now std::vector.
5122 <nbaseclasses, nfnfields, typedef_field_list_count,
5123 nested_types_list_count>: Remove.
5124 (dwarf2_add_field, dwarf2_add_type_defn)
5125 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5126 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5127 (process_structure_scope): Update.
5129 2018-03-11 Tom Tromey <tom@tromey.com>
5131 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5132 for use by std::sort.
5133 (build_type_psymtabs_1): Use std::vector.
5135 2018-03-09 Eli Zaretskii <eliz@gnu.org>
5137 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5138 and LIBMPFR in the printed configuration.
5140 2018-03-08 Tom Tromey <tom@tromey.com>
5142 * source.c (get_filename_and_charpos): Use scoped_fd.
5143 * nto-procfs.c (procfs_open_1): Use scoped_fd.
5144 (procfs_pidlist): Likewise.
5145 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5146 (iterate_over_mappings): Likewise.
5148 2018-03-08 Tom Tromey <tom@tromey.com>
5150 * infcall.c (struct call_return_meta_info)
5151 <stack_temporaries_enabled>: Remove.
5152 (get_call_return_value, call_function_by_hand_dummy): Update.
5153 * thread.c (disable_thread_stack_temporaries): Remove.
5154 (enable_thread_stack_temporaries): Remove.
5155 (thread_stack_temporaries_enabled_p): Return bool.
5156 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5157 (get_last_thread_stack_temporary): Update.
5158 * eval.c (evaluate_subexp): Update.
5159 * gdbthread.h (class enable_thread_stack_temporaries): Now a
5160 class, not a function.
5161 (value_ptr, value_vec): Remove typedefs.
5162 (class thread_info) <stack_temporaries_enabled>: Now bool.
5163 <stack_temporaries>: Now a std::vector.
5164 (thread_stack_temporaries_enabled_p)
5165 (value_in_thread_stack_temporaries): Return bool.
5167 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
5169 * remote.c (putpkt_binary): Fix omitted bytes reporting.
5170 (getpkt_or_notif_sane_1): Likewise.
5172 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5174 * build-id.c (build_id_to_debug_bfd): Use std::string.
5176 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5178 * build-id.c (find_separate_debug_file_by_buildid): Return
5180 * build-id.h (find_separate_debug_file_by_buildid): Return
5182 * coffread.c (coff_symfile_read): Adjust to std::string.
5183 * elfread.c (elf_symfile_read): Adjust to std::string.
5184 * symfile.c (separate_debug_file_exists): Change parameter to
5186 (find_separate_debug_file): Return std::string.
5187 (find_separate_debug_file_by_debuglink): Return std::string.
5188 * symfile.h (find_separate_debug_file_by_debuglink): Return
5191 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5193 * common/xml-utils.c (xml_escape_text): Move code to...
5194 (xml_escape_text_append): ... this new function.
5195 * common/xml-utils.h (xml_escape_text_append): New declaration.
5196 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
5198 (_initialize_xml_utils): register test_xml_escape_text_append as
5201 2018-03-07 Alan Hayward <alan.hayward@arm.com>
5203 * defs.h: Remove MAX_REGISTER_SIZE.
5204 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
5206 * python/py-unwind.c (pyuw_sniffer): Likewise.
5208 2018-03-07 Tom Tromey <tom@tromey.com>
5210 * linux-tdep.c (linux_info_proc): Update.
5211 * target.h (struct target_ops) <to_fileio_readlink>: Return
5213 (target_fileio_readlink): Return optional<string>.
5214 * remote.c (remote_hostio_readlink): Return optional<string>.
5215 * inf-child.c (inf_child_fileio_readlink): Return
5217 * target.c (target_fileio_readlink): Return optional<string>.
5219 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
5221 * regcache.c (cooked_read_test): Add riscv to the list of
5222 architectures that have a save_reggroup.
5224 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
5226 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
5227 value is not a dynamic class object.
5229 2018-03-06 Tom Tromey <tom@tromey.com>
5231 * rust-exp.y: Formatting fixes.
5233 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5235 * riscv-tdep.c (riscv_register_name): Remove target description
5237 (riscv_gdbarch_init): Remove target description check.
5239 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5241 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
5243 * riscv-tdep.h: Likewise.
5245 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5247 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
5248 (riscv_pseudo_register_write): Delete.
5249 (riscv_gdbarch_init): Remove all use of pseudo registers.
5251 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5253 * record-btrace.c (btrace_print_lines): Replace cleanup
5254 parameter with RAII equivalents.
5255 (btrace_insn_history): Replace cleanup with RAII equivalents.
5256 * ui-out.h (make_cleanup_ui_out_list_begin_end,
5257 make_cleanup_ui_out_tuple_begin_end): Remove.
5258 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
5259 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
5260 make_cleanup_ui_out_list_begin_end): Remove.
5262 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5264 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
5265 parameter types to std::vector. Use bool.
5266 (record_btrace_wait): Replace VEC(tp_t) with
5267 std::vector<thread_info *>.
5268 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
5270 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
5272 * record-btrace.c (record_btrace_disable_callback): Remove.
5273 (struct scoped_btrace_disable): New.
5274 (record_btrace_open): Use scoped_btrace_disable.
5276 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5278 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
5279 reading values from registers.
5281 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5283 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
5286 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5288 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
5289 change parameter type. Use GDB's print functions, and use
5290 core_addr_to_string where appropriate.
5291 (riscv_push_dummy_call): Use core_addr_to_string where
5292 appropriate, update call to riscv_print_arg_location, and reindent
5294 (riscv_return_value): Update call to riscv_print_arg_location.
5296 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5297 Tim Newsome <tim@sifive.com>
5298 Albert Ou <a0u@eecs.berkeley.edu>
5299 Darius Rad <darius@bluespec.com>
5301 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
5302 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
5303 (ALLDEPFILES): Add riscv-tdep.c
5304 * configure.tgt: Add riscv support.
5305 * riscv-tdep.c: New file.
5306 * riscv-tdep.h: New file.
5307 * NEWS: Mention new target.
5308 * MAINTAINERS: Add entry for riscv.
5310 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
5312 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
5313 fields within aggregates.
5315 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
5317 * record-btrace.c (btrace_print_lines): Change type of flags to
5318 gdb_disassembly_flags.
5320 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5322 * fbsd-nat.c: Include "inf-ptrace.h".
5323 (USE_SIGTRAP_SIGINFO): Conditionally define.
5324 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
5325 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
5326 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
5328 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
5330 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
5332 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
5333 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
5334 "supports_stopped_by_hw_breakpoint" target methods.
5336 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5338 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
5339 * fbsd-nat.c (debug_fbsd_nat): New variable.
5340 (show_fbsd_nat_debug): New function.
5341 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
5342 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
5344 2018-03-04 John Baldwin <jhb@FreeBSD.org>
5346 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
5347 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
5349 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
5350 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
5353 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5355 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
5356 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
5358 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5360 * charset.c (struct charset_vector): New.
5361 (charsets): Change type to charset_vector.
5362 (find_charset_names): Adjust.
5364 (_initialize_charset): Adjust.
5366 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5368 * progspace.h (struct program_space) <deleted_solibs>: Change
5369 type to std::vector<std::string>.
5370 * progspace.c (clear_program_space_solib_cache): Adjust.
5371 * breakpoint.c (print_solib_event): Adjust.
5372 (check_status_catch_solib): Adjust.
5373 * solib.c (update_solib_list): Adjust.
5374 * ui-out.h (class ui_out) <field_string>: New overload.
5375 * ui-out.c (ui_out::field_string): New overload.
5377 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5379 * progspace.h (struct program_space): Add constructor and
5380 destructor, initialize fields.
5381 (add_program_space): Remove.
5382 * progspace.c (add_program_space): Rename to...
5383 (program_space::program_space): ... this.
5384 (release_program_space): Rename to...
5385 (program_space::~program_space): ... this.
5386 (delete_program_space): Use delete to delete program_space.
5387 (initialize_progspace): Use new to allocate program_space.
5388 * inferior.c (add_inferior_with_spaces): Likewise.
5389 (clone_inferior_command): Likewise.
5390 * infrun.c (follow_fork_inferior): Likewise.
5391 (handle_vfork_child_exec_or_exit): Likewise.
5393 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5395 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
5396 (delim_string_to_char_ptr_vec): Return std::vector of
5397 gdb::unique_xmalloc_ptr.
5398 (dirnames_to_char_ptr_vec_append): Take std::vector of
5399 gdb::unique_xmalloc_ptr.
5400 (dirnames_to_char_ptr_vec): Return std::vector of
5401 gdb::unique_xmalloc_ptr.
5402 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
5403 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
5404 (delim_string_to_char_ptr_vec): Return an std::vector of
5405 gdb::unique_xmalloc_ptr, adjust the code.
5406 (dirnames_to_char_ptr_vec_append): Take an std::vector of
5407 gdb::unique_xmalloc_ptr, adjust the code.
5408 (dirnames_to_char_ptr_vec): Return an std::vector of
5409 gdb::unique_xmalloc_ptr, adjust the code.
5410 * auto-load.c (auto_load_safe_path_vec): Change type to
5411 std::vector of gdb::unique_xmalloc_ptr.
5412 (auto_load_expand_dir_vars): Return an std::vector of
5413 gdb::unique_xmalloc_ptr, adjust the code.
5414 (auto_load_safe_path_vec_update): Adjust.
5415 (filename_is_in_auto_load_safe_path_vec): Adjust.
5416 (auto_load_objfile_script_1): Adjust.
5417 * build-id.c (build_id_to_debug_bfd): Adjust.
5418 * linux-thread-db.c (thread_db_load_search): Adjust.
5419 * source.c (add_path): Adjust.
5421 * symfile.c (find_separate_debug_file): Adjust.
5422 * utils.c (do_free_char_ptr_vec): Remove.
5423 (make_cleanup_free_char_ptr_vec): Remove.
5425 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
5428 * common/pathstuff.c: Conditionally include "<windows.h>".
5430 2018-03-01 Georg Sauthoff <mail@georg.so>
5433 * gcore.in: Quote variables and switch interpreter to bash.
5435 2018-03-01 Tom Tromey <tom@tromey.com>
5437 * dwarf2read.c (alloc_discriminant_info): Fix default_index
5438 assertion. Add assertion for discriminant_index.
5439 (quirk_rust_enum): Use correct base type name in univariant case.
5441 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
5443 * record.c (get_call_history_modifiers): Return a
5445 (cmd_record_call_history): Adjust.
5446 * record-btrace.c (record_btrace_call_history): Adjust.
5447 (record_btrace_call_history_range): Adjust.
5448 (record_btrace_call_history_from): Adjust.
5449 * target-debug.h (target_debug_print_record_print_flags): New.
5450 * target-delegates.c: Re-generate.
5451 * target.c (target_call_history): Change flags type.
5452 (target_call_history_from): Likewise.
5453 (target_call_history_range): Likewise.
5454 * target.h (struct target_ops) <target_call_history>: Likewise.
5455 (target_call_history_from): Likewise.
5456 (target_call_history_range): Likewise.
5458 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5459 Simon Marchi <simon.marchi@polymtl.ca>
5461 * common/common-utils.c: Include "sys/stat.h".
5462 (is_regular_file): Move here from "source.c"; change return
5464 * common/common-utils.h (is_regular_file): New prototype.
5465 * common/pathstuff.c (contains_dir_separator): New function.
5466 * common/pathstuff.h (contains_dir_separator): New prototype.
5467 * source.c: Don't include "sys/stat.h".
5468 (is_regular_file): Move to "common/common-utils.c".
5470 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5472 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
5473 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
5474 * auto-load.c: Include "common/pathstuff.h".
5475 * common/common-def.h (current_directory): Move here.
5476 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
5478 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
5480 * common/pathstuff.c: New file.
5481 * common/pathstuff.h: New file.
5482 * compile/compile.c: Include "common/pathstuff.h".
5483 * defs.h (current_directory): Move to "common/common-defs.h".
5484 * dwarf2read.c: Include "common/pathstuff.h".
5486 * guile/scm-safe-call.c: Likewise.
5487 * linux-thread-db.c: Likewise.
5489 * nto-tdep.c: Likewise.
5490 * objfiles.c: Likewise.
5491 * source.c: Likewise.
5492 * symtab.c: Likewise.
5493 * utils.c: Include "common/pathstuff.h".
5494 (gdb_realpath): Move to "common/pathstuff.c".
5495 (gdb_realpath_keepfile): Likewise.
5496 (gdb_abspath): Likewise.
5497 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
5498 (gdb_realpath_keepfile): Likewise.
5499 (gdb_abspath): Likewise.
5501 2018-02-28 John Baldwin <jhb@FreeBSD.org>
5503 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
5504 wildcard process pid for super_resume for kernels with a
5507 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
5509 * compile/compile.c (get_args): Add additional comments
5510 explaining function.
5512 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
5513 Tom Tromey <tom@tromey.com>
5515 * target.h (memory_write_request_s): Remove typedef. Don't define
5517 (target_write_memory_blocks): Change argument to std::vector.
5518 (struct memory_write_request): Add constructor.
5519 * target-memory.c (compare_block_starting_address): Return bool.
5520 Change argument types.
5521 (claim_memory): Change arguments to use std::vector.
5522 (split_regular_and_flash_blocks, blocks_to_erase)
5523 (compute_garbled_blocks): Likewise.
5524 (cleanup_request_data, cleanup_write_requests_vector): Remove.
5525 (target_write_memory_blocks): Change argument to std::vector.
5526 * symfile.c (struct load_section_data): Add constructor and
5527 destructor. Use std::vector for "requests".
5528 (struct load_progress_data): Add initializers.
5529 (load_section_callback): Update. Use "new".
5530 (clear_memory_write_data): Remove.
5531 (generic_load): Update.
5533 2018-02-27 Alan Hayward <alan.hayward@arm.com>
5535 * arch/aarch64.h: Use common/tdesc.h.
5537 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5539 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
5540 architecture with a 64-bit ABI.
5542 2018-02-26 Maciej W. Rozycki <macro@mips.com>
5544 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
5545 ahead of target description loading.
5547 2018-02-26 Tom Tromey <tom@tromey.com>
5549 * stack.c (backtrace_command_1): Update.
5550 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
5552 * python/py-framefilter.c (py_print_frame)
5553 (gdbpy_apply_frame_filter): Change type of "flags".
5554 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
5556 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
5557 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
5558 * extension.h (enum frame_filter_flag): Rename from
5560 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
5561 (apply_ext_lang_frame_filter): Change type of "flags".
5562 * extension.c (apply_ext_lang_frame_filter): Change type of
5564 * extension-priv.h (struct extension_language_ops)
5565 <apply_frame_filter>: Change type of "flags".
5567 2018-02-26 Tom Tromey <tom@tromey.com>
5570 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
5571 off-by-one in py_end computation.
5572 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
5574 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
5577 2018-02-26 Tom Tromey <tom@tromey.com>
5579 * dwarf2read.c (struct variant_field): New.
5580 (struct nextfield) <variant>: New field.
5581 (dwarf2_add_field): Handle DW_TAG_variant_part.
5582 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
5583 discriminated union.
5584 (read_structure_type): Handle DW_TAG_variant_part.
5585 (handle_struct_member_die): New function, extracted from
5586 process_structure_scope. Handle DW_TAG_variant.
5587 (process_structure_scope): Handle discriminated unions. Call
5588 handle_struct_member_die.
5590 2018-02-26 Tom Tromey <tom@tromey.com>
5592 * rust-lang.h (rust_last_path_segment): Declare.
5593 * rust-lang.c (rust_last_path_segment): Now public. Change
5595 (struct disr_info): Remove.
5596 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
5597 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
5598 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
5599 (rust_enum_p, rust_enum_variant): New function.
5600 (rust_underscore_fields): Remove "offset" parameter.
5601 (rust_print_enum): New function.
5602 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
5603 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
5604 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
5606 (rust_internal_print_type): New function, from rust_print_type.
5608 (rust_print_type): Call rust_internal_print_type.
5609 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
5610 Update enum handling.
5611 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
5612 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
5613 (rust_union_quirks): New functions.
5614 (process_full_comp_unit, process_full_type_unit): Call
5616 (process_structure_scope): Update rust_unions if necessary.
5618 2018-02-26 Tom Tromey <tom@tromey.com>
5620 * value.h (value_union_variant): Declare.
5621 * valops.c (value_union_variant): New function.
5622 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
5623 (struct discriminant_info): New.
5624 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
5626 (struct main_type) <flag_discriminated_union>: New field.
5628 2018-02-26 Tom Tromey <tom@tromey.com>
5630 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5631 unittests/unpack-selftests.c.
5632 * unittests/unpack-selftests.c: New file.
5633 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
5635 2018-02-26 Yao Qi <yao.qi@linaro.org>
5637 * dwarf2read.c (struct partial_die_info) <read>: New method.
5638 (read_partial_die): Remove the declaration.
5639 (load_partial_dies): Update.
5640 (partial_die_info::partial_die_info):
5641 (read_partial_die): Change it to partial_die_info::read.
5643 2018-02-26 Yao Qi <yao.qi@linaro.org>
5645 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
5646 (fixup_partial_die): Remove declaration.
5647 (scan_partial_symbols): Update.
5648 (partial_die_parent_scope): Likewise.
5649 (partial_die_full_name): Likewise.
5650 (fixup_partial_die): Change it to partial_die_info::fixup.
5652 2018-02-26 Yao Qi <yao.qi@linaro.org>
5654 * dwarf2read.c (read_partial_die): Update the declaration.
5655 (load_partial_dies): Caller update.
5656 (read_partial_die): Remove one argument abbrev_len.
5658 2018-02-26 Yao Qi <yao.qi@linaro.org>
5660 * dwarf2read.c (struct partial_die_info): Add ctor, delete
5661 assignment operator.
5662 (load_partial_dies): Use ctor and copy ctor.
5663 (read_partial_die): Update.
5664 (dwarf2_cu::find_partial_die): Use ctor.
5666 2018-02-26 Yao Qi <yao.qi@linaro.org>
5668 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
5669 (find_partial_die_in_comp_unit): Change it to
5670 dwarf2_cu::find_partial_die.
5671 (find_partial_die): Update.
5673 2018-02-26 Yao Qi <yao.qi@linaro.org>
5675 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
5678 2018-02-26 Yao Qi <yao.qi@linaro.org>
5680 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
5682 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5684 * arch/amd64.h: Use common/tdesc.h.
5685 * arch/i386.c: Likewise.
5686 * arch/i386.h: Likewise.
5687 * arch/tic6x.c: Likewise.
5688 * arch/tdesc.h: Move file from here...
5689 * common/tdesc.h: ...to here.
5690 * features/aarch64-core.c: Regenerate.
5691 * features/aarch64-fpu.c: Regenerate.
5692 * features/i386/32bit-avx.c: Regenerate.
5693 * features/i386/32bit-avx512.c: Regenerate.
5694 * features/i386/32bit-core.c: Regenerate.
5695 * features/i386/32bit-linux.c: Regenerate.
5696 * features/i386/32bit-mpx.c: Regenerate.
5697 * features/i386/32bit-pkeys.c: Regenerate.
5698 * features/i386/32bit-sse.c: Regenerate.
5699 * features/i386/64bit-avx.c: Regenerate.
5700 * features/i386/64bit-avx512.c: Regenerate.
5701 * features/i386/64bit-core.c: Regenerate.
5702 * features/i386/64bit-linux.c: Regenerate.
5703 * features/i386/64bit-mpx.c: Regenerate.
5704 * features/i386/64bit-pkeys.c: Regenerate.
5705 * features/i386/64bit-segments.c: Regenerate.
5706 * features/i386/64bit-sse.c: Regenerate.
5707 * features/i386/x32-core.c: Regenerate.
5708 * features/tic6x-c6xp.c: Regenerate.
5709 * features/tic6x-core.c: Regenerate.
5710 * features/tic6x-gp.c: Regenerate.
5711 * target-descriptions.c: Use common/tdesc.h.
5712 * target-descriptions.h: Likewise.
5714 2018-02-24 Tom Tromey <tom@tromey.com>
5716 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
5717 (try_thread_db_load_from_dir, thread_db_load_search): Use
5719 (info_auto_load_libthread_db_compare): Return bool. Change
5721 (info_auto_load_libthread_db): Use std::vector, std::string.
5724 2018-02-24 Tom Tromey <tom@tromey.com>
5726 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
5728 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
5730 * gdbarch.c: Rebuild.
5731 * gdbarch.h: Rebuild.
5732 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
5733 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
5734 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
5737 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
5739 * gdbtypes.h (sect_offset): Change type to uint64_t.
5740 (sect_offset_str): New function.
5741 * dwarf2read.c (create_addrmap_from_aranges): Use
5743 (error_check_comp_unit_head): Likewise.
5744 (create_debug_type_hash_table): Likewise.
5745 (read_cutu_die_from_dwo): Likewise.
5746 (init_cutu_and_read_dies): Likewise.
5747 (init_cutu_and_read_dies_no_follow): Likewise.
5748 (process_psymtab_comp_unit_reader): Likewise.
5749 (partial_die_parent_scope): Likewise.
5750 (peek_die_abbrev): Likewise.
5751 (process_queue): Likewise.
5752 (dwarf2_physname): Likewise.
5753 (read_namespace_alias): Likewise.
5754 (read_import_statement): Likewise.
5755 (create_dwo_cu_reader): Likewise.
5756 (create_cus_hash_table): Likewise.
5757 (lookup_dwo_cutu): Likewise.
5758 (inherit_abstract_dies): Likewise.
5759 (read_func_scope): Likewise.
5760 (read_call_site_scope): Likewise.
5761 (dwarf2_add_member_fn): Likewise.
5762 (read_common_block): Likewise.
5763 (read_module_type): Likewise.
5764 (read_typedef): Likewise.
5765 (read_subrange_type): Likewise.
5766 (load_partial_dies): Likewise.
5767 (read_partial_die): Likewise.
5768 (find_partial_die): Likewise.
5769 (read_str_index): Likewise.
5770 (dwarf2_string_attr): Likewise.
5771 (build_error_marker_type): Likewise.
5772 (lookup_die_type): Likewise.
5773 (dump_die_shallow): Likewise.
5774 (follow_die_ref): Likewise.
5775 (dwarf2_fetch_die_loc_sect_off): Likewise.
5776 (dwarf2_fetch_constant_bytes): Likewise.
5777 (follow_die_sig): Likewise.
5778 (get_signatured_type): Likewise.
5779 (get_DW_AT_signature_type): Likewise.
5780 (dwarf2_find_containing_comp_unit): Likewise.
5781 (set_die_type): Likewise.
5783 2018-02-21 John Baldwin <jhb@FreeBSD.org>
5785 * arch/aarch64.c: Include "common-defs.h".
5786 * arch/amd64.c: Likewise.
5787 * arch/i386.c: Likewise.
5789 2018-02-21 Tom Tromey <tom@tromey.com>
5791 * value.h: (extract_field_op): Update.
5792 * eval.c (extract_field_op): Return a const char *.
5793 * expression.h (parse_expression_for_completion): Update.
5794 * completer.c (complete_expression): Update.
5795 (add_struct_fields): Make fieldname const.
5796 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
5797 (mark_completion_tag, parse_exp_in_context_1): Update.
5798 (parse_expression_for_completion): Change "name" to
5799 unique_xmalloc_ptr*.
5801 2018-02-21 Tom Tromey <tom@tromey.com>
5803 * infcall.c (call_function_by_hand_dummy): Use std::vector.
5805 2018-02-21 Yao Qi <yao.qi@linaro.org>
5807 * avr-tdep.c (avr_read_pc): Change parameter type to
5809 * gdbarch.sh (read_pc): Likewise.
5810 * gdbarch.c: Re-generated.
5811 * gdbarch.h: Re-generated.
5812 * hppa-tdep.c (hppa_read_pc): Change parameter type to
5814 * ia64-tdep.c (ia64_read_pc): Likewise.
5815 * mips-tdep.c (mips_read_pc): Likewise.
5816 * spu-tdep.c (spu_read_pc): Likewise.
5818 2018-02-21 Yao Qi <yao.qi@linaro.org>
5820 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
5821 * regcache-dump.c: New file.
5822 * regcache.c: Move register_dump to regcache-dump.c.
5823 (maintenance_print_registers): Likewise.
5824 (maintenance_print_raw_registers): Likewise.
5825 (maintenance_print_cooked_registers): Likewise.
5826 (maintenance_print_register_groups): Likewise.
5827 (maintenance_print_remote_registers): Likewise.
5828 (_initialize_regcache): Likewise.
5829 * regcache.h (register_dump): Moved from regcache.c.
5831 2018-02-21 Yao Qi <yao.qi@linaro.org>
5833 * regcache.c (regcache::regcache): Update.
5834 (regcache::invalidate): Move it to detached_regcache::invalidate.
5835 (get_thread_arch_aspace_regcache): Update.
5836 (regcache::raw_update): Update.
5837 (regcache::cooked_read): Remove some code.
5838 (regcache::cooked_read_value): Likewise.
5839 (regcache::raw_write): Remove assert on m_readonly_p.
5840 (regcache::raw_supply_integer): Move it to
5841 detached_regcache::raw_supply_integer.
5842 (regcache::raw_supply_zeroed): Likewise.
5843 * regcache.h (detached_regcache) <raw_supply_integer>: New
5845 <raw_supply_zeroed, invalidate>: Likewise.
5846 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
5847 <invalidate>: Likewise.
5848 <m_readonly_p>: Removed.
5850 2018-02-21 Yao Qi <yao.qi@linaro.org>
5852 * infcmd.c (get_return_value): Let stop_regs point to
5853 get_current_regcache.
5854 * regcache.c (regcache::regcache): Remove.
5855 (register_dump_reg_buffer): New class.
5856 (regcache_print): Adjust.
5857 * regcache.h (regcache): Remove constructors.
5859 2018-02-21 Yao Qi <yao.qi@linaro.org>
5861 * regcache.c (class register_dump): New class.
5862 (register_dump_regcache, register_dump_none): New class.
5863 (register_dump_remote, register_dump_groups): New class.
5864 (regcache_print): Update.
5865 * regcache.h (regcache_dump_what): Move it to regcache.c.
5866 (regcache) <dump>: Remove.
5868 2018-02-21 Yao Qi <yao.qi@linaro.org>
5870 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
5872 (jit_unwind_reg_set_impl): Call raw_supply.
5873 (jit_frame_sniffer): Use reg_buffer_rw.
5874 * record-full.c (record_full_core_regbuf): Change its type.
5875 (record_full_core_open_1): Use reg_buffer_rw.
5876 (record_full_close): Likewise.
5877 (record_full_core_fetch_registers): Use regcache->raw_supply.
5878 (record_full_core_store_registers): Likewise.
5879 * regcache.c (regcache::get_register_status): Move it to
5881 (regcache_raw_set_cached_value): Remove.
5882 (regcache::raw_set_cached_value): Remove.
5883 (regcache::raw_write): Call raw_supply.
5884 (regcache::raw_supply): Move it to reg_buffer_rw.
5885 * regcache.h (regcache_raw_set_cached_value): Remove.
5886 (reg_buffer_rw): New class.
5888 2018-02-21 Yao Qi <yao.qi@linaro.org>
5890 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
5891 readonly_detached_regcache.
5892 (dummy_frame_prev_register): Use regcache->cooked_read.
5893 * frame.c (frame_save_as_regcache): Change return type.
5894 (frame_pop): Update.
5895 * frame.h (frame_save_as_regcache): Update declaration.
5896 * inferior.h (get_infcall_suspend_state_regcache): Update
5898 * infrun.c (infcall_suspend_state) <registers>: use
5899 readonly_detached_regcache.
5900 (save_infcall_suspend_state): Don't use regcache_dup.
5901 (get_infcall_suspend_state_regcache): Change return type.
5902 * linux-fork.c (struct fork_info) <savedregs>: Change to
5903 readonly_detached_regcache.
5905 (fork_save_infrun_state): Don't use regcache_dup.
5906 (info_checkpoints_command): Adjust.
5907 * mi/mi-main.c (register_changed_p): Update declaration.
5908 (mi_cmd_data_list_changed_registers): Use
5909 readonly_detached_regcache.
5910 (register_changed_p): Change parameter type to
5911 readonly_detached_regcache.
5912 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
5913 readonly_detached_regcache.
5914 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
5915 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
5917 (regcache::save): Move it to reg_buffer.
5918 (regcache::restore): Change parameter type.
5919 (regcache_dup): Remove.
5920 * regcache.h (reg_buffer) <save>: New method.
5921 (readonly_detached_regcache): New class.
5922 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
5923 readonly_detached_regcache.
5924 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
5926 2018-02-21 Yao Qi <yao.qi@linaro.org>
5928 * frame.c (frame_save_as_regcache): Use regcache method save.
5929 (frame_pop): Use regcache method restore.
5930 * infrun.c (restore_infcall_suspend_state): Likewise.
5931 * linux-fork.c (fork_load_infrun_state): Likewise.
5932 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
5934 * regcache.c (regcache_save): Remove.
5935 (regcache::restore): More asserts.
5936 (regcache_cpy): Remove.
5937 * regcache.h (regcache_save): Remove the declaration.
5938 (regcache::restore): Move from private to public.
5939 Remove the friend declaration of regcache_cpy.
5940 (regcache_cpy): Remove declaration.
5942 2018-02-21 Yao Qi <yao.qi@linaro.org>
5944 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
5945 parameter type to 'readable_regcache *'.
5946 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5947 * arm-tdep.c (arm_neon_quad_read): Likewise.
5948 (arm_pseudo_read): Likewise.
5949 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5950 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5951 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5952 * gdbarch.c: Re-generated.
5953 * gdbarch.h: Re-generated.
5954 * gdbarch.sh (pseudo_register_read): Change parameter type to
5955 'readable_regcache *'.
5956 (pseudo_register_read_value): Likewise.
5957 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
5958 (h8300_pseudo_register_read): Likewise.
5959 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
5960 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5961 (i386_pseudo_register_read_into_value): Likewise.
5962 (i386_pseudo_register_read_value): Likewise.
5963 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
5965 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
5966 * m32c-tdep.c (m32c_raw_read): Likewise.
5967 (m32c_read_flg): Likewise.
5968 (m32c_banked_register): Likewise.
5969 (m32c_banked_read): Likewise.
5970 (m32c_sb_read): Likewise.
5971 (m32c_part_read): Likewise.
5972 (m32c_cat_read): Likewise.
5973 (m32c_r3r2r1r0_read): Likewise.
5974 (m32c_pseudo_register_read): Likewise.
5975 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5976 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5977 (mep_pseudo_cr64_read): Likewise.
5978 (mep_pseudo_register_read): Likewise.
5979 * mips-tdep.c (mips_pseudo_register_read): Likewise.
5980 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5981 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5982 * regcache.c (regcache::raw_read): Move it to readable_regcache.
5983 (regcache::cooked_read): Likewise.
5984 (regcache::cooked_read_value): Likewise.
5985 (regcache_cooked_read_signed):
5986 (regcache::cooked_read): Likewise.
5987 * regcache.h (readable_regcache): New class.
5988 (regcache): Inherit readable_regcache. Move some methods to
5990 * rl78-tdep.c (rl78_pseudo_register_read): Change
5991 parameter type to 'readable_regcache *'.
5992 * rs6000-tdep.c (do_regcache_raw_read): Remove.
5993 (e500_pseudo_register_read): Change parameter type to
5994 'readable_regcache *'.
5995 (dfp_pseudo_register_read): Likewise.
5996 (vsx_pseudo_register_read): Likewise.
5997 (efpr_pseudo_register_read): Likewise.
5998 * s390-tdep.c (s390_pseudo_register_read): Likewise.
5999 * sh-tdep.c (sh_pseudo_register_read): Likewise.
6000 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6001 (sh64_pseudo_register_read): Likewise.
6002 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6003 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6004 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6005 (spu_pseudo_register_read): Likewise.
6006 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6007 (xtensa_pseudo_register_read): Likewise.
6009 2018-02-21 Yao Qi <yao.qi@linaro.org>
6011 * regcache.c (regcache::regcache): Call reg_buffer ctor.
6012 (regcache::arch): Move it to reg_buffer::arch.
6013 (regcache::register_buffer): Likewise.
6014 (regcache::assert_regnum): Likewise.
6015 (regcache::num_raw_registers): Likewise.
6016 * regcache.h (reg_buffer): New class.
6017 (regcache): Inherit reg_buffer.
6019 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
6021 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6022 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6024 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
6026 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6028 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6030 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6031 (SFILES): Remove common/*.c files.
6032 (COMMON_OBS): Remove some *.o files built from common/*.c files.
6033 * common/common.host: Add common reference.
6034 * configure.ac: Likewise.
6035 * configure: Regenerate.
6037 2018-02-16 Yao Qi <yao.qi@linaro.org>
6039 * block.c (block_namespace_info): Inherit allocate_on_obstack.
6040 (block_initialize_namespace): Use new.
6041 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6042 (dwarf2_free_objfile): Use delete.
6043 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6044 (copy_type_recursive): Use new.
6045 * gdb_obstack.h (allocate_on_obstack): New.
6047 2018-02-15 Yao Qi <yao.qi@linaro.org>
6050 * inferior.c (exit_inferior_1): Reset inf->control.
6052 2018-02-15 Joel Brobecker <brobecker@adacore.com>
6054 * ada-lang.c (ada_to_fixed_value_create): Delete advance
6057 2018-02-14 Pedro Alves <palves@redhat.com>
6059 * frame-unwind.c (frame_unwind_try_unwinder): Always call
6060 frame_cleanup_after_sniffer on exception.
6062 2018-02-14 Tom Tromey <tom@tromey.com>
6064 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6066 (solib_bfd_open): Make pathname const.
6067 * solib.c (solib_bfd_open): Make pathname const.
6068 * solib-spu.c (spu_bfd_fopen): Make name const.
6069 (spu_bfd_open): Make pathname const.
6070 * solib-darwin.c (darwin_bfd_open): Make pathname const.
6071 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6073 2018-02-14 Tom Tromey <tom@tromey.com>
6075 * symfile.c (symfile_bfd_open): Update.
6076 * source.h (openp, source_full_path_of, find_and_open_source):
6077 Change argument type to unique_xmalloc_ptr.
6078 * source.c (openp): Take a unique_xmalloc_ptr.
6079 (source_full_path_of, find_and_open_source): Likewise.
6080 (open_source_file, symtab_to_fullname): Update.
6081 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6083 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6084 (exec_file_find): Update.
6085 * psymtab.c (psymtab_to_fullname): Update.
6086 * nto-tdep.h (nto_find_and_open_solib): Update.
6087 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6089 * exec.c (exec_file_attach): Update.
6090 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6091 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6093 2018-02-14 Tom Tromey <tom@tromey.com>
6095 * solib.c: Include source.h.
6096 * nto-tdep.c: Include source.h.
6097 * mi/mi-cmd-env.c: Include source.h.
6098 * infcmd.c: Include source.h.
6099 * exec.c: Include source.h.
6100 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6101 (add_path, directory_switch, source_path, init_source_path): Move
6103 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6104 (add_path, directory_switch, source_path, init_source_path):
6107 2018-02-14 Tom Tromey <tom@tromey.com>
6109 * solist.h (exec_file_find, solib_find): Return
6111 (solib_bfd_fopen): Take a const char *.
6112 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6113 (exec_file_find, solib_find): Likewise.
6114 (solib_bfd_fopen): Do not take ownership of "pathname".
6115 (solib_bfd_open): Use unique_xmalloc_ptr.
6116 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6117 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6118 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6119 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6121 2018-02-14 Joel Brobecker <brobecker@adacore.com>
6123 * ada-lang.c (name_match_type_from_name): Remove reference to
6124 ada_name_for_lookup in function's documentation.
6125 * ada-lang.h (ada_name_for_lookup): Delete declaration.
6127 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6129 * defs.h (enum openp_flags): New enum.
6130 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6131 Move to enum openp_flags.
6132 (openp_flags): New enum flags.
6133 (openp): Change parameter type to openp_flags.
6134 * source.c (openp): Change parameter type to openp_flags.
6135 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6136 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6138 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6140 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6143 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
6145 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6147 (class dwarf2_queue_guard): ...the destructor of this new class.
6148 (dw2_do_instantiate_symtab): Create instance of the new class
6149 dwarf2_queue_guard, remove cleanup.
6151 2018-02-09 Tom Tromey <tom@tromey.com>
6153 * source.c (find_source_lines): Don't reference past the end of
6156 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6158 * remote.c (remote_btrace_maybe_reopen): Change error message.
6159 * btrace.c (btrace_enable): Likewise.
6160 (parse_xml_btrace): Likewise.
6161 (parse_xml_btrace_conf): Likewise.
6163 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6165 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6166 (linux_enable_pt, linux_enable_bts): Call
6167 diagnose_perf_event_open_fail.
6169 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6171 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6172 Remove parameter and change return type. Update callers. Move it.
6173 (linux_enable_bts, linux_enable_pt): Improve error message.
6174 (linux_enable_pt): Remove zero buffer size check.
6175 (linux_enable_btrace): Improve error messages. Remove NULL return
6178 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6180 * btrace.c (btrace_enable): Remove target_supports_btrace call.
6181 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
6182 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
6183 (linux_supports_pt, linux_supports_btrace): Remove.
6184 (linux_enable_bts): Call cpu_supports_bts.
6185 * nat/linux-btrace.h (linux_supports_btrace): Remove.
6186 * remote.c (remote_supports_btrace): Remove.
6187 (init_remote_ops): Remove remote_supports_btrace.
6188 * target-delegates.c: Regenerated.
6189 * target.c (target_supports_btrace): Remove.
6190 * target.h (target_ops) <to_supports_btrace>: Remove
6191 (target_supports_btrace): Remove.
6192 * x86-linux-nat.c (x86_linux_create_target): Remove
6193 linux_supports_btrace.
6195 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6197 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
6199 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
6200 exception and use message in own exception.
6202 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6204 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
6205 (perf_event_pt_event_type): Use gdb_file_up.
6206 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
6207 scoped_fd, and scoped_mmap.
6209 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6211 * common/scoped_mmap.h: New.
6212 * unittests/scoped_mmap-selftest.c: New.
6213 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6214 unittests/scoped_mmap-selftest.c.
6216 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6218 * common/scoped_fd.h: New.
6219 * unittests/scoped_fd-selftest.c: New.
6220 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6221 unittests/scoped_fd-selftest.c.
6223 2018-02-09 Tom Tromey <tom@tromey.com>
6225 * auto-load.c (auto_load_section_scripts): Use
6226 gdb::unique_xmalloc_ptr.
6228 2018-02-09 Tom Tromey <tom@tromey.com>
6230 * auto-load.c (execute_script_contents): Use std::string.
6232 2018-02-09 Joel Brobecker <brobecker@adacore.com>
6234 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
6235 Python function, rather than a new command.
6237 2018-02-08 Tom Tromey <tom@tromey.com>
6239 * solib.c (solib_find_1): Use std::string.
6240 (solib_bfd_fopen): Use unique_xmalloc_ptr.
6242 2018-02-08 Tom Tromey <tom@tromey.com>
6244 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
6246 2018-02-08 Tom Tromey <tom@tromey.com>
6248 * source.c (find_source_lines): Use gdb::def_vector.
6250 2018-02-08 Tom Tromey <tom@tromey.com>
6252 * macrocmd.c (struct temporary_macro_definition): New.
6253 (macro_define_command): Use temporary_macro_definition. Remove
6255 (free_macro_definition_ptr): Remove.
6257 2018-02-08 Tom Tromey <tom@tromey.com>
6259 * macroexp.c (maybe_expand): Use std::string.
6261 2018-02-08 Tom Tromey <tom@tromey.com>
6263 * macroexp.c (struct macro_buffer): Add initializers for some
6265 (init_buffer, init_shared_buffer, free_buffer)
6266 (free_buffer_return_text): Remove.
6267 (macro_buffer): New constructors.
6268 (~macro_buffer): New destructor.
6269 (macro_buffer::set_shared): New method.
6270 (macro_buffer::resize_buffer, macro_buffer::appendc)
6271 (macro_buffer::appendmem): Now methods, not free functions.
6272 (set_token, append_tokens_without_splicing, stringify)
6273 (macro_stringify): Update.
6274 (gather_arguments): Change return type. Remove argc_p argument,
6275 add args_ptr argument. Use std::vector.
6276 (substitute_args): Remove argc argument. Accept std::vector.
6277 (expand): Update. Use std::vector.
6278 (scan, macro_expand, macro_expand_next): Update.
6280 2018-02-08 Tom Tromey <tom@tromey.com>
6282 * symtab.c (default_collect_symbol_completion_matches_break_on):
6283 Use unique_xmalloc_ptr.
6284 * macroscope.h: (sal_macro_scope, user_macro_scope)
6285 (default_macro_scope): Return unique_xmalloc_ptr.
6286 * macroscope.c (sal_macro_scope, user_macro_scope)
6287 (default_macro_scope): Return unique_xmalloc_ptr.
6288 * macroexp.h (macro_expand, macro_expand_once): Return
6290 * macroexp.c (macro_expand, macro_expand_once): Return
6292 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6293 (info_macro_command, info_macros_command): Use
6295 * compile/compile-c-support.c (write_macro_definitions): Use
6297 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
6299 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
6301 * value.c (value_static_field): Assign field type instead of
6302 containing type when returning an optimized out value.
6304 2018-02-06 Yao Qi <yao.qi@linaro.org>
6306 * ft32-tdep.c (ft32_read_pc): Remove.
6307 (ft32_write_pc): Remove.
6308 (ft32_gdbarch_init): Update.
6309 * m32r-tdep.c (m32r_read_pc): Remove.
6310 (m32r_gdbarch_init): Update.
6311 * mep-tdep.c (mep_read_pc): Remove.
6312 (mep_gdbarch_init): Update.
6313 * microblaze-tdep.c (microblaze_write_pc): Remove.
6314 (microblaze_gdbarch_init): Update.
6315 * mn10300-tdep.c (mn10300_read_pc): Remove.
6316 (mn10300_write_pc): Remove.
6317 (mn10300_gdbarch_init): Update.
6318 * moxie-tdep.c (moxie_read_pc): Remove.
6319 (moxie_write_pc): Remove.
6320 (moxie_gdbarch_init): Update.
6322 2018-02-06 Yao Qi <yao.qi@linaro.org>
6324 * expprint.c (print_subexp_standard): Handle
6325 OP_F77_UNDETERMINED_ARGLIST.
6326 (dump_subexp_body_standard): Likewise.
6328 2018-02-05 Alan Hayward <alan.hayward@arm.com>
6330 * target-descriptions.c (tdesc_element_visitor) Add empty
6332 (tdesc_type): Move make_gdb_type from here.
6333 (tdesc_type_builtin): Likewise.
6334 (tdesc_type_vector): Likewise.
6335 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
6336 (make_gdb_type_struct): Move from tdesc_type_with_fields.
6337 (make_gdb_type_union): Likewise.
6338 (make_gdb_type_flags): Likewise.
6339 (make_gdb_type_enum): Likewise.
6340 (make_gdb_type): New function.
6341 (tdesc_register_type): Use static make_gdb_type.
6343 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
6345 * infcmd.c (default_print_one_register_info): Align natural-format
6346 column values consistently one under another.
6347 (pad_to_column): New function.
6349 2018-02-05 Joel Brobecker <brobecker@adacore.com>
6351 * dwarf2read.c (dwarf2_physname): Move commment.
6353 2018-02-01 Leszek Swirski <leszeks@google.com>
6355 * varobj.c (varobj_formatted_print_options): Allow recursive
6356 pretty printing if pretty printing is enabled.
6358 2018-02-01 Leszek Swirski <leszeks@google.com>
6360 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
6361 names after a structop as a filename.
6363 2018-02-01 Yao Qi <yao.qi@linaro.org>
6365 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
6366 (arm_record_coproc_data_proc): Likewise.
6368 2018-02-01 Yao Qi <yao.qi@linaro.org>
6370 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
6372 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
6374 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
6375 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
6377 2018-01-31 Pedro Alves <palves@redhat.com>
6379 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
6380 * inflow.c (child_terminal_save_inferior): Wrap reference to
6381 tcgetpgrp in HAVE_TERMIOS_H.
6382 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
6384 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
6385 always iterate over all inferiors.
6386 (gdbsim_cntrl_c): Adjust.
6387 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
6389 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6391 * gdbtypes.c (lookup_array_range_type): Make sure the array's
6392 index type is objfile-owned if the element type is as well.
6394 2018-01-31 Joel Brobecker <brobecker@adacore.com>
6398 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
6400 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
6401 "features/s390x-linux64.c".
6402 (_initialize_s390_linux_tdep): Remove initialization of tdescs
6403 s390_linux32 and s390x_linux64.
6404 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
6406 * s390-tdep.c: Include "features/s390-linux32.c" and
6407 "features/s390x-linux64.c".
6408 (s390_tdesc_valid): Add check for tdesc_has_registers.
6409 (s390_gdbarch_init): Make sure there is always a valid tdesc.
6410 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
6411 tdesc_s390x_linux64.
6412 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
6413 tdesc_s390x_linux64 to...
6414 * s390-tdep.h: ...here.
6416 2018-01-30 Pedro Alves <palves@redhat.com>
6419 * config.in, configure: Regenerate.
6420 * configure.ac: Check for getpgid.
6421 * go32-nat.c (go32_pass_ctrlc): New.
6422 (go32_target): Install it.
6423 * inf-child.c (inf_child_target): Install
6424 child_terminal_save_inferior, child_pass_ctrlc and
6426 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
6427 (inf_ptrace_target): No longer install it.
6428 * infcmd.c (interrupt_target_1): Adjust.
6429 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
6430 (child_interrupt): Declare.
6431 (inferior::terminal_state): New.
6432 * inflow.c (struct terminal_info): Update comments.
6433 (inferior_process_group): Delete.
6434 (terminal_is_ours): Delete.
6435 (gdb_tty_state): New.
6436 (child_terminal_init): Adjust.
6437 (is_gdb_terminal, sharing_input_terminal_1)
6438 (sharing_input_terminal): New functions.
6439 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
6440 Set the process's actual process group in the foreground if
6441 possible. Handle is_ours_for_output/is_ours distinction. Don't
6442 mark terminal as the inferior's if not sharing GDB's terminal.
6443 Don't check attach_flag.
6444 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
6445 pass down a target_terminal_state.
6446 (child_terminal_save_inferior): New, factored out from ...
6447 (child_terminal_ours_1): ... this. Handle
6448 target_terminal_state::is_ours_for_output.
6449 (child_interrupt, child_pass_ctrlc): New.
6450 (inflow_inferior_exit): Clear the inferior's terminal_state.
6451 (copy_terminal_info): Copy the inferior's terminal state.
6452 (_initialize_inflow): Remove reference to terminal_is_ours.
6453 * inflow.h (inferior_process_group): Delete.
6454 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
6455 * procfs.c (procfs_target): Don't install procfs_interrupt.
6456 (procfs_interrupt): Delete.
6457 * remote.c (remote_serial_quit_handler): Adjust.
6458 (remote_interrupt): Remove ptid parameter. Adjust.
6459 * target-delegates.c: Regenerate.
6460 * target.c: Include "terminal.h".
6461 (target_terminal::terminal_state): Rename to ...
6462 (target_terminal::m_terminal_state): ... this.
6463 (target_terminal::init): Adjust.
6464 (target_terminal::inferior): Adjust to per-inferior
6466 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
6467 (target_terminal::ours, target_terminal::ours_for_output): Use
6468 target_terminal_is_ours_kind.
6469 (target_interrupt): Remove ptid parameter. Adjust.
6470 (default_target_pass_ctrlc): Adjust.
6471 * target.h (target_ops::to_terminal_save_inferior): New field.
6472 (target_ops::to_interrupt): Remove ptid_t parameter.
6473 (target_interrupt): Remove ptid_t parameter. Update comment.
6474 (target_pass_ctrlc): Update comment.
6475 * target/target.h (target_terminal_state): New scoped enum,
6477 (target_terminal::terminal_state): ... here.
6478 (target_terminal::inferior): Update comments.
6479 (target_terminal::restore_inferior): New.
6480 (target_terminal::is_inferior, target_terminal::is_ours)
6481 (target_terminal::is_ours_for_output): Adjust.
6482 (target_terminal::scoped_restore_terminal_state): Adjust to
6483 rename, and call restore_inferior() instead of inferior().
6484 (target_terminal::scoped_restore_terminal_state::m_state): Change
6486 (target_terminal::terminal_state): Rename to ...
6487 (target_terminal::m_terminal_state): ... this and change type.
6489 2018-01-30 Pedro Alves <palves@redhat.com>
6491 * linux-nat.c (wait_for_signal): New function.
6492 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
6494 (async_terminal_is_ours)
6495 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
6496 (linux_nat_add_target): Don't override
6497 to_terminal_inferior/to_terminal_ours.
6499 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
6501 * remote.c (remote_follow_fork): Don't call "detach_inferior".
6503 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
6505 * dwarf2read.c (free_dwo_files): Add forward-declaration.
6506 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
6507 dwarf2_per_objfile_free here.
6508 (dwarf2_per_objfile_free): Remove.
6509 (_initialize_dwarf2_read): Don't register
6510 dwarf2_per_objfile_free as a registry cleanup.
6512 2018-01-27 Eli Zaretskii <eliz@gnu.org>
6514 Avoid compilation errors in MinGW native builds
6516 The error is triggered by including python-internal.h, and the
6519 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
6520 from build-gnulib/import/math.h:27,
6521 from d:/usr/Python26/include/pyport.h:235,
6522 from d:/usr/Python26/include/Python.h:58,
6523 from python/python-internal.h:94,
6524 from python/py-arch.c:24:
6525 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
6529 This happens because Python headers define 'hypot' to expand t
6530 '_hypot' in the Windows builds.
6531 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
6532 'hypoth'. This avoids a compilation error.
6534 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6536 * MAINTAINERS (Write After Approval): Fix ordering.
6538 2018-01-26 Alan Hayward <alan.hayward@arm.com>
6540 * MAINTAINERS (Write After Approval): Add Alan Hayward.
6542 2018-01-26 Alan Modra <amodra@gmail.com>
6544 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
6545 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
6546 Remove nop. Make const. Comment.
6547 (powerpc32_plt_stub_so_2): New.
6548 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
6549 Correct count. Update uses.
6550 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
6551 Move common code reading PLT entry word. Correct
6552 powerpc32_plt_stub PLT address calculation.
6553 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
6554 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
6555 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
6556 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
6557 (ppc64_standard_linkage8): Likewise.
6558 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
6559 Correct insns description.
6560 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
6562 2018-01-24 Pedro Alves <palves@redhat.com>
6564 GCC PR libstdc++/83906
6565 * gdbtypes.c (operator==(const dynamic_prop &,
6566 const dynamic_prop &)): New.
6567 (operator==(const range_bounds &, const range_bounds &)): New.
6568 (check_types_equal): Use them instead of memcmp.
6569 * gdbtypes.h (operator==(const dynamic_prop &,
6570 const dynamic_prop &)): Declare.
6571 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
6572 (operator==(const range_bounds &, const range_bounds &)): Declare.
6573 (operator!=(const range_bounds &, const range_bounds &)): Declare.
6575 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6577 * s390-linux-tdep.c (s390_record_address_mask)
6578 (s390_record_calc_disp_common, s390_record_calc_disp)
6579 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6580 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6581 (s390_process_record): Move to s390-tdep.c.
6582 (s390_linux_init_abi_any): Adjust.
6583 * s390-tdep.c (s390_record_address_mask)
6584 (s390_record_calc_disp_common, s390_record_calc_disp)
6585 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6586 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6587 (s390_process_record): Moved from s390-linux-tdep.c
6588 (s390_gdbarch_init): Adjust.
6590 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6592 * s390-linux-nat.c (s390-tdep.h): New include.
6593 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
6594 (HFILES_NO_SRCDIR): Add s390-tdep.h.
6595 (ALLDEPFILES): Add s390-tdep.c.
6596 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
6597 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
6598 * s390-tdep.h: ...this. New file.
6599 * s390-linux-tdep.c (s390-tdep.h): New include.
6600 (_initialize_s390_tdep): Rename to...
6601 (_initialize_s390_linux_tdep): ...this and adjust.
6602 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
6603 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
6605 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
6606 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
6607 (s390_is_partial_instruction, s390_software_single_step)
6608 (is_non_branch_ril, s390_displaced_step_copy_insn)
6609 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
6610 (s390_prologue_data, s390_addr, s390_store, s390_load)
6611 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
6612 (s390_register_call_saved, s390_guess_tracepoint_registers)
6613 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
6614 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
6615 (s390_pseudo_register_name, s390_pseudo_register_type)
6616 (s390_pseudo_register_read, s390_pseudo_register_write)
6617 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
6618 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
6619 (s390_addr_bits_remove, s390_address_class_type_flags)
6620 (s390_address_class_type_flags_to_name)
6621 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
6622 (s390_function_arg_float, s390_function_arg_vector)
6623 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
6624 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
6625 (s390_frame_align, s390_register_return_value, s390_return_value)
6626 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
6627 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
6628 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
6629 (s390_trad_frame_prev_register, s390_unwind_cache)
6630 (s390_prologue_frame_unwind_cache)
6631 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
6632 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
6633 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
6634 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
6635 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
6636 (s390_frame_base_address, s390_local_base_address)
6637 (s390_frame_base, s390_gcc_target_options)
6638 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
6639 (s390_validate_reg_range, s390_tdesc_valid)
6640 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
6641 * s390-tdep.c: ...this. New file.
6643 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6645 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
6646 (s390_process_record, s390_gdbarch_tdep_alloc)
6647 (s390_linux_init_abi_any): Use/set new hook.
6649 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6651 * s390-linux-tdep.c (osabi.h): New include.
6652 (s390_linux_init_abi_31, s390_linux_init_abi_64)
6653 (s390_linux_init_abi_any): New functions.
6654 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
6656 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6658 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
6659 tdesc_has_registers check
6661 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6663 * s390-linux-tdep.c (s390_tdesc_valid): New function.
6664 (s390_validate_reg_range): New macro.
6665 (s390_gdbarch_init): Adjust.
6667 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6669 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
6670 (s390_gdbarch_tdep_alloc): Adjust.
6671 (s390_gdbarch_init): Adjust.
6673 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6675 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
6676 <have_tdb>: Change type to bool.
6677 (s390_gdbarch_tdep_alloc): Adjust.
6678 (s390_gdbarch_init): Adjust.
6680 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6682 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
6683 (gdbarch_tdep) <have_upper, have_vx>: New fields.
6684 (s390_gdbarch_tdep_alloc): New function.
6685 (s390_gdbarch_init): Allocate tdep at start and use its fields
6686 instead of separate variables.
6688 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6690 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
6691 when looking for cached gdbarch and add comment for remaining.
6693 2018-01-22 Pedro Alves <palves@redhat.com>
6694 Sergio Durigan Junior <sergiodj@redhat.com>
6696 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
6699 2018-01-22 Maciej W. Rozycki <macro@mips.com>
6701 * MAINTAINERS: Update my company e-mail address.
6703 2018-01-22 Yao Qi <yao.qi@linaro.org>
6705 * regcache.c (cooked_write_test): New function.
6706 (_initialize_regcache): Register the test.
6708 2018-01-22 Yao Qi <yao.qi@linaro.org>
6710 * ia64-tdep.c (ia64_pseudo_register_read): Call
6711 regcache->cooked_read instead of regcache_cooked_read_unsigned.
6712 * m32c-tdep.c (m32c_cat_read): Likewise.
6713 (m32c_r3r2r1r0_read): Likewise.
6714 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6715 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6717 2018-01-22 Yao Qi <yao.qi@linaro.org>
6719 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
6720 method raw_read instead of regcache_raw_read.
6721 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6722 * arm-tdep.c (arm_neon_quad_read): Likewise.
6723 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6724 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6725 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6726 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
6727 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6728 (i386_pseudo_register_read_into_value): Likewise.
6729 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6730 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6731 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6732 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
6733 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
6734 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6735 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6736 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6737 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
6739 2018-01-22 Yao Qi <yao.qi@linaro.org>
6741 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
6742 * configure.tgt: Remove target mt.
6743 * mt-tdep.c: Remove.
6744 * regcache.c (cooked_read_test): Remove the check for mt.
6746 2018-01-22 Yao Qi <yao.qi@linaro.org>
6748 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
6749 instead of gdbarch_pseudo_register_read_value.
6751 2018-01-22 Joel Brobecker <brobecker@adacore.com>
6753 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
6756 2018-01-22 Joel Brobecker <brobecker@adacore.com>
6758 * linespec.c (create_sals_line_offset): Remove code that preserved
6759 the symtab_and_line's line number.
6761 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6763 * varobj.c (varobj_create): Don't set valid_block when creating a
6766 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6768 * varobj.c (varobj_create): Remove out of date comment.
6770 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6773 * ada-exp.y (write_var_from_sym): Pass extra parameter when
6774 updating innermost block.
6775 * parse.c (innermost_block_tracker::update): Take extra type
6776 parameter, and check types match before updating innermost block.
6777 (write_dollar_variable): Update innermost block for registers.
6778 * parser-defs.h (enum innermost_block_tracker_type): New enum.
6779 (innermost_block_tracker::innermost_block_tracker): Initialise
6781 (innermost_block_tracker::reset): Take type parameter.
6782 (innermost_block_tracker::update): Take type parameter, and pass
6783 type through as needed.
6784 (innermost_block_tracker::m_types): New member.
6785 * varobj.c (varobj_create): Pass type when reseting innermost
6788 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6790 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
6791 * ada-lang.c (resolve_subexp): Likewise.
6792 * breakpoint.c (set_breakpoint_condition) Likewise.
6793 (watch_command_1) Likewise.
6794 * c-exp.y (variable): Likewise.
6795 * d-exp.y (PrimaryExpression): Likewise.
6796 * f-exp.y (variable): Likewise.
6797 * go-exp.y (variable): Likewise.
6798 * m2-exp.y (variable): Likewise.
6799 * objfiles.c (objfile::~objfile): Likewise.
6800 * p-exp.y (variable): Likewise.
6801 * parse.c (innermost_block): Change type.
6802 * parser-defs.h (class innermost_block_tracker): New.
6803 (innermost_block): Change to innermost_block_tracker.
6804 * printcmd.c (display_command): Switch to innermost_block API.
6805 (do_one_display): Likewise.
6806 * rust-exp.y (do_one_display): Likewise.
6807 * symfile.c (clear_symtab_users): Likewise.
6808 * varobj.c (varobj_create): Switch to innermost_block API, replace
6809 use of innermost_block with block stored on varobj object.
6811 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6813 * expression.h (innermost_block): Remove declaration.
6814 * varobj.c: Add 'parser-defs.h' include.
6816 2018-01-19 Tom Tromey <tom@tromey.com>
6818 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
6819 symbols in the static and global blocks.
6821 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6823 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
6824 gdb_ptrace.h, and move including gdb_wait.h ...
6825 * nat/linux-ptrace.h: ... to here.
6827 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6829 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
6830 inf_ptrace_detach_success.
6831 (inf_ptrace_detach_success): Add inferior parameter, use it
6832 instead of inferior_ptid, pass it to detach_inferior.
6833 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
6835 * inferior.c (detach_inferior): Add overload that takes an
6837 * inferior.h (detach_inferior): Likewise.
6838 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
6839 use inferior_ptid, adjust call to inf_ptrace_detach_success.
6840 * linux-thread-db.c (thread_db_detach): Use inf parameter.
6842 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6844 * target.h (struct target_ops) <to_detach>: Add inferior
6846 (target_detach): Likewise.
6847 * target.c (dispose_inferior): Pass inferior down.
6848 (target_detach): Pass inferior down. Assert that it is equal to
6849 the current inferior.
6850 * aix-thread.c (aix_thread_detach): Pass inferior down.
6851 * corefile.c (core_file_command): Pass current_inferior() down.
6852 * corelow.c (core_detach): Add inferior parameter.
6853 * darwin-nat.c (darwin_detach): Likewise.
6854 * gnu-nat.c (gnu_detach): Likewise.
6855 * inf-ptrace.c (inf_ptrace_detach): Likewise.
6856 * infcmd.c (detach_command): Pass current_inferior() down to
6858 * infrun.c (follow_fork_inferior): Pass parent_inf to
6860 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
6862 * linux-nat.c (linux_nat_detach): Add inferior parameter.
6863 * linux-thread-db.c (thread_db_detach): Likewise.
6864 * nto-procfs.c (procfs_detach): Likewise.
6865 * procfs.c (procfs_detach): Likewise.
6866 * record.c (record_detach): Likewise.
6867 * record.h (struct inferior): Forward-declare.
6868 (record_detach): Add inferior parameter.
6869 * remote-sim.c (gdbsim_detach): Likewise.
6870 * remote.c (remote_detach_1): Likewise.
6871 (remote_detach): Likewise.
6872 (extended_remote_detach): Likewise.
6873 * sol-thread.c (sol_thread_detach): Likewise.
6874 * target-debug.h (target_debug_print_inferior_p): New macro.
6875 * target-delegates.c: Re-generate.
6876 * top.c (kill_or_detach): Pass inferior down to target_detach.
6877 * windows-nat.c (windows_detach): Add inferior parameter.
6879 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6881 * target.h (struct target_ops) <to_detach>: Remove args
6883 (target_detach): Likewise.
6884 * target.c (dispose_inferior): Adjust.
6885 (target_detach): Remove args parameter, adjust.
6886 * aix-thread.c (aix_thread_detach): Adjust.
6887 * corefile.c (core_file_command): Adjust.
6888 * corelow.c (core_detach): Adjust.
6889 * darwin-nat.c (darwin_detach): Adjust.
6890 * gnu-nat.c (gnu_detach): Adjust.
6891 * inf-ptrace.c (inf_ptrace_detach): Adjust.
6892 * infcmd.c (detach_command): Adjust
6893 * infrun.c (follow_fork_inferior): Adjust.
6894 (handle_vfork_child_exec_or_exit): Adjust.
6895 * linux-fork.c (linux_fork_detach): Remove args parameter.
6896 * linux-fork.h (linux_fork_detach): Likewise.
6897 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
6898 * linux-thread-db.c (thread_db_detach): Likewise.
6899 * nto-procfs.c (procfs_detach): Likewise.
6900 * procfs.c (procfs_detach): Likewise.
6901 (do_detach): Remove signo parameter.
6902 * record.c (record_detach): Remove args parameter.
6903 * record.h (record_detach): Likewise.
6904 * remote-sim.c (gdbsim_detach): Likewise.
6905 * remote.c (remote_detach_1): Likewise.
6906 (remote_detach): Likewise.
6907 (extended_remote_detach): Likewise.
6908 * sol-thread.c (sol_thread_detach): Likewise.
6909 * target-delegates.c: Re-generate.
6910 * top.c (struct qt_args) <args>: Remove field.
6911 (kill_or_detach): Don't pass args.
6912 (quit_force): Don't set args.
6913 * windows-nat.c (windows_detach): Remove args parameter.
6915 2018-01-19 Yao Qi <yao.qi@linaro.org>
6917 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
6918 (arm_linux_init_abi): Install it.
6920 2018-01-19 Yao Qi <yao.qi@linaro.org>
6922 * osabi.c (gdb_osabi_names): Extend the regexp for
6923 arm-linux-gnueabihf.
6925 2018-01-18 Yao Qi <yao.qi@linaro.org>
6927 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
6929 (abbrev_table::add_abbrev): Update.
6930 (abbrev_table::lookup_abbrev): Update.
6932 2018-01-18 Yao Qi <yao.qi@linaro.org>
6934 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
6936 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
6938 * compile/compile.c (compile_to_object): Convert "triplet_rx"
6941 2018-01-17 Tom Tromey <tom@tromey.com>
6943 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
6945 2018-01-17 Tom Tromey <tom@tromey.com>
6947 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
6948 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
6949 (create_array_type_with_stride): Update.
6950 * dwarf2read.c (set_die_type): Update.
6952 2018-01-17 Tom Tromey <tom@tromey.com>
6954 * dwarf2read.c (delayed_method_info): Remove typedef.
6955 (dwarf2_cu::method_info): Now a std::vector.
6956 (add_to_method_list): Update.
6957 (free_delayed_list): Remove.
6958 (compute_delayed_physnames): Update.
6959 (process_full_comp_unit, process_full_type_unit): Clear the method
6960 list. Remove cleanups.
6961 (psymtab_include_file_name): Add name_holder parameter. Use
6963 (dwarf_decode_lines): Update.
6965 2018-01-17 Tom Tromey <tom@tromey.com>
6966 Simon Marchi <simon.marchi@ericsson.com>
6968 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
6969 (dwarf2_per_objfile::free_cached_comp_units)
6970 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6971 (init_cutu_and_read_dies_no_follow): Update.
6972 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
6973 (dwarf2_cu::~dwarf2_cu): New.
6974 (free_heap_comp_unit, free_stack_comp_unit): Remove.
6975 (age_cached_comp_units, free_one_cached_comp_unit): Update.
6977 2018-01-17 Tom Tromey <tom@tromey.com>
6978 Simon Marchi <simon.marchi@ericsson.com>
6980 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
6981 (struct die_reader_specs) <abbrev_table>: New member.
6982 (struct abbrev_table): Add constructor.
6983 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
6984 <abbrev_obstack>: Now an auto_obstack.
6985 (abbrev_table_up): New typedef.
6986 (init_cu_die_reader): Add abbrev_table parameter.
6987 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
6988 Add result_dwo_abbrev_table.
6989 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6990 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
6992 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
6994 (skip_children): Update.
6995 (abbrev_table::alloc_abbrev): Rename from
6996 abbrev_table_alloc_abbrev.
6997 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
6998 (abbrev_table::lookup_abbrev): Rename from
6999 abbrev_table_lookup_abbrev.
7000 (abbrev_table_read_table): Return abbrev_table_up.
7001 (abbrev_table_free, abbrev_table_free_cleanup)
7002 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7003 (load_partial_dies): Update.
7005 2018-01-17 Tom Tromey <tom@tromey.com>
7007 * dwarf2read.c (dwarf2_compute_name): Update comment.
7008 (read_func_scope, read_variable): Update.
7009 (new_symbol): Remove.
7010 (new_symbol_full): Rename to new_symbol.
7012 2018-01-17 Mike Gulick <mgulick@mathworks.com>
7015 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7016 a warning instead of throwing an error, set section size to 0 and return
7018 * gdb_bfd.h (gdb_bfd_map_section): Update description.
7020 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7022 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7024 (linux_ptrace_attach_fail_reason_string): Likewise.
7025 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7027 (linux_ptrace_attach_fail_reason_string): Likewise.
7028 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7030 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7032 * linux-nat.c (linux_nat_attach): Remove xstrdup.
7034 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
7037 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7038 checking for fs_base/gs_base fields in struct user_regs_struct.
7039 * configure: Regenerate.
7041 2018-01-17 Yao Qi <yao.qi@linaro.org>
7043 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7045 (aarch64_linux_init_abi): Install it to gdbarch hook
7048 2018-01-15 Pedro Alves <palves@redhat.com>
7050 * common/signals-state-save-restore.c
7051 (save_original_signals_state): Fix typos.
7053 2017-01-12 Tom Tromey <tom@tromey.com>
7054 Sergio Durigan Junior <sergiodj@redhat.com>
7056 * Makefile.in (install-only): Install gdb-add-index.
7058 2018-01-12 John Baldwin <jhb@FreeBSD.org>
7060 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7062 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7064 * infrun.c (keep_going_pass_signal): Clear step-over info when
7065 insert_breakpoints fails.
7067 2018-01-11 Pedro Alves <palves@redhat.com>
7070 * infrun.c (resume): Rename to ...
7071 (resume_1): ... this.
7072 (resume): Reimplement as wrapper around resume_1.
7074 2018-01-11 Pedro Alves <palves@redhat.com>
7077 * remote.c (remote_parse_stop_reply): Default to the last-set
7078 general thread instead of to 'magic_null_ptid'.
7080 2018-01-10 Pedro Alves <palves@redhat.com>
7082 * language.h (language_get_symbol_name_matcher): Rename ...
7083 (get_symbol_name_matcher): ... this.
7084 * language.c (language_get_symbol_name_matcher): Ditto.
7085 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7088 2018-01-10 Pedro Alves <palves@redhat.com>
7092 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7093 Adjust to use language_get_symbol_name_matcher instead of
7094 language_defn::la_get_symbol_name_matcher.
7095 * language.c (language_get_symbol_name_matcher): If in Ada mode
7096 and the lookup name is a verbatim match, return Ada's matcher.
7097 * language.h (language_get_symbol_name_matcher): Adjust comment.
7098 (ada_lookup_name_info::verbatim_p):: New method.
7100 2018-01-10 Pedro Alves <palves@redhat.com>
7103 * ada-lang.c (ada_collect_symbol_completion_matches): If the
7104 minsym's language is language_auto or language_cplus, pass down
7105 language_ada instead.
7106 * symtab.c (compare_symbol_name): Don't frob symbol language here.
7108 2018-01-10 Pedro Alves <palves@redhat.com>
7111 * minsyms.c (linkage_name_str): New function.
7112 (iterate_over_minimal_symbols): Use it.
7114 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7116 * NEWS: Document that 'info proc' now works on FreeBSD.
7118 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7120 * configure.ac: Check for kinfo_getfile in libutil.
7121 * configure: Regenerate.
7122 * config.in: Regenerate.
7123 * fbsd-nat.c: Include "fbsd-tdep.h".
7124 (fbsd_fetch_cmdline): New.
7125 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7126 rather than calling error.
7127 (fbsd_info_proc): New.
7128 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7129 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7130 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7132 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7134 * fbsd-nat.c (struct free_deleter): Remove.
7135 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7137 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7139 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7140 NULL for an empty pathname.
7142 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7144 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7145 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7146 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7147 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7148 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7149 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7150 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7151 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7152 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7153 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7154 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7155 (fbsd_core_fetch_timeval, fbsd_print_sigset)
7156 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7157 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
7158 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7160 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
7162 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7163 (gnu_xfer_auxv): New function.
7164 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7167 2018-01-08 Yao Qi <yao.qi@linaro.org>
7168 Simon Marchi <simon.marchi@ericsson.com>
7170 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7172 (COMMON_OBS): Remove selftest.o.
7173 * configure.ac: Append selftest-arch.c and common/selftest.c to
7174 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
7175 * configure: Re-generated.
7176 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
7178 (maintenance_info_selftests): Likewise.
7180 2018-01-08 Xavier Roirand <roirand@adacore.com>
7182 * ada-valprint.c (val_print_packed_array_elements): Use
7183 proper number of elements when printing an array indexed
7184 by an enumeration type.
7186 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7188 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
7189 (dw2_get_file_names_reader): Adjust.
7190 (lookup_dwo_signatured_type): Adjust.
7191 (lookup_dwp_signatured_type): Adjust.
7192 (lookup_signatured_type): Adjust.
7193 (create_type_unit_group): Adjust.
7194 (get_type_unit_group): Adjust.
7195 (process_psymtab_comp_unit_reader): Adjust.
7196 (build_type_psymtabs_reader): Adjust.
7197 (scan_partial_symbols): Adjust.
7198 (add_partial_symbol): Adjust.
7199 (add_partial_subprogram): Adjust.
7200 (peek_die_abbrev): Adjust.
7201 (fixup_go_packaging): Adjust.
7202 (process_imported_unit_die): Adjust.
7203 (dwarf2_compute_name): Adjust.
7204 (dwarf2_physname): Adjust.
7205 (read_import_statement): Adjust.
7206 (handle_DW_AT_stmt_list): Adjust.
7207 (read_file_scope): Adjust.
7208 (read_func_scope): Adjust.
7209 (read_lexical_block_scope): Adjust.
7210 (read_call_site_scope): Adjust.
7211 (read_variable): Adjust.
7212 (dwarf2_rnglists_process): Adjust.
7213 (dwarf2_ranges_process): Adjust.
7214 (dwarf2_ranges_read): Adjust.
7215 (dwarf2_get_pc_bounds): Adjust.
7216 (dwarf2_record_block_ranges): Adjust.
7217 (dwarf2_add_field): Adjust.
7218 (dwarf2_add_member_fn): Adjust.
7219 (read_structure_type): Adjust.
7220 (process_structure_scope): Adjust.
7221 (read_enumeration_type): Adjust.
7222 (read_array_type): Adjust.
7223 (mark_common_block_symbol_computed): Adjust.
7224 (read_common_block): Adjust.
7225 (read_namespace_type): Adjust.
7226 (read_namespace): Adjust.
7227 (read_module_type): Adjust.
7228 (read_tag_pointer_type): Adjust.
7229 (read_tag_ptr_to_member_type): Adjust.
7230 (read_tag_string_type): Adjust.
7231 (read_subroutine_type): Adjust.
7232 (read_typedef): Adjust.
7233 (read_base_type): Adjust.
7234 (attr_to_dynamic_prop): Adjust.
7235 (read_subrange_type): Adjust.
7236 (read_unspecified_type): Adjust.
7237 (dwarf2_read_abbrevs): Adjust.
7238 (load_partial_dies): Adjust.
7239 (read_partial_die): Adjust.
7240 (find_partial_die): Adjust.
7241 (guess_partial_die_structure_name): Adjust.
7242 (fixup_partial_die): Adjust.
7243 (read_attribute_value): Adjust.
7244 (read_addr_index): Adjust.
7245 (read_addr_index_from_leb128): Adjust.
7246 (read_str_index): Adjust.
7247 (dwarf2_string_attr): Adjust.
7248 (get_debug_line_section): Adjust.
7249 (dwarf_decode_line_header): Adjust.
7250 (lnp_state_machine::check_line_address): Adjust.
7251 (dwarf_decode_lines_1): Adjust.
7252 (dwarf_decode_lines): Adjust.
7253 (dwarf2_start_symtab): Adjust.
7254 (var_decode_location): Adjust.
7255 (new_symbol_full): Adjust.
7256 (dwarf2_const_value_data): Adjust.
7257 (dwarf2_const_value_attr): Adjust.
7258 (dwarf2_const_value): Adjust.
7260 (die_containing_type): Adjust.
7261 (build_error_marker_type): Adjust.
7262 (lookup_die_type): Adjust.
7263 (guess_full_die_structure_name): Adjust.
7264 (anonymous_struct_prefix): Adjust.
7265 (determine_prefix): Adjust.
7266 (dwarf2_name): Adjust.
7267 (follow_die_ref_or_sig): Adjust.
7268 (follow_die_offset): Adjust.
7269 (follow_die_ref): Adjust.
7270 (follow_die_sig_1): Adjust.
7271 (follow_die_sig): Adjust.
7272 (get_signatured_type): Adjust.
7273 (get_DW_AT_signature_type): Adjust.
7274 (decode_locdesc): Adjust.
7275 (dwarf_decode_macros): Adjust.
7276 (cu_debug_loc_section): Adjust.
7277 (fill_in_loclist_baton): Adjust.
7278 (dwarf2_symbol_mark_computed): Adjust.
7279 (init_one_comp_unit): Don't assign
7280 dwarf2_cu::dwarf2_per_objfile.
7281 (set_die_type): Adjust.
7283 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7285 * dwarf2read.c (struct mapped_debug_names): Add constructor.
7286 <dwarf2_per_objfile>: New field.
7287 (dwarf2_per_objfile): Remove global.
7288 (get_dwarf2_per_objfile): New function.
7289 (set_dwarf2_per_objfile): New function.
7290 (dwarf2_build_psymtabs_hard): Change objfile parameter to
7292 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7293 (read_abbrev_offset): Likewise.
7294 (read_indirect_string): Likewise.
7295 (read_indirect_line_string): Likewise.
7296 (read_indirect_string_at_offset): Likewise.
7297 (read_indirect_string_from_dwz): Likewise.
7298 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7300 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7301 (create_all_comp_units): Change objfile parameter to
7303 (create_all_type_units): Likewise.
7304 (process_queue): Add dwarf2_per_objfile parameter.
7305 (read_and_check_comp_unit_head): Likewise.
7306 (lookup_dwo_unit_in_dwp): Likewise.
7307 (get_dwp_file): Likewise.
7308 (process_cu_includes): Likewise.
7309 (struct free_dwo_file_cleanup_data): New struct.
7310 (dwarf2_has_info): Use get_dwarf2_per_objfile and
7311 set_dwarf2_per_objfile.
7312 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
7313 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
7314 context, adjust calls.
7315 (dw2_instantiate_symtab): Likewise.
7316 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
7317 (dw2_get_cu): Likewise.
7318 (create_cu_from_index_list): Change objfile parameter to
7320 (create_cus_from_index_list): Get dwarf2_per_objfile from
7321 context, adjust calls.
7322 (create_cus_from_index): Likewise.
7323 (create_signatured_type_table_from_index): Change objfile
7324 parameter to dwarf2_per_objfile.
7325 (create_signatured_type_table_from_debug_names): Change objfile
7326 parameter to dwarf2_per_objfile.
7327 (create_addrmap_from_index): Likewise.
7328 (create_addrmap_from_aranges): Likewise.
7329 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
7330 (dw2_setup): Remove.
7331 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
7333 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
7334 get_dwarf2_per_objfile.
7335 (dw2_forget_cached_source_info): Likewise.
7336 (dw2_map_symtabs_matching_filename): Likewise.
7337 (struct dw2_symtab_iterator) <index>: Remove.
7338 <dwarf2_per_objfile>: New field.
7339 (dw2_symtab_iter_init): Replace index parameter with
7341 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
7342 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
7343 (dw2_print_stats): Likewise.
7344 (dw2_dump): Likewise.
7345 (dw2_expand_symtabs_for_function): Likewise.
7346 (dw2_expand_all_symtabs): Likewise.
7347 (dw2_expand_symtabs_with_fullname): Likewise.
7348 (dw2_expand_marked_cus): Replace index and objfile parameters
7349 with dwarf2_per_objfile.
7350 (dw_expand_symtabs_matching_file_matcher): Add
7351 dwarf2_per_objfile parameter and adjust calls.
7352 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
7354 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
7355 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
7357 (create_cus_from_debug_names_list): Replace objfile parameter
7358 with dwarf2_per_objfile and adjust calls.
7359 (create_cus_from_debug_names): Likewise.
7360 (dwarf2_read_debug_names): Likewise.
7361 (mapped_debug_names::namei_to_name): Adjust call.
7362 (dw2_debug_names_iterator::next): Likewise.
7363 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
7364 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
7365 (dw2_debug_names_dump): Likewise.
7366 (dw2_debug_names_expand_symtabs_for_function): Likewise.
7367 (dw2_debug_names_expand_symtabs_matching): Likewise.
7368 (dwarf2_initialize_objfile): Likewise.
7369 (dwarf2_build_psymtabs): Likewise.
7370 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
7372 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
7373 (read_and_check_comp_unit_head): Likewise.
7374 (read_abbrev_offset): Likewise.
7375 (create_debug_type_hash_table): Likewise.
7376 (create_debug_types_hash_table): Likewise.
7377 (create_all_type_units): Replace objfile parameter with
7379 (add_type_unit): Add dwarf2_per_objfile parameter.
7380 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
7381 with dwarf2_per_objfile.
7382 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
7383 (lookup_dwp_signatured_type): Likewise.
7384 (lookup_signatured_type): Likewise.
7385 (read_cutu_die_from_dwo): Likewise.
7386 (init_tu_and_read_dwo_dies): Likewise.
7387 (init_cutu_and_read_dies): Likewise.
7388 (init_cutu_and_read_dies_no_follow): Likewise.
7389 (allocate_type_unit_groups_table): Add objfile parameter.
7390 (create_type_unit_group): Use dwarf2_per_objfile from cu.
7391 (get_type_unit_group): Likewise.
7392 (process_psymtab_comp_unit): Update call.
7393 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
7394 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
7395 (print_tu_stats): Likewise.
7396 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
7398 (build_type_psymtabs): Change objfile parameter to
7400 (process_skeletonless_type_unit): Use dwarf2_per_objfile
7401 passed in void* parameter.
7402 (process_skeletonless_type_units): Change objfile parameter to
7404 (set_partial_user): Likewise.
7405 (dwarf2_build_psymtabs_hard): Likewise.
7406 (read_comp_units_from_section): Likewise.
7407 (create_all_comp_units): Likewise.
7408 (scan_partial_symbols): Update calls.
7409 (add_partial_symbol): Likewise.
7410 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
7411 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
7412 (process_queue): Add dwarf2_per_objfile parameter.
7413 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
7414 (compute_compunit_symtab_includes): Likewise.
7415 (process_cu_includes): Add dwarf2_per_objfile parameter.
7416 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
7417 (process_full_type_unit): Likewise.
7418 (process_imported_unit_die): Update call.
7419 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
7420 (read_file_scope): Likewise.
7421 (allocate_dwo_file_hash_table): Add objfile parameter.
7422 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
7423 (create_cus_hash_table): Likewise.
7424 (create_dwp_hash_table): Likewise.
7425 (create_dwo_unit_in_dwp_v1): Likewise.
7426 (create_dwp_v2_section): Likewise.
7427 (create_dwo_unit_in_dwp_v2): Likewise.
7428 (lookup_dwo_unit_in_dwp): Likewise.
7429 (try_open_dwop_file): Likewise.
7430 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
7431 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
7432 cleanup to include a reference to dwarf2_per_objfile.
7433 (open_dwp_file): Add dwarf2_per_objfile parameter.
7434 (open_and_init_dwp_file): Likewise.
7435 (get_dwp_file): Likewise.
7436 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
7437 (queue_and_load_all_dwo_tus): Update call.
7438 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
7440 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
7441 (dwarf2_ranges_process): Likewise.
7442 (dwarf2_get_pc_bounds): Likewise.
7443 (mark_common_block_symbol_computed): Likewise.
7444 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
7445 (dwarf2_read_abbrevs): Update call.
7446 (read_partial_die): Use dwarf2_per_objfile from cu.
7447 (find_partial_die): Likewise.
7448 (fixup_partial_die): Likewise.
7449 (read_attribute_value): Likewise.
7450 (read_indirect_string_at_offset_from): Add objfile parameter.
7451 (read_indirect_string_at_offset): Add dwarf2_per_objfile
7453 (read_indirect_string_from_dwz): Add objfile parameter.
7454 (read_indirect_string): Add objfile parameter.
7455 (read_addr_index_1): Add dwarf2_per_objfile parameter.
7456 (read_addr_index): Use dwarf2_per_objfile from cu.
7457 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
7459 (read_str_index): Use dwarf2_per_objfile from cu.
7460 (get_debug_line_section): Likewise.
7461 (read_formatted_entries): Add dwarf2_per_objfile parameter.
7462 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
7463 (new_symbol_full): Use dwarf2_per_objfile from cu.
7464 (build_error_marker_type): Likewise.
7465 (lookup_die_type): Likewise.
7466 (determine_prefix): Likewise.
7467 (follow_die_offset): Likewise.
7468 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
7469 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
7470 (dwarf2_fetch_die_type_sect_off): Likewise.
7471 (dwarf2_get_die_type): Likewise.
7472 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
7473 (get_signatured_type): Likewise.
7474 (get_DW_AT_signature_type): Likewise.
7475 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
7476 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
7477 (cu_debug_loc_section): Likewise.
7478 (fill_in_loclist_baton): Likewise.
7479 (dwarf2_symbol_mark_computed): Likewise.
7480 (dwarf2_find_containing_comp_unit): Change objfile parameter to
7482 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
7484 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
7485 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
7486 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
7487 (set_die_type): Use dwarf2_free_objfile from cu.
7488 (get_die_type_at_offset): Likewise.
7489 (dwarf2_per_objfile_free): Don't assign global variable.
7490 (debug_names) <constructor>: Add dwarf2_per_objfile
7491 parameter, update m_debugstrlookup construction.
7492 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
7494 <m_dwarf2_per_objfile>: New field.
7495 <lookup>: Use m_dwarf2_per_objfile.
7496 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
7497 (psyms_seen_size): Likewise.
7498 (write_gdbindex): Replace objfile parameter with
7500 (write_debug_names): Likewise.
7501 (write_psymtabs_to_index): Likewise.
7502 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
7505 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7507 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
7508 <dwarf2_per_objfile>: New field.
7509 (struct dwarf2_per_cu_data) <objfile>: Remove.
7510 <dwarf2_per_objfile>: New field.
7511 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
7513 (create_signatured_type_table_from_index): Likewise.
7514 (create_debug_type_hash_table): Likewise.
7515 (fill_in_sig_entry_from_dwo_entry): Likewise.
7516 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
7517 (create_type_unit_group): Assign dwarf2_per_objfile instead of
7519 (create_partial_symtab): Access objfile through
7521 (process_psymtab_comp_unit_reader): Likewise.
7522 (read_comp_units_from_section): Likewise.
7523 (scan_partial_symbols): Likewise.
7524 (add_partial_symbol): Likewise.
7525 (add_partial_subprogram): Likewise.
7526 (peek_die_abbrev): Likewise.
7527 (fixup_go_packaging): Likewise.
7528 (process_full_comp_unit): Likewise.
7529 (process_full_type_unit): Likewise.
7530 (process_imported_unit_die): Likewise.
7531 (dwarf2_compute_name): Likewise.
7532 (dwarf2_physname): Likewise.
7533 (read_import_statement): Likewise.
7534 (create_cus_hash_table): Assign dwarf2_physname instead of
7536 (read_func_scope): Access objfile through dwarf2_per_objfile.
7537 (read_lexical_block_scope): Likewise.
7538 (read_call_site_scope): Likewise.
7539 (read_variable): Likewise.
7540 (dwarf2_rnglists_process): Likewise.
7541 (dwarf2_ranges_process): Likewise.
7542 (dwarf2_ranges_read): Likewise.
7543 (dwarf2_record_block_ranges): Likewise.
7544 (dwarf2_add_field): Likewise.
7545 (dwarf2_add_member_fn): Likewise.
7546 (read_structure_type): Likewise.
7547 (process_structure_scope): Likewise.
7548 (read_enumeration_type): Likewise.
7549 (read_array_type): Likewise.
7550 (read_common_block): Likewise.
7551 (read_namespace_type): Likewise.
7552 (read_namespace): Likewise.
7553 (read_module_type): Likewise.
7554 (read_tag_pointer_type): Likewise.
7555 (read_tag_ptr_to_member_type): Likewise.
7556 (read_tag_string_type): Likewise.
7557 (read_subroutine_type): Likewise.
7558 (read_typedef): Likewise.
7559 (read_base_type): Likewise.
7560 (attr_to_dynamic_prop): Likewise.
7561 (read_subrange_type): Likewise.
7562 (read_unspecified_type): Likewise.
7563 (load_partial_dies): Likewise.
7564 (read_partial_die): Likewise.
7565 (find_partial_die): Likewise.
7566 (guess_partial_die_structure_name): Likewise.
7567 (fixup_partial_die): Likewise.
7568 (read_attribute_value): Likewise.
7569 (read_addr_index_from_leb128): Likewise.
7570 (dwarf2_read_addr_index): Likewise.
7571 (dwarf2_string_attr): Likewise.
7572 (lnp_state_machine::check_line_address): Likewise.
7573 (dwarf_decode_lines_1): Likewise.
7574 (dwarf_decode_lines): Likewise.
7575 (dwarf2_start_symtab): Likewise.
7576 (var_decode_location): Likewise.
7577 (new_symbol_full): Likewise.
7578 (dwarf2_const_value_data): Likewise.
7579 (dwarf2_const_value_attr): Likewise.
7580 (dwarf2_const_value): Likewise.
7581 (die_type): Likewise.
7582 (die_containing_type): Likewise.
7583 (lookup_die_type): Likewise.
7584 (guess_full_die_structure_name): Likewise.
7585 (anonymous_struct_prefix): Likewise.
7586 (dwarf2_name): Likewise.
7587 (follow_die_ref_or_sig): Likewise.
7588 (follow_die_offset): Likewise.
7589 (follow_die_ref): Likewise.
7590 (dwarf2_fetch_die_loc_sect_off): Likewise.
7591 (dwarf2_fetch_constant_bytes): Likewise.
7592 (dwarf2_fetch_die_type_sect_off): Likewise.
7593 (dwarf2_get_die_type): Likewise.
7594 (follow_die_sig): Likewise.
7595 (decode_locdesc): Likewise.
7596 (dwarf2_per_cu_objfile): Likewise.
7597 (dwarf2_per_cu_text_offset): Likewise.
7598 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
7600 (set_die_type): Access objfile through
7603 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
7605 * valprint.c (converted_character_d): Remove typedef.
7606 (DEF_VEC_O (converted_character_d)): Remove.
7607 (count_next_character): Use std::vector.
7608 (print_converted_chars_to_obstack): Likewise.
7609 (generic_printstr): Likewise.
7611 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7613 * xml-support.h (struct gdb_xml_value): Add constructor.
7614 <value>: Change type to unique_xmalloc_ptr.
7615 (gdb_xml_value_s): Remove typedef.
7616 (DEF_VEC_O (gdb_xml_value_s)): Remove.
7617 (gdb_xml_element_start_handler): Change parameter type to
7619 (xml_find_attribute): Likewise.
7620 * xml-support.c (xml_find_attribute): Change parameter type to
7621 std::vector and adjust.
7622 (gdb_xml_values_cleanup): Remove.
7623 (gdb_xml_parser::start_element): Adjust to std::vector.
7624 (xinclude_start_include): Change paraeter type to std::vector
7626 * btrace.c (check_xml_btrace_version): Likewise.
7627 (parse_xml_btrace_block): Likewise.
7628 (parse_xml_btrace_pt_config_cpu): Likewise.
7629 (parse_xml_btrace_pt): Likewise.
7630 (parse_xml_btrace_conf_bts): Likewise.
7631 (parse_xml_btrace_conf_pt): Likewise.
7632 * memory-map.c (memory_map_start_memory): Likewise.
7633 (memory_map_start_property): Likewise.
7634 * osdata.c (osdata_start_osdata): Likewise.
7635 (osdata_start_item): Likewise.
7636 (osdata_start_column): Likewise.
7637 * remote.c (start_thread): Likewise.
7638 * solib-aix.c (library_list_start_library): Likewise.
7639 (library_list_start_list): Likewise.
7640 * solib-svr4.c (library_list_start_library): Likewise.
7641 (svr4_library_list_start_list): Likewise.
7642 * solib-target.c (library_list_start_segment): Likewise.
7643 (library_list_start_section): Likewise.
7644 (library_list_start_library): Likewise.
7645 (library_list_start_list): Likewise.
7646 * tracepoint.c (traceframe_info_start_memory): Likewise.
7647 (traceframe_info_start_tvar): Likewise.
7648 * xml-syscall.c (syscall_start_syscall): Likewise.
7649 * xml-tdesc.c (tdesc_start_target): Likewise.
7650 (tdesc_start_feature): Likewise.
7651 (tdesc_start_reg): Likewise.
7652 (tdesc_start_union): Likewise.
7653 (tdesc_start_struct): Likewise.
7654 (tdesc_start_flags): Likewise.
7655 (tdesc_start_enum): Likewise.
7656 (tdesc_start_field): Likewise.
7657 (tdesc_start_enum_value): Likewise.
7658 (tdesc_start_vector): Likewise.
7660 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7662 * extension.h (struct xmethod_worker) <clone>: Remove.
7663 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
7665 (python_xmethod_worker::clone): Remove.
7666 * valops.c (find_overload_match): Use std::move instead of
7669 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
7671 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
7672 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
7673 <free_xmethod_worker_data>: Remove.
7674 <get_matching_xmethod_workers>: Chance VEC to std::vector.
7675 <get_xmethod_arg_types>: Remove.
7676 <get_xmethod_result_type>: Remove.
7677 <invoke_xmethod>: Remove.
7678 * extension.c (new_xmethod_worker): Remove.
7679 (clone_xmethod_worker): Remove.
7680 (get_matching_xmethod_workers): Return void, pass std::vector by
7682 (get_xmethod_arg_types): Rename to...
7683 (xmethod_worker::get_arg_types): ... this, and adjust.
7684 (get_xmethod_result_type): Rename to...
7685 (xmethod_worker::get_result_type): ... this, and adjust.
7686 (invoke_xmethod): Remove.
7687 (free_xmethod_worker): Remove.
7688 (free_xmethod_worker_vec): Remove.
7689 * extension.h (enum ext_lang_rc): Move here from
7691 (struct xmethod_worker): Add constructor and destructor.
7694 <invoke, clone, do_get_result_type, do_get_arg_types>: New
7695 virtual pure methods.
7696 <get_arg_types, get_result_type>: New methods.
7697 (xmethod_worker_ptr): Remove typedef.
7698 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
7699 (xmethod_worker_vec): Remove typedef.
7700 (xmethod_worker_up): New typedef.
7701 (invoke_xmethod): Remove.
7702 (clone_xmethod_worker): Remove.
7703 (free_xmethod_worker): Remove.
7704 (free_xmethod_worker_vec): Remove.
7705 (get_xmethod_arg_types): Remove.
7706 (get_xmethod_result_type): Remove.
7707 * valops.c (find_method_list): Use std::vector, don't use
7708 intermediate vector.
7709 (value_find_oload_method_list): Use std::vector.
7710 (find_overload_match): Use std::vector.
7711 (find_oload_champ): Use std::vector.
7712 * value.c (value_free): Use operator delete.
7713 (value_of_xmethod): Rename to...
7714 (value_from_xmethod): ... this. Don't assign
7715 xmethod_worker::value, take rvalue-reference.
7716 (result_type_of_xmethod): Adjust.
7717 (call_xmethod): Adjust.
7718 * value.h: Include extension.h.
7719 (struct xmethod_worker): Don't forward-declare.
7720 (value_of_xmethod): Rename to...
7721 (value_from_xmethod): ... this, take rvalue-reference.
7722 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
7723 (struct python_xmethod_worker): ... this, add constructor and
7725 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
7726 (gdbpy_free_xmethod_worker_data): Rename to...
7727 (python_xmethod_worker::~python_xmethod_worker): ... this and
7729 (gdbpy_clone_xmethod_worker_data): Rename to...
7730 (python_xmethod_worker::clone): ... this and adjust.
7731 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
7733 (gdbpy_get_xmethod_arg_types): Rename to...
7734 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
7735 (gdbpy_get_xmethod_result_type): Rename to...
7736 (python_xmethod_worker::do_get_result_type): ... this and
7738 (gdbpy_invoke_xmethod): Rename to...
7739 (python_xmethod_worker::invoke): ... this and adjust.
7740 (new_python_xmethod_worker): Rename to...
7741 (python_xmethod_worker::python_xmethod_worker): ... this and
7743 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
7745 (gdbpy_free_xmethod_worker_data): Remove.
7746 (gdbpy_get_matching_xmethod_workers): Use std::vector.
7747 (gdbpy_get_xmethod_arg_types): Remove.
7748 (gdbpy_get_xmethod_result_type): Remove.
7749 (gdbpy_invoke_xmethod): Remove.
7750 * python/python.c (python_extension_ops): Remove obsolete
7753 2018-01-05 Pedro Alves <palves@redhat.com>
7756 * common/signals-state-save-restore.c
7757 (save_original_signals_state): New parameter 'quiet'. Warn if we
7758 find a custom handler preinstalled, instead of internal erroring.
7759 But only warn if !quiet.
7760 * common/signals-state-save-restore.h
7761 (save_original_signals_state): New parameter 'quiet'.
7762 * main.c (captured_main_1): Move save_original_signals_state call
7763 after option handling, and pass QUIET.
7765 2018-01-05 Pedro Alves <palves@redhat.com>
7767 * spu-tdep.c (spu_catch_start): Pass
7768 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
7770 2018-01-05 Pedro Alves <palves@redhat.com>
7773 * ada-lang.c (literal_symbol_name_matcher): New function.
7774 (ada_get_symbol_name_matcher): Use it for
7775 symbol_name_match_type::SEARCH_NAME.
7776 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
7777 it down instead of assuming symbol_name_match_type::FULL.
7778 * block.h (block_lookup_symbol): New parameter 'match_type'.
7779 * c-valprint.c (print_unpacked_pointer): Use
7780 lookup_symbol_search_name instead of lookup_symbol.
7781 * compile/compile-object-load.c (get_out_value_type): Pass down
7782 symbol_name_match_type::SEARCH_NAME.
7783 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
7784 symbol_name_match_type::FULL.
7785 * cp-support.c (cp_get_symbol_name_matcher): Handle
7786 symbol_name_match_type::SEARCH_NAME.
7787 * infrun.c (insert_exception_resume_breakpoint): Use
7788 lookup_symbol_search_name.
7789 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
7790 * psymtab.c (maintenance_check_psymtabs): Use
7791 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
7792 * stack.c (print_frame_args): Use lookup_symbol_search_name and
7794 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
7795 if symbol_name_match_type::SEARCH_NAME.
7796 (lookup_symbol_in_language): Pass down
7797 symbol_name_match_type::FULL.
7798 (lookup_symbol_search_name): New.
7799 (lookup_language_this): Pass down
7800 symbol_name_match_type::SEARCH_NAME.
7801 (lookup_symbol_aux, lookup_local_symbol): New parameter
7802 'match_type'. Pass it down.
7803 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
7804 (lookup_symbol_search_name): New declaration.
7805 (lookup_symbol_in_block): New 'match_type' parameter.
7807 2018-01-05 Pedro Alves <palves@redhat.com>
7810 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
7812 (ada_lookup_symbol): Reimplement in terms of
7813 ada_lookup_symbol_list, bits factored out from
7814 ada_lookup_encoded_symbol.
7816 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7818 * ada-exp.y (write_object_renaming): When subscripting an array
7819 using a symbol as the index, pass the block in call to
7820 ada_lookup_encoded_symbol when looking that symbol up.
7822 2018-01-05 Jerome Guitton <guitton@adacore.com>
7824 * ada-lang.c (ada_array_length): Use ada_index_type instead of
7827 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7829 * ada-lang.c (ada_to_fixed_value_create): Add handling of
7830 the case where VALUE_LVAL (val0) is not lval_memory.
7832 2018-01-05 Xavier Roirand <roirand@adacore.com>
7834 * ada-valprint.c (print_optional_low_bound): Handle
7835 character-indexed array printing like boolean-indexed array
7838 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7840 * NEWS: Create a new section for the next release branch.
7841 Rename the section of the current branch, now that it has
7844 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7846 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
7847 * version.in: Bump version to 8.1.50.DATE-git.
7849 2018-01-03 Xavier Roirand <roirand@adacore.com>
7851 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
7853 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
7855 (default_exception_support_info) <catch_handlers_sym>: Add field.
7856 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
7857 (ada_exception_name_addr_1): Add "catch handlers" handling.
7858 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
7860 (create_excep_cond_exprs) <ex>: Add parameter.
7861 (re_set_exception): Update create_excep_cond_exprs call.
7862 (print_it_exception, print_one_exception, print_mention_exception)
7863 (print_recreate_exception): Add "catch handler" handling.
7864 (allocate_location_catch_handlers, re_set_catch_handlers)
7865 (check_status_catch_handlers, print_it_catch_handlers)
7866 (print_one_catch_handlers, print_mention_catch_handlers)
7867 (print_recreate_catch_handlers): New function.
7868 (catch_handlers_breakpoint_ops): New variable.
7869 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
7870 Add parameter. Add "catch handler" handling.
7871 (ada_exception_sym_name, ada_exception_breakpoint_ops):
7872 Add "catch handler" handling.
7873 (ada_exception_catchpoint_cond_string): Add "catch handler"
7875 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
7877 (catch_ada_handlers_command): New function.
7878 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
7879 operations structure.
7880 (_initialize_ada_language): Add "catch handlers" command entry.
7881 * NEWS: Document "catch handlers" feature.
7883 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7885 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
7886 account when creating the array type of the slice.
7887 (ada_value_slice): Likewise.
7889 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7891 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
7893 (create_array_type_with_stride): Add byte_stride_prop parameter.
7894 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
7895 New parameter. Update all callers in this file.
7896 (array_type_has_dynamic_stride): New function.
7897 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
7898 of arrays with dynamic byte strides.
7899 * dwarf2read.c (read_array_type): Add support for dynamic
7900 DW_AT_byte_stride attributes.
7902 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7904 * dwarf2read.c (read_unspecified_type): Treat
7905 DW_TAG_enumeration_type DIEs from Ada units as stubs.
7907 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7909 Update copyright year range in all GDB files.
7911 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7913 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
7914 and gdb/testsuite/gdb.base/step-line.c.
7916 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7918 * copyright.py (main): Dump the contents of
7919 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
7920 even if BY_HAND is empty.
7922 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7924 * top.c (print_gdb_version): Update Copyright year in version
7927 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7929 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
7931 For older changes see ChangeLog-2017.
7937 version-control: never