1 2018-06-29 Pedro Alves <palves@redhat.com>
3 * thread.c (thread_target_id_str): New, factored out from ...
4 (print_thread_info_1): ... here. Use it to compute the max
5 "Target Id" column width.
7 2018-06-29 Pedro Alves <palves@redhat.com>
9 * remote.c (remote_target::extra_thread_info): Delete
10 'display_buf' and 'n' locals. from the cache, regardless of
11 packet mechanims is in use. Use cache for qThreadExtra and qP
14 2018-06-29 Pedro Alves <palves@redhat.com>
16 * blockframe.c (find_pc_sect_containing_function): New function.
17 * breakpoint.c (print_breakpoint_location): Don't call
18 find_pc_sect_function.
19 * linespec.c (create_sals_line_offset): Record the location's
21 * linespec.c (convert_address_location_to_sals): Fill in sal's
22 symbol with find_pc_sect_containing_function.
23 * symtab.c (find_function_start_sal): Rename to ...
24 (find_function_start_sal_1): ... this.
25 (find_function_start_sal): Reimplement as wrapper around
26 find_function_start_sal_1, and use
27 find_pc_sect_containing_function to fill in the sal's symbol.
28 (find_function_start_sal(symbol*, bool)): Adjust.
29 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
31 (find_pc_sect_containing_function): Declare.
33 2018-06-29 Pedro Alves <palves@redhat.com>
35 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
36 true if the the location has no symbol.
38 2018-06-28 Tom Tromey <tom@tromey.com>
40 * NEWS: Mention --enable-codesign.
41 * silent-rules.mk (ECHO_SIGN): New variable.
42 * configure.ac: Add --enable-codesign.
44 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
45 (gdb$(EXEEXT)): Optionally invoke codesign.
47 2018-06-28 Pedro Alves <palves@redhat.com>
49 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
51 (switch_to_thread_no_regs): Adjust comment.
52 * infcmd.c (stop_pc): Delete.
53 (post_create_inferior, info_program_command): Replace references
54 to stop_pc with references to thread_info->suspend.stop_pc.
55 * inferior.h (stop_pc): Delete declaration.
56 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
57 (handle_inferior_event_1, handle_signal_stop)
58 (process_event_stop_test, keep_going_stepped_thread)
59 (handle_step_into_function, handle_step_into_function_backward)
60 (print_stop_location): Replace references to stop_pc with
61 references to thread_info->suspend.stop_pc.
62 (struct infcall_suspend_state) <stop_pc>: Delete field.
63 (save_infcall_suspend_state, restore_infcall_suspend_state):
64 Remove references to inf_stat->stop_pc.
65 * linux-fork.c (fork_load_infrun_state): Likewise.
66 * record-btrace.c (record_btrace_set_replay): Likewise.
67 * record-full.c (record_full_goto_entry): Likewise.
68 * remote.c (print_one_stopped_thread): Likewise.
69 * target.c (target_resume): Extend comment.
70 * thread.c (set_executing_thread): New.
71 (set_executing): Use it.
72 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
73 Remove references to stop_pc.
75 2018-06-28 Pedro Alves <palves@redhat.com>
77 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
78 Moving fetching stop_pc until after ecs->event_thread is refreshed.
80 2018-06-28 Tom Tromey <tom@tromey.com>
82 * coffread.c (coff_symfile_finish): Update.
83 * xcoffread.c (xcoff_symfile_finish): Update.
84 * elfread.c (elf_symfile_finish): Update.
85 * symfile.h (dwarf2_free_objfile): Don't declare.
86 * dwarf2read.c (_initialize_dwarf2_read): Use
87 register_objfile_data_with_cleanup.
88 (dwarf2_free_objfile): Now static. Change signature.
90 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
92 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
93 option "-o" to add-symbol-file-load to add an offset to each
94 section's load address.
95 * symfile.c (set_objfile_default_section_offset): New function.
97 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
99 * symfile.c (add_symbol_file_command): Make sure that sections
100 with the same name are sorted in the same order.
102 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
104 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
105 require the second argument. If omitted, load sections at the
106 addresses specified in the file.
108 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
110 * symfile.c (symbol_file_command, symbol_file_add_main_1)
111 (_initialize_symfile): Add option "-o" to symbol-file to add an
112 offset to each section of the symbol file.
114 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
116 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
118 2018-06-27 Tom Tromey <tom@tromey.com>
120 * stack.c (_initialize_stack): Update "func" help text.
122 2018-06-27 Tom Tromey <tom@tromey.com>
124 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
126 (unwind_infopy_str, pyuw_create_unwind_info)
127 (unwind_infopy_add_saved_register, pyuw_sniffer)
128 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
130 (struct saved_reg): Add constructor.
131 <value>: Now a gdbpy_ref<>.
133 2018-06-27 Tom Tromey <tom@tromey.com>
135 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
137 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
139 * gdb-gdb.py.in: Format using autopep8.
141 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
143 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
144 (type_lookup_function): Recognize CORE_ADDR values.
146 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
148 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
151 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
153 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
156 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
158 * gdb-gdb.py: Move to...
159 * gdb-gdb.py.in: ... here.
160 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
161 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
163 (distclean): Remove gdb-gdb.py when cleaning.
164 (gdb-gdb.py, gdb-gdb.gdb): New rules.
165 * configure: Re-generate.
167 2018-06-27 Pedro Alves <palves@redhat.com>
169 * proc-service.c (get_ps_regcache): New.
170 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
171 (ps_lsetfpregs): Use it.
173 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
176 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
177 (dwarf_decode_lines_1): Adjust.
179 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
181 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
183 <info_proc>: Likewise.
185 2018-06-26 Joel Brobecker <brobecker@adacore.com>
187 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
188 to windows_fetch_one_register, and only handle the case of
189 fetching one register. Move the code that reloads the context
190 and iterates over all registers if R is negative to...
191 (windows_nat_target::fetch_registers): ... here.
192 (do_windows_store_inferior_registers): Rename to
193 windows_store_one_register, and only handle the case of storing
194 one register. Move the code that handles the case where r is
196 (windows_nat_target::store_registers) ... here.
198 2018-06-26 Tom Tromey <tom@tromey.com>
201 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
202 * rust-lang.c (rust_print_struct_def): Add podata parameter.
204 (rust_internal_print_type): Add podata parameter.
205 (rust_print_type): Update.
207 2018-06-26 Tom Tromey <tom@tromey.com>
209 * typeprint.h (struct print_offset_data) <update, finish,
210 maybe_print_hole>: New methods.
211 <indentation>: New constant.
212 * typeprint.c (print_offset_data::indentation): Define.
213 (print_offset_data::maybe_print_hole, print_offset_data::update)
214 (print_offset_data::finish): Move from c-typeprint.c and rename.
215 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
216 (print_spaces_filtered_with_print_options): Update.
217 (c_print_type_union_field_offset, maybe_print_hole)
218 (c_print_type_struct_field_offset): Move to typeprint.c and
220 (c_type_print_base_struct_union): Update.
222 2018-06-25 Pedro Alves <palves@redhat.com>
224 * gdbthread.h (thread_info_ref, delete_thread)
225 (delete_thread_silent, first_thread_of_inferior)
226 (any_thread_of_inferior, switch_to_thread)
227 (enable_thread_stack_temporaries)
228 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
229 (get_last_thread_stack_temporary)
230 (value_in_thread_stack_temporaries, can_access_registers_thread):
231 Spell out "struct thread_info" instead of just "thread_info".
232 * inferior.h (notice_new_inferior): Likewise.
234 2018-06-25 Pedro Alves <palves@redhat.com>
236 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
237 pass thread_info pointer to delete_thread.
238 (windows_nat_target::detach): Pass inferior pointer to
240 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
242 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
243 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
244 and pass a thread_info pointer to delete_thread.
245 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
246 pass thread_info pointer to delete_thread.
247 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
248 delete_thread_silent call.
249 * procfs.c (procfs_target::detach): Pass inferior pointer to
251 (procfs_target::wait): Pass thread_info pointer to delete_thread.
252 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
253 delete_thread_silent call.
254 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
255 pass thread_info pointer to delete_thread.
256 (windows_nat_target::detach): Pass inferior pointer to
259 2018-06-22 Alan Hayward <alan.hayward@arm.com>
261 * regcache.c (readable_regcache::read_part): Fix asserts.
262 (reg_buffer::raw_collect_part): New function.
263 (regcache::write_part): Fix asserts.
264 (reg_buffer::raw_supply_part): New function.
265 (regcache::transfer_regset_register): New helper function.
266 (regcache::transfer_regset): Call new functions.
267 (regcache_supply_regset): Use gdb_byte*.
268 (regcache::supply_regset): Likewise.
269 (regcache_collect_regset): Likewise.
270 (regcache::collect_regset): Likewise.
271 * regcache.h (reg_buffer::raw_collect_part): New declaration.
272 (reg_buffer::raw_supply_part): Likewise.
273 (regcache::transfer_regset_register): Likewise.
274 (regcache::transfer_regset): Use gdb_byte*.
276 2018-06-22 Alan Hayward <alan.hayward@arm.com>
278 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
280 2018-06-21 Pedro Alves <palves@redhat.com>
282 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
283 instead of a ptid_t. All callers adjusted.
284 * ada-tasks.c (ada_get_task_number): Likewise. All callers
286 (print_ada_task_info, display_current_task_id, task_command_1):
288 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
290 (breakpoint_kind): Adjust.
291 (remove_breakpoints_pid): Rename to ...
292 (remove_breakpoints_inf): ... this. Adjust to take an inferior
293 pointer. All callers adjusted.
294 (bpstat_clear_actions): Use inferior_thread.
295 (get_bpstat_thread): New.
296 (bpstat_do_actions): Use it.
297 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
298 to take a thread_info pointer. All callers adjusted.
299 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
300 (breakpoint_re_set_thread): Use inferior_thread.
301 * breakpoint.h (struct inferior): Forward declare.
302 (bpstat_stop_status): Update.
303 (remove_breakpoints_pid): Delete.
304 (remove_breakpoints_inf): New.
305 * bsd-uthread.c (bsd_uthread_target::wait)
306 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
307 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
308 (maint_btrace_packet_history_cmd)
309 (maint_btrace_clear_packet_history_cmd): Adjust.
310 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
312 * cli/cli-interp.c: Include "inferior.h".
313 * common/refcounted-object.h (struct
314 refcounted_object_ref_policy): New.
315 * compile/compile-object-load.c: Include gdbthread.h.
316 (store_regs): Use inferior_thread.
317 * corelow.c (core_target::close): Use current_inferior.
318 (core_target_open): Adjust to use first_thread_of_inferior and use
319 the current inferior.
320 * ctf.c (ctf_target::close): Adjust to use current_inferior.
321 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
322 <thread>: ... this new field. All references adjusted.
323 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
324 Take a thread_info pointer instead of a ptid_t.
325 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
326 (dummy_frame_discard, register_dummy_frame_dtor): Take a
327 thread_info pointer instead of a ptid_t.
328 * elfread.c: Include "inferior.h".
329 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
331 * eval.c (evaluate_subexp): Likewise.
332 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
334 * gdb_proc_service.h (struct thread_info): Forward declare.
335 (struct ps_prochandle) <ptid>: Delete, replaced by ...
336 <thread>: ... this new field. All references adjusted.
337 * gdbarch.h, gdbarch.c: Regenerate.
338 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
339 'thread' parameter. All implementations and callers adjusted.
340 * gdbthread.h (thread_info) <set_running>: New method.
341 (delete_thread, delete_thread_silent): Take a thread_info pointer
343 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
344 (first_thread_of_process): Delete, replaced by ...
345 (first_thread_of_inferior): ... this new function. All callers
347 (any_live_thread_of_process): Delete, replaced by ...
348 (any_live_thread_of_inferior): ... this new function. All callers
350 (switch_to_thread, switch_to_no_thread): Declare.
351 (is_executing): Delete.
352 (enable_thread_stack_temporaries): Update comment.
353 <enable_thread_stack_temporaries>: Take a thread_info pointer
354 instead of a ptid_t. Incref the thread.
355 <~enable_thread_stack_temporaries>: Decref the thread.
358 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
359 (get_last_thread_stack_temporary)
360 (value_in_thread_stack_temporaries, can_access_registers_thread):
361 Take a thread_info pointer instead of a ptid_t. All callers
363 * infcall.c (get_call_return_value): Use inferior_thread.
364 (run_inferior_call): Work with thread pointers instead of ptid_t.
365 (call_function_by_hand_dummy): Work with thread pointers instead
366 of ptid_t. Use thread_info_ref.
367 * infcmd.c (proceed_thread_callback): Access thread's state
369 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
370 access thread's state directly.
371 (continue_command): Use inferior_thread.
372 (info_program_command): Use find_thread_ptid and access thread
374 (proceed_after_attach_callback): Use thread state directly.
375 (notice_new_inferior): Take a thread_info pointer instead of a
376 ptid_t. All callers adjusted.
377 (exit_inferior): Take an inferior pointer instead of a pid. All
379 (exit_inferior_silent): New.
380 (detach_inferior): Delete.
381 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
382 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
383 (detach_inferior_command, kill_inferior_command): Use
384 find_inferior_id instead of valid_gdb_inferior_id and
385 gdb_inferior_id_to_pid.
386 (inferior_command): Use inferior and thread pointers.
387 * inferior.h (struct thread_info): Forward declare.
388 (notice_new_inferior): Take a thread_info pointer instead of a
389 ptid_t. All callers adjusted.
390 (detach_inferior): Delete declaration.
391 (exit_inferior, exit_inferior_silent): Take an inferior pointer
392 instead of a pid. All callers adjusted.
393 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
394 (valid_gdb_inferior_id): Delete.
395 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
396 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
397 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
399 <inf>: ... this new field.
400 <step_ptid>: Delete, replaced by ...
401 <step_thread>: ... this new field.
402 (get_displaced_stepping_state): Take an inferior pointer instead
403 of a pid. All callers adjusted.
404 (displaced_step_in_progress_any_inferior): Adjust.
405 (displaced_step_in_progress_thread): Take a thread pointer instead
406 of a ptid_t. All callers adjusted.
407 (displaced_step_in_progress, add_displaced_stepping_state): Take
408 an inferior pointer instead of a pid. All callers adjusted.
409 (get_displaced_step_closure_by_addr): Adjust.
410 (remove_displaced_stepping_state): Take an inferior pointer
411 instead of a pid. All callers adjusted.
412 (displaced_step_prepare_throw, displaced_step_prepare)
413 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
414 All callers adjusted.
415 (start_step_over): Adjust.
416 (infrun_thread_ptid_changed): Remove bit updating ptids in the
417 displaced step queue.
418 (do_target_resume): Adjust.
419 (fetch_inferior_event): Use inferior_thread.
420 (context_switch, get_inferior_stop_soon): Take an
421 execution_control_state pointer instead of a ptid_t. All callers
423 (switch_to_thread_cleanup): Delete.
424 (stop_all_threads): Use scoped_restore_current_thread.
425 * inline-frame.c: Include "gdbthread.h".
426 (inline_state) <inline_state>: Take a thread pointer instead of a
427 ptid_t. All callers adjusted.
428 <ptid>: Delete, replaced by ...
429 <thread>: ... this new field.
430 (find_inline_frame_state): Take a thread pointer instead of a
431 ptid_t. All callers adjusted.
432 (skip_inline_frames, step_into_inline_frame)
433 (inline_skipped_frames, inline_skipped_symbol): Take a thread
434 pointer instead of a ptid_t. All callers adjusted.
435 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
436 (inline_skipped_frames, inline_skipped_symbol): Likewise.
437 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
439 * linux-nat.c (get_detach_signal): Likewise.
440 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
441 (thread_db_notice_clone): Adjust.
442 (thread_db_find_new_threads_silently)
443 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
444 a thread pointer instead of a ptid_t. All callers adjusted.
445 * mi/mi-cmd-var.c: Include "inferior.h".
446 (mi_cmd_var_update_iter): Update to use thread pointers.
447 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
449 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
451 (mi_output_running): ... this new function.
452 (mi_on_resume_1): Adjust to use it.
453 (mi_user_selected_context_changed): Adjust to use inferior_thread.
454 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
456 (interrupt_thread_callback): : Adjust to use thread and inferior
458 * proc-service.c: Include "gdbthread.h".
459 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
460 * progspace-and-thread.c: Include "inferior.h".
461 * progspace.c: Include "inferior.h".
462 * python/py-exitedevent.c (create_exited_event_object): Adjust to
463 hold a reference to an inferior_object.
464 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
466 * python/py-inferior.c (struct inferior_object): Give the type a
467 tag name instead of a typedef.
468 (python_on_normal_stop): No need to check if the current thread is
470 (inferior_to_inferior_object): Change return type to
471 inferior_object. All callers adjusted.
472 (find_thread_object): Delete, bits factored out to ...
473 (thread_to_thread_object): ... this new function.
474 * python/py-infthread.c (create_thread_object): Use
475 inferior_to_inferior_object.
476 (thpy_is_stopped): Use thread pointer directly.
477 (gdbpy_selected_thread): Use inferior_thread.
478 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
479 field, replaced with ...
480 <thread>: ... this new field. All users adjusted.
481 (btpy_insn_or_gap_new): Drop const.
482 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
484 * python/py-record.c: Include "gdbthread.h".
485 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
486 a ptid_t. All callers adjusted.
487 (gdbpy_current_recording): Use inferior_thread.
488 * python/py-record.h (recpy_record_object) <ptid>: Delete
489 field, replaced with ...
490 <thread>: ... this new field. All users adjusted.
491 (recpy_element_object) <ptid>: Delete
492 field, replaced with ...
493 <thread>: ... this new field. All users adjusted.
494 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
495 a ptid_t. All callers adjusted.
496 * python/py-threadevent.c: Include "gdbthread.h".
497 (get_event_thread): Use thread_to_thread_object.
498 * python/python-internal.h (struct inferior_object): Forward
500 (find_thread_object, find_inferior_object): Delete declarations.
501 (thread_to_thread_object, inferior_to_inferior_object): New
503 * record-btrace.c: Include "inferior.h".
504 (require_btrace_thread): Use inferior_thread.
505 (record_btrace_frame_sniffer)
506 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
507 (get_thread_current_frame): Use scoped_restore_current_thread and
509 (get_thread_current_frame): Use thread pointer directly.
510 (record_btrace_replay_at_breakpoint): Use thread's inferior
512 * record-full.c: Include "inferior.h".
513 * regcache.c: Include "gdbthread.h".
514 (get_thread_arch_regcache): Use the inferior's address space
516 (get_thread_regcache, registers_changed_thread): New.
517 * regcache.h (get_thread_regcache(thread_info *thread)): New
519 (registers_changed_thread): New.
520 (remote_target) <remote_detach_1>: Swap order of parameters.
521 (remote_add_thread): <remote_add_thread>: Return the new thread.
522 (get_remote_thread_info(ptid_t)): New overload.
523 (remote_target::remote_notice_new_inferior): Use thread pointers
525 (remote_target::process_initial_stop_replies): Use
526 thread_info::set_running.
527 (remote_target::remote_detach_1, remote_target::detach)
528 (extended_remote_target::detach): Adjust.
529 * stack.c (frame_show_address): Use inferior_thread.
530 * target-debug.h (target_debug_print_thread_info_pp): New.
531 * target-delegates.c: Regenerate.
532 * target.c (default_thread_address_space): Delete.
533 (memory_xfer_partial_1): Use current_inferior.
534 (target_detach): Use current_inferior.
535 (target_thread_address_space): Delete.
536 (generic_mourn_inferior): Use current_inferior.
537 * target.h (struct target_ops) <thread_address_space>: Delete.
538 (target_thread_address_space): Delete.
539 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
541 (delete_thread_1, delete_thread, delete_thread_silent): Take a
542 thread pointer instead of a ptid_t. Adjust all callers.
543 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
544 (first_thread_of_process): Delete, replaced by ...
545 (first_thread_of_inferior): ... this new function. All callers
547 (any_thread_of_process): Rename to ...
548 (any_thread_of_inferior): ... this, and take an inferior pointer.
549 (any_live_thread_of_process): Rename to ...
550 (any_live_thread_of_inferior): ... this, and take an inferior
552 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
553 (value_in_thread_stack_temporaries)
554 (get_last_thread_stack_temporary): Take a thread pointer instead
555 of a ptid_t. Adjust all callers.
556 (thread_info::set_running): New.
557 (validate_registers_access): Use inferior_thread.
558 (can_access_registers_ptid): Rename to ...
559 (can_access_registers_thread): ... this, and take a thread
561 (print_thread_info_1): Adjust to compare thread pointers instead
563 (switch_to_no_thread, switch_to_thread): Make extern.
564 (scoped_restore_current_thread::~scoped_restore_current_thread):
565 Use m_thread pointer directly.
566 (scoped_restore_current_thread::scoped_restore_current_thread):
568 (thread_command): Use thread pointer directly.
569 (thread_num_make_value_helper): Use inferior_thread.
570 * top.c (execute_command): Use inferior_thread.
571 * tui/tui-interp.c: Include "inferior.h".
572 * varobj.c (varobj_create): Use inferior_thread.
573 (value_of_root_1): Use find_thread_global_id instead of
574 global_thread_id_to_ptid.
576 2018-06-21 Alan Hayward <alan.hayward@arm.com>
578 * regcache.c (readable_regcache::read_part): Avoid memcpy when
580 (regcache::write_part): Likewise.
581 (readable_regcache::cooked_read_part): Update comment.
582 (readable_regcache::cooked_write_part): Likewise.
583 * regcache.h: (readable_regcache::read_part): Likewise.
584 (regcache::write_part): Likewise.
586 2018-06-21 Richard Bunt <richard.bunt@arm.com>
587 Dirk Schubert <dirk.schubert@arm.com>
589 * aarch64-linux-nat.c (post_attach): New.
590 (aarch64_linux_nat_target::post_attach): Override post_attach to
591 record the number of hardware debug registers.
593 2018-06-20 Tom Tromey <tom@tromey.com>
595 * python/py-param.c (add_setshow_generic): Make parameters const.
596 (parmpy_init): Update.
598 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
600 * regcache.h (regcache_cooked_read_ftype): Rename to...
601 (register_read_ftype): ...this, change type to function_view.
602 (class reg_buffer) <save>: Remove src parameter.
603 (readonly_detached_regcache) <readonly_detached_regcache>: Make
604 parameter non-const in first overload. Remove src parameter in
606 * regcache.c (do_cooked_read): Remove.
607 (readonly_detached_regcache::readonly_detached_regcache): Make
608 parameter non-const, adjust call to other constructor.
609 (reg_buffer::save): Remove src parameter.
610 * frame.c (do_frame_register_read): Remove.
611 (frame_save_as_regcache): Use lambda function.
612 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
613 parameter to ppu2spu_data *.
614 (ppu2spu_sniffer): Use lambda function.
616 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
618 * record-full.c (record_full_target::insert_breakpoint): Remove
619 "struct" keyword, add const.
621 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
623 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
624 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
625 * configure.ac: Remove AC_PREREQ, add missing quoting.
626 * gnulib/configure.ac: Modernize usage of
627 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
628 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
629 (AUTOMAKE_VERSION): Bump to 1.15.1.
630 * configure: Re-generate.
631 * config.in: Re-generate.
632 * aclocal.m4: Re-generate.
633 * gnulib/aclocal.m4: Re-generate.
634 * gnulib/config.in: Re-generate.
635 * gnulib/configure: Re-generate.
636 * gnulib/import/Makefile.in: Re-generate.
638 2018-06-19 Pedro Alves <palves@redhat.com>
640 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
641 (lookup_minimal_symbol_by_pc_section): ... here with
642 gdb_assert_not_reached added.
644 2018-06-19 Pedro Alves <palves@redhat.com>
646 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
647 parameter with a block parameter. Compare location's block symbol
648 with the frame's block instead of addresses.
649 (skip_inline_frames): Pass the current block instead of the
650 frame's address. Break out as soon as we determine the frame
651 should not be skipped.
653 2018-06-18 Tom Tromey <tom@tromey.com>
655 * solib-aix.c (solib_aix_get_section_offsets): Return
657 (solib_aix_solib_create_inferior_hook): Update.
659 2018-06-18 Tom Tromey <tom@tromey.com>
661 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
663 2018-06-18 Tom Tromey <tom@tromey.com>
665 * solib-frv.c (frv_relocate_main_executable): Use
667 * solib-dsbt.c (dsbt_relocate_main_executable): Use
670 2018-06-18 Tom Tromey <tom@tromey.com>
672 * objfiles.h (inhibit_section_map_updates): Update.
673 (resume_section_map_updates, resume_section_map_updates_cleanup):
675 * solib-svr4.c (svr4_handle_solib_event): Update.
676 * objfiles.c (inhibit_section_map_updates): Return
677 scoped_restore_tmpl<int>.
678 (resume_section_map_updates, resume_section_map_updates_cleanup):
681 2018-06-18 Tom Tromey <tom@tromey.com>
683 * valprint.h (read_string): Update.
684 * valprint.c (read_string): Change type of "buffer".
685 (val_print_string): Update.
686 * python/py-value.c (valpy_string): Update.
687 * language.h (struct language_defn) <la_get_string>: Change
689 (default_get_string, c_get_string): Update.
690 * language.c (default_get_string): Change type of "buffer".
691 * guile/scm-value.c (gdbscm_value_to_string): Update.
692 * c-lang.c (c_get_string): Change type of "buffer".
694 2018-06-18 Tom Tromey <tom@tromey.com>
696 * ser-mingw.c (struct pipe_state_destroyer): New.
697 (pipe_state_up): New typedef.
698 (cleanup_pipe_state): Remove.
699 (pipe_windows_open): Use pipe_state_up. Don't release argv.
701 2018-06-18 Tom Tromey <tom@tromey.com>
703 * rust-lang.h (rust_yyerror): Don't declare.
704 * rust-lang.c (rust_language_defn): Update.
705 * rust-exp.y (yyerror): Now static.
706 * parse.c (parse_exp_in_context_1): Update.
707 * p-lang.h (p_yyerror): Don't declare.
708 * p-lang.c (p_language_defn): Update.
709 * p-exp.y (yyerror): Now static.
710 * opencl-lang.c (opencl_language_defn): Update.
711 * objc-lang.c (objc_language_defn): Update.
712 * m2-lang.h (m2_yyerror): Don't declare.
713 * m2-lang.c (m2_language_defn): Update.
714 * m2-exp.y (yyerror): Now static.
715 * language.h (struct language_defn) <la_error>: Remove.
716 * language.c (unk_lang_error): Remove.
717 (unknown_language_defn, auto_language_defn): Remove.
718 * go-lang.h (go_yyerror): Don't declare.
719 * go-lang.c (go_language_defn): Update.
720 * go-exp.y (yyerror): Now static.
721 * f-lang.h (f_yyerror): Don't declare.
722 * f-lang.c (f_language_defn): Update.
723 * f-exp.y (yyerror): Now static.
724 * d-lang.h (d_yyerror): Don't declare.
725 * d-lang.c (d_language_defn): Update.
726 * d-exp.y (yyerror): Now static.
727 * c-lang.h (c_yyerror): Don't declare.
728 * c-lang.c (c_language_defn, cplus_language_defn)
729 (asm_language_defn, minimal_language_defn): Update.
730 * c-exp.y (yyerror): Now static.
731 * ada-lang.h (ada_yyerror): Don't declare.
732 * ada-lang.c (ada_language_defn): Update.
733 * ada-exp.y (yyerror): Now static.
735 2018-06-18 Alan Hayward <alan.hayward@arm.com>
737 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
738 (store_sveregs_to_thread): Likewise.
739 (aarch64_linux_fetch_inferior_registers): Check for SVE.
740 (aarch64_linux_store_inferior_registers): Likewise.
741 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
743 (aarch64_sve_regs_copy_to_regcache): Likewise.
744 (aarch64_sve_regs_copy_from_regcache): Likewise.
745 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
747 (aarch64_sve_regs_copy_to_regcache): Likewise.
748 (aarch64_sve_regs_copy_from_regcache): Likewise.
749 (sve_context): Structure from Linux headers.
750 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
751 (SVE_SIG_ZREG_SIZE): Likewise.
752 (SVE_SIG_PREG_SIZE): Likewise.
753 (SVE_SIG_FFR_SIZE): Likewise.
754 (SVE_SIG_REGS_OFFSET): Likewise.
755 (SVE_SIG_ZREGS_OFFSET): Likewise.
756 (SVE_SIG_ZREG_OFFSET): Likewise.
757 (SVE_SIG_ZREGS_SIZE): Likewise.
758 (SVE_SIG_PREGS_OFFSET): Likewise.
759 (SVE_SIG_PREG_OFFSET): Likewise.
760 (SVE_SIG_PREGS_SIZE): Likewise.
761 (SVE_SIG_FFR_OFFSET): Likewise.
762 (SVE_SIG_REGS_SIZE): Likewise.
763 (SVE_SIG_CONTEXT_SIZE): Likewise.
764 (SVE_PT_REGS_MASK): Likewise.
765 (SVE_PT_REGS_FPSIMD): Likewise.
766 (SVE_PT_REGS_SVE): Likewise.
767 (SVE_PT_VL_INHERIT): Likewise.
768 (SVE_PT_VL_ONEXEC): Likewise.
769 (SVE_PT_REGS_OFFSET): Likewise.
770 (SVE_PT_FPSIMD_OFFSET): Likewise.
771 (SVE_PT_FPSIMD_SIZE): Likewise.
772 (SVE_PT_SVE_ZREG_SIZE): Likewise.
773 (SVE_PT_SVE_PREG_SIZE): Likewise.
774 (SVE_PT_SVE_FFR_SIZE): Likewise.
775 (SVE_PT_SVE_FPSR_SIZE): Likewise.
776 (SVE_PT_SVE_FPCR_SIZE): Likewise.
777 (__SVE_SIG_TO_PT): Likewise.
778 (SVE_PT_SVE_OFFSET): Likewise.
779 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
780 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
781 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
782 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
783 (SVE_PT_SVE_PREG_OFFSET): Likewise.
784 (SVE_PT_SVE_PREGS_SIZE): Likewise.
785 (SVE_PT_SVE_FFR_OFFSET): Likewise.
786 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
787 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
788 (SVE_PT_SVE_SIZE): Likewise.
789 (SVE_PT_SIZE): Likewise.
790 (HAS_SVE_STATE): New define.
792 2018-06-18 Alan Hayward <alan.hayward@arm.com>
794 * nat/aarch64-sve-linux-sigcontext.h: New file.
795 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
797 (SVE_VQ_MIN): Likewise.
798 (SVE_VQ_MAX): Likewise.
799 (SVE_VL_MIN): Likewise.
800 (SVE_VL_MAX): Likewise.
801 (SVE_NUM_ZREGS): Likewise.
802 (SVE_NUM_PREGS): Likewise.
803 (sve_vl_valid): Likewise.
804 (struct user_sve_header): Likewise.
806 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
807 Richard Bunt <Richard.Bunt@arm.com>
809 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
810 was requested by GDB.
812 2018-06-15 Tom de Vries <tdevries@suse.de>
814 * MAINTAINERS (Write After Approval): Add Tom de Vries.
816 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
818 * gnulib/update-gnulib.sh: Print expected versions of
821 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
823 * arch-utils.c (default_type_align): Use type_length_units.
824 * gdbtypes.c (type_align): Use type_length_units.
826 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
828 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
831 2018-06-14 Tom de Vries <tdevries@suse.de>
834 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
835 get_no_prettyformat_print_options.
837 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
839 * sparc-nat.h: Include target.h.
840 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
841 <fetch_registers>: Remove this argument in function call.
842 <store_registers>: Remove this argument in function call, remove
844 <low_forget_process>: Call sparc64_forget_process instead of
845 sparc_forget_process.
847 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
849 * procfs.c (_initialize_procfs): Use add_inf_child_target.
850 (procfs_target::make_corefile_notes): Adjust to new
851 target_read_alloc return type.
853 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
854 Stephen Roberts <stephen.roberts@arm.com>
857 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
858 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
859 Move should_notify_stop local into more inner scope.
861 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
862 Stephen Roberts <stephen.roberts@arm.com>
865 * infrun.c (resume_1): Add call to mark_async_event_handler.
867 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
869 * infrun.c (do_target_wait): Change old version of $pc printed.
871 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
873 * dwarf2read.c (read_index_from_section): Rename to...
874 (read_gdb_index_from_section): ... this, update all callers.
875 (dwarf2_read_index): Rename to...
876 (dwarf2_read_gdb_index): ... this, update all callers.
878 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
880 * gdb/hppa-linux-nat.c
881 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
882 hppa_linux_nat_target::fetch_registers.
884 2018-06-11 Alan Hayward <alan.hayward@arm.com>
886 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
887 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
888 (AARCH64_DWARF_SVE_FFR): Likewise.
889 (AARCH64_DWARF_SVE_P0): Likewise.
890 (AARCH64_DWARF_SVE_Z0): Likewise.
892 2018-06-11 Alan Hayward <alan.hayward@arm.com>
894 * common/common-regcache.h (raw_compare): New function.
895 * regcache.c (regcache::raw_compare): Likewise.
896 * regcache.h (regcache::raw_compare): New declaration.
898 2018-06-11 Alan Hayward <alan.hayward@arm.com>
900 * common/common-regcache.h (reg_buffer_common): New structure.
901 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
902 (reg_buffer::raw_supply): Likewise.
903 (reg_buffer::raw_supply_integer): Likewise.
904 (reg_buffer::raw_supply_zeroed): Likewise.
905 (reg_buffer::raw_collect): Likewise.
906 (reg_buffer::raw_collect_integer): Likewise.
907 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
908 (reg_buffer::raw_supply): Likewise.
909 (reg_buffer::raw_supply_integer): Likewise.
910 (reg_buffer::raw_supply_zeroed): Likewise.
911 (reg_buffer::raw_collect): Likewise.
912 (reg_buffer::raw_collect_integer): Likewise.
914 2018-06-10 Tom Tromey <tom@tromey.com>
916 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
917 (class remote_state) <stop_reply_queue>: Now std::vector.
918 (remote_state::~remote_state)
919 (remote_target::stop_reply_queue_length): Update.
920 (struct queue_iter_param, remove_child_of_pending_fork)
921 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
922 (check_pending_event_prevents_wildcard_vcont_callback)
923 (remove_stop_reply_for_inferior)
924 (remove_stop_reply_of_remote_state)
925 (remote_notif_remove_once_on_match)
926 (stop_reply_match_ptid_and_ws)
927 (remote_kill_child_of_pending_fork): Remove.
928 (remote_target::remove_new_fork_children)
929 (remote_target::check_pending_events_prevent_wildcard_vcont)
930 (remote_target::discard_pending_stop_replies)
931 (remote_target::discard_pending_stop_replies_in_queue)
932 (remote_target::remote_notif_remove_queued_reply)
933 (remote_target::queued_stop_reply)
934 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
935 (remote_target::wait, remote_target::kill_new_fork_children)
936 (remote_target::async): Update.
938 2018-06-10 Tom Tromey <tom@tromey.com>
940 * record-full.c (record_full_arch_list_cleanups): Remove.
941 (record_full_message): Use try/catch.
942 (record_full_wait_cleanups): Remove.
943 (record_full_wait_1): Use try/catch.
944 (record_full_restore): Likewise.
946 2018-06-10 Tom Tromey <tom@tromey.com>
948 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
949 declare VEC. Add constructor.
950 <in_target_beneath>: Now bool.
951 (record_full_breakpoints): Now a std::vector, static.
952 (record_full_sync_record_breakpoints)
953 (record_full_init_record_breakpoints)
954 (record_full_target::insert_breakpoint)
955 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
957 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
959 * dwarf2read.c (process_cu_includes): Remove struct keyword.
960 * serial.c (serial_interface_lookup): Remove struct keyword.
962 2018-06-10 Tom Tromey <tom@tromey.com>
964 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
966 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
968 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
970 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
971 "beneath" as a method.
972 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
973 Use "beneath" as a method.
975 2018-06-10 Tom Tromey <tom@tromey.com>
977 * tracefile.c (struct trace_file_writer_deleter): New.
978 <operator()>: Rename from trace_file_writer_xfree.
979 (trace_file_writer_up): New typedef.
980 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
982 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
984 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
985 <m_registers, m_register_status>: Change type to
987 * regcache.c (reg_buffer::reg_buffer): Use new instead of
990 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
992 * common/common-regcache.h (enum register_status): Add
993 underlying type "signed char".
994 * regcache.h (reg_buffer) <m_register_status>: Change type to
996 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
997 register_status instead of signed char.
998 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
999 (reg_buffer::get_register_status): Remove cast.
1000 (readable_regcache::raw_read): Remove cast.
1001 (readable_regcache::cooked_read): Remove cast.
1003 2018-06-09 Tom Tromey <tom@tromey.com>
1005 * source.c (reverse_search_command, forward_search_command): Use
1008 2018-06-09 Tom Tromey <tom@tromey.com>
1010 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1011 (serial_ops_list): Now static, std::vector.
1012 (serial_interface_lookup, serial_add_interface): Update.
1014 2018-06-09 Tom Tromey <tom@tromey.com>
1016 * dwarf2read.c (process_cu_includes): Update.
1017 (process_full_comp_unit): Update.
1018 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1021 2018-06-08 Paul Koning <paul_koning@dell.com>
1025 * python/python.c (do_start_initialization):
1026 Avoid call to internal Python API.
1027 (init__gdb_module): New function.
1029 2018-06-08 Gary Benson <gbenson@redhat.com>
1031 * linux-thread-db.c (valprint.h): New include.
1032 (struct check_thread_db_info): New structure.
1033 (check_thread_db_on_load, tdb_testinfo): New static globals.
1034 (check_thread_db, check_thread_db_callback): New functions.
1035 (try_thread_db_load_1): Run integrity checks if requested.
1036 (maintenance_check_libthread_db): New function.
1037 (_initialize_thread_db): Register "maint check libthread-db"
1038 and "maint set/show check-libthread-db".
1039 * NEWS: Mention the above new commands.
1041 2018-06-08 Tom Tromey <tom@tromey.com>
1043 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1046 2018-06-08 Tom Tromey <tom@tromey.com>
1048 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1050 2018-06-08 Tom Tromey <tom@tromey.com>
1052 * common/btrace-common.h (struct btrace_data): Add constructor,
1053 destructor, move assignment operator.
1054 <empty, clear, fini>: New methods.
1055 <format>: Initialize.
1056 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1057 (btrace_data_empty): Don't declare.
1058 * common/btrace-common.c (btrace_data_init): Remove.
1059 (btrace_data::fini): Rename from btrace_data_fini.
1060 (btrace_data::empty): Rename from btrace_data_empty.
1061 (btrace_data::clear): Rename from btrace_data_clear. Return
1063 * btrace.h (make_cleanup_btrace_data): Don't declare.
1064 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1065 (parse_xml_btrace): Update.
1066 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1067 (maint_btrace_clear_packet_history_cmd): Update.
1069 2018-06-07 Pedro Alves <palves@redhat.com>
1071 * target.h (target_ops) <beneath>: Now a method. All references
1073 (class target_stack): New.
1074 * target.c (g_target_stack): New.
1075 (g_current_top_target): Delete.
1076 (current_top_target): Get the top target out of g_target_stack.
1077 (target_stack::push, target_stack::unpush): New.
1078 (push_target, unpush_target): Reimplement.
1079 (target_is_pushed): Reimplement in terms of g_target_stack.
1080 (target_ops::beneath, target_stack::find_beneath): New.
1082 2018-06-07 Pedro Alves <palves@redhat.com>
1084 * target.h (find_target_beneath): Delete declaration.
1085 * target.c (find_target_beneath): Delete definition.
1086 * aix-thread.c: All callers of find_target_beneath adjusted to
1087 call target_ops::beneath instead.
1088 * bsd-uthread.c: Likewise.
1089 * linux-thread-db.c: Likewise.
1090 * ravenscar-thread.c: Likewise.
1091 * sol-thread.c: Likewise.
1092 * spu-multiarch.c: Likewise.
1094 2018-06-07 Pedro Alves <palves@redhat.com>
1096 * target.h (target_ops) <beneath>: Now a method. All references
1098 (target_ops) <m_beneath>: New.
1099 * target.c (target_ops::beneath): New.
1100 * corelow.c: Adjust all references to target_ops::beneath.
1101 * linux-thread-db.c: Likewise.
1102 * make-target-delegates: Likewise.
1103 * record-btrace.c: Likewise.
1104 * record-full.c: Likewise.
1105 * remote.c: Likewise.
1106 * target.c: Likewise.
1107 * target-delegates.c: Regenerate.
1109 2018-06-07 Pedro Alves <palves@redhat.com>
1111 * target.h (target_stack): Delete.
1112 (current_top_target): Declare function.
1113 * target.c (target_stack): Delete.
1114 (g_current_top_target): New.
1115 (current_top_target): New function.
1116 * auxv.c: Use current_top_target instead of target_stack
1118 * avr-tdep.c: Likewise.
1119 * breakpoint.c: Likewise.
1120 * corefile.c: Likewise.
1121 * elfread.c: Likewise.
1123 * exceptions.c: Likewise.
1124 * frame.c: Likewise.
1125 * gdbarch-selftests.c: Likewise.
1126 * gnu-v3-abi.c: Likewise.
1127 * ia64-tdep.c: Likewise.
1128 * ia64-vms-tdep.c: Likewise.
1129 * infcall.c: Likewise.
1130 * infcmd.c: Likewise.
1131 * infrun.c: Likewise.
1132 * linespec.c: Likewise.
1133 * linux-tdep.c: Likewise.
1134 * minsyms.c: Likewise.
1135 * ppc-linux-nat.c: Likewise.
1136 * ppc-linux-tdep.c: Likewise.
1137 * procfs.c: Likewise.
1138 * regcache.c: Likewise.
1139 * remote.c: Likewise.
1140 * rs6000-tdep.c: Likewise.
1141 * s390-linux-nat.c: Likewise.
1142 * s390-tdep.c: Likewise.
1143 * solib-aix.c: Likewise.
1144 * solib-darwin.c: Likewise.
1145 * solib-dsbt.c: Likewise.
1146 * solib-spu.c: Likewise.
1147 * solib-svr4.c: Likewise.
1148 * solib-target.c: Likewise.
1149 * sparc-tdep.c: Likewise.
1150 * sparc64-tdep.c: Likewise.
1151 * spu-tdep.c: Likewise.
1152 * symfile.c: Likewise.
1153 * symtab.c: Likewise.
1154 * target-descriptions.c: Likewise.
1155 * target-memory.c: Likewise.
1156 * target.c: Likewise.
1157 * target.h: Likewise.
1158 * tracefile-tfile.c: Likewise.
1159 * tracepoint.c: Likewise.
1160 * valops.c: Likewise.
1161 * valprint.c: Likewise.
1162 * value.c: Likewise.
1163 * windows-tdep.c: Likewise.
1164 * mi/mi-main.c: Likewise.
1166 2018-06-07 Tom Tromey <tom@tromey.com>
1168 * valprint.h (build_address_symbolic): Declare.
1169 * printcmd.c (print_address_symbolic): Update.
1170 (build_address_symbolic): Change "name" and "filename" to
1172 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1174 * defs.h (build_address_symbolic): Remove declaration.
1176 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1178 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1179 (aarch64_vnv_type): Add function.
1180 (aarch64_pseudo_register_name): Add V regs for SVE.
1181 (aarch64_pseudo_register_type): Likewise.
1182 (aarch64_pseudo_register_reggroup_p): Likewise.
1183 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1184 (aarch64_pseudo_read_value): Add V regs for SVE.
1185 (aarch64_pseudo_write_2): Use V0 offset for SVE
1186 (aarch64_pseudo_write): Add V regs for SVE.
1187 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1189 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1191 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1192 (sve_vl_from_vq): Likewise.
1194 2018-06-05 Tom Tromey <tom@tromey.com>
1196 * cli/cli-cmds.c (show_version): Update.
1197 * top.c (print_gdb_version): Add "interactive" parameter.
1199 * main.c (captured_main_1): Update.
1200 * top.h (print_gdb_version): Add "interactive" parameter and a
1203 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1205 * common/enum-flags.h: Add trailing semicolon to example in
1208 2018-06-05 Tom Tromey <tom@tromey.com>
1211 * NEWS: Add entry about pager.
1212 * utils.c (pagination_disabled_for_command): New global.
1213 (prompt_for_continue): Allow "c" response to prompt.
1214 (reinitialize_more_filter): Clear
1215 pagination_disabled_for_command.
1216 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1218 2018-06-04 Tom Tromey <tom@tromey.com>
1220 * ada-lang.h (ada_lookup_symbol_list): Update.
1221 * ada-lang.c (resolve_subexp): Update.
1222 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1224 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1225 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1226 results parameter to std::vector.
1227 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1229 * ada-exp.y (block_lookup): Update.
1230 (select_possible_type_sym): Change type of syms. Remove nsyms
1232 (write_var_or_type, write_name_assoc): Update.
1234 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1236 * windows-nat.c (windows_nat_target::xfer_partial): Return
1237 TARGET_XFER_E_IO if we need to delegate to the target beneath
1238 but BENEATH is NULL.
1240 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1242 * Makefile.in (config.status): Add configure.nat as a
1245 2018-06-04 Tom Tromey <tom@tromey.com>
1247 * cp-name-parser.y (cpname_state): Add method declarations.
1248 (HANDLE_QUAL): Update.
1249 (cpname_state::d_grab, cpname_state::fill_comp)
1250 (cpname_state::make_operator, cpname_state::make_dtor)
1251 (cpname_state::make_builtin_type, cpname_state::make_name)
1252 (cpname_state::d_qualify, cpname_state::d_int_type)
1253 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1254 (%union): Move earlier.
1256 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1258 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1260 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1262 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1263 (aarch64_pseudo_write_1): Likewise.
1264 (aarch64_pseudo_read_value): Use helper.
1265 (aarch64_pseudo_write): Likewise.
1267 2018-06-04 Pedro Alves <palves@redhat.com>
1269 * darwin-nat.c (darwin_ops): Delete.
1270 (darwin_attach_pid): Use get_native_target.
1272 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1274 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1275 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1277 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1279 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1280 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1281 (aarch64_gdbarch_init): Check for SVE.
1282 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1284 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1286 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1287 * aarch64-tdep.h (aarch64_read_description): Likewise.
1288 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1289 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1290 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1291 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1292 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1294 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1296 * value.c (value_fetch_lazy_bitfield): New.
1297 (value_fetch_lazy_memory): New.
1298 (value_fetch_lazy_register): New.
1299 (value_fetch_lazy): Factor out to smaller functions.
1301 2018-06-01 Tom Tromey <tom@tromey.com>
1303 * cp-name-parser.y (backslashable, represented): Now const.
1305 2018-06-01 Tom Tromey <tom@tromey.com>
1307 * cp-name-parser.y: Include parser-defs.h.
1308 (parser_fprintf): Remove declaration.
1310 2018-06-01 Tom Tromey <tom@tromey.com>
1312 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1314 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1315 (global_result): Remove globals.
1316 (struct cpname_state): New.
1317 (yyparse): Don't declare.
1318 (yylex, yyerror): Move declarations after %union.
1319 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1320 (make_name): Add state parameter.
1322 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1324 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1326 (yylex): Add lvalp, state parameters.
1327 (yyerror): Add state parameter.
1328 (cp_demangled_name_to_comp): Update.
1330 2018-06-01 Tom Tromey <tom@tromey.com>
1332 * cp-name-parser.y (parser_fprintf): Declare.
1333 (GDB_YY_REMAP_PREFIX): Define.
1334 Include yy-remap.h. Don't redefine yy* identifiers.
1336 2018-06-01 Tom Tromey <tom@tromey.com>
1338 * python/py-type.c (typy_legacy_template_argument): Update.
1339 * cp-support.h (cp_demangled_name_to_comp): Update.
1340 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1341 parameter to be a "std::string *".
1344 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1346 * ada-lex.l: Include "diagnostics.h" instead of
1347 "common/diagnostics.h".
1348 * unittests/environ-selftests.c: Likewise.
1349 * common/diagnostics.h: Moved to ../include.
1351 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1353 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1354 to language_mode_manual while calling breakpoint_re_set_one.
1356 2018-06-01 Tom Tromey <tom@tromey.com>
1358 * valops.c (value_cast_structs, destructor_name_p): Update.
1359 * symtab.c (gdb_mangle_name): Update.
1360 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1362 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1363 (pascal_object_print_value_fields, pascal_object_print_value):
1365 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1366 * linespec.c (find_methods): Update.
1367 * gdbtypes.h (type_name_no_tag): Remove.
1368 (type_name_or_error): Rename from type_name_no_tag_or_error.
1369 * gdbtypes.c (type_name_no_tag): Remove.
1370 (type_name_or_error): Rename from type_name_no_tag_or_error.
1371 (lookup_struct_elt_type, check_typedef): Update.
1372 * expprint.c (print_subexp_standard): Update.
1373 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1374 * d-namespace.c (d_lookup_nested_symbol): Update.
1375 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1376 (cp_print_class_member): Update.
1377 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1378 * completer.c (add_struct_fields): Update.
1379 * c-typeprint.c (cp_type_print_derivation_info)
1380 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1382 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1383 (ada_prefer_type, ada_is_exception_sym): Update.
1385 2018-06-01 Tom Tromey <tom@tromey.com>
1387 * valops.c (enum_constant_from_type, value_namespace_elt)
1388 (value_maybe_namespace_elt): Update.
1389 * valarith.c (find_size_for_pointer_math): Update.
1390 * target-descriptions.c (make_gdb_type): Update.
1391 * symmisc.c (print_symbol): Update.
1392 * stabsread.c (define_symbol, read_type)
1393 (complain_about_struct_wipeout, add_undefined_type)
1394 (cleanup_undefined_types_1): Update.
1395 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1396 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1397 (rust_internal_print_type, rust_composite_type)
1398 (rust_evaluate_funcall, rust_evaluate_subexp)
1399 (rust_inclusive_range_type_p): Update.
1400 * python/py-type.c (typy_get_tag): Update.
1401 * p-typeprint.c (pascal_type_print_base): Update.
1402 * mdebugread.c (parse_symbol, parse_type): Update.
1403 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1405 * guile/scm-type.c (gdbscm_type_tag): Update.
1406 * go-lang.c (sixg_string_p): Update.
1407 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1409 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1410 (TYPE_TAG_NAME): Remove.
1411 * gdbtypes.c (type_name_no_tag): Simplify.
1412 (check_typedef, check_types_equal, recursive_dump_type)
1413 (copy_type_recursive, arch_composite_type): Update.
1414 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1415 in summary mode when needed.
1416 * eval.c (evaluate_funcall): Update.
1417 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1418 (process_structure_scope, read_enumeration_type)
1419 (read_namespace_type, read_module_type, determine_prefix): Update.
1420 * cp-support.c (inspect_type): Update.
1421 * coffread.c (process_coff_symbol, decode_base_type): Update.
1422 * c-varobj.c (c_is_path_expr_parent): Update.
1423 * c-typeprint.c (c_type_print_base_struct_union): Update.
1424 (c_type_print_base_1): Update. Print struct/class/union/enum in
1425 summary when using C language.
1426 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1427 (gen_maybe_namespace_elt): Update.
1428 * ada-lang.c (ada_type_name): Simplify.
1429 (empty_record, ada_template_to_fixed_record_type_1)
1430 (template_to_static_fixed_type)
1431 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1433 2018-06-01 Tom Tromey <tom@tromey.com>
1435 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1437 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1438 (c_print_type): Update.
1439 (c_print_type): New overload.
1440 (c_type_print_varspec_prefix, c_type_print_args)
1441 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1442 (c_type_print_base_struct_union, c_type_print_base_1)
1443 (cp_type_print_method_args): Add "language" parameter.
1444 (c_type_print_base): Update.
1445 * c-lang.h (c_print_type): Add new overload.
1447 2018-06-01 Tom Tromey <tom@tromey.com>
1449 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1450 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1452 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1454 * aarch64-tdep.c (aarch64_sve_register_names): New const
1456 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1457 (AARCH64_SVE_Z_REGS_NUM): New define.
1458 (AARCH64_SVE_P_REGS_NUM): Likewise.
1459 (AARCH64_SVE_NUM_REGS): Likewise.
1461 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1463 * nat/linux-ptrace.h [__alpha__]
1464 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1467 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1469 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1470 the endianness selected.
1471 * NEWS: Document `set endian auto' mode operation update.
1473 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1475 * Makefile.in: Add new header.
1476 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1477 (sve_vl_from_vg): Likewise.
1478 (sve_vq_from_vl): Likewise.
1479 (sve_vl_from_vq): Likewise.
1480 (sve_vq_from_vg): Likewise.
1481 (sve_vg_from_vq): Likewise.
1482 * configure.nat: Add new c file.
1483 * nat/aarch64-sve-linux-ptrace.c: New file.
1484 * nat/aarch64-sve-linux-ptrace.h: New file.
1486 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1488 * aarch64-linux-nat.c (aarch64_linux_read_description):
1490 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1492 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1493 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1494 (aarch64_gdbarch_init): Add parmeter zero.
1495 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1496 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1497 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1499 * doc/gdb.texinfo: Describe SVE feature
1500 * features/aarch64-sve.c: New file.
1502 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1505 * gdbarch.sh (significant_addr_bit): Default to zero when
1506 not set by target architecture.
1507 * gdbarch.c: Re-generated.
1508 * utils.c (address_significant): Update.
1510 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1512 * stack.c (func_command): Remove trailing newline in call to error.
1514 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1516 * regcache.h (regcache_raw_collect): Remove, update callers to
1517 use regcache::raw_collect.
1518 * regcache.c (regcache_raw_collect): Remove.
1520 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1522 * regcache.h (regcache_raw_supply): Remove, update callers to
1523 use detached_regcache::raw_supply.
1524 * regcache.c (regcache_raw_supply): Remove.
1526 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1528 * regcache.h (regcache_cooked_write_part): Remove, update
1529 callers to use regcache::cooked_write_part.
1530 * regcache.c (regcache_cooked_write_part): Remove.
1532 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1534 * regcache.h (regcache_cooked_read_part): Remove, update callers
1535 to use readable_regcache::cooked_read_part.
1536 * regcache.c (regcache_cooked_read_part): Remove.
1538 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1540 * regcache.h (regcache_cooked_read_value): Remove, update
1541 callers to use readable_regcache::cooked_read_value.
1542 * regcache.c (regcache_cooked_read_value): Remove.
1544 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1546 * regcache.h (regcache_cooked_write): Remove, update callers to
1547 use regcache::cooked_write.
1548 * regcache.c (regcache_cooked_write): Remove.
1550 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1552 * regcache.h (regcache_invalidate): Remove, update callers to
1553 use detached_regcache::invalidate instead.
1554 * regcache.c (regcache_invalidate): Remove.
1556 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1558 * regcache.h (regcache_raw_write_part): Remove, update callers
1559 to use regcache::raw_write_part instead.
1560 * regcache.c (regcache_raw_write_part): Remove.
1562 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1564 * regcache.h (regcache_raw_read_part): Remove, update callers to
1565 use readable_regcache::raw_read_part instead.
1566 * regcache.c (regcache_raw_read_part): Remove.
1568 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1570 * regcache.h (regcache_cooked_read): Remove, update callers to
1571 use readable_regcache::cooked_read instead.
1572 * regcache.c (regcache_cooked_read): Remove.
1574 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1576 * regcache.h (regcache_raw_write): Remove, update callers to use
1577 regcache::raw_write instead.
1578 * regcache.c (regcache_raw_write): Remove.
1580 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1582 * regcache.h (regcache_raw_read): Remove, update callers to use
1583 readable_regcache::raw_read instead.
1584 * regcache.c (regcache_raw_read): Remove.
1586 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1588 * regcache.h (regcache_raw_update): Remove, update callers to
1589 use readable_regcache::raw_update instead.
1590 * regcache.c (regcache_raw_update): Remove.
1592 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1594 * regcache.h (regcache_register_status): Remove, update callers
1595 to use reg_buffer::get_register_status directly instead.
1596 * regcache.c (regcache_register_status): Remove.
1598 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1600 * regcache.h (regcache_get_ptid): Remove, update all callers to
1601 call regcache::ptid instead.
1602 * regcache.c (regcache_get_ptid): Remove.
1604 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1606 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1608 2018-05-30 Pedro Alves <palves@redhat.com>
1610 * common/common-exceptions.h (exception_rethrow): Use
1613 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
1615 * breakpoint.c (print_solib_event, check_status_catch_solib):
1616 Remove struct keyword in range-based for loops.
1617 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1618 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1620 * linespec.c (find_superclass_methods, search_minsyms_for_name):
1622 * symfile.c (addr_info_make_relative): Likewise.
1623 * thread.c (value_in_thread_stack_temporaries): Likewise.
1625 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
1628 * valops.c (value_struct_elt_for_reference): Call check_typedef on
1629 aggregate type to get its real type before accessing it.
1631 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
1633 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1634 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1635 * coff-pe-read.c (add_pe_forwarded_sym): Replace
1636 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1637 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1638 * jit.c (jit_breakpoint_re_set_internal): Likewise.
1639 * printcmd.c (info_address_command): Likewise.
1641 2018-05-29 Tom Tromey <tom@tromey.com>
1643 * windows-nat.c (handle_exception): Update fall-through comment.
1645 2018-05-29 Tom Tromey <tom@tromey.com>
1647 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
1648 (struct program_space) <added_solibs>: Now a std::vector.
1649 * breakpoint.c (print_solib_event): Update.
1650 (check_status_catch_solib): Update.
1651 * progspace.c (clear_program_space_solib_cache): Update.
1652 * solib.c (update_solib_list): Update.
1654 2018-05-29 Tom Tromey <tom@tromey.com>
1656 * python/py-type.c (typy_richcompare): Update.
1657 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1658 * gdbtypes.h (types_deeply_equal): Return bool.
1659 (types_equal): Likewise.
1660 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
1662 (check_types_equal): Change worklist to std::vector. Return
1664 (struct type_equality_entry): Add constructor.
1665 (compare_maybe_null_strings): Return bool.
1666 (check_types_worklist): Return bool. Change worklist to
1668 (types_deeply_equal): Use std::vector.
1669 (types_equal): Return bool.
1670 (compare_maybe_null_strings): Simplify.
1672 2018-05-29 Tom Tromey <tom@tromey.com>
1674 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
1676 2018-05-29 Tom Tromey <tom@tromey.com>
1678 * objc-lang.h: Don't include cp-support.h.
1679 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
1682 2018-05-27 Tom Tromey <tom@tromey.com>
1684 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1686 2018-05-25 Tom Tromey <tom@tromey.com>
1688 * value.c (value::location): Initialize.
1690 2018-05-25 Tom Tromey <tom@tromey.com>
1692 * dbxread.c (init_bincl_list): Remove.
1693 (bincl_list): Now a std::vector.
1694 (bincls_allocated, next_bincl): Remove.
1695 (free_bincl_list, do_free_bincl_list_cleanup)
1696 (make_cleanup_free_bincl_list): Remove.
1697 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
1699 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
1700 (struct header_file_location): Add constructor.
1701 (add_bincl_to_list): Remove.
1703 2018-05-25 Tom Tromey <tom@tromey.com>
1705 * tui/tui.c (tui_enable): Update.
1706 * mi/mi-interp.c (mi_interp::init): Update.
1707 * interps.h (class interp) <name>: New method.
1708 <m_name>: Rename from name.
1709 (~scoped_restore_interp): Update.
1710 * interps.c (interp::interp): Update.
1711 (interp_add, interp_set, interp_lookup_existing)
1712 (current_interp_named_p): Update.
1714 2018-05-25 Tom Tromey <tom@tromey.com>
1716 * interps.c (interp_name): Remove.
1717 * mi/mi-interp.c (mi_interp::init): Update.
1718 * interps.h (interp_name): Remove.
1719 (~scoped_restore_interp): Update.
1720 * tui/tui.c (tui_enable): Update.
1722 2018-05-25 Tom Tromey <tom@tromey.com>
1724 * utils.c (fputs_maybe_filtered): Update.
1725 * linespec.c (decode_line_full): Update.
1726 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
1727 (mi_print_breakpoint_for_event, mi_solib_loaded)
1728 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1729 (mi_user_selected_context_changed): Update.
1730 * mi/mi-main.c (mi_execute_command): Update.
1731 * cli/cli-script.c (execute_control_command): Update.
1732 * python/python.c (execute_gdb_command): Update.
1733 * solib.c (info_sharedlibrary_command): Update.
1734 * interps.c (interp_ui_out): Remove.
1735 * interps.h (interp_ui_out): Remove.
1737 2018-05-25 Tom Tromey <tom@tromey.com>
1739 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
1740 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
1741 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
1743 2018-05-25 Tom Tromey <tom@tromey.com>
1745 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
1746 * interps.c (interp_exec): Use scoped_restore.
1748 2018-05-25 Tom Tromey <tom@tromey.com>
1750 * remote.c (remote_target::remote_file_get): Use
1752 (remote_target::remote_file_put): Likewise.
1754 2018-05-25 Tom Tromey <tom@tromey.com>
1756 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
1758 (get_pe_section_index, add_pe_exported_sym): Update.
1759 (read_pe_exported_syms): Use gdb::def_vector.
1761 2018-05-25 Tom Tromey <tom@tromey.com>
1763 * frame.c (remove_prev_frame): Remove.
1764 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
1766 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1768 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
1770 * mips-linux-nat.c (supply_fpregset): Always call
1771 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
1772 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
1773 `mips_fill_fpregset'.
1774 * mips-linux-tdep.c (mips_supply_fpregset)
1775 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
1776 (mips_fill_fpregset_wrapper): Remove functions.
1777 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
1778 (mips_linux_fpregset): Remove variable.
1779 (mips_linux_iterate_over_regset_sections): Use
1780 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
1781 (mips_linux_o32_sigframe_init): Remove comment.
1783 2018-05-25 Pedro Alves <palves@redhat.com>
1785 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
1786 (struct readahead_cache, struct packet_reg, struct
1787 remote_arch_state, class remote_state): Move higher up in the
1789 (remote_target::m_remote_state): Now an object instead of a pointer.
1790 (remote_target::get_remote_state): Adjust.
1792 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1794 * stack.c (select_and_print_frame): Delete.
1795 (struct function_bounds): Move struct within function.
1796 (func_command): Most content moved into new function
1797 find_frame_for_function, use new function, print result, add
1799 (find_frame_for_function): New function, now returns a result.
1801 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1803 * stack.c (iterate_over_block_arg_vars): Fix comment.
1804 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
1806 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1810 (scoped_restore_selected_frame::scoped_restore_selected_frame):
1812 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
1814 * frame.h (class scoped_restore_selected_frame): New class.
1815 * stack.c (print_frame_local_vars): Remove catching and rethrowing
1816 of any exception, use scoped_restore_selected_frame to restore the
1819 2018-05-24 Pedro Alves <palves@redhat.com>
1821 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
1824 2018-05-23 Tom Tromey <tom@tromey.com>
1826 * complaints.c (struct complaints): Remove.
1827 (symfile_complaint_book): Remove.
1828 (series): New global.
1829 (complaint_internal): Update.
1830 (clear_complaints): Update.
1832 2018-05-23 Tom Tromey <tom@tromey.com>
1834 * complaints.c (counters): New global.
1835 (struct complain): Remove.
1836 (struct complaints) <root>: Remove.
1837 (complaint_sentinel): Remove.
1838 (symfile_complaint_book): Update.
1839 (find_complaint) Remove.
1840 (complaint_internal, clear_complaints): Update.
1842 2018-05-23 Tom Tromey <tom@tromey.com>
1844 * complaints.c (struct complain) <file, line>: Remove.
1845 (find_complaint): Remove file, line parameters.
1846 (complaint_internal): Update.
1848 2018-05-23 Tom Tromey <tom@tromey.com>
1850 * complaints.c (vcomplaint): Remove.
1851 (complaint_internal) Merge in contents of vcomplaint.
1853 2018-05-23 Tom Tromey <tom@tromey.com>
1855 * complaints.c (struct complaints) <explanation>: Remove.
1856 (symfile_explanations): Remove.
1857 (symfile_complaint_book): Update.
1858 (vcomplaint): Update.
1859 (struct explanation): Remove.
1861 2018-05-23 Tom Tromey <tom@tromey.com>
1863 * complaints.c (symfile_complaints): Remove.
1864 (complaint_internal): Remove "complaints" parameter.
1865 (clear_complaints, vcomplaint): Remove "c" parameter.
1866 (get_complaints): Remove.
1867 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
1868 (dwarf2_debug_line_missing_file_complaint)
1869 (dwarf2_debug_line_missing_end_sequence_complaint)
1870 (dwarf2_complex_location_expr_complaint)
1871 (dwarf2_const_value_length_mismatch_complaint)
1872 (dwarf2_section_buffer_overflow_complaint)
1873 (dwarf2_macro_malformed_definition_complaint)
1874 (dwarf2_invalid_attrib_class_complaint)
1875 (create_addrmap_from_index, dw2_symtab_iter_next)
1876 (dw2_expand_marked_cus)
1877 (dw2_debug_names_iterator::find_vec_in_debug_names)
1878 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
1879 (create_debug_type_hash_table, init_cutu_and_read_dies)
1880 (partial_die_parent_scope, add_partial_enumeration)
1881 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
1882 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
1883 (read_import_statement, read_file_scope, create_dwo_cu_reader)
1884 (create_cus_hash_table, create_dwp_hash_table)
1885 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
1886 (dwarf2_rnglists_process, dwarf2_ranges_process)
1887 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
1888 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1889 (handle_struct_member_die, process_structure_scope)
1890 (read_array_type, read_common_block, read_module_type)
1891 (read_tag_pointer_type, read_typedef, read_base_type)
1892 (read_subrange_type, load_partial_dies, partial_die_info::read)
1893 (partial_die_info::read, partial_die_info::read)
1894 (partial_die_info::read, read_checked_initial_length_and_offset)
1895 (dwarf2_string_attr, read_formatted_entries)
1896 (dwarf_decode_line_header)
1897 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1898 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1899 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1900 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1901 (get_signatured_type, get_DW_AT_signature_type)
1902 (decode_locdesc, file_file_name, consume_improper_spaces)
1903 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1904 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1905 (dwarf2_symbol_mark_computed, set_die_type)
1906 (read_attribute_value): Update.
1907 * stap-probe.c (handle_stap_probe, get_stap_base_address):
1909 * dbxread.c (unknown_symtype_complaint)
1910 (lbrac_mismatch_complaint, repeated_header_complaint)
1911 (set_namestring, function_outside_compilation_unit_complaint)
1912 (read_dbx_symtab, process_one_symbol): Update.
1913 * gdbtypes.c (stub_noname_complaint): Update.
1914 * windows-nat.c (handle_unload_dll): Update.
1915 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1916 (decode_base_type): Update.
1917 * xcoffread.c (bf_notfound_complaint, ef_complaint)
1918 (eb_complaint, record_include_begin, record_include_end)
1919 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1920 (process_xcoff_symbol, read_symbol)
1921 (function_outside_compilation_unit_complaint)
1922 (scan_xcoff_symtab): Update.
1923 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
1924 * buildsym.c (finish_block_internal, make_blockvector)
1925 (end_symtab_get_static_block, augment_type_symtab): Update.
1926 * dtrace-probe.c (dtrace_process_dof)
1927 (dtrace_static_probe_ops::get_probes): Update.
1928 * complaints.h (struct complaint): Don't declare.
1929 (symfile_complaints): Remove.
1930 (complaint_internal): Remove "complaints" parameter.
1931 (complaint): Likewise.
1932 (clear_complaints): Likewise.
1933 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1934 (reread_symbols): Update.
1935 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1936 (dwarf2_frame_cache, decode_frame_entry): Update.
1937 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
1938 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1939 (info_selectors_command): Update.
1940 * macrotab.c (macro_include, check_for_redefinition)
1941 (macro_undef): Update.
1942 * objfiles.c (filter_overlapping_sections): Update.
1943 * stabsread.c (invalid_cpp_abbrev_complaint)
1944 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
1945 (define_symbol, error_type, read_type, rs6000_builtin_type)
1946 (stabs_method_name_from_physname, read_member_functions)
1947 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
1948 (attach_fields_to_type, complain_about_struct_wipeout)
1949 (read_range_type, read_args, common_block_start)
1950 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
1952 * mdebugread.c (index_complaint, unknown_ext_complaint)
1953 (basic_type_complaint, bad_tag_guess_complaint)
1954 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
1955 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
1956 (parse_procedure, parse_lines)
1957 (function_outside_compilation_unit_complaint)
1958 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
1959 (bad_tag_guess_complaint, reg_value_complaint): Update.
1960 * cp-support.c (demangled_name_complaint): Update.
1961 * macroscope.c (sal_macro_scope): Update.
1962 * dwarf-index-write.c (class debug_names): Update.
1964 2018-05-23 Tom Tromey <tom@tromey.com>
1966 * complaints.c (clear_complaints): Remove "noisy" parameter.
1967 * complaints.h (clear_complaints): Update.
1968 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1969 (reread_symbols): Update.
1971 2018-05-23 Tom Tromey <tom@tromey.com>
1973 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
1975 (vcomplaint, clear_complaints): Update.
1976 (symfile_explanations): Remove some messages.
1978 2018-05-23 Tom Tromey <tom@tromey.com>
1980 * complaints.c (internal_complaint): Remove.
1981 * complaints.h (internal_complaint): Remove.
1983 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1985 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
1987 2018-05-22 Pedro Alves <palves@redhat.com>
1989 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
1990 (remote_fileio_badfd, remote_fileio_return_errno)
1991 (remote_fileio_return_success, remote_fileio_func_open)
1992 (remote_fileio_func_open, remote_fileio_func_close)
1993 (remote_fileio_func_read, remote_fileio_func_write)
1994 (remote_fileio_func_lseek, remote_fileio_func_rename)
1995 (remote_fileio_func_unlink, remote_fileio_func_stat)
1996 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
1997 (remote_fileio_func_isatty, remote_fileio_func_system): Add
1998 remote_target parameter.
1999 (remote_fio_func_map) <func>: Add remote_target parameter.
2000 (do_remote_fileio_request, remote_fileio_request):
2001 * remote-fileio.h (remote_fileio_request):
2002 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2003 remote_target parameter.
2004 (remote_notif_process, handle_notification): Adjust to pass down
2006 (remote_notif_state_allocate): Add remote_target parameter. Save
2008 * remote-notif.h (struct remote_target): Forward declare.
2009 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2010 remote_target parameter.
2011 (struct remote_notif_state) <remote>: New field.
2012 (remote_notif_ack, remote_notif_parse): Add remote_target
2014 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2015 remote_target parameter.
2016 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2017 (threads_listing_context, rmt_thread_action, protocol_feature)
2018 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2019 (packet_result, struct threads_listing_context, remote_state):
2020 Move definitions and declarations higher up.
2021 (remote_target) <~remote_target>: Declare.
2022 (remote_download_command_source, remote_file_put, remote_file_get)
2023 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2024 (remote_hostio_pread_vFile, remote_hostio_send_command)
2025 (remote_hostio_set_filesystem, remote_hostio_open)
2026 (remote_hostio_close, remote_hostio_unlink, remote_state)
2027 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2028 (get_memory_write_packet_size, get_memory_read_packet_size)
2029 (append_pending_thread_resumptions, remote_detach_1)
2030 (append_resumption, remote_resume_with_vcont)
2031 (add_current_inferior_and_thread, wait_ns, wait_as)
2032 (process_stop_reply, remote_notice_new_inferior)
2033 (process_initial_stop_replies, remote_add_thread)
2034 (btrace_sync_conf, remote_btrace_maybe_reopen)
2035 (remove_new_fork_children, kill_new_fork_children)
2036 (discard_pending_stop_replies, stop_reply_queue_length)
2037 (check_pending_events_prevent_wildcard_vcont)
2038 (discard_pending_stop_replies_in_queue, stop_reply)
2039 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2040 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2041 (remote_interrupt_as, remote_interrupt_ns)
2042 (remote_get_noisy_reply, remote_query_attached)
2043 (remote_add_inferior, remote_current_thread, get_current_thread)
2044 (set_thread, set_general_thread, set_continue_thread)
2045 (set_general_process, write_ptid)
2046 (remote_unpack_thread_info_response, remote_get_threadinfo)
2047 (parse_threadlist_response, remote_get_threadlist)
2048 (remote_threadlist_iterator, remote_get_threads_with_ql)
2049 (remote_get_threads_with_qxfer)
2050 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2051 (get_offsets, remote_check_symbols, remote_supported_packet)
2052 (remote_query_supported, remote_packet_size)
2053 (remote_serial_quit_handler, remote_detach_pid)
2054 (remote_vcont_probe, remote_resume_with_hc)
2055 (send_interrupt_sequence, interrupt_query)
2056 (remote_notif_get_pending_events, fetch_register_using_p)
2057 (send_g_packet, process_g_packet, fetch_registers_using_g)
2058 (store_register_using_P, store_registers_using_G)
2059 (set_remote_traceframe, check_binary_download)
2060 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2061 (remote_xfer_live_readonly_partial, remote_read_bytes)
2062 (remote_send_printf, remote_flash_write, readchar)
2063 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2064 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2065 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2066 (extended_remote_disable_randomization, extended_remote_run)
2067 (send_environment_packet, extended_remote_environment_support)
2068 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2069 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2070 (packet_command): Now methods of ...
2071 (remote_target): ... this class.
2072 (m_remote_state) <remote_target>: New field.
2073 (struct remote_state) <stop_reply_queue,
2074 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2076 (remote_state::remote_state): Allocate stop_reply_queue.
2077 (remote_state): Delete global.
2078 (get_remote_state_raw): Delete.
2079 (remote_target::get_remote_state): Allocate m_remote_state on
2081 (get_current_remote_target): New.
2082 (remote_ops, extended_remote_ops): Delete.
2083 (wait_forever_enabled_p, remote_async_inferior_event_token):
2084 Delete, moved to struct remote_state.
2085 (remote_target::close): Delete self. Destruction bits split to
2087 (remote_target::~remote_target): ... this.
2088 (show_memory_packet_size): Adjust to use
2089 get_current_remote_target.
2090 (struct protocol_feature) <func>: Add remote_target parameter.
2091 All callers adjusted.
2092 (curr_quit_handler_target): New.
2093 (remote_serial_quit_handler): Reimplement.
2094 (remote_target::open_1): Adjust to use get_current_remote_target.
2095 Heap-allocate remote_target/extended_remote_target instances.
2096 (vcont_builder::vcont_builder): Add remote_target parameter, and
2097 save it in m_remote. All callers adjusted.
2098 (vcont_builder::m_remote): New field.
2099 (vcont_builder::restart, vcont_builder::flush)
2100 (vcont_builder::push_action): Use it.
2101 (remote_target::commit_resume): Use it.
2102 (struct queue_iter_param) <remote>: New field.
2103 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2104 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2105 (check_pending_event_prevents_wildcard_vcont_callback)
2106 (remote_target::check_pending_events_prevent_wildcard_vcont)
2107 (remote_target::discard_pending_stop_replies)
2108 (remote_target::discard_pending_stop_replies_in_queue)
2109 (remote_target::remote_notif_remove_queued_reply): Fill in
2111 (remote_notif_get_pending_events): New.
2112 (remote_target::readchar, remote_target::remote_serial_write):
2113 Save/restore curr_quit_handler_target.
2115 (kill_new_fork_children): Fill in 'remote' field.
2116 (packet_command): Use get_current_remote_target, defer to
2117 remote_target method of same name.
2118 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2119 parameter, and save it in m_remote. All callers adjusted.
2120 (scoped_remote_fd::release): Use m_remote.
2121 (scoped_remote_fd::m_remote): New field.
2122 (remote_file_put, remote_file_get, remote_file_delete): Use
2123 get_current_remote_target, defer to remote_target method of same
2125 (remote_btrace_reset): Add remote_state paremeter. Update all
2127 (remote_async_inferior_event_handler). Pass down 'data'.
2128 (remote_new_objfile): Use get_current_remote_target.
2129 (remote_target::vcont_r_supported): New.
2130 (set_range_stepping): Use get_current_remote_target and
2131 remote_target::vcont_r_supported.
2132 (_initialize_remote): Don't allocate 'remote_state' and
2133 'stop_reply_queue' globals.
2134 * remote.h (struct remote_target): Forward declare.
2135 (getpkt, putpkt, remote_notif_get_pending_events): Add
2136 'remote_target' parameter.
2138 2018-05-22 Pedro Alves <palves@redhat.com>
2140 * remote.c (vcont_builder): Now a class. Make all data members
2142 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2144 (vcont_builder_restart): Rename to ...
2145 (vcont_builder::restart): ... this.
2146 (vcont_builder_flush): Rename to ...
2147 (vcont_builder::flush): ... this.
2148 (vcont_builder_push_action): Rename to ...
2149 (vcont_builder::push_action): ... this.
2150 (remote_target::commit_resume): Adjust.
2152 2018-05-22 Pedro Alves <palves@redhat.com>
2154 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2155 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2156 (get_fixed_memory_packet_size): New.
2157 (get_memory_packet_size): Use it.
2158 (set_memory_packet_size): Don't override the config size with
2159 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2160 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2161 Don't refer to get_memory_packet_size if not connected to a remote
2162 target. Show "(default)" if configured size is 0.
2164 2018-05-22 Pedro Alves <palves@redhat.com>
2166 * remote.c (remote_target::mourn_inferior): Move
2167 discard_pending_stop_replies call here from ...
2168 (_initialize_remote): ... here.
2170 2018-05-22 Pedro Alves <palves@redhat.com>
2172 * remote.c (compare_section_command): Remove set_general_process
2175 2018-05-22 Pedro Alves <palves@redhat.com>
2177 * remote.c (struct packet_reg, struct remote_arch_state):
2178 Move higher up in the file.
2179 (remote_state) <m_arch_states>: Store remote_arch_state values
2180 instead of remote_arch_state pointers.
2181 (remote_state::get_remote_arch_state): Adjust.
2183 2018-05-22 Pedro Alves <palves@redhat.com>
2185 * remote.c: Include <unordered_map>.
2186 (remote_state): Now a class.
2187 (remote_state) <get_remote_arch_state>: Declare method.
2188 <get_remote_arch_state>: New field.
2189 (remote_arch_state) <remote_arch_state>: Declare ctor.
2190 <regs>: Now a unique_ptr.
2191 (remote_gdbarch_data_handle): Delete.
2192 (get_remote_arch_state): Delete.
2193 (remote_state::get_remote_arch_state): New.
2194 (get_remote_state): Adjust to call remote_state's
2195 get_remote_arch_state method.
2196 (init_remote_state): Delete, bits factored out to ...
2197 (remote_arch_state::remote_arch_state): ... this new method.
2198 (get_remote_packet_size, get_memory_packet_size)
2199 (process_g_packet, remote_target::fetch_registers)
2200 (remote_target::prepare_to_store, store_registers_using_G)
2201 (remote_target::store_registers, remote_target::get_trace_status):
2202 Adjust to call remote_state's method.
2203 (_initialize_remote): Remove reference to
2204 remote_gdbarch_data_handle.
2206 2018-05-22 Pedro Alves <palves@redhat.com>
2208 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2209 pread>: New method declarations.
2210 (remote_target::open_1): Adjust.
2211 (readahead_cache_invalidate): Rename to ...
2212 (readahead_cache::invalidate): ... this, and adjust to be a class
2214 (readahead_cache_invalidate_fd): Rename to ...
2215 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2217 (remote_hostio_pwrite): Adjust.
2218 (remote_hostio_pread_from_cache): Rename to ...
2219 (readahead_cache::pread): ... this, and adjust to be a class
2221 (remote_hostio_close): Adjust.
2223 2018-05-22 Pedro Alves <palves@redhat.com>
2225 * remote.c (remote_hostio_close_cleanup): Delete.
2226 (class scoped_remote_fd): New.
2227 (remote_file_put, remote_file_get): Use it.
2229 2018-05-22 Pedro Alves <palves@redhat.com>
2231 (struct vCont_action_support): Use bool and initialize all fields.
2232 (struct readahead_cache): Initialize all fields.
2233 (remote_state): Use bool and initialize all fields.
2234 (remote_state::remote_state, remote_state::~remote_state): New.
2235 (new_remote_state): Delete.
2236 (_initialize_remote): Use new to allocate remote_state.
2238 2018-05-22 Pedro Alves <palves@redhat.com>
2242 * c-exp.y: Include "c-support.h".
2243 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2244 of tolower. Use c_ident_is_alpha to scan names.
2245 * c-lang.c: Include "c-support.h".
2246 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2247 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2248 * c-support.h: New file, with bits factored out from ...
2249 * cp-name-parser.y: ... this file.
2250 Include "c-support.h".
2251 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2252 c-support.h and renamed.
2253 (symbol_end, yylex): Adjust.
2255 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2257 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2258 parameter type to CORE_ADDR.
2259 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2260 parameter type in declaration to CORE_ADDR.
2261 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2262 target_auxv_search to get AT_HWCAP and use the result to get the
2264 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2265 to CORE_ADDR. Remove the cast of the return value to unsigned
2266 long. Fix error predicate of target_auxv_search.
2267 (ppc_linux_nat_target::read_description): Change the type of the
2268 hwcap variable to CORE_ADDR.
2270 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2272 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2273 if the size of fpscr is larger than 32 bits.
2275 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2277 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2278 (ppc32_linux_vsxregmap): New global.
2279 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2280 regcache_supply_regset, and regcache_collect_regset.
2281 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2282 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2283 (fetch_vsx_register, store_vsx_register): Remove.
2284 (fetch_vsx_registers): Add regno parameter. Get regset using
2285 ppc_linux_vsxregset. Use regset to supply registers.
2286 (store_vsx_registers): Add regno parameter. Get regset using
2287 ppc_linux_vsxregset. Use regset to collect registers.
2288 (fetch_register): Call fetch_vsx_registers instead of
2290 (store_register): Call store_vsx_registers instead of
2292 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2293 new regno parameter.
2294 (store_ppc_registers): Call store_vsx_registers with -1 for the
2295 new regno parameter.
2296 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2297 (ppc_collect_vsxregset): Remove.
2299 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2301 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2303 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2304 for vector register offset fields.
2305 (ppc64_fbsd_reg_offsets): Likewise.
2306 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2307 to vector register offset fields.
2308 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2309 to vector register offset fields.
2310 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2311 vector register offset fields.
2312 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2313 initializers for vector register offset fields.
2314 (rs6000_aix64_reg_offsets): Likewise.
2315 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2316 (ppc_supply_vrregset): Remove.
2317 (ppc_collect_vrregset): Remove.
2318 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2319 (ppc_linux_vrregset) : New function.
2320 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2321 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2322 (ppc32_linux_vrregset): Remove.
2323 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2324 and use result instead of ppc32_linux_vrregset.
2325 (ppc32_linux_reg_offsets): Remove initializers for vector register
2327 (ppc64_linux_reg_offsets): Likewise.
2328 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2329 * ppc-linux-nat.c: Include regset.h.
2330 (gdb_vrregset_t): Adjust comment to account for little-endian
2332 (supply_vrregset, fill_vrregset): Remove.
2333 (fetch_altivec_register, store_altivec_register): Remove.
2334 (fetch_altivec_registers): Add regno parameter. Get regset using
2335 ppc_linux_vrregset. Use regset to supply registers.
2336 (store_altivec_registers): Add regno parameter. Get regset using
2337 ppc_linux_vrregset. Use regset to collect registers.
2338 (fetch_register): Call fetch_altivec_registers instead of
2339 fetch_altivec_register.
2340 (store_register): Call store_altivec_registers instead of
2341 store_altivec_register.
2342 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2343 the new regno parameter.
2344 (store_ppc_registers): Call store_altivec_registers with -1 for
2345 the new regno parameter.
2347 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2349 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2350 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2351 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2352 (gdb_vrregset_t): Change array type size to
2353 PPC_LINUX_SIZEOF_VRREGSET.
2354 (gdb_vsxregset_t): Change array type size to
2355 PPC_LINUX_SIZEOF_VSXREGSET.
2356 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2357 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2358 PPC_LINUX_SIZEOF_VSXREGSET.
2360 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2362 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2363 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2365 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2366 ppc_linux_target_wordsize with tid.
2367 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2369 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2370 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2371 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2372 tid parameter. Remove static specifier.
2373 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2374 (ppc_linux_target_wordsize): New declaration.
2376 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2378 * arch/ppc-linux-common.c: New file.
2379 * arch/ppc-linux-common.h: New file.
2380 * arch/ppc-linux-tdesc.h: New file.
2381 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2382 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2383 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2384 arch/ppc-linux-tdesc.h.
2385 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2386 arch/ppc-linux-tdesc.h.
2387 (ppc_linux_nat_target::read_description): Remove target
2388 description matching code. Fill a ppc_linux_features struct and
2389 call ppc_linux_match_description with it. Move comment about ISA
2390 2.05 to ppc-linux-common.c.
2391 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2392 arch/ppc-linux-tdesc.h.
2393 (ppc_linux_core_read_description): Remove target description
2394 matching code. Fill a ppc_linux_features struct and call
2395 ppc_linux_match_description with it.
2396 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2397 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2398 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2399 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2400 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2401 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2402 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2403 (tdesc_powerpc_e500l): Remove.
2405 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2407 * ada-lang.c (catch_assert_command): Pass empty string instead
2408 of NULL for excep_string argument.
2410 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2412 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2413 the width of the requested register exceeds the width of the
2416 2018-05-21 Tom Tromey <tom@tromey.com>
2418 * printcmd.c (output_command): Remove.
2419 (output_command_const): Rename to output_command.
2420 * valprint.h (output_command): Rename from output_command_const.
2421 * tracepoint.c (trace_dump_actions): Call output_command.
2423 2018-05-21 Tom Tromey <tom@tromey.com>
2425 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2426 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2427 * ada-lang.h (create_ada_exception_catchpoint): Update.
2428 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2430 (create_excep_cond_exprs, ~ada_catchpoint)
2431 (should_stop_exception, print_one_exception)
2432 (print_mention_exception, print_recreate_exception): Update.
2433 (ada_get_next_arg): Remove.
2434 (catch_ada_exception_command_split): Use std::string. Change type
2435 of "excep_string", "cond_string".
2436 (catch_ada_exception_command): Update.
2437 (create_ada_exception_catchpoint): Change type of excep_string.
2438 (ada_exception_sal): Remove excep_string parameter.
2439 (~ada_catchpoint): Remove.
2441 2018-05-21 Tom Tromey <tom@tromey.com>
2443 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2446 2018-05-21 Tom Tromey <tom@tromey.com>
2448 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2449 Return unique_xmalloc_ptr.
2450 (print_it_exception): Update.
2452 2018-05-21 Tom Tromey <tom@tromey.com>
2454 * tracepoint.c (trace_dump_actions): Use std::string.
2456 2018-05-21 Tom Tromey <tom@tromey.com>
2458 * symfile.c (reread_symbols): Use std::string for original_name.
2460 2018-05-21 Tom Tromey <tom@tromey.com>
2462 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2463 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2466 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2468 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2470 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2471 * objfiles.c (get_objfile_bfd_data): Allocate
2472 objfile_per_bfd_storage with obstack_new when allocating on
2475 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2477 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2479 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2480 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2481 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2482 (add_pending): Likewise.
2483 (parse_symbol): Likewise.
2484 (parse_partial_symbols): Likewise.
2485 (psymtab_to_symtab_1): Likewise.
2486 (new_psymtab): Likewise.
2487 (elfmdebug_build_psymtabs): Likewise.
2488 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2489 * objfiles.c (get_objfile_bfd_data): Likewise.
2490 (objfile_register_static_link): Likewise.
2491 * psymtab.c (allocate_psymtab): Likewise.
2492 * stabsread.c (read_member_functions): Likewise.
2493 * xcoffread.c (xcoff_end_psymtab): Likewise.
2495 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2497 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2498 compiler supports std::is_trivially_constructible.
2499 * common/poison.h: Include obstack.h.
2500 (IsMallocable): Define to is_trivially_constructible if the
2501 compiler supports it, define to true_type otherwise.
2505 (XOBNEWVEC): Redefine.
2506 * gdb_obstack.h (obstack_zalloc): New.
2507 (OBSTACK_ZALLOC): Redefine.
2508 (obstack_calloc): New.
2509 (OBSTACK_CALLOC): Redefine.
2511 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2512 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2514 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2515 obstack_calloc/obstack_zalloc.
2516 (gdbarch_obstack_zalloc): Remove.
2517 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2519 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2521 * stack.c (backtrace_command_1): Remove useless variable int i.
2523 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2525 * stack.c (print_frame_info): Fix comment.
2527 2018-05-18 Tom Tromey <tom@tromey.com>
2529 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2530 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2531 (~dwarf2_per_objfile): Update
2532 (dwarf2_get_dwz_file): Use new.
2533 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2536 2018-05-18 Tom Tromey <tom@tromey.com>
2538 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2540 * dwarf2read.c (struct dwp_file): Add constructor and
2542 (open_and_init_dwp_file): Return a unique_ptr.
2543 (dwarf2_per_objfile, create_dwp_hash_table)
2544 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2545 (lookup_dwo_unit_in_dwp): Update.
2546 (open_and_init_dwp_file, get_dwp_file): Update.
2548 2018-05-18 Tom Tromey <tom@tromey.com>
2550 * dwarf2read.c (dwarf2_per_objfile): Update.
2551 (struct mapped_index): Add initializers.
2552 (dwarf2_read_index): Use new.
2553 (dw2_symtab_iter_init): Update.
2554 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2557 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2559 * dwarf2read.c (mapped_index) <total_size>: Remove.
2561 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2563 * unittests/format_pieces-selftests.c (test_format_specifier):
2566 2018-05-18 Tom Tromey <tom@tromey.com>
2568 * c-typeprint.c (maybe_print_hole): New function.
2569 (c_print_type_struct_field_offset): Update.
2570 (c_type_print_base_struct_union): Call maybe_print_hole.
2572 2018-05-17 Keith Seitz <keiths@redhat.com>
2574 * breakpoint.c (build_bpstat_chain): New function, moved from
2576 (bpstat_stop_status): Add optional parameter, `stop_chain'.
2577 If no stop chain is passed, call build_bpstat_chain to build it.
2578 * breakpoint.h (build_bpstat_chain): Declare.
2579 (bpstat_stop_status): Move documentation here from breakpoint.c.
2580 * infrun.c (handle_signal_stop): Before eliding inlined frames,
2581 build the stop chain and pass it to skip_inline_frames.
2582 Pass this stop chain to bpstat_stop_status.
2583 * inline-frame.c: Include breakpoint.h.
2584 (stopped_by_user_bp_inline_frame): New function.
2585 (skip_inline_frames): Add parameter `stop_chain'.
2586 Move documention to inline-frame.h.
2587 If non-NULL, use stopped_by_user_bp_inline_frame to determine
2588 whether the frame should be elided.
2589 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2590 Add moved documentation and update for new parameter.
2592 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2595 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2596 unittests/format_pieces-selftests.c.
2597 * common/format.h (format_piece) <operator==>: New.
2598 (format_pieces) <operator[]>: Remove.
2599 * common/format.c (format_pieces::format_pieces): Handle \e.
2600 * unittests/format_pieces-selftests.c: New.
2602 2018-05-17 Tom Tromey <tom@tromey.com>
2605 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2606 (dw2_instantiate_symtab): Add skip_partial parameter.
2607 (dw2_find_last_source_symtab, dw2_map_expand_apply)
2608 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2609 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2610 (dw2_expand_symtabs_matching_one)
2611 (dw2_find_pc_sect_compunit_symtab)
2612 (dw2_debug_names_lookup_symbol)
2613 (dw2_debug_names_expand_symtabs_for_function): Update.
2614 (init_cutu_and_read_dies): Add skip_partial parameter.
2615 (process_psymtab_comp_unit, build_type_psymtabs_1)
2616 (process_skeletonless_type_unit, load_partial_comp_unit)
2617 (psymtab_to_symtab_1): Update.
2618 (load_full_comp_unit): Add skip_partial parameter.
2619 (process_imported_unit_die, dwarf2_read_addr_index)
2620 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2621 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2622 (read_signatured_type): Update.
2624 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2626 * value.c (release_value): Remove unused variable.
2627 (record_latest_value): Likewise.
2628 (access_value_history): Likewise.
2629 (preserve_values): Likewise.
2631 2018-05-17 Tom Tromey <tom@tromey.com>
2633 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2636 2018-05-16 Maciej W. Rozycki <macro@mips.com>
2639 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2640 Also handle registers whose width is not a multiple of
2642 (linux_nat_trad_target::store_register): Likewise.
2644 2018-05-16 Tom Tromey <tom@tromey.com>
2646 * gdbcore.h (core_bfd): Redefine.
2647 * corelow.c (core_target::close): Update.
2648 (core_target_open): Update.
2649 * progspace.h (struct program_space) <cbfd>: Now a
2652 2018-05-16 Tom Tromey <tom@tromey.com>
2655 * symfile-add-flags.h (enum symfile_add_flags)
2656 <SYMFILE_NOT_FILENAME>: New constant.
2657 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
2658 objfile name from BFD.
2659 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2660 * minidebug.c (find_separate_debug_file_in_section): Put
2661 ".gnu_debugdata" into BFD's file name.
2663 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
2665 * regcache.c (regcache_read_ftype, regcache_write_ftype):
2668 2018-05-15 Tamar Christina <tamar.christina@arm.com>
2671 * aarch64-tdep.c (aarch64_analyze_prologue,
2672 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2673 Indicate not interested in errors.
2675 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2677 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2678 Supply the MIPS_ZERO_REGNUM register.
2680 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2682 * mips-tdep.c (mask_address_var): Make variable static.
2684 2018-05-14 Tom Tromey <tom@tromey.com>
2686 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2688 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
2690 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2691 FXSAVE_ADDR for the mxcsr register.
2693 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
2695 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
2697 2018-05-11 Pedro Alves <palves@redhat.com>
2699 * corelow.c (core_target) <core_target>: No longer inline.
2700 Initialize m_core_gdbarch, m_core_vec and build the section table
2702 <~core_target>: New.
2703 <core_gdbarch, get_core_register_section>: New methods.
2704 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
2705 factored out from ...
2706 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
2708 (sniff_core_bfd): Add gdbarch parameter.
2709 (core_close): Delete, merged into ...
2710 (core_target::close): ... here. Delete self.
2711 (core_close_cleanup): Delete.
2712 (core_target_open): Allocate a core_target on the heap. Use a
2713 unique_ptr instead of a cleanup. Bits moved into the core_target
2714 ctor. Adjust to use core_target methods instead of globals.
2715 (get_core_register_section): Rename to ...
2716 (core_target::get_core_register_section): ... this and adjust.
2717 (struct get_core_registers_cb_data): New.
2718 (get_core_registers_cb): Use it. Use bool.
2719 (core_target::fetch_registers, core_target::files_info)
2720 (core_target::xfer_partial, core_target::read_description)
2721 (core_target::pid_to, core_target::thread_name): Adjust to
2722 reference class fields instead of globals.
2723 * target.h (struct target_ops_deleter, target_ops_up): New.
2725 2018-05-11 Pedro Alves <palves@redhat.com>
2727 * corefile.c (core_file_command): Move to corelow.c.
2728 * corelow.c (the_core_target): Delete.
2729 (core_file_command): Moved from corefile.c. Check exec_bfd
2730 instead of the_core_target. Use target_detach instead of calling
2731 into the_core_target directly.
2732 (maybe_say_no_core_file_now): New.
2733 (core_target::detach): Use it.
2734 (_initialize_corelow): Remove references to the_core_target.
2735 * gdbcore.h (the_core_target): Delete.
2737 2018-05-11 Tom Tromey <tromey@redhat.com>
2738 Pedro Alves <palves@redhat.com>
2740 * corefile.c (core_bfd): Remove.
2741 * gdbcore.h (core_bfd): Now a macro.
2742 * progspace.h (struct program_space) <cbfd>: New field.
2744 2018-05-11 Tom Tromey <tom@tromey.com>
2746 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
2749 2018-05-10 Tom Tromey <tom@tromey.com>
2751 * configure: Rebuild.
2752 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
2754 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2757 * regformats/regdat.sh: Adjust script, following the addition
2758 of the new expedite_regs parameter to init_target_desc.
2760 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
2763 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
2764 set_gdbarch_significant_addr_bit.
2765 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
2766 set_gdbarch_significant_addr_bit.
2767 * utils.c (address_significant): Update to sign extend addr.
2769 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
2771 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
2772 (xtensa_linux_init_abi): Limit tdep->num_regs by
2773 tdep->num_nopriv_regs.
2774 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
2775 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
2778 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
2780 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
2782 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2784 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
2785 (I387_MXCSR_INIT_VAL): New constant.
2786 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
2787 buffer if it was supplied by the inferior.
2788 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
2789 (i387_xsave_get_clear_bv): New function.
2790 (i387_supply_xsave): Only read x87 control registers from the
2791 xsave buffer if the feature is enabled, and the state will have
2792 been written, otherwise, provide a suitable default.
2793 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
2794 including x87 control registers. Update control registers if they
2795 have changed from the default value, and mark features as enabled
2797 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
2799 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2801 * spu-tdep.c (info_spu_event_command): Fix output formatting.
2803 2018-05-07 Tom Tromey <tom@tromey.com>
2805 * configure: Rebuild.
2806 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
2808 2018-05-07 Tom Tromey <tom@tromey.com>
2811 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
2812 bit. Use correct value for VDIV.
2814 2018-05-04 Tom Tromey <tom@tromey.com>
2816 * configure: Rebuild.
2817 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
2819 2018-05-04 Tom Tromey <tom@tromey.com>
2821 * linux-record.c (record_linux_system_call) <case
2822 RECORD_SYS_RECVFROM>: Add "break".
2824 2018-05-04 Tom Tromey <tom@tromey.com>
2826 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
2827 Add missing "break".
2828 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
2829 Add missing "break".
2831 2018-05-04 Tom Tromey <tom@tromey.com>
2833 * rs6000-tdep.c (ppc_process_record_op4)
2834 (ppc_process_record_op63): Add fall-through comment.
2836 2018-05-04 Tom Tromey <tom@tromey.com>
2838 * i386-tdep.c (i386_process_record): Add fall-through comment.
2840 2018-05-04 Tom Tromey <tom@tromey.com>
2842 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
2845 2018-05-04 Tom Tromey <tom@tromey.com>
2847 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
2848 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
2849 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
2851 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
2853 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
2856 2018-05-04 Tom Tromey <tom@tromey.com>
2858 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
2860 2018-05-04 Tom Tromey <tom@tromey.com>
2862 * s390-tdep.c (s390_process_record): Fix fall-through comments.
2863 * xcoffread.c (scan_xcoff_symtab): Move comment later.
2864 * symfile.c (section_is_mapped): Fix fall-through comment.
2865 * stabsread.c (define_symbol, read_member_functions): Fix
2866 fall-through comment.
2867 * s390-linux-tdep.c (s390_process_record): Fix fall-through
2869 * remote.c (remote_wait_as): Fix fall-through comment.
2870 * p-exp.y (yylex): Fix fall-through comment.
2871 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
2873 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
2874 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
2875 * jv-exp.y (yylex): Fix fall-through comment.
2876 * go-exp.y (lex_one_token): Fix fall-through comment.
2877 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
2878 fall-through comment.
2879 * f-exp.y (yylex): Fix fall-through comment.
2880 * dwarf2read.c (process_die): Fix fall-through comments.
2881 * dbxread.c (process_one_symbol): Fix fall-through comment.
2882 * d-exp.y (lex_one_token): Fix fall-through comment.
2883 * cp-name-parser.y (yylex): Fix fall-through comment.
2884 * coffread.c (coff_symtab_read): Fix fall-through comment.
2885 * c-exp.y (lex_one_token): Fix fall-through comment.
2886 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
2888 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2891 2018-05-04 Tom Tromey <tom@tromey.com>
2894 * NEWS: Mention gdb.execute change.
2895 * gdbcmd.h (execute_control_command): Don't declare.
2896 * python/python.c (execute_gdb_command): Use read_command_lines_1,
2897 execute_control_commands, execute_control_commands_to_string.
2898 * cli/cli-script.h (execute_control_commands)
2899 (execute_control_commands_to_string): Declare.
2900 (execute_control_command): Add from_tty parameter.
2901 * cli/cli-script.c (execute_control_commands)
2902 (execute_control_commands_to_string): New functions.
2903 (execute_user_command): Use execute_control_commands.
2904 (execute_control_command_1): Add "from_tty" parameter. Update.
2905 (execute_control_command): Likewise.
2907 2018-05-04 Tom Tromey <tom@tromey.com>
2910 * NEWS: Mention that breakpoint commands are writable.
2911 * python/py-breakpoint.c (bppy_set_commands): New function.
2912 (breakpoint_object_getset) <"commands">: Use it.
2914 2018-05-04 Tom Tromey <tom@tromey.com>
2916 * tracepoint.c (actions_command): Update.
2917 * mi/mi-cmd-break.c (mi_command_line_array)
2918 (mi_command_line_array_cnt, mi_command_line_array_ptr)
2919 (mi_read_next_line): Remove.
2920 (mi_cmd_break_commands): Update.
2921 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
2923 * cli/cli-script.c (get_command_line): Update.
2924 (process_next_line): Use function_view. Constify.
2925 (recurse_read_control_structure, read_command_lines)
2926 (read_command_lines_1): Change argument types to function_view.
2927 (do_define_command, document_command): Update.
2928 * breakpoint.h (check_tracepoint_command): Don't declare.
2929 * breakpoint.c (check_tracepoint_command): Remove.
2930 (commands_command_1, create_tracepoint_from_upload): Update.
2932 2018-05-04 Tom Tromey <tom@tromey.com>
2935 * cli/cli-script.h (enum command_control_type) <define_control>:
2937 * cli/cli-script.c (multi_line_command_p): Handle define_control.
2938 (build_command_line, execute_control_command_1)
2939 (process_next_line): Likewise.
2940 (do_define_command): New function, extracted from define_command.
2941 (define_command): Use it.
2943 2018-05-04 Tom Tromey <tom@tromey.com>
2945 * tracepoint.c (actions_command): Update.
2946 * cli/cli-script.h (read_command_lines): Update.
2947 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
2948 (MAX_TMPBUF): Remove define.
2949 (define_command): Use string_printf.
2950 (document_command): Likewise.
2951 * breakpoint.c (commands_command_1): Update.
2953 2018-05-04 Tom Tromey <tom@tromey.com>
2955 * top.c (execute_command): Update.
2956 * cli/cli-script.h (print_command_lines): Now varargs.
2957 * cli/cli-script.c (print_command_lines): Now varargs.
2958 (execute_control_command_1) <case while_control, case if_control>:
2961 2018-05-04 Tom Tromey <tom@tromey.com>
2963 * tracepoint.c (all_tracepoint_actions): Rename from
2964 all_tracepoint_actions_and_cleanup. Change return type.
2965 (actions_command, encode_actions_1, encode_actions)
2966 (trace_dump_actions, tdump_command): Update.
2967 * remote.c (remote_download_command_source): Update.
2968 * python/python.c (gdbpy_eval_from_control_command)
2969 (python_command, python_interactive_command): Update.
2970 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2971 * guile/guile.c (guile_command)
2972 (gdbscm_eval_from_control_command, guile_command): Update.
2973 * compile/compile.c (compile_code_command)
2974 (compile_print_command, compile_to_object): Update.
2975 * cli/cli-script.h (struct command_lines_deleter): New.
2976 (counted_command_line): New typedef.
2977 (struct command_line): Add constructor, destructor.
2978 <body_list>: Remove.
2979 <body_list_0, body_list_1>: New members.
2980 (command_line_up): Remove typedef.
2981 (read_command_lines, read_command_lines_1, get_command_line):
2983 (copy_command_lines): Don't declare.
2984 * cli/cli-script.c (build_command_line): Use "new".
2985 (get_command_line): Return counted_command_line.
2986 (print_command_lines, execute_user_command)
2987 (execute_control_command_1, while_command, if_command): Update.
2988 (realloc_body_list): Remove.
2989 (process_next_line, recurse_read_control_structure): Update.
2990 (read_command_lines, read_command_lines_1): Return counted_command_line.
2991 (free_command_lines): Use "delete".
2992 (copy_command_lines): Remove.
2993 (define_command, document_command, show_user_1): Update.
2994 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
2995 a counted_command_line.
2996 * breakpoint.h (counted_command_line): Remove typedef.
2997 (breakpoint_set_commands): Update.
2998 * breakpoint.c (check_no_tracepoint_commands)
2999 (validate_commands_for_breakpoint): Update.
3000 (breakpoint_set_commands): Change commands to be a
3001 counted_command_line.
3002 (commands_command_1, update_dprintf_command_list)
3003 (create_tracepoint_from_upload): Update.
3005 2018-05-04 Tom Tromey <tom@tromey.com>
3007 * cli/cli-decode.h (cmd_list_element): New constructor.
3008 (~cmd_list_element): New destructor.
3009 (struct cmd_list_element): Add initializers.
3010 * cli/cli-decode.c (do_add_cmd): Use "new".
3011 (delete_cmd): Use "delete".
3013 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3014 Pedro Alves <palves@redhat.com>
3016 PR breakpoints/19806 and support for PR external/20207.
3017 * NEWS: Mention Aarch64 watchpoint improvements.
3018 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3019 watchpoints and PR external/20207 watchpoints.
3020 * nat/aarch64-linux-hw-point.c
3021 (kernel_supports_any_contiguous_range): New.
3022 (aarch64_watchpoint_offset): New.
3023 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3024 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3025 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3026 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3027 next_addr_orig_p. Support PR external/20207 watchpoints.
3028 (aarch64_downgrade_regs): New.
3029 (aarch64_dr_state_insert_one_point): New parameters offset and
3031 (aarch64_dr_state_remove_one_point): Likewise.
3032 (aarch64_handle_breakpoint): Update caller.
3033 (aarch64_handle_aligned_watchpoint): Likewise.
3034 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3036 (aarch64_linux_set_debug_regs): Remove const from state. Call
3037 aarch64_downgrade_regs.
3038 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3039 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3040 (DR_CONTROL_MASK): ... this.
3041 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3042 (unsigned int aarch64_watchpoint_offset): New prototype.
3043 (aarch64_linux_set_debug_regs): Remove const from state.
3044 * utils.c (align_up, align_down): Move to ...
3045 * common/common-utils.c (align_up, align_down): ... here.
3046 * utils.h (align_up, align_down): Move to ...
3047 * common/common-utils.h (align_up, align_down): ... here.
3049 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3051 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3052 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3053 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3054 Re-implement to match the ABI as summarized in GCC's
3055 gcc/config/sparc/sparc.c. All callers updated.
3056 (sparc32_store_arguments): Remove assertion.
3058 2018-05-04 Tom Tromey <tom@tromey.com>
3060 * printcmd.c: Don't include tui.h.
3061 (decode_format): Use skip_spaces.
3063 2018-05-04 Tom Tromey <tom@tromey.com>
3066 * printcmd.c (last_count): New global.
3067 (x_command): Use saved count when repeating.
3069 2018-05-04 Tom Tromey <tom@tromey.com>
3071 * nto-procfs.c (do_closedir_cleanup): Remove.
3072 (procfs_pidlist): Use gdb_dir_up.
3073 * procfs.c (do_closedir_cleanup): Remove.
3074 (proc_update_threads): Use gdb_dir_up.
3075 * common/filestuff.h (struct gdb_dir_deleter): New.
3076 (gdb_dir_up): New typedef.
3078 2018-05-04 Tom Tromey <tom@tromey.com>
3080 * ada-lang.c (print_mention_exception): Use std::string.
3082 2018-05-04 Tom Tromey <tom@tromey.com>
3084 * ada-lang.c (create_excep_cond_exprs): Update.
3085 (ada_exception_catchpoint_cond_string): Use std::string.
3087 2018-05-04 Tom Tromey <tom@tromey.com>
3089 * ada-lang.c (xget_renaming_scope): Return std::string.
3090 (old_renaming_is_invisible): Update.
3092 2018-05-04 Tom Tromey <tom@tromey.com>
3094 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3095 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3097 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3099 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3101 2018-05-04 Tom Tromey <tom@tromey.com>
3103 * remote.c (remote_query_supported_append): Change type.
3104 (remote_check_symbols): Update.
3106 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3109 * configure.ac: Prepend libpython.
3110 * python/python-config.py: Likewise.
3111 * configure: Regenerate.
3113 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3115 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3117 2018-05-03 Pedro Alves <palves@redhat.com>
3120 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3121 override. Write 'true' instead of '1'.
3122 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3125 2018-05-02 Pedro Alves <palves@redhat.com>
3127 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3128 add_inf_child_target.
3129 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3130 add_inf_child_target.
3131 * aix-thread.c (aix_thread_target_info): New.
3132 (aix_thread_target) <shortname, longname, doc>: Delete.
3134 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3135 add_inf_child_target.
3136 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3137 add_inf_child_target.
3138 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3139 add_inf_child_target.
3140 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3141 add_inf_child_target.
3142 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3143 add_inf_child_target.
3144 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3145 add_inf_child_target.
3146 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3147 add_inf_child_target.
3148 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3149 add_inf_child_target.
3150 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3151 add_inf_child_target.
3152 * bfd-target.c (target_bfd_target_info): New.
3153 (target_bfd) <shortname, longname, doc>: Delete.
3155 * bsd-kvm.c (bsd_kvm_target_info): New.
3156 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3158 (bsd_kvm_target::open): Rename to ...
3159 (bsd_kvm_target_open): ... this. Adjust.
3160 * bsd-uthread.c (bsd_uthread_target_info): New.
3161 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3163 * corefile.c (core_file_command): Adjust.
3164 * corelow.c (core_target_info): New.
3165 (core_target) <shortname, longname, doc>: Delete.
3167 (core_target::open): Rename to ...
3168 (core_target_open): ... this. Adjust.
3169 * ctf.c (ctf_target_info): New.
3170 (ctf_target) <shortname, longname, doc>: Delete.
3172 (ctf_target::open): Rename to ...
3173 (ctf_target_open): ... this.
3174 (_initialize_ctf): Adjust.
3175 * exec.c (exec_target_info): New.
3176 (exec_target) <shortname, longname, doc>: Delete.
3178 (exec_target::open): Rename to ...
3179 (exec_target_open): ... this.
3180 * gdbcore.h (core_target_open): Declare.
3181 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3182 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3183 add_inf_child_target.
3184 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3185 add_inf_child_target.
3186 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3187 add_inf_child_target.
3188 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3189 add_inf_child_target.
3190 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3191 add_inf_child_target.
3192 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3193 add_inf_child_target.
3194 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3195 add_inf_child_target.
3196 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3197 add_inf_child_target.
3198 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3199 add_inf_child_target.
3200 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3201 add_inf_child_target.
3202 * inf-child.c (inf_child_target_info): New.
3203 (inf_child_target::info): New.
3204 (inf_child_open_target): Remove 'target' parameter. Use
3205 get_native_target instead.
3206 (inf_child_target::open): Delete.
3207 (add_inf_child_target): New.
3208 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3211 (add_inf_child_target): Declare.
3212 (inf_child_open_target): Declare.
3213 * linux-thread-db.c (thread_db_target_info): New.
3214 (thread_db_target) <shortname, longname, doc>: Delete.
3216 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3217 add_inf_child_target.
3218 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3219 add_inf_child_target.
3220 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3221 add_inf_child_target.
3222 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3223 add_inf_child_target.
3224 * make-target-delegates (print_class): Adjust.
3225 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3226 add_inf_child_target.
3227 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3228 add_inf_child_target.
3229 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3230 add_inf_child_target.
3231 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3232 add_inf_child_target.
3233 * nto-procfs.c (nto_native_target_info): New.
3234 (nto_procfs_target_native) <shortname, longname, doc>:
3237 (nto_procfs_target_info): New.
3238 (nto_procfs_target_procfs) <shortname, longname, doc>:
3241 (init_procfs_targets): Adjust.
3242 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3243 add_inf_child_target.
3244 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3245 add_inf_child_target.
3246 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3247 add_inf_child_target.
3248 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3249 add_inf_child_target.
3250 * ravenscar-thread.c (ravenscar_target_info): New.
3251 (ravenscar_thread_target) <shortname, longname, doc>:
3254 * record-btrace.c (record_btrace_target_info):
3255 (record_btrace_target) <shortname, longname, doc>: Delete.
3257 (record_btrace_target::open): Rename to ...
3258 (record_btrace_target_open): ... this. Adjust.
3259 * record-full.c (record_longname, record_doc): New.
3260 (record_full_base_target) <shortname, longname, doc>: Delete.
3262 (record_full_target_info): New.
3263 (record_full_target): <shortname>: Delete.
3265 (record_full_core_open_1, record_full_open_1): Update comments.
3266 (record_full_base_target::open): Rename to ...
3267 (record_full_open): ... this.
3268 (cmd_record_full_restore): Update.
3269 (_initialize_record_full): Update.
3270 * remote-sim.c (remote_sim_target_info): New.
3271 (gdbsim_target) <shortname, longname, doc>: Delete.
3273 (gdbsim_target::open): Rename to ...
3274 (gdbsim_target_open): ... this.
3275 (_initialize_remote_sim): Adjust.
3276 * remote.c (remote_doc): New.
3277 (remote_target_info): New.
3278 (remote_target) <shortname, longname, doc>: Delete.
3280 (extended_remote_target_info): New.
3281 (extended_remote_target) <shortname, longname, doc>: Delete.
3283 (remote_target::open_1): Make static. Adjust.
3284 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3285 * s390-linux-nat.c (_initialize_s390_nat): Use
3286 add_inf_child_target.
3287 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3288 add_inf_child_target.
3289 * sol-thread.c (thread_db_target_info): New.
3290 (sol_thread_target) <shortname, longname, doc>: Delete.
3292 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3293 add_inf_child_target.
3294 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3295 add_inf_child_target.
3296 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3297 add_inf_child_target.
3298 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3299 add_inf_child_target.
3300 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3301 add_inf_child_target.
3302 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3303 add_inf_child_target.
3304 * spu-linux-nat.c (_initialize_spu_nat): Use
3305 add_inf_child_target.
3306 * spu-multiarch.c (spu_multiarch_target_info): New.
3307 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3309 * target-delegates.c: Regenerate.
3310 * target.c: Include <unordered_map>.
3311 (target_ops_p): Delete.
3312 (DEF_VEC_P(target_ops_p)): Delete.
3313 (target_factories): New.
3314 (test_target_info): New.
3315 (test_target_ops::info): New.
3316 (open_target): Adjust to use target_factories.
3317 (add_target_with_completer): Rename to ...
3318 (add_target): ... this. Change prototype. Register target_info
3319 and open callback in target_factories. Register target_info in
3320 command context instead of target_ops.
3321 (add_target): Delete old implementation.
3322 (add_deprecated_target_alias): Change prototype. Adjust.
3323 (the_native_target): New.
3324 (set_native_target, get_native_target): New.
3325 (find_default_run_target): Use the_native_target.
3326 (find_attach_target, find_run_target): Simplify.
3327 (target_ops::open): Delete.
3328 (dummy_target_info): New.
3329 (dummy_target::shortname, dummy_target::longname)
3330 (dummy_target::doc): Delete.
3331 (dummy_target::info): New.
3332 (debug_target::shortname, debug_target::longname)
3333 (debug_target::doc): Delete.
3334 (debug_target::info): New.
3335 * target.h (struct target_info): New.
3336 (target_ops::~target_ops): Add comment.
3337 (target_ops::info): New.
3338 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3339 longer virtual. Implement in terms of target_info.
3340 (set_native_target, get_native_target): Declare.
3341 (target_open_ftype): New.
3342 (add_target, add_target_with_completer)
3343 (add_deprecated_target_alias): Change prototype.
3344 (test_target) <shortname, longname, doc>: Delete.
3346 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3347 add_inf_child_target.
3348 * tracefile-tfile.c (tfile_target_info): New.
3349 (tfile_target) <shortname, longname, doc>: Delete.
3351 (tfile_target::open): Rename to ...
3352 (tfile_target_open): ... this.
3353 (_initialize_tracefile_tfile): Adjust.
3354 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3355 add_inf_child_target.
3356 * windows-nat.c (_initialize_windows_nat): Use
3357 add_inf_child_target.
3358 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3359 add_inf_child_target.
3361 2018-05-02 Pedro Alves <palves@redhat.com>
3363 * linux-nat.h (linux_nat_target) <low_new_thread,
3364 low_delete_thread, low_new_fork, low_forget_process,
3365 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3366 New virtual methods.
3367 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3368 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3369 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3370 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3371 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3373 * linux-fork.c (delete_fork): Adjust to call low method.
3374 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3375 (linux_nat_new_fork, linux_nat_forget_process_hook)
3376 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3377 (linux_nat_status_is_event):
3378 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3379 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3381 (sigtrap_is_event): Rename to ...
3382 (linux_nat_target::low_status_is_event): ... this.
3383 (linux_nat_set_status_is_event): Delete.
3384 (save_stop_reason, linux_nat_wait_1)
3385 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3387 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3388 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3389 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3390 (linux_nat_set_prepare_to_resume): Delete.
3391 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3392 low virtual methods.
3393 * amd64-linux-nat.c: Likewise.
3394 * arm-linux-nat.c: Likewise.
3395 * i386-linux-nat.c: Likewise.
3396 * ia64-linux-nat.c: Likewise.
3397 * mips-linux-nat.c: Likewise.
3398 * ppc-linux-nat.c: Likewise.
3399 * s390-linux-nat.c: Likewise.
3400 * sparc64-linux-nat.c: Likewise.
3401 * x86-linux-nat.c: Likewise.
3402 * x86-linux-nat.h: Include "nat/x86-linux.h".
3403 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3404 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3407 2018-05-02 Pedro Alves <palves@redhat.com>
3409 * target.h (target_ops)
3410 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3411 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3412 stopped_by_watchpoint, have_continuable_watchpoint,
3413 stopped_data_address, watchpoint_addr_within_range,
3414 can_accel_watchpoint_condition, can_run, thread_alive,
3415 has_all_memory, has_memory, has_stack, has_registers,
3416 has_execution, can_async_p, is_async_p, supports_non_stop,
3417 always_non_stop_p, can_execute_reverse, supports_multi_process,
3418 supports_enable_disable_tracepoint,
3419 supports_disable_randomization, supports_string_tracing,
3420 supports_evaluation_of_breakpoint_conditions,
3421 can_run_breakpoint_commands, filesystem_is_local,
3422 can_download_tracepoint, get_trace_state_variable_value,
3423 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3424 record_is_replaying, record_will_replay,
3425 augmented_libraries_svr4_read>: Adjust to return bool.
3426 * aarch64-linux-nat.c: All implementations adjusted.
3427 * aix-thread.c: All implementations adjusted.
3428 * arm-linux-nat.c: All implementations adjusted.
3429 * breakpoint.c: All implementations adjusted.
3430 * bsd-kvm.c: All implementations adjusted.
3431 * bsd-uthread.c: All implementations adjusted.
3432 * corelow.c: All implementations adjusted.
3433 * ctf.c: All implementations adjusted.
3434 * darwin-nat.c: All implementations adjusted.
3435 * darwin-nat.h: All implementations adjusted.
3436 * exec.c: All implementations adjusted.
3437 * fbsd-nat.c: All implementations adjusted.
3438 * fbsd-nat.h: All implementations adjusted.
3439 * gnu-nat.c: All implementations adjusted.
3440 * gnu-nat.h: All implementations adjusted.
3441 * go32-nat.c: All implementations adjusted.
3442 * ia64-linux-nat.c: All implementations adjusted.
3443 * inf-child.c: All implementations adjusted.
3444 * inf-child.h: All implementations adjusted.
3445 * inf-ptrace.c: All implementations adjusted.
3446 * inf-ptrace.h: All implementations adjusted.
3447 * linux-nat.c: All implementations adjusted.
3448 * linux-nat.h: All implementations adjusted.
3449 * mips-linux-nat.c: All implementations adjusted.
3450 * nto-procfs.c: All implementations adjusted.
3451 * ppc-linux-nat.c: All implementations adjusted.
3452 * procfs.c: All implementations adjusted.
3453 * ravenscar-thread.c: All implementations adjusted.
3454 * record-btrace.c: All implementations adjusted.
3455 * record-full.c: All implementations adjusted.
3456 * remote-sim.c: All implementations adjusted.
3457 * remote.c: All implementations adjusted.
3458 * s390-linux-nat.c: All implementations adjusted.
3459 * sol-thread.c: All implementations adjusted.
3460 * spu-multiarch.c: All implementations adjusted.
3461 * target-delegates.c: All implementations adjusted.
3462 * target.c: All implementations adjusted.
3463 * target.h: All implementations adjusted.
3464 * tracefile-tfile.c: All implementations adjusted.
3465 * tracefile.c: All implementations adjusted.
3466 * tracefile.h: All implementations adjusted.
3467 * windows-nat.c: All implementations adjusted.
3468 * x86-linux-nat.h: All implementations adjusted.
3469 * x86-nat.h: All implementations adjusted.
3471 2018-05-02 Pedro Alves <palves@redhat.com>
3473 * make-target-delegates (scan_target_h): Don't trim lines here.
3474 Replace sequences of tabs and/or whitespace with a single
3476 (top level, parsing methods): Trim each line before processing it
3479 2018-05-02 Pedro Alves <palves@redhat.com>
3480 John Baldwin <jhb@freebsd.org>
3482 * target.h (enum strata) <debug_stratum>: New.
3483 (struct target_ops) <all delegation methods>: Replace by C++
3484 virtual methods, and drop "to_" prefix. All references updated
3486 <to_shortname, to_longname, to_doc, to_data,
3487 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3488 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3489 virtual methods. All references updated throughout.
3490 <can_attach, supports_terminal_ours, can_create_inferior,
3491 get_thread_control_capabilities, attach_no_wait>: New
3493 <insert_breakpoint, remove_breakpoint>: Now
3494 TARGET_DEFAULT_NORETURN methods.
3495 <info_proc>: Now returns bool.
3497 (OPS_MAGIC): Delete.
3498 (current_target): Delete. All references replaced by references
3500 (target_stack): ... this. New.
3501 (target_shortname, target_longname): Adjust.
3502 (target_can_run): Now a function declaration.
3503 (default_child_has_all_memory, default_child_has_memory)
3504 (default_child_has_stack, default_child_has_registers)
3505 (default_child_has_execution): Remove target_ops parameter.
3506 (complete_target_initialization): Delete.
3507 (memory_breakpoint_target): New template class.
3508 (test_target_ops): Refactor as a C++ class with virtual methods.
3509 * make-target-delegates (NAME_PART): Tighten.
3510 (POINTER_PART, CP_SYMBOL): New.
3511 (SIMPLE_RETURN_PART): Reimplement.
3512 (VEC_RETURN_PART): Expect less.
3513 (RETURN_PART, VIRTUAL_PART): New.
3514 (METHOD): Adjust to C++ virtual methods.
3515 (scan_target_h): Remove reference to C99.
3516 (dname): Output "target_ops::" prefix.
3517 (write_function_header): Adjust to output a C++ class method.
3518 (write_declaration): New.
3519 (write_delegator): Adjust to output a C++ class method.
3520 (tdname): Output "dummy_target::" prefix.
3521 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3523 (tdefault_names, debug_names): Delete.
3524 (return_types, tdefaults, styles, argtypes_array): New.
3525 (top level): All methods are delegators.
3527 (top level): Print dummy_target and debug_target classes.
3528 * target-delegates.c: Regenerate.
3529 * target-debug.h (target_debug_print_enum_info_proc_what)
3530 (target_debug_print_thread_control_capabilities)
3531 (target_debug_print_thread_info_p): New.
3532 * target.c (dummy_target): Delete.
3533 (the_dummy_target, the_debug_target): New.
3534 (target_stack): Now extern.
3535 (set_targetdebug): Push/unpush debug target.
3536 (default_child_has_all_memory, default_child_has_memory)
3537 (default_child_has_stack, default_child_has_registers)
3538 (default_child_has_execution): Remove target_ops parameter.
3539 (complete_target_initialization): Delete.
3540 (add_target_with_completer): No longer call
3541 complete_target_initialization.
3542 (target_supports_terminal_ours): Use regular delegation.
3543 (update_current_target): Delete.
3544 (push_target): No longer check magic number. Don't call
3545 update_current_target.
3546 (unpush_target): Don't call update_current_target.
3547 (target_is_pushed): No longer check magic number.
3548 (target_require_runnable): Skip for all stratums over
3550 (target_ops::info_proc): New.
3551 (target_info_proc): Use find_target_at and
3552 find_default_run_target.
3553 (target_supports_disable_randomization): Use regular delegation.
3554 (target_get_osdata): Use find_target_at.
3555 (target_ops::open, target_ops::close, target_ops::can_attach)
3556 (target_ops::attach, target_ops::can_create_inferior)
3557 (target_ops::create_inferior, target_ops::can_run)
3558 (target_can_run): New.
3559 (default_fileio_target): Use regular delegation.
3560 (target_ops::fileio_open, target_ops::fileio_pwrite)
3561 (target_ops::fileio_pread, target_ops::fileio_fstat)
3562 (target_ops::fileio_close, target_ops::fileio_unlink)
3563 (target_ops::fileio_readlink): New.
3564 (target_fileio_open_1, target_fileio_unlink)
3565 (target_fileio_readlink): Always call the target method. Handle
3567 (return_zero, return_zero_has_execution): Delete.
3568 (init_dummy_target): Delete.
3569 (dummy_target::dummy_target, dummy_target::shortname)
3570 (dummy_target::longname, dummy_target::doc)
3571 (debug_target::debug_target, debug_target::shortname)
3572 (debug_target::longname, debug_target::doc): New.
3573 (target_supports_delete_record): Use regular delegation.
3574 (setup_target_debug): Delete.
3575 (maintenance_print_target_stack): Skip debug_stratum.
3576 (initialize_targets): Instantiate the_dummy_target and
3578 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
3580 (target_auxv_search, fprint_target_auxv): Adjust.
3581 (info_auxv_command): Adjust to use target_stack.
3582 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3583 * exceptions.c (print_flush): Handle a NULL target_stack.
3584 * regcache.c (target_ops_no_register): Refactor as class with
3587 * exec.c (exec_target): New class.
3588 (exec_ops): Now an exec_target.
3589 (exec_open, exec_close_1, exec_get_section_table)
3590 (exec_xfer_partial, exec_files_info, exec_has_memory)
3591 (exec_make_note_section): Refactor as exec_target methods.
3592 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3594 (exec_target::find_memory_regions): New.
3595 (_initialize_exec): Don't call init_exec_ops.
3596 * gdbcore.h (exec_file_clear): Delete.
3598 * corefile.c (core_target): Delete.
3599 (core_file_command): Adjust.
3600 * corelow.c (core_target): New class.
3601 (the_core_target): New.
3602 (core_close): Remove target_ops parameter.
3603 (core_close_cleanup): Adjust.
3604 (core_target::close): New.
3605 (core_open, core_detach, get_core_registers, core_files_info)
3606 (core_xfer_partial, core_thread_alive, core_read_description)
3607 (core_pid_to_str, core_thread_name, core_has_memory)
3608 (core_has_stack, core_has_registers, core_info_proc): Rework as
3609 core_target methods.
3610 (ignore, core_remove_breakpoint, init_core_ops): Delete.
3611 (_initialize_corelow): Initialize the_core_target.
3612 * gdbcore.h (core_target): Delete.
3613 (the_core_target): New.
3615 * ctf.c: (ctf_target): New class.
3616 (ctf_ops): Now a ctf_target.
3617 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3618 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3619 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3621 (init_ctf_ops): Delete.
3622 (_initialize_ctf): Don't call it.
3623 * tracefile-tfile.c (tfile_target): New class.
3624 (tfile_ops): Now a tfile_target.
3625 (tfile_open, tfile_close, tfile_files_info)
3626 (tfile_get_tracepoint_status, tfile_trace_find)
3627 (tfile_fetch_registers, tfile_xfer_partial)
3628 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3629 Refactor as tfile_target methods.
3630 (tfile_xfer_partial_features): Remove target_ops parameter.
3631 (init_tfile_ops): Delete.
3632 (_initialize_tracefile_tfile): Don't call it.
3633 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3634 (tracefile_has_stack, tracefile_has_registers)
3635 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3636 tracefile_target methods.
3637 (init_tracefile_ops): Delete.
3638 (tracefile_target::tracefile_target): New.
3639 * tracefile.h: Include "target.h".
3640 (tracefile_target): New class.
3641 (init_tracefile_ops): Delete.
3643 * spu-multiarch.c (spu_multiarch_target): New class.
3644 (spu_ops): Now a spu_multiarch_target.
3645 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3646 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3647 (spu_search_memory, spu_mourn_inferior): Refactor as
3648 spu_multiarch_target methods.
3649 (init_spu_ops): Delete.
3650 (_initialize_spu_multiarch): Remove references to init_spu_ops,
3651 complete_target_initialization.
3653 * ravenscar-thread.c (ravenscar_thread_target): New class.
3654 (ravenscar_ops): Now a ravenscar_thread_target.
3655 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3656 (ravenscar_thread_alive, ravenscar_pid_to_str)
3657 (ravenscar_fetch_registers, ravenscar_store_registers)
3658 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3659 (ravenscar_stopped_by_hw_breakpoint)
3660 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3661 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3662 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3664 (init_ravenscar_thread_ops): Delete.
3665 (_initialize_ravenscar): Remove references to
3666 init_ravenscar_thread_ops and complete_target_initialization.
3668 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3669 (bsd_uthread_target): New class.
3670 (bsd_uthread_ops): Now a bsd_uthread_target.
3671 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3672 (bsd_uthread_close, bsd_uthread_mourn_inferior)
3673 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3674 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3675 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3676 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3677 (bsd_uthread_target): Delete function.
3678 (_initialize_bsd_uthread): Remove reference to
3679 complete_target_initialization.
3681 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
3682 (target_bfd): ... this new class.
3683 (target_bfd_xfer_partial, target_bfd_get_section_table)
3684 (target_bfd_close): Refactor as target_bfd methods.
3685 (target_bfd::~target_bfd): New.
3686 (target_bfd_reopen): Adjust.
3687 (target_bfd::close): New.
3689 * record-btrace.c (record_btrace_target): New class.
3690 (record_btrace_ops): Now a record_btrace_target.
3691 (record_btrace_open, record_btrace_stop_recording)
3692 (record_btrace_disconnect, record_btrace_close)
3693 (record_btrace_async, record_btrace_info)
3694 (record_btrace_insn_history, record_btrace_insn_history_range)
3695 (record_btrace_insn_history_from, record_btrace_call_history)
3696 (record_btrace_call_history_range)
3697 (record_btrace_call_history_from, record_btrace_record_method)
3698 (record_btrace_is_replaying, record_btrace_will_replay)
3699 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
3700 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
3701 (record_btrace_store_registers, record_btrace_prepare_to_store)
3702 (record_btrace_to_get_unwinder)
3703 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
3704 (record_btrace_commit_resume, record_btrace_wait)
3705 (record_btrace_stop, record_btrace_can_execute_reverse)
3706 (record_btrace_stopped_by_sw_breakpoint)
3707 (record_btrace_supports_stopped_by_sw_breakpoint)
3708 (record_btrace_stopped_by_hw_breakpoint)
3709 (record_btrace_supports_stopped_by_hw_breakpoint)
3710 (record_btrace_update_thread_list, record_btrace_thread_alive)
3711 (record_btrace_goto_begin, record_btrace_goto_end)
3712 (record_btrace_goto, record_btrace_stop_replaying_all)
3713 (record_btrace_execution_direction)
3714 (record_btrace_prepare_to_generate_core)
3715 (record_btrace_done_generating_core): Refactor as
3716 record_btrace_target methods.
3717 (init_record_btrace_ops): Delete.
3718 (_initialize_record_btrace): Remove reference to
3719 init_record_btrace_ops.
3720 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
3721 the execution_direction global.
3722 (record_full_base_target, record_full_target)
3723 (record_full_core_target): New classes.
3724 (record_full_ops): Now a record_full_target.
3725 (record_full_core_ops): Now a record_full_core_target.
3726 (record_full_target::detach, record_full_target::disconnect)
3727 (record_full_core_target::disconnect)
3728 (record_full_target::mourn_inferior, record_full_target::kill):
3730 (record_full_open, record_full_close, record_full_async): Refactor
3731 as methods of the record_full_base_target class.
3732 (record_full_resume, record_full_commit_resume): Refactor
3733 as methods of the record_full_target class.
3734 (record_full_wait, record_full_stopped_by_watchpoint)
3735 (record_full_stopped_data_address)
3736 (record_full_stopped_by_sw_breakpoint)
3737 (record_full_supports_stopped_by_sw_breakpoint)
3738 (record_full_stopped_by_hw_breakpoint)
3739 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
3740 methods of the record_full_base_target class.
3741 (record_full_store_registers, record_full_xfer_partial)
3742 (record_full_insert_breakpoint, record_full_remove_breakpoint):
3743 Refactor as methods of the record_full_target class.
3744 (record_full_can_execute_reverse, record_full_get_bookmark)
3745 (record_full_goto_bookmark, record_full_execution_direction)
3746 (record_full_record_method, record_full_info, record_full_delete)
3747 (record_full_is_replaying, record_full_will_replay)
3748 (record_full_goto_begin, record_full_goto_end, record_full_goto)
3749 (record_full_stop_replaying): Refactor as methods of the
3750 record_full_base_target class.
3751 (record_full_core_resume, record_full_core_kill)
3752 (record_full_core_fetch_registers)
3753 (record_full_core_prepare_to_store)
3754 (record_full_core_store_registers, record_full_core_xfer_partial)
3755 (record_full_core_insert_breakpoint)
3756 (record_full_core_remove_breakpoint)
3757 (record_full_core_has_execution): Refactor
3758 as methods of the record_full_core_target class.
3759 (record_full_base_target::supports_delete_record): New.
3760 (init_record_full_ops): Delete.
3761 (init_record_full_core_ops): Delete.
3762 (record_full_save): Refactor as method of the
3763 record_full_base_target class.
3764 (_initialize_record_full): Remove references to
3765 init_record_full_ops and init_record_full_core_ops.
3767 * remote.c (remote_target, extended_remote_target): New classes.
3768 (remote_ops): Now a remote_target.
3769 (extended_remote_ops): Now an extended_remote_target.
3770 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
3771 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
3772 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
3773 (remote_pass_signals, remote_set_syscall_catchpoint)
3774 (remote_program_signals, )
3775 (remote_thread_always_alive): Remove target_ops parameter.
3776 (remote_thread_alive, remote_thread_name)
3777 (remote_update_thread_list, remote_threads_extra_info)
3778 (remote_static_tracepoint_marker_at)
3779 (remote_static_tracepoint_markers_by_strid)
3780 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
3781 (remote_open): Refactor as methods of remote_target.
3782 (extended_remote_open, extended_remote_detach)
3783 (extended_remote_attach, extended_remote_post_attach):
3784 (extended_remote_supports_disable_randomization)
3785 (extended_remote_create_inferior): : Refactor as method of
3786 extended_remote_target.
3787 (remote_set_permissions, remote_open_1, remote_detach)
3788 (remote_follow_fork, remote_follow_exec, remote_disconnect)
3789 (remote_resume, remote_commit_resume, remote_stop)
3790 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
3791 (remote_terminal_ours, remote_wait, remote_fetch_registers)
3792 (remote_prepare_to_store, remote_store_registers)
3793 (remote_flash_erase, remote_flash_done, remote_files_info)
3794 (remote_kill, remote_mourn, remote_insert_breakpoint)
3795 (remote_remove_breakpoint, remote_insert_watchpoint)
3796 (remote_watchpoint_addr_within_range)
3797 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
3798 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
3799 (remote_supports_stopped_by_sw_breakpoint)
3800 (remote_stopped_by_hw_breakpoint)
3801 (remote_supports_stopped_by_hw_breakpoint)
3802 (remote_stopped_by_watchpoint, remote_stopped_data_address)
3803 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
3804 (remote_verify_memory): Refactor as methods of remote_target.
3805 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
3807 (remote_xfer_partial, remote_get_memory_xfer_limit)
3808 (remote_search_memory, remote_rcmd, remote_memory_map)
3809 (remote_pid_to_str, remote_get_thread_local_address)
3810 (remote_get_tib_address, remote_read_description): Refactor as
3811 methods of remote_target.
3812 (remote_target::fileio_open, remote_target::fileio_pwrite)
3813 (remote_target::fileio_pread, remote_target::fileio_close): New.
3814 (remote_hostio_readlink, remote_hostio_fstat)
3815 (remote_filesystem_is_local, remote_can_execute_reverse)
3816 (remote_supports_non_stop, remote_supports_disable_randomization)
3817 (remote_supports_multi_process, remote_supports_cond_breakpoints)
3818 (remote_supports_enable_disable_tracepoint)
3819 (remote_supports_string_tracing)
3820 (remote_can_run_breakpoint_commands, remote_trace_init)
3821 (remote_download_tracepoint, remote_can_download_tracepoint)
3822 (remote_download_trace_state_variable, remote_enable_tracepoint)
3823 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
3824 (remote_trace_start, remote_get_trace_status)
3825 (remote_get_tracepoint_status, remote_trace_stop)
3826 (remote_trace_find, remote_get_trace_state_variable_value)
3827 (remote_save_trace_data, remote_get_raw_trace_data)
3828 (remote_set_disconnected_tracing, remote_core_of_thread)
3829 (remote_set_circular_trace_buffer, remote_traceframe_info)
3830 (remote_get_min_fast_tracepoint_insn_len)
3831 (remote_set_trace_buffer_size, remote_set_trace_notes)
3832 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
3833 (remote_disable_btrace, remote_teardown_btrace)
3834 (remote_read_btrace, remote_btrace_conf)
3835 (remote_augmented_libraries_svr4_read, remote_load)
3836 (remote_pid_to_exec_file, remote_can_do_single_step)
3837 (remote_execution_direction, remote_thread_handle_to_thread_info):
3838 Refactor as methods of remote_target.
3839 (init_remote_ops, init_extended_remote_ops): Delete.
3840 (remote_can_async_p, remote_is_async_p, remote_async)
3841 (remote_thread_events, remote_upload_tracepoints)
3842 (remote_upload_trace_state_variables): Refactor as methods of
3844 (_initialize_remote): Remove references to init_remote_ops and
3845 init_extended_remote_ops.
3847 * remote-sim.c (gdbsim_target): New class.
3848 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
3849 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
3850 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
3851 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
3852 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
3853 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
3854 Refactor as methods of gdbsim_target.
3855 (gdbsim_ops): Now a gdbsim_target.
3856 (init_gdbsim_ops): Delete.
3857 (gdbsim_cntrl_c): Adjust.
3858 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
3860 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
3861 (the_amd64_linux_nat_target): New.
3862 (amd64_linux_fetch_inferior_registers)
3863 (amd64_linux_store_inferior_registers): Refactor as methods of
3864 amd64_linux_nat_target.
3865 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
3866 * i386-linux-nat.c: Don't include "linux-nat.h".
3867 (i386_linux_nat_target): New class.
3868 (the_i386_linux_nat_target): New.
3869 (i386_linux_fetch_inferior_registers)
3870 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
3871 as methods of i386_linux_nat_target.
3872 (_initialize_i386_linux_nat): Adjust. Set linux_target.
3873 * inf-child.c (inf_child_ops): Delete.
3874 (inf_child_fetch_inferior_registers)
3875 (inf_child_store_inferior_registers): Delete.
3876 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
3877 methods of inf_child_target.
3878 (inf_child_target::supports_terminal_ours)
3879 (inf_child_target::terminal_init)
3880 (inf_child_target::terminal_inferior)
3881 (inf_child_target::terminal_ours_for_output)
3882 (inf_child_target::terminal_ours, inf_child_target::interrupt)
3883 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
3885 (inf_child_open, inf_child_disconnect, inf_child_close)
3886 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
3887 (inf_child_post_startup_inferior, inf_child_can_run)
3888 (inf_child_pid_to_exec_file): Refactor as methods of
3890 (inf_child_follow_fork): Delete.
3891 (inf_child_target::can_create_inferior)
3892 (inf_child_target::can_attach): New.
3893 (inf_child_target::has_all_memory, inf_child_target::has_memory)
3894 (inf_child_target::has_stack, inf_child_target::has_registers)
3895 (inf_child_target::has_execution): New.
3896 (inf_child_fileio_open, inf_child_fileio_pwrite)
3897 (inf_child_fileio_pread, inf_child_fileio_fstat)
3898 (inf_child_fileio_close, inf_child_fileio_unlink)
3899 (inf_child_fileio_readlink, inf_child_use_agent)
3900 (inf_child_can_use_agent): Refactor as methods of
3902 (return_zero, inf_child_target): Delete.
3903 (inf_child_target::inf_child_target): New.
3904 * inf-child.h: Include "target.h".
3905 (inf_child_target): Delete function prototype.
3906 (inf_child_target): New class.
3907 (inf_child_open_target, inf_child_mourn_inferior)
3908 (inf_child_maybe_unpush_target): Delete.
3909 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3910 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3911 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3912 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3913 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3914 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3915 (inf_ptrace_wait, inf_ptrace_xfer_partial)
3916 (inf_ptrace_thread_alive, inf_ptrace_files_info)
3917 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3918 methods of inf_ptrace_target.
3919 (inf_ptrace_target): Delete function.
3920 * inf-ptrace.h: Include "inf-child.h".
3921 (inf_ptrace_target): Delete function declaration.
3922 (inf_ptrace_target): New class.
3923 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
3924 * linux-nat.c (linux_target): New.
3925 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
3926 (linux_nat_target::~linux_nat_target): New.
3927 (linux_child_post_attach, linux_child_post_startup_inferior)
3928 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
3929 (linux_child_remove_fork_catchpoint)
3930 (linux_child_insert_vfork_catchpoint)
3931 (linux_child_remove_vfork_catchpoint)
3932 (linux_child_insert_exec_catchpoint)
3933 (linux_child_remove_exec_catchpoint)
3934 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
3935 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
3936 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
3937 (linux_nat_stopped_data_address)
3938 (linux_nat_stopped_by_sw_breakpoint)
3939 (linux_nat_supports_stopped_by_sw_breakpoint)
3940 (linux_nat_stopped_by_hw_breakpoint)
3941 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
3942 (linux_nat_kill, linux_nat_mourn_inferior)
3943 (linux_nat_xfer_partial, linux_nat_thread_alive)
3944 (linux_nat_update_thread_list, linux_nat_pid_to_str)
3945 (linux_nat_thread_name, linux_child_pid_to_exec_file)
3946 (linux_child_static_tracepoint_markers_by_strid)
3947 (linux_nat_is_async_p, linux_nat_can_async_p)
3948 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
3949 (linux_nat_supports_multi_process)
3950 (linux_nat_supports_disable_randomization, linux_nat_async)
3951 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
3952 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
3953 (linux_nat_fileio_open, linux_nat_fileio_readlink)
3954 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
3955 methods of linux_nat_target.
3956 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
3957 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
3959 (check_stopped_by_watchpoint): Adjust.
3960 (linux_xfer_partial): Delete.
3961 (linux_target_install_ops, linux_target, linux_nat_add_target):
3963 (linux_nat_target::linux_nat_target): New.
3964 * linux-nat.h: Include "inf-ptrace.h".
3965 (linux_nat_target): New.
3966 (linux_target, linux_target_install_ops, linux_nat_add_target):
3967 Delete function declarations.
3968 (linux_target): Declare global.
3969 * linux-thread-db.c (thread_db_target): New.
3970 (thread_db_target::thread_db_target): New.
3971 (thread_db_ops): Delete.
3972 (the_thread_db_target): New.
3973 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
3974 (thread_db_update_thread_list, thread_db_pid_to_str)
3975 (thread_db_extra_thread_info)
3976 (thread_db_thread_handle_to_thread_info)
3977 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
3978 (thread_db_resume): Refactor as methods of thread_db_target.
3979 (init_thread_db_ops): Delete.
3980 (_initialize_thread_db): Remove reference to init_thread_db_ops.
3981 * x86-linux-nat.c: Don't include "linux-nat.h".
3982 (super_post_startup_inferior): Delete.
3983 (x86_linux_nat_target::~x86_linux_nat_target): New.
3984 (x86_linux_child_post_startup_inferior)
3985 (x86_linux_read_description, x86_linux_enable_btrace)
3986 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
3987 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
3988 methods of x86_linux_nat_target.
3989 (x86_linux_create_target): Delete. Bits folded ...
3990 (x86_linux_add_target): ... here. Now takes a linux_nat_target
3992 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
3993 (x86_linux_nat_target): New class.
3994 (x86_linux_create_target): Delete.
3995 (x86_linux_add_target): Now takes a linux_nat_target pointer.
3996 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
3997 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
3998 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
3999 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4000 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4002 (x86_use_watchpoints): Delete.
4003 * x86-nat.h: Include "breakpoint.h" and "target.h".
4004 (x86_use_watchpoints): Delete.
4005 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4006 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4007 (x86_insert_watchpoint, x86_remove_watchpoint)
4008 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4009 (x86_stopped_by_hw_breakpoint): New declarations.
4010 (x86_nat_target): New template class.
4012 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4013 (the_ppc_linux_nat_target): New.
4014 (ppc_linux_fetch_inferior_registers)
4015 (ppc_linux_can_use_hw_breakpoint)
4016 (ppc_linux_region_ok_for_hw_watchpoint)
4017 (ppc_linux_ranged_break_num_registers)
4018 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4019 (ppc_linux_insert_mask_watchpoint)
4020 (ppc_linux_remove_mask_watchpoint)
4021 (ppc_linux_can_accel_watchpoint_condition)
4022 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4023 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4024 (ppc_linux_watchpoint_addr_within_range)
4025 (ppc_linux_masked_watch_num_registers)
4026 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4027 (ppc_linux_read_description): Refactor as methods of
4028 ppc_linux_nat_target.
4029 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4031 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4032 (procfs_target): New class.
4033 (the_procfs_target): New.
4034 (procfs_target): Delete function.
4035 (procfs_auxv_parse, procfs_attach, procfs_detach)
4036 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4037 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4038 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4039 (procfs_create_inferior, procfs_update_thread_list)
4040 (procfs_thread_alive, procfs_pid_to_str)
4041 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4042 (procfs_stopped_data_address, procfs_insert_watchpoint)
4043 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4044 (proc_find_memory_regions, procfs_info_proc)
4045 (procfs_make_note_section): Refactor as methods of procfs_target.
4046 (_initialize_procfs): Adjust.
4047 * sol-thread.c (sol_thread_target): New class.
4048 (sol_thread_ops): Now a sol_thread_target.
4049 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4050 (sol_thread_fetch_registers, sol_thread_store_registers)
4051 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4052 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4053 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4054 (init_sol_thread_ops): Delete.
4055 (_initialize_sol_thread): Adjust. Remove references to
4056 init_sol_thread_ops and complete_target_initialization.
4058 * windows-nat.c (windows_nat_target): New class.
4059 (windows_fetch_inferior_registers)
4060 (windows_store_inferior_registers, windows_resume, windows_wait)
4061 (windows_attach, windows_detach, windows_pid_to_exec_file)
4062 (windows_files_info, windows_create_inferior)
4063 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4064 (windows_close, windows_pid_to_str, windows_xfer_partial)
4065 (windows_get_tib_address, windows_get_ada_task_ptid)
4066 (windows_thread_name, windows_thread_alive): Refactor as
4067 windows_nat_target methods.
4068 (do_initial_windows_stuff): Adjust.
4069 (windows_target): Delete function.
4070 (_initialize_windows_nat): Adjust.
4072 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4073 (darwin_mourn_inferior, darwin_kill_inferior)
4074 (darwin_create_inferior, darwin_attach, darwin_detach)
4075 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4076 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4077 (darwin_supports_multi_process): Refactor as darwin_nat_target
4079 (darwin_resume_to, darwin_files_info): Delete.
4080 (_initialize_darwin_inferior): Rename to ...
4081 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4082 * darwin-nat.h: Include "inf-child.h".
4083 (darwin_nat_target): New class.
4084 (darwin_complete_target): Delete.
4085 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4086 (darwin_target): New.
4087 (i386_darwin_fetch_inferior_registers)
4088 (i386_darwin_store_inferior_registers): Refactor as methods of
4090 (darwin_complete_target): Delete, with ...
4091 (_initialize_i386_darwin_nat): ... bits factored out here.
4093 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4094 (the_alpha_linux_nat_target): New.
4095 (alpha_linux_register_u_offset): Refactor as
4096 alpha_linux_nat_target method.
4097 (_initialize_alpha_linux_nat): Adjust.
4098 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4099 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4100 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4101 methods of linux_nat_trad_target.
4102 (linux_trad_target): Delete.
4103 * linux-nat-trad.h (linux_trad_target): Delete function.
4104 (linux_nat_trad_target): New class.
4105 * mips-linux-nat.c (mips_linux_nat_target): New class.
4106 (super_fetch_registers, super_store_registers, super_close):
4108 (the_mips_linux_nat_target): New.
4109 (mips64_linux_regsets_fetch_registers)
4110 (mips64_linux_regsets_store_registers)
4111 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4112 (mips_linux_register_u_offset, mips_linux_read_description)
4113 (mips_linux_can_use_hw_breakpoint)
4114 (mips_linux_stopped_by_watchpoint)
4115 (mips_linux_stopped_data_address)
4116 (mips_linux_region_ok_for_hw_watchpoint)
4117 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4118 (mips_linux_close): Refactor as methods of mips_linux_nat.
4119 (_initialize_mips_linux_nat): Adjust to C++ification.
4121 * aix-thread.c (aix_thread_target): New class.
4122 (aix_thread_ops): Now an aix_thread_target.
4123 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4124 (aix_thread_fetch_registers, aix_thread_store_registers)
4125 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4126 (aix_thread_thread_alive, aix_thread_pid_to_str)
4127 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4128 Refactor as methods of aix_thread_target.
4129 (init_aix_thread_ops): Delete.
4130 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4131 and complete_target_initialization.
4132 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4133 (rs6000_nat_target): New class.
4134 (the_rs6000_nat_target): New.
4135 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4136 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4137 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4138 (super_create_inferior): Delete.
4139 (_initialize_rs6000_nat): Adjust to C++ification.
4141 * arm-linux-nat.c (arm_linux_nat_target): New class.
4142 (the_arm_linux_nat_target): New.
4143 (arm_linux_fetch_inferior_registers)
4144 (arm_linux_store_inferior_registers, arm_linux_read_description)
4145 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4146 (arm_linux_remove_hw_breakpoint)
4147 (arm_linux_region_ok_for_hw_watchpoint)
4148 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4149 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4150 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4151 arm_linux_nat_target.
4152 (_initialize_arm_linux_nat): Adjust to C++ification.
4154 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4155 (the_aarch64_linux_nat_target): New.
4156 (aarch64_linux_fetch_inferior_registers)
4157 (aarch64_linux_store_inferior_registers)
4158 (aarch64_linux_child_post_startup_inferior)
4159 (aarch64_linux_read_description)
4160 (aarch64_linux_can_use_hw_breakpoint)
4161 (aarch64_linux_insert_hw_breakpoint)
4162 (aarch64_linux_remove_hw_breakpoint)
4163 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4164 (aarch64_linux_region_ok_for_hw_watchpoint)
4165 (aarch64_linux_stopped_data_address)
4166 (aarch64_linux_stopped_by_watchpoint)
4167 (aarch64_linux_watchpoint_addr_within_range)
4168 (aarch64_linux_can_do_single_step): Refactor as methods of
4169 aarch64_linux_nat_target.
4170 (super_post_startup_inferior): Delete.
4171 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4173 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4174 (the_hppa_linux_nat_target): New.
4175 (hppa_linux_fetch_inferior_registers)
4176 (hppa_linux_store_inferior_registers): Refactor as methods of
4177 hppa_linux_nat_target.
4178 (_initialize_hppa_linux_nat): Adjust to C++ification.
4180 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4181 (the_ia64_linux_nat_target): New.
4182 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4183 (ia64_linux_stopped_data_address)
4184 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4185 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4186 ia64_linux_nat_target methods.
4187 (super_xfer_partial): Delete.
4188 (_initialize_ia64_linux_nat): Adjust to C++ification.
4190 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4191 (the_m32r_linux_nat_target): New.
4192 (m32r_linux_fetch_inferior_registers)
4193 (m32r_linux_store_inferior_registers): Refactor as
4194 m32r_linux_nat_target methods.
4195 (_initialize_m32r_linux_nat): Adjust to C++ification.
4197 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4198 (the_m68k_linux_nat_target): New.
4199 (m68k_linux_fetch_inferior_registers)
4200 (m68k_linux_store_inferior_registers): Refactor as
4201 m68k_linux_nat_target methods.
4202 (_initialize_m68k_linux_nat): Adjust to C++ification.
4204 * s390-linux-nat.c (s390_linux_nat_target): New class.
4205 (the_s390_linux_nat_target): New.
4206 (s390_linux_fetch_inferior_registers)
4207 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4208 (s390_insert_watchpoint, s390_remove_watchpoint)
4209 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4210 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4211 (s390_auxv_parse, s390_read_description): Refactor as methods of
4212 s390_linux_nat_target.
4213 (_initialize_s390_nat): Adjust to C++ification.
4215 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4216 (the_sparc_linux_nat_target): New.
4217 (_initialize_sparc_linux_nat): Adjust to C++ification.
4218 * sparc-nat.c (sparc_fetch_inferior_registers)
4219 (sparc_store_inferior_registers): Remove target_ops parameter.
4220 * sparc-nat.h (sparc_fetch_inferior_registers)
4221 (sparc_store_inferior_registers): Remove target_ops parameter.
4222 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4223 (the_sparc64_linux_nat_target): New.
4224 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4226 * spu-linux-nat.c (spu_linux_nat_target): New class.
4227 (the_spu_linux_nat_target): New.
4228 (spu_child_post_startup_inferior, spu_child_post_attach)
4229 (spu_child_wait, spu_fetch_inferior_registers)
4230 (spu_store_inferior_registers, spu_xfer_partial)
4231 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4233 (_initialize_spu_nat): Adjust to C++ification.
4235 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4236 (the_tilegx_linux_nat_target): New.
4237 (fetch_inferior_registers, store_inferior_registers):
4238 Refactor as methods.
4239 (_initialize_tile_linux_nat): Adjust to C++ification.
4241 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4242 (the_xtensa_linux_nat_target): New.
4243 (xtensa_linux_fetch_inferior_registers)
4244 (xtensa_linux_store_inferior_registers): Refactor as
4245 xtensa_linux_nat_target methods.
4246 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4248 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4249 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4250 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4251 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4252 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4253 (fbsd_stopped_by_sw_breakpoint)
4254 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4255 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4256 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4257 (fbsd_post_startup_inferior, fbsd_post_attach)
4258 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4259 (fbsd_set_syscall_catchpoint)
4260 (super_xfer_partial, super_resume, super_wait)
4261 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4262 (fbsd_handle_debug_trap): Remove target_ops parameter.
4263 (fbsd_nat_add_target): Delete.
4264 * fbsd-nat.h: Include "inf-ptrace.h".
4265 (fbsd_nat_add_target): Delete.
4266 (USE_SIGTRAP_SIGINFO): Define.
4267 (fbsd_nat_target): New class.
4269 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4270 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4271 (amd64bsd_target): Delete.
4272 * amd64-bsd-nat.h: New file.
4273 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4275 (amd64_fbsd_nat_target): New class.
4276 (the_amd64_fbsd_nat_target): New.
4277 (amd64fbsd_read_description): Refactor as method of
4278 amd64_fbsd_nat_target.
4279 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4280 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4281 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4282 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4283 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4284 (i386bsd_target): Delete.
4285 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4286 (i386bsd_fetch_inferior_registers)
4287 (i386bsd_store_inferior_registers): Declare.
4288 (i386_bsd_nat_target): New class.
4289 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4290 (the_i386_fbsd_nat_target): New.
4291 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4292 i386_fbsd_nat_target methods.
4293 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4294 (_initialize_i386fbsd_nat): Adjust to C++ification.
4295 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4296 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4297 (_initialize_x86_bsd_nat): Adjust to C++ification.
4298 * x86-bsd-nat.h: Include "x86-nat.h".
4299 (x86bsd_target): Delete declaration.
4300 (x86bsd_nat_target): New class.
4302 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4303 (the_aarch64_fbsd_nat_target): New.
4304 (aarch64_fbsd_fetch_inferior_registers)
4305 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4306 aarch64_fbsd_nat_target.
4307 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4308 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4309 (the_alpha_bsd_nat_target): New.
4310 (alphabsd_fetch_inferior_registers)
4311 (alphabsd_store_inferior_registers): Refactor as
4312 alpha_bsd_nat_target methods.
4313 (_initialize_alphabsd_nat): Refactor as methods of
4314 alpha_bsd_nat_target.
4315 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4316 (the_amd64_nbsd_nat_target): New.
4317 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4318 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4319 (the_amd64_obsd_nat_target): New.
4320 (_initialize_amd64obsd_nat): Adjust to C++ification.
4321 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4322 (the_arm_fbsd_nat_target): New.
4323 (arm_fbsd_fetch_inferior_registers)
4324 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4325 (_initialize_arm_fbsd_nat): Refactor as methods of
4326 arm_fbsd_nat_target.
4327 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4328 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4329 (the_arm_netbsd_nat_target): New.
4330 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4331 arm_netbsd_nat_target.
4332 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4333 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4334 (the_hppa_nbsd_nat_target): New.
4335 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4336 hppa_nbsd_nat_target methods.
4337 (_initialize_hppanbsd_nat): Adjust to C++ification.
4338 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4339 (the_hppa_obsd_nat_target): New.
4340 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4341 methods of hppa_obsd_nat_target.
4342 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4344 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4345 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4347 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4348 (_initialize_i386obsd_nat): Use add_target.
4349 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4350 (the_m68k_bsd_nat_target): New.
4351 (m68kbsd_fetch_inferior_registers)
4352 (m68kbsd_store_inferior_registers): Refactor as methods of
4353 m68k_bsd_nat_target.
4354 (_initialize_m68kbsd_nat): Adjust to C++ification.
4355 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4356 (the_mips_fbsd_nat_target): New.
4357 (mips_fbsd_fetch_inferior_registers)
4358 (mips_fbsd_store_inferior_registers): Refactor as methods of
4359 mips_fbsd_nat_target.
4360 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4362 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4363 (the_mips_nbsd_nat_target): New.
4364 (mipsnbsd_fetch_inferior_registers)
4365 (mipsnbsd_store_inferior_registers): Refactor as methods of
4366 mips_nbsd_nat_target.
4367 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4368 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4369 (the_mips64_obsd_nat_target): New.
4370 (mips64obsd_fetch_inferior_registers)
4371 (mips64obsd_store_inferior_registers): Refactor as methods of
4372 mips64_obsd_nat_target.
4373 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4375 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4377 * nbsd-nat.h: Include "inf-ptrace.h".
4378 (nbsd_nat_target): New class.
4379 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4380 (obsd_wait): Refactor as methods of obsd_nat_target.
4381 (obsd_add_target): Delete.
4382 * obsd-nat.h: Include "inf-ptrace.h".
4383 (obsd_nat_target): New class.
4384 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4385 (the_ppc_fbsd_nat_target): New.
4386 (ppcfbsd_fetch_inferior_registers)
4387 (ppcfbsd_store_inferior_registers): Refactor as methods of
4388 ppc_fbsd_nat_target.
4389 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4391 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4392 (the_ppc_nbsd_nat_target): New.
4393 (ppcnbsd_fetch_inferior_registers)
4394 (ppcnbsd_store_inferior_registers): Refactor as methods of
4395 ppc_nbsd_nat_target.
4396 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4397 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4398 (the_ppc_obsd_nat_target): New.
4399 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4400 methods of ppc_obsd_nat_target.
4401 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4403 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4404 (the_sh_nbsd_nat_target): New.
4405 (shnbsd_fetch_inferior_registers)
4406 (shnbsd_store_inferior_registers): Refactor as methods of
4408 (_initialize_shnbsd_nat): Adjust to C++ification.
4409 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4410 (inf_ptrace_xfer_partial): Delete.
4411 (sparc_xfer_partial, sparc_target): Delete.
4412 * sparc-nat.h (sparc_fetch_inferior_registers)
4413 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4414 (sparc_target): Delete function declaration.
4415 (sparc_target): New template class.
4416 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4417 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4418 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4419 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4421 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4422 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4423 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4424 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4426 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4427 (the_vax_bsd_nat_target): New.
4428 (vaxbsd_fetch_inferior_registers)
4429 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4431 (_initialize_vaxbsd_nat): Adjust to C++ification.
4433 * bsd-kvm.c (bsd_kvm_target): New class.
4434 (bsd_kvm_ops): Now a bsd_kvm_target.
4435 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4436 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4437 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4439 (bsd_kvm_return_one): Delete.
4440 (bsd_kvm_add_target): Adjust to C++ification.
4442 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4443 (nto_procfs_target_procfs): New classes.
4444 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4445 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4446 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4447 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4448 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4449 (procfs_remove_hw_breakpoint, procfs_resume)
4450 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4451 (procfs_kill_inferior, procfs_store_registers)
4452 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4453 as methods of nto_procfs_target.
4454 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4455 (nto_native_ops): Delete.
4456 (procfs_open, procfs_native_open): Delete.
4457 (nto_native_ops): Now an nto_procfs_target_native.
4458 (init_procfs_targets): Adjust to C++ification.
4459 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4460 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4461 Refactor as methods of nto_procfs_target.
4463 * go32-nat.c (go32_nat_target): New class.
4464 (the_go32_nat_target): New.
4465 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4466 (go32_store_registers, go32_xfer_partial, go32_files_info)
4467 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4468 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4469 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4470 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4471 (go32_target): Delete.
4472 (_initialize_go32_nat): Adjust to C++ification.
4474 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4475 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4476 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4477 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4479 (gnu_target): Delete.
4480 * gnu-nat.h (gnu_target): Delete.
4481 (gnu_nat_target): New class.
4482 * i386-gnu-nat.c (gnu_base_target): New.
4483 (i386_gnu_nat_target): New class.
4484 (the_i386_gnu_nat_target): New.
4485 (_initialize_i386gnu_nat): Adjust to C++ification.
4487 2018-05-02 Pedro Alves <palves@redhat.com>
4489 * bfd-target.c (target_bfd_xclose): Rename to ...
4490 (target_bfd_close): ... this.
4491 (target_bfd_reopen): Adjust.
4492 * target.c (target_close): Remove references to to_xclose.
4493 * target.h (target_ops::to_xclose): Delete.
4494 (target_ops::to_close): Update comments.
4496 2018-05-02 Pedro Alves <palves@redhat.com>
4498 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4500 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4501 * inf-ptrace.c (inf_ptrace_register_u_offset)
4502 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4503 (inf_ptrace_store_register, inf_ptrace_store_registers)
4504 (inf_ptrace_trad_target): Move to ...
4505 * linux-nat-trad.c: ... this new file.
4506 * linux-nat-trad.h: New file.
4507 * linux-nat.c (linux_target_install_ops): Make extern.
4508 (linux_trad_target): Delete.
4509 * linux-nat.h (linux_trad_target): Delete declaration.
4510 (linux_target_install_ops): Declare.
4511 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4514 2018-05-02 Pedro Alves <palves@redhat.com>
4516 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4517 procfs_target/add_target here.
4518 * procfs.c (procfs_target): Make static.
4519 (_initialize_procfs): Call add_target here.
4520 * procfs.h (struct target_ops): Remove forward declaration.
4521 (procfs_target): Remove declaration.
4522 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4524 2018-05-02 Pedro Alves <palves@redhat.com>
4526 * procfs.c (procfs_stopped_by_watchpoint)
4527 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4528 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4530 (procfs_use_watchpoints): Delete, move contents...
4531 (procfs_target): ... here.
4532 * procfs.h (procfs_use_watchpoints): Delete declaration.
4533 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4534 procfs_use_watchpoints.
4535 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4536 procfs_use_watchpoints.
4538 2018-05-02 Tom Tromey <tom@tromey.com>
4541 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4542 and var_zuinteger_unlimited.
4543 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4544 and PARAM_ZUINTEGER_UNLIMITED.
4545 (set_parameter_value): Handle var_zuinteger and
4546 var_zuinteger_unlimited.
4547 (add_setshow_generic): Likewise.
4548 (parmpy_init): Likewise.
4550 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4553 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4554 pointer is not null before dereferencing it.
4556 2018-04-30 Tom Tromey <tom@tromey.com>
4558 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4561 2018-04-30 Tom Tromey <tom@tromey.com>
4563 * breakpoint.c (mention): Remove use of is_mi_like_p.
4564 (print_mention_ranged_breakpoint): Likewise.
4565 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4568 2018-04-30 Tom Tromey <tom@tromey.com>
4570 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
4572 2018-04-30 Tom Tromey <tom@tromey.com>
4574 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4575 (info_spu_event_command): Remove some uses of is_mi_like_p.
4577 2018-04-30 Tom Tromey <tom@tromey.com>
4579 * python/py-framefilter.c (py_print_single_arg)
4580 (enumerate_locals, py_print_args, py_print_frame): Remove some
4581 uses of is_mi_like_p.
4583 2018-04-30 Tom Tromey <tom@tromey.com>
4586 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4587 * ui-out.h (ui_out::is_mi_like_p): Now const.
4588 (ui_out::do_is_mi_like_p): Now const.
4589 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4591 2018-04-30 Tom Tromey <tom@tromey.com>
4593 * varobj.c (varobj_set_visualizer): Use new_reference.
4594 * python/python.c (gdbpy_decode_line): Use new_reference.
4595 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4598 2018-04-30 Tom Tromey <tom@tromey.com>
4600 * varobj.c (install_new_value): Use new_reference.
4601 * value.h (value_incref): Return void. Swap intro comment with
4603 * value.c (set_value_parent): Use new_reference.
4604 (value_incref): Return void. Update intro comment.
4605 (release_value): Use new_reference.
4606 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4608 2018-04-30 Tom Tromey <tom@tromey.com>
4610 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4611 * gdb_bfd.h (new_bfd_ref): Remove.
4612 (gdb_bfd_open): Update comment.
4613 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4614 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4615 (gdb_bfd_fdopenr): Use new_reference.
4616 * exec.c (exec_file_attach): Use new_reference.
4618 2018-04-30 Tom Tromey <tom@tromey.com>
4620 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4623 2018-04-30 Tom Tromey <tom@tromey.com>
4625 * jit.c (jit_read_code_entry): Use type_align.
4626 * i386-tdep.c (i386_gdbarch_init): Don't call
4627 set_gdbarch_long_long_align_bit.
4628 * gdbarch.sh: Remove long_long_align_bit.
4629 * gdbarch.c, gdbarch.h: Rebuild.
4630 * arc-tdep.c (arc_type_align): New function.
4631 (arc_gdbarch_init): Use arc_type_align. Don't call
4632 set_gdbarch_long_long_align_bit.
4634 2018-04-30 Tom Tromey <tom@tromey.com>
4636 * rust-lang.c (rust_type_alignment): Remove.
4637 (rust_composite_type): Use type_align.
4639 2018-04-30 Tom Tromey <tom@tromey.com>
4641 * NEWS: Mention Type.align.
4642 * python/py-type.c (typy_get_alignof): New function.
4643 (type_object_getset): Add "alignof".
4645 2018-04-30 Tom Tromey <tom@tromey.com>
4649 * std-operator.def (UNOP_ALIGNOF): New operator.
4650 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4652 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4653 * c-lang.c (c_op_print_tab): Add alignof.
4654 * c-exp.y (ALIGNOF): New token.
4655 (exp): Add "ALIGNOF" production.
4656 (ident_tokens): Add _Alignof and alignof.
4658 2018-04-30 Tom Tromey <tom@tromey.com>
4660 * i386-tdep.c (i386_type_align): New function.
4661 (i386_gdbarch_init): Update.
4662 * gdbarch.sh (type_align): New method.
4663 * gdbarch.c, gdbarch.h: Rebuild.
4664 * arch-utils.h (default_type_align): Declare.
4665 * arch-utils.c (default_type_align): New function.
4666 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4667 (struct type) <align_log2>: New field.
4668 <instance_flags>: Now a bitfield.
4669 (TYPE_RAW_ALIGN): New macro.
4670 (type_align, type_raw_align, set_type_align): Declare.
4671 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4673 * dwarf2read.c (quirk_rust_enum): Set type alignment.
4674 (get_alignment, maybe_set_alignment): New functions.
4675 (read_structure_type, read_enumeration_type, read_array_type)
4676 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4677 (read_subrange_type, read_base_type): Set type alignment.
4679 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
4681 * dwarf2read.c (read_index_from_section): Use bool.
4683 2018-04-29 Fabian Groffen <grobian@gentoo.org>
4686 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4689 2018-04-29 John Reiser <jreiser@BitWagon.com>
4692 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
4693 last step, and do it atomically.
4695 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
4697 * compile/compile-c-types.c (convert_int, convert_float):
4700 2018-04-27 Tom Tromey <tom@tromey.com>
4703 * rust-lang.c (rust_inclusive_range_type_p): New function.
4704 (rust_range): Handle inclusive ranges.
4705 (rust_compute_range): Likewise.
4706 * rust-exp.y (struct rust_op) <inclusive>: New field.
4707 (DOTDOTEQ): New constant.
4708 (range_expr): Add "..=" productions.
4709 (operator_tokens): Add "..=" token.
4710 (ast_range): Add "inclusive" parameter.
4711 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
4713 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
4715 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
4716 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
4718 * expprint.c (print_subexp_standard): Handle new bounds values.
4719 (dump_subexp_body_standard): Likewise.
4721 2018-04-27 Tom Tromey <tom@tromey.com>
4723 * configure: Rebuild.
4724 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
4725 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
4727 (class symbol_needs_eval_context): Likewise.
4728 * dwarf2read.c (mock_mapped_index::symbol_name_count)
4729 (mock_mapped_index::symbol_name_at): Use "override". Remove
4731 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
4733 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
4734 * aarch64-tdep.c (instruction_reader::read): Use "override".
4735 (instruction_reader_test::read): Likewise.
4736 * arm-tdep.c (instruction_reader::read): Use "override".
4737 (instruction_reader_thumb::read): Likewise.
4739 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
4742 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
4743 instead of remote_send.
4744 (remote_send): Remove.
4746 2018-04-26 Pedro Alves <palves@redhat.com>
4748 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
4749 find_function_start_sal instead of find_pc_line.
4751 2018-04-26 Pedro Alves <palves@redhat.com>
4753 * breakpoint.c (set_breakpoint_location_function): Handle
4755 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
4756 * elfread.c (elf_symtab_read): Give data symbols with
4757 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
4758 (elf_rel_plt_read): Update comment.
4759 * linespec.c (convert_linespec_to_sals): Handle
4761 (minsym_found): Handle mst_data_gnu_ifunc.
4762 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
4763 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
4764 * parse.c (find_minsym_type_and_address): Handle
4766 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
4767 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
4768 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
4770 <mst_data_gnu_ifunc>: New enumerator.
4772 2018-04-26 Pedro Alves <palves@redhat.com>
4774 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4775 (lookup_minimal_symbol_by_pc_section): ... this. Replace
4776 'want_trampoline' parameter by a lookup_msym_prefer parameter.
4778 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
4779 (lookup_minimal_symbol_by_pc): Adjust.
4780 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
4781 (lookup_solib_trampoline_symbol_by_pc): Adjust.
4782 * minsyms.h (lookup_msym_prefer): New enum.
4783 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4784 parameter by a lookup_msym_prefer parameter.
4786 2018-04-26 Pedro Alves <palves@redhat.com>
4788 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
4789 ends in "@plt" instead of looking at the symbol's section.
4791 2018-04-26 Pedro Alves <palves@redhat.com>
4793 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
4795 (find_pc_partial_function_gnu_ifunc): Rename to ...
4796 (find_pc_partial_function): ... this, and remove references to
4798 (find_pc_partial_function): Delete old implementation.
4799 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
4801 2018-04-26 Pedro Alves <palves@redhat.com>
4803 * linespec.c (struct bound_minimal_symbol_search_key): New.
4804 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
4805 skip first line if we found a GNU ifunc minimal symbol by name.
4806 (compare_msymbols): Change parameters to work with a destructured
4808 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
4811 2018-04-26 Pedro Alves <palves@redhat.com>
4813 * breakpoint.c (set_breakpoint_location_function): Don't resolve
4814 ifunc targets here. Instead, if we have an ifunc minsym, use its
4816 (add_location_to_breakpoint): Store the minsym and the objfile in
4817 the breakpoint location.
4818 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
4819 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
4820 Record the minsym in the sal.
4821 * symtab.h (symtab_and_line) <msymbol>: New field.
4823 2018-04-26 Pedro Alves <palves@redhat.com>
4825 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
4826 unless we actually resolved the ifunc.
4828 2018-04-26 Pedro Alves <palves@redhat.com>
4830 * c-exp.y (variable production): Prefer ifunc minsyms over
4831 regular function symbols.
4832 * symtab.c (find_gnu_ifunc): New function.
4833 * minsyms.h (lookup_msym_prefer): New enum.
4834 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4835 parameter by a lookup_msym_prefer parameter.
4836 * symtab.h (find_gnu_ifunc): New declaration.
4838 2018-04-26 Pedro Alves <palves@redhat.com>
4840 * blockframe.c (find_gnu_ifunc_target_type): New function.
4841 (find_function_type): New.
4842 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
4843 return a value with a memory address.
4844 (eval_call): For calls to GNU ifunc functions, try to find the
4845 type of the target function from the type that the resolver
4847 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
4849 * infcall.c (find_function_return_type): Delete.
4850 (find_function_addr): Add 'function_type' parameter. For calls to
4851 GNU ifunc functions, try to find the type of the target function
4852 from the type that the resolver returns, and return it via
4854 (call_function_by_hand_dummy): Adjust to use the function type
4855 returned by find_function_addr.
4856 (find_function_addr): Add 'function_type' parameter and move
4858 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
4861 2018-04-26 Pedro Alves <palves@redhat.com>
4863 * c-exp.y (variable production): Skip finding an alias for ifunc
4866 2018-04-26 Pedro Alves <palves@redhat.com>
4868 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
4870 2018-04-25 Pedro Alves <palves@redhat.com>
4872 * infcmd.c (kill_command): Print the pid as string, not the whole
4873 thread's ptid. Add comment. s/has been killed/killed/ in output
4875 * remote.c (remote_detach_1): Print the pid as string, not the
4876 whole thread's ptid.
4878 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4879 Sergio Durigan Junior <sergiodj@redhat.com>
4880 Pedro Alves <palves@redhat.com>
4882 * infcmd.c (kill_command): Print message when inferior has
4884 * inferior.c (print_inferior_events): Remove 'static'. Set as
4886 (add_inferior): Improve message printed when
4887 'print_inferior_events' is on.
4888 (exit_inferior): Remove message printed when
4889 'print_inferior_events' is on.
4890 (detach_inferior): Improve message printed when
4891 'print_inferior_events' is on.
4892 (initialize_inferiors): Use 'add_inferior_silent' to set
4893 'current_inferior_'.
4894 * inferior.h (print_inferior_events): Declare here as
4896 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4897 '[Detaching...]' messages when 'print_inferior_events' is on.
4898 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
4899 as prefix/suffix for messages. Remove periods. Fix erroneous
4900 'Detaching after fork from child...', replace it by '... from
4902 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4903 prefix/suffix when printing 'Detaching...' messages. Print
4904 them when 'print_inferior_events' is on.
4905 * remote.c (remote_detach_1): Print message when detaching
4906 from inferior and '!is_fork_parent'.
4908 2018-04-24 Tom Tromey <tom@tromey.com>
4910 * cli-out.h: Reindent.
4912 2018-04-24 Tom Tromey <tom@tromey.com>
4914 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4915 (cli_ui_out::do_field_string): Use fputs_filtered.
4916 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4918 2018-04-23 Tom Tromey <tom@tromey.com>
4920 * guile/scm-frame.c (gdbscm_frame_read_var): Use
4921 gdb::unique_xmalloc_ptr.
4923 2018-04-23 Tom Tromey <tom@tromey.com>
4925 * configure: Rebuild.
4927 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
4930 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
4931 prepare_for_testing. Set normal_bp to r_debug_state if target
4934 2018-04-21 Pedro Alves <palves@redhat.com>
4935 Rajendra SY <rajendra.sy@gmail.com>
4937 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
4938 * remote.c (extended_remote_attach): In all-stop mode, mark the
4939 thread as executing.
4941 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4943 * thread.c (thread_apply_all_command): Fix comment.
4944 (thread_command): Fix comment.
4946 2018-04-10 Alan Hayward <alan.hayward@arm.com>
4948 * common/tdesc.h (tdesc_create_feature): Remove xml filename
4950 * features/aarch64-core.c (create_feature_aarch64_core):
4952 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
4954 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
4956 * features/i386/32bit-avx512.c
4957 (create_feature_i386_32bit_avx512): Likewise.
4958 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
4960 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
4962 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
4964 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
4966 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
4968 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
4970 * features/i386/64bit-avx512.c
4971 (create_feature_i386_64bit_avx512): Likewise.
4972 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
4974 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
4976 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
4978 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
4980 * features/i386/64bit-segments.c
4981 (create_feature_i386_64bit_segments): Likewise.
4982 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
4984 * features/i386/x32-core.c
4985 (create_feature_i386_x32_core): Likewise.
4986 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
4987 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
4988 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
4989 * target-descriptions.c: In generated code, don't pass xml
4992 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4994 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
4995 (print_xml_feature::visit_post): Likewise.
4996 (print_xml_feature::visit): Likewise.
4997 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
4998 (print_xml_feature): Add new class.
4999 * regformats/regdat.sh: Null xmltarget on feature targets.
5000 * target-descriptions.c (struct target_desc): Add xmltarget.
5001 (maintenance_check_tdesc_xml_convert): Add unittest function.
5002 (tdesc_get_features_xml): Add function to get xml.
5003 (maintenance_check_xml_descriptions): Test xml generation.
5004 * xml-tdesc.c (string_read_description_xml): Add function.
5005 * xml-tdesc.h (string_read_description_xml): Add declaration.
5007 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5009 * features/Makefile: Add feature marker to targets with new style
5010 target descriptions.
5011 * regformats/aarch64.dat: Regenerate.
5012 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5013 * regformats/i386/amd64-avx-linux.dat: Likewise.
5014 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5015 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5016 * regformats/i386/amd64-linux.dat: Likewise.
5017 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5018 * regformats/i386/amd64.dat: Likewise.
5019 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5020 * regformats/i386/i386-avx-linux.dat: Likewise.
5021 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5022 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5023 * regformats/i386/i386-linux.dat: Likewise.
5024 * regformats/i386/i386-mmx-linux.dat: Likewise.
5025 * regformats/i386/i386-mpx-linux.dat: Likewise.
5026 * regformats/i386/i386.dat: Likewise.
5027 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5028 * regformats/i386/x32-avx-linux.dat: Likewise.
5029 * regformats/i386/x32-linux.dat: Likewise.
5030 * regformats/tic6x-c62x-linux.dat: Likewise.
5031 * regformats/tic6x-c64x-linux.dat: Likewise.
5032 * regformats/tic6x-c64xp-linux.dat: Likewise.
5033 * regformats/regdat.sh: Parse feature marker.
5035 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5037 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5038 (tdesc_osabi_name): Likewise.
5039 * target-descriptions.c (tdesc_architecture_name): Add new
5041 (tdesc_osabi_name): Likewise.
5043 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5045 * common/tdesc.c (tdesc_predefined_type): Move to here.
5046 (tdesc_named_type): Likewise.
5047 (tdesc_create_vector): Likewise.
5048 (tdesc_create_struct): Likewise.
5049 (tdesc_set_struct_size): Likewise.
5050 (tdesc_create_union): Likewise.
5051 (tdesc_create_flags): Likewise.
5052 (tdesc_create_enum): Likewise.
5053 (tdesc_add_field): Likewise.
5054 (tdesc_add_typed_bitfield): Likewise.
5055 (tdesc_add_bitfield): Likewise.
5056 (tdesc_add_flag): Likewise.
5057 (tdesc_add_enum_value): Likewise.
5058 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5059 (struct tdesc_type_vector): Likewise.
5060 (struct tdesc_type_field): Likewise.
5061 (struct tdesc_type_with_fields): Likewise.
5062 (tdesc_create_enum): Add declaration.
5063 (tdesc_add_typed_bitfield): Likewise.
5064 (tdesc_add_enum_value): Likewise.
5065 * target-descriptions.c (tdesc_type_field): Move from here.
5066 (tdesc_type_builtin): Likewise.
5067 (tdesc_type_vector): Likewise.
5068 (tdesc_type_with_fields): Likewise.
5069 (tdesc_predefined_types): Likewise.
5070 (tdesc_named_type): Likewise.
5071 (tdesc_create_vector): Likewise.
5072 (tdesc_create_struct): Likewise.
5073 (tdesc_set_struct_size): Likewise.
5074 (tdesc_create_union): Likewise.
5075 (tdesc_create_flags): Likewise.
5076 (tdesc_create_enum): Likewise.
5077 (tdesc_add_field): Likewise.
5078 (tdesc_add_typed_bitfield): Likewise.
5079 (tdesc_add_bitfield): Likewise.
5080 (tdesc_add_flag): Likewise.
5081 (tdesc_add_enum_value): Likewise.
5082 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5083 (tdesc_add_typed_bitfield): Likewise.
5084 (tdesc_add_enum_value): Likewise.
5086 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5088 * common/tdesc.c (tdesc_feature::accept): Move to here.
5089 (tdesc_feature::operator==): Likewise.
5090 (tdesc_create_reg): Likewise.
5091 * common/tdesc.h (tdesc_type_kind): Likewise.
5092 (struct tdesc_type): Likewise.
5093 (struct tdesc_feature): Likewise.
5094 * regformats/regdat.sh: Create a feature.
5095 * target-descriptions.c (tdesc_type_kind): Move from here.
5096 (tdesc_type): Likewise.
5097 (tdesc_type_up): Likewise.
5098 (tdesc_feature): Likewise.
5099 (tdesc_create_reg): Likewise.
5101 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5103 * Makefile.in: Add arch/tdesc.c
5104 * common/tdesc.c: New file.
5105 * common/tdesc.h (tdesc_element_visitor): Move to here.
5106 (tdesc_element): Likewise.
5107 (tdesc_reg): Likewise.
5108 (tdesc_reg_up): Likewise.
5109 * regformats/regdef.h (reg): Add offset to constructors.
5110 * target-descriptions.c (tdesc_element_visitor): Move from here.
5111 (tdesc_element): Likewise.
5112 (tdesc_reg): Likewise.
5113 (tdesc_reg_up): Likewise.
5115 2018-04-17 Tom Tromey <tom@tromey.com>
5117 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5120 2018-04-17 Tom Tromey <tom@tromey.com>
5122 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5124 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5126 * symtab.c (print_symbol_info): Skip printing filename and line
5127 number when `last' is NULL.
5128 (symtab_symbol_info): Use empty string instead of NULL for first
5129 invocation of print_symbol_info.
5130 (rbreak_command): Pass NULL to `last' parameter of
5133 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5135 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5138 2018-04-16 Pedro Alves <palves@redhat.com>
5140 * MAINTAINERS (sh): Remove.
5141 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5142 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5143 (ALLDEPFILES): Remove sh64-tdep.c.
5144 * NEWS: Mentions that support for SH-5/SH64 is removed.
5145 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5146 (sh*-*-openbsd*): Ditto.
5147 (sh64-*-elf*): Remove.
5149 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5150 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5151 * sh-tdep.c: No longer include "sh64-tdep.h".
5152 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5153 * sh64-tdep.c, sh64-tdep.h: Remove files.
5155 2018-04-16 Pedro Alves <palves@redhat.com>
5157 * MAINTAINERS: Remove m88k.
5158 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5159 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5160 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5161 * NEWS: Mention that support for m88k was removed.
5162 * configure.host (m88*-*-*): Remove support.
5163 * configure.nat (m88k-*-*): Remove support.
5164 * configure.tgt (m88*-*-openbsd*): Remove.
5165 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5167 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5169 * configure.tgt (x86_tobjs): New variable.
5170 (amd64_tobjs, i386_tobjs): Use it.
5172 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5174 * symtab.c (print_symbol_info): Precede the symbol definition by
5175 the line number when available.
5176 * NEWS: Advertise this enhancement.
5178 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5180 * NEWS (New options): announce set/show record btrace cpu.
5181 * btrace.c: Include record-btrace.h.
5182 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5183 the vendor is unknown.
5184 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5185 Maybe overwrite the btrace configuration's cpu.
5186 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5187 (btrace_fetch): Add cpu parameter. Update callers.
5188 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5189 Maybe overwrite the btrace configuration's cpu. Skip enabling
5190 errata workarounds if the vendor is unknown.
5191 * python/py-record-btrace.c: Include record-btrace.h.
5192 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5193 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5194 * record-btrace.c (record_btrace_cpu_state_kind): New.
5195 (record_btrace_cpu): New.
5196 (set_record_btrace_cpu_cmdlist): New.
5197 (record_btrace_get_cpu): New.
5198 (require_btrace_thread, record_btrace_info)
5199 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5200 (cmd_set_record_btrace_cpu_none): New.
5201 (cmd_set_record_btrace_cpu_auto): New.
5202 (cmd_set_record_btrace_cpu): New.
5203 (cmd_show_record_btrace_cpu): New.
5204 (_initialize_record_btrace): Initialize set/show record btrace cpu
5206 * record-btrace.h (record_btrace_get_cpu): New.
5208 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5210 * record.c (set_record_command): Fix typo in message.
5212 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5214 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5216 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5218 * infrun.c (process_event_stop_test): Call
5219 gdbarch_in_indirect_branch_thunk.
5220 * gdbarch.sh (in_indirect_branch_thunk): New.
5221 * gdbarch.c: Regenerated.
5222 * gdbarch.h: Regenerated.
5225 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5226 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5227 (ALLDEPFILES): Add x86-tdep.c.
5228 * arch-utils.h (default_in_indirect_branch_thunk): New.
5229 * arch-utils.c (default_in_indirect_branch_thunk): New.
5230 * i386-tdep: Include x86-tdep.h.
5231 (i386_in_indirect_branch_thunk): New.
5232 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5234 * amd64-tdep: Include x86-tdep.h.
5235 (amd64_in_indirect_branch_thunk): New.
5236 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5238 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5241 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5242 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5243 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5246 2018-04-12 Tom Tromey <tom@tromey.com>
5248 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5249 (rust_evaluate_subexp): Likewise.
5251 2018-04-12 Pedro Alves <palves@redhat.com>
5253 * procfs.c (procfs_detach): Make forward declaration's prototype
5254 match definition's protototype.
5255 (proc_get_LDT_entry): Remove stale do_cleanups call.
5257 2018-04-12 Pedro Alves <palves@redhat.com>
5259 * target.h (target_ops::to_has_exited): Delete.
5260 (target_has_exited): Delete.
5261 * target-delegates.c: Regenerate.
5263 2018-04-11 Pedro Alves <palves@redhat.com>
5265 * target.c (fileio_fh_t::t): Add comment.
5266 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5267 (target_fileio_close): Handle a NULL target.
5268 (invalidate_fileio_fh): New.
5269 (target_close): Call it.
5270 * remote.c (remote_hostio_send_command): No longer check whether
5271 remote_desc is open.
5273 2018-04-11 Pedro Alves <palves@redhat.com>
5275 * target.c (fileio_fh_t): Make it a named struct instead of a
5277 (fileio_fh_t::is_closed): New method.
5278 (DEF_VEC_O (fileio_fh_t)): Remove.
5279 (fileio_fhandles): Now a std::vector.
5280 (is_closed_fileio_fh): Delete.
5281 (acquire_fileio_fd): Adjust. Rename parameters.
5282 (release_fileio_fd): Adjust.
5283 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5284 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5285 (target_fileio_close): Adjust.
5287 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5289 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5292 2018-04-10 Pedro Alves <palves@redhat.com>
5294 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5295 (scoped_finish_thread_state): New class.
5296 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5298 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5299 (fetch_inferior_event, normal_stop): Likewise.
5300 * thread.c (finish_thread_state_cleanup): Delete.
5302 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5303 Pedro Alves <palves@redhat.com>
5305 * value.c: Include "selftest.h" and "common/array-view.h".
5306 (struct range) <operator ==>: New.
5307 (test_ranges_contain): New.
5308 (check_ranges_vector): New.
5309 (test_insert_into_bit_range_vector): New.
5310 (_initialize_values): Register selftests.
5311 * common/array-view.h (operator==, operator!=): New.
5313 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5315 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5317 * inline-frame.c: Include <algorithm>.
5318 (struct inline_state): Add constructor.
5319 (inline_state_s): Remove.
5320 (DEF_VEC_O(inline_state_s)): Remove.
5321 (inline_states): Change type to std::vector.
5322 (find_inline_frame_state): Adjust to std::vector.
5323 (allocate_inline_frame_state): Remove.
5324 (clear_inline_frame_state): Adjust to std::vector.
5325 (skip_inline_frames): Adjust to std::vector.
5327 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5329 * tracepoint.h (struct trace_state_variable): Add constructor.
5330 <name>: Change type to std::string.
5331 * tracepoint.c (tsv_s): Remove.
5332 (DEF_VEC_O(tsv_s)): Remove.
5333 (tvariables): Change to std::vector.
5334 (create_trace_state_variable): Adjust to std::vector.
5335 (find_trace_state_variable): Likewise.
5336 (find_trace_state_variable_by_number): Likewise.
5337 (delete_trace_state_variable): Likewise.
5338 (trace_variable_command): Adjust to std::string.
5339 (delete_trace_variable_command): Likewise.
5340 (tvariables_info_1): Adjust to std::vector.
5341 (save_trace_state_variables): Likewise.
5342 (start_tracing): Likewise.
5343 (merge_uploaded_trace_state_variables): Adjust to std::vector
5345 * target.h (struct target_ops)
5346 <to_download_trace_state_variable>: Pass reference to
5347 trace_state_variable.
5348 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5349 * target-delegates.c: Re-generate.
5350 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5351 (mi_tsv_deleted): Likewise.
5352 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5353 * remote.c (remote_download_trace_state_variable): Change
5354 pointer to reference and adjust.
5355 * make-target-delegates (parse_argtypes): Handle references.
5356 (write_function_header): Likewise.
5357 (munge_type): Likewise.
5359 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5361 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5362 string_view-selftests.c.
5363 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5365 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5366 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5367 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5368 * unittests/basic_string_view/element_access/char/1.cc:
5370 * unittests/basic_string_view/element_access/char/empty.cc:
5372 * unittests/basic_string_view/element_access/char/front_back.cc:
5374 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5375 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5377 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5379 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5381 * unittests/basic_string_view/operations/compare/char/1.cc:
5383 * unittests/basic_string_view/operations/compare/char/13650.cc:
5385 * unittests/basic_string_view/operations/copy/char/1.cc:
5387 * unittests/basic_string_view/operations/data/char/1.cc:
5389 * unittests/basic_string_view/operations/find/char/1.cc:
5391 * unittests/basic_string_view/operations/find/char/2.cc:
5393 * unittests/basic_string_view/operations/find/char/3.cc:
5395 * unittests/basic_string_view/operations/find/char/4.cc:
5397 * unittests/basic_string_view/operations/rfind/char/1.cc:
5399 * unittests/basic_string_view/operations/rfind/char/2.cc:
5401 * unittests/basic_string_view/operations/rfind/char/3.cc:
5403 * unittests/basic_string_view/operations/substr/char/1.cc:
5405 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5406 * unittests/string_view-selftests.c: New file.
5408 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5410 * unittests/basic_string_view/capacity/1.cc: New file.
5411 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5412 * unittests/basic_string_view/cons/char/1.cc: New file.
5413 * unittests/basic_string_view/cons/char/2.cc: New file.
5414 * unittests/basic_string_view/cons/char/3.cc: New file.
5415 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5416 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5417 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5418 * unittests/basic_string_view/element_access/char/1.cc: New file.
5419 * unittests/basic_string_view/element_access/char/2.cc: New file.
5420 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5421 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5422 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5423 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5424 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5425 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5426 * unittests/basic_string_view/include.cc: New file.
5427 * unittests/basic_string_view/inserters/char/1.cc: New file.
5428 * unittests/basic_string_view/inserters/char/2.cc: New file.
5429 * unittests/basic_string_view/inserters/char/3.cc: New file.
5430 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5431 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5432 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5433 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5434 * unittests/basic_string_view/literals/types.cc: New file.
5435 * unittests/basic_string_view/literals/values.cc: New file.
5436 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5437 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5438 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5439 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5440 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5441 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5442 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5443 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5444 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5445 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5446 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5447 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5448 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5449 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5450 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5451 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5452 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5453 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5454 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5455 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5456 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5457 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5458 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5459 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5460 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5461 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5462 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5463 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5464 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5465 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5466 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5467 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5468 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5469 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5470 * unittests/basic_string_view/operators/char/2.cc: New file.
5471 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5472 * unittests/basic_string_view/range_access/char/1.cc: New file.
5473 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5474 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5475 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5476 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5477 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5478 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5479 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5480 * unittests/basic_string_view/typedefs.cc: New file.
5481 * unittests/basic_string_view/types/1.cc: New file.
5483 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5485 * common/gdb_string_view.h: Remove libstdc++ implementation
5486 details, adjust to gdb reality.
5487 * common/gdb_string_view.tcc: Likewise.
5488 * cli/cli-script.c (struct string_view): Remove.
5489 (user_args) <m_args>: Change element type to gdb::string_view.
5490 (user_args::insert_args): Adjust.
5492 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5494 * common/gdb_string_view.h: New file.
5495 * common/gdb_string_view.tcc: New file.
5497 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5499 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5500 * configure: Re-generate.
5502 2018-04-09 Pedro Alves <palves@redhat.com>
5504 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5505 (set_target_gdbarch): Call
5506 gdb::observers::architecture_changed.notify instead of
5507 observer_notify_architecture_changed.
5509 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5511 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5512 (do_restore_current_traceframe_cleanup): Remove.
5513 (restore_current_traceframe_cleanup_dtor): Remove.
5514 (make_cleanup_restore_current_traceframe): Remove.
5515 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5517 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5518 * infrun.c (fetch_inferior_event): Use
5519 scoped_restore_current_traceframe.
5521 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5523 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5525 <n_allocated_type_units>: Remove.
5526 <all_type_units>: Change to std::vector.
5527 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5528 to std::vector change.
5529 (dwarf2_per_objfile::get_cutu): Likewise.
5530 (dwarf2_per_objfile::get_tu): Likewise.
5531 (create_signatured_type_table_from_index): Likewise.
5532 (create_signatured_type_table_from_debug_names): Likewise.
5533 (dw2_symtab_iter_next): Likewise.
5534 (dw2_print_stats): Likewise.
5535 (dw2_expand_all_symtabs): Likewise.
5536 (dw2_expand_marked_cus): Likewise.
5537 (dw2_debug_names_iterator::next): Likewise.
5538 (dwarf2_initialize_objfile): Likewise.
5539 (add_signatured_type_cu_to_table): Likewise.
5540 (create_all_type_units): Likewise.
5541 (add_type_unit): Likewise.
5542 (struct tu_abbrev_offset): Add constructor.
5543 (build_type_psymtabs_1): Adjust to std::vector change.
5544 (print_tu_stats): Likewise.
5545 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5546 (write_debug_names): Likewise.
5548 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5550 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5551 Make an std::vector.
5552 <n_comp_units>: Remove.
5553 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5554 to std::vector change.
5555 (dwarf2_per_objfile::get_cutu): Likewise.
5556 (dwarf2_per_objfile::get_cu): Likewise.
5557 (create_cus_from_index): Likewise.
5558 (create_addrmap_from_index): Likewise.
5559 (create_addrmap_from_aranges): Likewise.
5560 (dwarf2_read_index): Likewise.
5561 (dw2_find_last_source_symtab): Likewise.
5562 (dw2_map_symtabs_matching_filename): Likewise.
5563 (dw2_symtab_iter_next): Likewise.
5564 (dw2_print_stats): Likewise.
5565 (dw2_expand_all_symtabs): Likewise.
5566 (dw2_expand_symtabs_with_fullname): Likewise.
5567 (dw2_expand_marked_cus): Likewise.
5568 (dw2_map_symbol_filenames): Likewise.
5569 (create_cus_from_debug_names): Likewise.
5570 (dwarf2_read_debug_names): Likewise.
5571 (dw2_debug_names_iterator::next): Likewise.
5572 (dwarf2_initialize_objfile): Likewise.
5573 (set_partial_user): Likewise.
5574 (dwarf2_build_psymtabs_hard): Likewise.
5575 (read_comp_units_from_section): Remove arguments, adjust to
5577 (create_all_comp_units): Adjust to std::vector and
5578 read_comp_units_from_section changes.
5579 (dwarf2_find_containing_comp_unit): Adjust to std::vector
5581 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5582 (psyms_seen_size): Likewise.
5583 (write_gdbindex): Likewise.
5584 (write_debug_names): Likewise.
5586 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5588 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5589 with dwarf2_per_objfile.
5590 (create_cus_from_index): Likewise.
5591 (create_signatured_type_table_from_index): Likewise.
5592 (dwarf2_read_index): Likewise.
5593 (dwarf2_initialize_objfile): Likewise.
5594 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
5595 per_cu rather than get_dwarf2_per_objfile.
5597 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5599 * dwarf2read.h (struct signatured_type): Forward declare.
5600 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5602 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5603 (dw2_get_cutu): ...this.
5604 (dwarf2_per_objfile::get_cu): Rename from...
5605 (dw2_get_cu): ...this.
5606 (dwarf2_per_objfile::get_tu): New.
5607 (create_addrmap_from_index): Adjust.
5608 (create_addrmap_from_aranges): Adjust.
5609 (dw2_find_last_source_symtab): Adjust.
5610 (dw2_map_symtabs_matching_filename): Adjust.
5611 (dw2_symtab_iter_next): Adjust.
5612 (dw2_print_stats): Adjust.
5613 (dw2_expand_all_symtabs): Adjust.
5614 (dw2_expand_symtabs_with_fullname): Adjust.
5615 (dw2_expand_marked_cus): Adjust.
5616 (dw_expand_symtabs_matching_file_matcher): Adjust.
5617 (dw2_map_symbol_filenames): Adjust.
5618 (dw2_debug_names_iterator::next): Adjust.
5619 (dwarf2_initialize_objfile): Adjust.
5620 (set_partial_user): Adjust.
5621 (dwarf2_build_psymtabs_hard): Adjust.
5623 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5625 * dwarf2read.c (create_signatured_type_table_from_debug_names):
5626 Remove unused variables.
5627 (dw2_map_symtabs_matching_filename): Likewise.
5628 (dwarf2_record_block_ranges): Likewise.
5629 (dwarf2_read_addr_index): Likewise.
5630 (follow_die_offset): Likewise.
5632 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5634 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5635 to symbol_file_add_main.
5637 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5640 * mi/mi-console.c (do_fputc_async_safe): New.
5641 (mi_console_file::write_async_safe): New.
5642 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5643 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5645 * ui-file.c (ui_file::putstrn): Adjust call to
5646 fputstrn_unfiltered.
5647 * utils.c (printchar): Replace do_fputs and do_fprintf
5648 parameters by do_fputc.
5649 (fputstr_filtered): Adjust call to printchar.
5650 (fputstr_unfiltered): Likewise.
5651 (fputstrn_filtered): Likewise.
5652 (fputstrn_unfiltered): Add do_fputc parameter, pass to
5654 * utils.h (do_fputc_ftype): New typedef.
5655 (fputstrn_unfiltered): Add do_fputc parameter.
5657 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5659 * regformats/i386/i386-avx.dat: Remove.
5661 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5664 * amd64-tdep.c (amd64_none_init_abi): New function.
5665 (amd64_x32_none_init_abi): New function.
5666 (_initialize_amd64_tdep): Register handlers for x86-64 and
5667 x64_32 with GDB_OSABI_NONE.
5668 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5669 GDB_OSABI_NONE osabi.
5671 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5674 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5676 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5677 * osabi.c (gdb_osabi_names): Add "unknown" entry.
5679 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5681 * common/byte-vector.h (char_vector): New type.
5682 * target.h (target_read_alloc): Return
5683 gdb::optional<byte_vector>.
5684 (target_read_stralloc): Return gdb::optional<char_vector>.
5685 (target_get_osdata): Return gdb::optional<char_vector>.
5686 * target.c (target_read_alloc_1): Templatize. Replacement
5687 manual memory management with vector.
5688 (target_read_alloc): Change return type, adjust.
5689 (target_read_stralloc): Change return type, adjust.
5690 (target_get_osdata): Change return type, adjust.
5691 * auxv.c (struct auxv_info) <length>: Remove.
5692 <data>: Change type to gdb::optional<byte_vector>.
5693 (auxv_inferior_data_cleanup): Free auxv_info with delete.
5694 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
5695 (target_auxv_search): Adjust.
5696 (fprint_target_auxv): Adjust.
5697 * avr-tdep.c (avr_io_reg_read_command): Adjust.
5698 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
5699 (linux_make_corefile_notes): Adjust.
5700 * osdata.c (get_osdata): Adjust.
5701 * remote.c (remote_get_threads_with_qxfer): Adjust.
5702 (remote_memory_map): Adjust.
5703 (remote_traceframe_info): Adjust.
5704 (btrace_read_config): Adjust.
5705 (remote_read_btrace): Adjust.
5706 (remote_pid_to_exec_file): Adjust.
5707 * solib-aix.c (solib_aix_get_library_list): Adjust.
5708 * solib-dsbt.c (decode_loadmap): Don't free buf.
5709 (dsbt_get_initial_loadmaps): Adjust.
5710 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
5711 * solib-target.c (solib_target_current_sos): Adjust.
5712 * tracepoint.c (sdata_make_value): Adjust.
5713 * xml-support.c (xinclude_start_include): Adjust.
5714 (xml_fetch_content_from_file): Adjust.
5715 * xml-support.h (xml_fetch_another): Change return type.
5716 (xml_fetch_content_from_file): Change return type.
5717 * xml-syscall.c (xml_init_syscalls_info): Adjust.
5718 * xml-tdesc.c (file_read_description_xml): Adjust.
5719 (fetch_available_features_from_target): Change return type.
5720 (target_fetch_description_xml): Adjust.
5721 (target_read_description_xml): Adjust.
5723 2018-04-06 Tom Tromey <tom@tromey.com>
5725 * value.c (~value): Update.
5726 (struct value) <contents>: Now unique_xmalloc_ptr.
5727 (value_contents_bits_eq, allocate_value_contents)
5728 (value_contents_raw, value_contents_all_raw)
5729 (value_contents_for_printing, value_contents_for_printing_const)
5730 (set_value_enclosing_type): Update.
5732 2018-04-06 Tom Tromey <tom@tromey.com>
5734 * value.c (range_s): Remove typedef, VEC.
5735 (struct range): Add operator<.
5736 (range_lessthan): Remove.
5737 (ranges_contain): Change type.
5739 (struct value) <unavailable, optimized_out>: Now std::vector.
5740 (value_entirely_available)
5741 (value_entirely_covered_by_range_vector)
5742 (value_entirely_unavailable, value_entirely_optimized_out):
5744 (insert_into_bit_range_vector): Change argument type.
5745 (find_first_range_overlap): Likewise.
5746 (struct ranges_and_idx, value_contents_bits_eq)
5747 (require_not_optimized_out, require_available): Update.
5748 (ranges_copy_adjusted): Change argument types.
5749 (value_optimized_out, value_copy, value_fetch_lazy): Update.
5751 2018-04-06 Tom Tromey <tom@tromey.com>
5753 * value.c (~value): Update.
5754 (struct value) <parent>: Now a value_ref_ptr.
5755 (value_parent, set_value_parent, value_address, value_copy):
5758 2018-04-06 Tom Tromey <tom@tromey.com>
5760 * value.c (struct value): Add constructor, destructor, and member
5762 (allocate_value_lazy, value_decref): Update.
5764 2018-04-06 Tom Tromey <tom@tromey.com>
5766 * value.c (struct value) <released, next>: Remove.
5767 (all_values): Now a std::vector.
5768 (allocate_value_lazy): Update.
5769 (value_next): Remove.
5770 (value_mark, value_free_to_mark, release_value)
5771 (value_release_to_mark): Update.
5773 2018-04-06 Tom Tromey <tom@tromey.com>
5775 * value.h (fetch_subexp_value, value_release_to_mark): Update.
5776 (free_value_chain): Remove.
5777 * value.c (free_value_chain): Remove.
5778 (value_release_to_mark): Return a std::vector.
5779 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
5781 (check_condition): Update.
5782 * eval.c (fetch_subexp_value): Change "val_chain" to a
5784 * breakpoint.c (update_watchpoint): Update.
5785 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
5787 2018-04-06 Tom Tromey <tom@tromey.com>
5789 * value.h (free_all_values): Remove.
5790 * value.c (free_all_values): Remove.
5792 2018-04-06 Tom Tromey <tom@tromey.com>
5794 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
5795 (value_history_chain, value_history_count): Remove.
5796 (value_history): New global.
5797 (record_latest_value, access_value_history, show_values)
5798 (preserve_values): Update.
5800 2018-04-06 Tom Tromey <tom@tromey.com>
5802 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
5803 * varobj.c (varobj_set_display_format, varobj_set_value)
5804 (install_default_visualizer, construct_visualizer)
5805 (install_new_value, ~varobj, varobj_get_value_type)
5806 (my_value_of_variable, varobj_editable_p): Update.
5807 * c-varobj.c (c_describe_child, c_value_of_variable)
5808 (cplus_number_of_children, cplus_describe_child): Update.
5809 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
5810 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
5811 (ada_value_of_variable, ada_value_is_changeable_p): Update.
5813 2018-04-06 Tom Tromey <tom@tromey.com>
5815 * printcmd.c (last_examine_address): Change type to
5817 (do_examine, x_command): Update.
5819 2018-04-06 Tom Tromey <tom@tromey.com>
5821 * value.c (release_value): Update.
5822 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
5823 (struct bpstats) <val>: Now a value_ref_ptr.
5824 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5825 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5826 (~watchpoint, print_it_watchpoint, watch_command_1)
5827 (invalidate_bp_value_on_memory_change): Update.
5829 2018-04-06 Tom Tromey <tom@tromey.com>
5831 * varobj.c (varobj_clear_saved_item)
5832 (update_dynamic_varobj_children, install_new_value, ~varobj):
5834 * value.h (value_incref): Move declaration earlier.
5835 (value_decref): Rename from value_free.
5836 (struct value_ref_policy): New.
5837 (value_ref_ptr): New typedef.
5838 (struct value_deleter): Remove.
5839 (gdb_value_up): Remove typedef.
5840 (release_value): Change return type.
5841 (release_value_or_incref): Remove.
5842 * value.c (set_value_parent): Update.
5843 (value_incref): Change return type.
5844 (value_decref): Rename from value_free.
5845 (value_free_to_mark, free_all_values, free_value_chain): Update.
5846 (release_value): Return value_ref_ptr.
5847 (release_value_or_incref): Remove.
5848 (record_latest_value, set_internalvar, clear_internalvar):
5850 * stack.c (info_frame_command): Don't call value_free.
5851 * python/py-value.c (valpy_dealloc, valpy_new)
5852 (value_to_value_object): Update.
5853 * printcmd.c (do_examine): Update.
5854 * opencl-lang.c (lval_func_free_closure): Update.
5855 * mi/mi-main.c (register_changed_p): Don't call value_free.
5856 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
5857 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
5858 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
5860 * guile/scm-value.c (vlscm_free_value_smob)
5861 (vlscm_scm_from_value): Update.
5862 * frame.c (frame_register_unwind, frame_unwind_register_signed)
5863 (frame_unwind_register_unsigned, get_frame_register_bytes)
5864 (put_frame_register_bytes): Don't call value_free.
5865 * findvar.c (address_from_register): Don't call value_free.
5866 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
5867 * dwarf2loc.c (entry_data_value_free_closure)
5868 (value_of_dwarf_reg_entry, free_pieced_value_closure)
5869 (dwarf2_evaluate_loc_desc_full): Update.
5870 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5871 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5872 (~watchpoint, watch_command_1)
5873 (invalidate_bp_value_on_memory_change): Update.
5874 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
5876 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
5879 * warning.m4: Add -Wno-error=deprecated-register.
5880 * configure: Re-generate.
5882 2018-04-05 Tom Tromey <tom@tromey.com>
5884 * linespec.h: Remove include of "vec.h".
5886 2018-04-05 Tom Tromey <tom@tromey.com>
5888 * linespec.c (typep): Remove typedef.
5889 (find_methods, find_superclass_methods): Take a std::vector.
5890 (find_method): Use std::vector.
5892 2018-04-05 Tom Tromey <tom@tromey.com>
5894 * utils.c (compare_strings): Remove.
5895 * utils.h (compare_strings): Remove.
5896 * objc-lang.h (find_imps): Update.
5897 * objc-lang.c (find_methods): Take a std::vector.
5898 (uniquify_strings, find_imps): Likewise.
5899 * linespec.c (find_methods): Take a std::vector.
5900 (decode_objc): Use std::vector.
5901 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5903 (find_method, find_function_symbols): Use std::vector.
5905 2018-04-05 Tom Tromey <tom@tromey.com>
5907 * completer.c (completion_tracker::completion_tracker): Remove
5909 (completion_tracker::discard_completions): Likewise.
5910 * breakpoint.c (ambiguous_names_p): Remove cast.
5911 * ada-lang.c (_initialize_ada_language): Remove cast.
5912 * utils.h (streq): Update.
5913 (streq_hash): Add new declaration.
5914 * utils.c (streq): Return bool.
5915 (streq_hash): New function.
5917 2018-04-05 Tom Tromey <tom@tromey.com>
5919 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5920 Remove a string copy.
5922 2018-04-05 Tom Tromey <tom@tromey.com>
5924 * linespec.c (filter_results): Use std::vector.
5925 (decode_line_2, decode_line_full): Update.
5927 2018-04-05 Tom Tromey <tom@tromey.com>
5929 * linespec.c (canonical_to_fullform): Return std::string.
5930 (filter_results): Update.
5931 (struct decode_line_2_item): Add constructor.
5932 <fullform, displayform>: Now std::string.
5933 (decode_line_2_compare_items): Now a std::sort comparator.
5934 (decode_line_2): Update.
5936 2018-04-05 Tom Tromey <tom@tromey.com>
5938 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
5939 (unexpected_linespec_error): Update.
5940 (linespec_parse_basic, parse_linespec): Update.
5942 2018-04-05 Tom Tromey <tom@tromey.com>
5944 * linespec.c (linespec_parse_basic): Reindent.
5946 2018-04-05 Tom Tromey <tom@tromey.com>
5948 * minsyms.h (iterate_over_minimal_symbols): Update.
5949 * minsyms.c (iterate_over_minimal_symbols): Take a
5951 * linespec.c (struct collect_minsyms): Remove.
5952 (compare_msyms): Now a std::sort comparator.
5953 (add_minsym): Add parameters.
5954 (search_minsyms_for_name): Update. Use std::vector.
5956 2018-04-03 Tom Tromey <tom@tromey.com>
5958 * mipsread.c (read_alphacoff_dynamic_symtab): Use
5961 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5963 * MAINTAINERS (Write After Approval): Add Weimin Pan.
5965 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5968 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
5969 printing static type.
5971 2018-04-01 Tom Tromey <tom@tromey.com>
5973 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
5974 (rs6000_xfer_shared_libraries): Update.
5976 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5978 * common/gdb_vecs.h (char_ptr): Remove.
5979 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
5981 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5983 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
5985 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
5987 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5989 * tracepoint.h (struct uploaded_tp): Initialize fields.
5990 <actions, step_actions, cmd_strings>: Change type to
5991 std::vector<char *>.
5992 * tracepoint.c (get_uploaded_tp): Allocate with new.
5993 (free_uploaded_tps): Free with delete.
5994 (parse_tracepoint_definition): Adjust to std::vector change.
5995 * breakpoint.c (read_uploaded_action): Likewise.
5996 (create_tracepoint_from_upload): Likewise.
5997 * ctf.c (ctf_write_uploaded_tp): Likewise.
5998 (SET_ARRAY_FIELD): Likewise.
5999 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6001 2018-03-30 Tom Tromey <tom@tromey.com>
6003 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6005 (svr4_keep_data_in_core): Update.
6006 (svr4_read_so_list): Update.
6008 2018-03-30 Tom Tromey <tom@tromey.com>
6010 * windows-nat.c (handle_output_debug_string, handle_exception):
6012 * target.h (target_read_string): Update.
6013 * target.c (target_read_string): Change "string" to
6015 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6017 * solib-frv.c (frv_current_sos): Update.
6018 * solib-dsbt.c (dsbt_current_sos): Update.
6019 * solib-darwin.c (darwin_current_sos): Update.
6020 * linux-thread-db.c (inferior_has_bug): Update.
6021 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6022 Update. Remove alloca.
6023 * ada-lang.c (ada_main_name): Update.
6025 2018-03-30 Tom Tromey <tom@tromey.com>
6027 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6028 (struct dwo_file_deleter): New.
6029 (dwo_file_up): New typedef.
6030 (open_and_init_dwo_file): Use dwo_file_up.
6031 (free_dwo_file_cleanup): Remove.
6033 2018-03-30 Tom Tromey <tom@tromey.com>
6035 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6036 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6038 2018-03-30 Tom Tromey <tom@tromey.com>
6040 * dwarf2read.c (class free_cached_comp_units): New class.
6041 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6042 (free_cached_comp_units): Remove function.
6044 2018-03-30 Tom Tromey <tom@tromey.com>
6046 * utils.h (make_cleanup_unpush_target): Remove.
6047 * inf-ptrace.c (struct target_unpusher): New.
6048 (target_unpush_up) New typedef.
6049 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6051 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6053 2018-03-27 Tom Tromey <tom@tromey.com>
6055 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6057 2018-03-27 Pedro Alves <palves@redhat.com>
6058 Tom Tromey <tom@tromey.com>
6060 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6061 destructor. Now a class.
6062 (gdb_readline_wrapper_cleanup): Remove function.
6063 (gdb_readline_wrapper): Remove cleanups.
6065 2018-03-27 Tom Tromey <tom@tromey.com>
6067 * typeprint.h (struct type_print_options) <local_typedefs,
6068 global_typedefs>: Remove "struct" keyword.
6069 (class typedef_hash_table): New class.
6070 (recursively_update_typedef_hash, add_template_parameters)
6071 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6072 (find_typedef_in_hash): Don't declare.
6073 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6074 (typedef_hash_table::recursively_update): Rename from
6075 recursively_update_typedef_hash. Now a member.
6076 (typedef_hash_table::add_template_parameters): Rename from
6077 add_template_parameters. Now a member.
6078 (typedef_hash_table::typedef_hash_table): Now a constructor;
6079 rename from create_typedef_hash.
6080 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6081 rename from free_typedef_hash.
6082 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6083 (do_free_global_table): Remove.
6084 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6085 from copy_type_recursive.
6086 (create_global_typedef_table): Remove.
6087 (typedef_hash_table::find_global_typedef): Now a member of
6089 (typedef_hash_table::find_typedef): Rename from
6090 find_typedef_in_hash; now a member.
6091 (whatis_exp): Update.
6092 * extension.h (struct ext_lang_type_printers): Add constructor and
6094 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6096 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6097 Now a constructor; rename from start_ext_lang_type_printers.
6098 (ext_lang_type_printers): Now a destructor; rename from
6099 free_ext_lang_type_printers.
6100 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6102 (c_type_print_base_struct_union): Update. Remove cleanups.
6104 2018-03-27 Tom Tromey <tom@tromey.com>
6106 * dwarf-index-write.c: Include <cmath>.
6108 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6110 * NEWS: Add entry describing new "set|show varsize-limit" command.
6111 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6113 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6116 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6118 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6120 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6121 * dwarf-index-common.c: New file.
6122 * dwarf-index-common.h: New file.
6123 * dwarf-index-write.c: New file.
6124 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6125 (struct dwarf2_section_info): Move from here.
6126 (dwarf2_section_info_def): Likewise.
6127 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6128 (offset_type): Likewise.
6129 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6130 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6131 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6132 (byte_swap): Likewise.
6133 (MAYBE_SWAP): Likewise.
6134 (dwarf2_per_cu_ptr): Likewise.
6135 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6136 (struct tu_stats): Likewise.
6137 (struct dwarf2_per_objfile): Likewise.
6138 (struct dwarf2_per_cu_data): Likewise.
6139 (struct signatured_type): Likewise.
6140 (sig_type_ptr): Likewise.
6141 (DEF_VEC_P (sig_type_ptr)): Likewise.
6142 (INDEX4_SUFFIX): Likewise.
6143 (INDEX5_SUFFIX): Likewise.
6144 (DEBUG_STR_SUFFIX): Likewise.
6145 (dwarf2_read_section): Make non-static.
6146 (mapped_index_string_hash): Move from here.
6147 (dwarf5_djb_hash): Likewise.
6148 (file_write): Likewise.
6149 (class data_buf): Likewise.
6150 (struct symtab_index_entry): Likewise.
6151 (struct mapped_symtab): Likewise.
6152 (find_slot): Likewise.
6153 (hash_expand): Likewise.
6154 (add_index_entry): Likewise.
6155 (uniquify_cu_indices): Likewise.
6156 (class c_str_view): Likewise.
6157 (class c_str_view_hasher): Likewise.
6158 (class vector_hasher): Likewise.
6159 (write_hash_table): Likewise.
6160 (psym_index_map): Likewise.
6161 (struct addrmap_index_data): Likewise.
6162 (add_address_entry): Likewise.
6163 (add_address_entry_worker): Likewise.
6164 (write_address_map): Likewise.
6165 (symbol_kind): Likewise.
6166 (write_psymbols): Likewise.
6167 (struct signatured_type_index_data): Likewise.
6168 (write_one_signatured_type): Likewise.
6169 (recursively_count_psymbols): Likewise.
6170 (recursively_write_psymbols): Likewise.
6171 (class debug_names): Likewise.
6172 (check_dwarf64_offsets): Likewise.
6173 (psyms_seen_size): Likewise.
6174 (write_gdbindex): Likewise.
6175 (write_debug_names): Likewise.
6176 (assert_file_size): Likewise.
6177 (write_psymtabs_to_index): Likewise.
6178 (save_gdb_index_command): Likewise.
6179 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6181 * dwarf2read.h: New file.
6183 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6186 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6187 symbol name if the CU's language stores symbol names in linkage
6189 * language.h (struct language_defn)
6190 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6191 all instances of this struct.
6193 2018-03-26 Tom Tromey <tom@tromey.com>
6195 * stack.c (backtrace_command_1): Remove verbose code.
6197 2018-03-26 Tom Tromey <tom@tromey.com>
6199 * python/py-framefilter.c (py_print_type): Don't catch
6200 exceptions. Return void.
6201 (py_print_value): Likewise.
6202 (py_print_single_arg): Likewise.
6203 (enumerate_args): Don't catch exceptions.
6204 (py_print_args): Likewise.
6205 (py_print_frame): Likewise.
6206 (gdbpy_apply_frame_filter): Catch exceptions here.
6208 2018-03-26 Tom Tromey <tom@tromey.com>
6210 * stack.c (_initialize_stack): Remove trailing newlines from help
6211 text. Add "Usage" line to "backtrace" help.
6213 2018-03-26 Tom Tromey <tom@tromey.com>
6216 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6218 2018-03-26 Tom Tromey <tom@tromey.com>
6220 * python/py-framefilter.c (py_print_single_arg): Return
6221 EXT_LANG_BT_ERROR from catch.
6223 2018-03-26 Tom Tromey <tom@tromey.com>
6226 * stack.c (backtrace_command_1): Move some code into no-filters
6229 2018-03-26 Tom Tromey <tom@tromey.com>
6231 * python/py-framefilter.c (throw_quit_or_print_exception): New
6233 (gdbpy_apply_frame_filter): Use it.
6235 2018-03-26 Tom Tromey <tom@tromey.com>
6238 * python/py-framefilter.c (py_print_type, py_print_value)
6239 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6242 2018-03-26 Tom Tromey <tom@tromey.com>
6244 * python/py-framefilter.c (enumerate_args): Use
6245 gdb::unique_xmalloc_ptr.
6247 2018-03-26 Tom Tromey <tom@tromey.com>
6249 * python/py-framefilter.c (py_print_frame): Return
6251 (gdbpy_apply_frame_filter): Update comment.
6252 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6254 <EXT_LANG_BT_NO_FILTERS>: Change value.
6256 2018-03-26 Tom Tromey <tom@tromey.com>
6259 * stack.c (backtrace_command): Parse "hide" argument.
6260 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6261 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6264 2018-03-26 Tom Tromey <tom@tromey.com>
6266 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6268 (backtrace_command): Remove "fulltrace", add "flags".
6270 2018-03-26 Tom Tromey <tom@tromey.com>
6272 * stack.c (backtrace_command): Rewrite command line parsing.
6274 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6276 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6278 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6280 * filename-seen-cache.h: Add include guard.
6282 2018-03-26 Keith Seitz <keiths@redhat.com>
6284 * symfile.c (place_section): Remove "struct" from section_addr_info
6286 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6287 "struct" keyword from section_addr_info.
6289 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6291 * regformats/regdef.h (reg): Add constructors.
6293 2018-03-25 Pedro Alves <palves@redhat.com>
6295 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6296 if then/else bodies in var_func_name extraction.
6298 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6300 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6301 lookup_minimal_symbol() to find symbol entry.
6302 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6304 2018-03-23 Keith Seitz <keiths@redhat.com>
6307 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6308 nested type definitions for C++, too.
6310 2018-03-23 Tom Tromey <tom@tromey.com>
6312 * machoread.c (struct oso_el): Add a constructor. Don't define as
6314 (macho_register_oso): Remove.
6315 (macho_symtab_read): Take a std::vector.
6316 (oso_el_compare_name): Now a std::sort comparator.
6317 (macho_symfile_read_all_oso): Take a std::vector.
6318 (macho_symfile_read): Use std::vector. Remove cleanups.
6320 2018-03-22 Tom Tromey <tom@tromey.com>
6322 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6323 (record_full_goto_bookmark): Use std::string.
6325 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6328 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6331 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6333 * rs6000-tdep.c (store_insn_p): New function.
6334 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6335 and cr_reg to their unshifted values. Use store_insn_p to
6336 match LR saves using either R1 or fdata->alloca_reg. Use
6337 store_insn_p to match CR saves. Set alloca_reg_offset
6338 when alloca_reg and framep are set. Remove lr_reg shift
6339 when assigning to fdata->lr_register.
6341 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6343 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6344 command line args instead of emitting a warning.
6346 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6348 * tracepoint.h (struct static_tracepoint_marker): Initialize
6349 fields, define default constructor, move constructor and move
6350 assignment, disable the rest.
6351 <str_id, extra>: Make std::string.
6352 (release_static_tracepoint_marker): Remove.
6353 (free_current_marker): Remove.
6354 * tracepoint.c (free_current_marker): Remove.
6355 (parse_static_tracepoint_marker_definition): Adjust to
6356 std::string, use new hex2str overload.
6357 (release_static_tracepoint_marker): Remove.
6358 (print_one_static_tracepoint_marker): Get marker by reference
6359 and adjust to std::string.
6360 (info_static_tracepoint_markers_command): Adjust to std::vector
6362 * target.h (static_tracepoint_marker_p): Remove typedef.
6363 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6364 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6366 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6368 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6369 (target_debug_print_std_vector_static_tracepoint_marker): New.
6370 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6372 (target_debug_print_static_tracepoint_marker_p): ... this.
6373 * target-delegates.c: Re-generate.
6374 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6376 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6377 (decode_static_tracepoint_spec): Adjust to std::vector.
6378 (tracepoint_print_one_detail): Adjust to std::string.
6379 (strace_marker_decode_location): Adjust to std::string.
6380 (update_static_tracepoint): Adjust to std::string, remove call
6381 to release_static_tracepoint_marker.
6382 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6383 Adjust to std::vector.
6384 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6385 (remote_static_tracepoint_markers_by_strid): Adjust to
6387 * common/rsp-low.h (hex2str): New overload with explicit count
6389 * common/rsp-low.c (hex2str): New overload with explicit count
6391 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6392 (_initialize_rsp_low_selftests): Add test_hex2str test.
6393 * unittests/tracepoint-selftests.c
6394 (test_parse_static_tracepoint_marker_definition): Adjust to
6397 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6399 * tracepoint.c (parse_static_tracepoint_marker_definition):
6400 Consider case where the definition is followed by more
6402 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6403 tracepoint-selftests.c.
6404 * unittests/tracepoint-selftests.c: New.
6406 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6408 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6411 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6413 * symtab.c (find_pc_sect_line): fixed indentation.
6415 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6417 * symtab.c (find_pc_sect_line): now uses binary search.
6419 2018-03-19 Tom Tromey <tom@tromey.com>
6421 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6424 2018-03-19 Pedro Alves <palves@redhat.com>
6425 Tom Tromey <tom@tromey.com>
6427 * unittests/observable-selftests.c: New file.
6428 * common/observable.h: New file.
6429 * observable.h: New file.
6430 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6431 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6432 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6433 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6434 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6435 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6436 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6437 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6438 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6439 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6440 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6441 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6442 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6443 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6444 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6445 tui/tui-interp.c, valops.c: Update all users.
6446 * tui/tui-hooks.c (tui_bp_created_observer)
6447 (tui_bp_deleted_observer, tui_bp_modified_observer)
6448 (tui_inferior_exit_observer, tui_before_prompt_observer)
6449 (tui_normal_stop_observer, tui_register_changed_observer):
6451 (tui_observers_token): New global.
6452 (attach_or_detach, tui_attach_detach_observers): New functions.
6453 (tui_install_hooks, tui_remove_hooks): Use
6454 tui_attach_detach_observers.
6455 * record-btrace.c (record_btrace_thread_observer): Remove.
6456 (record_btrace_thread_observer_token): New global.
6457 * observer.sh: Remove.
6458 * observer.c: Rename to observable.c.
6459 * observable.c (namespace gdb_observers): Define new objects.
6460 (observer_debug): Move into gdb_observers namespace.
6461 (struct observer, struct observer_list, xalloc_observer_list_node)
6462 (xfree_observer_list_node, generic_observer_attach)
6463 (generic_observer_detach, generic_observer_notify): Remove.
6464 (_initialize_observer): Update.
6465 Don't include observer.inc.
6466 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6467 (clean mostlyclean): Likewise.
6468 (observer.h, observer.inc): Remove targets.
6469 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6470 (COMMON_SFILES): Use observable.c, not observer.c.
6471 * .gitignore: Remove observer.h.
6473 2018-03-18 Tom Tromey <tom@tromey.com>
6475 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6477 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6479 2018-03-17 Tom Tromey <tom@tromey.com>
6481 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6483 2018-03-17 Tom Tromey <tom@tromey.com>
6485 * target.c (class scoped_target_fd): New.
6486 (target_fileio_close_cleanup): Remove.
6487 (target_fileio_read_alloc_1): Use scoped_target_fd.
6489 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6491 * silent-rules.mk: New.
6492 * Makefile.in: Include silent-rules.mk
6493 (srcdir, VPATH, top_srcdir): Move up.
6494 (COMPILE): Add ECHO_CXX.
6495 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6496 (init.c): Add ECHO_INIT_C.
6497 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6498 (version.c): Add ECHO_GEN.
6499 (printcmd.o): Add ECHO_CXX.
6500 (target-float.o): Add ECHO_CXX.
6501 (ada-exp.o): Add ECHO_CXX.
6502 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6503 (insight$(EXEEXT)): Add ECHO_CXXLD.
6504 * gnulib/configure.ac: Add AM_SILENT_RULES.
6505 * gnulib/aclocal.m4: Re-generate.
6506 * gnulib/configure: Re-generate.
6507 * gnulib/import/Makefile.in: Re-generate.
6509 2018-03-16 Tom Tromey <tom@tromey.com>
6511 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6512 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6513 * utils.c (do_free_section_addr_info)
6514 (make_cleanup_free_section_addr_info): Remove.
6515 * symfile.h (struct other_sections): Add constructor.
6516 (struct section_addr_info): Remove.
6517 (section_addr_info): New typedef.
6518 (struct sym_fns) <sym_offsets>: Change type of parameter.
6519 (build_section_addr_info_from_objfile)
6520 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6521 (default_symfile_offsets, symbol_file_add)
6522 (symbol_file_add_from_bfd)
6523 (build_section_addr_info_from_section_table): Update.
6524 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6525 * symfile.c (alloc_section_addr_info): Remove.
6526 (build_section_addr_info_from_section_table): Change return type.
6528 (build_section_addr_info_from_bfd)
6529 (build_section_addr_info_from_objfile): Likewise.
6530 (free_section_addr_info): Remove.
6531 (relative_addr_info_to_section_offsets): Change type of "addrs".
6532 (addrs_section_compar): Now a std::sort comparator.
6533 (addrs_section_sort): Change return type.
6534 (addr_info_make_relative): Change type of "addrs". Update.
6535 (default_symfile_offsets, syms_from_objfile_1)
6536 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6537 (symbol_file_add_separate): Update.
6538 (symbol_file_add): Change type of "addrs". Update.
6539 (add_symbol_file_command): Update. Remove cleanups.
6540 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6542 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6543 * solib.c (solib_read_symbols): Update.
6544 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6545 * machoread.c (macho_symfile_offsets): Update.
6546 * jit.c (jit_bfd_try_read_symtab): Update.
6548 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6550 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6551 unittests/utils-selftests.c.
6552 * unittests/utils-selftests.c: New file.
6554 2018-03-14 Tom Tromey <tom@tromey.com>
6557 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6560 2018-03-14 Tom Tromey <tom@tromey.com>
6563 * printcmd.c (printf_pointer): Allow "-" in format.
6565 2018-03-14 Tom Tromey <tom@tromey.com>
6567 * printcmd.c (_initialize_printcmd): Add usage to printf.
6569 2018-03-14 Yao Qi <qiyao@sourceware.org>
6571 * MAINTAINERS: Update my email address.
6573 2018-03-13 Tom Tromey <tom@tromey.com>
6575 * machoread.c (macho_check_dsym): Change filenamep to a
6577 (macho_symfile_read): Update.
6578 * symfile.c (load_command): Use std::string.
6580 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
6582 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6583 to error message string.
6584 (riscv_register_name): Use xsnprintf instead of sprintf.
6585 (riscv_insn::fetch_instruction): Use gdb_assert instead of
6587 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6589 (riscv_push_dummy_call): Likewise.
6591 2018-03-12 Tom Tromey <tom@tromey.com>
6593 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6594 Use gdb::byte_vector.
6595 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6597 2018-03-12 Yao Qi <yao.qi@linaro.org>
6599 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6600 parameter type to readable_regcache.
6601 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6604 2018-03-11 Tom Tromey <tom@tromey.com>
6606 * dwarf2read.c (struct nextfield): Add initializers.
6607 (struct nextfnfield): Remove.
6608 (struct fnfieldlist): Add initializers. Remove "length" and
6609 "head", use std::vector.
6610 (struct decl_field_list): Remove.
6611 (struct field_info): Add initializers.
6612 <fields, baseclasses>: Now std::vector.
6613 <nbaseclasses, nfnfields, typedef_field_list_count,
6614 nested_types_list_count>: Remove.
6615 (dwarf2_add_field, dwarf2_add_type_defn)
6616 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6617 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6618 (process_structure_scope): Update.
6620 2018-03-11 Tom Tromey <tom@tromey.com>
6622 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6623 for use by std::sort.
6624 (build_type_psymtabs_1): Use std::vector.
6626 2018-03-09 Eli Zaretskii <eliz@gnu.org>
6628 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6629 and LIBMPFR in the printed configuration.
6631 2018-03-08 Tom Tromey <tom@tromey.com>
6633 * source.c (get_filename_and_charpos): Use scoped_fd.
6634 * nto-procfs.c (procfs_open_1): Use scoped_fd.
6635 (procfs_pidlist): Likewise.
6636 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6637 (iterate_over_mappings): Likewise.
6639 2018-03-08 Tom Tromey <tom@tromey.com>
6641 * infcall.c (struct call_return_meta_info)
6642 <stack_temporaries_enabled>: Remove.
6643 (get_call_return_value, call_function_by_hand_dummy): Update.
6644 * thread.c (disable_thread_stack_temporaries): Remove.
6645 (enable_thread_stack_temporaries): Remove.
6646 (thread_stack_temporaries_enabled_p): Return bool.
6647 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6648 (get_last_thread_stack_temporary): Update.
6649 * eval.c (evaluate_subexp): Update.
6650 * gdbthread.h (class enable_thread_stack_temporaries): Now a
6651 class, not a function.
6652 (value_ptr, value_vec): Remove typedefs.
6653 (class thread_info) <stack_temporaries_enabled>: Now bool.
6654 <stack_temporaries>: Now a std::vector.
6655 (thread_stack_temporaries_enabled_p)
6656 (value_in_thread_stack_temporaries): Return bool.
6658 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
6660 * remote.c (putpkt_binary): Fix omitted bytes reporting.
6661 (getpkt_or_notif_sane_1): Likewise.
6663 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6665 * build-id.c (build_id_to_debug_bfd): Use std::string.
6667 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6669 * build-id.c (find_separate_debug_file_by_buildid): Return
6671 * build-id.h (find_separate_debug_file_by_buildid): Return
6673 * coffread.c (coff_symfile_read): Adjust to std::string.
6674 * elfread.c (elf_symfile_read): Adjust to std::string.
6675 * symfile.c (separate_debug_file_exists): Change parameter to
6677 (find_separate_debug_file): Return std::string.
6678 (find_separate_debug_file_by_debuglink): Return std::string.
6679 * symfile.h (find_separate_debug_file_by_debuglink): Return
6682 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6684 * common/xml-utils.c (xml_escape_text): Move code to...
6685 (xml_escape_text_append): ... this new function.
6686 * common/xml-utils.h (xml_escape_text_append): New declaration.
6687 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6689 (_initialize_xml_utils): register test_xml_escape_text_append as
6692 2018-03-07 Alan Hayward <alan.hayward@arm.com>
6694 * defs.h: Remove MAX_REGISTER_SIZE.
6695 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
6697 * python/py-unwind.c (pyuw_sniffer): Likewise.
6699 2018-03-07 Tom Tromey <tom@tromey.com>
6701 * linux-tdep.c (linux_info_proc): Update.
6702 * target.h (struct target_ops) <to_fileio_readlink>: Return
6704 (target_fileio_readlink): Return optional<string>.
6705 * remote.c (remote_hostio_readlink): Return optional<string>.
6706 * inf-child.c (inf_child_fileio_readlink): Return
6708 * target.c (target_fileio_readlink): Return optional<string>.
6710 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
6712 * regcache.c (cooked_read_test): Add riscv to the list of
6713 architectures that have a save_reggroup.
6715 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
6717 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
6718 value is not a dynamic class object.
6720 2018-03-06 Tom Tromey <tom@tromey.com>
6722 * rust-exp.y: Formatting fixes.
6724 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6726 * riscv-tdep.c (riscv_register_name): Remove target description
6728 (riscv_gdbarch_init): Remove target description check.
6730 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6732 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
6734 * riscv-tdep.h: Likewise.
6736 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6738 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
6739 (riscv_pseudo_register_write): Delete.
6740 (riscv_gdbarch_init): Remove all use of pseudo registers.
6742 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6744 * record-btrace.c (btrace_print_lines): Replace cleanup
6745 parameter with RAII equivalents.
6746 (btrace_insn_history): Replace cleanup with RAII equivalents.
6747 * ui-out.h (make_cleanup_ui_out_list_begin_end,
6748 make_cleanup_ui_out_tuple_begin_end): Remove.
6749 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
6750 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
6751 make_cleanup_ui_out_list_begin_end): Remove.
6753 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6755 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
6756 parameter types to std::vector. Use bool.
6757 (record_btrace_wait): Replace VEC(tp_t) with
6758 std::vector<thread_info *>.
6759 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
6761 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6763 * record-btrace.c (record_btrace_disable_callback): Remove.
6764 (struct scoped_btrace_disable): New.
6765 (record_btrace_open): Use scoped_btrace_disable.
6767 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6769 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
6770 reading values from registers.
6772 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6774 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
6777 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6779 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
6780 change parameter type. Use GDB's print functions, and use
6781 core_addr_to_string where appropriate.
6782 (riscv_push_dummy_call): Use core_addr_to_string where
6783 appropriate, update call to riscv_print_arg_location, and reindent
6785 (riscv_return_value): Update call to riscv_print_arg_location.
6787 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6788 Tim Newsome <tim@sifive.com>
6789 Albert Ou <a0u@eecs.berkeley.edu>
6790 Darius Rad <darius@bluespec.com>
6792 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
6793 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
6794 (ALLDEPFILES): Add riscv-tdep.c
6795 * configure.tgt: Add riscv support.
6796 * riscv-tdep.c: New file.
6797 * riscv-tdep.h: New file.
6798 * NEWS: Mention new target.
6799 * MAINTAINERS: Add entry for riscv.
6801 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6803 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
6804 fields within aggregates.
6806 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
6808 * record-btrace.c (btrace_print_lines): Change type of flags to
6809 gdb_disassembly_flags.
6811 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6813 * fbsd-nat.c: Include "inf-ptrace.h".
6814 (USE_SIGTRAP_SIGINFO): Conditionally define.
6815 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
6816 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
6817 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
6819 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
6821 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
6823 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
6824 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
6825 "supports_stopped_by_hw_breakpoint" target methods.
6827 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6829 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
6830 * fbsd-nat.c (debug_fbsd_nat): New variable.
6831 (show_fbsd_nat_debug): New function.
6832 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
6833 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
6835 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6837 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
6838 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
6840 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
6841 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
6844 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6846 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
6847 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
6849 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6851 * charset.c (struct charset_vector): New.
6852 (charsets): Change type to charset_vector.
6853 (find_charset_names): Adjust.
6855 (_initialize_charset): Adjust.
6857 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6859 * progspace.h (struct program_space) <deleted_solibs>: Change
6860 type to std::vector<std::string>.
6861 * progspace.c (clear_program_space_solib_cache): Adjust.
6862 * breakpoint.c (print_solib_event): Adjust.
6863 (check_status_catch_solib): Adjust.
6864 * solib.c (update_solib_list): Adjust.
6865 * ui-out.h (class ui_out) <field_string>: New overload.
6866 * ui-out.c (ui_out::field_string): New overload.
6868 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6870 * progspace.h (struct program_space): Add constructor and
6871 destructor, initialize fields.
6872 (add_program_space): Remove.
6873 * progspace.c (add_program_space): Rename to...
6874 (program_space::program_space): ... this.
6875 (release_program_space): Rename to...
6876 (program_space::~program_space): ... this.
6877 (delete_program_space): Use delete to delete program_space.
6878 (initialize_progspace): Use new to allocate program_space.
6879 * inferior.c (add_inferior_with_spaces): Likewise.
6880 (clone_inferior_command): Likewise.
6881 * infrun.c (follow_fork_inferior): Likewise.
6882 (handle_vfork_child_exec_or_exit): Likewise.
6884 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6886 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
6887 (delim_string_to_char_ptr_vec): Return std::vector of
6888 gdb::unique_xmalloc_ptr.
6889 (dirnames_to_char_ptr_vec_append): Take std::vector of
6890 gdb::unique_xmalloc_ptr.
6891 (dirnames_to_char_ptr_vec): Return std::vector of
6892 gdb::unique_xmalloc_ptr.
6893 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6894 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6895 (delim_string_to_char_ptr_vec): Return an std::vector of
6896 gdb::unique_xmalloc_ptr, adjust the code.
6897 (dirnames_to_char_ptr_vec_append): Take an std::vector of
6898 gdb::unique_xmalloc_ptr, adjust the code.
6899 (dirnames_to_char_ptr_vec): Return an std::vector of
6900 gdb::unique_xmalloc_ptr, adjust the code.
6901 * auto-load.c (auto_load_safe_path_vec): Change type to
6902 std::vector of gdb::unique_xmalloc_ptr.
6903 (auto_load_expand_dir_vars): Return an std::vector of
6904 gdb::unique_xmalloc_ptr, adjust the code.
6905 (auto_load_safe_path_vec_update): Adjust.
6906 (filename_is_in_auto_load_safe_path_vec): Adjust.
6907 (auto_load_objfile_script_1): Adjust.
6908 * build-id.c (build_id_to_debug_bfd): Adjust.
6909 * linux-thread-db.c (thread_db_load_search): Adjust.
6910 * source.c (add_path): Adjust.
6912 * symfile.c (find_separate_debug_file): Adjust.
6913 * utils.c (do_free_char_ptr_vec): Remove.
6914 (make_cleanup_free_char_ptr_vec): Remove.
6916 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
6919 * common/pathstuff.c: Conditionally include "<windows.h>".
6921 2018-03-01 Georg Sauthoff <mail@georg.so>
6924 * gcore.in: Quote variables and switch interpreter to bash.
6926 2018-03-01 Tom Tromey <tom@tromey.com>
6928 * dwarf2read.c (alloc_discriminant_info): Fix default_index
6929 assertion. Add assertion for discriminant_index.
6930 (quirk_rust_enum): Use correct base type name in univariant case.
6932 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
6934 * record.c (get_call_history_modifiers): Return a
6936 (cmd_record_call_history): Adjust.
6937 * record-btrace.c (record_btrace_call_history): Adjust.
6938 (record_btrace_call_history_range): Adjust.
6939 (record_btrace_call_history_from): Adjust.
6940 * target-debug.h (target_debug_print_record_print_flags): New.
6941 * target-delegates.c: Re-generate.
6942 * target.c (target_call_history): Change flags type.
6943 (target_call_history_from): Likewise.
6944 (target_call_history_range): Likewise.
6945 * target.h (struct target_ops) <target_call_history>: Likewise.
6946 (target_call_history_from): Likewise.
6947 (target_call_history_range): Likewise.
6949 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6950 Simon Marchi <simon.marchi@polymtl.ca>
6952 * common/common-utils.c: Include "sys/stat.h".
6953 (is_regular_file): Move here from "source.c"; change return
6955 * common/common-utils.h (is_regular_file): New prototype.
6956 * common/pathstuff.c (contains_dir_separator): New function.
6957 * common/pathstuff.h (contains_dir_separator): New prototype.
6958 * source.c: Don't include "sys/stat.h".
6959 (is_regular_file): Move to "common/common-utils.c".
6961 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6963 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
6964 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
6965 * auto-load.c: Include "common/pathstuff.h".
6966 * common/common-def.h (current_directory): Move here.
6967 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
6969 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
6971 * common/pathstuff.c: New file.
6972 * common/pathstuff.h: New file.
6973 * compile/compile.c: Include "common/pathstuff.h".
6974 * defs.h (current_directory): Move to "common/common-defs.h".
6975 * dwarf2read.c: Include "common/pathstuff.h".
6977 * guile/scm-safe-call.c: Likewise.
6978 * linux-thread-db.c: Likewise.
6980 * nto-tdep.c: Likewise.
6981 * objfiles.c: Likewise.
6982 * source.c: Likewise.
6983 * symtab.c: Likewise.
6984 * utils.c: Include "common/pathstuff.h".
6985 (gdb_realpath): Move to "common/pathstuff.c".
6986 (gdb_realpath_keepfile): Likewise.
6987 (gdb_abspath): Likewise.
6988 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
6989 (gdb_realpath_keepfile): Likewise.
6990 (gdb_abspath): Likewise.
6992 2018-02-28 John Baldwin <jhb@FreeBSD.org>
6994 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
6995 wildcard process pid for super_resume for kernels with a
6998 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7000 * compile/compile.c (get_args): Add additional comments
7001 explaining function.
7003 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7004 Tom Tromey <tom@tromey.com>
7006 * target.h (memory_write_request_s): Remove typedef. Don't define
7008 (target_write_memory_blocks): Change argument to std::vector.
7009 (struct memory_write_request): Add constructor.
7010 * target-memory.c (compare_block_starting_address): Return bool.
7011 Change argument types.
7012 (claim_memory): Change arguments to use std::vector.
7013 (split_regular_and_flash_blocks, blocks_to_erase)
7014 (compute_garbled_blocks): Likewise.
7015 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7016 (target_write_memory_blocks): Change argument to std::vector.
7017 * symfile.c (struct load_section_data): Add constructor and
7018 destructor. Use std::vector for "requests".
7019 (struct load_progress_data): Add initializers.
7020 (load_section_callback): Update. Use "new".
7021 (clear_memory_write_data): Remove.
7022 (generic_load): Update.
7024 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7026 * arch/aarch64.h: Use common/tdesc.h.
7028 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7030 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7031 architecture with a 64-bit ABI.
7033 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7035 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7036 ahead of target description loading.
7038 2018-02-26 Tom Tromey <tom@tromey.com>
7040 * stack.c (backtrace_command_1): Update.
7041 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7043 * python/py-framefilter.c (py_print_frame)
7044 (gdbpy_apply_frame_filter): Change type of "flags".
7045 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7047 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7048 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7049 * extension.h (enum frame_filter_flag): Rename from
7051 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7052 (apply_ext_lang_frame_filter): Change type of "flags".
7053 * extension.c (apply_ext_lang_frame_filter): Change type of
7055 * extension-priv.h (struct extension_language_ops)
7056 <apply_frame_filter>: Change type of "flags".
7058 2018-02-26 Tom Tromey <tom@tromey.com>
7061 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7062 off-by-one in py_end computation.
7063 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7065 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7068 2018-02-26 Tom Tromey <tom@tromey.com>
7070 * dwarf2read.c (struct variant_field): New.
7071 (struct nextfield) <variant>: New field.
7072 (dwarf2_add_field): Handle DW_TAG_variant_part.
7073 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7074 discriminated union.
7075 (read_structure_type): Handle DW_TAG_variant_part.
7076 (handle_struct_member_die): New function, extracted from
7077 process_structure_scope. Handle DW_TAG_variant.
7078 (process_structure_scope): Handle discriminated unions. Call
7079 handle_struct_member_die.
7081 2018-02-26 Tom Tromey <tom@tromey.com>
7083 * rust-lang.h (rust_last_path_segment): Declare.
7084 * rust-lang.c (rust_last_path_segment): Now public. Change
7086 (struct disr_info): Remove.
7087 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7088 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7089 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7090 (rust_enum_p, rust_enum_variant): New function.
7091 (rust_underscore_fields): Remove "offset" parameter.
7092 (rust_print_enum): New function.
7093 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7094 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7095 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7097 (rust_internal_print_type): New function, from rust_print_type.
7099 (rust_print_type): Call rust_internal_print_type.
7100 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7101 Update enum handling.
7102 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7103 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7104 (rust_union_quirks): New functions.
7105 (process_full_comp_unit, process_full_type_unit): Call
7107 (process_structure_scope): Update rust_unions if necessary.
7109 2018-02-26 Tom Tromey <tom@tromey.com>
7111 * value.h (value_union_variant): Declare.
7112 * valops.c (value_union_variant): New function.
7113 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7114 (struct discriminant_info): New.
7115 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7117 (struct main_type) <flag_discriminated_union>: New field.
7119 2018-02-26 Tom Tromey <tom@tromey.com>
7121 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7122 unittests/unpack-selftests.c.
7123 * unittests/unpack-selftests.c: New file.
7124 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7126 2018-02-26 Yao Qi <yao.qi@linaro.org>
7128 * dwarf2read.c (struct partial_die_info) <read>: New method.
7129 (read_partial_die): Remove the declaration.
7130 (load_partial_dies): Update.
7131 (partial_die_info::partial_die_info):
7132 (read_partial_die): Change it to partial_die_info::read.
7134 2018-02-26 Yao Qi <yao.qi@linaro.org>
7136 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7137 (fixup_partial_die): Remove declaration.
7138 (scan_partial_symbols): Update.
7139 (partial_die_parent_scope): Likewise.
7140 (partial_die_full_name): Likewise.
7141 (fixup_partial_die): Change it to partial_die_info::fixup.
7143 2018-02-26 Yao Qi <yao.qi@linaro.org>
7145 * dwarf2read.c (read_partial_die): Update the declaration.
7146 (load_partial_dies): Caller update.
7147 (read_partial_die): Remove one argument abbrev_len.
7149 2018-02-26 Yao Qi <yao.qi@linaro.org>
7151 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7152 assignment operator.
7153 (load_partial_dies): Use ctor and copy ctor.
7154 (read_partial_die): Update.
7155 (dwarf2_cu::find_partial_die): Use ctor.
7157 2018-02-26 Yao Qi <yao.qi@linaro.org>
7159 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7160 (find_partial_die_in_comp_unit): Change it to
7161 dwarf2_cu::find_partial_die.
7162 (find_partial_die): Update.
7164 2018-02-26 Yao Qi <yao.qi@linaro.org>
7166 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7169 2018-02-26 Yao Qi <yao.qi@linaro.org>
7171 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7173 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7175 * arch/amd64.h: Use common/tdesc.h.
7176 * arch/i386.c: Likewise.
7177 * arch/i386.h: Likewise.
7178 * arch/tic6x.c: Likewise.
7179 * arch/tdesc.h: Move file from here...
7180 * common/tdesc.h: ...to here.
7181 * features/aarch64-core.c: Regenerate.
7182 * features/aarch64-fpu.c: Regenerate.
7183 * features/i386/32bit-avx.c: Regenerate.
7184 * features/i386/32bit-avx512.c: Regenerate.
7185 * features/i386/32bit-core.c: Regenerate.
7186 * features/i386/32bit-linux.c: Regenerate.
7187 * features/i386/32bit-mpx.c: Regenerate.
7188 * features/i386/32bit-pkeys.c: Regenerate.
7189 * features/i386/32bit-sse.c: Regenerate.
7190 * features/i386/64bit-avx.c: Regenerate.
7191 * features/i386/64bit-avx512.c: Regenerate.
7192 * features/i386/64bit-core.c: Regenerate.
7193 * features/i386/64bit-linux.c: Regenerate.
7194 * features/i386/64bit-mpx.c: Regenerate.
7195 * features/i386/64bit-pkeys.c: Regenerate.
7196 * features/i386/64bit-segments.c: Regenerate.
7197 * features/i386/64bit-sse.c: Regenerate.
7198 * features/i386/x32-core.c: Regenerate.
7199 * features/tic6x-c6xp.c: Regenerate.
7200 * features/tic6x-core.c: Regenerate.
7201 * features/tic6x-gp.c: Regenerate.
7202 * target-descriptions.c: Use common/tdesc.h.
7203 * target-descriptions.h: Likewise.
7205 2018-02-24 Tom Tromey <tom@tromey.com>
7207 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7208 (try_thread_db_load_from_dir, thread_db_load_search): Use
7210 (info_auto_load_libthread_db_compare): Return bool. Change
7212 (info_auto_load_libthread_db): Use std::vector, std::string.
7215 2018-02-24 Tom Tromey <tom@tromey.com>
7217 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7219 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7221 * gdbarch.c: Rebuild.
7222 * gdbarch.h: Rebuild.
7223 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7224 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7225 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7228 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7230 * gdbtypes.h (sect_offset): Change type to uint64_t.
7231 (sect_offset_str): New function.
7232 * dwarf2read.c (create_addrmap_from_aranges): Use
7234 (error_check_comp_unit_head): Likewise.
7235 (create_debug_type_hash_table): Likewise.
7236 (read_cutu_die_from_dwo): Likewise.
7237 (init_cutu_and_read_dies): Likewise.
7238 (init_cutu_and_read_dies_no_follow): Likewise.
7239 (process_psymtab_comp_unit_reader): Likewise.
7240 (partial_die_parent_scope): Likewise.
7241 (peek_die_abbrev): Likewise.
7242 (process_queue): Likewise.
7243 (dwarf2_physname): Likewise.
7244 (read_namespace_alias): Likewise.
7245 (read_import_statement): Likewise.
7246 (create_dwo_cu_reader): Likewise.
7247 (create_cus_hash_table): Likewise.
7248 (lookup_dwo_cutu): Likewise.
7249 (inherit_abstract_dies): Likewise.
7250 (read_func_scope): Likewise.
7251 (read_call_site_scope): Likewise.
7252 (dwarf2_add_member_fn): Likewise.
7253 (read_common_block): Likewise.
7254 (read_module_type): Likewise.
7255 (read_typedef): Likewise.
7256 (read_subrange_type): Likewise.
7257 (load_partial_dies): Likewise.
7258 (read_partial_die): Likewise.
7259 (find_partial_die): Likewise.
7260 (read_str_index): Likewise.
7261 (dwarf2_string_attr): Likewise.
7262 (build_error_marker_type): Likewise.
7263 (lookup_die_type): Likewise.
7264 (dump_die_shallow): Likewise.
7265 (follow_die_ref): Likewise.
7266 (dwarf2_fetch_die_loc_sect_off): Likewise.
7267 (dwarf2_fetch_constant_bytes): Likewise.
7268 (follow_die_sig): Likewise.
7269 (get_signatured_type): Likewise.
7270 (get_DW_AT_signature_type): Likewise.
7271 (dwarf2_find_containing_comp_unit): Likewise.
7272 (set_die_type): Likewise.
7274 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7276 * arch/aarch64.c: Include "common-defs.h".
7277 * arch/amd64.c: Likewise.
7278 * arch/i386.c: Likewise.
7280 2018-02-21 Tom Tromey <tom@tromey.com>
7282 * value.h: (extract_field_op): Update.
7283 * eval.c (extract_field_op): Return a const char *.
7284 * expression.h (parse_expression_for_completion): Update.
7285 * completer.c (complete_expression): Update.
7286 (add_struct_fields): Make fieldname const.
7287 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7288 (mark_completion_tag, parse_exp_in_context_1): Update.
7289 (parse_expression_for_completion): Change "name" to
7290 unique_xmalloc_ptr*.
7292 2018-02-21 Tom Tromey <tom@tromey.com>
7294 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7296 2018-02-21 Yao Qi <yao.qi@linaro.org>
7298 * avr-tdep.c (avr_read_pc): Change parameter type to
7300 * gdbarch.sh (read_pc): Likewise.
7301 * gdbarch.c: Re-generated.
7302 * gdbarch.h: Re-generated.
7303 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7305 * ia64-tdep.c (ia64_read_pc): Likewise.
7306 * mips-tdep.c (mips_read_pc): Likewise.
7307 * spu-tdep.c (spu_read_pc): Likewise.
7309 2018-02-21 Yao Qi <yao.qi@linaro.org>
7311 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7312 * regcache-dump.c: New file.
7313 * regcache.c: Move register_dump to regcache-dump.c.
7314 (maintenance_print_registers): Likewise.
7315 (maintenance_print_raw_registers): Likewise.
7316 (maintenance_print_cooked_registers): Likewise.
7317 (maintenance_print_register_groups): Likewise.
7318 (maintenance_print_remote_registers): Likewise.
7319 (_initialize_regcache): Likewise.
7320 * regcache.h (register_dump): Moved from regcache.c.
7322 2018-02-21 Yao Qi <yao.qi@linaro.org>
7324 * regcache.c (regcache::regcache): Update.
7325 (regcache::invalidate): Move it to detached_regcache::invalidate.
7326 (get_thread_arch_aspace_regcache): Update.
7327 (regcache::raw_update): Update.
7328 (regcache::cooked_read): Remove some code.
7329 (regcache::cooked_read_value): Likewise.
7330 (regcache::raw_write): Remove assert on m_readonly_p.
7331 (regcache::raw_supply_integer): Move it to
7332 detached_regcache::raw_supply_integer.
7333 (regcache::raw_supply_zeroed): Likewise.
7334 * regcache.h (detached_regcache) <raw_supply_integer>: New
7336 <raw_supply_zeroed, invalidate>: Likewise.
7337 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7338 <invalidate>: Likewise.
7339 <m_readonly_p>: Removed.
7341 2018-02-21 Yao Qi <yao.qi@linaro.org>
7343 * infcmd.c (get_return_value): Let stop_regs point to
7344 get_current_regcache.
7345 * regcache.c (regcache::regcache): Remove.
7346 (register_dump_reg_buffer): New class.
7347 (regcache_print): Adjust.
7348 * regcache.h (regcache): Remove constructors.
7350 2018-02-21 Yao Qi <yao.qi@linaro.org>
7352 * regcache.c (class register_dump): New class.
7353 (register_dump_regcache, register_dump_none): New class.
7354 (register_dump_remote, register_dump_groups): New class.
7355 (regcache_print): Update.
7356 * regcache.h (regcache_dump_what): Move it to regcache.c.
7357 (regcache) <dump>: Remove.
7359 2018-02-21 Yao Qi <yao.qi@linaro.org>
7361 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7363 (jit_unwind_reg_set_impl): Call raw_supply.
7364 (jit_frame_sniffer): Use reg_buffer_rw.
7365 * record-full.c (record_full_core_regbuf): Change its type.
7366 (record_full_core_open_1): Use reg_buffer_rw.
7367 (record_full_close): Likewise.
7368 (record_full_core_fetch_registers): Use regcache->raw_supply.
7369 (record_full_core_store_registers): Likewise.
7370 * regcache.c (regcache::get_register_status): Move it to
7372 (regcache_raw_set_cached_value): Remove.
7373 (regcache::raw_set_cached_value): Remove.
7374 (regcache::raw_write): Call raw_supply.
7375 (regcache::raw_supply): Move it to reg_buffer_rw.
7376 * regcache.h (regcache_raw_set_cached_value): Remove.
7377 (reg_buffer_rw): New class.
7379 2018-02-21 Yao Qi <yao.qi@linaro.org>
7381 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7382 readonly_detached_regcache.
7383 (dummy_frame_prev_register): Use regcache->cooked_read.
7384 * frame.c (frame_save_as_regcache): Change return type.
7385 (frame_pop): Update.
7386 * frame.h (frame_save_as_regcache): Update declaration.
7387 * inferior.h (get_infcall_suspend_state_regcache): Update
7389 * infrun.c (infcall_suspend_state) <registers>: use
7390 readonly_detached_regcache.
7391 (save_infcall_suspend_state): Don't use regcache_dup.
7392 (get_infcall_suspend_state_regcache): Change return type.
7393 * linux-fork.c (struct fork_info) <savedregs>: Change to
7394 readonly_detached_regcache.
7396 (fork_save_infrun_state): Don't use regcache_dup.
7397 (info_checkpoints_command): Adjust.
7398 * mi/mi-main.c (register_changed_p): Update declaration.
7399 (mi_cmd_data_list_changed_registers): Use
7400 readonly_detached_regcache.
7401 (register_changed_p): Change parameter type to
7402 readonly_detached_regcache.
7403 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7404 readonly_detached_regcache.
7405 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7406 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7408 (regcache::save): Move it to reg_buffer.
7409 (regcache::restore): Change parameter type.
7410 (regcache_dup): Remove.
7411 * regcache.h (reg_buffer) <save>: New method.
7412 (readonly_detached_regcache): New class.
7413 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7414 readonly_detached_regcache.
7415 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7417 2018-02-21 Yao Qi <yao.qi@linaro.org>
7419 * frame.c (frame_save_as_regcache): Use regcache method save.
7420 (frame_pop): Use regcache method restore.
7421 * infrun.c (restore_infcall_suspend_state): Likewise.
7422 * linux-fork.c (fork_load_infrun_state): Likewise.
7423 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7425 * regcache.c (regcache_save): Remove.
7426 (regcache::restore): More asserts.
7427 (regcache_cpy): Remove.
7428 * regcache.h (regcache_save): Remove the declaration.
7429 (regcache::restore): Move from private to public.
7430 Remove the friend declaration of regcache_cpy.
7431 (regcache_cpy): Remove declaration.
7433 2018-02-21 Yao Qi <yao.qi@linaro.org>
7435 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7436 parameter type to 'readable_regcache *'.
7437 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7438 * arm-tdep.c (arm_neon_quad_read): Likewise.
7439 (arm_pseudo_read): Likewise.
7440 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7441 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7442 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7443 * gdbarch.c: Re-generated.
7444 * gdbarch.h: Re-generated.
7445 * gdbarch.sh (pseudo_register_read): Change parameter type to
7446 'readable_regcache *'.
7447 (pseudo_register_read_value): Likewise.
7448 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7449 (h8300_pseudo_register_read): Likewise.
7450 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7451 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7452 (i386_pseudo_register_read_into_value): Likewise.
7453 (i386_pseudo_register_read_value): Likewise.
7454 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7456 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7457 * m32c-tdep.c (m32c_raw_read): Likewise.
7458 (m32c_read_flg): Likewise.
7459 (m32c_banked_register): Likewise.
7460 (m32c_banked_read): Likewise.
7461 (m32c_sb_read): Likewise.
7462 (m32c_part_read): Likewise.
7463 (m32c_cat_read): Likewise.
7464 (m32c_r3r2r1r0_read): Likewise.
7465 (m32c_pseudo_register_read): Likewise.
7466 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7467 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7468 (mep_pseudo_cr64_read): Likewise.
7469 (mep_pseudo_register_read): Likewise.
7470 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7471 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7472 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7473 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7474 (regcache::cooked_read): Likewise.
7475 (regcache::cooked_read_value): Likewise.
7476 (regcache_cooked_read_signed):
7477 (regcache::cooked_read): Likewise.
7478 * regcache.h (readable_regcache): New class.
7479 (regcache): Inherit readable_regcache. Move some methods to
7481 * rl78-tdep.c (rl78_pseudo_register_read): Change
7482 parameter type to 'readable_regcache *'.
7483 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7484 (e500_pseudo_register_read): Change parameter type to
7485 'readable_regcache *'.
7486 (dfp_pseudo_register_read): Likewise.
7487 (vsx_pseudo_register_read): Likewise.
7488 (efpr_pseudo_register_read): Likewise.
7489 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7490 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7491 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7492 (sh64_pseudo_register_read): Likewise.
7493 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7494 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7495 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7496 (spu_pseudo_register_read): Likewise.
7497 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7498 (xtensa_pseudo_register_read): Likewise.
7500 2018-02-21 Yao Qi <yao.qi@linaro.org>
7502 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7503 (regcache::arch): Move it to reg_buffer::arch.
7504 (regcache::register_buffer): Likewise.
7505 (regcache::assert_regnum): Likewise.
7506 (regcache::num_raw_registers): Likewise.
7507 * regcache.h (reg_buffer): New class.
7508 (regcache): Inherit reg_buffer.
7510 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7512 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7513 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7515 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7517 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7519 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7521 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7522 (SFILES): Remove common/*.c files.
7523 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7524 * common/common.host: Add common reference.
7525 * configure.ac: Likewise.
7526 * configure: Regenerate.
7528 2018-02-16 Yao Qi <yao.qi@linaro.org>
7530 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7531 (block_initialize_namespace): Use new.
7532 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7533 (dwarf2_free_objfile): Use delete.
7534 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7535 (copy_type_recursive): Use new.
7536 * gdb_obstack.h (allocate_on_obstack): New.
7538 2018-02-15 Yao Qi <yao.qi@linaro.org>
7541 * inferior.c (exit_inferior_1): Reset inf->control.
7543 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7545 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7548 2018-02-14 Pedro Alves <palves@redhat.com>
7550 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7551 frame_cleanup_after_sniffer on exception.
7553 2018-02-14 Tom Tromey <tom@tromey.com>
7555 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7557 (solib_bfd_open): Make pathname const.
7558 * solib.c (solib_bfd_open): Make pathname const.
7559 * solib-spu.c (spu_bfd_fopen): Make name const.
7560 (spu_bfd_open): Make pathname const.
7561 * solib-darwin.c (darwin_bfd_open): Make pathname const.
7562 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7564 2018-02-14 Tom Tromey <tom@tromey.com>
7566 * symfile.c (symfile_bfd_open): Update.
7567 * source.h (openp, source_full_path_of, find_and_open_source):
7568 Change argument type to unique_xmalloc_ptr.
7569 * source.c (openp): Take a unique_xmalloc_ptr.
7570 (source_full_path_of, find_and_open_source): Likewise.
7571 (open_source_file, symtab_to_fullname): Update.
7572 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
7574 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7575 (exec_file_find): Update.
7576 * psymtab.c (psymtab_to_fullname): Update.
7577 * nto-tdep.h (nto_find_and_open_solib): Update.
7578 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7580 * exec.c (exec_file_attach): Update.
7581 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7582 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7584 2018-02-14 Tom Tromey <tom@tromey.com>
7586 * solib.c: Include source.h.
7587 * nto-tdep.c: Include source.h.
7588 * mi/mi-cmd-env.c: Include source.h.
7589 * infcmd.c: Include source.h.
7590 * exec.c: Include source.h.
7591 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7592 (add_path, directory_switch, source_path, init_source_path): Move
7594 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7595 (add_path, directory_switch, source_path, init_source_path):
7598 2018-02-14 Tom Tromey <tom@tromey.com>
7600 * solist.h (exec_file_find, solib_find): Return
7602 (solib_bfd_fopen): Take a const char *.
7603 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7604 (exec_file_find, solib_find): Likewise.
7605 (solib_bfd_fopen): Do not take ownership of "pathname".
7606 (solib_bfd_open): Use unique_xmalloc_ptr.
7607 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7608 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7609 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7610 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7612 2018-02-14 Joel Brobecker <brobecker@adacore.com>
7614 * ada-lang.c (name_match_type_from_name): Remove reference to
7615 ada_name_for_lookup in function's documentation.
7616 * ada-lang.h (ada_name_for_lookup): Delete declaration.
7618 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7620 * defs.h (enum openp_flags): New enum.
7621 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7622 Move to enum openp_flags.
7623 (openp_flags): New enum flags.
7624 (openp): Change parameter type to openp_flags.
7625 * source.c (openp): Change parameter type to openp_flags.
7626 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7627 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7629 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7631 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7634 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
7636 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7638 (class dwarf2_queue_guard): ...the destructor of this new class.
7639 (dw2_do_instantiate_symtab): Create instance of the new class
7640 dwarf2_queue_guard, remove cleanup.
7642 2018-02-09 Tom Tromey <tom@tromey.com>
7644 * source.c (find_source_lines): Don't reference past the end of
7647 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7649 * remote.c (remote_btrace_maybe_reopen): Change error message.
7650 * btrace.c (btrace_enable): Likewise.
7651 (parse_xml_btrace): Likewise.
7652 (parse_xml_btrace_conf): Likewise.
7654 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7656 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7657 (linux_enable_pt, linux_enable_bts): Call
7658 diagnose_perf_event_open_fail.
7660 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7662 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7663 Remove parameter and change return type. Update callers. Move it.
7664 (linux_enable_bts, linux_enable_pt): Improve error message.
7665 (linux_enable_pt): Remove zero buffer size check.
7666 (linux_enable_btrace): Improve error messages. Remove NULL return
7669 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7671 * btrace.c (btrace_enable): Remove target_supports_btrace call.
7672 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7673 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7674 (linux_supports_pt, linux_supports_btrace): Remove.
7675 (linux_enable_bts): Call cpu_supports_bts.
7676 * nat/linux-btrace.h (linux_supports_btrace): Remove.
7677 * remote.c (remote_supports_btrace): Remove.
7678 (init_remote_ops): Remove remote_supports_btrace.
7679 * target-delegates.c: Regenerated.
7680 * target.c (target_supports_btrace): Remove.
7681 * target.h (target_ops) <to_supports_btrace>: Remove
7682 (target_supports_btrace): Remove.
7683 * x86-linux-nat.c (x86_linux_create_target): Remove
7684 linux_supports_btrace.
7686 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7688 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7690 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7691 exception and use message in own exception.
7693 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7695 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
7696 (perf_event_pt_event_type): Use gdb_file_up.
7697 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
7698 scoped_fd, and scoped_mmap.
7700 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7702 * common/scoped_mmap.h: New.
7703 * unittests/scoped_mmap-selftest.c: New.
7704 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7705 unittests/scoped_mmap-selftest.c.
7707 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7709 * common/scoped_fd.h: New.
7710 * unittests/scoped_fd-selftest.c: New.
7711 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7712 unittests/scoped_fd-selftest.c.
7714 2018-02-09 Tom Tromey <tom@tromey.com>
7716 * auto-load.c (auto_load_section_scripts): Use
7717 gdb::unique_xmalloc_ptr.
7719 2018-02-09 Tom Tromey <tom@tromey.com>
7721 * auto-load.c (execute_script_contents): Use std::string.
7723 2018-02-09 Joel Brobecker <brobecker@adacore.com>
7725 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
7726 Python function, rather than a new command.
7728 2018-02-08 Tom Tromey <tom@tromey.com>
7730 * solib.c (solib_find_1): Use std::string.
7731 (solib_bfd_fopen): Use unique_xmalloc_ptr.
7733 2018-02-08 Tom Tromey <tom@tromey.com>
7735 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
7737 2018-02-08 Tom Tromey <tom@tromey.com>
7739 * source.c (find_source_lines): Use gdb::def_vector.
7741 2018-02-08 Tom Tromey <tom@tromey.com>
7743 * macrocmd.c (struct temporary_macro_definition): New.
7744 (macro_define_command): Use temporary_macro_definition. Remove
7746 (free_macro_definition_ptr): Remove.
7748 2018-02-08 Tom Tromey <tom@tromey.com>
7750 * macroexp.c (maybe_expand): Use std::string.
7752 2018-02-08 Tom Tromey <tom@tromey.com>
7754 * macroexp.c (struct macro_buffer): Add initializers for some
7756 (init_buffer, init_shared_buffer, free_buffer)
7757 (free_buffer_return_text): Remove.
7758 (macro_buffer): New constructors.
7759 (~macro_buffer): New destructor.
7760 (macro_buffer::set_shared): New method.
7761 (macro_buffer::resize_buffer, macro_buffer::appendc)
7762 (macro_buffer::appendmem): Now methods, not free functions.
7763 (set_token, append_tokens_without_splicing, stringify)
7764 (macro_stringify): Update.
7765 (gather_arguments): Change return type. Remove argc_p argument,
7766 add args_ptr argument. Use std::vector.
7767 (substitute_args): Remove argc argument. Accept std::vector.
7768 (expand): Update. Use std::vector.
7769 (scan, macro_expand, macro_expand_next): Update.
7771 2018-02-08 Tom Tromey <tom@tromey.com>
7773 * symtab.c (default_collect_symbol_completion_matches_break_on):
7774 Use unique_xmalloc_ptr.
7775 * macroscope.h: (sal_macro_scope, user_macro_scope)
7776 (default_macro_scope): Return unique_xmalloc_ptr.
7777 * macroscope.c (sal_macro_scope, user_macro_scope)
7778 (default_macro_scope): Return unique_xmalloc_ptr.
7779 * macroexp.h (macro_expand, macro_expand_once): Return
7781 * macroexp.c (macro_expand, macro_expand_once): Return
7783 * macrocmd.c (macro_expand_command, macro_expand_once_command)
7784 (info_macro_command, info_macros_command): Use
7786 * compile/compile-c-support.c (write_macro_definitions): Use
7788 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
7790 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
7792 * value.c (value_static_field): Assign field type instead of
7793 containing type when returning an optimized out value.
7795 2018-02-06 Yao Qi <yao.qi@linaro.org>
7797 * ft32-tdep.c (ft32_read_pc): Remove.
7798 (ft32_write_pc): Remove.
7799 (ft32_gdbarch_init): Update.
7800 * m32r-tdep.c (m32r_read_pc): Remove.
7801 (m32r_gdbarch_init): Update.
7802 * mep-tdep.c (mep_read_pc): Remove.
7803 (mep_gdbarch_init): Update.
7804 * microblaze-tdep.c (microblaze_write_pc): Remove.
7805 (microblaze_gdbarch_init): Update.
7806 * mn10300-tdep.c (mn10300_read_pc): Remove.
7807 (mn10300_write_pc): Remove.
7808 (mn10300_gdbarch_init): Update.
7809 * moxie-tdep.c (moxie_read_pc): Remove.
7810 (moxie_write_pc): Remove.
7811 (moxie_gdbarch_init): Update.
7813 2018-02-06 Yao Qi <yao.qi@linaro.org>
7815 * expprint.c (print_subexp_standard): Handle
7816 OP_F77_UNDETERMINED_ARGLIST.
7817 (dump_subexp_body_standard): Likewise.
7819 2018-02-05 Alan Hayward <alan.hayward@arm.com>
7821 * target-descriptions.c (tdesc_element_visitor) Add empty
7823 (tdesc_type): Move make_gdb_type from here.
7824 (tdesc_type_builtin): Likewise.
7825 (tdesc_type_vector): Likewise.
7826 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
7827 (make_gdb_type_struct): Move from tdesc_type_with_fields.
7828 (make_gdb_type_union): Likewise.
7829 (make_gdb_type_flags): Likewise.
7830 (make_gdb_type_enum): Likewise.
7831 (make_gdb_type): New function.
7832 (tdesc_register_type): Use static make_gdb_type.
7834 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
7836 * infcmd.c (default_print_one_register_info): Align natural-format
7837 column values consistently one under another.
7838 (pad_to_column): New function.
7840 2018-02-05 Joel Brobecker <brobecker@adacore.com>
7842 * dwarf2read.c (dwarf2_physname): Move commment.
7844 2018-02-01 Leszek Swirski <leszeks@google.com>
7846 * varobj.c (varobj_formatted_print_options): Allow recursive
7847 pretty printing if pretty printing is enabled.
7849 2018-02-01 Leszek Swirski <leszeks@google.com>
7851 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
7852 names after a structop as a filename.
7854 2018-02-01 Yao Qi <yao.qi@linaro.org>
7856 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
7857 (arm_record_coproc_data_proc): Likewise.
7859 2018-02-01 Yao Qi <yao.qi@linaro.org>
7861 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
7863 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
7865 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
7866 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
7868 2018-01-31 Pedro Alves <palves@redhat.com>
7870 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
7871 * inflow.c (child_terminal_save_inferior): Wrap reference to
7872 tcgetpgrp in HAVE_TERMIOS_H.
7873 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
7875 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
7876 always iterate over all inferiors.
7877 (gdbsim_cntrl_c): Adjust.
7878 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
7880 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7882 * gdbtypes.c (lookup_array_range_type): Make sure the array's
7883 index type is objfile-owned if the element type is as well.
7885 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7889 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
7891 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7892 "features/s390x-linux64.c".
7893 (_initialize_s390_linux_tdep): Remove initialization of tdescs
7894 s390_linux32 and s390x_linux64.
7895 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7897 * s390-tdep.c: Include "features/s390-linux32.c" and
7898 "features/s390x-linux64.c".
7899 (s390_tdesc_valid): Add check for tdesc_has_registers.
7900 (s390_gdbarch_init): Make sure there is always a valid tdesc.
7901 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7902 tdesc_s390x_linux64.
7903 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7904 tdesc_s390x_linux64 to...
7905 * s390-tdep.h: ...here.
7907 2018-01-30 Pedro Alves <palves@redhat.com>
7910 * config.in, configure: Regenerate.
7911 * configure.ac: Check for getpgid.
7912 * go32-nat.c (go32_pass_ctrlc): New.
7913 (go32_target): Install it.
7914 * inf-child.c (inf_child_target): Install
7915 child_terminal_save_inferior, child_pass_ctrlc and
7917 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7918 (inf_ptrace_target): No longer install it.
7919 * infcmd.c (interrupt_target_1): Adjust.
7920 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
7921 (child_interrupt): Declare.
7922 (inferior::terminal_state): New.
7923 * inflow.c (struct terminal_info): Update comments.
7924 (inferior_process_group): Delete.
7925 (terminal_is_ours): Delete.
7926 (gdb_tty_state): New.
7927 (child_terminal_init): Adjust.
7928 (is_gdb_terminal, sharing_input_terminal_1)
7929 (sharing_input_terminal): New functions.
7930 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
7931 Set the process's actual process group in the foreground if
7932 possible. Handle is_ours_for_output/is_ours distinction. Don't
7933 mark terminal as the inferior's if not sharing GDB's terminal.
7934 Don't check attach_flag.
7935 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
7936 pass down a target_terminal_state.
7937 (child_terminal_save_inferior): New, factored out from ...
7938 (child_terminal_ours_1): ... this. Handle
7939 target_terminal_state::is_ours_for_output.
7940 (child_interrupt, child_pass_ctrlc): New.
7941 (inflow_inferior_exit): Clear the inferior's terminal_state.
7942 (copy_terminal_info): Copy the inferior's terminal state.
7943 (_initialize_inflow): Remove reference to terminal_is_ours.
7944 * inflow.h (inferior_process_group): Delete.
7945 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
7946 * procfs.c (procfs_target): Don't install procfs_interrupt.
7947 (procfs_interrupt): Delete.
7948 * remote.c (remote_serial_quit_handler): Adjust.
7949 (remote_interrupt): Remove ptid parameter. Adjust.
7950 * target-delegates.c: Regenerate.
7951 * target.c: Include "terminal.h".
7952 (target_terminal::terminal_state): Rename to ...
7953 (target_terminal::m_terminal_state): ... this.
7954 (target_terminal::init): Adjust.
7955 (target_terminal::inferior): Adjust to per-inferior
7957 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
7958 (target_terminal::ours, target_terminal::ours_for_output): Use
7959 target_terminal_is_ours_kind.
7960 (target_interrupt): Remove ptid parameter. Adjust.
7961 (default_target_pass_ctrlc): Adjust.
7962 * target.h (target_ops::to_terminal_save_inferior): New field.
7963 (target_ops::to_interrupt): Remove ptid_t parameter.
7964 (target_interrupt): Remove ptid_t parameter. Update comment.
7965 (target_pass_ctrlc): Update comment.
7966 * target/target.h (target_terminal_state): New scoped enum,
7968 (target_terminal::terminal_state): ... here.
7969 (target_terminal::inferior): Update comments.
7970 (target_terminal::restore_inferior): New.
7971 (target_terminal::is_inferior, target_terminal::is_ours)
7972 (target_terminal::is_ours_for_output): Adjust.
7973 (target_terminal::scoped_restore_terminal_state): Adjust to
7974 rename, and call restore_inferior() instead of inferior().
7975 (target_terminal::scoped_restore_terminal_state::m_state): Change
7977 (target_terminal::terminal_state): Rename to ...
7978 (target_terminal::m_terminal_state): ... this and change type.
7980 2018-01-30 Pedro Alves <palves@redhat.com>
7982 * linux-nat.c (wait_for_signal): New function.
7983 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
7985 (async_terminal_is_ours)
7986 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
7987 (linux_nat_add_target): Don't override
7988 to_terminal_inferior/to_terminal_ours.
7990 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
7992 * remote.c (remote_follow_fork): Don't call "detach_inferior".
7994 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
7996 * dwarf2read.c (free_dwo_files): Add forward-declaration.
7997 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
7998 dwarf2_per_objfile_free here.
7999 (dwarf2_per_objfile_free): Remove.
8000 (_initialize_dwarf2_read): Don't register
8001 dwarf2_per_objfile_free as a registry cleanup.
8003 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8005 Avoid compilation errors in MinGW native builds
8007 The error is triggered by including python-internal.h, and the
8010 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8011 from build-gnulib/import/math.h:27,
8012 from d:/usr/Python26/include/pyport.h:235,
8013 from d:/usr/Python26/include/Python.h:58,
8014 from python/python-internal.h:94,
8015 from python/py-arch.c:24:
8016 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8020 This happens because Python headers define 'hypot' to expand t
8021 '_hypot' in the Windows builds.
8022 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8023 'hypoth'. This avoids a compilation error.
8025 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8027 * MAINTAINERS (Write After Approval): Fix ordering.
8029 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8031 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8033 2018-01-26 Alan Modra <amodra@gmail.com>
8035 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8036 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8037 Remove nop. Make const. Comment.
8038 (powerpc32_plt_stub_so_2): New.
8039 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8040 Correct count. Update uses.
8041 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8042 Move common code reading PLT entry word. Correct
8043 powerpc32_plt_stub PLT address calculation.
8044 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8045 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8046 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8047 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8048 (ppc64_standard_linkage8): Likewise.
8049 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8050 Correct insns description.
8051 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8053 2018-01-24 Pedro Alves <palves@redhat.com>
8055 GCC PR libstdc++/83906
8056 * gdbtypes.c (operator==(const dynamic_prop &,
8057 const dynamic_prop &)): New.
8058 (operator==(const range_bounds &, const range_bounds &)): New.
8059 (check_types_equal): Use them instead of memcmp.
8060 * gdbtypes.h (operator==(const dynamic_prop &,
8061 const dynamic_prop &)): Declare.
8062 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8063 (operator==(const range_bounds &, const range_bounds &)): Declare.
8064 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8066 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8068 * s390-linux-tdep.c (s390_record_address_mask)
8069 (s390_record_calc_disp_common, s390_record_calc_disp)
8070 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8071 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8072 (s390_process_record): Move to s390-tdep.c.
8073 (s390_linux_init_abi_any): Adjust.
8074 * s390-tdep.c (s390_record_address_mask)
8075 (s390_record_calc_disp_common, s390_record_calc_disp)
8076 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8077 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8078 (s390_process_record): Moved from s390-linux-tdep.c
8079 (s390_gdbarch_init): Adjust.
8081 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8083 * s390-linux-nat.c (s390-tdep.h): New include.
8084 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8085 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8086 (ALLDEPFILES): Add s390-tdep.c.
8087 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8088 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8089 * s390-tdep.h: ...this. New file.
8090 * s390-linux-tdep.c (s390-tdep.h): New include.
8091 (_initialize_s390_tdep): Rename to...
8092 (_initialize_s390_linux_tdep): ...this and adjust.
8093 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8094 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8096 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8097 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8098 (s390_is_partial_instruction, s390_software_single_step)
8099 (is_non_branch_ril, s390_displaced_step_copy_insn)
8100 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8101 (s390_prologue_data, s390_addr, s390_store, s390_load)
8102 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8103 (s390_register_call_saved, s390_guess_tracepoint_registers)
8104 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8105 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8106 (s390_pseudo_register_name, s390_pseudo_register_type)
8107 (s390_pseudo_register_read, s390_pseudo_register_write)
8108 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8109 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8110 (s390_addr_bits_remove, s390_address_class_type_flags)
8111 (s390_address_class_type_flags_to_name)
8112 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8113 (s390_function_arg_float, s390_function_arg_vector)
8114 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8115 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8116 (s390_frame_align, s390_register_return_value, s390_return_value)
8117 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8118 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8119 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8120 (s390_trad_frame_prev_register, s390_unwind_cache)
8121 (s390_prologue_frame_unwind_cache)
8122 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8123 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8124 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8125 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8126 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8127 (s390_frame_base_address, s390_local_base_address)
8128 (s390_frame_base, s390_gcc_target_options)
8129 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8130 (s390_validate_reg_range, s390_tdesc_valid)
8131 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8132 * s390-tdep.c: ...this. New file.
8134 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8136 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8137 (s390_process_record, s390_gdbarch_tdep_alloc)
8138 (s390_linux_init_abi_any): Use/set new hook.
8140 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8142 * s390-linux-tdep.c (osabi.h): New include.
8143 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8144 (s390_linux_init_abi_any): New functions.
8145 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8147 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8149 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8150 tdesc_has_registers check
8152 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8154 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8155 (s390_validate_reg_range): New macro.
8156 (s390_gdbarch_init): Adjust.
8158 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8160 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8161 (s390_gdbarch_tdep_alloc): Adjust.
8162 (s390_gdbarch_init): Adjust.
8164 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8166 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8167 <have_tdb>: Change type to bool.
8168 (s390_gdbarch_tdep_alloc): Adjust.
8169 (s390_gdbarch_init): Adjust.
8171 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8173 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8174 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8175 (s390_gdbarch_tdep_alloc): New function.
8176 (s390_gdbarch_init): Allocate tdep at start and use its fields
8177 instead of separate variables.
8179 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8181 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8182 when looking for cached gdbarch and add comment for remaining.
8184 2018-01-22 Pedro Alves <palves@redhat.com>
8185 Sergio Durigan Junior <sergiodj@redhat.com>
8187 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8190 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8192 * MAINTAINERS: Update my company e-mail address.
8194 2018-01-22 Yao Qi <yao.qi@linaro.org>
8196 * regcache.c (cooked_write_test): New function.
8197 (_initialize_regcache): Register the test.
8199 2018-01-22 Yao Qi <yao.qi@linaro.org>
8201 * ia64-tdep.c (ia64_pseudo_register_read): Call
8202 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8203 * m32c-tdep.c (m32c_cat_read): Likewise.
8204 (m32c_r3r2r1r0_read): Likewise.
8205 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8206 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8208 2018-01-22 Yao Qi <yao.qi@linaro.org>
8210 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8211 method raw_read instead of regcache_raw_read.
8212 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8213 * arm-tdep.c (arm_neon_quad_read): Likewise.
8214 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8215 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8216 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8217 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8218 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8219 (i386_pseudo_register_read_into_value): Likewise.
8220 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8221 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8222 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8223 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8224 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8225 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8226 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8227 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8228 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8230 2018-01-22 Yao Qi <yao.qi@linaro.org>
8232 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8233 * configure.tgt: Remove target mt.
8234 * mt-tdep.c: Remove.
8235 * regcache.c (cooked_read_test): Remove the check for mt.
8237 2018-01-22 Yao Qi <yao.qi@linaro.org>
8239 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8240 instead of gdbarch_pseudo_register_read_value.
8242 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8244 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8247 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8249 * linespec.c (create_sals_line_offset): Remove code that preserved
8250 the symtab_and_line's line number.
8252 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8254 * varobj.c (varobj_create): Don't set valid_block when creating a
8257 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8259 * varobj.c (varobj_create): Remove out of date comment.
8261 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8264 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8265 updating innermost block.
8266 * parse.c (innermost_block_tracker::update): Take extra type
8267 parameter, and check types match before updating innermost block.
8268 (write_dollar_variable): Update innermost block for registers.
8269 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8270 (innermost_block_tracker::innermost_block_tracker): Initialise
8272 (innermost_block_tracker::reset): Take type parameter.
8273 (innermost_block_tracker::update): Take type parameter, and pass
8274 type through as needed.
8275 (innermost_block_tracker::m_types): New member.
8276 * varobj.c (varobj_create): Pass type when reseting innermost
8279 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8281 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8282 * ada-lang.c (resolve_subexp): Likewise.
8283 * breakpoint.c (set_breakpoint_condition) Likewise.
8284 (watch_command_1) Likewise.
8285 * c-exp.y (variable): Likewise.
8286 * d-exp.y (PrimaryExpression): Likewise.
8287 * f-exp.y (variable): Likewise.
8288 * go-exp.y (variable): Likewise.
8289 * m2-exp.y (variable): Likewise.
8290 * objfiles.c (objfile::~objfile): Likewise.
8291 * p-exp.y (variable): Likewise.
8292 * parse.c (innermost_block): Change type.
8293 * parser-defs.h (class innermost_block_tracker): New.
8294 (innermost_block): Change to innermost_block_tracker.
8295 * printcmd.c (display_command): Switch to innermost_block API.
8296 (do_one_display): Likewise.
8297 * rust-exp.y (do_one_display): Likewise.
8298 * symfile.c (clear_symtab_users): Likewise.
8299 * varobj.c (varobj_create): Switch to innermost_block API, replace
8300 use of innermost_block with block stored on varobj object.
8302 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8304 * expression.h (innermost_block): Remove declaration.
8305 * varobj.c: Add 'parser-defs.h' include.
8307 2018-01-19 Tom Tromey <tom@tromey.com>
8309 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8310 symbols in the static and global blocks.
8312 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8314 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8315 gdb_ptrace.h, and move including gdb_wait.h ...
8316 * nat/linux-ptrace.h: ... to here.
8318 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8320 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8321 inf_ptrace_detach_success.
8322 (inf_ptrace_detach_success): Add inferior parameter, use it
8323 instead of inferior_ptid, pass it to detach_inferior.
8324 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8326 * inferior.c (detach_inferior): Add overload that takes an
8328 * inferior.h (detach_inferior): Likewise.
8329 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8330 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8331 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8333 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8335 * target.h (struct target_ops) <to_detach>: Add inferior
8337 (target_detach): Likewise.
8338 * target.c (dispose_inferior): Pass inferior down.
8339 (target_detach): Pass inferior down. Assert that it is equal to
8340 the current inferior.
8341 * aix-thread.c (aix_thread_detach): Pass inferior down.
8342 * corefile.c (core_file_command): Pass current_inferior() down.
8343 * corelow.c (core_detach): Add inferior parameter.
8344 * darwin-nat.c (darwin_detach): Likewise.
8345 * gnu-nat.c (gnu_detach): Likewise.
8346 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8347 * infcmd.c (detach_command): Pass current_inferior() down to
8349 * infrun.c (follow_fork_inferior): Pass parent_inf to
8351 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8353 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8354 * linux-thread-db.c (thread_db_detach): Likewise.
8355 * nto-procfs.c (procfs_detach): Likewise.
8356 * procfs.c (procfs_detach): Likewise.
8357 * record.c (record_detach): Likewise.
8358 * record.h (struct inferior): Forward-declare.
8359 (record_detach): Add inferior parameter.
8360 * remote-sim.c (gdbsim_detach): Likewise.
8361 * remote.c (remote_detach_1): Likewise.
8362 (remote_detach): Likewise.
8363 (extended_remote_detach): Likewise.
8364 * sol-thread.c (sol_thread_detach): Likewise.
8365 * target-debug.h (target_debug_print_inferior_p): New macro.
8366 * target-delegates.c: Re-generate.
8367 * top.c (kill_or_detach): Pass inferior down to target_detach.
8368 * windows-nat.c (windows_detach): Add inferior parameter.
8370 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8372 * target.h (struct target_ops) <to_detach>: Remove args
8374 (target_detach): Likewise.
8375 * target.c (dispose_inferior): Adjust.
8376 (target_detach): Remove args parameter, adjust.
8377 * aix-thread.c (aix_thread_detach): Adjust.
8378 * corefile.c (core_file_command): Adjust.
8379 * corelow.c (core_detach): Adjust.
8380 * darwin-nat.c (darwin_detach): Adjust.
8381 * gnu-nat.c (gnu_detach): Adjust.
8382 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8383 * infcmd.c (detach_command): Adjust
8384 * infrun.c (follow_fork_inferior): Adjust.
8385 (handle_vfork_child_exec_or_exit): Adjust.
8386 * linux-fork.c (linux_fork_detach): Remove args parameter.
8387 * linux-fork.h (linux_fork_detach): Likewise.
8388 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8389 * linux-thread-db.c (thread_db_detach): Likewise.
8390 * nto-procfs.c (procfs_detach): Likewise.
8391 * procfs.c (procfs_detach): Likewise.
8392 (do_detach): Remove signo parameter.
8393 * record.c (record_detach): Remove args parameter.
8394 * record.h (record_detach): Likewise.
8395 * remote-sim.c (gdbsim_detach): Likewise.
8396 * remote.c (remote_detach_1): Likewise.
8397 (remote_detach): Likewise.
8398 (extended_remote_detach): Likewise.
8399 * sol-thread.c (sol_thread_detach): Likewise.
8400 * target-delegates.c: Re-generate.
8401 * top.c (struct qt_args) <args>: Remove field.
8402 (kill_or_detach): Don't pass args.
8403 (quit_force): Don't set args.
8404 * windows-nat.c (windows_detach): Remove args parameter.
8406 2018-01-19 Yao Qi <yao.qi@linaro.org>
8408 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8409 (arm_linux_init_abi): Install it.
8411 2018-01-19 Yao Qi <yao.qi@linaro.org>
8413 * osabi.c (gdb_osabi_names): Extend the regexp for
8414 arm-linux-gnueabihf.
8416 2018-01-18 Yao Qi <yao.qi@linaro.org>
8418 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8420 (abbrev_table::add_abbrev): Update.
8421 (abbrev_table::lookup_abbrev): Update.
8423 2018-01-18 Yao Qi <yao.qi@linaro.org>
8425 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8427 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8429 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8432 2018-01-17 Tom Tromey <tom@tromey.com>
8434 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8436 2018-01-17 Tom Tromey <tom@tromey.com>
8438 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8439 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8440 (create_array_type_with_stride): Update.
8441 * dwarf2read.c (set_die_type): Update.
8443 2018-01-17 Tom Tromey <tom@tromey.com>
8445 * dwarf2read.c (delayed_method_info): Remove typedef.
8446 (dwarf2_cu::method_info): Now a std::vector.
8447 (add_to_method_list): Update.
8448 (free_delayed_list): Remove.
8449 (compute_delayed_physnames): Update.
8450 (process_full_comp_unit, process_full_type_unit): Clear the method
8451 list. Remove cleanups.
8452 (psymtab_include_file_name): Add name_holder parameter. Use
8454 (dwarf_decode_lines): Update.
8456 2018-01-17 Tom Tromey <tom@tromey.com>
8457 Simon Marchi <simon.marchi@ericsson.com>
8459 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8460 (dwarf2_per_objfile::free_cached_comp_units)
8461 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8462 (init_cutu_and_read_dies_no_follow): Update.
8463 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8464 (dwarf2_cu::~dwarf2_cu): New.
8465 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8466 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8468 2018-01-17 Tom Tromey <tom@tromey.com>
8469 Simon Marchi <simon.marchi@ericsson.com>
8471 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8472 (struct die_reader_specs) <abbrev_table>: New member.
8473 (struct abbrev_table): Add constructor.
8474 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8475 <abbrev_obstack>: Now an auto_obstack.
8476 (abbrev_table_up): New typedef.
8477 (init_cu_die_reader): Add abbrev_table parameter.
8478 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8479 Add result_dwo_abbrev_table.
8480 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8481 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8483 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8485 (skip_children): Update.
8486 (abbrev_table::alloc_abbrev): Rename from
8487 abbrev_table_alloc_abbrev.
8488 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8489 (abbrev_table::lookup_abbrev): Rename from
8490 abbrev_table_lookup_abbrev.
8491 (abbrev_table_read_table): Return abbrev_table_up.
8492 (abbrev_table_free, abbrev_table_free_cleanup)
8493 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8494 (load_partial_dies): Update.
8496 2018-01-17 Tom Tromey <tom@tromey.com>
8498 * dwarf2read.c (dwarf2_compute_name): Update comment.
8499 (read_func_scope, read_variable): Update.
8500 (new_symbol): Remove.
8501 (new_symbol_full): Rename to new_symbol.
8503 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8506 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8507 a warning instead of throwing an error, set section size to 0 and return
8509 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8511 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8513 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8515 (linux_ptrace_attach_fail_reason_string): Likewise.
8516 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8518 (linux_ptrace_attach_fail_reason_string): Likewise.
8519 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8521 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8523 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8525 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8528 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8529 checking for fs_base/gs_base fields in struct user_regs_struct.
8530 * configure: Regenerate.
8532 2018-01-17 Yao Qi <yao.qi@linaro.org>
8534 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8536 (aarch64_linux_init_abi): Install it to gdbarch hook
8539 2018-01-15 Pedro Alves <palves@redhat.com>
8541 * common/signals-state-save-restore.c
8542 (save_original_signals_state): Fix typos.
8544 2017-01-12 Tom Tromey <tom@tromey.com>
8545 Sergio Durigan Junior <sergiodj@redhat.com>
8547 * Makefile.in (install-only): Install gdb-add-index.
8549 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8551 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8553 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8555 * infrun.c (keep_going_pass_signal): Clear step-over info when
8556 insert_breakpoints fails.
8558 2018-01-11 Pedro Alves <palves@redhat.com>
8561 * infrun.c (resume): Rename to ...
8562 (resume_1): ... this.
8563 (resume): Reimplement as wrapper around resume_1.
8565 2018-01-11 Pedro Alves <palves@redhat.com>
8568 * remote.c (remote_parse_stop_reply): Default to the last-set
8569 general thread instead of to 'magic_null_ptid'.
8571 2018-01-10 Pedro Alves <palves@redhat.com>
8573 * language.h (language_get_symbol_name_matcher): Rename ...
8574 (get_symbol_name_matcher): ... this.
8575 * language.c (language_get_symbol_name_matcher): Ditto.
8576 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8579 2018-01-10 Pedro Alves <palves@redhat.com>
8583 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8584 Adjust to use language_get_symbol_name_matcher instead of
8585 language_defn::la_get_symbol_name_matcher.
8586 * language.c (language_get_symbol_name_matcher): If in Ada mode
8587 and the lookup name is a verbatim match, return Ada's matcher.
8588 * language.h (language_get_symbol_name_matcher): Adjust comment.
8589 (ada_lookup_name_info::verbatim_p):: New method.
8591 2018-01-10 Pedro Alves <palves@redhat.com>
8594 * ada-lang.c (ada_collect_symbol_completion_matches): If the
8595 minsym's language is language_auto or language_cplus, pass down
8596 language_ada instead.
8597 * symtab.c (compare_symbol_name): Don't frob symbol language here.
8599 2018-01-10 Pedro Alves <palves@redhat.com>
8602 * minsyms.c (linkage_name_str): New function.
8603 (iterate_over_minimal_symbols): Use it.
8605 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8607 * NEWS: Document that 'info proc' now works on FreeBSD.
8609 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8611 * configure.ac: Check for kinfo_getfile in libutil.
8612 * configure: Regenerate.
8613 * config.in: Regenerate.
8614 * fbsd-nat.c: Include "fbsd-tdep.h".
8615 (fbsd_fetch_cmdline): New.
8616 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8617 rather than calling error.
8618 (fbsd_info_proc): New.
8619 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8620 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8621 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8623 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8625 * fbsd-nat.c (struct free_deleter): Remove.
8626 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8628 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8630 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8631 NULL for an empty pathname.
8633 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8635 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8636 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8637 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8638 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8639 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8640 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8641 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8642 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8643 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8644 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8645 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8646 (fbsd_core_fetch_timeval, fbsd_print_sigset)
8647 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8648 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
8649 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8651 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
8653 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8654 (gnu_xfer_auxv): New function.
8655 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8658 2018-01-08 Yao Qi <yao.qi@linaro.org>
8659 Simon Marchi <simon.marchi@ericsson.com>
8661 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8663 (COMMON_OBS): Remove selftest.o.
8664 * configure.ac: Append selftest-arch.c and common/selftest.c to
8665 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
8666 * configure: Re-generated.
8667 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8669 (maintenance_info_selftests): Likewise.
8671 2018-01-08 Xavier Roirand <roirand@adacore.com>
8673 * ada-valprint.c (val_print_packed_array_elements): Use
8674 proper number of elements when printing an array indexed
8675 by an enumeration type.
8677 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8679 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8680 (dw2_get_file_names_reader): Adjust.
8681 (lookup_dwo_signatured_type): Adjust.
8682 (lookup_dwp_signatured_type): Adjust.
8683 (lookup_signatured_type): Adjust.
8684 (create_type_unit_group): Adjust.
8685 (get_type_unit_group): Adjust.
8686 (process_psymtab_comp_unit_reader): Adjust.
8687 (build_type_psymtabs_reader): Adjust.
8688 (scan_partial_symbols): Adjust.
8689 (add_partial_symbol): Adjust.
8690 (add_partial_subprogram): Adjust.
8691 (peek_die_abbrev): Adjust.
8692 (fixup_go_packaging): Adjust.
8693 (process_imported_unit_die): Adjust.
8694 (dwarf2_compute_name): Adjust.
8695 (dwarf2_physname): Adjust.
8696 (read_import_statement): Adjust.
8697 (handle_DW_AT_stmt_list): Adjust.
8698 (read_file_scope): Adjust.
8699 (read_func_scope): Adjust.
8700 (read_lexical_block_scope): Adjust.
8701 (read_call_site_scope): Adjust.
8702 (read_variable): Adjust.
8703 (dwarf2_rnglists_process): Adjust.
8704 (dwarf2_ranges_process): Adjust.
8705 (dwarf2_ranges_read): Adjust.
8706 (dwarf2_get_pc_bounds): Adjust.
8707 (dwarf2_record_block_ranges): Adjust.
8708 (dwarf2_add_field): Adjust.
8709 (dwarf2_add_member_fn): Adjust.
8710 (read_structure_type): Adjust.
8711 (process_structure_scope): Adjust.
8712 (read_enumeration_type): Adjust.
8713 (read_array_type): Adjust.
8714 (mark_common_block_symbol_computed): Adjust.
8715 (read_common_block): Adjust.
8716 (read_namespace_type): Adjust.
8717 (read_namespace): Adjust.
8718 (read_module_type): Adjust.
8719 (read_tag_pointer_type): Adjust.
8720 (read_tag_ptr_to_member_type): Adjust.
8721 (read_tag_string_type): Adjust.
8722 (read_subroutine_type): Adjust.
8723 (read_typedef): Adjust.
8724 (read_base_type): Adjust.
8725 (attr_to_dynamic_prop): Adjust.
8726 (read_subrange_type): Adjust.
8727 (read_unspecified_type): Adjust.
8728 (dwarf2_read_abbrevs): Adjust.
8729 (load_partial_dies): Adjust.
8730 (read_partial_die): Adjust.
8731 (find_partial_die): Adjust.
8732 (guess_partial_die_structure_name): Adjust.
8733 (fixup_partial_die): Adjust.
8734 (read_attribute_value): Adjust.
8735 (read_addr_index): Adjust.
8736 (read_addr_index_from_leb128): Adjust.
8737 (read_str_index): Adjust.
8738 (dwarf2_string_attr): Adjust.
8739 (get_debug_line_section): Adjust.
8740 (dwarf_decode_line_header): Adjust.
8741 (lnp_state_machine::check_line_address): Adjust.
8742 (dwarf_decode_lines_1): Adjust.
8743 (dwarf_decode_lines): Adjust.
8744 (dwarf2_start_symtab): Adjust.
8745 (var_decode_location): Adjust.
8746 (new_symbol_full): Adjust.
8747 (dwarf2_const_value_data): Adjust.
8748 (dwarf2_const_value_attr): Adjust.
8749 (dwarf2_const_value): Adjust.
8751 (die_containing_type): Adjust.
8752 (build_error_marker_type): Adjust.
8753 (lookup_die_type): Adjust.
8754 (guess_full_die_structure_name): Adjust.
8755 (anonymous_struct_prefix): Adjust.
8756 (determine_prefix): Adjust.
8757 (dwarf2_name): Adjust.
8758 (follow_die_ref_or_sig): Adjust.
8759 (follow_die_offset): Adjust.
8760 (follow_die_ref): Adjust.
8761 (follow_die_sig_1): Adjust.
8762 (follow_die_sig): Adjust.
8763 (get_signatured_type): Adjust.
8764 (get_DW_AT_signature_type): Adjust.
8765 (decode_locdesc): Adjust.
8766 (dwarf_decode_macros): Adjust.
8767 (cu_debug_loc_section): Adjust.
8768 (fill_in_loclist_baton): Adjust.
8769 (dwarf2_symbol_mark_computed): Adjust.
8770 (init_one_comp_unit): Don't assign
8771 dwarf2_cu::dwarf2_per_objfile.
8772 (set_die_type): Adjust.
8774 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8776 * dwarf2read.c (struct mapped_debug_names): Add constructor.
8777 <dwarf2_per_objfile>: New field.
8778 (dwarf2_per_objfile): Remove global.
8779 (get_dwarf2_per_objfile): New function.
8780 (set_dwarf2_per_objfile): New function.
8781 (dwarf2_build_psymtabs_hard): Change objfile parameter to
8783 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8784 (read_abbrev_offset): Likewise.
8785 (read_indirect_string): Likewise.
8786 (read_indirect_line_string): Likewise.
8787 (read_indirect_string_at_offset): Likewise.
8788 (read_indirect_string_from_dwz): Likewise.
8789 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8791 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8792 (create_all_comp_units): Change objfile parameter to
8794 (create_all_type_units): Likewise.
8795 (process_queue): Add dwarf2_per_objfile parameter.
8796 (read_and_check_comp_unit_head): Likewise.
8797 (lookup_dwo_unit_in_dwp): Likewise.
8798 (get_dwp_file): Likewise.
8799 (process_cu_includes): Likewise.
8800 (struct free_dwo_file_cleanup_data): New struct.
8801 (dwarf2_has_info): Use get_dwarf2_per_objfile and
8802 set_dwarf2_per_objfile.
8803 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
8804 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
8805 context, adjust calls.
8806 (dw2_instantiate_symtab): Likewise.
8807 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
8808 (dw2_get_cu): Likewise.
8809 (create_cu_from_index_list): Change objfile parameter to
8811 (create_cus_from_index_list): Get dwarf2_per_objfile from
8812 context, adjust calls.
8813 (create_cus_from_index): Likewise.
8814 (create_signatured_type_table_from_index): Change objfile
8815 parameter to dwarf2_per_objfile.
8816 (create_signatured_type_table_from_debug_names): Change objfile
8817 parameter to dwarf2_per_objfile.
8818 (create_addrmap_from_index): Likewise.
8819 (create_addrmap_from_aranges): Likewise.
8820 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
8821 (dw2_setup): Remove.
8822 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
8824 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
8825 get_dwarf2_per_objfile.
8826 (dw2_forget_cached_source_info): Likewise.
8827 (dw2_map_symtabs_matching_filename): Likewise.
8828 (struct dw2_symtab_iterator) <index>: Remove.
8829 <dwarf2_per_objfile>: New field.
8830 (dw2_symtab_iter_init): Replace index parameter with
8832 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
8833 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
8834 (dw2_print_stats): Likewise.
8835 (dw2_dump): Likewise.
8836 (dw2_expand_symtabs_for_function): Likewise.
8837 (dw2_expand_all_symtabs): Likewise.
8838 (dw2_expand_symtabs_with_fullname): Likewise.
8839 (dw2_expand_marked_cus): Replace index and objfile parameters
8840 with dwarf2_per_objfile.
8841 (dw_expand_symtabs_matching_file_matcher): Add
8842 dwarf2_per_objfile parameter and adjust calls.
8843 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
8845 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
8846 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
8848 (create_cus_from_debug_names_list): Replace objfile parameter
8849 with dwarf2_per_objfile and adjust calls.
8850 (create_cus_from_debug_names): Likewise.
8851 (dwarf2_read_debug_names): Likewise.
8852 (mapped_debug_names::namei_to_name): Adjust call.
8853 (dw2_debug_names_iterator::next): Likewise.
8854 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
8855 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
8856 (dw2_debug_names_dump): Likewise.
8857 (dw2_debug_names_expand_symtabs_for_function): Likewise.
8858 (dw2_debug_names_expand_symtabs_matching): Likewise.
8859 (dwarf2_initialize_objfile): Likewise.
8860 (dwarf2_build_psymtabs): Likewise.
8861 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
8863 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
8864 (read_and_check_comp_unit_head): Likewise.
8865 (read_abbrev_offset): Likewise.
8866 (create_debug_type_hash_table): Likewise.
8867 (create_debug_types_hash_table): Likewise.
8868 (create_all_type_units): Replace objfile parameter with
8870 (add_type_unit): Add dwarf2_per_objfile parameter.
8871 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
8872 with dwarf2_per_objfile.
8873 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
8874 (lookup_dwp_signatured_type): Likewise.
8875 (lookup_signatured_type): Likewise.
8876 (read_cutu_die_from_dwo): Likewise.
8877 (init_tu_and_read_dwo_dies): Likewise.
8878 (init_cutu_and_read_dies): Likewise.
8879 (init_cutu_and_read_dies_no_follow): Likewise.
8880 (allocate_type_unit_groups_table): Add objfile parameter.
8881 (create_type_unit_group): Use dwarf2_per_objfile from cu.
8882 (get_type_unit_group): Likewise.
8883 (process_psymtab_comp_unit): Update call.
8884 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
8885 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
8886 (print_tu_stats): Likewise.
8887 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8889 (build_type_psymtabs): Change objfile parameter to
8891 (process_skeletonless_type_unit): Use dwarf2_per_objfile
8892 passed in void* parameter.
8893 (process_skeletonless_type_units): Change objfile parameter to
8895 (set_partial_user): Likewise.
8896 (dwarf2_build_psymtabs_hard): Likewise.
8897 (read_comp_units_from_section): Likewise.
8898 (create_all_comp_units): Likewise.
8899 (scan_partial_symbols): Update calls.
8900 (add_partial_symbol): Likewise.
8901 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8902 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8903 (process_queue): Add dwarf2_per_objfile parameter.
8904 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8905 (compute_compunit_symtab_includes): Likewise.
8906 (process_cu_includes): Add dwarf2_per_objfile parameter.
8907 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8908 (process_full_type_unit): Likewise.
8909 (process_imported_unit_die): Update call.
8910 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8911 (read_file_scope): Likewise.
8912 (allocate_dwo_file_hash_table): Add objfile parameter.
8913 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8914 (create_cus_hash_table): Likewise.
8915 (create_dwp_hash_table): Likewise.
8916 (create_dwo_unit_in_dwp_v1): Likewise.
8917 (create_dwp_v2_section): Likewise.
8918 (create_dwo_unit_in_dwp_v2): Likewise.
8919 (lookup_dwo_unit_in_dwp): Likewise.
8920 (try_open_dwop_file): Likewise.
8921 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
8922 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
8923 cleanup to include a reference to dwarf2_per_objfile.
8924 (open_dwp_file): Add dwarf2_per_objfile parameter.
8925 (open_and_init_dwp_file): Likewise.
8926 (get_dwp_file): Likewise.
8927 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
8928 (queue_and_load_all_dwo_tus): Update call.
8929 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
8931 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
8932 (dwarf2_ranges_process): Likewise.
8933 (dwarf2_get_pc_bounds): Likewise.
8934 (mark_common_block_symbol_computed): Likewise.
8935 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8936 (dwarf2_read_abbrevs): Update call.
8937 (read_partial_die): Use dwarf2_per_objfile from cu.
8938 (find_partial_die): Likewise.
8939 (fixup_partial_die): Likewise.
8940 (read_attribute_value): Likewise.
8941 (read_indirect_string_at_offset_from): Add objfile parameter.
8942 (read_indirect_string_at_offset): Add dwarf2_per_objfile
8944 (read_indirect_string_from_dwz): Add objfile parameter.
8945 (read_indirect_string): Add objfile parameter.
8946 (read_addr_index_1): Add dwarf2_per_objfile parameter.
8947 (read_addr_index): Use dwarf2_per_objfile from cu.
8948 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
8950 (read_str_index): Use dwarf2_per_objfile from cu.
8951 (get_debug_line_section): Likewise.
8952 (read_formatted_entries): Add dwarf2_per_objfile parameter.
8953 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
8954 (new_symbol_full): Use dwarf2_per_objfile from cu.
8955 (build_error_marker_type): Likewise.
8956 (lookup_die_type): Likewise.
8957 (determine_prefix): Likewise.
8958 (follow_die_offset): Likewise.
8959 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
8960 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
8961 (dwarf2_fetch_die_type_sect_off): Likewise.
8962 (dwarf2_get_die_type): Likewise.
8963 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
8964 (get_signatured_type): Likewise.
8965 (get_DW_AT_signature_type): Likewise.
8966 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8967 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
8968 (cu_debug_loc_section): Likewise.
8969 (fill_in_loclist_baton): Likewise.
8970 (dwarf2_symbol_mark_computed): Likewise.
8971 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8973 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
8975 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8976 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
8977 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
8978 (set_die_type): Use dwarf2_free_objfile from cu.
8979 (get_die_type_at_offset): Likewise.
8980 (dwarf2_per_objfile_free): Don't assign global variable.
8981 (debug_names) <constructor>: Add dwarf2_per_objfile
8982 parameter, update m_debugstrlookup construction.
8983 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
8985 <m_dwarf2_per_objfile>: New field.
8986 <lookup>: Use m_dwarf2_per_objfile.
8987 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
8988 (psyms_seen_size): Likewise.
8989 (write_gdbindex): Replace objfile parameter with
8991 (write_debug_names): Likewise.
8992 (write_psymtabs_to_index): Likewise.
8993 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
8996 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8998 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
8999 <dwarf2_per_objfile>: New field.
9000 (struct dwarf2_per_cu_data) <objfile>: Remove.
9001 <dwarf2_per_objfile>: New field.
9002 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9004 (create_signatured_type_table_from_index): Likewise.
9005 (create_debug_type_hash_table): Likewise.
9006 (fill_in_sig_entry_from_dwo_entry): Likewise.
9007 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9008 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9010 (create_partial_symtab): Access objfile through
9012 (process_psymtab_comp_unit_reader): Likewise.
9013 (read_comp_units_from_section): Likewise.
9014 (scan_partial_symbols): Likewise.
9015 (add_partial_symbol): Likewise.
9016 (add_partial_subprogram): Likewise.
9017 (peek_die_abbrev): Likewise.
9018 (fixup_go_packaging): Likewise.
9019 (process_full_comp_unit): Likewise.
9020 (process_full_type_unit): Likewise.
9021 (process_imported_unit_die): Likewise.
9022 (dwarf2_compute_name): Likewise.
9023 (dwarf2_physname): Likewise.
9024 (read_import_statement): Likewise.
9025 (create_cus_hash_table): Assign dwarf2_physname instead of
9027 (read_func_scope): Access objfile through dwarf2_per_objfile.
9028 (read_lexical_block_scope): Likewise.
9029 (read_call_site_scope): Likewise.
9030 (read_variable): Likewise.
9031 (dwarf2_rnglists_process): Likewise.
9032 (dwarf2_ranges_process): Likewise.
9033 (dwarf2_ranges_read): Likewise.
9034 (dwarf2_record_block_ranges): Likewise.
9035 (dwarf2_add_field): Likewise.
9036 (dwarf2_add_member_fn): Likewise.
9037 (read_structure_type): Likewise.
9038 (process_structure_scope): Likewise.
9039 (read_enumeration_type): Likewise.
9040 (read_array_type): Likewise.
9041 (read_common_block): Likewise.
9042 (read_namespace_type): Likewise.
9043 (read_namespace): Likewise.
9044 (read_module_type): Likewise.
9045 (read_tag_pointer_type): Likewise.
9046 (read_tag_ptr_to_member_type): Likewise.
9047 (read_tag_string_type): Likewise.
9048 (read_subroutine_type): Likewise.
9049 (read_typedef): Likewise.
9050 (read_base_type): Likewise.
9051 (attr_to_dynamic_prop): Likewise.
9052 (read_subrange_type): Likewise.
9053 (read_unspecified_type): Likewise.
9054 (load_partial_dies): Likewise.
9055 (read_partial_die): Likewise.
9056 (find_partial_die): Likewise.
9057 (guess_partial_die_structure_name): Likewise.
9058 (fixup_partial_die): Likewise.
9059 (read_attribute_value): Likewise.
9060 (read_addr_index_from_leb128): Likewise.
9061 (dwarf2_read_addr_index): Likewise.
9062 (dwarf2_string_attr): Likewise.
9063 (lnp_state_machine::check_line_address): Likewise.
9064 (dwarf_decode_lines_1): Likewise.
9065 (dwarf_decode_lines): Likewise.
9066 (dwarf2_start_symtab): Likewise.
9067 (var_decode_location): Likewise.
9068 (new_symbol_full): Likewise.
9069 (dwarf2_const_value_data): Likewise.
9070 (dwarf2_const_value_attr): Likewise.
9071 (dwarf2_const_value): Likewise.
9072 (die_type): Likewise.
9073 (die_containing_type): Likewise.
9074 (lookup_die_type): Likewise.
9075 (guess_full_die_structure_name): Likewise.
9076 (anonymous_struct_prefix): Likewise.
9077 (dwarf2_name): Likewise.
9078 (follow_die_ref_or_sig): Likewise.
9079 (follow_die_offset): Likewise.
9080 (follow_die_ref): Likewise.
9081 (dwarf2_fetch_die_loc_sect_off): Likewise.
9082 (dwarf2_fetch_constant_bytes): Likewise.
9083 (dwarf2_fetch_die_type_sect_off): Likewise.
9084 (dwarf2_get_die_type): Likewise.
9085 (follow_die_sig): Likewise.
9086 (decode_locdesc): Likewise.
9087 (dwarf2_per_cu_objfile): Likewise.
9088 (dwarf2_per_cu_text_offset): Likewise.
9089 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9091 (set_die_type): Access objfile through
9094 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9096 * valprint.c (converted_character_d): Remove typedef.
9097 (DEF_VEC_O (converted_character_d)): Remove.
9098 (count_next_character): Use std::vector.
9099 (print_converted_chars_to_obstack): Likewise.
9100 (generic_printstr): Likewise.
9102 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9104 * xml-support.h (struct gdb_xml_value): Add constructor.
9105 <value>: Change type to unique_xmalloc_ptr.
9106 (gdb_xml_value_s): Remove typedef.
9107 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9108 (gdb_xml_element_start_handler): Change parameter type to
9110 (xml_find_attribute): Likewise.
9111 * xml-support.c (xml_find_attribute): Change parameter type to
9112 std::vector and adjust.
9113 (gdb_xml_values_cleanup): Remove.
9114 (gdb_xml_parser::start_element): Adjust to std::vector.
9115 (xinclude_start_include): Change paraeter type to std::vector
9117 * btrace.c (check_xml_btrace_version): Likewise.
9118 (parse_xml_btrace_block): Likewise.
9119 (parse_xml_btrace_pt_config_cpu): Likewise.
9120 (parse_xml_btrace_pt): Likewise.
9121 (parse_xml_btrace_conf_bts): Likewise.
9122 (parse_xml_btrace_conf_pt): Likewise.
9123 * memory-map.c (memory_map_start_memory): Likewise.
9124 (memory_map_start_property): Likewise.
9125 * osdata.c (osdata_start_osdata): Likewise.
9126 (osdata_start_item): Likewise.
9127 (osdata_start_column): Likewise.
9128 * remote.c (start_thread): Likewise.
9129 * solib-aix.c (library_list_start_library): Likewise.
9130 (library_list_start_list): Likewise.
9131 * solib-svr4.c (library_list_start_library): Likewise.
9132 (svr4_library_list_start_list): Likewise.
9133 * solib-target.c (library_list_start_segment): Likewise.
9134 (library_list_start_section): Likewise.
9135 (library_list_start_library): Likewise.
9136 (library_list_start_list): Likewise.
9137 * tracepoint.c (traceframe_info_start_memory): Likewise.
9138 (traceframe_info_start_tvar): Likewise.
9139 * xml-syscall.c (syscall_start_syscall): Likewise.
9140 * xml-tdesc.c (tdesc_start_target): Likewise.
9141 (tdesc_start_feature): Likewise.
9142 (tdesc_start_reg): Likewise.
9143 (tdesc_start_union): Likewise.
9144 (tdesc_start_struct): Likewise.
9145 (tdesc_start_flags): Likewise.
9146 (tdesc_start_enum): Likewise.
9147 (tdesc_start_field): Likewise.
9148 (tdesc_start_enum_value): Likewise.
9149 (tdesc_start_vector): Likewise.
9151 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9153 * extension.h (struct xmethod_worker) <clone>: Remove.
9154 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9156 (python_xmethod_worker::clone): Remove.
9157 * valops.c (find_overload_match): Use std::move instead of
9160 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9162 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9163 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9164 <free_xmethod_worker_data>: Remove.
9165 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9166 <get_xmethod_arg_types>: Remove.
9167 <get_xmethod_result_type>: Remove.
9168 <invoke_xmethod>: Remove.
9169 * extension.c (new_xmethod_worker): Remove.
9170 (clone_xmethod_worker): Remove.
9171 (get_matching_xmethod_workers): Return void, pass std::vector by
9173 (get_xmethod_arg_types): Rename to...
9174 (xmethod_worker::get_arg_types): ... this, and adjust.
9175 (get_xmethod_result_type): Rename to...
9176 (xmethod_worker::get_result_type): ... this, and adjust.
9177 (invoke_xmethod): Remove.
9178 (free_xmethod_worker): Remove.
9179 (free_xmethod_worker_vec): Remove.
9180 * extension.h (enum ext_lang_rc): Move here from
9182 (struct xmethod_worker): Add constructor and destructor.
9185 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9186 virtual pure methods.
9187 <get_arg_types, get_result_type>: New methods.
9188 (xmethod_worker_ptr): Remove typedef.
9189 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9190 (xmethod_worker_vec): Remove typedef.
9191 (xmethod_worker_up): New typedef.
9192 (invoke_xmethod): Remove.
9193 (clone_xmethod_worker): Remove.
9194 (free_xmethod_worker): Remove.
9195 (free_xmethod_worker_vec): Remove.
9196 (get_xmethod_arg_types): Remove.
9197 (get_xmethod_result_type): Remove.
9198 * valops.c (find_method_list): Use std::vector, don't use
9199 intermediate vector.
9200 (value_find_oload_method_list): Use std::vector.
9201 (find_overload_match): Use std::vector.
9202 (find_oload_champ): Use std::vector.
9203 * value.c (value_free): Use operator delete.
9204 (value_of_xmethod): Rename to...
9205 (value_from_xmethod): ... this. Don't assign
9206 xmethod_worker::value, take rvalue-reference.
9207 (result_type_of_xmethod): Adjust.
9208 (call_xmethod): Adjust.
9209 * value.h: Include extension.h.
9210 (struct xmethod_worker): Don't forward-declare.
9211 (value_of_xmethod): Rename to...
9212 (value_from_xmethod): ... this, take rvalue-reference.
9213 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9214 (struct python_xmethod_worker): ... this, add constructor and
9216 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9217 (gdbpy_free_xmethod_worker_data): Rename to...
9218 (python_xmethod_worker::~python_xmethod_worker): ... this and
9220 (gdbpy_clone_xmethod_worker_data): Rename to...
9221 (python_xmethod_worker::clone): ... this and adjust.
9222 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9224 (gdbpy_get_xmethod_arg_types): Rename to...
9225 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9226 (gdbpy_get_xmethod_result_type): Rename to...
9227 (python_xmethod_worker::do_get_result_type): ... this and
9229 (gdbpy_invoke_xmethod): Rename to...
9230 (python_xmethod_worker::invoke): ... this and adjust.
9231 (new_python_xmethod_worker): Rename to...
9232 (python_xmethod_worker::python_xmethod_worker): ... this and
9234 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9236 (gdbpy_free_xmethod_worker_data): Remove.
9237 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9238 (gdbpy_get_xmethod_arg_types): Remove.
9239 (gdbpy_get_xmethod_result_type): Remove.
9240 (gdbpy_invoke_xmethod): Remove.
9241 * python/python.c (python_extension_ops): Remove obsolete
9244 2018-01-05 Pedro Alves <palves@redhat.com>
9247 * common/signals-state-save-restore.c
9248 (save_original_signals_state): New parameter 'quiet'. Warn if we
9249 find a custom handler preinstalled, instead of internal erroring.
9250 But only warn if !quiet.
9251 * common/signals-state-save-restore.h
9252 (save_original_signals_state): New parameter 'quiet'.
9253 * main.c (captured_main_1): Move save_original_signals_state call
9254 after option handling, and pass QUIET.
9256 2018-01-05 Pedro Alves <palves@redhat.com>
9258 * spu-tdep.c (spu_catch_start): Pass
9259 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9261 2018-01-05 Pedro Alves <palves@redhat.com>
9264 * ada-lang.c (literal_symbol_name_matcher): New function.
9265 (ada_get_symbol_name_matcher): Use it for
9266 symbol_name_match_type::SEARCH_NAME.
9267 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9268 it down instead of assuming symbol_name_match_type::FULL.
9269 * block.h (block_lookup_symbol): New parameter 'match_type'.
9270 * c-valprint.c (print_unpacked_pointer): Use
9271 lookup_symbol_search_name instead of lookup_symbol.
9272 * compile/compile-object-load.c (get_out_value_type): Pass down
9273 symbol_name_match_type::SEARCH_NAME.
9274 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9275 symbol_name_match_type::FULL.
9276 * cp-support.c (cp_get_symbol_name_matcher): Handle
9277 symbol_name_match_type::SEARCH_NAME.
9278 * infrun.c (insert_exception_resume_breakpoint): Use
9279 lookup_symbol_search_name.
9280 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9281 * psymtab.c (maintenance_check_psymtabs): Use
9282 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9283 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9285 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9286 if symbol_name_match_type::SEARCH_NAME.
9287 (lookup_symbol_in_language): Pass down
9288 symbol_name_match_type::FULL.
9289 (lookup_symbol_search_name): New.
9290 (lookup_language_this): Pass down
9291 symbol_name_match_type::SEARCH_NAME.
9292 (lookup_symbol_aux, lookup_local_symbol): New parameter
9293 'match_type'. Pass it down.
9294 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9295 (lookup_symbol_search_name): New declaration.
9296 (lookup_symbol_in_block): New 'match_type' parameter.
9298 2018-01-05 Pedro Alves <palves@redhat.com>
9301 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9303 (ada_lookup_symbol): Reimplement in terms of
9304 ada_lookup_symbol_list, bits factored out from
9305 ada_lookup_encoded_symbol.
9307 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9309 * ada-exp.y (write_object_renaming): When subscripting an array
9310 using a symbol as the index, pass the block in call to
9311 ada_lookup_encoded_symbol when looking that symbol up.
9313 2018-01-05 Jerome Guitton <guitton@adacore.com>
9315 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9318 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9320 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9321 the case where VALUE_LVAL (val0) is not lval_memory.
9323 2018-01-05 Xavier Roirand <roirand@adacore.com>
9325 * ada-valprint.c (print_optional_low_bound): Handle
9326 character-indexed array printing like boolean-indexed array
9329 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9331 * NEWS: Create a new section for the next release branch.
9332 Rename the section of the current branch, now that it has
9335 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9337 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9338 * version.in: Bump version to 8.1.50.DATE-git.
9340 2018-01-03 Xavier Roirand <roirand@adacore.com>
9342 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9344 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9346 (default_exception_support_info) <catch_handlers_sym>: Add field.
9347 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9348 (ada_exception_name_addr_1): Add "catch handlers" handling.
9349 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9351 (create_excep_cond_exprs) <ex>: Add parameter.
9352 (re_set_exception): Update create_excep_cond_exprs call.
9353 (print_it_exception, print_one_exception, print_mention_exception)
9354 (print_recreate_exception): Add "catch handler" handling.
9355 (allocate_location_catch_handlers, re_set_catch_handlers)
9356 (check_status_catch_handlers, print_it_catch_handlers)
9357 (print_one_catch_handlers, print_mention_catch_handlers)
9358 (print_recreate_catch_handlers): New function.
9359 (catch_handlers_breakpoint_ops): New variable.
9360 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9361 Add parameter. Add "catch handler" handling.
9362 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9363 Add "catch handler" handling.
9364 (ada_exception_catchpoint_cond_string): Add "catch handler"
9366 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9368 (catch_ada_handlers_command): New function.
9369 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9370 operations structure.
9371 (_initialize_ada_language): Add "catch handlers" command entry.
9372 * NEWS: Document "catch handlers" feature.
9374 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9376 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9377 account when creating the array type of the slice.
9378 (ada_value_slice): Likewise.
9380 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9382 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9384 (create_array_type_with_stride): Add byte_stride_prop parameter.
9385 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9386 New parameter. Update all callers in this file.
9387 (array_type_has_dynamic_stride): New function.
9388 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9389 of arrays with dynamic byte strides.
9390 * dwarf2read.c (read_array_type): Add support for dynamic
9391 DW_AT_byte_stride attributes.
9393 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9395 * dwarf2read.c (read_unspecified_type): Treat
9396 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9398 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9400 Update copyright year range in all GDB files.
9402 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9404 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9405 and gdb/testsuite/gdb.base/step-line.c.
9407 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9409 * copyright.py (main): Dump the contents of
9410 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9411 even if BY_HAND is empty.
9413 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9415 * top.c (print_gdb_version): Update Copyright year in version
9418 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9420 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9422 For older changes see ChangeLog-2017.
9428 version-control: never