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