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