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