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