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