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