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