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