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