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