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