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