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