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