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