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