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