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