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