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