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