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