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